Companion

object Companion

Properties

Link copied to clipboard

A condition that matches only active (non-deleted) documents.

Link copied to clipboard

A condition that matches all documents (no filtering). This is the default condition when no specific filtering is needed.

Link copied to clipboard

The key used in options map to specify date pattern for date parsing.

Link copied to clipboard
const val EMPTY_VALUE: String

The default empty value used for conditions that don't require a specific value.

Link copied to clipboard

The key used in options map to specify case sensitivity for string operations.

Link copied to clipboard

The key used in options map to specify timezone for date operations.

Functions

Link copied to clipboard

Returns the ACTIVE condition that matches only non-deleted documents.

Link copied to clipboard

Creates an aggregate ID condition. Matches documents belonging to the specified aggregate.

Link copied to clipboard
fun aggregateIds(vararg value: String): Condition

Creates an aggregate IDs condition with varargs. Matches documents belonging to any of the specified aggregates.

Creates an aggregate IDs condition. Matches documents belonging to any of the specified aggregates.

Link copied to clipboard
fun all(): Condition

Returns the ALL condition that matches everything.

fun all(field: String, value: List<Any>): Condition

Creates an all-in condition for array fields. Matches documents where the specified array field contains all of the given values.

Link copied to clipboard
fun and(conditions: List<Condition>): Condition

Creates an AND condition combining a list of conditions. All specified conditions must be true for the combined condition to be true.

fun and(vararg conditions: Condition): Condition

Creates an AND condition combining multiple conditions. All specified conditions must be true for the combined condition to be true.

Link copied to clipboard
fun beforeToday(field: String, time: Any, datePattern: Any? = null): Condition

Creates a before-today condition for date fields. Matches documents where the specified date field is before the specified time today.

Link copied to clipboard
fun <V> between(field: String, start: V, end: V): Condition

Creates a between condition. Matches documents where the specified field value is between the start and end values (inclusive).

Link copied to clipboard
fun contains(field: String, value: String, ignoreCase: Boolean = false): Condition

Creates a contains condition for string fields. Matches documents where the specified field contains the given substring.

Link copied to clipboard

Creates options map for date pattern configuration.

Link copied to clipboard

Creates a deletion state condition using a boolean value. Matches documents based on their deletion state.

Creates a deletion state condition using a DeletionState enum. Matches documents based on their deletion state.

Link copied to clipboard
fun earlierDays(field: String, days: Int, datePattern: Any? = null): Condition

Creates an earlier-days condition for date fields. Matches documents where the specified date field is earlier than N days ago.

Link copied to clipboard
fun elemMatch(field: String, value: Condition): Condition

Creates an element match condition for array fields. Matches documents where at least one element in the specified array field matches the given condition.

Link copied to clipboard
fun endsWith(field: String, value: String, ignoreCase: Boolean = false): Condition

Creates an ends-with condition for string fields. Matches documents where the specified field ends with the given suffix.

Link copied to clipboard
fun eq(field: String, value: Any): Condition

Creates an equality condition. Matches documents where the specified field equals the given value.

Link copied to clipboard
fun exists(field: String, exists: Boolean = true): Condition

