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.
Kodein-DB allows you to:
- Easily store, retrieve and query kotlin objects.
- Stop caring 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 performance.
- is just Kotlin!
CAUTION: Under no circumstances should it be used in a server!
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.
.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
- Drop by the Kodein Slack channel
- Stackoverflow with the tag #kodein
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 itching you, and submit a pull request!
We are sure that this documentation contains typos, inaccuracies and language mistakes. If you feel like enhancing this document, you can propose a pull request that modifies the documentation documents. (Documentation is auto-generated from those).