lustro-cli 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. lustro_cli/__init__.py +29 -0
  2. lustro_cli/cli.py +2460 -0
  3. lustro_cli/client.py +434 -0
  4. lustro_cli/discovery.py +1033 -0
  5. lustro_cli/exitcodes.py +25 -0
  6. lustro_cli/mcp.py +867 -0
  7. lustro_cli/wire/__init__.py +62 -0
  8. lustro_cli/wire/_schema.json +97 -0
  9. lustro_cli/wire/cursor-envelope.schema.json +28 -0
  10. lustro_cli/wire/error-envelope.schema.json +46 -0
  11. lustro_cli/wire/golden/cursor-delta.json +91 -0
  12. lustro_cli/wire/golden/cursor-reset.json +65 -0
  13. lustro_cli/wire/golden/cursor-unchanged.json +15 -0
  14. lustro_cli/wire/golden/error-envelope.json +7 -0
  15. lustro_cli/wire/golden/export-har-websocket.json +148 -0
  16. lustro_cli/wire/golden/export-har.json +359 -0
  17. lustro_cli/wire/golden/logs-delta.json +44 -0
  18. lustro_cli/wire/golden/logs-reset.json +73 -0
  19. lustro_cli/wire/golden/logs-unchanged.json +9 -0
  20. lustro_cli/wire/golden/meta.json +12 -0
  21. lustro_cli/wire/golden/prefs-delta.json +58 -0
  22. lustro_cli/wire/golden/prefs-files.json +64 -0
  23. lustro_cli/wire/golden/prefs-reset.json +58 -0
  24. lustro_cli/wire/golden/prefs-unchanged.json +4 -0
  25. lustro_cli/wire/golden/rules-list.json +44 -0
  26. lustro_cli/wire/golden/screen-tree-views.json +596 -0
  27. lustro_cli/wire/golden/screen-tree.json +689 -0
  28. lustro_cli/wire/golden/send-result.json +7 -0
  29. lustro_cli/wire/golden/senders-list.json +6 -0
  30. lustro_cli/wire/golden/sqlite-databases.json +37 -0
  31. lustro_cli/wire/golden/sqlite-exec.json +4 -0
  32. lustro_cli/wire/golden/sqlite-query.json +109 -0
  33. lustro_cli/wire/golden/sqlite-rows.json +109 -0
  34. lustro_cli/wire/golden/sqlite-schema.json +98 -0
  35. lustro_cli/wire/golden/sqlite-tables.json +57 -0
  36. lustro_cli/wire/golden/stream-delta.json +48 -0
  37. lustro_cli/wire/golden/stream-reset.json +66 -0
  38. lustro_cli/wire/golden/stream-unchanged.json +4 -0
  39. lustro_cli/wire/golden/transaction-image.json +43 -0
  40. lustro_cli/wire/golden/transaction.json +41 -0
  41. lustro_cli/wire/golden/websocket.json +37 -0
  42. lustro_cli/wire/golden/websockets-reset.json +89 -0
  43. lustro_cli/wire/golden/work-events.json +152 -0
  44. lustro_cli/wire/golden/work-item.json +118 -0
  45. lustro_cli/wire/golden/work-items.json +129 -0
  46. lustro_cli/wire/golden/work-metrics.json +40 -0
  47. lustro_cli/wire/logs.openapi.json +622 -0
  48. lustro_cli/wire/meta.schema.json +47 -0
  49. lustro_cli/wire/network.openapi.json +2458 -0
  50. lustro_cli/wire/pagination.schema.json +20 -0
  51. lustro_cli/wire/prefs.openapi.json +699 -0
  52. lustro_cli/wire/screen.openapi.json +512 -0
  53. lustro_cli/wire/sqlite.openapi.json +1233 -0
  54. lustro_cli/wire/stream-envelope.schema.json +33 -0
  55. lustro_cli/wire/sync.py +80 -0
  56. lustro_cli/wire/work.openapi.json +1188 -0
  57. lustro_cli-0.1.0.dist-info/METADATA +585 -0
  58. lustro_cli-0.1.0.dist-info/RECORD +60 -0
  59. lustro_cli-0.1.0.dist-info/WHEEL +4 -0
  60. lustro_cli-0.1.0.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,1233 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Lustro SQLite debug tab",
