QuerySpec

open class QuerySpec

Simple class to represent a query spec

Types

Link copied to clipboard
enum Order
Simple class to represent query order
Link copied to clipboard
Query type enum

Properties

Link copied to clipboard
val BEGIN_KEY: String = "beginKey"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val END_KEY: String = "endKey"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val INDEX_PATH: String = "indexPath"
Link copied to clipboard
val LIKE_KEY: String = "likeKey"
Link copied to clipboard
Link copied to clipboard
val MATCH_KEY: String = "matchKey"
Link copied to clipboard
Link copied to clipboard
val ORDER: String = "order"
Link copied to clipboard
Link copied to clipboard
val ORDER_PATH: String = "orderPath"
Link copied to clipboard
Link copied to clipboard
val PAGE_SIZE: String = "pageSize"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val QUERY_TYPE: String = "queryType"
Link copied to clipboard
Link copied to clipboard
val SELECT_PATHS: String = "selectPaths"
Link copied to clipboard
Link copied to clipboard
val SMART_SQL: String = "smartSql"
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun buildAllQuerySpec(soupName: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
open fun buildAllQuerySpec(soupName: String, selectPaths: Array<String>, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
Return query spec for an all query
Link copied to clipboard
open fun buildExactQuerySpec(soupName: String, path: String, exactMatchKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
open fun buildExactQuerySpec(soupName: String, selectPaths: Array<String>, path: String, exactMatchKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
Return a query spec for an exact match query
Link copied to clipboard
open fun buildLikeQuerySpec(soupName: String, path: String, likeKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
open fun buildLikeQuerySpec(soupName: String, selectPaths: Array<String>, path: String, likeKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
Return a query spec for a like query
Link copied to clipboard
open fun buildMatchQuerySpec(soupName: String, path: String, matchKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
open fun buildMatchQuerySpec(soupName: String, selectPaths: Array<String>, path: String, matchKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
Return a query spec for a match query (full-text search)
Link copied to clipboard
open fun buildRangeQuerySpec(soupName: String, path: String, beginKey: String, endKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
open fun buildRangeQuerySpec(soupName: String, selectPaths: Array<String>, path: String, beginKey: String, endKey: String, orderPath: String, order: QuerySpec.Order, pageSize: Int): QuerySpec
Return a query spec for a range query
Link copied to clipboard
open fun buildSmartQuerySpec(smartSql: String, pageSize: Int): QuerySpec
Return a query spec for a smart query
Link copied to clipboard
open fun fromJSON(soupName: String, querySpecJson: JSONObject): QuerySpec
Link copied to clipboard
open fun getArgs(): Array<String>
Link copied to clipboard
open fun qualifyMatchKey(field: String, matchKey: String): String
fts5 doesn't allow WHERE column MATCH 'value' - only allows WHERE table MATCH 'column:value' This method changes the matchKey to add field: in the right places