qubu 0.4.0 → 0.4.2

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 (103) hide show
  1. package/dist/{canonical-BbnqavJm.mjs → canonical-BXUguqfo.mjs} +23 -23
  2. package/dist/codegen.d.mts +25 -33
  3. package/dist/codegen.mjs +38 -45
  4. package/dist/column-hqKr7-1I.mjs +620 -0
  5. package/dist/{complete-D5Djh-zo.mjs → complete-WYyVozgK.mjs} +50 -50
  6. package/dist/{complete-types-BavBtv8J.d.mts → complete-types-IjEn5VPN.d.mts} +56 -56
  7. package/dist/core.d.mts +2 -2
  8. package/dist/core.mjs +4 -4
  9. package/dist/ddl.d.mts +12 -12
  10. package/dist/ddl.mjs +13 -14
  11. package/dist/{dialect-b2-Z6uBF.mjs → dialect-wUKrnPMB.mjs} +2 -2
  12. package/dist/diff.d.mts +1 -1
  13. package/dist/diff.mjs +6 -7
  14. package/dist/{index-DH0qV6aS.d.mts → index-1DpA3mUh.d.mts} +20 -20
  15. package/dist/{index-D3ZOwPT-.d.mts → index-CPvfEheG.d.mts} +13 -15
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.mjs +94 -95
  18. package/dist/introspection.d.mts +8 -8
  19. package/dist/introspection.mjs +29 -30
  20. package/dist/{json-CUZlv4HT.mjs → json-Db7XRD91.mjs} +2 -2
  21. package/dist/migration.d.mts +20 -21
  22. package/dist/migration.mjs +5 -6
  23. package/dist/{mysql-CKEKGnj4.mjs → mysql-B_cYzzX2.mjs} +237 -7
  24. package/dist/mysql.d.mts +2 -2
  25. package/dist/mysql.mjs +3 -3
  26. package/dist/{on-conflict-4MOBl51J.mjs → on-conflict-hfPW0KmQ.mjs} +3 -4
  27. package/dist/postgres.d.mts +5 -5
  28. package/dist/postgres.mjs +6 -6
  29. package/dist/{registry-CXV8u7Pt.mjs → registry-BRMLYwDp.mjs} +26 -29
  30. package/dist/{relational-DuQ9IHSb.mjs → relational-BZ3WDPzC.mjs} +2 -2
  31. package/dist/schema.d.mts +1 -1
  32. package/dist/schema.mjs +5 -6
  33. package/dist/{snapshot-DJpfmxhQ.mjs → snapshot-C-W65HEd.mjs} +5 -5
  34. package/dist/snapshot.d.mts +3 -3
  35. package/dist/snapshot.mjs +5 -7
  36. package/dist/{source-DGO3DRgg.mjs → source-BcS2AsIg.mjs} +6 -8
  37. package/dist/{serialize-CFtYYAdk.mjs → sqlite-Cg0nwYEH.mjs} +326 -12
  38. package/dist/sqlite.d.mts +1 -1
  39. package/dist/sqlite.mjs +2 -2
  40. package/dist/{standard-BTVYKh_F.mjs → standard-DfcZEVOj.mjs} +1 -1
  41. package/dist/{table-D6rcs8SB.mjs → table-Bp5irMSj.mjs} +2 -3
  42. package/dist/{types-Deo_q43Y.d.mts → types-BK1COGZe.d.mts} +1113 -1128
  43. package/dist/{types-g-vVvj1B.mjs → types-JM3FcAnX.mjs} +7 -8
  44. package/dist/{types-CSNJTYaM.d.mts → types-JSZHpUEj.d.mts} +83 -84
  45. package/dist/{value-b6OFZXVS.mjs → value-Bi71Agyf.mjs} +1 -1
  46. package/dist/vite/ambient.d.ts +309 -340
  47. package/dist/vite.d.mts +5 -6
  48. package/dist/vite.mjs +3 -4
  49. package/docs/dialects-and-execution.md +45 -55
  50. package/docs/getting-started.md +4 -4
  51. package/docs/guides/better-auth.md +57 -0
  52. package/docs/guides/compose-queries.md +24 -67
  53. package/docs/guides/drizzle.md +23 -23
  54. package/docs/guides/extensions/dialects.md +4 -4
  55. package/docs/guides/extensions/sources-and-clauses.md +15 -15
  56. package/docs/guides/extensions/typed-expressions.md +13 -17
  57. package/docs/guides/extensions/unsafe-syntax.md +3 -3
  58. package/docs/guides/json.md +7 -7
  59. package/docs/guides/mutations.md +14 -21
  60. package/docs/guides/select/conditions.md +6 -8
  61. package/docs/guides/select/grouping-and-windows.md +4 -15
  62. package/docs/guides/select/ordering-and-pagination.md +6 -19
  63. package/docs/guides/select/overview.md +12 -26
  64. package/docs/guides/sql-templates.md +20 -24
  65. package/docs/guides/vite-plugin.md +9 -13
  66. package/docs/index.md +5 -7
  67. package/docs/query-model/fragments.md +4 -15
  68. package/docs/query-model/result-shapes.md +11 -14
  69. package/docs/query-model/source-scope.md +31 -49
  70. package/docs/reference/mysql-snapshot.md +2 -5
  71. package/docs/reference/postgres-snapshot.md +3 -3
  72. package/docs/reference/sqlite-snapshot.md +2 -5
  73. package/docs/reference/supported-surface.md +26 -26
  74. package/docs/schema/catalog-model.md +2 -5
  75. package/docs/schema/code-generation.md +18 -18
  76. package/docs/schema/columns-and-writes.md +17 -25
  77. package/docs/schema/constraints-and-indexes.md +36 -52
  78. package/docs/schema/ddl-emission.md +6 -6
  79. package/docs/schema/diff.md +5 -5
  80. package/docs/schema/introspection.md +7 -7
  81. package/docs/schema/migration-plans.md +9 -9
  82. package/docs/schema/snapshots.md +3 -3
  83. package/docs/schema/storage-and-schema-sql.md +11 -11
  84. package/docs/schema/tables-and-names.md +11 -14
  85. package/docs/sql-semantic-types.md +10 -10
  86. package/docs/troubleshooting.md +10 -10
  87. package/package.json +21 -33
  88. package/skills/qubu/agents/openai.yaml +3 -3
  89. package/dist/column-D-8OqGuV.mjs +0 -328
  90. package/dist/column-LV7oGQde.mjs +0 -296
  91. package/dist/drizzle-mysql.d.mts +0 -24
  92. package/dist/drizzle-mysql.mjs +0 -72
  93. package/dist/drizzle-postgres.d.mts +0 -24
  94. package/dist/drizzle-postgres.mjs +0 -73
  95. package/dist/drizzle-sqlite.d.mts +0 -57
  96. package/dist/drizzle-sqlite.mjs +0 -108
  97. package/dist/drizzle.d.mts +0 -13
  98. package/dist/drizzle.mjs +0 -2
  99. package/dist/errors-BGCoLe_r.mjs +0 -14
  100. package/dist/postgres-BK2APkKP.mjs +0 -236
  101. package/dist/runtime-Cn_Xgzta.mjs +0 -193
  102. package/dist/sqlite-CrsK0Fza.mjs +0 -320
  103. package/dist/types-DZsueVoI.d.mts +0 -45
package/dist/postgres.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { n as postgresJson, o as createDialect } from "./json-CUZlv4HT.mjs";
2
- import { S as withDialectCapability } from "./column-D-8OqGuV.mjs";
3
- import { t as comparison } from "./relational-DuQ9IHSb.mjs";
1
+ import { n as postgresJson, o as createDialect } from "./json-Db7XRD91.mjs";
2
+ import { G as withDialectCapability } from "./column-hqKr7-1I.mjs";
3
+ import { t as comparison } from "./relational-BZ3WDPzC.mjs";
4
4
  import { n as postgresExplain } from "./explain-CkIK13L_.mjs";
5
- import { i as onConflict, n as doUpdate, r as excluded, t as doNothing } from "./on-conflict-4MOBl51J.mjs";
5
+ import { i as onConflict, n as doUpdate, r as excluded, t as doNothing } from "./on-conflict-hfPW0KmQ.mjs";
6
6
  //#region src/dialects/postgres.ts
