JsonPathQuery

class JsonPathQuery @ExperimentalDelvaApi constructor(val path: JsonPath, val mode: ResultMode = ResultMode.CONTAINING_ELEMENT, val nested: NestedHits = NestedHits.ALL, val limit: Int = 100, val maxBytes: Long = Long.MAX_VALUE, val after: Cursor? = null, val type: String? = null, val scan: ScanPolicy = ScanPolicy.REJECT, val order: SearchOrder = SearchOrder.ASCENDING, documentFilter: DocumentFilter?)(source)

A JSONPath search (SPEC.md §10.4): the nodes path selects from the documents of the store. Hits are the distinct selected nodes in (docId, nodePre) order, ascending or descending by order — each node once, unlike an RFC 9535 nodelist, which JsonStore.select gives for one value.

Queries are values: two instances with the same settings are equal, and copy derives a variant.

Constructors

Link copied to clipboard
constructor(path: JsonPath, mode: ResultMode = ResultMode.CONTAINING_ELEMENT, nested: NestedHits = NestedHits.ALL, limit: Int = 100, maxBytes: Long = Long.MAX_VALUE, after: Cursor? = null, type: String? = null, scan: ScanPolicy = ScanPolicy.REJECT, order: SearchOrder = SearchOrder.ASCENDING, documentFilter: DocumentFilter?)
constructor(path: JsonPath, mode: ResultMode = ResultMode.CONTAINING_ELEMENT, nested: NestedHits = NestedHits.ALL, limit: Int = 100, maxBytes: Long = Long.MAX_VALUE, after: Cursor? = null, type: String? = null, scan: ScanPolicy = ScanPolicy.REJECT, order: SearchOrder = SearchOrder.ASCENDING)

A search of every document.

Properties

Link copied to clipboard
Link copied to clipboard

The condition a document has to meet to be searched (SPEC.md §10.5), or null to search every document. A comparison of one of its root's members with a literal is an index term the search requires, as one in path is: a query whose path alone would need a scan doesn't when the filter names such a term.

Link copied to clipboard
val limit: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: String?

Functions

Link copied to clipboard
fun copy(path: JsonPath = this.path, mode: ResultMode = this.mode, nested: NestedHits = this.nested, limit: Int = this.limit, maxBytes: Long = this.maxBytes, after: Cursor? = this.after, type: String? = this.type, scan: ScanPolicy = this.scan, order: SearchOrder = this.order): JsonPathQuery

This query with the given settings changed, the documentFilter kept; the result is validated like a new instance.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

This query with documentFilter set to filter, or removed with null.