Skip to content

Instance Method

sql(encoder:decoder:queryLogLevel:)

Return an object allowing access to this database via the SQLDatabase interface.
func sql(encoder: SQLiteDataEncoder, decoder: SQLiteDataDecoder, queryLogLevel: Logger.Level?) -> any SQLDatabase

Parameters

encoder

An SQLiteDataEncoder used to translate bound query parameters into SQLiteData values.

decoder

An SQLiteDataDecoder used to translate SQLiteData values into output values in SQLRows.

queryLogLevel

The level at which SQL queries issued through the SQLKit interface will be logged.

Return Value

An instance of SQLDatabase which accesses the same database as self.