SubUnique

molecule.db.common.query.cursorStrategy.SubUnique
case class SubUnique[Tpl](dataModel: DataModel, optLimit: Option[Int], cursor: String, m2q: Model2SqlQuery & 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 MoleculeLogging
trait Logging
class SqlQueryResolve[Tpl]
trait ModelUtils
trait Pagination[Tpl]
trait BaseHelpers
trait DateHandling
trait RegexMatching
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

implicit class Regex(sc: StringContext)

Attributes

Inherited from:
RegexMatching
Source
RegexMatching.scala
Supertypes
class Object
trait Matchable
class Any
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

Inherited types

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala

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
def byteBufferToArray(buf: ByteBuffer): Array[Byte]

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
protected def castTuples(rs2row: RS => Any, sortedRows: RS, forward: Boolean): List[Tpl]

Attributes

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

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
def date2str(date: Date, zoneOffset: ZoneOffset): String

Attributes

Inherited from:
DateHandling
Source
DateHandling.scala
def daylight(ms: Long): Int

Attributes

Inherited from:
DateHandling
Source
DateHandling.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 diff(s1: String, s2: String): Unit

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.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 escStr(s: String): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def expandDateStr(dateStr: String): String

Attributes

Inherited from:
DateHandling
Source
DateHandling.scala
def firstLow(str: Any): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.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]): ResultSetInterface

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
protected def getFilterAttr(tpe: String, ent: 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 getInitialEntity(elements: List[Element]): String

Attributes

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

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
def getKwName(kw: String): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def getNth(n: Int): String

Attributes

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

Attributes

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

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
protected def handleNested(c: CastNested, limit: Int, forward: Boolean, sortedRows: RS, conn: JdbcConn_JVM): (List[Tpl], String, Boolean)

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
protected def handleTuples(c: CastStrategy, limit: Int, forward: Boolean, sortedRows: RS, conn: JdbcConn_JVM): (List[Tpl], String, Boolean)

Attributes

Inherited from:
SqlQueryResolve
Source
SqlQueryResolve.scala
def hasRef(elements: List[Element]): Boolean

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
def indent(tabs: Int): String

Attributes

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

Attributes

Inherited from:
Pagination
Source
Pagination.scala
protected def keywordsSuffixed(elements: List[Element], proxy: ConnProxy): List[Element]

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
final def list[T](values: Iterable[T]): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def localOffset: String

Attributes

Inherited from:
DateHandling
Source
DateHandling.scala
def localZoneOffset: ZoneOffset

Attributes

Inherited from:
DateHandling
Source
DateHandling.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
def noEntityReUseAfterBackref(nextElement: Element, prevRefs: List[String], backRef: String): Unit

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
def noNested: Nothing

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
def noOptRef: Nothing

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
def noOptional(a: Attr): Nothing

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
final def o(opt: Option[Any]): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
final def oStr(opt: Option[String]): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
final def oStr2(opt: Option[String]): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.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
final def opt(opt: Option[Any]): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
final def optFilterAttr(opt: Option[(Int, List[String], Any)]): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def pad(longest: Int, shorter: Int): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def padS(longest: Int, str: String): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.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
final def render(value: Any): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
final def renderValidations(validations: List[(String, String)]): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def ss(a: String, b: String, c: String): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def ss(a: String, b: String): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def str2date(s: String, zoneOffset: ZoneOffset): Date

Attributes

Inherited from:
DateHandling
Source
DateHandling.scala
def str2zdt(s: String, zoneOffset: ZoneOffset): ZonedDateTime

Attributes

Inherited from:
DateHandling
Source
DateHandling.scala
def thousands(i: Long): String

Attributes

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

Attributes

Inherited from:
Pagination
Source
Pagination.scala
def truncateDateStr(dateStr: String): String

Attributes

Inherited from:
DateHandling
Source
DateHandling.scala
def unescStr(s: String): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
protected def validKey(key: String): String

Attributes

Inherited from:
ModelUtils
Source
ModelUtils.scala
def withDecimal(v: Any): String

Attributes

Inherited from:
BaseHelpers
Source
BaseHelpers.scala
def zone: ZoneId

Attributes

Inherited from:
DateHandling
Source
DateHandling.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 Regex(sc: StringContext): Regex

Attributes

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

Attributes

Inherited from:
FutureUtils
Source
FutureUtils.scala