com.lightningkite.lightningdb.ModelWithTextIndexFields.kt Maven / Gradle / Ivy
@file:UseContextualSerialization(UUID::class)
@file:OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
package com.lightningkite.lightningdb
import com.lightningkite.lightningdb.test.*
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseContextualSerialization
import org.junit.Test
import java.util.*
import kotlin.test.assertContains
import kotlin.test.assertFalse
import kotlin.test.assertTrue
import com.lightningkite.lightningdb.*
import kotlin.reflect.*
import kotlinx.serialization.*
import kotlinx.serialization.builtins.*
import kotlinx.serialization.internal.GeneratedSerializer
import java.time.*
fun prepareModelWithTextIndexFields() {
ModelWithTextIndex::_id.setCopyImplementation { original, value -> original.copy(_id = value) }
ModelWithTextIndex::string.setCopyImplementation { original, value -> original.copy(string = value) }
}
val DataClassPath._id: DataClassPath get() = this[ModelWithTextIndex::_id]
val DataClassPath.string: DataClassPath get() = this[ModelWithTextIndex::string]
inline val ModelWithTextIndex.Companion.path: DataClassPath get() = path()
© 2015 - 2024 Weber Informatics LLC | Privacy Policy