KODIEN-DB

Kodein-DB is a Kotlin/Multiplatform embedded NoSQL database that works on JVM, Android, Kotlin/Native and iOS. It is suited for client or mobile applications.

Under no circumstances should it be used in a server!
Kodein-DB allows you to:
  • Easily store, retrieve and query kotlin objects.

  • Stop carrying about schema definitions.

  • Easily set up a new project.

Kodein-DB is a good choice because it:
  • proposes a very simple and readable DSL.

  • integrates nicely with Android and iOS.

  • offers very good performances.

  • is just Kotlin!

Kodein-DB is in beta.

Although, we do use Kodein-DB in production, this means we cannot ensure the library’s correctness and stability. Therefore, we ask that you first try Kodein-DB in non-critical applications, and report any mis-behaviour you may encounter.

Example

A simple example
val db = DB.open("path/to/db")

db.put(User("John", "Doe"))
db.put(User("Jane", "Doe"))
db.put(User("Someone", "Else"))

val does = db.find<User>().byIndex("lastName", "Doe").models()
println(does.joinToString()) // Jane, John

Support

Contribute

Contributions are very welcome and greatly appreciated! The great majority of pull requests are eventually merged.

To contribute, simply fork the project on Github, fix whatever is iching you, and submit a pull request!

I am sure that this documentation contains typos, inaccuracies and languages error (English is not my mother tongue). If you feel like enhancing this document, you can propose a pull request that modifies the documentation documents. (Documentation is auto-generated from those).