Hey everyone :wave: :rocket: Introducing KQLite v...
# feed
a
Hey everyone 👋 🚀 Introducing KQLite v0.2.1 – Typesafe SQL for Kotlin Multiplatform A lightweight Kotlin Multiplatform DSL that lets you write typesafe SQL queries using Kotlin object-style syntax instead of raw SQL strings. 🌐 Website: kqlite.com Why KQLite? If you’ve ever struggled with raw SQL strings, unsafe queries, or boilerplate mapping, KQLite is designed to make your database layer cleaner, safer, and more Kotlin-friendly across platforms. 🔥 Key Highlights • ORM-style interaction with tables • Typesafe Cursor (lazy execution + auto-close on full iteration) • Typesafe value binding & reading • Built-in entity binding & mapping • Cursor as Flow → emits on INSERT / UPDATE / DELETE • Quick & convenient APIs for faster development • Built-in SQLite functions (Scalar, Aggregate, Math, Date/Time, JSON) • Familiar SQLite-inspired DSL • No plugin - No generated code 🌍 Kotlin Multiplatform Targets • Android • iOS • JVM • macOS • Linux • tvOS • watchOS 📦 Dependency
Copy code
implementation("com.kqlite:kqlite:0.2.1")
🧪 Samples & Examples • KQLite Contacts: github.com/AzimAnsari/KQLiteContacts • PeopleInSpace Sample: github.com/AzimAnsari/PeopleInSpaceKQLite • Droidcon Sample: github.com/AzimAnsari/DroidconKQLite • D-KMP Sample: github.com/AzimAnsari/D-KMP-sample-KQLite 📄 License KQLite is not open source. Proprietary License: github.com/AzimAnsari/KQLiteDocs/blob/…/LICENSE 💡 This has been months of hard work, focused on making SQL in KMP more intuitive, reactive, and typesafe. Would love your feedback, thoughts, also open to API changes 🙌 Feel free to try it out and share what you think!
e
Nice, can you compare it with Exposed? jetbrains.com/help/exposed/home.html
r
It's not open source, and the license explicitly forbids commercial use. I think these factors will make it difficult for your library to attract users.
1
a
Yes @Eugen Martynov I know Exposed is a big thing with its own complex DSL syntax. I think Exposed has its own learning curve. • KQLite should be known for its simplicity. • It does not try to own anything. • DSL syntax closely matches with existing SQL • Works with any driver that can open androidx SQLiteConnection
e
You mean that binary size of library is smaller?
Ah, ignore please
I will look myself to see the difference for the conclusion
From first look API was looking similar
a
@russhwolf Its for trial run and open to feedback. We are working on to make it free for use and close sourced.
e
There are also well established SqlDelight and Room
a
Thanks Eugen. Do check it out and let us know. kqlite.com Also check out samples
Yes this competes with SQLDelight and Room. But without any extra plugin and auto generated code.
It’s more of a language than a database.