SubUnique

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

Molecule has a unique attribute that is not sorted first.

We filter by the previous value of the primary non-unique attribute and then loop until the previous value of the unique attribute is found and then take the following rows.

This is of course not optimal, especially if the primary standard sort attribute contains few values and the data set is big. * Presumes that the row with the previous unique value hasn't been altered.

Type parameters

Tpl

Type of each row

Value parameters

cursor

Base64 encoded cursor meta information, including previous edge values.

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
SubUnique.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(allTokens: List[String], limit: Int)(implicit conn: JdbcConn_JVM): (List[Tpl], String, Boolean)

Attributes

Source
SubUnique.scala

Inherited methods

def await[T](body: => Future[T], atMost: Duration): T

Attributes

Inherited from:
FutureUtils
Source
FutureUtils.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
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 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