Database browser
Browse the application database through structured operations, not arbitrary SQL. All database operations require Developer Mode; otherwise they return “No permission: developer mode is disabled”.
Type Definitions
type Mutation {
createDbTableRow(table: String!, row: JSON!): Boolean!
deleteDbTableRows(table: String!, ids: [String!]!): Boolean!
}
type Query {
dbPath: String!
dbTableRowCount(table: String!): Long!
dbTableRows(table: String!, offset: Int!, limit: Int!): [JSON!]!
dbTables: [DbTable!]!
}
enum DbColumnType {
TEXT
INTEGER
REAL
BLOB
NUMERIC
UNKNOWN
}
type DbTable {
name: String!
createSql: String!
columns: [DbTableColumn!]!
}
type DbTableColumn {
name: String!
dataType: DbColumnType!
notNull: Boolean!
defaultValue: String
primaryKey: Boolean!
}
scalar JSON
scalar LongOperations
createDbTableRow
Insert a row from a JSON object; requires Developer Mode. Non-object input is rejected; invalid database rows return false.
mutation createDbTableRow($table: String!, $row: JSON!) {
createDbTableRow(table: $table, row: $row)
}deleteDbTableRows
Delete the selected table rows by their identity values; requires Developer Mode.
mutation deleteDbTableRows($table: String!, $ids: [String!]!) {
deleteDbTableRows(table: $table, ids: $ids)
}dbPath
Read the application SQLite database path; requires Developer Mode.
query dbPath {
dbPath
}dbTableRowCount
Count a table's rows; requires Developer Mode.
query dbTableRowCount($table: String!) {
dbTableRowCount(table: $table)
}dbTableRows
Read paginated rows as JSON objects; requires Developer Mode. Cell values remain strings or null; no JSON.parse is needed.
query dbTableRows($table: String!, $offset: Int!, $limit: Int!) {
dbTableRows(table: $table, offset: $offset, limit: $limit)
}dbTables
List table names in the application database; requires Developer Mode.
query dbTables {
dbTables { name createSql }
}