A Kotlin SQL library that provides:
No lock-in. Exposed works with any framework you choose and offers built-in support for Spring Boot and Ktor.
Not limited by the basic database types and functions. Exposed supports the most popular types like JSON out of the box, and allows you to define custom types and custom functions yourself.
Supports a wide range of popular databases: PostgreSQL, MySQL, SQLite, Oracle, H2, and others.
Developed and maintained by JetBrains. Exposed is actively used for developing JetBrains products.
codecentric AG
With Exposed, you can simply write your query and be done. Over an interface like JDBC, you have type safety and reduced risk of SQL injection
The author of the Watch2Gether Bot for Discord
I chose Exposed because it works well with the Kotlin codebase. Other tools require a lot of mangling and break code contracts that Kotlin is supposed to fix.
Senior Software Engineer at SumUp
Not a huge learning curve to it, appealing DSL. Integrated with Spring Boot. Before that, we had tried writing all SQL statements ourselves, which got a bit tedious.
Creator of Pixefy
Overall, compared to other tools, Exposed has several advantages: a code-first approach, no raw SQL for querying, meaning queries are type safe, and concise and convenient syntax for table definitions.
Follow us