Types

Link copied to clipboard
class Order<in T : Node>(val fields: List<OrderField<T>>)

Order defined by an OrderField and an OrderDirection

Link copied to clipboard

Different directions in which a order can be applied

Link copied to clipboard
data class OrderField<in T : Node>(val part: OrderPart<T>, val direction: OrderDirection)

Defines an order without direction

Link copied to clipboard
abstract class OrderPart<in T : Node>(val name: String, val isNullable: Boolean, val isComplex: Boolean)

Part of a complete order Defines an order over all nodes by ordering based on a property on the database node

Link copied to clipboard
class PropertyOrderPart<T : Node>(val property: KProperty<*>, val neo4jPropertyName: String) : OrderPart<T>

OrderPart defined by a KProperty

Link copied to clipboard
class RelationshipOrderPart<T : Node>(val relationshipDefinition: OneRelationshipDefinition, val relatedOrderPart: OrderPart<*>, val relatedNodeDefinition: NodeDefinition) : OrderPart<T>

OrderPart defined by a OneRelationshipDefinition and a related OrderPart

Properties

Link copied to clipboard

Default order, ascending and only based on the id

Link copied to clipboard

Order field with only IdOrderPart as parts

Link copied to clipboard

Order part for the id of a Node

Functions

Link copied to clipboard
private fun <T : Node> generateOrderPartsForProperty(nodeDefinition: NodeDefinition, property: KProperty1<T, *>, includeComplex: Boolean, nodeDefinitionCollection: NodeDefinitionCollection, additionalOrderBeans: Map<String, OrderPart<*>>): List<OrderPart<T>>

Generates the OrderParts for a property of a Node

private fun <T : Node> generateOrderPartsForRelationshipProperty(relationshipDefinition: RelationshipDefinition?, nodeDefinitionCollection: NodeDefinitionCollection, additionalOrderBeans: Map<String, OrderPart<*>>): List<OrderPart<T>>

Generates the OrderParts for a relationship property

Link copied to clipboard
fun <T : Node> generateOrders(type: KClass<T>, additionalOrderBeans: Map<String, OrderPart<*>>, nodeDefinitionCollection: NodeDefinitionCollection, includeComplex: Boolean = true): Map<String, OrderPart<T>>

Generates a map from order field name (enum casing) to OrderPart. The OrderParts are detected based on the OrderProperty annotation.

Link copied to clipboard
fun parseOrder(value: Any): Order<*>

Parses the GraphQL input for an Order

Link copied to clipboard

Expects a camelCase String, inserts a _ before each capital letter, and then makes all letters uppercase