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

com.lightningkite.lightningdb.IndexingTestModelFields.kt Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
@file:UseContextualSerialization(UUID::class)
@file:OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)

package com.lightningkite.lightningdb

import com.lightningkite.lightningdb.test.EmbeddedMap
import com.lightningkite.lightningdb.test.RecursiveEmbed
import com.lightningkite.lightningserver.exceptions.BadRequestException
import com.mongodb.MongoBulkWriteException
import com.mongodb.MongoWriteException
import com.mongodb.client.model.changestream.UpdateDescription
import kotlinx.coroutines.runBlocking
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseContextualSerialization
import org.junit.Test
import java.util.*
import kotlin.test.assertEquals
import kotlin.test.fail
import com.lightningkite.lightningdb.*
import kotlin.reflect.*
import kotlinx.serialization.*
import kotlinx.serialization.builtins.*
import kotlinx.serialization.internal.GeneratedSerializer
import java.time.*

fun prepareIndexingTestModelFields() {
    IndexingTestModel::_id.setCopyImplementation { original, value -> original.copy(_id = value) }
    IndexingTestModel::email.setCopyImplementation { original, value -> original.copy(email = value) }
    IndexingTestModel::account.setCopyImplementation { original, value -> original.copy(account = value) }
}
val  DataClassPath._id: DataClassPath get() = this[IndexingTestModel::_id]
val  DataClassPath.email: DataClassPath get() = this[IndexingTestModel::email]
val  DataClassPath.account: DataClassPath get() = this[IndexingTestModel::account]
inline val IndexingTestModel.Companion.path: DataClassPath get() = path()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy