All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.cache.Query.kt Maven / Gradle / Ivy

There is a newer version: 0.15.0
Show newest version
package dev.kord.core.cache

import dev.kord.cache.api.QueryBuilder
import dev.kord.common.entity.Snowflake
import dev.kord.common.entity.optional.Optional
import dev.kord.common.entity.optional.OptionalSnowflake
import dev.kord.common.entity.optional.optionalSnowflake
import kotlin.jvm.JvmName
import kotlin.reflect.KProperty1

public fun  QueryBuilder.idEq(property: KProperty1, value: Snowflake?) {
    property.eq(value)
}

@JvmName("optionalIdEq")
public fun  QueryBuilder.idEq(property: KProperty1, value: Snowflake?) {
    property.eq(value.optionalSnowflake())
}

@JvmName("optionalNullableIdEq")
public fun  QueryBuilder.idEq(property: KProperty1, value: Snowflake?) {
    property.eq(value.optionalSnowflake())
}

public fun  QueryBuilder.idEq(property: KProperty1>, value: String?) {
    property.eq(Optional(value))
}

public fun  QueryBuilder.idGt(property: KProperty1, value: Snowflake) {
    property.gt(value)
}

public fun  QueryBuilder.idLt(property: KProperty1, value: Snowflake) {
    property.lt(value)
}

@JvmName("stringEq")
public fun  QueryBuilder.idEq(property: KProperty1, value: String?) {
    property.eq(value)
}

@JvmName("booleanEq")
public fun  QueryBuilder.idEq(property: KProperty1, value: Boolean?) {
    property.eq(value)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy