Pragma Table
Represents a SQLite PRAGMA statement as a virtual table.
This class provides a structured way to query SQLite's PRAGMA commands, treating their results as if they were rows in a standard table. The table name is dynamically generated by prefixing "pragma_" to the name of the pragma command.
For example, a PragmaCursor for "table_info" would result in a virtual table named "pragma_table_info".
Example
class Options : PragmaTable(pragma.compileOptions) {
val options = stringColumn(pragma.compileOptions.name)
}
val tbl = Options()
val v =
tbl
.select(tbl.options)
.where { it.options LIKE "%thread%" }
.execute()
.asSequence()
.map {
it[tbl.options]
}.toList()Content copied to clipboard
Parameters
pragma
The PragmaCursor instance that defines the PRAGMA command to be executed.