qubu 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{canonical-BbnqavJm.mjs → canonical-BXUguqfo.mjs} +23 -23
- package/dist/codegen.d.mts +25 -33
- package/dist/codegen.mjs +38 -45
- package/dist/column-hqKr7-1I.mjs +620 -0
- package/dist/{complete-D5Djh-zo.mjs → complete-WYyVozgK.mjs} +50 -50
- package/dist/{complete-types-BavBtv8J.d.mts → complete-types-IjEn5VPN.d.mts} +56 -56
- package/dist/core.d.mts +2 -2
- package/dist/core.mjs +4 -4
- package/dist/ddl.d.mts +12 -12
- package/dist/ddl.mjs +13 -14
- package/dist/{dialect-b2-Z6uBF.mjs → dialect-wUKrnPMB.mjs} +2 -2
- package/dist/diff.d.mts +1 -1
- package/dist/diff.mjs +6 -7
- package/dist/{index-DH0qV6aS.d.mts → index-1DpA3mUh.d.mts} +20 -20
- package/dist/{index-D3ZOwPT-.d.mts → index-CPvfEheG.d.mts} +13 -15
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +94 -95
- package/dist/introspection.d.mts +8 -8
- package/dist/introspection.mjs +29 -30
- package/dist/{json-CUZlv4HT.mjs → json-Db7XRD91.mjs} +2 -2
- package/dist/migration.d.mts +20 -21
- package/dist/migration.mjs +5 -6
- package/dist/{mysql-CKEKGnj4.mjs → mysql-B_cYzzX2.mjs} +237 -7
- package/dist/mysql.d.mts +1 -1
- package/dist/mysql.mjs +3 -3
- package/dist/{on-conflict-4MOBl51J.mjs → on-conflict-hfPW0KmQ.mjs} +3 -4
- package/dist/postgres.d.mts +5 -5
- package/dist/postgres.mjs +6 -6
- package/dist/{registry-CXV8u7Pt.mjs → registry-BRMLYwDp.mjs} +26 -29
- package/dist/{relational-DuQ9IHSb.mjs → relational-BZ3WDPzC.mjs} +2 -2
- package/dist/schema.d.mts +1 -1
- package/dist/schema.mjs +5 -6
- package/dist/{snapshot-DJpfmxhQ.mjs → snapshot-C-W65HEd.mjs} +5 -5
- package/dist/snapshot.d.mts +3 -3
- package/dist/snapshot.mjs +5 -7
- package/dist/{source-DGO3DRgg.mjs → source-BcS2AsIg.mjs} +6 -8
- package/dist/{serialize-CFtYYAdk.mjs → sqlite-Cg0nwYEH.mjs} +326 -12
- package/dist/sqlite.d.mts +2 -2
- package/dist/sqlite.mjs +2 -2
- package/dist/{standard-BTVYKh_F.mjs → standard-DfcZEVOj.mjs} +1 -1
- package/dist/{table-D6rcs8SB.mjs → table-Bp5irMSj.mjs} +2 -3
- package/dist/{types-Deo_q43Y.d.mts → types-BK1COGZe.d.mts} +1113 -1128
- package/dist/{types-g-vVvj1B.mjs → types-JM3FcAnX.mjs} +7 -8
- package/dist/{types-CSNJTYaM.d.mts → types-JSZHpUEj.d.mts} +83 -84
- package/dist/{value-b6OFZXVS.mjs → value-Bi71Agyf.mjs} +1 -1
- package/dist/vite/ambient.d.ts +309 -340
- package/dist/vite.d.mts +5 -6
- package/dist/vite.mjs +3 -4
- package/docs/dialects-and-execution.md +45 -55
- package/docs/getting-started.md +4 -4
- package/docs/guides/better-auth.md +57 -0
- package/docs/guides/compose-queries.md +24 -67
- package/docs/guides/drizzle.md +23 -23
- package/docs/guides/extensions/dialects.md +4 -4
- package/docs/guides/extensions/sources-and-clauses.md +15 -15
- package/docs/guides/extensions/typed-expressions.md +13 -17
- package/docs/guides/extensions/unsafe-syntax.md +3 -3
- package/docs/guides/json.md +7 -7
- package/docs/guides/mutations.md +14 -21
- package/docs/guides/select/conditions.md +6 -8
- package/docs/guides/select/grouping-and-windows.md +4 -15
- package/docs/guides/select/ordering-and-pagination.md +6 -19
- package/docs/guides/select/overview.md +12 -26
- package/docs/guides/sql-templates.md +20 -24
- package/docs/guides/vite-plugin.md +9 -13
- package/docs/index.md +5 -7
- package/docs/query-model/fragments.md +4 -15
- package/docs/query-model/result-shapes.md +11 -14
- package/docs/query-model/source-scope.md +31 -49
- package/docs/reference/mysql-snapshot.md +2 -5
- package/docs/reference/postgres-snapshot.md +3 -3
- package/docs/reference/sqlite-snapshot.md +2 -5
- package/docs/reference/supported-surface.md +26 -26
- package/docs/schema/catalog-model.md +2 -5
- package/docs/schema/code-generation.md +18 -18
- package/docs/schema/columns-and-writes.md +17 -25
- package/docs/schema/constraints-and-indexes.md +36 -52
- package/docs/schema/ddl-emission.md +6 -6
- package/docs/schema/diff.md +5 -5
- package/docs/schema/introspection.md +7 -7
- package/docs/schema/migration-plans.md +9 -9
- package/docs/schema/snapshots.md +3 -3
- package/docs/schema/storage-and-schema-sql.md +11 -11
- package/docs/schema/tables-and-names.md +11 -14
- package/docs/sql-semantic-types.md +10 -10
- package/docs/troubleshooting.md +10 -10
- package/package.json +21 -33
- package/skills/qubu/agents/openai.yaml +3 -3
- package/dist/column-D-8OqGuV.mjs +0 -328
- package/dist/column-LV7oGQde.mjs +0 -296
- package/dist/drizzle-mysql.d.mts +0 -24
- package/dist/drizzle-mysql.mjs +0 -72
- package/dist/drizzle-postgres.d.mts +0 -24
- package/dist/drizzle-postgres.mjs +0 -73
- package/dist/drizzle-sqlite.d.mts +0 -57
- package/dist/drizzle-sqlite.mjs +0 -108
- package/dist/drizzle.d.mts +0 -13
- package/dist/drizzle.mjs +0 -2
- package/dist/errors-BGCoLe_r.mjs +0 -14
- package/dist/postgres-BK2APkKP.mjs +0 -236
- package/dist/runtime-Cn_Xgzta.mjs +0 -193
- package/dist/sqlite-CrsK0Fza.mjs +0 -320
- 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-
|
|
2
|
-
import {
|
|
3
|
-
import { t as comparison } from "./relational-
|
|
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-
|
|
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
|
-
*
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { n as isValueExpression } from "./value-
|
|
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
|
-
*
|
|
8
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
185
|
-
*
|
|
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
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
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
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
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
|
-
*
|
|
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 {
|
|
3
|
-
import { n as isValueExpression, t as asValue } from "./value-
|
|
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 { $
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
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-
|
|
2
|
-
import { a as sqliteStorageAffinity } from "./sqlite-
|
|
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
|
-
*
|
|
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
|
|
333
|
+
if (!value) return;
|
|
334
334
|
return {
|
|
335
335
|
dialect: value.dialect,
|
|
336
336
|
version: value.version,
|
package/dist/snapshot.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as SnapshotStorage, C as SnapshotIndexTerm, D as SnapshotLiteral,
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
3
|
-
import { a as encodeSnapshot, i as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
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 {
|
|
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
|
-
*
|
|
17
|
-
*
|
|
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
|
-
*
|
|
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([
|