7
7
  const postgresRowLockModeSql = {
8
8
  update: "UPDATE",
@@ -25,8 +25,8 @@ const postgresPagination = { render(context, parts) {
25
25
  });
26
26
  } };
27
27
  /**
28
- * PostgreSQL's only core rendering difference is positional parameters.
29
- * PostgreSQL-specific expressions and clauses should remain separate modules.
28
+ * PostgreSQL's only core rendering difference is positional parameters. PostgreSQL-specific
29
+ * expressions and clauses should remain separate modules.
30
30
  */
31
31
  function postgresDialect() {
32
32
  return createDialect({
@@ -1,11 +1,11 @@
1
- import { t as standardDialect } from "./standard-BTVYKh_F.mjs";
2
- import { _ as isSchemaExpression, c as dialectMismatchDiagnostic, h as snakeCaseIdentifier, l as freezeSchemaMetadata, r as isColumnReference, x as markSchemaExpression, y as makeSchemaExpression } from "./column-D-8OqGuV.mjs";
3
- import { n as isValueExpression } from "./value-b6OFZXVS.mjs";
1
+ import { t as standardDialect } from "./standard-DfcZEVOj.mjs";
2
+ import { B as isSchemaExpression, H as makeSchemaExpression, M as freezeSchemaMetadata, R as snakeCaseIdentifier, W as markSchemaExpression, j as dialectMismatchDiagnostic, r as isColumnReference } from "./column-hqKr7-1I.mjs";
3
+ import { n as isValueExpression } from "./value-Bi71Agyf.mjs";
4
4
  //#region src/schema/indexes.ts
5
5
  /**
6
- * Validate portable and dialect-owned index facts for one target adapter.
7
- * Unsupported features are reported as data so a serializer can aggregate
8
- * diagnostics instead of failing during traversal with an opaque exception.
6
+ * Validate portable and dialect-owned index facts for one target adapter. Unsupported features are
7
+ * reported as data so a serializer can aggregate diagnostics instead of failing during traversal
8
+ * with an opaque exception.
9
9
  */
10
10
  function validateIndexDialect(indexMetadata, dialect, path = ["index"]) {
11
11
  const diagnostics = [];
@@ -64,8 +64,8 @@ var SchemaExpressionError = class extends TypeError {
64
64
  }
65
65
  };
66
66
  /**
67
- * Normalize only line endings. Whitespace, quoting, and every other byte of
68
- * a raw schema expression remain under the extension author's control.
67
+ * Normalize only line endings. Whitespace, quoting, and every other byte of a raw schema expression
68
+ * remain under the extension author's control.
69
69
  */
70
70
  function normalizeSchemaSql(sql) {
71
71
  return sql.replace(/\r\n?/g, "\n");
@@ -74,8 +74,8 @@ function schemaExpression(expression) {
74
74
  return markSchemaExpression(expression);
75
75
  }
76
76
  /**
77
- * Define an extension with the restricted schema context. This is the typed
78
- * alternative to {@link unsafeSchemaSql} for deterministic custom syntax.
77
+ * Define an extension with the restricted schema context. This is the typed alternative to
78
+ * {@link unsafeSchemaSql} for deterministic custom syntax.
79
79
  */
80
80
  function defineSchemaExpression(kind, render) {
81
81
  return makeSchemaExpression(kind, (context) => render(context));
@@ -180,9 +180,9 @@ function renderSchemaLiteral(dialect, value, mode) {
180
180
  //#endregion
181
181
  //#region src/schema/constraints.ts
182
182
  /**
183
- * Validate one constraint against a schema adapter dialect. This is kept
184
- * separate from construction because the same declaration can be inspected
185
- * for more than one target dialect before a serializer is selected.
183
+ * Validate one constraint against a schema adapter dialect. This is kept separate from construction
184
+ * because the same declaration can be inspected for more than one target dialect before a
185
+ * serializer is selected.
186
186
  */
187
187
  function validateConstraintDialect(constraint, dialect, path = ["constraint"]) {
188
188
  const diagnostics = [];
@@ -263,13 +263,12 @@ function foreignKey(columns, target, options) {
263
263
  * Reconstruct a foreign key proved by database catalog metadata.
264
264
  *
265
265
  * @remarks
266
- * Use this helper for generated or introspection-owned declarations when one
267
- * or both native SQL domains are unresolved. It accepts unresolved domains,
268
- * but still rejects known domain mismatches, unequal tuple arity, and local
269
- * columns from different sources. The enclosing `table()` declaration
270
- * continues to verify target-column ownership and candidate-key metadata.
271
- * Resolved targets also receive runtime shape, ownership, and arity checks.
272
- * The returned value serializes as an ordinary foreign-key constraint.
266
+ * Use this helper for generated or introspection-owned declarations when one or both native SQL
267
+ * domains are unresolved. It accepts unresolved domains, but still rejects known domain
268
+ * mismatches, unequal tuple arity, and local columns from different sources. The enclosing
269
+ * `table()` declaration continues to verify target-column ownership and candidate-key metadata.
270
+ * Resolved targets also receive runtime shape, ownership, and arity checks. The returned value
271
+ * serializes as an ordinary foreign-key constraint.
273
272
  */
274
273
  function catalogForeignKey(columns, target, options) {
275
274
  assertCatalogForeignKeyColumns(columns, "local");
@@ -280,15 +279,13 @@ function check(expression, options) {
280
279
  return freezeConstraint("check", void 0, options, expression);
281
280
  }
282
281
  /**
283
- * Reconstruct a boolean check from opaque SQL recovered from a database
284
- * catalog.
282
+ * Reconstruct a boolean check from opaque SQL recovered from a database catalog.
285
283
  *
286
284
  * @remarks
287
- * This helper records catalog origin as a narrow type-level proof. It
288
- * gives the opaque expression the {@link SqlBoolean} semantic type without
289
- * changing the ordinary {@link check} contract. Qubu does not parse or infer
290
- * dependencies from the SQL. It preserves the text apart from normalizing
291
- * line endings and retains the dialect tag in serialized schema metadata.
285
+ * This helper records catalog origin as a narrow type-level proof. It gives the opaque expression
286
+ * the {@link SqlBoolean} semantic type without changing the ordinary {@link check} contract. Qubu
287
+ * does not parse or infer dependencies from the SQL. It preserves the text apart from normalizing
288
+ * line endings and retains the dialect tag in serialized schema metadata.
292
289
  */
293
290
  function catalogCheck(input, options) {
294
291
  assertCatalogCheckSql(input);
@@ -342,8 +339,8 @@ const schemaNamingPolicyVersion = 1;
342
339
  /**
343
340
  * The built-in naming policy for schema-generated physical names.
344
341
  *
345
- * Explicit names supplied to `table()` remain unchanged. The policy is used
346
- * by tooling when it needs a physical name for a logical table ID.
342
+ * Explicit names supplied to `table()` remain unchanged. The policy is used by tooling when it
343
+ * needs a physical name for a logical table ID.
347
344
  */
348
345
  const defaultSchemaNamingPolicy = Object.freeze({
349
346
  version: 1,
@@ -1,6 +1,6 @@
1
1
  import { n as queryValidationError } from "./errors-Dxv73YJu.mjs";
2
- import { P as resultValue, y as makeSchemaExpression } from "./column-D-8OqGuV.mjs";
3
- import { n as isValueExpression, t as asValue } from "./value-b6OFZXVS.mjs";
2
+ import { H as makeSchemaExpression, rt as resultValue } from "./column-hqKr7-1I.mjs";
3
+ import { n as isValueExpression, t as asValue } from "./value-Bi71Agyf.mjs";
4
4
  //#region src/expressions/operators/shared.ts
5
5
  function isNullOperand(value) {
6
6
  return value === null || isValueExpression(value) && value.value === null;
package/dist/schema.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $c as SchemaObjectNameOptions, $o as ForeignKeyTargetInput, $r as unsafeSchemaSql, $s as PortableStorageType, $t as PostgresIndexExtension, Ac as ExternalGeneratedColumnDescriptor, As as ColumnInsertInput, At as SourceSqlTypeMap, Bc as SchemaLiteralValue, Bo as CatalogCheckExpression, Br as SchemaExpressionError, Bs as ColumnStorageDialectOf, Bt as TableDefinitions, Cc as ColumnBehaviorErrorCode, Cs as ColumnDefaultOf, Ct as SourceColumns, Dc as ExpressionDefaultDescriptor, Ds as ColumnGeneratedOf, Dt as SourceKind, Ec as DefaultDescriptor, Es as ColumnFromOptions, Et as SourceIdentity, Fc as IdentityDialectExtension, Fs as ColumnOutput, Ft as exposeColumns, Gc as generatedColumn, Go as ConstraintOptions, Gr as SchemaRenderOptions, Gs as ColumnUpdateInput, Gt as TableRow, Hc as canonicalLiteral, Ho as CheckConstraint, Hr as SchemaExpressionInput, Hs as ColumnStorageOf, Ht as TableInsertInput, Ic as IdentityGeneration, Ir as SchemaDialect, Is as ColumnSqlType, It as sourceIdentity, Jc as SchemaDialectExtension, Jo as FieldLikeOptions, Jr as isUnsafeSchemaSql, Js as NativeStorage, Jt as table, Kc as identityColumn, Ko as ConstraintTiming, Kr as UnsafeSchemaSqlExpression, Ks as DialectNativeStorage, Kt as TableSqlTypes, Lc as LiteralDefaultDescriptor, Lr as SchemaDialectHooks, Ls as ColumnStorage, Lt as AnyTable, Mc as GeneratedColumnMode, Ms as ColumnIsNullable, Mt as UnknownSourceSqlTypes, Nc as GeneratedDescriptor, Ns as ColumnOnUpdateOf, Nt as createSource, Oc as ExpressionGeneratedColumnDescriptor, Os as ColumnHasDefault, Ot as SourceProvision, Pc as IdentityDescriptor, Ps as ColumnOptions, Pt as customSource, Qc as SchemaObjectIdentity, Qo as ForeignKeyTarget, Qr as schemaExpression, Qs as PortableStorageDescriptor, Qt as MysqlIndexExtension, Rc as MysqlIdentityExtension, Rr as createSchemaDialect, Rs as ColumnStorageDeclarationOf, Rt as Table, Sc as ColumnBehaviorError, Ss as DeclaredColumnNullability, St as Source, Tc as ColumnDefaultInput, Ts as ColumnDefinitionConfig, Tt as SourceConstraints, Uc as externalDefault, Uo as CheckConstraintOptions, Ur as SchemaExpressionMode, Us as ColumnStorageType, Ut as TableMetadataCallback, Vc as SqliteIdentityExtension, Vo as CatalogCheckSql, Vr as SchemaExpressionErrorCode, Vs as ColumnStorageKindOf, Vt as TableIdentity, Wc as externalGeneratedColumn, Wo as ConstraintDialectExtension, Wr as SchemaRenderContext, Ws as ColumnStorageTypeOf, Wt as TableOptions, Xc as SchemaMetadataDiagnostic, Xo as ForeignKeyMatch, Xr as renderSchemaExpression, Xs as PortableColumnStorage, Xt as IndexOptions, Yc as SchemaDialectName, Yo as ForeignKeyConstraint, Yr as normalizeSchemaSql, Ys as NativeStorageDescriptor, Yt as IndexDialectExtension, Zc as SchemaMetadataValidationError, Zo as ForeignKeyOptions, Zr as renderSchemaSql, Zs as PortableStorage, Zt as IndexTerm, _c as portableStorage, _i as QueryAliasIdentity, _s as primaryKey, _t as AnySource, ac as bigint, ai as SchemaTableNames, al as materializeSchemaObjectIdentity, an as validateIndexDialect, as as SourceConstraint, bc as uuid, bi as lateral, bs as uniqueConstraint, bt as ProvidedSourceIdentity, cc as column, ci as SchemaValidationError, cs as SqliteConstraintExtension, dc as integer, di as schema, ds as UniqueConstraintOptions, ec as StorageDeclarationOf, ei as Schema, el as assertSchemaDialectSupport, en as SourceIndex, es as KeyConstraint, fc as json, fi as schemaNamingPolicyVersion, fs as UniqueNullSemantics, gc as numeric, gi as LateralSource, gs as foreignKey, hc as nullable, hi as LateralIdentity, hs as check, ic as StorageTypeOf, ii as SchemaTableEntry, il as isValidSchemaObjectName, in as index, is as ReferentialAction, jc as GeneratedColumnDescriptor, js as ColumnIsGenerated, jt as SourceSqlTypes, kc as ExternalDefaultDescriptor, ks as ColumnIdentityOf, kt as SourceRow, lc as columnResultValue, li as defaultSchemaNamingPolicy, ls as TableLike, mc as nativeStorage, mi as AliasedSource, ms as catalogForeignKey, nc as StorageDialectOf, ni as SchemaNamingPolicy, nl as freezeSchemaMetadata, nn as SqliteIndexExtension, ns as MysqlConstraintExtension, oc as binary, oi as SchemaTableRecord, ol as materializeSchemaObjectRecord, os as SourceConstraintsRecord, pc as nativeColumn, pi as AliasIdentity, ps as catalogCheck, qc as resolveColumnBehavior, qo as FieldLike, qr as defineSchemaExpression, qs as NativeColumnStorage, qt as TableUpdateInput, rc as StorageOf, ri as SchemaOptions, rl as generatedSchemaObjectName, rn as TableIndex, rs as PostgresConstraintExtension, sc as boolean, si as SchemaTableRegistry, ss as SourceLike, tc as StorageDescriptor, ti as SchemaDiagnostic, tl as dialectMismatchDiagnostic, tn as SourceIndexesRecord, ts as KeyConstraintOptions, uc as date, ui as generatedTableName, us as UniqueConstraint, vc as text, vi as QuerySource, vs as references, vt as CustomSource, wc as ColumnDefault, ws as ColumnDefinition, wt as SourceConfig, xc as CanonicalLiteral, xs as validateConstraintDialect, xt as ProvidedSourceRow, yc as timestamp, yi as alias, ys as unique, yt as CustomSourceOptions, zc as ResolvedColumnBehavior, zo as AnyKeyColumn, zr as RenderedSchemaExpression, zs as ColumnStorageDescriptor, zt as TableColumns } from "./types-Deo_q43Y.mjs";
1
+ import { $i as SourceIndexesRecord, $o as ColumnStorageOf, $r as generatedTableName, $s as canonicalLiteral, Ai as catalogCheck, Ar as SchemaExpressionErrorCode, As as timestamp, At as SourceSqlTypeMap, Bi as AliasedSource, Bo as ColumnIdentityOf, Br as renderSchemaSql, Bs as ExternalDefaultDescriptor, Bt as TableDefinitions, Ci as SourceConstraintsRecord, Cs as json, Ct as SourceColumns, Di as UniqueConstraint, Dr as createSchemaDialect, Ds as numeric, Dt as SourceKind, Ei as TableLike, Er as SchemaDialectHooks, Es as nullable, Et as SourceIdentity, Fi as references, Fo as ColumnDefinition, Fr as UnsafeSchemaSqlExpression, Fs as ColumnDefault, Ft as exposeColumns, Gi as alias, Go as ColumnOptions, Gr as SchemaNamingPolicy, Gs as IdentityDescriptor, Gt as TableRow, Hi as LateralSource, Ho as ColumnIsGenerated, Hr as unsafeSchemaSql, Hs as GeneratedColumnDescriptor, Ht as TableInsertInput, Ii as unique, Io as ColumnDefinitionConfig, Ir as defineSchemaExpression, Is as ColumnDefaultInput, It as sourceIdentity, Ji as IndexOptions, Jo as ColumnStorage, Jr as SchemaTableNames, Js as LiteralDefaultDescriptor, Jt as table, Ki as lateral, Ko as ColumnOutput, Kr as SchemaOptions, Ks as IdentityDialectExtension, Kt as TableSqlTypes, Li as uniqueConstraint, Lo as ColumnFromOptions, Lr as isUnsafeSchemaSql, Ls as DefaultDescriptor, Lt as AnyTable, Mi as check, Mr as SchemaExpressionMode, Ms as CanonicalLiteral, Mt as UnknownSourceSqlTypes, Ni as foreignKey, Nr as SchemaRenderContext, Ns as ColumnBehaviorError, Nt as createSource, Oi as UniqueConstraintOptions, Or as RenderedSchemaExpression, Os as portableStorage, Ot as SourceProvision, Pi as primaryKey, Po as ColumnDefaultOf, Pr as SchemaRenderOptions, Ps as ColumnBehaviorErrorCode, Pt as customSource, Qi as SourceIndex, Qo as ColumnStorageKindOf, Qr as defaultSchemaNamingPolicy, Qs as SqliteIdentityExtension, Ri as validateConstraintDialect, Ro as ColumnGeneratedOf, Rr as normalizeSchemaSql, Rs as ExpressionDefaultDescriptor, Rt as Table, Si as SourceConstraint, Ss as integer, St as Source, Ti as SqliteConstraintExtension, Tr as SchemaDialect, Ts as nativeStorage, Tt as SourceConstraints, Ui as QueryAliasIdentity, Uo as ColumnIsNullable, Ur as Schema, Us as GeneratedColumnMode, Ut as TableMetadataCallback, Vi as LateralIdentity, Vo as ColumnInsertInput, Vr as schemaExpression, Vs as ExternalGeneratedColumnDescriptor, Vt as TableIdentity, Wi as QuerySource, Wo as ColumnOnUpdateOf, Wr as SchemaDiagnostic, Ws as GeneratedDescriptor, Wt as TableOptions, Xi as MysqlIndexExtension, Xo as ColumnStorageDescriptor, Xr as SchemaTableRegistry, Xs as ResolvedColumnBehavior, Yi as IndexTerm, Yo as ColumnStorageDeclarationOf, Yr as SchemaTableRecord, Ys as MysqlIdentityExtension, Zi as PostgresIndexExtension, Zo as ColumnStorageDialectOf, Zr as SchemaValidationError, Zs as SchemaLiteralValue, _c as materializeSchemaObjectRecord, _i as KeyConstraint, _s as binary, _t as AnySource, ac as SchemaDialectExtension, ai as CheckConstraint, as as NativeStorage, bi as PostgresConstraintExtension, bs as columnResultValue, bt as ProvidedSourceIdentity, cc as SchemaMetadataValidationError, ci as ConstraintOptions, cs as PortableStorage, dc as assertSchemaDialectSupport, di as FieldLikeOptions, ds as StorageDeclarationOf, ea as SqliteIndexExtension, ec as externalDefault, ei as schema, es as ColumnStorageType, fc as dialectMismatchDiagnostic, fi as ForeignKeyConstraint, fs as StorageDescriptor, gc as materializeSchemaObjectIdentity, gi as ForeignKeyTargetInput, gs as bigint, hc as isValidSchemaObjectName, hi as ForeignKeyTarget, hs as StorageTypeOf, ia as DeclaredColumnNullability, ic as resolveColumnBehavior, ii as CatalogCheckSql, is as NativeColumnStorage, ji as catalogForeignKey, jr as SchemaExpressionInput, js as uuid, jt as SourceSqlTypes, ki as UniqueNullSemantics, kr as SchemaExpressionError, ks as text, kt as SourceRow, lc as SchemaObjectIdentity, li as ConstraintTiming, ls as PortableStorageDescriptor, mc as generatedSchemaObjectName, mi as ForeignKeyOptions, ms as StorageOf, na as index, nc as generatedColumn, ni as AnyKeyColumn, ns as ColumnUpdateInput, oc as SchemaDialectName, oi as CheckConstraintOptions, os as NativeStorageDescriptor, pc as freezeSchemaMetadata, pi as ForeignKeyMatch, ps as StorageDialectOf, qi as IndexDialectExtension, qo as ColumnSqlType, qr as SchemaTableEntry, qs as IdentityGeneration, qt as TableUpdateInput, ra as validateIndexDialect, rc as identityColumn, ri as CatalogCheckExpression, rs as DialectNativeStorage, sc as SchemaMetadataDiagnostic, si as ConstraintDialectExtension, ss as PortableColumnStorage, ta as TableIndex, tc as externalGeneratedColumn, ti as schemaNamingPolicyVersion, ts as ColumnStorageTypeOf, uc as SchemaObjectNameOptions, ui as FieldLike, us as PortableStorageType, vi as KeyConstraintOptions, vs as boolean, vt as CustomSource, wi as SourceLike, ws as nativeColumn, wt as SourceConfig, xi as ReferentialAction, xs as date, xt as ProvidedSourceRow, yi as MysqlConstraintExtension, ys as column, yt as CustomSourceOptions, zi as AliasIdentity, zo as ColumnHasDefault, zr as renderSchemaExpression, zs as ExpressionGeneratedColumnDescriptor, zt as TableColumns } from "./types-BK1COGZe.mjs";
2
2
  export { AliasIdentity, AliasedSource, AnyKeyColumn, AnySource, AnyTable, CanonicalLiteral, CatalogCheckExpression, CatalogCheckSql, CheckConstraint, CheckConstraintOptions, ColumnBehaviorError, ColumnBehaviorErrorCode, ColumnDefault, ColumnDefaultInput, ColumnDefaultOf, ColumnDefinition, ColumnDefinitionConfig, ColumnFromOptions, ColumnGeneratedOf, ColumnHasDefault, ColumnIdentityOf, ColumnInsertInput, ColumnIsGenerated, ColumnIsNullable, ColumnOnUpdateOf, ColumnOptions, ColumnOutput, ColumnSqlType, ColumnStorage, ColumnStorageDeclarationOf, ColumnStorageDescriptor, ColumnStorageDialectOf, ColumnStorageKindOf, ColumnStorageOf, ColumnStorageType, ColumnStorageTypeOf, ColumnUpdateInput, ConstraintDialectExtension, ConstraintOptions, ConstraintTiming, CustomSource, CustomSourceOptions, type DeclaredColumnNullability, DefaultDescriptor, DialectNativeStorage, ExpressionDefaultDescriptor, ExpressionGeneratedColumnDescriptor, ExternalDefaultDescriptor, ExternalGeneratedColumnDescriptor, FieldLike, FieldLikeOptions, ForeignKeyConstraint, ForeignKeyMatch, ForeignKeyOptions, ForeignKeyTarget, ForeignKeyTargetInput, GeneratedColumnDescriptor, GeneratedColumnMode, GeneratedDescriptor, IdentityDescriptor, IdentityDialectExtension, IdentityGeneration, IndexDialectExtension, IndexOptions, IndexTerm, KeyConstraint, KeyConstraintOptions, LateralIdentity, LateralSource, LiteralDefaultDescriptor, MysqlConstraintExtension, MysqlIdentityExtension, MysqlIndexExtension, NativeColumnStorage, NativeStorage, NativeStorageDescriptor, PortableColumnStorage, PortableStorage, PortableStorageDescriptor, PortableStorageType, PostgresConstraintExtension, PostgresIndexExtension, ProvidedSourceIdentity, ProvidedSourceRow, QueryAliasIdentity, QuerySource, ReferentialAction, RenderedSchemaExpression, ResolvedColumnBehavior, Schema, SchemaDiagnostic, SchemaDialect, SchemaDialectExtension, SchemaDialectHooks, SchemaDialectName, SchemaExpressionError, SchemaExpressionErrorCode, SchemaExpressionInput, SchemaExpressionMode, SchemaLiteralValue, SchemaMetadataDiagnostic, SchemaMetadataValidationError, SchemaNamingPolicy, SchemaObjectIdentity, SchemaObjectNameOptions, SchemaOptions, SchemaRenderContext, SchemaRenderOptions, SchemaTableEntry, SchemaTableNames, SchemaTableRecord, SchemaTableRegistry, SchemaValidationError, Source, SourceColumns, SourceConfig, SourceConstraint, SourceConstraints, SourceConstraintsRecord, SourceIdentity, SourceIndex, SourceIndexesRecord, SourceKind, SourceLike, SourceProvision, SourceRow, SourceSqlTypeMap, SourceSqlTypes, SqliteConstraintExtension, SqliteIdentityExtension, SqliteIndexExtension, StorageDeclarationOf, StorageDescriptor, StorageDialectOf, StorageOf, StorageTypeOf, Table, TableColumns, TableDefinitions, TableIdentity, TableIndex, TableInsertInput, TableLike, TableMetadataCallback, TableOptions, TableRow, TableSqlTypes, TableUpdateInput, UniqueConstraint, UniqueConstraintOptions, UniqueNullSemantics, UnknownSourceSqlTypes, UnsafeSchemaSqlExpression, alias, assertSchemaDialectSupport, bigint, binary, boolean, canonicalLiteral, catalogCheck, catalogForeignKey, check, column, columnResultValue, createSchemaDialect, createSource, customSource, date, defaultSchemaNamingPolicy, defineSchemaExpression, dialectMismatchDiagnostic, exposeColumns, externalDefault, externalGeneratedColumn, foreignKey, freezeSchemaMetadata, generatedColumn, generatedSchemaObjectName, generatedTableName, identityColumn, index, integer, isUnsafeSchemaSql, isValidSchemaObjectName, json, lateral, materializeSchemaObjectIdentity, materializeSchemaObjectRecord, nativeColumn, nativeStorage, normalizeSchemaSql, nullable, numeric, portableStorage, primaryKey, references, renderSchemaExpression, renderSchemaSql, resolveColumnBehavior, schema, schemaExpression, schemaNamingPolicyVersion, sourceIdentity, table, text, timestamp, unique, uniqueConstraint, unsafeSchemaSql, uuid, validateConstraintDialect, validateIndexDialect };
package/dist/schema.mjs CHANGED
@@ -1,7 +1,6 @@
1
- import { c as dialectMismatchDiagnostic, d as isValidSchemaObjectName, f as materializeSchemaObjectIdentity, l as freezeSchemaMetadata, o as SchemaMetadataValidationError, p as materializeSchemaObjectRecord, s as assertSchemaDialectSupport, u as generatedSchemaObjectName } from "./column-D-8OqGuV.mjs";
2
- import { C as resolveColumnBehavior, S as identityColumn, _ as ColumnBehaviorError, a as columnResultValue, b as externalGeneratedColumn, c as json, d as nullable, f as numeric, g as uuid, h as timestamp, i as column, l as nativeColumn, m as text, n as binary, o as date, p as portableStorage, r as boolean, s as integer, t as bigint, u as nativeStorage, v as canonicalLiteral, x as generatedColumn, y as externalDefault } from "./column-LV7oGQde.mjs";
3
- import { i as sourceIdentity, n as customSource, r as exposeColumns, t as createSource } from "./source-DGO3DRgg.mjs";
4
- import { n as alias, r as lateral, t as table } from "./table-D6rcs8SB.mjs";
5
- import { C as index, S as unsafeSchemaSql, _ as isUnsafeSchemaSql, a as schemaNamingPolicyVersion, b as renderSchemaSql, c as check, d as references, f as unique, g as defineSchemaExpression, h as SchemaExpressionError, i as schema, l as foreignKey, m as validateConstraintDialect, n as defaultSchemaNamingPolicy, o as catalogCheck, p as uniqueConstraint, r as generatedTableName, s as catalogForeignKey, t as SchemaValidationError, u as primaryKey, v as normalizeSchemaSql, w as validateIndexDialect, x as schemaExpression, y as renderSchemaExpression } from "./registry-CXV8u7Pt.mjs";
6
- import { t as createSchemaDialect } from "./dialect-b2-Z6uBF.mjs";
1
+ import { A as assertSchemaDialectSupport, C as canonicalLiteral, D as identityColumn, E as generatedColumn, F as materializeSchemaObjectIdentity, I as materializeSchemaObjectRecord, M as freezeSchemaMetadata, N as generatedSchemaObjectName, O as resolveColumnBehavior, P as isValidSchemaObjectName, S as ColumnBehaviorError, T as externalGeneratedColumn, _ as numeric, b as timestamp, c as boolean, d as date, f as integer, g as nullable, h as nativeStorage, j as dialectMismatchDiagnostic, k as SchemaMetadataValidationError, l as column, m as nativeColumn, o as bigint, p as json, s as binary, u as columnResultValue, v as portableStorage, w as externalDefault, x as uuid, y as text } from "./column-hqKr7-1I.mjs";
2
+ import { i as sourceIdentity, n as customSource, r as exposeColumns, t as createSource } from "./source-BcS2AsIg.mjs";
3
+ import { n as alias, r as lateral, t as table } from "./table-Bp5irMSj.mjs";
4
+ import { C as index, S as unsafeSchemaSql, _ as isUnsafeSchemaSql, a as schemaNamingPolicyVersion, b as renderSchemaSql, c as check, d as references, f as unique, g as defineSchemaExpression, h as SchemaExpressionError, i as schema, l as foreignKey, m as validateConstraintDialect, n as defaultSchemaNamingPolicy, o as catalogCheck, p as uniqueConstraint, r as generatedTableName, s as catalogForeignKey, t as SchemaValidationError, u as primaryKey, v as normalizeSchemaSql, w as validateIndexDialect, x as schemaExpression, y as renderSchemaExpression } from "./registry-BRMLYwDp.mjs";
5
+ import { t as createSchemaDialect } from "./dialect-wUKrnPMB.mjs";
7
6
  export { ColumnBehaviorError, SchemaExpressionError, SchemaMetadataValidationError, SchemaValidationError, alias, assertSchemaDialectSupport, bigint, binary, boolean, canonicalLiteral, catalogCheck, catalogForeignKey, check, column, columnResultValue, createSchemaDialect, createSource, customSource, date, defaultSchemaNamingPolicy, defineSchemaExpression, dialectMismatchDiagnostic, exposeColumns, externalDefault, externalGeneratedColumn, foreignKey, freezeSchemaMetadata, generatedColumn, generatedSchemaObjectName, generatedTableName, identityColumn, index, integer, isUnsafeSchemaSql, isValidSchemaObjectName, json, lateral, materializeSchemaObjectIdentity, materializeSchemaObjectRecord, nativeColumn, nativeStorage, normalizeSchemaSql, nullable, numeric, portableStorage, primaryKey, references, renderSchemaExpression, renderSchemaSql, resolveColumnBehavior, schema, schemaExpression, schemaNamingPolicyVersion, sourceIdentity, table, text, timestamp, unique, uniqueConstraint, unsafeSchemaSql, uuid, validateConstraintDialect, validateIndexDialect };
@@ -1,9 +1,9 @@
1
- import { s as assertSchemaSnapshot } from "./canonical-BbnqavJm.mjs";
2
- import { a as sqliteStorageAffinity } from "./sqlite-CrsK0Fza.mjs";
1
+ import { s as assertSchemaSnapshot } from "./canonical-BXUguqfo.mjs";
2
+ import { a as sqliteStorageAffinity } from "./sqlite-Cg0nwYEH.mjs";
3
3
  //#region src/introspection/diagnostics.ts
4
4
  /**
5
- * Create one immutable diagnostic without interpreting catalog text or
6
- * copying driver error details into the structured fields.
5
+ * Create one immutable diagnostic without interpreting catalog text or copying driver error details
6
+ * into the structured fields.
7
7
  */
8
8
  function createIntrospectionDiagnostic(diagnostic) {
9
9
  return freezeDiagnostic(diagnostic);
@@ -330,7 +330,7 @@ function mapLiteral(value) {
330
330
  };
331
331
  }
332
332
  function mapExtension(value) {
333
- if (!value) return void 0;
333
+ if (!value) return;
334
334
  return {
335
335
  dialect: value.dialect,
336
336
  version: value.version,
@@ -1,4 +1,4 @@
1
- import { A as SnapshotStorage, C as SnapshotIndexTerm, D as SnapshotLiteral, E as SnapshotKeyConstraint, F as neutralSnapshotDialect, I as schemaSnapshotDialectVersion, Ir as SchemaDialect, L as schemaSnapshotFormat, Lr as SchemaDialectHooks, M as SnapshotTable, N as SnapshotUniqueConstraint, O as SnapshotNamingPolicy, P as SnapshotValidationContext, R as schemaSnapshotNamingPolicyVersion, Rr as createSchemaDialect, S as SnapshotIndex, T as SnapshotJsonValue, Xs as PortableColumnStorage, _ as SnapshotExpressionContext, a as SnapshotBigInt, b as SnapshotGeneratedColumn, c as SnapshotConstraint, d as SnapshotDefault, f as SnapshotDiagnostic, g as SnapshotExpression, h as SnapshotDialectExtension, i as SchemaSnapshotInput, j as SnapshotStorageContext, k as SnapshotSpecialNumber, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, o as SnapshotCheckConstraint, p as SnapshotDiagnosticCode, qs as NativeColumnStorage, r as SchemaSnapshotAdapter, s as SnapshotColumn, t as AnySchema, u as SnapshotDecodeResult, v as SnapshotExtensionContext, w as SnapshotIndexTermExpression, x as SnapshotIdentity, y as SnapshotForeignKey, z as schemaSnapshotVersion } from "./types-Deo_q43Y.mjs";
2
- import { A as CompleteSnapshotProvenance, B as SchemaSnapshotV2Input, C as CompleteSnapshotObjectMetadata, D as CompleteSnapshotPartition, E as CompleteSnapshotOwnership, F as CompleteSnapshotTrigger, G as schemaSnapshotVersion2, H as completeSchemaSnapshotVersion, I as CompleteSnapshotValueFact, L as CompleteSnapshotView, M as CompleteSnapshotRoutineParameter, N as CompleteSnapshotSequence, O as CompleteSnapshotPhysicalReference, P as CompleteSnapshotTable, R as SchemaSnapshotV2, S as CompleteSnapshotObjectKind, T as CompleteSnapshotOpaqueObject, U as schemaSnapshotCompleteVersion, V as completeSchemaSnapshotFormat, W as schemaSnapshotV2Version, _ as CompleteSnapshotIndex, a as CompleteSnapshotCollation, b as CompleteSnapshotNamespace, c as CompleteSnapshotConstraint, d as CompleteSnapshotDeferredObject, f as CompleteSnapshotDomain, g as CompleteSnapshotIdentity, h as CompleteSnapshotForeignKey, i as CompleteSnapshotCheckConstraint, j as CompleteSnapshotRoutine, k as CompleteSnapshotPolicy, l as CompleteSnapshotCreateResult, m as CompleteSnapshotExtension, n as CompleteSchemaSnapshotInput, o as CompleteSnapshotColumn, p as CompleteSnapshotEnum, r as CompleteSnapshotCapabilities, s as CompleteSnapshotComment, t as CompleteSchemaSnapshot, u as CompleteSnapshotDecodeResult, v as CompleteSnapshotIndexTerm, w as CompleteSnapshotObjectReference, x as CompleteSnapshotObject, y as CompleteSnapshotKeyConstraint, z as SchemaSnapshotV2DecodeResult } from "./complete-types-BavBtv8J.mjs";
3
- import { A as assertSchemaSnapshot, B as decodeCompleteSchemaSnapshot, C as createSchemaSnapshot, D as serializeSchema, E as encodeSnapshot, F as assertCompleteSnapshot, G as encodeCompleteSnapshot, H as decodeSchemaSnapshotV2, I as assertSchemaSnapshotV2, J as SnapshotCanonicalError, K as encodeSchemaSnapshotV2, L as canonicalizeCompleteSchemaSnapshot, M as decodeSchemaSnapshot, N as CompleteSnapshotValidationError, O as tryCreateSchemaSnapshot, P as assertCompleteSchemaSnapshot, Q as toSnapshotJsonValue, R as canonicalizeSchemaSnapshotV2, S as SnapshotSerializationError, T as encodeSchemaSnapshot, U as digestCompleteSchemaSnapshot, V as decodeCompleteSnapshot, W as encodeCompleteSchemaSnapshot, X as encodeCanonicalSnapshot, Y as canonicalJson, Z as schemaSnapshotDigest, _ as postgresSchemaDialect, a as mysqlSnapshotDialect, b as tryCreatePostgresSchemaSnapshot, c as SqliteStorageAffinity, d as sqliteSnapshotAdapter, f as sqliteSnapshotDialect, g as createPostgresSchemaSnapshot, h as PostgresSnapshotOptions, i as mysqlSnapshotAdapter, j as canonicalizeSchemaSnapshot, k as SnapshotValidationError, l as createSqliteSchemaSnapshot, m as tryCreateSqliteSchemaSnapshot, n as createMysqlSchemaSnapshot, o as tryCreateMysqlSchemaSnapshot, p as sqliteStorageAffinity, q as schemaSnapshotV2Digest, r as mysqlSchemaDialect, s as SqliteSnapshotOptions, t as MysqlSnapshotOptions, u as sqliteSchemaDialect, v as postgresSnapshotAdapter, w as digestSchemaSnapshot, x as SchemaSnapshotOptions, y as postgresSnapshotDialect, z as completeSchemaSnapshotDigest } from "./index-DH0qV6aS.mjs";
1
+ import { A as SnapshotStorage, C as SnapshotIndexTerm, D as SnapshotLiteral, Dr as createSchemaDialect, E as SnapshotKeyConstraint, Er as SchemaDialectHooks, F as neutralSnapshotDialect, I as schemaSnapshotDialectVersion, L as schemaSnapshotFormat, M as SnapshotTable, N as SnapshotUniqueConstraint, O as SnapshotNamingPolicy, P as SnapshotValidationContext, R as schemaSnapshotNamingPolicyVersion, S as SnapshotIndex, T as SnapshotJsonValue, Tr as SchemaDialect, _ as SnapshotExpressionContext, a as SnapshotBigInt, b as SnapshotGeneratedColumn, c as SnapshotConstraint, d as SnapshotDefault, f as SnapshotDiagnostic, g as SnapshotExpression, h as SnapshotDialectExtension, i as SchemaSnapshotInput, is as NativeColumnStorage, j as SnapshotStorageContext, k as SnapshotSpecialNumber, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, o as SnapshotCheckConstraint, p as SnapshotDiagnosticCode, r as SchemaSnapshotAdapter, s as SnapshotColumn, ss as PortableColumnStorage, t as AnySchema, u as SnapshotDecodeResult, v as SnapshotExtensionContext, w as SnapshotIndexTermExpression, x as SnapshotIdentity, y as SnapshotForeignKey, z as schemaSnapshotVersion } from "./types-BK1COGZe.mjs";
2
+ import { A as CompleteSnapshotProvenance, B as SchemaSnapshotV2Input, C as CompleteSnapshotObjectMetadata, D as CompleteSnapshotPartition, E as CompleteSnapshotOwnership, F as CompleteSnapshotTrigger, G as schemaSnapshotVersion2, H as completeSchemaSnapshotVersion, I as CompleteSnapshotValueFact, L as CompleteSnapshotView, M as CompleteSnapshotRoutineParameter, N as CompleteSnapshotSequence, O as CompleteSnapshotPhysicalReference, P as CompleteSnapshotTable, R as SchemaSnapshotV2, S as CompleteSnapshotObjectKind, T as CompleteSnapshotOpaqueObject, U as schemaSnapshotCompleteVersion, V as completeSchemaSnapshotFormat, W as schemaSnapshotV2Version, _ as CompleteSnapshotIndex, a as CompleteSnapshotCollation, b as CompleteSnapshotNamespace, c as CompleteSnapshotConstraint, d as CompleteSnapshotDeferredObject, f as CompleteSnapshotDomain, g as CompleteSnapshotIdentity, h as CompleteSnapshotForeignKey, i as CompleteSnapshotCheckConstraint, j as CompleteSnapshotRoutine, k as CompleteSnapshotPolicy, l as CompleteSnapshotCreateResult, m as CompleteSnapshotExtension, n as CompleteSchemaSnapshotInput, o as CompleteSnapshotColumn, p as CompleteSnapshotEnum, r as CompleteSnapshotCapabilities, s as CompleteSnapshotComment, t as CompleteSchemaSnapshot, u as CompleteSnapshotDecodeResult, v as CompleteSnapshotIndexTerm, w as CompleteSnapshotObjectReference, x as CompleteSnapshotObject, y as CompleteSnapshotKeyConstraint, z as SchemaSnapshotV2DecodeResult } from "./complete-types-IjEn5VPN.mjs";
3
+ import { A as assertSchemaSnapshot, B as decodeCompleteSchemaSnapshot, C as createSchemaSnapshot, D as serializeSchema, E as encodeSnapshot, F as assertCompleteSnapshot, G as encodeCompleteSnapshot, H as decodeSchemaSnapshotV2, I as assertSchemaSnapshotV2, J as SnapshotCanonicalError, K as encodeSchemaSnapshotV2, L as canonicalizeCompleteSchemaSnapshot, M as decodeSchemaSnapshot, N as CompleteSnapshotValidationError, O as tryCreateSchemaSnapshot, P as assertCompleteSchemaSnapshot, Q as toSnapshotJsonValue, R as canonicalizeSchemaSnapshotV2, S as SnapshotSerializationError, T as encodeSchemaSnapshot, U as digestCompleteSchemaSnapshot, V as decodeCompleteSnapshot, W as encodeCompleteSchemaSnapshot, X as encodeCanonicalSnapshot, Y as canonicalJson, Z as schemaSnapshotDigest, _ as postgresSchemaDialect, a as mysqlSnapshotDialect, b as tryCreatePostgresSchemaSnapshot, c as SqliteStorageAffinity, d as sqliteSnapshotAdapter, f as sqliteSnapshotDialect, g as createPostgresSchemaSnapshot, h as PostgresSnapshotOptions, i as mysqlSnapshotAdapter, j as canonicalizeSchemaSnapshot, k as SnapshotValidationError, l as createSqliteSchemaSnapshot, m as tryCreateSqliteSchemaSnapshot, n as createMysqlSchemaSnapshot, o as tryCreateMysqlSchemaSnapshot, p as sqliteStorageAffinity, q as schemaSnapshotV2Digest, r as mysqlSchemaDialect, s as SqliteSnapshotOptions, t as MysqlSnapshotOptions, u as sqliteSchemaDialect, v as postgresSnapshotAdapter, w as digestSchemaSnapshot, x as SchemaSnapshotOptions, y as postgresSnapshotDialect, z as completeSchemaSnapshotDigest } from "./index-1DpA3mUh.mjs";
4
4
  export { AnySchema, CompleteSchemaSnapshot, CompleteSchemaSnapshotInput, CompleteSnapshotCapabilities, CompleteSnapshotCheckConstraint, CompleteSnapshotCollation, CompleteSnapshotColumn, CompleteSnapshotComment, CompleteSnapshotConstraint, CompleteSnapshotCreateResult, CompleteSnapshotDecodeResult, CompleteSnapshotDeferredObject, CompleteSnapshotDomain, CompleteSnapshotEnum, CompleteSnapshotExtension, CompleteSnapshotForeignKey, CompleteSnapshotIdentity, CompleteSnapshotIndex, CompleteSnapshotIndexTerm, CompleteSnapshotKeyConstraint, CompleteSnapshotNamespace, CompleteSnapshotObject, CompleteSnapshotObjectKind, CompleteSnapshotObjectMetadata, CompleteSnapshotObjectReference, CompleteSnapshotOpaqueObject, CompleteSnapshotOwnership, CompleteSnapshotPartition, CompleteSnapshotPhysicalReference, CompleteSnapshotPolicy, CompleteSnapshotProvenance, CompleteSnapshotRoutine, CompleteSnapshotRoutineParameter, CompleteSnapshotSequence, CompleteSnapshotTable, CompleteSnapshotTrigger, CompleteSnapshotValidationError, CompleteSnapshotValueFact, CompleteSnapshotView, MysqlSnapshotOptions, type NativeColumnStorage, type PortableColumnStorage, PostgresSnapshotOptions, type SchemaDialect, type SchemaDialectHooks, SchemaSnapshot, SchemaSnapshotAdapter, SchemaSnapshotInput, SchemaSnapshotOptions, SchemaSnapshotV2, SchemaSnapshotV2DecodeResult, SchemaSnapshotV2Input, SnapshotBigInt, SnapshotCanonicalError, SnapshotCheckConstraint, SnapshotColumn, SnapshotConstraint, SnapshotCreateResult, SnapshotDecodeResult, SnapshotDefault, SnapshotDiagnostic, SnapshotDiagnosticCode, SnapshotDialect, SnapshotDialectExtension, SnapshotExpression, SnapshotExpressionContext, SnapshotExtensionContext, SnapshotForeignKey, SnapshotGeneratedColumn, SnapshotIdentity, SnapshotIndex, SnapshotIndexTerm, SnapshotIndexTermExpression, SnapshotJsonValue, SnapshotKeyConstraint, SnapshotLiteral, SnapshotNamingPolicy, SnapshotSerializationError, SnapshotSpecialNumber, SnapshotStorage, SnapshotStorageContext, SnapshotTable, SnapshotUniqueConstraint, SnapshotValidationContext, SnapshotValidationError, SqliteSnapshotOptions, SqliteStorageAffinity, assertCompleteSchemaSnapshot, assertCompleteSnapshot, assertSchemaSnapshot, assertSchemaSnapshotV2, canonicalJson, canonicalizeCompleteSchemaSnapshot, canonicalizeSchemaSnapshot, canonicalizeSchemaSnapshotV2, completeSchemaSnapshotDigest, completeSchemaSnapshotFormat, completeSchemaSnapshotVersion, createMysqlSchemaSnapshot, createPostgresSchemaSnapshot, createSchemaDialect, createSchemaSnapshot, createSqliteSchemaSnapshot, decodeCompleteSchemaSnapshot, decodeCompleteSnapshot, decodeSchemaSnapshot, decodeSchemaSnapshotV2, digestCompleteSchemaSnapshot, digestSchemaSnapshot, encodeCanonicalSnapshot, encodeCompleteSchemaSnapshot, encodeCompleteSnapshot, encodeSchemaSnapshot, encodeSchemaSnapshotV2, encodeSnapshot, mysqlSchemaDialect, mysqlSnapshotAdapter, mysqlSnapshotDialect, neutralSnapshotDialect, postgresSchemaDialect, postgresSnapshotAdapter, postgresSnapshotDialect, schemaSnapshotCompleteVersion, schemaSnapshotDialectVersion, schemaSnapshotDigest, schemaSnapshotFormat, schemaSnapshotNamingPolicyVersion, schemaSnapshotV2Digest, schemaSnapshotV2Version, schemaSnapshotVersion, schemaSnapshotVersion2, serializeSchema, sqliteSchemaDialect, sqliteSnapshotAdapter, sqliteSnapshotDialect, sqliteStorageAffinity, toSnapshotJsonValue, tryCreateMysqlSchemaSnapshot, tryCreatePostgresSchemaSnapshot, tryCreateSchemaSnapshot, tryCreateSqliteSchemaSnapshot };
package/dist/snapshot.mjs CHANGED
@@ -1,8 +1,6 @@
1
- import { t as createSchemaDialect } from "./dialect-b2-Z6uBF.mjs";
2
- import { a as toSnapshotJsonValue, c as canonicalizeSchemaSnapshot, d as schemaSnapshotDialectVersion, f as schemaSnapshotFormat, i as schemaSnapshotDigest, l as decodeSchemaSnapshot, m as schemaSnapshotVersion, n as canonicalJson, o as SnapshotValidationError, p as schemaSnapshotNamingPolicyVersion, r as encodeCanonicalSnapshot, s as assertSchemaSnapshot, t as SnapshotCanonicalError, u as neutralSnapshotDialect } from "./canonical-BbnqavJm.mjs";
3
- import { a as encodeSnapshot, i as encodeSchemaSnapshot, n as createSchemaSnapshot, o as serializeSchema, r as digestSchemaSnapshot, s as tryCreateSchemaSnapshot, t as SnapshotSerializationError } from "./serialize-CFtYYAdk.mjs";
4
- import { a as sqliteStorageAffinity, i as sqliteSnapshotDialect, n as sqliteSchemaDialect, o as tryCreateSqliteSchemaSnapshot, r as sqliteSnapshotAdapter, t as createSqliteSchemaSnapshot } from "./sqlite-CrsK0Fza.mjs";
5
- import { _ as completeSchemaSnapshotVersion, a as canonicalizeCompleteSchemaSnapshot, b as schemaSnapshotVersion2, c as decodeCompleteSchemaSnapshot, d as digestCompleteSchemaSnapshot, f as encodeCompleteSchemaSnapshot, g as completeSchemaSnapshotFormat, h as schemaSnapshotV2Digest, i as assertSchemaSnapshotV2, l as decodeCompleteSnapshot, m as encodeSchemaSnapshotV2, n as assertCompleteSchemaSnapshot, o as canonicalizeSchemaSnapshotV2, p as encodeCompleteSnapshot, r as assertCompleteSnapshot, s as completeSchemaSnapshotDigest, t as CompleteSnapshotValidationError, u as decodeSchemaSnapshotV2, v as schemaSnapshotCompleteVersion, y as schemaSnapshotV2Version } from "./complete-D5Djh-zo.mjs";
6
- import { a as tryCreatePostgresSchemaSnapshot, i as postgresSnapshotDialect, n as postgresSchemaDialect, r as postgresSnapshotAdapter, t as createPostgresSchemaSnapshot } from "./postgres-BK2APkKP.mjs";
7
- import { a as tryCreateMysqlSchemaSnapshot, i as mysqlSnapshotDialect, n as mysqlSchemaDialect, r as mysqlSnapshotAdapter, t as createMysqlSchemaSnapshot } from "./mysql-CKEKGnj4.mjs";
1
+ import { t as createSchemaDialect } from "./dialect-wUKrnPMB.mjs";
2
+ import { a as toSnapshotJsonValue, c as canonicalizeSchemaSnapshot, d as schemaSnapshotDialectVersion, f as schemaSnapshotFormat, i as schemaSnapshotDigest, l as decodeSchemaSnapshot, m as schemaSnapshotVersion, n as canonicalJson, o as SnapshotValidationError, p as schemaSnapshotNamingPolicyVersion, r as encodeCanonicalSnapshot, s as assertSchemaSnapshot, t as SnapshotCanonicalError, u as neutralSnapshotDialect } from "./canonical-BXUguqfo.mjs";
3
+ import { a as sqliteStorageAffinity, c as createSchemaSnapshot, d as encodeSnapshot, f as serializeSchema, i as sqliteSnapshotDialect, l as digestSchemaSnapshot, n as sqliteSchemaDialect, o as tryCreateSqliteSchemaSnapshot, p as tryCreateSchemaSnapshot, r as sqliteSnapshotAdapter, s as SnapshotSerializationError, t as createSqliteSchemaSnapshot, u as encodeSchemaSnapshot } from "./sqlite-Cg0nwYEH.mjs";
4
+ import { _ as completeSchemaSnapshotVersion, a as canonicalizeCompleteSchemaSnapshot, b as schemaSnapshotVersion2, c as decodeCompleteSchemaSnapshot, d as digestCompleteSchemaSnapshot, f as encodeCompleteSchemaSnapshot, g as completeSchemaSnapshotFormat, h as schemaSnapshotV2Digest, i as assertSchemaSnapshotV2, l as decodeCompleteSnapshot, m as encodeSchemaSnapshotV2, n as assertCompleteSchemaSnapshot, o as canonicalizeSchemaSnapshotV2, p as encodeCompleteSnapshot, r as assertCompleteSnapshot, s as completeSchemaSnapshotDigest, t as CompleteSnapshotValidationError, u as decodeSchemaSnapshotV2, v as schemaSnapshotCompleteVersion, y as schemaSnapshotV2Version } from "./complete-WYyVozgK.mjs";
5
+ import { a as tryCreateMysqlSchemaSnapshot, c as postgresSnapshotAdapter, i as mysqlSnapshotDialect, l as postgresSnapshotDialect, n as mysqlSchemaDialect, o as createPostgresSchemaSnapshot, r as mysqlSnapshotAdapter, s as postgresSchemaDialect, t as createMysqlSchemaSnapshot, u as tryCreatePostgresSchemaSnapshot } from "./mysql-B_cYzzX2.mjs";
8
6
  export { CompleteSnapshotValidationError, SnapshotCanonicalError, SnapshotSerializationError, SnapshotValidationError, assertCompleteSchemaSnapshot, assertCompleteSnapshot, assertSchemaSnapshot, assertSchemaSnapshotV2, canonicalJson, canonicalizeCompleteSchemaSnapshot, canonicalizeSchemaSnapshot, canonicalizeSchemaSnapshotV2, completeSchemaSnapshotDigest, completeSchemaSnapshotFormat, completeSchemaSnapshotVersion, createMysqlSchemaSnapshot, createPostgresSchemaSnapshot, createSchemaDialect, createSchemaSnapshot, createSqliteSchemaSnapshot, decodeCompleteSchemaSnapshot, decodeCompleteSnapshot, decodeSchemaSnapshot, decodeSchemaSnapshotV2, digestCompleteSchemaSnapshot, digestSchemaSnapshot, encodeCanonicalSnapshot, encodeCompleteSchemaSnapshot, encodeCompleteSnapshot, encodeSchemaSnapshot, encodeSchemaSnapshotV2, encodeSnapshot, mysqlSchemaDialect, mysqlSnapshotAdapter, mysqlSnapshotDialect, neutralSnapshotDialect, postgresSchemaDialect, postgresSnapshotAdapter, postgresSnapshotDialect, schemaSnapshotCompleteVersion, schemaSnapshotDialectVersion, schemaSnapshotDigest, schemaSnapshotFormat, schemaSnapshotNamingPolicyVersion, schemaSnapshotV2Digest, schemaSnapshotV2Version, schemaSnapshotVersion, schemaSnapshotVersion2, serializeSchema, sqliteSchemaDialect, sqliteSnapshotAdapter, sqliteSnapshotDialect, sqliteStorageAffinity, toSnapshotJsonValue, tryCreateMysqlSchemaSnapshot, tryCreatePostgresSchemaSnapshot, tryCreateSchemaSnapshot, tryCreateSqliteSchemaSnapshot };
@@ -1,5 +1,4 @@
1
- import { m as resolveSqlNames, t as createColumnReference } from "./column-D-8OqGuV.mjs";
2
- import { a as columnResultValue } from "./column-LV7oGQde.mjs";
1
+ import { L as resolveSqlNames, t as createColumnReference, u as columnResultValue } from "./column-hqKr7-1I.mjs";
3
2
  //#region src/schema/source.ts
4
3
  const sourceIdentity = Symbol("qubu.source.identity");
5
4
  function createSource(sourceKind, render, reference, constraints = {}) {
@@ -12,10 +11,9 @@ function createSource(sourceKind, render, reference, constraints = {}) {
12
11
  };
13
12
  }
14
13
  /**
15
- * Create a typed source-producing fragment for a custom FROM relation such as
16
- * a table-valued function. The renderer owns the relation syntax and may bind
17
- * values through context.parameter(); the source identity and output columns
18
- * remain available to the normal FROM/JOIN scope checks.
14
+ * Create a typed source-producing fragment for a custom FROM relation such as a table-valued
15
+ * function. The renderer owns the relation syntax and may bind values through context.parameter();
16
+ * the source identity and output columns remain available to the normal FROM/JOIN scope checks.
19
17
  */
20
18
  function customSource(options) {
21
19
  const source = createSource(options.sourceKind ?? "custom", options.render, options.reference);
@@ -35,8 +33,8 @@ function customSource(options) {
35
33
  return source;
36
34
  }
37
35
  /**
38
- * Add convenient direct column properties without allowing a column name to
39
- * overwrite the source's rendering or metadata primitives.
36
+ * Add convenient direct column properties without allowing a column name to overwrite the source's
37
+ * rendering or metadata primitives.
40
38
  */
41
39
  function exposeColumns(target, columns) {
42
40
  const reserved = /* @__PURE__ */ new Set([