uql-orm 0.65.1 → 0.67.0

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 (193) hide show
  1. package/dist/browser/querier/httpQuerier.js +1 -8
  2. package/dist/browser/uql-browser.min.js.map +5 -5
  3. package/dist/bunSql/bunSql.util.d.ts +2 -6
  4. package/dist/bunSql/bunSql.util.js +2 -6
  5. package/dist/bunSql/bunSqlQuerier.d.ts +2 -5
  6. package/dist/bunSql/bunSqlQuerier.js +2 -5
  7. package/dist/cockroachdb/cockroachDialect.d.ts +4 -13
  8. package/dist/cockroachdb/cockroachDialect.js +4 -13
  9. package/dist/context/context.browser.js +2 -10
  10. package/dist/context/context.d.ts +4 -17
  11. package/dist/context/context.js +4 -17
  12. package/dist/dialect/abstractDialect.d.ts +4 -19
  13. package/dist/dialect/abstractDialect.js +2 -20
  14. package/dist/dialect/abstractSqlDialect.d.ts +47 -212
  15. package/dist/dialect/abstractSqlDialect.js +68 -222
  16. package/dist/dialect/aliases.d.ts +2 -12
  17. package/dist/dialect/aliases.js +4 -12
  18. package/dist/dialect/hydrateColumn.d.ts +2 -6
  19. package/dist/dialect/hydrateColumn.js +3 -13
  20. package/dist/dialect/jsonArrayElemMatchUtils.d.ts +1 -7
  21. package/dist/dialect/jsonArrayElemMatchUtils.js +1 -7
  22. package/dist/dialect/jsonSql.d.ts +6 -27
  23. package/dist/dialect/jsonSql.js +6 -27
  24. package/dist/dialect/mergeSqlDialect.d.ts +4 -22
  25. package/dist/dialect/mergeSqlDialect.js +4 -22
  26. package/dist/dialect/mysqlLikeSqlDialect.d.ts +11 -37
  27. package/dist/dialect/mysqlLikeSqlDialect.js +35 -51
  28. package/dist/dialect/pgLikeSqlDialect.d.ts +8 -22
  29. package/dist/dialect/pgLikeSqlDialect.js +36 -39
  30. package/dist/dialect/queryContext.d.ts +4 -22
  31. package/dist/dialect/queryContext.js +4 -22
  32. package/dist/dialect/queryJoins.d.ts +3 -12
  33. package/dist/dialect/queryJoins.js +3 -12
  34. package/dist/dialect/vectorCast.d.ts +2 -12
  35. package/dist/dialect/vectorCast.js +3 -19
  36. package/dist/dialect/vectorSqlDialect.d.ts +8 -38
  37. package/dist/dialect/vectorSqlDialect.js +7 -38
  38. package/dist/entity/decorator/bag.d.ts +6 -19
  39. package/dist/entity/decorator/bag.js +6 -22
  40. package/dist/entity/decorator/entity.d.ts +5 -10
  41. package/dist/entity/decorator/entity.js +2 -7
  42. package/dist/entity/decorator/members.d.ts +10 -31
  43. package/dist/entity/decorator/members.js +3 -12
  44. package/dist/entity/metadata/definition.d.ts +5 -21
  45. package/dist/entity/metadata/definition.js +69 -91
  46. package/dist/http/handler.d.ts +2 -14
  47. package/dist/index.d.ts +3 -1
  48. package/dist/index.js +3 -1
  49. package/dist/libsql/libsqlDialect.d.ts +1 -8
  50. package/dist/libsql/libsqlDialect.js +1 -8
  51. package/dist/maria/mariaDialect.d.ts +3 -5
  52. package/dist/maria/mariaDialect.js +5 -5
  53. package/dist/maria/mariadbQuerier.js +2 -2
  54. package/dist/maria/mariadbQuerierPool.js +1 -6
  55. package/dist/migrate/builder/migrationBuilder.js +3 -19
  56. package/dist/migrate/builder/splitSqlStatements.d.ts +1 -14
  57. package/dist/migrate/builder/splitSqlStatements.js +2 -22
  58. package/dist/migrate/builder/types.d.ts +2 -15
  59. package/dist/migrate/cli-config.js +2 -11
  60. package/dist/migrate/cli.js +2 -7
  61. package/dist/migrate/codegen/entityCodeGenerator.d.ts +0 -15
  62. package/dist/migrate/codegen/entityCodeGenerator.js +15 -44
  63. package/dist/migrate/codegen/fieldOptionsSource.d.ts +1 -8
  64. package/dist/migrate/codegen/fieldOptionsSource.js +3 -22
  65. package/dist/migrate/ddl/indexDdl.d.ts +2 -5
  66. package/dist/migrate/ddl/indexDdl.js +2 -5
  67. package/dist/migrate/ddl/pgIndexDdl.d.ts +3 -13
  68. package/dist/migrate/ddl/pgIndexDdl.js +3 -13
  69. package/dist/migrate/generator/definitionToNode.d.ts +2 -9
  70. package/dist/migrate/generator/definitionToNode.js +3 -17
  71. package/dist/migrate/generator/indexNodeToSchema.d.ts +2 -3
  72. package/dist/migrate/generator/indexNodeToSchema.js +2 -3
  73. package/dist/migrate/generator/mongoCommand.d.ts +1 -8
  74. package/dist/migrate/generator/mongoSchemaGenerator.d.ts +1 -8
  75. package/dist/migrate/generator/mongoSchemaGenerator.js +1 -8
  76. package/dist/migrate/introspection/abstractSqlSchemaIntrospector.d.ts +6 -26
  77. package/dist/migrate/introspection/abstractSqlSchemaIntrospector.js +9 -41
  78. package/dist/migrate/introspection/baseSqlIntrospector.js +0 -1
  79. package/dist/migrate/introspection/mongoIntrospector.d.ts +3 -1
  80. package/dist/migrate/introspection/mongoIntrospector.js +48 -46
  81. package/dist/migrate/introspection/mssqlIntrospector.d.ts +4 -4
  82. package/dist/migrate/introspection/mssqlIntrospector.js +18 -27
  83. package/dist/migrate/introspection/mysqlIntrospector.d.ts +7 -2
  84. package/dist/migrate/introspection/mysqlIntrospector.js +16 -14
  85. package/dist/migrate/introspection/postgresIntrospector.d.ts +24 -9
  86. package/dist/migrate/introspection/postgresIntrospector.js +68 -59
  87. package/dist/migrate/introspection/sqliteIntrospector.d.ts +1 -1
  88. package/dist/migrate/introspection/sqliteIntrospector.js +8 -10
  89. package/dist/migrate/migrator.d.ts +9 -53
  90. package/dist/migrate/migrator.js +32 -65
  91. package/dist/migrate/schemaGenerator.d.ts +20 -66
  92. package/dist/migrate/schemaGenerator.js +32 -93
  93. package/dist/mongo/mongoDialect.d.ts +21 -53
  94. package/dist/mongo/mongoDialect.js +25 -70
  95. package/dist/mongo/mongodbQuerier.d.ts +5 -8
  96. package/dist/mongo/mongodbQuerier.js +31 -65
  97. package/dist/mssql/mssqlDialect.d.ts +8 -34
  98. package/dist/mssql/mssqlDialect.js +37 -51
  99. package/dist/mssql/mssqlQuerier.d.ts +37 -4
  100. package/dist/mssql/mssqlQuerier.js +2 -2
  101. package/dist/mssql/mssqlWireTypes.d.ts +2 -14
  102. package/dist/mssql/mssqlWireTypes.js +2 -14
  103. package/dist/nestjs/uqlModule.js +2 -7
  104. package/dist/pglite/pgliteQuerier.d.ts +1 -9
  105. package/dist/pglite/pgliteQuerierPool.d.ts +4 -26
  106. package/dist/pglite/pgliteQuerierPool.js +3 -18
  107. package/dist/postgres/abstractPgQuerierPool.d.ts +1 -8
  108. package/dist/postgres/abstractPgQuerierPool.js +1 -8
  109. package/dist/postgres/pgNumericTypes.d.ts +3 -26
  110. package/dist/postgres/pgNumericTypes.js +3 -26
  111. package/dist/postgres/postgresDialect.d.ts +4 -10
  112. package/dist/postgres/postgresDialect.js +4 -10
  113. package/dist/querier/abstractQuerier.d.ts +35 -103
  114. package/dist/querier/abstractQuerier.js +105 -201
  115. package/dist/querier/abstractSharedHandleQuerierPool.d.ts +3 -17
  116. package/dist/querier/abstractSharedHandleQuerierPool.js +3 -17
  117. package/dist/querier/abstractSqlQuerier.d.ts +15 -36
  118. package/dist/querier/abstractSqlQuerier.js +49 -131
  119. package/dist/schema/canonicalType.d.ts +3 -21
  120. package/dist/schema/canonicalType.js +22 -67
  121. package/dist/schema/dependencyGraph.d.ts +2 -8
  122. package/dist/schema/dependencyGraph.js +2 -32
  123. package/dist/schema/index.d.ts +1 -25
  124. package/dist/schema/index.js +0 -26
  125. package/dist/schema/indexColumns.d.ts +1 -8
  126. package/dist/schema/indexColumns.js +1 -8
  127. package/dist/schema/indexDifferences.d.ts +7 -40
  128. package/dist/schema/indexDifferences.js +6 -31
  129. package/dist/schema/schemaAST.d.ts +8 -175
  130. package/dist/schema/schemaAST.js +13 -365
  131. package/dist/schema/schemaASTBuilder.d.ts +2 -24
  132. package/dist/schema/schemaASTBuilder.js +6 -41
  133. package/dist/schema/schemaASTDiffer.d.ts +6 -46
  134. package/dist/schema/schemaASTDiffer.js +8 -56
  135. package/dist/schema/types.d.ts +5 -61
  136. package/dist/schema/types.js +3 -6
  137. package/dist/sqlite/abstractSqliteQuerier.d.ts +1 -8
  138. package/dist/sqlite/localSqliteQuerierPool.d.ts +1 -7
  139. package/dist/sqlite/localSqliteQuerierPool.js +1 -7
  140. package/dist/sqlite/nodeSqliteQuerierPool.d.ts +2 -7
  141. package/dist/sqlite/nodeSqliteQuerierPool.js +2 -7
  142. package/dist/sqlite/sqliteDialect.d.ts +5 -20
  143. package/dist/sqlite/sqliteDialect.js +29 -35
  144. package/dist/turso/tursoDialect.d.ts +4 -6
  145. package/dist/turso/tursoDialect.js +4 -6
  146. package/dist/turso/tursoLocalQuerierPool.d.ts +1 -7
  147. package/dist/turso/tursoLocalQuerierPool.js +1 -7
  148. package/dist/turso/tursoQuerierPool.d.ts +2 -6
  149. package/dist/turso/tursoQuerierPool.js +2 -6
  150. package/dist/turso/tursoSessionQuerier.d.ts +1 -7
  151. package/dist/turso/tursoSessionQuerier.js +1 -7
  152. package/dist/type/dialect.d.ts +42 -94
  153. package/dist/type/dialect.js +3 -13
  154. package/dist/type/entity.d.ts +189 -551
  155. package/dist/type/entity.js +26 -9
  156. package/dist/type/logger.d.ts +2 -14
  157. package/dist/type/migration.d.ts +9 -38
  158. package/dist/type/querier.d.ts +9 -28
  159. package/dist/type/querierPool.d.ts +4 -26
  160. package/dist/type/query.d.ts +28 -78
  161. package/dist/type/query.js +2 -7
  162. package/dist/type/queryAggregate.d.ts +18 -98
  163. package/dist/type/queryRaw.d.ts +1 -8
  164. package/dist/type/queryRaw.js +1 -8
  165. package/dist/type/queryWhere.d.ts +13 -61
  166. package/dist/type/universalQuerier.d.ts +18 -105
  167. package/dist/type/utility.d.ts +12 -24
  168. package/dist/type/vector.d.ts +8 -38
  169. package/dist/type/vector.js +1 -1
  170. package/dist/type/wire.d.ts +2 -5
  171. package/dist/util/dialect.util.d.ts +9 -27
  172. package/dist/util/dialect.util.js +10 -27
  173. package/dist/util/field.util.d.ts +5 -37
  174. package/dist/util/field.util.js +7 -50
  175. package/dist/util/fieldOption.util.d.ts +7 -15
  176. package/dist/util/fieldOption.util.js +1 -1
  177. package/dist/util/filters.util.d.ts +2 -5
  178. package/dist/util/filters.util.js +2 -5
  179. package/dist/util/logger.d.ts +2 -6
  180. package/dist/util/logger.js +2 -6
  181. package/dist/util/object.util.d.ts +2 -6
  182. package/dist/util/object.util.js +1 -5
  183. package/dist/util/raw.d.ts +3 -23
  184. package/dist/util/relationQuery.util.d.ts +3 -14
  185. package/dist/util/relationQuery.util.js +3 -14
  186. package/dist/util/rowKey.util.d.ts +2 -10
  187. package/dist/util/rowKey.util.js +2 -10
  188. package/dist/util/sql.util.d.ts +6 -37
  189. package/dist/util/sql.util.js +13 -73
  190. package/dist/util/sqlLiteral.d.ts +2 -13
  191. package/dist/util/sqlLiteral.js +8 -13
  192. package/dist/util/string.util.js +0 -2
  193. package/package.json +4 -4
