class Order<in T : Node>(val fields: List<OrderField<T>>)

Order defined by an OrderField and an OrderDirection

Parameters

fields

defines how to order, e.g. by which properties of the node

Type Parameters

T

the type of Node to which this order is applied

Constructors

Link copied to clipboard
constructor(fields: List<OrderField<T>>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun generateCursor(node: T, objectMapper: ObjectMapper): String

Generates a cursor for a node, e.g. a unique identifier for the provided node based on the properties specified by fields

Link copied to clipboard
fun parseCursor(cursor: String, objectMapper: ObjectMapper): Map<String, Any?>

Parses a cursor generated by generateCursor into a map from OrderPart name to value provided in the cursor Can be used for filtering in the database, e.g. return only Nodes which are after / before the cursor