{"repo":"ExoQuery/terpal-sql","free":true,"listed":false,"github":"https://github.com/ExoQuery/terpal-sql","clone":"git clone https://github.com/ExoQuery/terpal-sql.git","description":"Brainlessly simple and safe SQL Database Access for Kotlin","language":"Kotlin","stars":54,"topics":["jdbc","kotlin","kotlin-multiplatform","postgresql","sql","sqlite"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"terpal-sql Terpal is a Kotlin Multiplatform library that allows you to write SQL queries using interpolated strings in an SQL-injection-safe way. Inspired by Scala libraries such as Doobie and Zio-Jdbc, Terpal suspends the splicing of \"$dollar $sign $variables\" in SQL(\"...\") strings and preserves them in a separate data structure until they can be safely injected into an SQL statement. For a deep dive on how this works, have Have a look at the Terpal Compiler Plugin. In addition Terpal allows you to decode the results of SQL queries into Kotlin data classes using the kotlinx-serialization library. Terpal SQL: Uses no reflection! Uses no code-generation! Allows $dollar sign variables to be used safely in SQL queries! Does not require queries to be written in a separate file. Is built on top of kotlinx-serialization. Works idiomatically with Kotlin coroutines suspended functions. Getting Started Currently Terpal is supported On the JVM using JDBC with: PostgreSQL, MySQL, SQL Server, Oracle, SQLite, and H2. On the JVM using R2DBC via the terpal-sql-r2dbc module. Currently tested with PostgreSQL only. On Android, iOS, OSX, Linux and Windows with SQLite Fistly, be sure that you have the following repositories defined: Using JDBC When using JDBC, add the following to your build.gradle.kts file: A Terpal context is equivalent to a SQLite driver. It is the object that manages the connection to the database. When using JDBC: Have a look at the Terpal-SQL Sample Project for more detail","default_branch":null,"files":null,"tree":[],"storefront":"/r/ExoQuery","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ExoQuery/terpal-sql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}