Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline fun all(): SelectResult.From
Link copied to clipboard
infix inline fun Expression.and(other: Expression): Expression
Link copied to clipboard
fun Query.asFlow(coroutineContext: CoroutineContext? = null): Flow<ResultSet>

Returns a Flow that emits the Query ResultSet every time the underlying data set changes.

Link copied to clipboard
fun <T : Any> Query.asObjectsFlow(coroutineContext: CoroutineContext? = null, factory: (String) -> T?): Flow<List<T>>
fun <T : Any> Query.asObjectsFlow(coroutineContext: CoroutineContext? = null, factory: (Map<String, Any?>) -> T?): Flow<List<T>>

Returns a Flow that maps the Query ResultSet to instances of a class that can be created using the given factory lambda.

Link copied to clipboard
inline fun Expression.between(lower: Instant, upper: Instant): Expression

Create a between expression that evaluates whether or not the current expression is between the given dates inclusively.

Link copied to clipboard

Binds the Replicator instance to the given Lifecycle.

Link copied to clipboard
infix inline fun Expression.contains(value: String): Expression

Creates an ARRAY_CONTAINS(expr, value) function that checks whether the current array expression contains the given value or not.

Link copied to clipboard
inline fun ResultSet.countResult(): Long

Read count result from selectCount.

Link copied to clipboard

A flow of a document's current state. Emits null if document is deleted. filterNotNull if this is undesired.

Link copied to clipboard
inline fun Expression.equalTo(boolean: Boolean): Expression
inline fun Expression.equalTo(double: Double): Expression
inline fun Expression.equalTo(float: Float): Expression
inline fun Expression.equalTo(int: Int): Expression
inline fun Expression.equalTo(long: Long): Expression
inline fun Expression.equalTo(string: String): Expression
inline fun Expression.equalTo(list: List<Any>): Expression
inline fun Expression.equalTo(map: Map<String, Any?>): Expression
Link copied to clipboard
infix inline fun FromRouter.from(database: Database): From
Link copied to clipboard
fun fullTextIndex(vararg properties: String): FullTextIndex

Create a full-text search index with the given properties to be used to perform the match operation against with.

Link copied to clipboard
Link copied to clipboard
inline fun Expression.lessThan(boolean: Boolean): Expression
inline fun Expression.lessThan(double: Double): Expression
inline fun Expression.lessThan(float: Float): Expression
inline fun Expression.lessThan(int: Int): Expression
inline fun Expression.lessThan(long: Long): Expression
inline fun Expression.lessThan(string: String): Expression
Link copied to clipboard
inline fun Expression.like(boolean: Boolean): Expression
inline fun Expression.like(double: Double): Expression
inline fun Expression.like(float: Float): Expression
inline fun Expression.like(int: Int): Expression
inline fun Expression.like(long: Long): Expression
inline fun Expression.like(string: String): Expression
inline fun Expression.like(date: Instant): Expression
Link copied to clipboard
inline fun LimitRouter.limit(count: Int, offset: Int? = null): Limit
Link copied to clipboard
fun <T : Any> Flow<QueryChange>.mapToObjects(factory: (String) -> T?): Flow<List<T>>
fun <T : Any> Flow<QueryChange>.mapToObjects(factory: (Map<String, Any?>) -> T?): Flow<List<T>>
Link copied to clipboard

Creates a new MutableDocument with the key-value entries specified by the given block function.

Link copied to clipboard
inline fun not(expression: Expression): Expression
Link copied to clipboard
infix inline fun Expression.notContains(value: String): Expression

Creates a NOT ARRAY_CONTAINS(expr, value) expression that checks whether the current array expression contains the given value or not and returns the negated result.

Link copied to clipboard
Link copied to clipboard
infix inline fun Expression.or(other: Expression): Expression
Link copied to clipboard
inline fun OrderByRouter.orderBy(builder: OrderByBuilder.() -> Unit): OrderBy
Link copied to clipboard
Link copied to clipboard
inline fun select(vararg expressions: SelectResult): Select
inline fun select(vararg keys: String): Select

fun select(expression: Expression, vararg expressions: Expression): Select

Commonly used for select(Meta.id) to get a document's ID, or other metadata or expressions.

fun select(expression: Expression, result: SelectResult, vararg results: SelectResult): Select

Commonly used for select(Meta.id, all()) to get all of the document, including ID.

fun select(expression: Expression, property: String, vararg properties: String): Select

Commonly used for select(Meta.id, "foo", "bar") to get a document's ID along with a set of fields.

Link copied to clipboard
fun selectCount(alias: String = ""): Select

SELECT COUNT(*)

Link copied to clipboard
inline fun <T : Any> ResultSet.toObjects(factory: (String) -> T?): List<T>
inline fun <T : Any> ResultSet.toObjects(factory: (Map<String, Any?>) -> T?): List<T>

Maps the ResultSet to a List of objects that are created using the given factory lambda.

Link copied to clipboard
fun valueIndex(vararg properties: String): ValueIndex

Create a value index with the given properties to be indexed.

Link copied to clipboard
infix inline fun WhereRouter.where(builder: WhereBuilder.() -> Expression): Where