PrimaryUnique

molecule.sql.core.query.cursorStrategy.PrimaryUnique
case class PrimaryUnique[Tpl](elements: List[Element], optLimit: Option[Int], cursor: String, m2q: Model2SqlQuery[Tpl] & SqlQueryBase) extends SqlQueryResolve[Tpl], FutureUtils, Pagination[Tpl], ModelTransformations_, MoleculeLogging

Molecule has a unique attribute that is sorted first.

Then we can easily filter by its previous value in either direction.

Type parameters

Tpl

Type of each row

Value parameters

cursor

Base64 encoded cursor meta information

elements

Molecule model

optLimit

When going forward from start, use a positive number. And vice versa from end with a negative number. Can't be zero.

Attributes

Source
PrimaryUnique.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait FutureUtils
trait Logging
class SqlQueryResolve[Tpl]
trait ModelUtils
trait Pagination[Tpl]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

implicit class futEither2fut[T](fut: Future[Either[MoleculeError, T]])(implicit ec: ExecutionContext)

Attributes

Inherited from:
FutureUtils
Source
FutureUtils.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def getPage(tokens: List[String], limit: Int)(implicit conn: JdbcConn_JVM): (List[Tpl], String, Boolean)

Attributes

Source
PrimaryUnique.scala

Inherited methods

protected def addOne[T](es: List[Element], op: Op, vs: Seq[T]): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def addOptOne[T](es: List[Element], op: Op, vs: Option[Seq[T]]): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def addOptSet[T](es: List[Element], op: Op, vs: Option[Seq[Set[T]]]): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def addSet[T](es: List[Element], op: Op, vs: Seq[Set[T]]): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def addSort(es: List[Element], sort: String): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def asIs(es: List[Element], kw: Kw, n: Option[Int]): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
def await[T](body: => Future[T], atMost: Duration): T

Attributes

Inherited from:
FutureUtils
Source
FutureUtils.scala
protected def cleanUpdateElements(elements: List[Element]): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def countValueAttrs(elements: List[Element]): Int

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
protected def decoder(tpe: String): String => Any

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def decoder2(tpe: String): String => Any

Attributes

Inherited from:
Pagination
Source
Pagination.scala
def either[T](fut: Future[T])(implicit ec: ExecutionContext): Future[Either[MoleculeError, T]]

Attributes

Inherited from:
FutureUtils
Source
FutureUtils.scala
protected def encoder(tpe: String, kind: String): Any => String

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def filterAttr(es: List[Element], op: Op, filterAttrMolecule: Molecule): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
def future[T](body: => T)(implicit ec: ExecutionContext): Future[T]

Attributes

Inherited from:
FutureUtils
Source
FutureUtils.scala
final def getAttrNames(elements: List[Element], attrs: Set[String]): Set[String]

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
protected def getCount(limit: Int, forward: Boolean, totalCount: Int): Int

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def getData(conn: JdbcConn_JVM, optLimit: Option[Int], optOffset: Option[Int]): ResultSet

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
protected def getFilterAttr(tpe: String, ns: String, attr: String, fn: Op, v: String): AttrOneTac

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def getFromUntil(tc: Int, limit: Option[Int], offset: Option[Int]): Option[(Int, Int, Boolean)]

Attributes

Inherited from:
Pagination
Source
Pagination.scala
final protected def getInitialNonGenericNs(elements: List[Element]): String

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
final protected def getInitialNs(elements: List[Element]): String

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
protected def getRawData(conn: JdbcConn_JVM, altElements: List[Element], optLimit: Option[Int], optOffset: Option[Int]): ResultSet

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
protected def getRowHashes(tpls: List[Tpl]): List[String]

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def getTotalCount(conn: JdbcConn_JVM): Int

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
protected def getUniquePair(tpls: List[Tpl], uniqueIndex: Int, encode: Any => String): List[String]

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def getUniqueValues(tpls0: List[Tpl], uniqueIndex: Int, encode: Any => String): List[String]

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def initialCursor(conn: Conn, elements: List[Element], tpls: List[Tpl]): String

Attributes

Inherited from:
Pagination
Source
Pagination.scala
def isRefUpdate(elements: List[Element]): Boolean

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
protected def logger: Logger

The logger for this class.

The logger for this class.

Attributes

Inherited from:
Logging
Source
Logging.scala
protected def loggerName: String

Override this to change the name of the underlying logger.

Override this to change the name of the underlying logger.

Defaults to class name with package

Attributes

Inherited from:
Logging
Source
Logging.scala
protected def nextCursorNoUnique(tpls: List[Tpl], tokens: List[String]): String

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def nextCursorSubUnique(tpls: List[Tpl], tokens: List[String]): String

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def nextCursorUniques(tpls: List[Tpl], tokens: List[String]): String

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def noKeywords(elements: List[Element], optProxy: Option[ConnProxy]): List[Element]

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
protected def offsetLimitCheck(optLimit: Option[Int], optOffset: Option[Int]): Unit

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def offsetList(sortedRows: List[Tpl], fromUntil: Option[(Int, Int, Boolean)]): List[Tpl]

Attributes

Inherited from:
Pagination
Source
Pagination.scala
def paginateFromIdentifiers(conn: JdbcConn_JVM, limit: Int, forward: Boolean, allTokens: List[String], attrTokens: List[String], identifiers: List[Any], identifyTpl: Tpl => Any, nextCursor: (List[Tpl], List[String]) => String): (List[Tpl], String, Boolean)

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
protected def paginateTpls(count: Int, tpls: List[Tpl], identifiers: List[Any], identify: Tpl => Any): (List[Tpl], Int)

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def paginationCoords(optLimit: Option[Int], optOffset: Option[Int]): (Boolean, Boolean)

Attributes

Inherited from:
Pagination
Source
Pagination.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
protected def reverseTopLevelSorting(es: List[Element]): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def toDouble(es: List[Element], kw: Kw): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def toInt(es: List[Element], kw: Kw): List[Element]

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def topLevelAttrCount(elements: List[Element], count: Int): Int

Attributes

Inherited from:
ModelTransformations_
Source
ModelTransformations_.scala
protected def tpeEncode(element: AttrOne): (String, Any => String)

Attributes

Inherited from:
Pagination
Source
Pagination.scala

Inherited fields

lazy val edgeValuesNotFound: String

Attributes

Inherited from:
Pagination
Source
Pagination.scala
val logFormatter: Formatter

Attributes

Inherited from:
MoleculeLogging
Source
MoleculeLogging.scala
val logLevel: Level

Attributes

Inherited from:
MoleculeLogging
Source
MoleculeLogging.scala

Implicits

Inherited implicits

final implicit def futEither2fut[T](fut: Future[Either[MoleculeError, T]])(implicit ec: ExecutionContext): futEither2fut[T]

Attributes

Inherited from:
FutureUtils
Source
FutureUtils.scala