com.lightningkite.ktordb.Database.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of db Show documentation
Show all versions of db Show documentation
An abstract tool for communicating with different types of databases.
The newest version!
package com.lightningkite.ktordb
import kotlin.reflect.KClass
import kotlin.reflect.KType
import kotlin.reflect.typeOf
interface Database {
fun collection(type: KType, name: String): FieldCollection
}
inline fun Database.collection(name: String = T::class.simpleName!!): FieldCollection {
return collection(typeOf(), name)
}