@@ -1,12 +1,3 @@
1
- /**
2
- * SchemaAST Differ
3
- *
4
- * Compares two SchemaAST instances and produces a detailed diff.
5
- * Used for:
6
- * - Migration generation (entity vs database)
7
- * - Drift detection (expected vs actual)
8
- * - Schema synchronization
9
- */
10
1
  import { areTypesEqual, isBreakingTypeChange } from './canonicalType.js';
11
2
  import { describeIndexDifferences, indexNameStem } from './indexDifferences.js';
12
3
  import { DEFAULT_FOREIGN_KEY_ACTION } from './types.js';
@@ -45,14 +36,7 @@ function matchByKey(source, target, key) {
45
36
  function relationEnds(relation) {
46
37
  return { name: relation.name, fromTable: relation.from.table.name, toTable: relation.to.table.name };
47
38
  }
48
- /**
49
- * Compare two schemas and return the differences.
50
- *
51
- * @param source - The "expected" or "desired" schema (e.g., from entities)
52
- * @param target - The "actual" or "current" schema (e.g., from database)
53
- * @param options - Diff options
54
- * @returns Detailed diff result
55
- */
39
+ /** The differences between the expected schema (the entities) and the actual one (the database). */
56
40
  export function diffSchemas(source, target, options = {}) {
57
41
  const opts = { ...DEFAULT_OPTIONS, ...options };
58
42
  const normalizeName = nameNormalizer(opts);
@@ -89,13 +73,7 @@ export function diffSchemas(source, target, options = {}) {
89
73
  hasBreakingChanges,
90
74
  };
91
75
  }
92
- /**
93
- * Compare two tables and return the differences.
94
- *
95
- * Exported because it is also how a migration is planned: the generator diffs one entity's table
96
- * against the one the database reported, then projects the result into a `SchemaDiff`. One
97
- * comparison serves both, so drift and migrations can no longer disagree about what has changed.
98
- */
76
+ /** The differences between two tables, shared by migrations and drift detection so they cannot disagree. */
99
77
  export function diffTable(source, target, options = {}) {
100
78
  const opts = { ...DEFAULT_OPTIONS, ...options };
101
79
  const columnDiffs = diffTableColumns(source, target, opts);
@@ -106,13 +84,7 @@ export function diffTable(source, target, options = {}) {
106
84
  }
107
85
  return { name: source.name, type: 'alter', columnDiffs, indexDiffs, primaryKeyDiff };
108
86
  }
109
- /**
110
- * The two keys, where they hold different columns.
111
- *
112
- * Compared by columns and in order. Not by name: the engine named the constraint on every table that
113
- * already exists, so matching on one would report every table as drifted the moment the convention
114
- * that derives names changes.
115
- */
87
+ /** The two keys where they hold different columns, compared in order and never by the name the engine gave them. */
116
88
  function diffPrimaryKey(source, target) {
117
89
  const expected = source.primaryKey.map((column) => column.name);
118
90
  const actual = target.primaryKey.map((column) => column.name);
@@ -167,14 +139,8 @@ function diffTableIndexes(source, target, opts) {
167
139
  */
168
140
  function diffColumn(tableName, source, target, opts) {
169
141
  const differences = [];
170
- // Two things a key column implies rather than states, and catalogues report inconsistently: its
171
- // type, which is the dialect's serial spelling rather than one the entity chose and does not round
172
- // trip (`BIGINT AUTO_INCREMENT` reads back as `BIGINT(20)`), and its nullability,
173
- // which is NOT NULL in every engine whatever is reported - SQLite's `PRAGMA table_info` says
174
- // `notnull: 0` for the `INTEGER PRIMARY KEY` that is the table's own rowid. Comparing either asked
175
- // to rewrite the column on every sync, and on SQLite, which cannot alter one at all, failed
176
- // outright. Everything else about a key column is still compared, which the blanket "never alter a
177
- // key column" rule these two replace used to hide.
142
+ // A key column's type and nullability are implied, not stated, and catalogues report them
143
+ // inconsistently (`BIGINT(20)`, SQLite's `notnull: 0` rowid), so neither is compared.
178
144
  const generatedType = source.isAutoIncrement && target.isAutoIncrement;
179
145
  const impliedNotNull = source.isPrimaryKey && target.isPrimaryKey;
180
146
  const typeChanged = !generatedType && !areTypesEqual(opts.normalizeType(source.type), opts.normalizeType(target.type));
@@ -196,14 +162,8 @@ function diffColumn(tableName, source, target, opts) {
196
162
  if (source.isUnique !== target.isUnique) {
197
163
  differences.push(`unique: ${target.isUnique} -> ${source.isUnique}`);
198
164
  }
199
- // Four things are deliberately not compared, all for one reason: a difference here could only be
200
- // reported, never settled, because no statement this generator emits would change it.
201
- // - `isAutoIncrement`: no engine makes a column an identity, or unmakes one, without rewriting the
202
- // table, and the alter emitted for it is a bare `ALTER COLUMN TYPE`.
203
- // - `enum`: a check, and a database reprints one from its parse tree. See the roadmap.
204
- // - `generatedAs`: only Postgres 17 and the MySQL family can rewrite an expression in place.
205
- // - `comment`: fixable on every engine but SQLite, and the only one of the four worth revisiting.
206
- // The same rule `describeIndexDifferences` follows for what it cannot read.
165
+ // Not compared, since no statement this generator emits could settle a difference: `isAutoIncrement`,
166
+ // `enum` (a check the database reprints), `generatedAs`, and `comment`.
207
167
  // Compare default values (if both defined)
208
168
  if (!opts.defaultsEqual(source.defaultValue, target.defaultValue)) {
209
169
  differences.push(`default: ${target.defaultValue ?? 'NULL'} -> ${source.defaultValue ?? 'NULL'}`);
@@ -241,15 +201,7 @@ function diffIndex(tableName, source, target, facets) {
241
201
  description: differences.join(', '),
242
202
  };
243
203
  }
244
- /**
245
- * Compare two lists of relationships.
246
- *
247
- * Lists rather than whole schemas, because a migration diffs one table: its two sides are that
248
- * table's `outgoingRelations`, where `diffSchemas` passes the schema's every relationship.
249
- *
250
- * Matched by columns, never by name - the engine named every constraint that already exists, so
251
- * pairing on names would report every hand-named one as a drop and an add.
252
- */
204
+ /** The differences between two lists of foreign keys, matched by their columns and never by the name the engine gave them. */
253
205
  export function diffRelationshipNodes(source, target, opts = {}) {
254
206
  const normalizeName = nameNormalizer({ ...DEFAULT_OPTIONS, ...opts });
255
207
  const { created, dropped, matched } = matchByKey(source, target, (relation) => getRelationshipKey(relation, normalizeName));
@@ -1,9 +1,3 @@
1
- /**
2
- * Schema AST Types
3
- *
4
- * A unified graph representation of database schema with relationships as first-class citizens.
5
- * Enables reliable diffing, smart relation detection, and dialect-agnostic schema operations.
6
- */
7
1
  import type { IndexSchema } from '../type/migration.js';
8
2
  /**
9
3
  * Type categories universal across SQL dialects.
@@ -36,10 +30,9 @@ export interface CanonicalType {
36
30
  /** Whether this type has timezone info (for timestamp types) */
37
31
  readonly withTimezone?: boolean;
38
32
  }
39
- /**
40
- * Actions for foreign key ON DELETE and ON UPDATE clauses.
41
- */
42
- export type ForeignKeyAction = 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION';
33
+ /** Actions for foreign key ON DELETE and ON UPDATE clauses. */
34
+ export declare const FOREIGN_KEY_ACTIONS: readonly ['CASCADE', 'SET NULL', 'SET DEFAULT', 'RESTRICT', 'NO ACTION'];
35
+ export type ForeignKeyAction = (typeof FOREIGN_KEY_ACTIONS)[number];
43
36
  /**
44
37
  * The values a column accepts, rendered as `CHECK (col IN (...))`.
45
38
  *
@@ -47,14 +40,7 @@ export type ForeignKeyAction = 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRIC
47
40
  * dialect's own literal rules, so a number stays bare where a string is quoted.
48
41
  */
49
42
  export type EnumValues = readonly (string | number)[];
50
- /**
51
- * A `CHECK` constraint as the schema holds it, its expression already text. Declared here rather
52
- * than beside the entity types because a table node also comes from introspection, where there is
53
- * no entity to have authored one.
54
- *
55
- * Only ever compared by presence, never by content: a check is SQL text, and a database reprints
56
- * text from its parse tree, so `CHECK ("balance" >= 0)` reads back as `CHECK ((balance >= (0)::numeric))`.
57
- */
43
+ /** A `CHECK` as the schema holds it, compared by presence only: the database reprints its expression. */
58
44
  export interface CheckSchema {
59
45
  /** Absent when nothing named it, which the generator fills in with `derivedCheckName`. */
60
46
  readonly name?: string;
@@ -68,23 +54,11 @@ export declare const DEFAULT_FOREIGN_KEY_ACTION: ForeignKeyAction;
68
54
  * Relationship cardinality types.
69
55
  */
70
56
  export type RelationshipType = 'OneToOne' | 'OneToMany' | 'ManyToOne' | 'ManyToMany';
71
- /**
72
- * Source of how a relationship was detected.
73
- */
74
- export type RelationshipSource = 'explicit_fk' | 'entity_decorator' | 'naming_pattern' | 'junction_table' | 'unique_fk';
75
57
  /**
76
58
  * Index algorithm/type supported by various databases.
77
59
  */
78
60
  export declare const INDEX_TYPES: readonly ['btree', 'hash', 'gin', 'gist', 'brin', 'fulltext', 'hnsw', 'ivfflat', 'vector', 'vectorSearch'];
79
61
  export type IndexType = (typeof INDEX_TYPES)[number];
80
- /**
81
- * Source of where an index was defined.
82
- */
83
- export type IndexSource = 'entity' | 'database' | 'both';
84
- /**
85
- * Sync status for indexes.
86
- */
87
- export type IndexSyncStatus = 'in_sync' | 'entity_only' | 'db_only' | 'mismatch';
88
62
  /**
89
63
  * Column node in the schema graph.
90
64
  * Represents a single column in a database table.
@@ -179,10 +153,6 @@ export interface RelationshipNode {
179
153
  readonly onDelete?: ForeignKeyAction;
180
154
  /** Action on update of referenced row */
181
155
  readonly onUpdate?: ForeignKeyAction;
182
- /** Confidence level (0-1) for inferred relationships */
183
- readonly confidence?: number;
184
- /** How this relationship was detected */
185
- readonly inferredFrom?: RelationshipSource;
186
156
  }
187
157
  /**
188
158
  * Index node in the schema graph.
@@ -191,10 +161,6 @@ export interface RelationshipNode {
191
161
  export type IndexNode = IndexSchema & {
192
162
  /** Reference to the table this index belongs to */
193
163
  readonly table: TableNode;
194
- /** Where this index was defined */
195
- readonly source?: IndexSource;
196
- /** Current sync status */
197
- readonly syncStatus?: IndexSyncStatus;
198
164
  };
199
165
  /**
200
166
  * Root of the schema graph.
@@ -208,14 +174,7 @@ export interface SchemaAST {
208
174
  /** All indexes (also accessible via TableNode.indexes) */
209
175
  readonly indexes: IndexNode[];
210
176
  }
211
- /**
212
- * Difference between two column definitions.
213
- *
214
- * A union rather than one shape with two optional sides, so which node is present follows from the
215
- * kind of difference: an added column has only the `expected` one, a dropped column only the
216
- * `actual` one, and an altered column both. Stated as optionals, every reader had to assert its way
217
- * past a `undefined` the kind had already ruled out.
218
- */
177
+ /** How two columns differ, a union so which side is present follows from the kind of difference. */
219
178
  export type ColumnDiff = ColumnDiffBase & ({
220
179
  readonly type: 'add';
221
180
  readonly expected: ColumnNode;
@@ -320,21 +279,6 @@ export interface SchemaDiffResult {
320
279
  /** Whether any changes are breaking (could cause data loss) */
321
280
  readonly hasBreakingChanges: boolean;
322
281
  }
323
- /**
324
- * Type of schema validation error.
325
- */
326
- export type ValidationErrorType = 'missing_fk_target' | 'circular_dependency' | 'orphan_column' | 'duplicate_index' | 'invalid_type';
327
- /**
328
- * Schema validation error.
329
- */
330
- export interface ValidationError {
331
- readonly type: ValidationErrorType;
332
- readonly message: string;
333
- readonly table?: TableNode;
334
- readonly column?: ColumnNode;
335
- readonly relationship?: RelationshipNode;
336
- readonly tables?: TableNode[];
337
- }
338
282
  /**
339
283
  * Severity level for schema drift issues.
340
284
  */
@@ -1,9 +1,6 @@
1
- /**
2
- * Schema AST Types
3
- *
4
- * A unified graph representation of database schema with relationships as first-class citizens.
5
- * Enables reliable diffing, smart relation detection, and dialect-agnostic schema operations.
6
- */
1
+ // A database schema as a graph, whichever side it came from: the entities or the database itself.
2
+ /** Actions for foreign key ON DELETE and ON UPDATE clauses. */
3
+ export const FOREIGN_KEY_ACTIONS = ['CASCADE', 'SET NULL', 'SET DEFAULT', 'RESTRICT', 'NO ACTION'];
7
4
  /**
8
5
  * Default action for foreign key ON DELETE and ON UPDATE clauses.
9
6
  */
@@ -1,13 +1,6 @@
1
1
  import { AbstractSqlQuerier } from '../querier/index.js';
2
2
  import type { RawRow } from '../type/index.js';
3
- /**
4
- * Values every SQLite driver accepts as a bound parameter.
5
- *
6
- * @remarks No `boolean`: SQLite has no boolean storage class, and both `better-sqlite3` ("SQLite3 can
7
- * only bind numbers, strings, bigints, buffers, and null") and `node:sqlite` reject one outright. The
8
- * dialect already binds booleans as integers (`booleanLiteral: 'integer'`), so nothing reaches a
9
- * driver as one; leaving `boolean` here only invited a runtime throw that is now a compile error.
10
- */
3
+ /** What every SQLite driver binds. No `boolean`, which the drivers refuse and the dialect writes as an integer. */
11
4
  export type SqliteBindValue = null | string | number | bigint | Uint8Array;
12
5
  /** What a statement came back with on a SQLite driver: the rows it read, and how many rows it changed. */
13
6
  export type SqliteExecution = {
@@ -27,13 +27,7 @@ export type LocalSqliteDatabase = {
27
27
  export declare function adaptSqlite<S extends Omit<SqlitePreparedStatement, 'reader'>>(db: Omit<LocalSqliteDatabase, 'prepare'> & {
28
28
  prepare(sql: string): S;
29
29
  }, reads: (stmt: S) => boolean): LocalSqliteDatabase;
30
- /**
31
- * Pool for a SQLite database opened in this process, whichever driver provides it. SQLite gives one
32
- * connection per file, so the shared-handle lifecycle is {@link AbstractSharedHandleQuerierPool}'s.
33
- *
34
- * Subclasses supply only {@link createDb}: configuring the connection on the way up - the pragmas,
35
- * then the extensions - is the same for `better-sqlite3`, `bun:sqlite` and `node:sqlite`.
36
- */
30
+ /** A pool for a SQLite file opened in this process, configured the same way whichever driver's {@link createDb} opens it. */
37
31
  export declare abstract class AbstractLocalSqliteQuerierPool<O extends LocalSqlitePoolOptions> extends AbstractSharedHandleQuerierPool<LocalSqliteDatabase, SqliteQuerier, SqliteDialect> {
38
32
  readonly opts?: O | undefined;
39
33
  constructor(opts?: O | undefined, extra?: ExtraOptions);
@@ -22,13 +22,7 @@ export function adaptSqlite(db, reads) {
22
22
  close: () => db.close(),
23
23
  };
24
24
  }
25
- /**
26
- * Pool for a SQLite database opened in this process, whichever driver provides it. SQLite gives one
27
- * connection per file, so the shared-handle lifecycle is {@link AbstractSharedHandleQuerierPool}'s.
28
- *
29
- * Subclasses supply only {@link createDb}: configuring the connection on the way up - the pragmas,
30
- * then the extensions - is the same for `better-sqlite3`, `bun:sqlite` and `node:sqlite`.
31
- */
25
+ /** A pool for a SQLite file opened in this process, configured the same way whichever driver's {@link createDb} opens it. */
32
26
  export class AbstractLocalSqliteQuerierPool extends AbstractSharedHandleQuerierPool {
33
27
  opts;
34
28
  constructor(opts, extra) {
@@ -12,13 +12,8 @@ export type NodeSqlitePoolOptions = LocalSqlitePoolOptions & {
12
12
  readonly timeout?: number;
13
13
  };
14
14
  /**
15
- * Pool backed by Node's built-in `node:sqlite`, so SQLite works with **no dependency at all** rather
16
- * than requiring the `better-sqlite3` native build. Use {@link Sqlite3QuerierPool} instead when you
17
- * want `better-sqlite3`, or are on Bun.
18
- *
19
- * @remarks `node:sqlite` needs no CLI flag from Node 22.13, and is still a release candidate
20
- * (stability 1.2) as of Node 26, so `better-sqlite3` via {@link Sqlite3QuerierPool} remains the
21
- * faster option for read-heavy work.
15
+ * A pool over Node's built-in `node:sqlite`, needing no dependency at all. {@link Sqlite3QuerierPool} is the
16
+ * faster choice for read-heavy work, and the one on Bun.
22
17
  */
23
18
  export declare class NodeSqliteQuerierPool extends AbstractLocalSqliteQuerierPool<NodeSqlitePoolOptions> {
24
19
  readonly filename: string;
@@ -1,12 +1,7 @@
1
1
  import { AbstractLocalSqliteQuerierPool, adaptSqlite, } from './localSqliteQuerierPool.js';
2
2
  /**
3
- * Pool backed by Node's built-in `node:sqlite`, so SQLite works with **no dependency at all** rather
4
- * than requiring the `better-sqlite3` native build. Use {@link Sqlite3QuerierPool} instead when you
5
- * want `better-sqlite3`, or are on Bun.
6
- *
7
- * @remarks `node:sqlite` needs no CLI flag from Node 22.13, and is still a release candidate
8
- * (stability 1.2) as of Node 26, so `better-sqlite3` via {@link Sqlite3QuerierPool} remains the
9
- * faster option for read-heavy work.
3
+ * A pool over Node's built-in `node:sqlite`, needing no dependency at all. {@link Sqlite3QuerierPool} is the
4
+ * faster choice for read-heavy work, and the one on Bun.
10
5
  */
11
6
  export class NodeSqliteQuerierPool extends AbstractLocalSqliteQuerierPool {
12
7
  filename;
@@ -1,20 +1,18 @@
1
1
  import { AbstractSqlDialect, type DerivedRelation, type HydrateKind, type RelationRows } from '../dialect/abstractSqlDialect.js';
2
- import type { DialectFeatures, EntityMeta, FieldOptions, QueryContext, QueryPager, QuerySizeComparisonOps, QueryTextSearchOptions, Type, VectorDistance, VectorMetric } from '../type/index.js';
2
+ import type { EntityMeta, FieldOptions, QueryContext, QueryPager, QuerySizeComparisonOps, QueryTextSearchOptions, SqlDialectFeatures, Type, VectorDistance, VectorMetric } from '../type/index.js';
3
+ /** What SQLite and the engines derived from it have. */
4
+ export declare const SQLITE_FEATURES: SqlDialectFeatures;
3
5
  export declare class SqliteDialect extends AbstractSqlDialect {
4
- /** Default {@link DialectFeatures} for SQLite and SQLite-derived dialects. */
5
- protected readonly featureDefaults: DialectFeatures;
6
+ readonly features: SqlDialectFeatures;
6
7
  readonly dialectName = "sqlite";
7
8
  readonly escapeIdChar = "`";
8
9
  readonly autoIncrementSuffix = "PRIMARY KEY AUTOINCREMENT";
9
- readonly serialDeclaresPrimaryKey = true;
10
10
  readonly tableOptions = "";
11
11
  readonly beginTransactionCommand = "BEGIN TRANSACTION";
12
12
  readonly commitTransactionCommand = "COMMIT";
13
13
  readonly rollbackTransactionCommand = "ROLLBACK";
14
14
  readonly isolationLevelStrategy = "none";
15
15
  readonly alterColumnSyntax = "none";
16
- /** SQLite locks the whole database, not rows, so `$lock` has nothing to map onto. */
17
- readonly supportsRowLocks = false;
18
16
  readonly booleanLiteral = "integer";
19
17
  /** SQLite's own cap on a function call before 3.48, which libSQL and `bun:sqlite`'s build still have. */
20
18
  readonly maxFunctionArgs: number;
@@ -60,13 +58,6 @@ export declare class SqliteDialect extends AbstractSqlDialect {
60
58
  * FTS5 virtual table (UQL does not create those; declare it outside your entities).
61
59
  */
62
60
  protected appendTextSearch<E>(ctx: QueryContext, entity: Type<E>, meta: EntityMeta<E>, search: QueryTextSearchOptions<E>): void;
63
- /**
64
- * SQLite compares an exploded element as whole JSON text, so containment cannot express "this
65
- * element includes these keys" - `$elemMatch` always expands to per-field conditions.
66
- */
67
- protected readonly jsonContainmentIsPartial = false;
68
- /** `JSON_EACH` exposes a JSON boolean as `0`/`1` and a number as a number - already comparable. */
69
- protected readonly jsonScalarElemKeepsType = true;
70
61
  /**
71
62
  * Each element is read back as JSON text through `->` at its own `fullkey`, so it compares
72
63
  * correctly whatever its type. `JSON_EACH`'s `value` column would not: it unquotes strings (`a`
@@ -87,13 +78,7 @@ export declare class SqliteDialect extends AbstractSqlDialect {
87
78
  */
88
79
  protected jsonPullKey(ctx: QueryContext, expr: string, escapedCol: string, key: string, value: unknown): string;
89
80
  protected jsonSet(ctx: QueryContext, expr: string, set: Record<string, unknown>, field?: FieldOptions): string;
90
- /**
91
- * `[#]` appends, creating the array when the key is absent.
92
- *
93
- * @remarks `JSON_SET` rather than `JSON_INSERT`: the two are equivalent here because `[#]` always
94
- * resolves past the end of the array, and Turso's engine implements `JSON_INSERT` as create-only,
95
- * so it silently drops the element when the array already exists.
96
- */
81
+ /** `[#]` appends, creating the array where it is absent: `JSON_SET`, since Turso's `JSON_INSERT` will not touch an existing array. */
97
82
  protected jsonPush(ctx: QueryContext, expr: string, push: Record<string, unknown>): string;
98
83
  protected jsonUnset(_ctx: QueryContext, expr: string, unset: readonly string[]): string;
99
84
  }
@@ -4,37 +4,44 @@ import { BYTES_PREFIX } from '../dialect/hydrateColumn.js';
4
4
  import { chainedCall, groupsPerCall, jsonAssignCall, jsonElemExists, jsonPath, jsonRemoveCall, jsonSetTarget, } from '../dialect/jsonSql.js';
5
5
  import { textSearchFields } from '../util/dialect.util.js';
6
6
  import { columnFamily, isIntegerColumn } from '../util/field.util.js';
7
+ /** What SQLite and the engines derived from it have. */
8
+ export const SQLITE_FEATURES = {
9
+ ifNotExists: true,
10
+ indexIfNotExists: true,
11
+ schemas: false, // SQLite's namespaces are attached database files, not declared objects
12
+ dropTableCascade: false,
13
+ foreignKeyAlter: false, // SQLite does not support adding FKs to existing tables
14
+ primaryKeyAlter: false, // nor changing a key: the only route is rebuilding the table
15
+ generatedColumnAdd: false, // accepted in a CREATE TABLE, rejected in an ALTER
16
+ commentSyntax: 'none',
17
+ vectorIndexRequiresNotNull: false,
18
+ vectorSupportsLength: false,
19
+ supportsTimestamptz: false,
20
+ stringSizing: 'text',
21
+ supportsUnsigned: false,
22
+ serverSideCursors: false,
23
+ rowLocks: false,
24
+ rowLockWithWindow: true,
25
+ rowLockOf: true,
26
+ orderedUpsertReturning: true,
27
+ orderedJsonAggregates: true,
28
+ partialJsonContainment: false,
29
+ typedJsonElements: true,
30
+ narrowVectorTypes: false,
31
+ vectorTuningNeedsTransaction: false,
32
+ serialDeclaresPrimaryKey: true,
33
+ };
7
34
  export class SqliteDialect extends AbstractSqlDialect {
8
- /** Default {@link DialectFeatures} for SQLite and SQLite-derived dialects. */
9
- featureDefaults = {
10
- ifNotExists: true,
11
- indexIfNotExists: true,
12
- schemas: false, // SQLite's namespaces are attached database files, not declared objects
13
- dropTableCascade: false,
14
- foreignKeyAlter: false, // SQLite does not support adding FKs to existing tables
15
- primaryKeyAlter: false, // nor changing a key: the only route is rebuilding the table
16
- generatedColumnAdd: false, // accepted in a CREATE TABLE, rejected in an ALTER
17
- commentSyntax: 'none',
18
- vectorIndexRequiresNotNull: false,
19
- vectorSupportsLength: false,
20
- supportsTimestamptz: false,
21
- stringSizing: 'text',
22
- supportsUnsigned: false,
23
- serverSideCursors: false,
24
- };
35
+ features = SQLITE_FEATURES;
25
36
  dialectName = 'sqlite';
26
37
  escapeIdChar = '`';
27
38
  autoIncrementSuffix = 'PRIMARY KEY AUTOINCREMENT';
28
- // `AUTOINCREMENT` is only legal in that exact phrase, so the key cannot be lifted to table level.
29
- serialDeclaresPrimaryKey = true;
30
39
  tableOptions = '';
31
40
  beginTransactionCommand = 'BEGIN TRANSACTION';
32
41
  commitTransactionCommand = 'COMMIT';
33
42
  rollbackTransactionCommand = 'ROLLBACK';
34
43
  isolationLevelStrategy = 'none';
35
44
  alterColumnSyntax = 'none';
36
- /** SQLite locks the whole database, not rows, so `$lock` has nothing to map onto. */
37
- supportsRowLocks = false;
38
45
  booleanLiteral = 'integer';
39
46
  /** SQLite's own cap on a function call before 3.48, which libSQL and `bun:sqlite`'s build still have. */
40
47
  maxFunctionArgs = 127;
@@ -119,13 +126,6 @@ export class SqliteDialect extends AbstractSqlDialect {
119
126
  ctx.append(`${this.escapedTableName(meta)} MATCH {${columns.join(' ')}} : `);
120
127
  ctx.addValue(search.$value);
121
128
  }
122
- /**
123
- * SQLite compares an exploded element as whole JSON text, so containment cannot express "this
124
- * element includes these keys" - `$elemMatch` always expands to per-field conditions.
125
- */
126
- jsonContainmentIsPartial = false;
127
- /** `JSON_EACH` exposes a JSON boolean as `0`/`1` and a number as a number - already comparable. */
128
- jsonScalarElemKeepsType = true;
129
129
  /**
130
130
  * Each element is read back as JSON text through `->` at its own `fullkey`, so it compares
131
131
  * correctly whatever its type. `JSON_EACH`'s `value` column would not: it unquotes strings (`a`
@@ -173,13 +173,7 @@ export class SqliteDialect extends AbstractSqlDialect {
173
173
  jsonSet(ctx, expr, set, field) {
174
174
  return jsonAssignCall((value) => this.jsonScalarParam(ctx, value), 'JSON_SET', jsonSetTarget(expr, field, `'{}'`), set, this.maxFunctionArgs);
175
175
  }
176
- /**
177
- * `[#]` appends, creating the array when the key is absent.
178
- *
179
- * @remarks `JSON_SET` rather than `JSON_INSERT`: the two are equivalent here because `[#]` always
180
- * resolves past the end of the array, and Turso's engine implements `JSON_INSERT` as create-only,
181
- * so it silently drops the element when the array already exists.
182
- */
176
+ /** `[#]` appends, creating the array where it is absent: `JSON_SET`, since Turso's `JSON_INSERT` will not touch an existing array. */
183
177
  jsonPush(ctx, expr, push) {
184
178
  return jsonAssignCall((value) => this.jsonScalarParam(ctx, value), 'JSON_SET', expr, push, this.maxFunctionArgs, '[#]');
185
179
  }
@@ -1,12 +1,10 @@
1
1
  import { LibsqlDialect } from '../libsql/libsqlDialect.js';
2
+ import type { SqlDialectFeatures } from '../type/index.js';
2
3
  /**
3
- * SQLite Dialect specialization for Turso Cloud: what every Turso Cloud database accepts, since one runs
4
- * libSQL unless it was created as `tursodb`, which runs the Rust engine. libSQL's vector functions and
5
- * argument cap hold on both, and so does the Rust engine's missing `ORDER BY` inside an aggregate.
6
- *
7
- * @remarks Imports nothing vendor-specific, so no entry point can pull a driver in through it.
4
+ * Turso Cloud, as every database there accepts: libSQL's vector functions and argument cap, and no
5
+ * `ORDER BY` inside an aggregate, which its Rust engine lacks. Imports no driver.
8
6
  */
9
7
  export declare class TursoDialect extends LibsqlDialect {
10
8
  /** The Rust engine takes no `ORDER BY` inside an aggregate. */
11
- protected readonly orderedAggregates = false;
9
+ readonly features: SqlDialectFeatures;
12
10
  }
@@ -1,12 +1,10 @@
1
1
  import { LibsqlDialect } from '../libsql/libsqlDialect.js';
2
+ import { SQLITE_FEATURES } from '../sqlite/sqliteDialect.js';
2
3
  /**
3
- * SQLite Dialect specialization for Turso Cloud: what every Turso Cloud database accepts, since one runs
4
- * libSQL unless it was created as `tursodb`, which runs the Rust engine. libSQL's vector functions and
5
- * argument cap hold on both, and so does the Rust engine's missing `ORDER BY` inside an aggregate.
6
- *
7
- * @remarks Imports nothing vendor-specific, so no entry point can pull a driver in through it.
4
+ * Turso Cloud, as every database there accepts: libSQL's vector functions and argument cap, and no
5
+ * `ORDER BY` inside an aggregate, which its Rust engine lacks. Imports no driver.
8
6
  */
9
7
  export class TursoDialect extends LibsqlDialect {
10
8
  /** The Rust engine takes no `ORDER BY` inside an aggregate. */
11
- orderedAggregates = false;
9
+ features = { ...SQLITE_FEATURES, orderedJsonAggregates: false };
12
10
  }
@@ -5,13 +5,7 @@ import type { ExtraOptions } from '../type/index.js';
5
5
  import { TursoLocalDialect } from './tursoLocalDialect.js';
6
6
  /** The engine's own options: `readonly`, `timeout`, `encryption`, `experimental` and the rest. */
7
7
  export type TursoLocalOptions = NonNullable<Parameters<typeof connect>[1]>;
8
- /**
9
- * Pool for the embedded Turso engine (`@tursodatabase/database`), the Rust rewrite of SQLite.
10
- *
11
- * @remarks Kept on the `uql-orm/turso/local` entry point rather than `uql-orm/turso`, because this
12
- * package ships native binaries that do not resolve on edge runtimes. Separating them guarantees a
13
- * bundle targeting Workers never reaches the native import.
14
- */
8
+ /** A pool for the embedded Turso engine, on `uql-orm/turso/local` so its native binaries stay out of edge bundles. */
15
9
  export declare class TursoLocalQuerierPool extends AbstractSharedHandleQuerierPool<SqliteDatabase, SqliteQuerier, TursoLocalDialect> {
16
10
  readonly filename: string;
17
11
  readonly opts?: TursoLocalOptions | undefined;
@@ -3,13 +3,7 @@ import { AbstractSharedHandleQuerierPool } from '../querier/abstractSharedHandle
3
3
  import { applySqlitePragmas } from '../sqlite/sqlitePragmas.js';
4
4
  import { SqliteQuerier } from '../sqlite/sqliteQuerier.js';
5
5
  import { TursoLocalDialect } from './tursoLocalDialect.js';
6
- /**
7
- * Pool for the embedded Turso engine (`@tursodatabase/database`), the Rust rewrite of SQLite.
8
- *
9
- * @remarks Kept on the `uql-orm/turso/local` entry point rather than `uql-orm/turso`, because this
10
- * package ships native binaries that do not resolve on edge runtimes. Separating them guarantees a
11
- * bundle targeting Workers never reaches the native import.
12
- */
6
+ /** A pool for the embedded Turso engine, on `uql-orm/turso/local` so its native binaries stay out of edge bundles. */
13
7
  export class TursoLocalQuerierPool extends AbstractSharedHandleQuerierPool {
14
8
  filename;
15
9
  opts;
@@ -6,12 +6,8 @@ import { TursoSessionQuerier } from './tursoSessionQuerier.js';
6
6
  /** Connection settings for Turso Cloud: `@tursodatabase/serverless`'s own, `requestHeaders` included. */
7
7
  export type TursoConfig = Config;
8
8
  /**
9
- * Pool for Turso Cloud, over `@tursodatabase/serverless`, which speaks HTTP through `fetch()`.
10
- *
11
- * @remarks Every querier opens a session of its own, one server stream, so queriers never wait on each
12
- * other and a transaction spans one stream. The driver is imported on first use, so a pool built at
13
- * module scope in a Worker loads nothing until a request needs it. A client built with
14
- * `@libsql/client/web` goes to `LibsqlQuerierPool` instead.
9
+ * A pool for Turso Cloud over `@tursodatabase/serverless`: a stream per querier, the driver imported on first
10
+ * use. A `@libsql/client/web` client goes to `LibsqlQuerierPool` instead.
15
11
  */
16
12
  export declare class TursoQuerierPool extends AbstractSqlQuerierPool<TursoSessionQuerier, TursoDialect> {
17
13
  private readonly conf;
@@ -3,12 +3,8 @@ import { AbstractSqlQuerierPool } from '../querier/index.js';
3
3
  import { TursoDialect } from './tursoDialect.js';
4
4
  import { TursoSessionQuerier } from './tursoSessionQuerier.js';
5
5
  /**
6
- * Pool for Turso Cloud, over `@tursodatabase/serverless`, which speaks HTTP through `fetch()`.
7
- *
8
- * @remarks Every querier opens a session of its own, one server stream, so queriers never wait on each
9
- * other and a transaction spans one stream. The driver is imported on first use, so a pool built at
10
- * module scope in a Worker loads nothing until a request needs it. A client built with
11
- * `@libsql/client/web` goes to `LibsqlQuerierPool` instead.
6
+ * A pool for Turso Cloud over `@tursodatabase/serverless`: a stream per querier, the driver imported on first
7
+ * use. A `@libsql/client/web` client goes to `LibsqlQuerierPool` instead.
12
8
  */
13
9
  export class TursoQuerierPool extends AbstractSqlQuerierPool {
14
10
  conf;
@@ -36,13 +36,7 @@ export type TursoSession = {
36
36
  }>;
37
37
  close(): Promise<void>;
38
38
  };
39
- /**
40
- * Querier for Turso Cloud on a session of its own.
41
- *
42
- * @remarks The stream is what makes a transaction plain `BEGIN`/`COMMIT`, left to the base class, and
43
- * what `release` closes. A row comes back an array carrying its column names as hidden properties, so it
44
- * is rebuilt as the object every querier answers.
45
- */
39
+ /** A Turso Cloud querier on a stream of its own, which holds its transaction and which `release` closes. */
46
40
  export declare class TursoSessionQuerier extends AbstractSqliteQuerier {
47
41
  readonly session: TursoSession;
48
42
  readonly extra?: ExtraOptions | undefined;
@@ -1,11 +1,5 @@
1
1
  import { AbstractSqliteQuerier } from '../sqlite/abstractSqliteQuerier.js';
2
- /**
3
- * Querier for Turso Cloud on a session of its own.
4
- *
5
- * @remarks The stream is what makes a transaction plain `BEGIN`/`COMMIT`, left to the base class, and
6
- * what `release` closes. A row comes back an array carrying its column names as hidden properties, so it
7
- * is rebuilt as the object every querier answers.
8
- */
2
+ /** A Turso Cloud querier on a stream of its own, which holds its transaction and which `release` closes. */
9
3
  export class TursoSessionQuerier extends AbstractSqliteQuerier {
10
4
  session;
11
5
  extra;