SQLDelight simplifies database interactions, but it’s not just another ORM library. Instead of trying to abstract away SQL, it takes an unorthodox approach of encouraging you to use vanilla SQL for every query. Why bother with a library then? Well, we still need to transform our SQL queries into nice type-safe data objects and that’s exactly what SQLDelight is supposed to do. I use SQLDelight in every Android app I make. Why only Android? For a long time, the only SQL dialect supported by SQLDelight was SQLite so Android and Kotlin Native were a natural fit for such a tool.
Time flies and now SQLDelight also supports PostgreSQL and MySQL dialects. I’m planning to use it with a PostgreSQL database in one of my projects. This feature is still in beta, but I’m feeling lucky. Let’s see how that goes.
Another thing to note is the fact that SQLite by itself is not incompatible with servers. I maintain a small open source project that stores a list of bitcoin accepting merchants and provides a simple API to that data. It has a few thousand users and this kind of load is totally OK with SQLite, so I tried to use it for that project, and it works like a charm. It also simplifies code testing and database management, so it can be a nice server side database for certain kinds of projects.