API Reference
Database (Raw SQL)
Low-level read/write access to PlainApp's SQLite database. Intended for debugging — misuse can corrupt app state.
Type Definitions
bash
type DbTableInfo {
# Column metadata for a single table.
# Platform-dependent; see PlainApp source for the full list of fields.
}
# dbTableRows returns an array of JSON objects (one per row).
# Each object maps column name to value.
# dbTables and dbTableRowCount return plain scalars.Operations
query
dbPath
Get the absolute filesystem path of the PlainApp SQLite database.
bash
query GetDbPath {
dbPath
}query
dbTables
List all table names in the database.
bash
query GetDbTables {
dbTables
}query
dbTableInfo
Get column metadata for a table.
bash
query GetDbTableInfo($table: String!) {
dbTableInfo(table: $table) { name type notNull defaultValue primaryKey }
}query
dbTableRowCount
Count rows in a table.
bash
query GetDbTableRowCount($table: String!) {
dbTableRowCount(table: $table)
}query
dbTableRows
Read rows from a table with pagination. Each row is returned as a JSON object mapping column names to values.
bash
query GetDbTableRows($table: String!, $offset: Int!, $limit: Int!) {
dbTableRows(table: $table, offset: $offset, limit: $limit)
}mutation
createDbTableRow
Insert a row into a table. The row argument is a JSON string.
bash
mutation CreateDbTableRow($table: String!, $row: String!) {
createDbTableRow(table: $table, row: $row)
}mutation
deleteDbTableRows
Delete rows from a table by primary-key id.
bash
mutation DeleteDbTableRows($table: String!, $ids: [String!]!) {
deleteDbTableRows(table: $table, ids: $ids)
}