@zukhruf/sqlite-drift 0.3.38 → 0.3.40

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @zukhruf/sqlite-drift
2
2
 
3
- A package keeps tables, indexes, views and triggers in a SQLite database. A later version of the package can declare them otherwise, for example with one more column. The database still stores the objects as the earlier version made them, and the new code fails on them, for example with `no such column`. This package compares the stored objects with their declaration, and makes the database store them as declared. No person keeps a version number. This is also known as declarative schema management, and the difference that it finds is known as schema drift.
3
+ A package keeps tables, virtual tables, indexes, views and triggers in a SQLite database. A later version of the package can declare them otherwise, for example with one more column. The database still stores the objects as the earlier version made them, and the new code fails on them, for example with `no such column`. This package compares the stored objects with their declaration, and makes the database store them as declared. No person keeps a version number. This is also known as declarative schema management, and the difference that it finds is known as schema drift.
4
4
 
5
5
  The words in these documents have one meaning each. See the glossary in [CONTEXT.md](./CONTEXT.md).
6
6
 
@@ -48,7 +48,10 @@ fits
48
48
 
49
49
  ## A declaration compares the text that SQLite stores
50
50
 
51
- - `new Declaration(statements, { rows })` makes the objects once in an empty database in memory, and keeps the text that SQLite stores for each one. [ADR 0001](./docs/adr/0001-compare-the-text-that-sqlite-stores.md) tells why.
51
+ - `new Declaration(statements, { rows, devDatabase })` makes the objects once in the dev database, and keeps the text that SQLite stores for each one. [ADR 0001](./docs/adr/0001-compare-the-text-that-sqlite-stores.md) tells why.
52
+ - The dev database is an empty database in memory. `devDatabase` is an optional function that opens it. When there is no `devDatabase`, the package opens `new DatabaseSync(':memory:')`. See [Extensions and functions](#extensions-and-functions).
53
+ - Each string in `statements` holds one CREATE statement, and the statement makes one declared object. A closing semicolon and comments after the statement are permitted.
54
+ - A statement can also add owned objects to `sqlite_schema`: the shadow tables of a virtual table, `sqlite_sequence` for `AUTOINCREMENT`, and the index of a `UNIQUE` column. SQLite makes and drops an owned object with its declared object. `drift` and `apply` examine only the declared objects. [ADR 0004](./docs/adr/0004-a-statement-owns-the-objects-its-create-makes.md) tells why.
52
55
  - `rows` is `'replace'` or `'keep'`. It tells `apply` what to do with the rows of a stale table. It has no default, so no caller loses rows because it forgot an option.
53
56
  - `drift(database)` gives `missing` when the database stores none of the objects, `fits` when it stores each one as declared, and `stale` for all other cases. It only reads, so it also works on a database opened read-only.
54
57
  - Each change to a CREATE statement is drift: a column, a type, a CHECK, STRICT, the query of a view.
@@ -70,7 +73,7 @@ With `rows: 'keep'`, `apply` keeps the rows of each stale table. It replaces a s
70
73
 
71
74
  1. It renames the stored table to a temporary name, with `PRAGMA legacy_alter_table` on. Thus the references of other tables, views and triggers stay on the name of the table.
72
75
  2. It makes the table from its declared text, so SQLite stores the declared text.
73
- 3. It copies the columns that both tables have, by name. SQLite takes names that are different only in ASCII case as one name.
76
+ 3. It copies the columns that both tables have, by name. SQLite takes names that are different only in ASCII case as one name. When both tables have a rowid, it also copies the rowid of each row. A copied `INTEGER PRIMARY KEY` column keeps its own values. When the declared table has `AUTOINCREMENT`, it keeps the largest id that the old table gave, so the id of a deleted row is not given again.
74
77
  4. It drops the old table, and makes again the indexes and triggers on the table that the declaration does not name.
75
78
  5. It runs `PRAGMA foreign_key_check`. When a kept row breaks a foreign key, `apply` fails.
76
79
  6. After it makes the missing objects, it compiles a `DELETE`, an `INSERT` and an `UPDATE` of each rebuilt table, and runs no row. SQLite does not examine the body of a trigger at `CREATE`. It examines the body when it compiles a statement that fires the trigger. When a trigger on the table names a dropped column, `apply` fails with the error of SQLite.
@@ -123,18 +126,67 @@ fits
123
126
  - When foreign keys are on and a table refers to a stale table (also the stale table to itself), `apply` must turn foreign keys off. SQLite ignores `PRAGMA foreign_keys` in a transaction. Thus `apply` turns foreign keys off before its own transaction, and on again after it. In a transaction of the caller, `apply` fails before it changes the database. Call `apply` outside a transaction, or turn foreign keys off before it.
124
127
  - When no table refers to the stale table, `apply` also works in a transaction of the caller, with foreign keys on.
125
128
  - After a rebuild, `PRAGMA legacy_alter_table` has its old value again, also when `apply` fails.
129
+ - `apply` does not rebuild a virtual table. A module keeps the data of a virtual table in its own way, and a copy of the rows can break it. For example, an external-content FTS5 index can then find the wrong rows. When a virtual table is stale, `apply` fails before it changes the database. Give the virtual table its own declaration with `rows: 'replace'`, and fill it again after `apply`.
130
+
131
+ ## Extensions and functions
132
+
133
+ SQLite keeps virtual-table modules, functions of the application and collations on the connection, not in the database file. Thus a statement that uses one runs only in a connection that has it. The default dev database has only what SQLite has by default. A statement that uses more fails in `new Declaration`, for example with `no such module: vec0`. Give `devDatabase`, and open the dev database as you open the target database: load the same extensions, and register the same functions. The example loads the `vec0` module of the sqlite-vec extension. [ADR 0005](./docs/adr/0005-the-caller-can-give-the-dev-database.md) tells why.
134
+
135
+ ```ts
136
+ import { mkdtempDisposable } from 'node:fs/promises';
137
+ import { tmpdir } from 'node:os';
138
+ import { join } from 'node:path';
139
+ import { DatabaseSync } from 'node:sqlite';
140
+
141
+ import * as sqliteVec from 'sqlite-vec';
142
+
143
+ import { Declaration } from '@zukhruf/sqlite-drift';
144
+
145
+ function open(path: string): DatabaseSync {
146
+ const database = new DatabaseSync(path, { allowExtension: true });
147
+ database.loadExtension(sqliteVec.getLoadablePath());
148
+ return database;
149
+ }
150
+
151
+ await using scratch = await mkdtempDisposable(join(tmpdir(), 'drift-'));
152
+ using database = open(join(scratch.path, 'app.sqlite'));
153
+
154
+ const vectors = new Declaration(
155
+ ['CREATE VIRTUAL TABLE vectors USING vec0(embedding float[4])'],
156
+ { rows: 'replace', devDatabase: () => open(':memory:') },
157
+ );
158
+ console.log(vectors.drift(database));
159
+ vectors.apply(database);
160
+ console.log(vectors.drift(database));
161
+ ```
162
+
163
+ Output:
164
+
165
+ ```
166
+ missing
167
+ fits
168
+ ```
169
+
170
+ - The dev database must be empty when the declaration starts. When it has an object, `new Declaration` fails.
171
+ - `new Declaration` closes the dev database, also when it fails. Do not use the connection after you give it.
172
+ - The target database must load the same modules. When it does not, `apply` fails with the error of SQLite, for example `no such module: vec0`. `drift` reads only `sqlite_schema`, so it still gives the drift.
126
173
 
127
174
  ## Write a declaration
128
175
 
129
176
  - List a table before the tables that refer to it.
130
- - A declaration must stand alone in an empty database. Do not declare a trigger or an index on a table that the declaration does not name, and do not use a function that only your connection registers.
177
+ - A declaration must stand alone in the dev database. Do not declare a trigger or an index on a table that the declaration does not name. When a statement uses a function, a module or a collation, the dev database must have it too.
131
178
  - With `rows: 'replace'`, give each table its own declaration when it must keep its rows while another table changes.
132
179
 
133
180
  ## Errors
134
181
 
135
182
  | Error | When |
136
183
  | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
137
- | The error of SQLite | `new Declaration` fails when a statement does not run in an empty database. |
184
+ | The error of SQLite | `new Declaration` fails when a statement does not run in the dev database. |
185
+ | `The dev database must be empty. …` | `new Declaration` fails when the dev database has an object. |
186
+ | `no such module: …`, `no such function: …` | `new Declaration`, or `apply` on the target database, when that connection does not have a module or a function that a statement uses. |
187
+ | `An element of a declaration holds one statement. …` | `new Declaration` fails when one string holds two statements. |
188
+ | `An element of a declaration makes one object. …` | `new Declaration` fails when a statement makes no object, for example `CREATE TABLE IF NOT EXISTS` of a declared table, a `TEMP` table, or an `INSERT`. |
189
+ | `The virtual table … cannot keep its rows: …` | `rows: 'keep'`, and a virtual table is stale. Nothing changes. |
138
190
  | `database is locked` | `apply` with no transaction waits for the busy timeout of the connection, then fails. |
139
191
  | The error of a statement | `apply` fails, and the database stays as it was. |
140
192
  | `Keeping the rows of a table that other tables reference needs foreign keys off, …` | `rows: 'keep'`, in a transaction of the caller, with foreign keys on, and another table refers to a stale table. Nothing changes. |
@@ -160,6 +212,8 @@ fits
160
212
  - [0001 Compare the text that SQLite stores](./docs/adr/0001-compare-the-text-that-sqlite-stores.md)
161
213
  - [0002 A stale object replaces the whole declaration](./docs/adr/0002-a-stale-object-replaces-the-whole-declaration.md)
162
214
  - [0003 Keep rows rebuilds a table and keeps its references](./docs/adr/0003-keep-rows-rebuilds-a-table-and-keeps-its-references.md)
215
+ - [0004 A statement owns the objects its CREATE makes](./docs/adr/0004-a-statement-owns-the-objects-its-create-makes.md)
216
+ - [0005 The caller can give the dev database](./docs/adr/0005-the-caller-can-give-the-dev-database.md)
163
217
 
164
218
  ## Development
165
219
 
@@ -5,6 +5,7 @@ export declare class Declaration {
5
5
  #private;
6
6
  constructor(statements: readonly string[], options: {
7
7
  readonly rows: Rows;
8
+ readonly devDatabase?: () => DatabaseSync;
8
9
  });
9
10
  drift(database: DatabaseSync): Drift;
10
11
  apply(database: DatabaseSync): void;
@@ -1 +1 @@
1
- {"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../src/declaration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM3C,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAIjD,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC;AAgBtC,qBAAa,WAAW;;gBAIV,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;KAAE;IAgB3E,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,KAAK;IAkBpC,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;CAmIpC"}
1
+ {"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../src/declaration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM3C,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAIjD,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC;AAmBtC,qBAAa,WAAW;;gBASpB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,EAAE;QACP,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;QACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,YAAY,CAAC;KAC3C;IAUH,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,KAAK;IAkBpC,KAAK,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;CAgKpC"}
@@ -2,25 +2,24 @@ import { randomUUID } from 'node:crypto';
2
2
  import { DatabaseSync } from 'node:sqlite';
3
3
  import { transaction } from '@zukhruf/sqlite-transaction';
4
4
  // The tables, indexes, views and triggers a caller owns in a SQLite database,
5
- // by the CREATE statements that make them. SQLite keeps the text of each
6
- // CREATE in sqlite_schema. A declaration makes its objects once in an empty
7
- // database in memory, so the declared text and the stored text both come from
8
- // SQLite, and they compare as they are.
5
+ // by the CREATE statements that make them, one statement for each object.
6
+ // SQLite keeps the text of each CREATE in sqlite_schema. A declaration makes
7
+ // its objects once in the dev database, so the declared text and
8
+ // the stored text both come from SQLite, and they compare as they are. The
9
+ // other rows that a statement adds to sqlite_schema (shadow tables,
10
+ // sqlite_sequence) are owned objects: SQLite makes and drops them with the
11
+ // declared object (ADR 0004).
9
12
  export class Declaration {
10
13
  #objects;
11
14
  #rows;
15
+ // devDatabase opens the empty database in memory. SQLite keeps modules,
16
+ // functions and collations on the connection, so the connection that makes
17
+ // the objects must have those that the statements use (ADR 0005). The
18
+ // declaration closes it.
12
19
  constructor(statements, options) {
13
- using blank = new DatabaseSync(':memory:');
14
- for (const statement of statements)
15
- blank.exec(statement);
16
- this.#objects = blank
17
- .prepare('SELECT "type", "name", "sql" FROM sqlite_schema WHERE "sql" IS NOT NULL ORDER BY rowid')
18
- .all()
19
- .map(({ type, name, sql }) => ({
20
- type: String(type),
21
- name: String(name),
22
- sql: String(sql),
23
- }));
20
+ using blank = (options.devDatabase ?? (() => new DatabaseSync(':memory:')))();
21
+ empty(blank);
22
+ this.#objects = statements.map((statement) => declare(blank, statement));
24
23
  this.#rows = options.rows;
25
24
  }
26
25
  drift(database) {
@@ -44,6 +43,10 @@ export class Declaration {
44
43
  apply(database) {
45
44
  if (this.drift(database) === 'fits')
46
45
  return;
46
+ if (this.#rows === 'keep')
47
+ for (const { object, found } of this.#stale(database))
48
+ if (virtual(object) || virtual(found))
49
+ throw new Error(`The virtual table ${object.name} cannot keep its rows: declare it in its own declaration with rows: 'replace'.`);
47
50
  // SQLite ignores PRAGMA foreign_keys in a transaction. With foreign keys
48
51
  // on, the rename of a referenced table changes the references to the old
49
52
  // table, and its drop then deletes the rows that refer to it.
@@ -137,19 +140,111 @@ export class Declaration {
137
140
  .map(({ sql }) => String(sql));
138
141
  const old = `${found.name}_${randomUUID().replaceAll('-', '')}`;
139
142
  database.exec(`ALTER TABLE ${quote(found.name)} RENAME TO ${quote(old)}`);
143
+ // The sqlite_sequence row of the table follows the rename.
144
+ const counter = sequence(database, old);
140
145
  database.exec(object.sql);
141
146
  const columns = new Set(names(database, object.name).map((name) => name.toLowerCase()));
142
147
  const shared = names(database, old)
143
148
  .filter((name) => columns.has(name.toLowerCase()))
144
- .map(quote)
145
- .join(', ');
146
- if (shared !== '')
147
- database.exec(`INSERT INTO ${quote(object.name)} (${shared}) SELECT ${shared} FROM ${quote(old)}`);
149
+ .map(quote);
150
+ const into = [...shared];
151
+ const from = [...shared];
152
+ // pragma_table_info does not list the rowid, so a copy of the columns
153
+ // gives new rowids. The rowid goes first: when the list also has the
154
+ // INTEGER PRIMARY KEY of the new table, SQLite takes the later value.
155
+ const target = rowid(database, object.name);
156
+ const source = rowid(database, old);
157
+ if (target !== undefined && source !== undefined) {
158
+ into.unshift(target);
159
+ from.unshift(source);
160
+ }
161
+ if (into.length > 0)
162
+ database.exec(`INSERT INTO ${quote(object.name)} (${into.join(', ')}) SELECT ${from.join(', ')} FROM ${quote(old)}`);
163
+ // AUTOINCREMENT gives no id that the table gave before, also when its row
164
+ // is gone. sqlite_sequence keeps the largest such id. The copy gives no
165
+ // id larger than the old counter.
166
+ if (counter !== undefined && /\bAUTOINCREMENT\b/i.test(object.sql)) {
167
+ database
168
+ .prepare('DELETE FROM sqlite_sequence WHERE "name" = ?')
169
+ .run(object.name);
170
+ database
171
+ .prepare('INSERT INTO sqlite_sequence ("name", "seq") VALUES (?, ?)')
172
+ .run(object.name, counter);
173
+ }
148
174
  database.exec(`DROP TABLE ${quote(old)}`);
149
175
  for (const sql of undeclared)
150
176
  database.exec(sql);
151
177
  }
152
178
  }
179
+ // A declared object is the first row that a statement adds, so an object
180
+ // that is already in the dev database cannot be part of the declaration.
181
+ // Atlas also refuses a dev database that is not clean.
182
+ function empty(blank) {
183
+ const object = blank.prepare('SELECT "name" FROM sqlite_schema').get();
184
+ if (object !== undefined)
185
+ throw new Error(`The dev database must be empty. It holds ${String(object.name)}.`);
186
+ }
187
+ // Runs one element of a declaration in the blank database, and gives the
188
+ // object that the element declares: the first row that it adds to
189
+ // sqlite_schema. The other rows that it adds (the shadow tables of a virtual
190
+ // table, sqlite_sequence, the index of a UNIQUE column) belong to that object:
191
+ // SQLite makes and drops them with it (ADR 0004).
192
+ function declare(blank, element) {
193
+ const last = Number(blank
194
+ .prepare('SELECT coalesce(max(rowid), 0) AS "last" FROM sqlite_schema')
195
+ .get()?.last);
196
+ // prepare compiles the first statement of the text and ignores the rest.
197
+ const statement = blank.prepare(element);
198
+ statement.run();
199
+ if (holds(blank, element.slice(statement.sourceSQL.length)))
200
+ throw new Error(`An element of a declaration holds one statement. This element holds more: ${element}`);
201
+ const made = blank
202
+ .prepare('SELECT "type", "name", "sql" FROM sqlite_schema WHERE rowid > ? ORDER BY rowid')
203
+ .get(last);
204
+ if (made === undefined)
205
+ throw new Error(`An element of a declaration makes one object. This element makes none: ${element}`);
206
+ return {
207
+ type: String(made.type),
208
+ name: String(made.name),
209
+ sql: String(made.sql),
210
+ };
211
+ }
212
+ // Whether the text holds a statement. SQLite compiles no statement from a
213
+ // text of spaces, comments and semicolons, and node:sqlite then throws.
214
+ function holds(database, text) {
215
+ try {
216
+ database.prepare(text);
217
+ return true;
218
+ }
219
+ catch (error) {
220
+ return !(error instanceof Error &&
221
+ 'code' in error &&
222
+ error.code === 'ERR_INVALID_ARG_VALUE');
223
+ }
224
+ }
225
+ function virtual(object) {
226
+ return /^CREATE VIRTUAL TABLE /i.test(object.sql);
227
+ }
228
+ // The name that reads the rowid of the table: none for a WITHOUT ROWID table,
229
+ // and none when columns have each of the three names of the rowid.
230
+ function rowid(database, table) {
231
+ const list = database
232
+ .prepare('SELECT "wr" FROM pragma_table_list(?)')
233
+ .get(table);
234
+ if (Number(list?.wr) === 1)
235
+ return undefined;
236
+ const columns = new Set(names(database, table).map((name) => name.toLowerCase()));
237
+ return ['rowid', '_rowid_', 'oid'].find((name) => !columns.has(name));
238
+ }
239
+ // The largest id that an AUTOINCREMENT table gave, as sqlite_sequence keeps it.
240
+ function sequence(database, table) {
241
+ if (stored(database, 'sqlite_sequence') === undefined)
242
+ return undefined;
243
+ const row = database
244
+ .prepare('SELECT "seq" FROM sqlite_sequence WHERE "name" = ?')
245
+ .get(table);
246
+ return row === undefined ? undefined : Number(row.seq);
247
+ }
153
248
  // SQLite takes names that differ only in ASCII case for one object.
154
249
  function stored(database, name) {
155
250
  const row = database
@@ -1 +1 @@
1
- {"version":3,"file":"declaration.js","sourceRoot":"","sources":["../src/declaration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAmB1D,8EAA8E;AAC9E,yEAAyE;AACzE,4EAA4E;AAC5E,8EAA8E;AAC9E,wCAAwC;AACxC,MAAM,OAAO,WAAW;IACb,QAAQ,CAA0B;IAClC,KAAK,CAAO;IAErB,YAAY,UAA6B,EAAE,OAAgC;QACzE,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;QAC3C,KAAK,MAAM,SAAS,IAAI,UAAU;YAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1D,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AC;IACD,KAAK,MAAM,IAAI,IAAI,KAAK;QACtB,IAAI,CAAC;YACH,QAAQ,CAAC,OAAO,CAAC,iBAAiB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,GAAG,EAAE;gBACtD,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;AACL,CAAC;AAED,qEAAqE;AACrE,SAAS,UAAU,CAAC,QAAsB,EAAE,KAAa;IACvD,OAAO,CACL,QAAQ;SACL,OAAO,CACN,6IAA6I,CAC9I;SACA,GAAG,CAAC,KAAK,CAAC,KAAK,SAAS,CAC5B,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zukhruf/sqlite-drift",
3
- "version": "0.3.38",
3
+ "version": "0.3.40",
4
4
  "description": "Declarative schema management for SQLite. A declaration lists the CREATE statements of the tables, indexes, views and triggers that one caller owns. The package compares them with the text that SQLite stores, gives the drift (missing, fits or stale), and makes the database store each object as declared. No person keeps a version number.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,6 +42,6 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@zukhruf/sqlite-transaction": "^0.3.38"
45
+ "@zukhruf/sqlite-transaction": "^0.3.40"
46
46
  }
47
47
  }