Service
and so is configurable with the config
function.
Database.rawQuery
. It supports bindings to protect against SQL injection.
?
as placeholders for bindings. Concrete Database
s representing dialects that use other placeholders, such as PostgresDatabase
, will replace ?
s with the proper placeholder.
SQLRow
s that you can use to parse out data. You can access all their columns with allColumns
or try to get the value of a column with .get(String) throws -> SQLValue
.
SQLValue
contains functions for casting the value to a specific Swift data type, such as .string()
above.
transaction()
function; a wrapper around SQL transactions. You’ll have exclusive access to a database connection for the lifetime of your transaction.