Hey everyone! :wave: I've just published Rekords 0...
# feed
d
Hey everyone! 👋 I've just published Rekords 0.1.0, a small Kotlin Multiplatform library for storing annotated classes. The idea is to keep it simple and lightweight. Rekords doesn't ship its own database. It uses what the platform already has: the system SQLite on Android, Apple platforms and Linux, and IndexedDB in the browser (JS and Wasm). The JVM is the exception: there it uses the SQLite bundled with
androidx.sqlite
. I haven't measured the actual size savings yet, but if you care about every megabyte of your app, it might be worth a look. What you get: • An abstract API that isn't tied to SQL at all. You describe
@Rekord
classes and a versioned schema with migrations, then work with filters, ordering, paging, counting and transactions. • One set of models, schemas and queries in common code, whatever storage is underneath. Every engine has to support everything
rekords-core
offers, so your code behaves the same on every target. • Nested rekords and lists of them, including filtering by their fields. • Engines are picked up from your dependencies: SQLite, IndexedDB, or in-memory for tests. You can also plug in your own. •
rekords-crypto
encrypts individual fields with AES, either deterministically (you can still look rekords up by the field) or randomized. It uses the platform's own crypto where available. To be honest: this is not a drop-in replacement for Room or SQLDelight. If you're happy with full SQL on all your targets and need complex queries, those libraries are the better choice. Rekords is for when you want a simple, storage-agnostic API and a smaller footprint. Feedback, issues and PRs are very welcome! 🙏 github.com/DenisShakinov/rekords