commonMain.cache.Query.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kord-core-jvm Show documentation
Show all versions of kord-core-jvm Show documentation
Idiomatic Kotlin Wrapper for The Discord API
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