Creates an existence check condition. Matches documents where the specified field exists (or doesn't exist based on the exists parameter).

Link copied to clipboard
fun gt(field: String, value: Any): Condition

Creates a greater-than condition. Matches documents where the specified field is greater than the given value.

Link copied to clipboard
fun gte(field: String, value: Any): Condition

Creates a greater-than-or-equal condition. Matches documents where the specified field is greater than or equal to the given value.

Link copied to clipboard
fun id(value: String): Condition

Creates an ID condition. Matches documents with the specified identifier.

Link copied to clipboard
fun ids(vararg value: String): Condition

Creates an IDs condition with varargs. Matches documents with any of the specified identifiers.

fun ids(value: List<String>): Condition

Creates an IDs condition. Matches documents with any of the specified identifiers.

Link copied to clipboard

Creates options map for case sensitivity configuration.

Link copied to clipboard
fun isFalse(field: String): Condition

Creates a boolean false condition. Matches documents where the specified field is false.

Link copied to clipboard
fun isIn(field: String, value: List<Any>): Condition

Creates an in condition. Matches documents where the specified field value is in the given list of values.

Link copied to clipboard
fun isNull(field: String): Condition

Creates a null check condition. Matches documents where the specified field is null.

Link copied to clipboard
fun isTrue(field: String): Condition

Creates a boolean true condition. Matches documents where the specified field is true.

Link copied to clipboard
fun lastMonth(field: String, datePattern: Any? = null): Condition

Creates a last-month condition for date fields. Matches documents where the specified date field falls within last month's date range.

Link copied to clipboard
fun lastWeek(field: String, datePattern: Any? = null): Condition

Creates a last-week condition for date fields. Matches documents where the specified date field falls within last week's date range.

Link copied to clipboard
fun lt(field: String, value: Any): Condition

Creates a less-than condition. Matches documents where the specified field is less than the given value.

Link copied to clipboard
fun lte(field: String, value: Any): Condition

Creates a less-than-or-equal condition. Matches documents where the specified field is less than or equal to the given value.

Link copied to clipboard
fun ne(field: String, value: Any): Condition

Creates a not-equal condition. Matches documents where the specified field does not equal the given value.

Link copied to clipboard
fun nextWeek(field: String, datePattern: Any? = null): Condition

Creates a next-week condition for date fields. Matches documents where the specified date field falls within next week's date range.

Link copied to clipboard
fun nor(conditions: List<Condition>): Condition

Creates a NOR condition combining a list of conditions. None of the specified conditions must be true for the combined condition to be true.

fun nor(vararg conditions: Condition): Condition

Creates a NOR condition combining multiple conditions. None of the specified conditions must be true for the combined condition to be true.

Link copied to clipboard
fun notIn(field: String, value: List<Any>): Condition

Creates a not-in condition. Matches documents where the specified field value is not in the given list of values.

Link copied to clipboard
fun notNull(field: String): Condition

Creates a not-null check condition. Matches documents where the specified field is not null.

Link copied to clipboard
fun or(conditions: List<Condition>): Condition

Creates an OR condition combining a list of conditions. At least one of the specified conditions must be true for the combined condition to be true.

fun or(vararg conditions: Condition): Condition

Creates an OR condition combining multiple conditions. At least one of the specified conditions must be true for the combined condition to be true.

Link copied to clipboard
fun ownerId(value: String): Condition

Creates an owner ID condition. Matches documents owned by the specified owner.

Link copied to clipboard
fun raw(value: Any): Condition

Creates a raw condition. Uses the provided value directly as a raw database query condition without any processing.

Link copied to clipboard
fun recentDays(field: String, days: Int, datePattern: Any? = null): Condition

Creates a recent-days condition for date fields. Matches documents where the specified date field falls within the last N days (including today).

Link copied to clipboard
fun startsWith(field: String, value: String, ignoreCase: Boolean = false): Condition

Creates a starts-with condition for string fields. Matches documents where the specified field starts with the given prefix.

Link copied to clipboard

Creates a tenant ID condition. Matches documents belonging to the specified tenant.

Link copied to clipboard
fun thisMonth(field: String, datePattern: Any? = null): Condition

Creates a this-month condition for date fields. Matches documents where the specified date field falls within the current month's date range.

Link copied to clipboard
fun thisWeek(field: String, datePattern: Any? = null): Condition

Creates a this-week condition for date fields. Matches documents where the specified date field falls within the current week's date range.

Link copied to clipboard
fun today(field: String, datePattern: Any? = null): Condition

Creates a today condition for date fields. Matches documents where the specified date field falls within today's date range.

Link copied to clipboard
fun tomorrow(field: String, datePattern: Any? = null): Condition

Creates a tomorrow condition for date fields. Matches documents where the specified date field falls within tomorrow's date range.