PostgrestFilterBuilder

class PostgrestFilterBuilder(propertyConversionMethod: PropertyConversionMethod, _params: MutableMap<String, List<String>> = mutableMapOf(), val isInLogicalExpression: Boolean = false)(source)

A builder for Postgrest filters

Constructors

Link copied to clipboard
constructor(propertyConversionMethod: PropertyConversionMethod, _params: MutableMap<String, List<String>> = mutableMapOf(), isInLogicalExpression: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.adjacent(range: Pair<Any, Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is adjacent to the specified range

fun adjacent(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column is adjacent to range

Link copied to clipboard
inline fun and(negate: Boolean = false, referencedTable: String? = null, filter: PostgrestFilterBuilder.() -> Unit)

Adds an and condition to the query

Link copied to clipboard
fun cd(column: String, values: List<Any>)

Finds all rows where the value of the column is contained in values

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.contained(values: List<Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is contained in values

fun contained(column: String, values: List<Any>)

Finds all rows where the value of the column is contained in values

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.contains(values: List<Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod contains values

fun contains(column: String, values: List<Any>)

Finds all rows where the value of the column contains values

Link copied to clipboard
fun cs(column: String, values: List<Any>)

Finds all rows where the value of the column contains values

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.eq(value: V)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is equal to value

fun eq(column: String, value: Any)

Finds all rows where the value of the column is equal to value

Link copied to clipboard
fun exact(column: String, value: Boolean?)

Finds all rows where the value of the column equals to one of these values: null,true,false,unknown

Link copied to clipboard
fun filter(operation: FilterOperation)
fun filter(column: String, operator: FilterOperator, value: Any?)

Adds a filter to the query

Link copied to clipboard
fun filterNot(operation: FilterOperation)
fun filterNot(column: String, operator: FilterOperator, value: Any?)

Adds a negated filter to the query

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.gt(value: V)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is greater than value

fun gt(column: String, value: Any)

Finds all rows where the value of the column is greater than value

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.gte(value: V)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is greater than or equal to value

fun gte(column: String, value: Any)

Finds all rows where the value of the column is greater than or equal to value

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.ilike(pattern: String)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod matches the specified pattern (case-insensitive)

fun ilike(column: String, pattern: String)

Finds all rows where the value of the column matches the specified pattern (case-insensitive)

Link copied to clipboard
fun ilikeAll(column: String, patterns: List<String>)

Finds all rows where the value of the column matches all of the specified patterns

Link copied to clipboard
fun ilikeAny(column: String, patterns: List<String>)

Finds all rows where the value of the column matches any of the specified patterns (case-insensitive)

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.imatch(pattern: String)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod matches the specified pattern using pattern matching

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.isExact(value: Boolean?)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod equals to one of these values: null,true,false,unknown

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.isIn(list: List<V>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is in the specified list

fun isIn(column: String, values: List<Any>)

Finds all rows where the value of the column is a member of values

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.like(pattern: String)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod matches the specified pattern

fun like(column: String, pattern: String)

Finds all rows where the value of the column matches the specified pattern

Link copied to clipboard
fun likeAll(column: String, patterns: List<String>)

Finds all rows where the value of the column matches all of the specified patterns

Link copied to clipboard
fun likeAny(column: String, patterns: List<String>)

Finds all rows where the value of the column matches any of the specified patterns

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.lt(value: V)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is less than value

fun lt(column: String, value: Any)

Finds all rows where the value of the column is less than value

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.lte(value: V)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is less than or equal to value

fun lte(column: String, value: Any)

Finds all rows where the value of the column is less than or equal to value

Link copied to clipboard
fun match(query: Map<String, Any>)

Match only rows where each column in query keys is equal to its associated value. Shorthand for multiple .eq()s.

infix fun <T, V> KProperty1<T, V>.match(pattern: String)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod matches the specified pattern using pattern matching

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.neq(value: V)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is not equal to value

fun neq(column: String, value: Any)

Finds all rows where the value of the column is not equal to value

Link copied to clipboard
fun nxl(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column does not extend to the left of range

Link copied to clipboard
fun nxr(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column does not extend to the right of range

Link copied to clipboard
inline fun or(negate: Boolean = false, referencedTable: String? = null, filter: PostgrestFilterBuilder.() -> Unit)

Adds an or condition to the query

Link copied to clipboard
fun ov(column: String, values: List<Any>)

Finds all rows where the value of the column overlaps with values

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.overlaps(values: List<Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod overlaps with values

fun overlaps(column: String, values: List<Any>)

Finds all rows where the value of the column overlaps with values

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.rangeGt(range: Pair<Any, Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod does not extend to the right of range

fun rangeGt(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column does not extend to the right of range

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.rangeGte(range: Pair<Any, Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod does not strictly right of range

fun rangeGte(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column is strictly right of range

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.rangeLt(range: Pair<Any, Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod is strictly left of range

fun rangeLt(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column does not extend to the right of range

Link copied to clipboard
infix fun <T, V> KProperty1<T, V>.rangeLte(range: Pair<Any, Any>)

Finds all rows where the value of the column with the name of the KProperty1 converted using propertyConversionMethod does not extend to the left of range

fun rangeLte(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column is strictly left of range

Link copied to clipboard
fun regexIMatch(column: String, pattern: String)

Finds all rows where the value of the column matches the specified pattern using pattern matching (case-insensitive)

Link copied to clipboard
fun regexMatch(column: String, pattern: String)

Finds all rows where the value of the column matches the specified pattern using pattern matching

Link copied to clipboard
fun sl(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column is strictly left of range

Link copied to clipboard
fun sr(column: String, range: Pair<Any, Any>)

Finds all rows where the value of the column is strictly right of range

Link copied to clipboard
fun textSearch(column: String, query: String, textSearchType: TextSearchType, config: String? = null): PostgrestFilterBuilder

Runs a full text search on column with the specified query and textSearchType