KueryBlockingClient
A blocking SQL client.
SQL is written with plain Kotlin string interpolation inside the sql block; the Kuery Client compiler plugin rewrites interpolated runtime values into named bind parameters, so they are never concatenated into the SQL text. Compile-time String and Char constants are expanded into the SQL text instead.
val user: User = client.sql { +"SELECT * FROM users WHERE user_id = $userId" }.single()Content copied to clipboard
Implementations are expected to be thread-safe; a single instance can be shared across the whole application.
For a coroutine-based (R2DBC) counterpart, see KueryClient.
Types
Functions
Link copied to clipboard
Builds SQL using the received SqlBuilder block and returns a FetchSpec to obtain the execution results.