5
+ "version": "1.2",
6
+ "description": "The app's SQLite and Room databases: the ones that the app registers, and, when the app turns discovery on, the other database files in its databases directory and in its noBackupFilesDir, where WorkManager keeps androidx.work.workdb. A registered database is the app's own open handle, a framework SQLiteDatabase or an androidx SupportSQLiteDatabase such as Room's, or a file that the tab opens read-only for each request; a discovered file is opened the same way. The GET routes run only SQL that the tab builds: each database, table, and column that a client names is checked against the database's schema and quoted as an identifier, and a filter value is a bound parameter. Each database has a value policy, visible or mask_sensitive (the default, and always for a discovered file): mask_sensitive leaves out the values of the columns whose names look like they hold a secret, such as access_token or client_secret, by the same name check as the Network tab's redaction, in GET rows and POST query; such a cell is {type, masked: true}. A page of rows holds each cell with its storage class: at most 4096 characters of a text, with the whole length when it is cut, and only the size of a blob. POST query runs a client's statement on a connection that SQLite opens read-only for the request, so SQLite refuses every write. POST exec, edit, and delete write through the app's handle, only to a database that the app registers with writable = true, and answer 403 with code read_only for any other. Both query and exec refuse BEGIN, COMMIT, END, ROLLBACK, SAVEPOINT, RELEASE, ATTACH, DETACH, and VACUUM before they run; exec also refuses every PRAGMA, and query a pragma with a value, which sets it, and the pragmas that set a value for the whole process. Each read stops when the request times out, and the client then gets a 504. On a connection that the tab opens itself (a file database, registered or discovered, and every POST query), a database out of WAL mode makes the app's writes wait for the tab's lock, and Android's SQLite fails a write that waited 2.5 s: there a statement stops after 2 s, with a 504 with code read_limit. All routes are token-authenticated (Bearer header or HttpOnly cookie) and live under /api/v1/sqlite. Errors use the shared error envelope; a statement that SQLite refuses in a GET route, such as one on a corrupt file, is a 500 with code sqlite_error and SQLite's message."
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "/",
11
+ "description": "The Lustro debug server (loopback by default)."
12
+ }
13
+ ],
14
+ "paths": {
15
+ "/api/v1/sqlite/databases": {
16
+ "get": {
17
+ "operationId": "listSqliteDatabases",
18
+ "summary": "List the databases.",
19
+ "description": "The registered databases, in the order the app registered them, then the discovered files: those in the databases directory by file name, then those in noBackupFilesDir by file name, or as no_backup/<file name> when a registration or a file in the databases directory has that name. Each one is opened, to read its schema version: Room opens its database here if the app has not yet. A database that does not open is listed with schemaVersion null and the reason in error.",
20
+ "responses": {
21
+ "200": {
22
+ "description": "The databases.",
23
+ "content": {
24
+ "application/json": {
25
+ "schema": {
26
+ "type": "object",
27
+ "required": [
28
+ "items"
29
+ ],
30
+ "properties": {
31
+ "items": {
32
+ "type": "array",
33
+ "items": {
34
+ "$ref": "#/components/schemas/SqliteDatabase"
35
+ }
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ }
40
+ }
41
+ }
42
+ },
43
+ "401": {
44
+ "$ref": "#/components/responses/Error"
45
+ },
46
+ "403": {
47
+ "$ref": "#/components/responses/Error"
48
+ },
49
+ "413": {
50
+ "$ref": "#/components/responses/Error"
51
+ },
52
+ "503": {
53
+ "$ref": "#/components/responses/Error"
54
+ },
55
+ "504": {
56
+ "$ref": "#/components/responses/Error"
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "/api/v1/sqlite/tables": {
62
+ "get": {
63
+ "operationId": "listSqliteTables",
64
+ "summary": "List the tables and views of a database.",
65
+ "description": "Every table and view in sqlite_master, by name, as SQLite sorts names without case. A table's rows are counted; a view's are not, because that runs the view's query. The tables that SQLite, Android, and Room keep for themselves, and the shadow tables of a full-text or R*Tree index, are listed with internal true, so that a view can hide them. On a file database that is not in WAL mode, a statement stops after 2 s: a table whose count stops is listed without rowCount, with the reason in error, and another statement that stops is a 504 with code read_limit.",
66
+ "parameters": [
67
+ {
68
+ "name": "db",
69
+ "in": "query",
70
+ "required": true,
71
+ "schema": {
72
+ "type": "string",
73
+ "minLength": 1
74
+ },
75
+ "description": "The database's name, as GET databases lists it. 400 with field db when it is missing; 404 with field db when there is no database of this name; 500 with code open_failed and field db when the database does not open."
76
+ }
77
+ ],
78
+ "responses": {
79
+ "200": {
80
+ "description": "The tables and views.",
81
+ "content": {
82
+ "application/json": {
83
+ "schema": {
84
+ "type": "object",
85
+ "required": [
86
+ "database",
87
+ "writable",
88
+ "items"
89
+ ],
90
+ "properties": {
91
+ "database": {
92
+ "type": "string",
93
+ "description": "The database's name."
94
+ },
95
+ "writable": {
96
+ "type": "boolean",
97
+ "description": "As in GET databases."
98
+ },
99
+ "items": {
100
+ "type": "array",
101
+ "items": {
102
+ "$ref": "#/components/schemas/SqliteTable"
103
+ }
104
+ }
105
+ },
106
+ "additionalProperties": false
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "400": {
112
+ "$ref": "#/components/responses/Error"
113
+ },
114
+ "401": {
115
+ "$ref": "#/components/responses/Error"
116
+ },
117
+ "403": {
118
+ "$ref": "#/components/responses/Error"
119
+ },
120
+ "404": {
121
+ "$ref": "#/components/responses/Error"
122
+ },
123
+ "413": {
124
+ "$ref": "#/components/responses/Error"
125
+ },
126
+ "500": {
127
+ "$ref": "#/components/responses/Error"
128
+ },
129
+ "503": {
130
+ "$ref": "#/components/responses/Error"
131
+ },
132
+ "504": {
133
+ "$ref": "#/components/responses/Error"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "/api/v1/sqlite/schema": {
139
+ "get": {
140
+ "operationId": "getSqliteSchema",
141
+ "summary": "Get the columns, foreign keys, and row count of a table or view.",
142
+ "description": "What PRAGMA table_xinfo (or table_info, before SQLite 3.26) and PRAGMA foreign_key_list say, the statement that created it, and its hint. Generated columns are included; the hidden columns of a virtual table are not. The columns are in their order in the table, which is the order of the cells in GET rows. On a file database that is not in WAL mode, a statement stops after 2 s: 504 with code read_limit.",
143
+ "parameters": [
144
+ {
145
+ "name": "db",
146
+ "in": "query",
147
+ "required": true,
148
+ "schema": {
149
+ "type": "string",
150
+ "minLength": 1
151
+ },
152
+ "description": "The database's name, as GET databases lists it. 400 with field db when it is missing; 404 with field db when there is no database of this name; 500 with code open_failed and field db when the database does not open."
153
+ },
154
+ {
155
+ "name": "table",
156
+ "in": "query",
157
+ "required": true,
158
+ "schema": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ },
162
+ "description": "The table's or view's name, as GET tables lists it. A name in another case finds it too, as in SQL. 400 with field table when it is missing; 404 with field table when the database has no table or view of this name."
163
+ }
164
+ ],
165
+ "responses": {
166
+ "200": {
167
+ "description": "The schema.",
168
+ "content": {
169
+ "application/json": {
170
+ "schema": {
171
+ "$ref": "#/components/schemas/SqliteSchema"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "400": {
177
+ "$ref": "#/components/responses/Error"
178
+ },
179
+ "401": {
180
+ "$ref": "#/components/responses/Error"
181
+ },
182
+ "403": {
183
+ "$ref": "#/components/responses/Error"
184
+ },
185
+ "404": {
186
+ "$ref": "#/components/responses/Error"
187
+ },
188
+ "413": {
189
+ "$ref": "#/components/responses/Error"
190
+ },
191
+ "500": {
192
+ "$ref": "#/components/responses/Error"
193
+ },
194
+ "503": {
195
+ "$ref": "#/components/responses/Error"
196
+ },
197
+ "504": {
198
+ "$ref": "#/components/responses/Error"
199
+ }
200
+ }
201
+ }
202
+ },
203
+ "/api/v1/sqlite/rows": {
204
+ "get": {
205
+ "operationId": "listSqliteRows",
206
+ "summary": "Get a page of rows.",
207
+ "description": "A page of the rows of a table or view in the pagination envelope. Without a sort, a table's rows come in the order of their rowid, or of the primary key for a table WITHOUT ROWID; a view's in the order SQLite gives. A sort on a column also sorts by that key, so that rows with the same value keep their order from page to page. nextCursor is null on the last page; pass it as cursor for the next one. A cursor holds a place in the rows, so a page can start at another row when the rows change between two requests. On a file database that is not in WAL mode, a statement stops after 2 s: 504 with code read_limit.",
208
+ "parameters": [
209
+ {
210
+ "name": "db",
211
+ "in": "query",
212
+ "required": true,
213
+ "schema": {
214
+ "type": "string",
215
+ "minLength": 1
216
+ },
217
+ "description": "The database's name, as GET databases lists it. 400 with field db when it is missing; 404 with field db when there is no database of this name; 500 with code open_failed and field db when the database does not open."
218
+ },
219
+ {
220
+ "name": "table",
221
+ "in": "query",
222
+ "required": true,
223
+ "schema": {
224
+ "type": "string",
225
+ "minLength": 1
226
+ },
227
+ "description": "The table's or view's name, as GET tables lists it. A name in another case finds it too, as in SQL. 400 with field table when it is missing; 404 with field table when the database has no table or view of this name."
228
+ },
229
+ {
230
+ "name": "cursor",
231
+ "in": "query",
232
+ "required": false,
233
+ "schema": {
234
+ "type": "string"
235
+ },
236
+ "description": "The nextCursor of the page before. Without it, the first page. 400 with field cursor when it is not a cursor that this route returned."
237
+ },
238
+ {
239
+ "name": "limit",
240
+ "in": "query",
241
+ "required": false,
242
+ "schema": {
243
+ "type": "integer",
244
+ "format": "int32",
245
+ "minimum": 1,
246
+ "maximum": 500,
247
+ "default": 50
248
+ },
249
+ "description": "The most rows in the page. 400 with field limit when it is not a whole number from 1 to 500."
250
+ },
251
+ {
252
+ "name": "filter",
253
+ "in": "query",
254
+ "required": false,
255
+ "schema": {
256
+ "type": "string"
257
+ },
258
+ "description": "Only the rows where a cell, as text, contains this text. Case does not matter for ASCII letters. % and _ are plain characters here. A blob never matches. A column that the value policy masks is not searched."
259
+ },
260
+ {
261
+ "name": "sort",
262
+ "in": "query",
263
+ "required": false,
264
+ "schema": {
265
+ "type": "string"
266
+ },
267
+ "description": "The column to sort by, as GET schema names it, or rowid when the table has one and no column has that name. 400 with field sort when the table has no such column. A masked column sorts too: the order of the rows shows the order of its values, but not the values."
268
+ },
269
+ {
270
+ "name": "dir",
271
+ "in": "query",
272
+ "required": false,
273
+ "schema": {
274
+ "type": "string",
275
+ "enum": [
276
+ "asc",
277
+ "desc"
278
+ ],
279
+ "default": "asc"
280
+ },
281
+ "description": "The sort's direction; without a sort, the direction of the rowid or the primary key. 400 with field dir when it is neither."
282
+ }
283
+ ],
284
+ "responses": {
285
+ "200": {
286
+ "description": "The page.",
287
+ "content": {
288
+ "application/json": {
289
+ "schema": {
290
+ "$ref": "#/components/schemas/SqliteRowsPage"
291
+ }
292
+ }
293
+ }
294
+ },
295
+ "400": {
296
+ "$ref": "#/components/responses/Error"
297
+ },
298
+ "401": {
299
+ "$ref": "#/components/responses/Error"
300
+ },
301
+ "403": {
302
+ "$ref": "#/components/responses/Error"
303
+ },
304
+ "404": {
305
+ "$ref": "#/components/responses/Error"
306
+ },
307
+ "413": {
308
+ "$ref": "#/components/responses/Error"
309
+ },
310
+ "500": {
311
+ "$ref": "#/components/responses/Error"
312
+ },
313
+ "503": {
314
+ "$ref": "#/components/responses/Error"
315
+ },
316
+ "504": {
317
+ "$ref": "#/components/responses/Error"
318
+ }
319
+ }
320
+ }
321
+ },
322
+ "/api/v1/sqlite/query": {
323
+ "post": {
324
+ "operationId": "runSqliteQuery",
325
+ "summary": "Run a statement read-only.",
326
+ "description": "Runs a client's statement on a connection that SQLite opens read-only to the database's file, for this request only; never on the app's handle, on which any statement, a DELETE too, could write. SQLite refuses every write there, so a statement that writes is a 403 with code read_only and field sql, and changes nothing. A pragma that only reads works: PRAGMA user_version, and a pragma whose value names what to read, such as PRAGMA table_info(notes). BEGIN, COMMIT, END, ROLLBACK, SAVEPOINT, RELEASE, ATTACH, DETACH, and VACUUM are refused before they run, and so is a pragma with a value (PRAGMA journal_mode = DELETE, PRAGMA user_version(9)), which sets it, but for foreign_key_check, foreign_key_list, index_info, index_list, index_xinfo, integrity_check, quick_check, table_info, table_list, and table_xinfo, and the pragmas that set a value for every connection of the process (hard_heap_limit, soft_heap_limit, temp_store_directory, data_store_directory), also after comments, white space, a byte order mark, empty statements, and EXPLAIN: 400 with code statement_refused and field sql. A database in memory has no file, and a live handle on another copy of SQLite than the platform's, such as SQLCipher's, would not share its locks with the tab's connection: both are a 400 with code query_unavailable and field db; read them with GET rows. A result has at most 1000 rows, and fewer when its texts pass 4 Mi characters in all; truncated says that rows were left out. A text comes whole, and a blob is only its size. With the value policy mask_sensitive, a result column whose name looks like it holds a secret has only the storage class of each cell, with masked: true. The name is the result's, as the statement names it: Android does not say which table column a result column comes from, so SELECT access_token AS t shows the value, while length(access_token) without an alias is masked by its name. Android's cursor steps through the whole result once, to count it, so a statement over a large table should have a LIMIT. A row that does not fit Android's cursor window, about 2 MB, is a 400 with code row_too_big. A statement that SQLite can't run is a 400 with code sqlite_error and SQLite's message; one that fails on the file or the device, such as a corrupt file, a 500 with that code. A statement stops at the request's timeout, with a 504. On a database that is not in WAL mode, a read holds a lock that the app's writes wait for, and Android's SQLite gives up a write after 2.5 s: there a statement stops after 2 s, with a 504 with code read_limit and field sql.",
327
+ "requestBody": {
328
+ "required": true,
329
+ "description": "The database and the statement.",
330
+ "content": {
331
+ "application/json": {
332
+ "schema": {
333
+ "type": "object",
334
+ "required": [
335
+ "db",
336
+ "sql"
337
+ ],
338
+ "properties": {
339
+ "db": {
340
+ "type": "string",
341
+ "minLength": 1,
342
+ "description": "The database's name, as GET databases lists it. 400 with field db when it is missing; 404 with field db when there is no database of this name; 500 with code open_failed and field db when the database does not open."
343
+ },
344
+ "sql": {
345
+ "type": "string",
346
+ "minLength": 1,
347
+ "description": "One statement. SQLite runs only the first statement of the text and ignores the rest. 400 with field sql when it is missing, or has only white space and comments."
348
+ }
349
+ }
350
+ }
351
+ }
352
+ }
353
+ },
354
+ "responses": {
355
+ "200": {
356
+ "description": "The result.",
357
+ "content": {
358
+ "application/json": {
359
+ "schema": {
360
+ "$ref": "#/components/schemas/SqliteQueryResult"
361
+ }
362
+ }
363
+ }
364
+ },
365
+ "400": {
366
+ "$ref": "#/components/responses/Error"
367
+ },
368
+ "401": {
369
+ "$ref": "#/components/responses/Error"
370
+ },
371
+ "403": {
372
+ "$ref": "#/components/responses/Error"
373
+ },
374
+ "404": {
375
+ "$ref": "#/components/responses/Error"
376
+ },
377
+ "413": {
378
+ "$ref": "#/components/responses/Error"
379
+ },
380
+ "500": {
381
+ "$ref": "#/components/responses/Error"
382
+ },
383
+ "503": {
384
+ "$ref": "#/components/responses/Error"
385
+ },
386
+ "504": {
387
+ "$ref": "#/components/responses/Error"
388
+ }
389
+ }
390
+ }
391
+ },
392
+ "/api/v1/sqlite/exec": {
393
+ "post": {
394
+ "operationId": "execSqliteStatement",
395
+ "summary": "Run a statement that writes.",
396
+ "description": "Runs a client's statement through the app's handle of a writable database, in a transaction of its own that takes the write lock, and commits it. The statement must return no rows: one that returns rows, such as a SELECT or a write with RETURNING, is a 400 with code statement_refused and field sql, and does not run; read it with POST query. The statements that query refuses are refused here too, and every PRAGMA also, because a pragma can change a setting of the app's connection, such as foreign_keys or query_only: 400 with code statement_refused and field sql. A statement that creates or drops a TEMP table, view, index, or trigger, which would stay on the app's connection, is rolled back, with the same error; a TEMP trigger that SQLite drops or rewrites with its table, such as Room's on a table that it observes, does not count. When the app has the foreign keys on, a statement that breaks a deferred foreign key (DEFERRABLE INITIALLY DEFERRED) is rolled back before the commit, with 400 and code sqlite_error: SQLite checks such a key at COMMIT, and a COMMIT that fails would keep the transaction open on the app's connection. A statement that SQLite refuses, such as one that breaks a constraint, is rolled back: 400 with code sqlite_error and SQLite's message. SQLite can't stop a write at the request's timeout: the statement runs to its end and is then rolled back. Only a timeout during the commit itself can leave the change committed, so read the data again after a 504 before sending the write again. Room's observers see the change at once when the app registers the database with an onWrite that refreshes Room's InvalidationTracker, and otherwise at the app's next write through Room.",
397
+ "requestBody": {
398
+ "required": true,
399
+ "description": "The database and the statement.",
400
+ "content": {
401
+ "application/json": {
402
+ "schema": {
403
+ "type": "object",
404
+ "required": [
405
+ "db",
406
+ "sql"
407
+ ],
408
+ "properties": {
409
+ "db": {
410
+ "type": "string",
411
+ "minLength": 1,
412
+ "description": "The database's name, as GET databases lists it. 400 with field db when it is missing; 404 with field db when there is no database of this name; 500 with code open_failed and field db when the database does not open. 403 with code read_only and field db when the database is not writable, before the other values of the body are checked; only a required field that is missing, or a field that is not of its JSON type, is a 400 first."
413
+ },
414
+ "sql": {
415
+ "type": "string",
416
+ "minLength": 1,
417
+ "description": "One statement. SQLite runs only the first statement of the text and ignores the rest. 400 with field sql when it is missing, or has only white space and comments."
418
+ }
419
+ }
420
+ }
421
+ }
422
+ }
423
+ },
424
+ "responses": {
425
+ "200": {
426
+ "description": "Committed.",
427
+ "content": {
428
+ "application/json": {
429
+ "schema": {
430
+ "$ref": "#/components/schemas/SqliteExecResult"
431
+ }
432
+ }
433
+ }
434
+ },
435
+ "400": {
436
+ "$ref": "#/components/responses/Error"
437
+ },
438
+ "401": {
439
+ "$ref": "#/components/responses/Error"
440
+ },
441
+ "403": {
442
+ "$ref": "#/components/responses/Error"
443
+ },
444
+ "404": {
445
+ "$ref": "#/components/responses/Error"
446
+ },
447
+ "413": {
448
+ "$ref": "#/components/responses/Error"
449
+ },
450
+ "500": {
451
+ "$ref": "#/components/responses/Error"
452
+ },
453
+ "503": {
454
+ "$ref": "#/components/responses/Error"
455
+ },
456
+ "504": {
457
+ "$ref": "#/components/responses/Error"
458
+ }
459
+ }
460
+ }
461
+ },
462
+ "/api/v1/sqlite/edit": {
463
+ "post": {
464
+ "operationId": "editSqliteRow",
465
+ "summary": "Change one row.",
466
+ "description": "Sets the values of one row of a table, through the app's handle of a writable database, in a transaction of its own. 400 with field values when values is missing or empty, names a column that the table does not have or a generated one, or has a value that is not a string, a number, or null. The row must be the only one with its rowid or key: 404 with the field rowid or key when no row has it, and 400 with that field when more than one row has it, which a NULL in a primary key column allows. The change is rolled back when SQLite refuses it, such as for a constraint, also a deferred foreign key, which the tab checks before the commit: 400 with code sqlite_error. The tab finds each name in the table's schema and binds each value, as in the GET routes. A column that the value policy masks can be written, as in the Preferences tab; the console does not offer it.",
467
+ "requestBody": {
468
+ "required": true,
469
+ "description": "The row, and the values to set.",
470
+ "content": {
471
+ "application/json": {
472
+ "schema": {
473
+ "type": "object",
474
+ "required": [
475
+ "db",
476
+ "table",
477
+ "values"
478
+ ],
479
+ "properties": {
480
+ "db": {
481
+ "type": "string",
482
+ "minLength": 1,
483
+ "description": "The database's name, as GET databases lists it. 400 with field db when it is missing; 404 with field db when there is no database of this name; 500 with code open_failed and field db when the database does not open. 403 with code read_only and field db when the database is not writable, before the other values of the body are checked; only a required field that is missing, or a field that is not of its JSON type, is a 400 first."
484
+ },
485
+ "table": {
486
+ "type": "string",
487
+ "minLength": 1,
488
+ "description": "The table's name, as GET tables lists it. A name in another case finds it too, as in SQL. 400 with field table when it is missing, or names a view; 404 with field table when the database has no table of this name."
489
+ },
490
+ "rowid": {
491
+ "type": [
492
+ "string",
493
+ "integer"
494
+ ],
495
+ "pattern": "^-?[0-9]+$",
496
+ "description": "The row's rowid, as GET rows gives it. Name the row by rowid or by key, not both. 400 with field rowid when it is not a whole number, when the table has no rowid (WITHOUT ROWID), and when the body has neither rowid nor key."
497
+ },
498
+ "key": {
499
+ "type": "object",
500
+ "additionalProperties": {
501
+ "$ref": "#/components/schemas/SqliteValue"
502
+ },
503
+ "description": "The row's primary key: each column of the key, and only those, with its value. A text value matches a number in a column with a numeric type. 400 with field key when the columns are not those of the primary key, or the table has none."
504
+ },
505
+ "values": {
506
+ "type": "object",
507
+ "minProperties": 1,
508
+ "additionalProperties": {
509
+ "$ref": "#/components/schemas/SqliteValue"
510
+ },
511
+ "description": "Each column to set, by its name as GET schema gives it, with its value."
512
+ }
513
+ }
514
+ }
515
+ }
516
+ }
517
+ },
518
+ "responses": {
519
+ "200": {
520
+ "description": "Committed.",
521
+ "content": {
522
+ "application/json": {
523
+ "schema": {
524
+ "$ref": "#/components/schemas/SqliteWriteOk"
525
+ }
526
+ }
527
+ }
528
+ },
529
+ "400": {
530
+ "$ref": "#/components/responses/Error"
531
+ },
532
+ "401": {
533
+ "$ref": "#/components/responses/Error"
534
+ },
535
+ "403": {
536
+ "$ref": "#/components/responses/Error"
537
+ },
538
+ "404": {
539
+ "$ref": "#/components/responses/Error"
540
+ },
541
+ "413": {
542
+ "$ref": "#/components/responses/Error"
543
+ },
544
+ "500": {
545
+ "$ref": "#/components/responses/Error"
546
+ },
547
+ "503": {
548
+ "$ref": "#/components/responses/Error"
549
+ },
550
+ "504": {
551
+ "$ref": "#/components/responses/Error"
552
+ }
553
+ }
554
+ }
555
+ },
556
+ "/api/v1/sqlite/delete": {
557
+ "post": {
558
+ "operationId": "deleteSqliteRow",
559
+ "summary": "Delete one row.",
560
+ "description": "Deletes one row of a table, through the app's handle of a writable database, in a transaction of its own. The row must be the only one with its rowid or key: 404 with the field rowid or key when no row has it, and 400 with that field when more than one row has it, which a NULL in a primary key column allows. The change is rolled back when SQLite refuses it, such as for a constraint, also a deferred foreign key, which the tab checks before the commit: 400 with code sqlite_error. The tab finds each name in the table's schema and binds each value, as in the GET routes.",
561
+ "requestBody": {
562
+ "required": true,
563
+ "description": "The row.",
564
+ "content": {
565
+ "application/json": {
566
+ "schema": {
567
+ "type": "object",
568
+ "required": [
569
+ "db",
570
+ "table"
571
+ ],
572
+ "properties": {
573
+ "db": {
574
+ "type": "string",
575
+ "minLength": 1,
576
+ "description": "The database's name, as GET databases lists it. 400 with field db when it is missing; 404 with field db when there is no database of this name; 500 with code open_failed and field db when the database does not open. 403 with code read_only and field db when the database is not writable, before the other values of the body are checked; only a required field that is missing, or a field that is not of its JSON type, is a 400 first."
577
+ },
578
+ "table": {
579
+ "type": "string",
580
+ "minLength": 1,
581
+ "description": "The table's name, as GET tables lists it. A name in another case finds it too, as in SQL. 400 with field table when it is missing, or names a view; 404 with field table when the database has no table of this name."
582
+ },
583
+ "rowid": {
584
+ "type": [
585
+ "string",
586
+ "integer"
587
+ ],
588
+ "pattern": "^-?[0-9]+$",
589
+ "description": "The row's rowid, as GET rows gives it. Name the row by rowid or by key, not both. 400 with field rowid when it is not a whole number, when the table has no rowid (WITHOUT ROWID), and when the body has neither rowid nor key."
590
+ },
591
+ "key": {
592
+ "type": "object",
593
+ "additionalProperties": {
594
+ "$ref": "#/components/schemas/SqliteValue"
595
+ },
596
+ "description": "The row's primary key: each column of the key, and only those, with its value. A text value matches a number in a column with a numeric type. 400 with field key when the columns are not those of the primary key, or the table has none."
597
+ }
598
+ }
599
+ }
600
+ }
601
+ }
602
+ },
603
+ "responses": {
604
+ "200": {
605
+ "description": "Committed.",
606
+ "content": {
607
+ "application/json": {
608
+ "schema": {
609
+ "$ref": "#/components/schemas/SqliteWriteOk"
610
+ }
611
+ }
612
+ }
613
+ },
614
+ "400": {
615
+ "$ref": "#/components/responses/Error"
616
+ },
617
+ "401": {
618
+ "$ref": "#/components/responses/Error"
619
+ },
620
+ "403": {
621
+ "$ref": "#/components/responses/Error"
622
+ },
623
+ "404": {
624
+ "$ref": "#/components/responses/Error"
625
+ },
626
+ "413": {
627
+ "$ref": "#/components/responses/Error"
628
+ },
629
+ "500": {
630
+ "$ref": "#/components/responses/Error"
631
+ },
632
+ "503": {
633
+ "$ref": "#/components/responses/Error"
634
+ },
635
+ "504": {
636
+ "$ref": "#/components/responses/Error"
637
+ }
638
+ }
639
+ }
640
+ }
641
+ },
642
+ "components": {
643
+ "responses": {
644
+ "Error": {
645
+ "description": "Error envelope.",
646
+ "content": {
647
+ "application/json": {
648
+ "schema": {
649
+ "$ref": "#/components/schemas/ErrorEnvelope"
650
+ }
651
+ }
652
+ }
653
+ }
654
+ },
655
+ "schemas": {
656
+ "ErrorEnvelope": {
657
+ "type": "object",
658
+ "required": [
659
+ "error",
660
+ "message"
661
+ ],
662
+ "properties": {
663
+ "error": {
664
+ "type": "string",
665
+ "enum": [
666
+ "bad_request",
667
+ "unauthorized",
668
+ "forbidden",
669
+ "not_found",
670
+ "method_not_allowed",
671
+ "conflict",
672
+ "payload_too_large",
673
+ "unprocessable_entity",
674
+ "too_many_requests",
675
+ "internal_error",
676
+ "unavailable",
677
+ "timeout",
678
+ "error"
679
+ ],
680
+ "description": "Machine error type, e.g. bad_request, not_found, timeout."
681
+ },
682
+ "message": {
683
+ "type": "string"
684
+ },
685
+ "code": {
686
+ "type": "string"
687
+ },
688
+ "field": {
689
+ "type": "string"
690
+ },
691
+ "hint": {
692
+ "type": "string"
693
+ }
694
+ },
695
+ "additionalProperties": false
696
+ },
697
+ "SqliteSource": {
698
+ "type": "string",
699
+ "enum": [
700
+ "framework",
701
+ "support",
702
+ "file"
703
+ ],
704
+ "description": "Where the tab reads the database: framework, the app's open SQLiteDatabase; support, the app's open SupportSQLiteDatabase, such as Room's; file, a connection that the tab opens read-only for each request."
705
+ },
706
+ "SqliteValuePolicy": {
707
+ "type": "string",
708
+ "enum": [
709
+ "visible",
710
+ "mask_sensitive"
711
+ ],
712
+ "description": "What a client sees of the database's values. visible: every value. mask_sensitive: every value but those of the columns whose names look like they hold a secret, such as access_token, clientSecret, or password, by the same name check as the Network tab's redaction (SensitiveKeys.isSensitive). It goes by the name only. In GET rows it goes by the table's column, and in POST query by the result's column name, as the statement names it: SQLite names an expression without an alias by its text, such as length(access_token), which is masked too, but an alias shows the value. The policy keeps secrets off the screen; it does not stop a client that has the token."
713
+ },
714
+ "SqliteDatabase": {
715
+ "type": "object",
716
+ "required": [
717
+ "name",
718
+ "registered",
719
+ "source",
720
+ "writable",
721
+ "policy",
722
+ "path",
723
+ "sizeBytes",
724
+ "walBytes",
725
+ "schemaVersion"
726
+ ],
727
+ "properties": {
728
+ "name": {
729
+ "type": "string",
730
+ "description": "The database's name: the name that the app registered, or the file's name for a discovered one. The other routes take it as db."
731
+ },
732
+ "registered": {
733
+ "type": "boolean",
734
+ "description": "true for a database that the app registered, false for a file that discovery found."
735
+ },
736
+ "source": {
737
+ "$ref": "#/components/schemas/SqliteSource"
738
+ },
739
+ "writable": {
740
+ "type": "boolean",
741
+ "description": "Whether the app lets a client change the database through the tab: POST exec, edit, and delete answer 403 for a database that is not writable. Always false for a file."
742
+ },
743
+ "policy": {
744
+ "$ref": "#/components/schemas/SqliteValuePolicy"
745
+ },
746
+ "path": {
747
+ "type": [
748
+ "string",
749
+ "null"
750
+ ],
751
+ "description": "The database file, or null for a database in memory, and for a live handle that does not open."
752
+ },
753
+ "sizeBytes": {
754
+ "type": [
755
+ "integer",
756
+ "null"
757
+ ],
758
+ "minimum": 0,
759
+ "description": "The size of the database file, without its -wal file, or null when there is no file."
760
+ },
761
+ "walBytes": {
762
+ "type": [
763
+ "integer",
764
+ "null"
765
+ ],
766
+ "minimum": 0,
767
+ "description": "The size of the database's -wal file, or null when it has none: a database out of WAL mode, one in memory, or one whose WAL SQLite has removed. In WAL mode, SQLite writes each change to this file and copies it into the database file at a checkpoint, so until then the -wal file can hold most of the data, and the database file can be a few pages."
768
+ },
769
+ "schemaVersion": {
770
+ "type": [
771
+ "integer",
772
+ "null"
773
+ ],
774
+ "description": "PRAGMA user_version, which Room and SQLiteOpenHelper set to the schema's version; null when the database does not open."
775
+ },
776
+ "error": {
777
+ "type": "string",
778
+ "description": "Only for a database that does not open: why."
779
+ }
780
+ },
781
+ "additionalProperties": false
782
+ },
783
+ "SqliteTableType": {
784
+ "type": "string",
785
+ "enum": [
786
+ "table",
787
+ "view"
788
+ ]
789
+ },
790
+ "SqliteTable": {
791
+ "type": "object",
792
+ "required": [
793
+ "name",
794
+ "type",
795
+ "internal"
796
+ ],
797
+ "properties": {
798
+ "name": {
799
+ "type": "string"
800
+ },
801
+ "type": {
802
+ "$ref": "#/components/schemas/SqliteTableType"
803
+ },
804
+ "internal": {
805
+ "type": "boolean",
806
+ "description": "Whether SQLite, Android, or Room keeps the table for itself (sqlite_*, android_metadata, room_master_table), or it is a shadow table of a full-text or R*Tree index."
807
+ },
808
+ "hasRowId": {
809
+ "type": "boolean",
810
+ "description": "Whether each row has a rowid, which GET rows returns. false for a view and for a table WITHOUT ROWID. Absent when the table can't be read."
811
+ },
812
+ "rowCount": {
813
+ "type": "integer",
814
+ "minimum": 0,
815
+ "description": "How many rows the table has. Absent for a view, and when the table can't be read."
816
+ },
817
+ "entity": {
818
+ "type": "string",
819
+ "description": "From the app's hint: the class that maps the table."
820
+ },
821
+ "purpose": {
822
+ "type": "string",
823
+ "description": "From the app's hint: what a row is."
824
+ },
825
+ "error": {
826
+ "type": "string",
827
+ "description": "Only for a table that can't be read, such as a virtual table whose module this SQLite does not have: why."
828
+ }
829
+ },
830
+ "additionalProperties": false
831
+ },
832
+ "SqliteColumn": {
833
+ "type": "object",
834
+ "required": [
835
+ "name",
836
+ "type",
837
+ "notNull",
838
+ "defaultValue",
839
+ "primaryKey",
840
+ "generated",
841
+ "masked"
842
+ ],
843
+ "properties": {
844
+ "name": {
845
+ "type": "string"
846
+ },
847
+ "type": {
848
+ "type": "string",
849
+ "description": "The declared type, as written in the table's statement; empty when it has none. SQLite stores a value of any type in any column, so a cell's own type is in GET rows."
850
+ },
851
+ "notNull": {
852
+ "type": "boolean"
853
+ },
854
+ "defaultValue": {
855
+ "type": [
856
+ "string",
857
+ "null"
858
+ ],
859
+ "description": "The default, as SQL text, such as 0 or 'none'; null when there is none."
860
+ },
861
+ "primaryKey": {
862
+ "type": "integer",
863
+ "minimum": 0,
864
+ "description": "The column's place in the primary key, from 1, or 0 when it is not in it."
865
+ },
866
+ "generated": {
867
+ "type": "boolean",
868
+ "description": "Whether SQLite computes the column from the others: GENERATED ALWAYS AS, stored or virtual."
869
+ },
870
+ "masked": {
871
+ "type": "boolean",
872
+ "description": "Whether the database's value policy leaves out the column's values: in GET rows, a cell of this column that is not NULL is {type, masked: true}. The console does not edit such a column."
873
+ }
874
+ },
875
+ "additionalProperties": false
876
+ },
877
+ "SqliteForeignKey": {
878
+ "type": "object",
879
+ "required": [
880
+ "table",
881
+ "from",
882
+ "to",
883
+ "onUpdate",
884
+ "onDelete"
885
+ ],
886
+ "properties": {
887
+ "table": {
888
+ "type": "string",
889
+ "description": "The table that the key refers to."
890
+ },
891
+ "from": {
892
+ "type": "array",
893
+ "items": {
894
+ "type": "string"
895
+ },
896
+ "description": "The columns of this table, in order."
897
+ },
898
+ "to": {
899
+ "type": "array",
900
+ "items": {
901
+ "type": [
902
+ "string",
903
+ "null"
904
+ ]
905
+ },
906
+ "description": "The columns of the other table, in the same order. null stands for the other table's primary key column."
907
+ },
908
+ "onUpdate": {
909
+ "type": "string",
910
+ "description": "Such as NO ACTION or CASCADE."
911
+ },
912
+ "onDelete": {
913
+ "type": "string"
914
+ }
915
+ },
916
+ "additionalProperties": false
917
+ },
918
+ "SqliteSchema": {
919
+ "type": "object",
920
+ "required": [
921
+ "database",
922
+ "table",
923
+ "type",
924
+ "internal",
925
+ "hasRowId",
926
+ "rowCount",
927
+ "sql",
928
+ "columns",
929
+ "foreignKeys"
930
+ ],
931
+ "properties": {
932
+ "database": {
933
+ "type": "string"
934
+ },
935
+ "table": {
936
+ "type": "string",
937
+ "description": "The name as the database has it, which can differ in case from the one asked for."
938
+ },
939
+ "type": {
940
+ "$ref": "#/components/schemas/SqliteTableType"
941
+ },
942
+ "internal": {
943
+ "type": "boolean",
944
+ "description": "As in GET tables."
945
+ },
946
+ "hasRowId": {
947
+ "type": "boolean",
948
+ "description": "As in GET tables."
949
+ },
950
+ "rowCount": {
951
+ "type": [
952
+ "integer",
953
+ "null"
954
+ ],
955
+ "minimum": 0,
956
+ "description": "How many rows the table has; null for a view."
957
+ },
958
+ "sql": {
959
+ "type": [
960
+ "string",
961
+ "null"
962
+ ],
963
+ "description": "The CREATE statement from sqlite_master."
964
+ },
965
+ "entity": {
966
+ "type": "string",
967
+ "description": "From the app's hint: the class that maps the table."
968
+ },
969
+ "purpose": {
970
+ "type": "string",
971
+ "description": "From the app's hint: what a row is."
972
+ },
973
+ "columns": {
974
+ "type": "array",
975
+ "items": {
976
+ "$ref": "#/components/schemas/SqliteColumn"
977
+ }
978
+ },
979
+ "foreignKeys": {
980
+ "type": "array",
981
+ "items": {
982
+ "$ref": "#/components/schemas/SqliteForeignKey"
983
+ }
984
+ }
985
+ },
986
+ "additionalProperties": false
987
+ },
988
+ "SqliteCell": {
989
+ "description": "A cell, by its own storage class, which typeof() gives: any column can hold any type, so the declared type does not say. A cell of a column that the value policy masks has only its storage class and masked: true, and a NULL is still a NULL.",
990
+ "oneOf": [
991
+ {
992
+ "type": "object",
993
+ "required": [
994
+ "type"
995
+ ],
996
+ "properties": {
997
+ "type": {
998
+ "const": "null"
999
+ }
1000
+ },
1001
+ "additionalProperties": false
1002
+ },
1003
+ {
1004
+ "type": "object",
1005
+ "required": [
1006
+ "type",
1007
+ "value"
1008
+ ],
1009
+ "properties": {
1010
+ "type": {
1011
+ "const": "integer"
1012
+ },
1013
+ "value": {
1014
+ "type": [
1015
+ "integer",
1016
+ "string"
1017
+ ],
1018
+ "description": "A number; a string of its digits when it is beyond 2^53 - 1 either way, which a JavaScript number can't hold exactly."
1019
+ }
1020
+ },
1021
+ "additionalProperties": false
1022
+ },
1023
+ {
1024
+ "type": "object",
1025
+ "required": [
1026
+ "type",
1027
+ "value"
1028
+ ],
1029
+ "properties": {
1030
+ "type": {
1031
+ "const": "real"
1032
+ },
1033
+ "value": {
1034
+ "type": [
1035
+ "number",
1036
+ "string"
1037
+ ],
1038
+ "description": "A number; the string Infinity or -Infinity for an infinity, which JSON has no number for."
1039
+ }
1040
+ },
1041
+ "additionalProperties": false
1042
+ },
1043
+ {
1044
+ "type": "object",
1045
+ "required": [
1046
+ "type",
1047
+ "value"
1048
+ ],
1049
+ "properties": {
1050
+ "type": {
1051
+ "const": "text"
1052
+ },
1053
+ "value": {
1054
+ "type": "string",
1055
+ "description": "The text, or its first 4096 characters when truncated is true."
1056
+ },
1057
+ "truncated": {
1058
+ "const": true,
1059
+ "description": "Present when the text is longer than 4096 characters."
1060
+ },
1061
+ "length": {
1062
+ "type": "integer",
1063
+ "minimum": 0,
1064
+ "description": "With truncated: the whole text's length, in characters."
1065
+ }
1066
+ },
1067
+ "additionalProperties": false
1068
+ },
1069
+ {
1070
+ "type": "object",
1071
+ "required": [
1072
+ "type",
1073
+ "bytes"
1074
+ ],
1075
+ "properties": {
1076
+ "type": {
1077
+ "const": "blob"
1078
+ },
1079
+ "bytes": {
1080
+ "type": "integer",
1081
+ "minimum": 0,
1082
+ "description": "The blob's size. Its bytes are not read."
1083
+ }
1084
+ },
1085
+ "additionalProperties": false
1086
+ },
1087
+ {
1088
+ "type": "object",
1089
+ "required": [
1090
+ "type",
1091
+ "masked"
1092
+ ],
1093
+ "properties": {
1094
+ "type": {
1095
+ "enum": [
1096
+ "integer",
1097
+ "real",
1098
+ "text",
1099
+ "blob"
1100
+ ]
1101
+ },
1102
+ "masked": {
1103
+ "const": true,
1104
+ "description": "The value policy leaves the value out: the tab never sends it. GET rows does not read it from the database; POST query reads it into the cursor and drops it. A text has no length here, and a blob no size."
1105
+ }
1106
+ },
1107
+ "additionalProperties": false
1108
+ }
1109
+ ]
1110
+ },
1111
+ "SqliteRow": {
1112
+ "type": "object",
1113
+ "required": [
1114
+ "cells"
1115
+ ],
1116
+ "properties": {
1117
+ "rowid": {
1118
+ "type": "string",
1119
+ "pattern": "^-?[0-9]+$",
1120
+ "description": "The row's rowid, as a string, so that a JavaScript client keeps every digit. Absent for a view and for a table WITHOUT ROWID."
1121
+ },
1122
+ "cells": {
1123
+ "type": "object",
1124
+ "additionalProperties": {
1125
+ "$ref": "#/components/schemas/SqliteCell"
1126
+ },
1127
+ "description": "Each column's cell, by the column's name, in the order of GET schema."
1128
+ }
1129
+ },
1130
+ "additionalProperties": false
1131
+ },
1132
+ "SqliteRowsPage": {
1133
+ "description": "The pagination envelope, with rows as its items.",
1134
+ "type": "object",
1135
+ "required": [
1136
+ "items",
1137
+ "nextCursor"
1138
+ ],
1139
+ "properties": {
1140
+ "items": {
1141
+ "type": "array",
1142
+ "items": {
1143
+ "$ref": "#/components/schemas/SqliteRow"
1144
+ }
1145
+ },
1146
+ "nextCursor": {
1147
+ "type": [
1148
+ "string",
1149
+ "null"
1150
+ ],
1151
+ "description": "The cursor of the next page, or null when this is the last."
1152
+ }
1153
+ },
1154
+ "additionalProperties": false
1155
+ },
1156
+ "SqliteValue": {
1157
+ "type": [
1158
+ "string",
1159
+ "number",
1160
+ "null"
1161
+ ],
1162
+ "description": "A value to bind. A string binds as a text, which the column's type can turn into a number, such as \"42\" in an INTEGER column; a whole number as an integer; another number as a real; null as NULL. A blob is written with POST exec, as a blob literal such as x'00ff'."
1163
+ },
1164
+ "SqliteQueryResult": {
1165
+ "type": "object",
1166
+ "required": [
1167
+ "database",
1168
+ "columns",
1169
+ "rows",
1170
+ "truncated"
1171
+ ],
1172
+ "properties": {
1173
+ "database": {
1174
+ "type": "string"
1175
+ },
1176
+ "columns": {
1177
+ "type": "array",
1178
+ "items": {
1179
+ "type": "string"
1180
+ },
1181
+ "description": "The result's columns, in order. Two can have the same name."
1182
+ },
1183
+ "rows": {
1184
+ "type": "array",
1185
+ "maxItems": 1000,
1186
+ "items": {
1187
+ "type": "array",
1188
+ "items": {
1189
+ "$ref": "#/components/schemas/SqliteCell"
1190
+ },
1191
+ "description": "A cell for each column, in the order of columns."
1192
+ }
1193
+ },
1194
+ "truncated": {
1195
+ "type": "boolean",
1196
+ "description": "Whether the result had more rows than rows holds."
1197
+ }
1198
+ },
1199
+ "additionalProperties": false
1200
+ },
1201
+ "SqliteExecResult": {
1202
+ "type": "object",
1203
+ "required": [
1204
+ "status",
1205
+ "changes"
1206
+ ],
1207
+ "properties": {
1208
+ "status": {
1209
+ "const": "ok"
1210
+ },
1211
+ "changes": {
1212
+ "type": "integer",
1213
+ "minimum": 0,
1214
+ "description": "How many rows the statement inserted, updated, or deleted, without the rows of triggers and of foreign key actions; 0 for a statement that changes no row, such as CREATE TABLE."
1215
+ }
1216
+ },
1217
+ "additionalProperties": false
1218
+ },
1219
+ "SqliteWriteOk": {
1220
+ "type": "object",
1221
+ "required": [
1222
+ "status"
1223
+ ],
1224
+ "properties": {
1225
+ "status": {
1226
+ "const": "ok"
1227
+ }
1228
+ },
1229
+ "additionalProperties": false
1230
+ }
1231
+ }
1232
+ }
1233
+ }