qubu 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen.d.mts +1 -1
- package/dist/codegen.mjs +1 -1
- package/dist/core.d.mts +1 -1
- package/dist/diff.d.mts +1 -1
- package/dist/index-DB07P2X8.d.mts +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/introspection/mysql.d.mts +1 -1
- package/dist/introspection/postgres.d.mts +1 -1
- package/dist/introspection/sqlite.d.mts +1 -1
- package/dist/introspection.d.mts +3 -2
- package/dist/introspection.mjs +1 -1
- package/dist/mysql.d.mts +2 -2
- package/dist/postgres.d.mts +2 -2
- package/dist/schema.d.mts +1 -1
- package/dist/{serialize-Du2UPZMt.d.mts → serialize-Dg-Q55YQ.d.mts} +1 -1
- package/dist/snapshot/mysql.d.mts +2 -2
- package/dist/snapshot/postgres.d.mts +2 -2
- package/dist/snapshot/sqlite.d.mts +2 -2
- package/dist/{snapshot-mIb-Zzb5.mjs → snapshot-C1x2R-iK.mjs} +25 -9
- package/dist/snapshot.d.mts +3 -3
- package/dist/sqlite.d.mts +2 -2
- package/dist/{types-CiMvKi5V.d.mts → types-CdcYI0lU.d.mts} +1 -1
- package/dist/{types-Dqr4o2I1.d.mts → types-DcIiNePM.d.mts} +7 -0
- package/docs/dialects-and-execution.md +54 -25
- package/docs/getting-started.md +9 -9
- package/docs/guides/better-auth.md +16 -5
- package/docs/guides/compose-queries.md +21 -9
- package/docs/guides/drizzle.md +8 -3
- package/docs/guides/extensions/dialects.md +1 -1
- package/docs/guides/extensions/overview.md +1 -1
- package/docs/guides/extensions/sources-and-clauses.md +7 -3
- package/docs/guides/extensions/typed-expressions.md +25 -13
- package/docs/guides/extensions/unsafe-syntax.md +10 -6
- package/docs/guides/json.md +52 -27
- package/docs/guides/mutations.md +15 -6
- package/docs/guides/select/conditions.md +18 -11
- package/docs/guides/select/grouping-and-windows.md +5 -2
- package/docs/guides/select/ordering-and-pagination.md +5 -3
- package/docs/guides/select/overview.md +6 -3
- package/docs/guides/sql-templates.md +11 -5
- package/docs/guides/valtio-sync.md +11 -5
- package/docs/guides/vite-plugin.md +2 -2
- package/docs/index.md +24 -17
- package/docs/migrations/adapters.md +58 -22
- package/docs/migrations/adopt.md +331 -0
- package/docs/migrations/artifacts-and-policy.md +49 -20
- package/docs/migrations/index.md +18 -9
- package/docs/migrations/operations.md +60 -70
- package/docs/migrations/recovery.md +34 -17
- package/docs/query-model/fragments.md +13 -5
- package/docs/query-model/result-shapes.md +2 -2
- package/docs/query-model/source-scope.md +5 -3
- package/docs/reference/introspection-support.md +26 -19
- package/docs/reference/mysql-snapshot.md +19 -4
- package/docs/reference/postgres-snapshot.md +17 -4
- package/docs/reference/sqlite-snapshot.md +19 -2
- package/docs/reference/supported-surface.md +221 -85
- package/docs/schema/catalog-model.md +24 -7
- package/docs/schema/code-generation.md +40 -21
- package/docs/schema/columns-and-writes.md +21 -11
- package/docs/schema/constraints-and-indexes.md +12 -5
- package/docs/schema/ddl-emission.md +16 -5
- package/docs/schema/diff.md +12 -4
- package/docs/schema/introspection.md +47 -21
- package/docs/schema/migration-plans.md +18 -10
- package/docs/schema/snapshots.md +57 -29
- package/docs/schema/storage-and-schema-sql.md +10 -4
- package/docs/schema/tables-and-names.md +1 -1
- package/docs/sql-semantic-types.md +11 -8
- package/docs/troubleshooting.md +14 -6
- package/package.json +1 -1
- package/dist/index-CaxrMD1A.d.mts +0 -1
- package/docs/migrations/lotta-adoption.md +0 -50
package/dist/codegen.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as CatalogPortableStorageType, i as CatalogClassificationConfidence, p as CatalogDialect, pt as IntrospectionResult, wt as IntrospectionDiagnostic } from "./types-
|
|
1
|
+
import { V as CatalogPortableStorageType, i as CatalogClassificationConfidence, p as CatalogDialect, pt as IntrospectionResult, wt as IntrospectionDiagnostic } from "./types-CdcYI0lU.mjs";
|
|
2
2
|
//#region src/codegen/types.d.ts
|
|
3
3
|
/** TypeScript value types that the controlled source printer can emit. */
|
|
4
4
|
type CodegenApplicationType = "unknown" | "string" | "number" | "boolean" | "bigint" | "Date" | "Uint8Array";
|
package/dist/codegen.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as candidateKeyIndexColumns, l as hasCandidateKeyShape, t as mapCatalogToSnapshot, u as isCandidateKeyIndex } from "./snapshot-
|
|
1
|
+
import { c as candidateKeyIndexColumns, l as hasCandidateKeyShape, t as mapCatalogToSnapshot, u as isCandidateKeyIndex } from "./snapshot-C1x2R-iK.mjs";
|
|
2
2
|
import { l as decodeSchemaSnapshot } from "./canonical-B5_ouh-c.mjs";
|
|
3
3
|
//#region src/codegen/source.ts
|
|
4
4
|
const header = `/* Generated by Qubu. Do not edit this machine-owned file. */
|
package/dist/core.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $d as isFragment, $t as assertDialectCapability, Ad as MetadataOf, Ao as SelectClause, Bd as RenderFunction, Bs as typedCast, Bt as DialectPagination, Cd as GroupingKeysOf, Dd as HasWindow, Du as RenderOptions, Ed as HasSubquery, Eu as RenderCapabilityValidation, Fd as ProvidesOuterOf, Ft as DialectCapability, Gd as RequiresOuterSourceMeta, Gt as NamedCastTarget, Hd as RequiresOf, Ht as ExplainFormat, Id as ProvidesOuterSourceMeta, Is as typedValue, It as DialectCastTypes, Iu as expressionFragment, Jd as SqlTypeOf, Jt as PortableCastTarget, Ju as isExpression, Kd as RequiresSourceMeta, Kt as PaginationKind, Ld as ProvidesSourceMeta, Lt as DialectExplain, Md as NullableSourceMeta, Nd as NullableSourcesOf, Nt as CastTarget, Od as InheritedMetadata, Ou as RenderedQuery, Pd as OutputOf, Pt as Dialect, Qd as fragment, Qo as typedCall, Qt as SchemaLiteralRenderer, Rd as QueryCardinality, Rt as DialectJson, Sd as GroupingDependenciesOf, Sf as SqlUuid, Td as HasAggregate, Ud as RequiresOuterMetadataOf, Ut as ExplainRenderOptions, Vd as RequiresCapabilityMeta, Vt as DialectRowLocking, Wd as RequiresOuterOf, Wt as JsonScalarKind, Xd as VisibleDependenciesOf, Xt as RowLockMode, Xu as markExpressionCategory, Yd as SubqueryMeta, Yt as PortableCastType, Yu as makeExpression, Zd as WindowMeta, Zt as RowLockWaitPolicy, Zu as withDialectCapability, _d as CardinalityOf, _f as SqlTextLike, af as SqlBoolean, bd as Fragment, bf as SqlTypeSatisfies, cf as SqlEqualityComparable, dd as AggregateDependenciesOf, df as SqlJson, ef as parenthesize, en as createDialect, fd as AggregateMeta, ff as SqlNumericLike, gd as CardinalityMeta, gf as SqlText, hd as CapabilityMetadataOf, hf as SqlSemanticType, if as SqlBinary, jd as NullabilityOf, kd as InheritedMetadataOf, ko as ClausePlacement, ku as render, ld as resultValue, lf as SqlEqualityCompatible, md as CapabilitiesOf, mf as SqlOrderable, nf as AnySqlType, nn as resolveCastTarget, of as SqlDate, pd as AnyFragment, pf as SqlOrderCompatible, qd as ResultMeta, qt as PaginationPart, rf as SqlBigInt, sf as SqlDecimal, tf as sequence, tn as extendDialect, uf as SqlInteger, vd as DependenciesOf, vf as SqlTimestamp, wd as GroupingMeta, xd as FragmentMeta, xf as SqlUnknown, yd as ExpressionMeta, yf as SqlTypeName, zd as RenderContext, zt as DialectOptions, zu as Expression } from "./types-
|
|
1
|
+
import { $d as isFragment, $t as assertDialectCapability, Ad as MetadataOf, Ao as SelectClause, Bd as RenderFunction, Bs as typedCast, Bt as DialectPagination, Cd as GroupingKeysOf, Dd as HasWindow, Du as RenderOptions, Ed as HasSubquery, Eu as RenderCapabilityValidation, Fd as ProvidesOuterOf, Ft as DialectCapability, Gd as RequiresOuterSourceMeta, Gt as NamedCastTarget, Hd as RequiresOf, Ht as ExplainFormat, Id as ProvidesOuterSourceMeta, Is as typedValue, It as DialectCastTypes, Iu as expressionFragment, Jd as SqlTypeOf, Jt as PortableCastTarget, Ju as isExpression, Kd as RequiresSourceMeta, Kt as PaginationKind, Ld as ProvidesSourceMeta, Lt as DialectExplain, Md as NullableSourceMeta, Nd as NullableSourcesOf, Nt as CastTarget, Od as InheritedMetadata, Ou as RenderedQuery, Pd as OutputOf, Pt as Dialect, Qd as fragment, Qo as typedCall, Qt as SchemaLiteralRenderer, Rd as QueryCardinality, Rt as DialectJson, Sd as GroupingDependenciesOf, Sf as SqlUuid, Td as HasAggregate, Ud as RequiresOuterMetadataOf, Ut as ExplainRenderOptions, Vd as RequiresCapabilityMeta, Vt as DialectRowLocking, Wd as RequiresOuterOf, Wt as JsonScalarKind, Xd as VisibleDependenciesOf, Xt as RowLockMode, Xu as markExpressionCategory, Yd as SubqueryMeta, Yt as PortableCastType, Yu as makeExpression, Zd as WindowMeta, Zt as RowLockWaitPolicy, Zu as withDialectCapability, _d as CardinalityOf, _f as SqlTextLike, af as SqlBoolean, bd as Fragment, bf as SqlTypeSatisfies, cf as SqlEqualityComparable, dd as AggregateDependenciesOf, df as SqlJson, ef as parenthesize, en as createDialect, fd as AggregateMeta, ff as SqlNumericLike, gd as CardinalityMeta, gf as SqlText, hd as CapabilityMetadataOf, hf as SqlSemanticType, if as SqlBinary, jd as NullabilityOf, kd as InheritedMetadataOf, ko as ClausePlacement, ku as render, ld as resultValue, lf as SqlEqualityCompatible, md as CapabilitiesOf, mf as SqlOrderable, nf as AnySqlType, nn as resolveCastTarget, of as SqlDate, pd as AnyFragment, pf as SqlOrderCompatible, qd as ResultMeta, qt as PaginationPart, rf as SqlBigInt, sf as SqlDecimal, tf as sequence, tn as extendDialect, uf as SqlInteger, vd as DependenciesOf, vf as SqlTimestamp, wd as GroupingMeta, xd as FragmentMeta, xf as SqlUnknown, yd as ExpressionMeta, yf as SqlTypeName, zd as RenderContext, zt as DialectOptions, zu as Expression } from "./types-DcIiNePM.mjs";
|
|
2
2
|
//#region src/core/primitives/compose.d.ts
|
|
3
3
|
declare function commaSeparated<const TParts extends readonly AnyFragment[]>(parts: TParts): Fragment<InheritedMetadata<TParts[number]>>;
|
|
4
4
|
declare function keyword<TPart extends AnyFragment | undefined>(value: string, part?: TPart): Fragment<TPart extends AnyFragment ? InheritedMetadata<TPart> : never>;
|
package/dist/diff.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as SnapshotJsonValue, m as SnapshotDialect, n as SchemaSnapshot, st as CompleteSnapshotObjectKind } from "./types-
|
|
1
|
+
import { T as SnapshotJsonValue, m as SnapshotDialect, n as SchemaSnapshot, st as CompleteSnapshotObjectKind } from "./types-DcIiNePM.mjs";
|
|
2
2
|
//#region src/diff/types.d.ts
|
|
3
3
|
/** Object families understood by the snapshot diff engine. */
|
|
4
4
|
type SnapshotDiffObjectKind = CompleteSnapshotObjectKind;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $a as IndexDialectExtension, $c as GeneratedColumnDescriptor, $i as SchemaTableEntry, $l as HookTransactionOperation, $n as DefaultValuesSource, $o as avg, $r as RequiredScope, $s as ColumnOnUpdateOf, $u as ResultDecodeContext, Aa as SourceLike, Ad as MetadataOf, Ai as all, Ao as SelectClause, Ar as AllowAllClause, As as isTrue, Au as QueryTypeValidation, Ba as primaryKey, Bc as text, Bd as RenderFunction, Bi as SchemaRenderOptions, Bl as ExplainReadOptions, Bn as TableSqlTypes, Bo as jsonPath, Br as allowAll, Bt as DialectPagination, Bu as ExpressionKind, Ca as KeyConstraint, Cd as GroupingKeysOf, Ci as FromScope, Cl as SchemaObjectNameOptions, Cn as SourceRow, Co as fetchFirst, Cs as ne, Cu as explain, Da as ReferentialAction, Dc as boolean, Dd as HasWindow, Di as SelectionObject, Do as distinct, Ds as notIn, Du as RenderOptions, Ea as PostgresConstraintExtension, Ec as binary, Ed as HasSubquery, Ei as Selection, Eo as having, Er as update, Es as inList, Fa as UniqueNullSemantics, Fc as nativeColumn, Fd as ProvidesOuterOf, Fl as ExecutionResult, Fn as TableIdentity, Fo as subtract, Fr as MutationReturning, Fs as asValue, Ft as DialectCapability, Fu as ColumnReference, Ga as AliasIdentity, Gc as ColumnBehaviorErrorCode, Gd as RequiresOuterSourceMeta, Gl as HookMetadata, Gn as desc, Go as rowNumber, Gr as correlate, Gt as NamedCastTarget, Gu as ExpressionWithOutput, Ha as unique, Hc as uuid, Hd as RequiresOf, Hl as ExplainResult, Hn as table, Ho as denseRank, Hr as ReturningRow, Hs as ColumnDefaultOf, Ht as ExplainFormat, Hu as ExpressionOutput, Ia as catalogCheck, Ic as nativeStorage, Id as ProvidesOuterSourceMeta, Ii as SchemaExpressionErrorCode, Il as ExplainMutationOptions, In as TableInsertInput, Io as JsonPath, Ir as MutationReturningClause, It as DialectCastTypes, Ja as LateralSource, Jc as DefaultDescriptor, Jd as SqlTypeOf, Ji as unsafeSchemaSql, Jl as HookOperationKind, Jn as order, Jo as lower, Jr as AvailableScope, Js as ColumnHasRuntimeDefault, Jt as PortableCastTarget, Ka as AliasedSource, Kc as ColumnDefault, Kd as RequiresSourceMeta, Kl as HookMetadataValue, Kn as nullsFirst, Ko as coalesce, Kr as select, Ks as ColumnGeneratedOf, Kt as PaginationKind, Ku as SchemaExpression, La as catalogForeignKey, Lc as nullable, Ld as ProvidesSourceMeta, Li as SchemaExpressionInput, Ll as ExplainOptions, Lo as jsonBoolean, Lr as MutationRow, Ls as value, Lt as DialectExplain, Lu as AnyExpression, Ma as TableLike, Md as NullableSourceMeta, Mi as SchemaDialectHooks, Ml as DriverValueEncoder, Mn as Table, Mo as divide, Mr as MutationKind, Mu as QueryValidationErrorCode, Na as UniqueConstraint, Nc as integer, Nd as NullableSourcesOf, Nl as ExecutionOptions, Nn as TableColumns, No as modulo, Nr as MutationQuery, Nt as CastTarget, Nu as QueryValidationIssue, Oa as SourceConstraint, Oc as column, Od as InheritedMetadata, Oi as SelectionOutput, Oo as AnySelectClause, Os as isNotNull, Ou as RenderedQuery, Pa as UniqueConstraintOptions, Pc as json, Pd as OutputOf, Pi as RenderedSchemaExpression, Pl as ExecutionRequest, Pn as TableDefinitions, Po as multiply, Pr as MutationQueryConfig, Pt as Dialect, Pu as ColumnDependency, Qa as lateral, Qc as ExternalGeneratedColumnDescriptor, Qi as SchemaOptions, Ql as HookSuccessOutcome, Qn as deleteFrom, Qr as RequiredOuterScope, Qt as SchemaLiteralRenderer, Qu as DecodableResultType, Ra as check, Rc as numeric, Rd as QueryCardinality, Ri as SchemaExpressionMode, Rl as ExplainOptionsFor, Ro as jsonExists, Rr as MutationScopeValidation, Rs as mapResult, Rt as DialectJson, Ru as AnySchemaExpression, Sa as ForeignKeyTargetInput, Sd as GroupingDependenciesOf, Sf as SqlUuid, Si as FromClause, Sl as SchemaObjectIdentity, Sn as SourceProvision, So as rowLock, Ss as lte, Su as executeRows, Ta as MysqlConstraintExtension, Tc as bigint, Td as HasAggregate, Ti as from, To as offset, Tr as UpdateAssignments, Ts as between, Tu as stream, Ua as uniqueConstraint, Uc as CanonicalLiteral, Ud as RequiresOuterMetadataOf, Ul as ExplainableQueryAdapter, Un as OrderTerm, Uo as over, Ur as ReturningSqlTypes, Us as ColumnDefinition, Ut as ExplainRenderOptions, Uu as ExpressionRequires, Va as references, Vc as timestamp, Vd as RequiresCapabilityMeta, Vi as UnsafeSchemaSqlExpression, Vl as ExplainRequest, Vn as TableUpdateInput, Vo as jsonText, Vr as ReturningClause, Vs as ColumnCodec, Vt as DialectRowLocking, Vu as ExpressionNullability, Wc as ColumnBehaviorError, Wd as RequiresOuterOf, Wl as HookErrorOutcome, Wn as asc, Wo as rank, Wr as returning, Ws as ColumnDefinitionConfig, Wt as JsonScalarKind, Wu as ExpressionSqlType, Xa as QuerySource, Xc as ExpressionGeneratedColumnDescriptor, Xd as VisibleDependenciesOf, Xi as SchemaDiagnostic, Xl as HookQueryOperation, Xn as jsonArrayFrom, Xo as call, Xr as GroupingValidation, Xs as ColumnInsertInput, Xt as RowLockMode, Ya as QueryAliasIdentity, Yc as ExpressionDefaultDescriptor, Yd as SubqueryMeta, Yi as Schema, Yl as HookOutcome, Yn as orderBy, Yo as upper, Yr as ClauseScope, Ys as ColumnIdentityOf, Yt as PortableCastType, Za as alias, Zc as ExternalDefaultDescriptor, Zd as WindowMeta, Zi as SchemaNamingPolicy, Zl as HookStreamEnd, Zn as jsonObjectFrom, Zo as schemaCall, Zr as MissingScope, Zs as ColumnIsGenerated, Zt as RowLockWaitPolicy, _a as FieldLikeOptions, _d as CardinalityOf, _f as SqlTextLike, _i as innerJoin, _n as SourceColumns, _o as SelectPart, _s as gte, _u as StreamingQueryAdapter, ad as bigintResultDecoder, af as SqlBoolean, ai as WithClause, al as IdentityOptionValue, an as QueryConfig, ao as SourceIndex, ar as defaultValues, as as SqlFragment, au as QubuExplainableTransactionalClient, ba as ForeignKeyOptions, bd as Fragment, bf as SqlTypeSatisfies, bi as rightJoin, bl as SchemaMetadataDiagnostic, bn as SourceIdentity, bo as RowLockClause, bs as like, bu as TransactionalQueryAdapter, ca as AnyKeyColumn, cc as ColumnStorageOf, cd as jsonTextResultDecoder, cf as SqlEqualityComparable, ci as withCte, cl as MysqlIdentityExtension, cn as QuerySqlTypeMap, co as TableIndex, cr as values, cs as sql, cu as QubuStreamingClient, da as CheckConstraint, dc as ColumnUpdateInput, dd as AggregateDependenciesOf, df as SqlJson, di as except, dl as SqliteIdentityExtension, dn as AnySource, do as DeclaredColumnNullability, ds as inQuery, du as QubuStreamingTransactionalClient, ea as SchemaTableNames, ec as ColumnOptions, ed as ResultDecoder, ei as ScopeValidation, el as GeneratedColumnMode, eo as IndexOptions, er as InsertSelectSource, es as count, eu as NestedTransactionalQueryAdapter, fa as CheckConstraintOptions, fd as AggregateMeta, ff as SqlNumericLike, fi as intersect, fo as and, fs as notExists, fu as QubuTransaction, ga as FieldLike, gc as PortableColumnStorage, gd as CardinalityMeta, gf as SqlText, gi as fullJoin, gl as identityColumn, gn as Source, go as OmittableSelectClause, gs as gt, gu as StreamableQuery, ha as ConstraintTiming, hd as CapabilityMetadataOf, hf as SqlSemanticType, hi as crossJoin, hl as generatedColumn, hn as ProvidedSourceRow, ho as Omit, hs as eq, hu as QueryExecutor, ic as ColumnStorageDeclarationOf, id as ResultShape, if as SqlBinary, ii as RecursiveCteSource, il as IdentityGeneration, in as Query, io as PostgresIndexExtension, ir as ValuesSource, is as sum, iu as QubuExplainableStreamingTransactionalClient, ja as SqliteConstraintExtension, jc as date, jd as NullabilityOf, ji as SchemaDialect, jl as AdapterExecutionResult, jn as AnyTable, jo as add, jr as MutationClause, ju as QueryValidationError, ka as SourceConstraintsRecord, kd as InheritedMetadataOf, ki as SelectionSqlTypes, ko as ClausePlacement, ks as isNull, ku as render, la as CatalogCheckExpression, lf as SqlEqualityCompatible, li as SetOperator, ll as ResolvedColumnBehavior, ln as QueryWithRow, lo as index, ls as caseWhen, lu as QubuStreamingExplainableClient, ma as ConstraintOptions, md as CapabilitiesOf, mf as SqlOrderable, mi as unionAll, ml as externalGeneratedColumn, mn as ProvidedSourceIdentity, mo as or, mu as QueryAdapter, na as SchemaTableRegistry, nc as ColumnSqlType, nd as ResultDecodingError, nf as AnySqlType, ni as SelectQuery, nl as IdentityDescriptor, no as IndexTermOptions, nr as InsertValue, ns as max, nu as QubuClient, oa as schema, oc as ColumnStorageDialectOf, od as booleanResultDecoder, of as SqlDate, oi as cte, ol as IdentityOptions, on as QueryKind, oo as SourceIndexesRecord, or as insertInto, os as SqlTag, ou as QubuHooks, pa as ConstraintDialectExtension, pc as NativeColumnStorage, pd as AnyFragment, pf as SqlOrderCompatible, pi as union, pl as externalDefault, po as not, ps as scalar, pu as QubuTransactionalClient, qa as LateralIdentity, qc as ColumnDefaultInput, qd as ResultMeta, ql as HookOperation, qn as nullsLast, qo as concat, qr as AvailableOuterScope, qs as ColumnHasDefault, qt as PaginationPart, qu as SchemaExpressionBrand, rc as ColumnStorage, rd as ResultField, rf as SqlBigInt, ri as CteSource, rl as IdentityDialectExtension, rn as AnyQuery, ro as MysqlIndexExtension, rr as InsertValuesRow, rs as min, ru as QubuExplainableClient, sc as ColumnStorageKindOf, sd as dateResultDecoder, sf as SqlDecimal, si as recursiveCte, sl as LiteralDefaultDescriptor, sn as QueryRow, so as SqliteIndexExtension, sr as insertSelect, ss as TypedSqlTag, su as QubuOptions, ta as SchemaTableRecord, tc as ColumnOutput, td as ResultDecoders, ti as SelectCardinality, tl as GeneratedDescriptor, to as IndexTerm, tr as InsertSource, ts as countDistinct, tu as OperationEndHook, ua as CatalogCheckSql, uc as ColumnStorageTypeOf, ud as timestampResultDecoder, uf as SqlInteger, ui as SetQuery, ul as SchemaLiteralValue, un as Row, us as exists, uu as QubuStreamingTransaction, va as ForeignKeyConstraint, vd as DependenciesOf, vf as SqlTimestamp, vi as leftJoin, vl as SchemaDialectExtension, vn as SourceConfig, vo as omit, vs as isDistinctFrom, vu as StreamingTransactionalQueryAdapter, wa as KeyConstraintOptions, wd as GroupingMeta, wi as FromSource, wn as SourceSqlTypeMap, wo as fetchNext, wr as UpdateAssignmentValue, ws as notLike, wu as qubu, xa as ForeignKeyTarget, xd as FragmentMeta, xf as SqlUnknown, xi as groupBy, xn as SourceKind, xo as RowLockOptions, xs as lt, xu as execute, ya as ForeignKeyMatch, yd as ExpressionMeta, yf as SqlTypeName, yi as naturalJoin, yl as SchemaDialectName, yn as SourceConstraints, yo as where, ys as isNotDistinctFrom, yu as TransactionOptions, za as foreignKey, zc as portableStorage, zd as RenderContext, zi as SchemaRenderContext, zl as ExplainPlanRow, zn as TableRow, zo as jsonNumber, zr as MutationSqlTypes, zs as cast, zt as DialectOptions, zu as Expression } from "./types-Dqr4o2I1.mjs";
|
|
1
|
+
import { $a as IndexDialectExtension, $c as GeneratedColumnDescriptor, $i as SchemaTableEntry, $l as HookTransactionOperation, $n as DefaultValuesSource, $o as avg, $r as RequiredScope, $s as ColumnOnUpdateOf, $u as ResultDecodeContext, Aa as SourceLike, Ad as MetadataOf, Ai as all, Ao as SelectClause, Ar as AllowAllClause, As as isTrue, Au as QueryTypeValidation, Ba as primaryKey, Bc as text, Bd as RenderFunction, Bi as SchemaRenderOptions, Bl as ExplainReadOptions, Bn as TableSqlTypes, Bo as jsonPath, Br as allowAll, Bt as DialectPagination, Bu as ExpressionKind, Ca as KeyConstraint, Cd as GroupingKeysOf, Ci as FromScope, Cl as SchemaObjectNameOptions, Cn as SourceRow, Co as fetchFirst, Cs as ne, Cu as explain, Da as ReferentialAction, Dc as boolean, Dd as HasWindow, Di as SelectionObject, Do as distinct, Ds as notIn, Du as RenderOptions, Ea as PostgresConstraintExtension, Ec as binary, Ed as HasSubquery, Ei as Selection, Eo as having, Er as update, Es as inList, Fa as UniqueNullSemantics, Fc as nativeColumn, Fd as ProvidesOuterOf, Fl as ExecutionResult, Fn as TableIdentity, Fo as subtract, Fr as MutationReturning, Fs as asValue, Ft as DialectCapability, Fu as ColumnReference, Ga as AliasIdentity, Gc as ColumnBehaviorErrorCode, Gd as RequiresOuterSourceMeta, Gl as HookMetadata, Gn as desc, Go as rowNumber, Gr as correlate, Gt as NamedCastTarget, Gu as ExpressionWithOutput, Ha as unique, Hc as uuid, Hd as RequiresOf, Hl as ExplainResult, Hn as table, Ho as denseRank, Hr as ReturningRow, Hs as ColumnDefaultOf, Ht as ExplainFormat, Hu as ExpressionOutput, Ia as catalogCheck, Ic as nativeStorage, Id as ProvidesOuterSourceMeta, Ii as SchemaExpressionErrorCode, Il as ExplainMutationOptions, In as TableInsertInput, Io as JsonPath, Ir as MutationReturningClause, It as DialectCastTypes, Ja as LateralSource, Jc as DefaultDescriptor, Jd as SqlTypeOf, Ji as unsafeSchemaSql, Jl as HookOperationKind, Jn as order, Jo as lower, Jr as AvailableScope, Js as ColumnHasRuntimeDefault, Jt as PortableCastTarget, Ka as AliasedSource, Kc as ColumnDefault, Kd as RequiresSourceMeta, Kl as HookMetadataValue, Kn as nullsFirst, Ko as coalesce, Kr as select, Ks as ColumnGeneratedOf, Kt as PaginationKind, Ku as SchemaExpression, La as catalogForeignKey, Lc as nullable, Ld as ProvidesSourceMeta, Li as SchemaExpressionInput, Ll as ExplainOptions, Lo as jsonBoolean, Lr as MutationRow, Ls as value, Lt as DialectExplain, Lu as AnyExpression, Ma as TableLike, Md as NullableSourceMeta, Mi as SchemaDialectHooks, Ml as DriverValueEncoder, Mn as Table, Mo as divide, Mr as MutationKind, Mu as QueryValidationErrorCode, Na as UniqueConstraint, Nc as integer, Nd as NullableSourcesOf, Nl as ExecutionOptions, Nn as TableColumns, No as modulo, Nr as MutationQuery, Nt as CastTarget, Nu as QueryValidationIssue, Oa as SourceConstraint, Oc as column, Od as InheritedMetadata, Oi as SelectionOutput, Oo as AnySelectClause, Os as isNotNull, Ou as RenderedQuery, Pa as UniqueConstraintOptions, Pc as json, Pd as OutputOf, Pi as RenderedSchemaExpression, Pl as ExecutionRequest, Pn as TableDefinitions, Po as multiply, Pr as MutationQueryConfig, Pt as Dialect, Pu as ColumnDependency, Qa as lateral, Qc as ExternalGeneratedColumnDescriptor, Qi as SchemaOptions, Ql as HookSuccessOutcome, Qn as deleteFrom, Qr as RequiredOuterScope, Qt as SchemaLiteralRenderer, Qu as DecodableResultType, Ra as check, Rc as numeric, Rd as QueryCardinality, Ri as SchemaExpressionMode, Rl as ExplainOptionsFor, Ro as jsonExists, Rr as MutationScopeValidation, Rs as mapResult, Rt as DialectJson, Ru as AnySchemaExpression, Sa as ForeignKeyTargetInput, Sd as GroupingDependenciesOf, Sf as SqlUuid, Si as FromClause, Sl as SchemaObjectIdentity, Sn as SourceProvision, So as rowLock, Ss as lte, Su as executeRows, Ta as MysqlConstraintExtension, Tc as bigint, Td as HasAggregate, Ti as from, To as offset, Tr as UpdateAssignments, Ts as between, Tu as stream, Ua as uniqueConstraint, Uc as CanonicalLiteral, Ud as RequiresOuterMetadataOf, Ul as ExplainableQueryAdapter, Un as OrderTerm, Uo as over, Ur as ReturningSqlTypes, Us as ColumnDefinition, Ut as ExplainRenderOptions, Uu as ExpressionRequires, Va as references, Vc as timestamp, Vd as RequiresCapabilityMeta, Vi as UnsafeSchemaSqlExpression, Vl as ExplainRequest, Vn as TableUpdateInput, Vo as jsonText, Vr as ReturningClause, Vs as ColumnCodec, Vt as DialectRowLocking, Vu as ExpressionNullability, Wc as ColumnBehaviorError, Wd as RequiresOuterOf, Wl as HookErrorOutcome, Wn as asc, Wo as rank, Wr as returning, Ws as ColumnDefinitionConfig, Wt as JsonScalarKind, Wu as ExpressionSqlType, Xa as QuerySource, Xc as ExpressionGeneratedColumnDescriptor, Xd as VisibleDependenciesOf, Xi as SchemaDiagnostic, Xl as HookQueryOperation, Xn as jsonArrayFrom, Xo as call, Xr as GroupingValidation, Xs as ColumnInsertInput, Xt as RowLockMode, Ya as QueryAliasIdentity, Yc as ExpressionDefaultDescriptor, Yd as SubqueryMeta, Yi as Schema, Yl as HookOutcome, Yn as orderBy, Yo as upper, Yr as ClauseScope, Ys as ColumnIdentityOf, Yt as PortableCastType, Za as alias, Zc as ExternalDefaultDescriptor, Zd as WindowMeta, Zi as SchemaNamingPolicy, Zl as HookStreamEnd, Zn as jsonObjectFrom, Zo as schemaCall, Zr as MissingScope, Zs as ColumnIsGenerated, Zt as RowLockWaitPolicy, _a as FieldLikeOptions, _d as CardinalityOf, _f as SqlTextLike, _i as innerJoin, _n as SourceColumns, _o as SelectPart, _s as gte, _u as StreamingQueryAdapter, ad as bigintResultDecoder, af as SqlBoolean, ai as WithClause, al as IdentityOptionValue, an as QueryConfig, ao as SourceIndex, ar as defaultValues, as as SqlFragment, au as QubuExplainableTransactionalClient, ba as ForeignKeyOptions, bd as Fragment, bf as SqlTypeSatisfies, bi as rightJoin, bl as SchemaMetadataDiagnostic, bn as SourceIdentity, bo as RowLockClause, bs as like, bu as TransactionalQueryAdapter, ca as AnyKeyColumn, cc as ColumnStorageOf, cd as jsonTextResultDecoder, cf as SqlEqualityComparable, ci as withCte, cl as MysqlIdentityExtension, cn as QuerySqlTypeMap, co as TableIndex, cr as values, cs as sql, cu as QubuStreamingClient, da as CheckConstraint, dc as ColumnUpdateInput, dd as AggregateDependenciesOf, df as SqlJson, di as except, dl as SqliteIdentityExtension, dn as AnySource, do as DeclaredColumnNullability, ds as inQuery, du as QubuStreamingTransactionalClient, ea as SchemaTableNames, ec as ColumnOptions, ed as ResultDecoder, ei as ScopeValidation, el as GeneratedColumnMode, eo as IndexOptions, er as InsertSelectSource, es as count, eu as NestedTransactionalQueryAdapter, fa as CheckConstraintOptions, fd as AggregateMeta, ff as SqlNumericLike, fi as intersect, fo as and, fs as notExists, fu as QubuTransaction, ga as FieldLike, gc as PortableColumnStorage, gd as CardinalityMeta, gf as SqlText, gi as fullJoin, gl as identityColumn, gn as Source, go as OmittableSelectClause, gs as gt, gu as StreamableQuery, ha as ConstraintTiming, hd as CapabilityMetadataOf, hf as SqlSemanticType, hi as crossJoin, hl as generatedColumn, hn as ProvidedSourceRow, ho as Omit, hs as eq, hu as QueryExecutor, ic as ColumnStorageDeclarationOf, id as ResultShape, if as SqlBinary, ii as RecursiveCteSource, il as IdentityGeneration, in as Query, io as PostgresIndexExtension, ir as ValuesSource, is as sum, iu as QubuExplainableStreamingTransactionalClient, ja as SqliteConstraintExtension, jc as date, jd as NullabilityOf, ji as SchemaDialect, jl as AdapterExecutionResult, jn as AnyTable, jo as add, jr as MutationClause, ju as QueryValidationError, ka as SourceConstraintsRecord, kd as InheritedMetadataOf, ki as SelectionSqlTypes, ko as ClausePlacement, ks as isNull, ku as render, la as CatalogCheckExpression, lf as SqlEqualityCompatible, li as SetOperator, ll as ResolvedColumnBehavior, ln as QueryWithRow, lo as index, ls as caseWhen, lu as QubuStreamingExplainableClient, ma as ConstraintOptions, md as CapabilitiesOf, mf as SqlOrderable, mi as unionAll, ml as externalGeneratedColumn, mn as ProvidedSourceIdentity, mo as or, mu as QueryAdapter, na as SchemaTableRegistry, nc as ColumnSqlType, nd as ResultDecodingError, nf as AnySqlType, ni as SelectQuery, nl as IdentityDescriptor, no as IndexTermOptions, nr as InsertValue, ns as max, nu as QubuClient, oa as schema, oc as ColumnStorageDialectOf, od as booleanResultDecoder, of as SqlDate, oi as cte, ol as IdentityOptions, on as QueryKind, oo as SourceIndexesRecord, or as insertInto, os as SqlTag, ou as QubuHooks, pa as ConstraintDialectExtension, pc as NativeColumnStorage, pd as AnyFragment, pf as SqlOrderCompatible, pi as union, pl as externalDefault, po as not, ps as scalar, pu as QubuTransactionalClient, qa as LateralIdentity, qc as ColumnDefaultInput, qd as ResultMeta, ql as HookOperation, qn as nullsLast, qo as concat, qr as AvailableOuterScope, qs as ColumnHasDefault, qt as PaginationPart, qu as SchemaExpressionBrand, rc as ColumnStorage, rd as ResultField, rf as SqlBigInt, ri as CteSource, rl as IdentityDialectExtension, rn as AnyQuery, ro as MysqlIndexExtension, rr as InsertValuesRow, rs as min, ru as QubuExplainableClient, sc as ColumnStorageKindOf, sd as dateResultDecoder, sf as SqlDecimal, si as recursiveCte, sl as LiteralDefaultDescriptor, sn as QueryRow, so as SqliteIndexExtension, sr as insertSelect, ss as TypedSqlTag, su as QubuOptions, ta as SchemaTableRecord, tc as ColumnOutput, td as ResultDecoders, ti as SelectCardinality, tl as GeneratedDescriptor, to as IndexTerm, tr as InsertSource, ts as countDistinct, tu as OperationEndHook, ua as CatalogCheckSql, uc as ColumnStorageTypeOf, ud as timestampResultDecoder, uf as SqlInteger, ui as SetQuery, ul as SchemaLiteralValue, un as Row, us as exists, uu as QubuStreamingTransaction, va as ForeignKeyConstraint, vd as DependenciesOf, vf as SqlTimestamp, vi as leftJoin, vl as SchemaDialectExtension, vn as SourceConfig, vo as omit, vs as isDistinctFrom, vu as StreamingTransactionalQueryAdapter, wa as KeyConstraintOptions, wd as GroupingMeta, wi as FromSource, wn as SourceSqlTypeMap, wo as fetchNext, wr as UpdateAssignmentValue, ws as notLike, wu as qubu, xa as ForeignKeyTarget, xd as FragmentMeta, xf as SqlUnknown, xi as groupBy, xn as SourceKind, xo as RowLockOptions, xs as lt, xu as execute, ya as ForeignKeyMatch, yd as ExpressionMeta, yf as SqlTypeName, yi as naturalJoin, yl as SchemaDialectName, yn as SourceConstraints, yo as where, ys as isNotDistinctFrom, yu as TransactionOptions, za as foreignKey, zc as portableStorage, zd as RenderContext, zi as SchemaRenderContext, zl as ExplainPlanRow, zn as TableRow, zo as jsonNumber, zr as MutationSqlTypes, zs as cast, zt as DialectOptions, zu as Expression } from "./types-DcIiNePM.mjs";
|
|
2
2
|
export { type AdapterExecutionResult, type AggregateDependenciesOf, type AggregateMeta, type AliasIdentity, type AliasedSource, type AllowAllClause, type AnyExpression, type AnyFragment, type AnyKeyColumn, type AnyQuery, type AnySchemaExpression, type AnySelectClause, type AnySource, type AnySqlType, type AnyTable, type AvailableOuterScope, type AvailableScope, type CanonicalLiteral, type CapabilitiesOf, type CapabilityMetadataOf, type CardinalityMeta, type CardinalityOf, type CastTarget, type CatalogCheckExpression, type CatalogCheckSql, type CheckConstraint, type CheckConstraintOptions, type ClausePlacement, type ClauseScope, type ColumnBehaviorError, type ColumnBehaviorErrorCode, type ColumnCodec, type ColumnDefault, type ColumnDefaultInput, type ColumnDefaultOf, type ColumnDefinition, type ColumnDefinitionConfig, type ColumnDependency, type ColumnGeneratedOf, type ColumnHasDefault, type ColumnHasRuntimeDefault, type ColumnIdentityOf, type ColumnInsertInput, type ColumnIsGenerated, type ColumnOnUpdateOf, type ColumnOptions, type ColumnOutput, type ColumnReference, type ColumnSqlType, type ColumnStorage, type ColumnStorageDeclarationOf, type ColumnStorageDialectOf, type ColumnStorageKindOf, type ColumnStorageOf, type ColumnStorageTypeOf, type ColumnUpdateInput, type ConstraintDialectExtension, type ConstraintOptions, type ConstraintTiming, type CteSource, type DeclaredColumnNullability, type DecodableResultType, type DefaultDescriptor, type DefaultValuesSource, type DependenciesOf, type Dialect, type DialectCapability, type DialectCastTypes, type DialectExplain, type DialectJson, type DialectOptions, type DialectPagination, type DialectRowLocking, type DriverValueEncoder, type ExecutionOptions, type ExecutionRequest, type ExecutionResult, type ExplainFormat, type ExplainMutationOptions, type ExplainOptions, type ExplainOptionsFor, type ExplainPlanRow, type ExplainReadOptions, type ExplainRenderOptions, type ExplainRequest, type ExplainResult, type ExplainableQueryAdapter, type Expression, type ExpressionDefaultDescriptor, type ExpressionGeneratedColumnDescriptor, type ExpressionKind, type ExpressionMeta, type ExpressionNullability, type ExpressionOutput, type ExpressionRequires, type ExpressionSqlType, type ExpressionWithOutput, type ExternalDefaultDescriptor, type ExternalGeneratedColumnDescriptor, type FieldLike, type FieldLikeOptions, type ForeignKeyConstraint, type ForeignKeyMatch, type ForeignKeyOptions, type ForeignKeyTarget, type ForeignKeyTargetInput, type Fragment, type FragmentMeta, type FromClause, type FromScope, type FromSource, type GeneratedColumnDescriptor, type GeneratedColumnMode, type GeneratedDescriptor, type GroupingDependenciesOf, type GroupingKeysOf, type GroupingMeta, type GroupingValidation, type HasAggregate, type HasSubquery, type HasWindow, type HookErrorOutcome, type HookMetadata, type HookMetadataValue, type HookOperation, type HookOperationKind, type HookOutcome, type HookQueryOperation, type HookStreamEnd, type HookSuccessOutcome, type HookTransactionOperation, type IdentityDescriptor, type IdentityDialectExtension, type IdentityGeneration, type IdentityOptionValue, type IdentityOptions, type IndexDialectExtension, type IndexOptions, type IndexTerm, type IndexTermOptions, type InheritedMetadata, type InheritedMetadataOf, type InsertSelectSource, type InsertSource, type InsertValue, type InsertValuesRow, type JsonPath, type JsonScalarKind, type KeyConstraint, type KeyConstraintOptions, type LateralIdentity, type LateralSource, type LiteralDefaultDescriptor, type MetadataOf, type MissingScope, type MutationClause, type MutationKind, type MutationQuery, type MutationQueryConfig, type MutationReturning, type MutationReturningClause, type MutationRow, type MutationScopeValidation, type MutationSqlTypes, type MysqlConstraintExtension, type MysqlIdentityExtension, type MysqlIndexExtension, type NamedCastTarget, type NativeColumnStorage, type NestedTransactionalQueryAdapter, type NullabilityOf, type NullableSourceMeta, type NullableSourcesOf, type Omit, type OmittableSelectClause, type OperationEndHook, type OrderTerm, type OutputOf, type PaginationKind, type PaginationPart, type PortableCastTarget, type PortableCastType, type PortableColumnStorage, type PostgresConstraintExtension, type PostgresIndexExtension, type ProvidedSourceIdentity, type ProvidedSourceRow, type ProvidesOuterOf, type ProvidesOuterSourceMeta, type ProvidesSourceMeta, type QubuClient, type QubuExplainableClient, type QubuExplainableStreamingTransactionalClient, type QubuExplainableTransactionalClient, type QubuHooks, type QubuOptions, type QubuStreamingClient, type QubuStreamingExplainableClient, type QubuStreamingTransaction, type QubuStreamingTransactionalClient, type QubuTransaction, type QubuTransactionalClient, type Query, type QueryAdapter, type QueryAliasIdentity, type QueryCardinality, type QueryConfig, type QueryExecutor, type QueryKind, type QueryRow, type QuerySource, type QuerySqlTypeMap, type QueryTypeValidation, QueryValidationError, type QueryValidationErrorCode, type QueryValidationIssue, type QueryWithRow, type RecursiveCteSource, type ReferentialAction, type RenderContext, type RenderFunction, type RenderOptions, type RenderedQuery, type RenderedSchemaExpression, type RequiredOuterScope, type RequiredScope, type RequiresCapabilityMeta, type RequiresOf, type RequiresOuterMetadataOf, type RequiresOuterOf, type RequiresOuterSourceMeta, type RequiresSourceMeta, type ResolvedColumnBehavior, type ResultDecodeContext, type ResultDecoder, type ResultDecoders, ResultDecodingError, type ResultField, type ResultMeta, type ResultShape, type ReturningClause, type ReturningRow, type ReturningSqlTypes, type Row, type RowLockClause, type RowLockMode, type RowLockOptions, type RowLockWaitPolicy, type Schema, type SchemaDiagnostic, type SchemaDialect, type SchemaDialectExtension, type SchemaDialectHooks, type SchemaDialectName, type SchemaExpression, type SchemaExpressionBrand, type SchemaExpressionErrorCode, type SchemaExpressionInput, type SchemaExpressionMode, type SchemaLiteralRenderer, type SchemaLiteralValue, type SchemaMetadataDiagnostic, type SchemaNamingPolicy, type SchemaObjectIdentity, type SchemaObjectNameOptions, type SchemaOptions, type SchemaRenderContext, type SchemaRenderOptions, type SchemaTableEntry, type SchemaTableNames, type SchemaTableRecord, type SchemaTableRegistry, type ScopeValidation, type SelectCardinality, type SelectClause, type SelectPart, type SelectQuery, type Selection, type SelectionObject, type SelectionOutput, type SelectionSqlTypes, type SetOperator, type SetQuery, type Source, type SourceColumns, type SourceConfig, type SourceConstraint, type SourceConstraints, type SourceConstraintsRecord, type SourceIdentity, type SourceIndex, type SourceIndexesRecord, type SourceKind, type SourceLike, type SourceProvision, type SourceRow, type SourceSqlTypeMap, type SqlBigInt, type SqlBinary, type SqlBoolean, type SqlDate, type SqlDecimal, type SqlEqualityComparable, type SqlEqualityCompatible, type SqlFragment, type SqlInteger, type SqlJson, type SqlNumericLike, type SqlOrderCompatible, type SqlOrderable, type SqlSemanticType, type SqlTag, type SqlText, type SqlTextLike, type SqlTimestamp, type SqlTypeName, type SqlTypeOf, type SqlTypeSatisfies, type SqlUnknown, type SqlUuid, type SqliteConstraintExtension, type SqliteIdentityExtension, type SqliteIndexExtension, type StreamableQuery, type StreamingQueryAdapter, type StreamingTransactionalQueryAdapter, type SubqueryMeta, type Table, type TableColumns, type TableDefinitions, type TableIdentity, type TableIndex, type TableInsertInput, type TableLike, type TableRow, type TableSqlTypes, type TableUpdateInput, type TransactionOptions, type TransactionalQueryAdapter, type TypedSqlTag, type UniqueConstraint, type UniqueConstraintOptions, type UniqueNullSemantics, type UnsafeSchemaSqlExpression, type UpdateAssignmentValue, type UpdateAssignments, type ValuesSource, type VisibleDependenciesOf, type WindowMeta, type WithClause, add, alias, all, allowAll, and, asValue, asc, avg, between, bigint, bigintResultDecoder, binary, boolean, booleanResultDecoder, call, caseWhen, cast, catalogCheck, catalogForeignKey, check, coalesce, column, concat, correlate, count, countDistinct, crossJoin, cte, date, dateResultDecoder, defaultValues, deleteFrom, denseRank, desc, distinct, divide, eq, except, execute, executeRows, exists, explain, externalDefault, externalGeneratedColumn, fetchFirst, fetchNext, foreignKey, from, fullJoin, generatedColumn, groupBy, gt, gte, having, identityColumn, inList, inQuery, index, innerJoin, insertInto, insertSelect, integer, intersect, isDistinctFrom, isNotDistinctFrom, isNotNull, isNull, isTrue, json, jsonArrayFrom, jsonBoolean, jsonExists, jsonNumber, jsonObjectFrom, jsonPath, jsonText, jsonTextResultDecoder, lateral, leftJoin, like, lower, lt, lte, mapResult, max, min, modulo, multiply, nativeColumn, nativeStorage, naturalJoin, ne, not, notExists, notIn, notLike, nullable, nullsFirst, nullsLast, numeric, offset, omit, or, order, orderBy, over, portableStorage, primaryKey, qubu, rank, recursiveCte, references, render, returning, rightJoin, rowLock, rowNumber, scalar, schema, schemaCall, select, sql, stream, subtract, sum, table, text, timestamp, timestampResultDecoder, union, unionAll, unique, uniqueConstraint, unsafeSchemaSql, update, upper, uuid, value, values, where, withCte };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-
|
|
1
|
+
import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-CdcYI0lU.mjs";
|
|
2
2
|
//#region src/introspection/mysql.d.ts
|
|
3
3
|
declare const mysqlServerQuery = "SELECT VERSION() AS version, @@version_comment AS version_comment";
|
|
4
4
|
declare const mysqlTablesQuery = "\n SELECT TABLE_NAME AS table_name, TABLE_TYPE AS table_type,\n ENGINE AS engine, TABLE_COLLATION AS table_collation,\n CREATE_OPTIONS AS create_options, TABLE_COMMENT AS table_comment\n FROM INFORMATION_SCHEMA.TABLES\n WHERE TABLE_SCHEMA = ?\n ORDER BY TABLE_NAME\n";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-
|
|
1
|
+
import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-CdcYI0lU.mjs";
|
|
2
2
|
//#region src/introspection/postgres.d.ts
|
|
3
3
|
/** Fixed server metadata query used by the PostgreSQL catalog reader. */
|
|
4
4
|
declare const postgresServerQuery = "\n SELECT\n current_setting('server_version_num') AS server_version_num,\n current_setting('server_version') AS server_version\n";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-
|
|
1
|
+
import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-CdcYI0lU.mjs";
|
|
2
2
|
//#region src/introspection/sqlite.d.ts
|
|
3
3
|
declare const sqliteServerQuery = "SELECT sqlite_version() AS version, sqlite_source_id() AS source_id";
|
|
4
4
|
declare const sqliteDatabaseListQuery = "\n SELECT seq, name, file\n FROM pragma_database_list()\n ORDER BY seq\n";
|
package/dist/introspection.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { $ as CatalogStorageType, A as CatalogNamespace, At as hasIntrospectionErrors, B as CatalogPolicy, C as CatalogForeignKeyTarget, Ct as introspectedPhysicalIdentityPolicy, D as CatalogIndexTerm, Dt as IntrospectionDiagnosticSeverity, E as CatalogIndex, Et as IntrospectionDiagnosticInput, F as CatalogObjectOwnerKind, G as CatalogQueryRow, H as CatalogPrimaryKeyConstraint, I as CatalogObjectReference, J as CatalogRoutineParameter, K as CatalogReference, L as CatalogOpaqueObject, M as CatalogObjectBase, Mt as CatalogQuery, N as CatalogObjectMetadata, Nt as CatalogQueryOptions, O as CatalogIntrospector, Ot as IntrospectionError, P as CatalogObjectOwner, Q as CatalogSqlExpression, R as CatalogOwnership, S as CatalogForeignKeyConstraint, St as CatalogResolvedIdentity, T as CatalogIdentity, Tt as IntrospectionDiagnosticCode, U as CatalogProvenance, V as CatalogPortableStorageType, W as CatalogProvenanceKind, X as CatalogSequence, Y as CatalogScalar, Z as CatalogServerInfo, _ as CatalogEntityReference, _t as CatalogIdentityHint, a as CatalogCollation, at as CatalogValueFact, b as CatalogExpressionFact, bt as CatalogIdentitySource, c as CatalogCompleteObject, ct as CompleteIntrospectionCatalog, d as CatalogDeferredObject, dt as IntrospectionMode, et as CatalogTable, f as CatalogDeferredObjectKind, ft as IntrospectionOptions, g as CatalogEntityKind, gt as CatalogIdentityFallback, h as CatalogDomain, ht as CatalogIdentityEntityKind, i as CatalogClassificationConfidence, it as CatalogUnknownObject, j as CatalogObject, jt as CatalogConnection, k as CatalogLiteralFact, kt as createIntrospectionDiagnostic, l as CatalogConstraint, lt as IntrospectionCatalog, m as CatalogDialectExtension, mt as IntrospectionSuccess, n as CatalogCatalogReference, nt as CatalogUniqueConstraint, o as CatalogColumn, ot as CatalogVersion, p as CatalogDialect, pt as IntrospectionResult, q as CatalogRoutine, r as CatalogCheckConstraint, rt as CatalogUnknownField, s as CatalogComment, st as CatalogView, t as CatalogCapabilities, tt as CatalogTrigger, u as CatalogData, ut as IntrospectionFailure, v as CatalogEnum, vt as CatalogIdentityHints, w as CatalogGeneratedColumn, wt as IntrospectionDiagnostic, x as CatalogExtensionObject, xt as CatalogPreviousSnapshotIdentitySource, y as CatalogEnumValue, yt as CatalogIdentityPolicy, z as CatalogPartition } from "./types-
|
|
2
|
-
import { B as CompleteSchemaSnapshot } from "./types-
|
|
1
|
+
import { $ as CatalogStorageType, A as CatalogNamespace, At as hasIntrospectionErrors, B as CatalogPolicy, C as CatalogForeignKeyTarget, Ct as introspectedPhysicalIdentityPolicy, D as CatalogIndexTerm, Dt as IntrospectionDiagnosticSeverity, E as CatalogIndex, Et as IntrospectionDiagnosticInput, F as CatalogObjectOwnerKind, G as CatalogQueryRow, H as CatalogPrimaryKeyConstraint, I as CatalogObjectReference, J as CatalogRoutineParameter, K as CatalogReference, L as CatalogOpaqueObject, M as CatalogObjectBase, Mt as CatalogQuery, N as CatalogObjectMetadata, Nt as CatalogQueryOptions, O as CatalogIntrospector, Ot as IntrospectionError, P as CatalogObjectOwner, Q as CatalogSqlExpression, R as CatalogOwnership, S as CatalogForeignKeyConstraint, St as CatalogResolvedIdentity, T as CatalogIdentity, Tt as IntrospectionDiagnosticCode, U as CatalogProvenance, V as CatalogPortableStorageType, W as CatalogProvenanceKind, X as CatalogSequence, Y as CatalogScalar, Z as CatalogServerInfo, _ as CatalogEntityReference, _t as CatalogIdentityHint, a as CatalogCollation, at as CatalogValueFact, b as CatalogExpressionFact, bt as CatalogIdentitySource, c as CatalogCompleteObject, ct as CompleteIntrospectionCatalog, d as CatalogDeferredObject, dt as IntrospectionMode, et as CatalogTable, f as CatalogDeferredObjectKind, ft as IntrospectionOptions, g as CatalogEntityKind, gt as CatalogIdentityFallback, h as CatalogDomain, ht as CatalogIdentityEntityKind, i as CatalogClassificationConfidence, it as CatalogUnknownObject, j as CatalogObject, jt as CatalogConnection, k as CatalogLiteralFact, kt as createIntrospectionDiagnostic, l as CatalogConstraint, lt as IntrospectionCatalog, m as CatalogDialectExtension, mt as IntrospectionSuccess, n as CatalogCatalogReference, nt as CatalogUniqueConstraint, o as CatalogColumn, ot as CatalogVersion, p as CatalogDialect, pt as IntrospectionResult, q as CatalogRoutine, r as CatalogCheckConstraint, rt as CatalogUnknownField, s as CatalogComment, st as CatalogView, t as CatalogCapabilities, tt as CatalogTrigger, u as CatalogData, ut as IntrospectionFailure, v as CatalogEnum, vt as CatalogIdentityHints, w as CatalogGeneratedColumn, wt as IntrospectionDiagnostic, x as CatalogExtensionObject, xt as CatalogPreviousSnapshotIdentitySource, y as CatalogEnumValue, yt as CatalogIdentityPolicy, z as CatalogPartition } from "./types-CdcYI0lU.mjs";
|
|
2
|
+
import { B as CompleteSchemaSnapshot } from "./types-DcIiNePM.mjs";
|
|
3
|
+
import "./index-DB07P2X8.mjs";
|
|
3
4
|
//#region src/introspection/catalog.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Materialize every optional object-family collection and deeply freeze the normalized catalog.
|
package/dist/introspection.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as createCompleteIntrospectionCatalog, i as introspectedPhysicalIdentityPolicy, n as mapCatalogToCompleteSnapshot, o as freezeIntrospectionCatalog, r as mapCatalogToSnapshotV1, s as toIntrospectionCatalog, t as mapCatalogToSnapshot } from "./snapshot-
|
|
1
|
+
import { a as createCompleteIntrospectionCatalog, i as introspectedPhysicalIdentityPolicy, n as mapCatalogToCompleteSnapshot, o as freezeIntrospectionCatalog, r as mapCatalogToSnapshotV1, s as toIntrospectionCatalog, t as mapCatalogToSnapshot } from "./snapshot-C1x2R-iK.mjs";
|
|
2
2
|
import { n as createIntrospectionDiagnostic, r as hasIntrospectionErrors, t as IntrospectionError } from "./diagnostics-I9vVtXkc.mjs";
|
|
3
3
|
export { IntrospectionError, createCompleteIntrospectionCatalog, createIntrospectionDiagnostic, freezeIntrospectionCatalog, hasIntrospectionErrors, introspectedPhysicalIdentityPolicy, mapCatalogToCompleteSnapshot, mapCatalogToSnapshot, mapCatalogToSnapshotV1, toIntrospectionCatalog };
|
package/dist/mysql.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cr as onDuplicateKeyUpdate, Pt as Dialect, Sr as incoming, br as IncomingIdentity, xr as OnDuplicateKeyUpdateClause, yr as IncomingColumns } from "./types-
|
|
1
|
+
import { Cr as onDuplicateKeyUpdate, Pt as Dialect, Sr as incoming, br as IncomingIdentity, xr as OnDuplicateKeyUpdateClause, yr as IncomingColumns } from "./types-DcIiNePM.mjs";
|
|
2
2
|
//#region src/dialects/mysql.d.ts
|
|
3
|
-
declare function mysqlDialect(): Dialect<"row-locking" | "on-duplicate-key-update"
|
|
3
|
+
declare function mysqlDialect(): Dialect<"json" | "row-locking" | "on-duplicate-key-update">;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { type IncomingColumns, type IncomingIdentity, type OnDuplicateKeyUpdateClause, incoming, mysqlDialect, onDuplicateKeyUpdate };
|
package/dist/postgres.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ad as MetadataOf, Dr as UpdateFromClause, Gu as ExpressionWithOutput, Ku as SchemaExpression, Ms as OperandNullability, Ns as OperandSqlType, Or as UpdateFromScope, Ps as SqlCapabilityValidation, Pt as Dialect, Vd as RequiresCapabilityMeta, _f as SqlTextLike, _r as excluded, af as SqlBoolean, dr as DoNothingAction, fr as DoUpdateAction, gr as doUpdate, hr as doNothing, js as Operand, kr as updateFrom, lr as ConflictAction, mr as OnConflictClause, ms as ComparisonValidation, nf as AnySqlType, pr as ExcludedSource, qd as ResultMeta, ur as ConflictTarget, vr as onConflict, xf as SqlUnknown, yd as ExpressionMeta } from "./types-
|
|
1
|
+
import { Ad as MetadataOf, Dr as UpdateFromClause, Gu as ExpressionWithOutput, Ku as SchemaExpression, Ms as OperandNullability, Ns as OperandSqlType, Or as UpdateFromScope, Ps as SqlCapabilityValidation, Pt as Dialect, Vd as RequiresCapabilityMeta, _f as SqlTextLike, _r as excluded, af as SqlBoolean, dr as DoNothingAction, fr as DoUpdateAction, gr as doUpdate, hr as doNothing, js as Operand, kr as updateFrom, lr as ConflictAction, mr as OnConflictClause, ms as ComparisonValidation, nf as AnySqlType, pr as ExcludedSource, qd as ResultMeta, ur as ConflictTarget, vr as onConflict, xf as SqlUnknown, yd as ExpressionMeta } from "./types-DcIiNePM.mjs";
|
|
2
2
|
//#region src/dialects/postgres.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* PostgreSQL's only core rendering difference is positional parameters. PostgreSQL-specific
|
|
5
5
|
* expressions and clauses should remain separate modules.
|
|
6
6
|
*/
|
|
7
|
-
declare function postgresDialect(): Dialect<"
|
|
7
|
+
declare function postgresDialect(): Dialect<"on-conflict" | "json" | "ilike" | "row-locking" | "update-from">;
|
|
8
8
|
/** PostgreSQL's case-insensitive pattern-match operator. */
|
|
9
9
|
declare function ilike<TLeft extends ExpressionWithOutput<string>, R extends Operand<string>>(left: TLeft & ComparisonValidation<TLeft, R, "ILIKE">, pattern: R): SchemaExpression<ResultMeta<boolean, ((MetadataOf<TLeft & SqlCapabilityValidation<(MetadataOf<TLeft> extends (infer T) ? T extends MetadataOf<TLeft> ? T extends {
|
|
10
10
|
readonly kind: "result";
|
package/dist/schema.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $a as IndexDialectExtension, $c as GeneratedColumnDescriptor, $i as SchemaTableEntry, $s as ColumnOnUpdateOf, Aa as SourceLike, Ac as columnSqlType, Al as materializeSchemaObjectRecord, An as sourceIdentity, Ba as primaryKey, Bc as text, Bi as SchemaRenderOptions, Bn as TableSqlTypes, Ca as KeyConstraint, Cc as StorageOf, Cl as SchemaObjectNameOptions, Cn as SourceRow, Da as ReferentialAction, Dc as boolean, Dl as generatedSchemaObjectName, Dn as createSource, Ea as PostgresConstraintExtension, Ec as binary, El as freezeSchemaMetadata, En as UnknownSourceSqlTypes, Fa as UniqueNullSemantics, Fc as nativeColumn, Fi as SchemaExpressionError, Fn as TableIdentity, Ga as AliasIdentity, Gc as ColumnBehaviorErrorCode, Gi as renderSchemaExpression, Gs as ColumnFromOptions, Ha as unique, Hc as uuid, Hi as defineSchemaExpression, Hn as table, Hs as ColumnDefaultOf, Ia as catalogCheck, Ic as nativeStorage, Ii as SchemaExpressionErrorCode, In as TableInsertInput, Ja as LateralSource, Jc as DefaultDescriptor, Ji as unsafeSchemaSql, Js as ColumnHasRuntimeDefault, Ka as AliasedSource, Kc as ColumnDefault, Ki as renderSchemaSql, Ks as ColumnGeneratedOf, La as catalogForeignKey, Lc as nullable, Li as SchemaExpressionInput, Ln as TableMetadataCallback, Ma as TableLike, Mc as encodeColumnParameter, Mi as SchemaDialectHooks, Mn as Table, Na as UniqueConstraint, Nc as integer, Ni as createSchemaDialect, Nn as TableColumns, Oa as SourceConstraint, Oc as column, Ol as isValidSchemaObjectName, On as customSource, Pa as UniqueConstraintOptions, Pc as json, Pi as RenderedSchemaExpression, Pn as TableDefinitions, Qa as lateral, Qc as ExternalGeneratedColumnDescriptor, Qi as SchemaOptions, Qs as ColumnIsNullable, Ra as check, Rc as numeric, Ri as SchemaExpressionMode, Rn as TableOptions, Sa as ForeignKeyTargetInput, Sc as StorageDialectOf, Sl as SchemaObjectIdentity, Sn as SourceProvision, Ta as MysqlConstraintExtension, Tc as bigint, Tl as dialectMismatchDiagnostic, Tn as SourceSqlTypes, Ua as uniqueConstraint, Uc as CanonicalLiteral, Ui as isUnsafeSchemaSql, Us as ColumnDefinition, Va as references, Vc as timestamp, Vi as UnsafeSchemaSqlExpression, Vn as TableUpdateInput, Vs as ColumnCodec, Wa as validateConstraintDialect, Wc as ColumnBehaviorError, Wi as normalizeSchemaSql, Ws as ColumnDefinitionConfig, Xa as QuerySource, Xc as ExpressionGeneratedColumnDescriptor, Xi as SchemaDiagnostic, Xs as ColumnInsertInput, Ya as QueryAliasIdentity, Yc as ExpressionDefaultDescriptor, Yi as Schema, Ys as ColumnIdentityOf, Za as alias, Zc as ExternalDefaultDescriptor, Zi as SchemaNamingPolicy, Zs as ColumnIsGenerated, _a as FieldLikeOptions, _c as PortableStorage, _l as resolveColumnBehavior, _n as SourceColumns, aa as generatedTableName, ac as ColumnStorageDescriptor, al as IdentityOptionValue, ao as SourceIndex, ba as ForeignKeyOptions, bc as StorageDeclarationOf, bl as SchemaMetadataDiagnostic, bn as SourceIdentity, ca as AnyKeyColumn, cc as ColumnStorageOf, cl as MysqlIdentityExtension, co as TableIndex, da as CheckConstraint, dc as ColumnUpdateInput, dl as SqliteIdentityExtension, dn as AnySource, do as DeclaredColumnNullability, ea as SchemaTableNames, ec as ColumnOptions, el as GeneratedColumnMode, eo as IndexOptions, fa as CheckConstraintOptions, fc as DialectNativeStorage, fl as canonicalLiteral, fn as CustomSource, ga as FieldLike, gc as PortableColumnStorage, gl as identityColumn, gn as Source, ha as ConstraintTiming, hc as NativeStorageDescriptor, hl as generatedColumn, hn as ProvidedSourceRow, ia as defaultSchemaNamingPolicy, ic as ColumnStorageDeclarationOf, il as IdentityGeneration, io as PostgresIndexExtension, ja as SqliteConstraintExtension, jc as date, ji as SchemaDialect, jn as AnyTable, ka as SourceConstraintsRecord, kc as columnResultValue, kl as materializeSchemaObjectIdentity, kn as exposeColumns, la as CatalogCheckExpression, lc as ColumnStorageType, ll as ResolvedColumnBehavior, lo as index, ma as ConstraintOptions, mc as NativeStorage, ml as externalGeneratedColumn, mn as ProvidedSourceIdentity, na as SchemaTableRegistry, nc as ColumnSqlType, nl as IdentityDescriptor, no as IndexTermOptions, oa as schema, oc as ColumnStorageDialectOf, ol as IdentityOptions, oo as SourceIndexesRecord, pa as ConstraintDialectExtension, pc as NativeColumnStorage, pl as externalDefault, pn as CustomSourceOptions, qa as LateralIdentity, qc as ColumnDefaultInput, qi as schemaExpression, qs as ColumnHasDefault, ra as SchemaValidationError, rc as ColumnStorage, rl as IdentityDialectExtension, ro as MysqlIndexExtension, sa as schemaNamingPolicyVersion, sc as ColumnStorageKindOf, sl as LiteralDefaultDescriptor, so as SqliteIndexExtension, ta as SchemaTableRecord, tc as ColumnOutput, tl as GeneratedDescriptor, to as IndexTerm, ua as CatalogCheckSql, uc as ColumnStorageTypeOf, ul as SchemaLiteralValue, uo as validateIndexDialect, va as ForeignKeyConstraint, vc as PortableStorageDescriptor, vl as SchemaDialectExtension, vn as SourceConfig, wa as KeyConstraintOptions, wc as StorageTypeOf, wl as assertSchemaDialectSupport, wn as SourceSqlTypeMap, xa as ForeignKeyTarget, xc as StorageDescriptor, xl as SchemaMetadataValidationError, xn as SourceKind, ya as ForeignKeyMatch, yc as PortableStorageType, yl as SchemaDialectName, yn as SourceConstraints, za as foreignKey, zc as portableStorage, zi as SchemaRenderContext, zn as TableRow } from "./types-
|
|
1
|
+
import { $a as IndexDialectExtension, $c as GeneratedColumnDescriptor, $i as SchemaTableEntry, $s as ColumnOnUpdateOf, Aa as SourceLike, Ac as columnSqlType, Al as materializeSchemaObjectRecord, An as sourceIdentity, Ba as primaryKey, Bc as text, Bi as SchemaRenderOptions, Bn as TableSqlTypes, Ca as KeyConstraint, Cc as StorageOf, Cl as SchemaObjectNameOptions, Cn as SourceRow, Da as ReferentialAction, Dc as boolean, Dl as generatedSchemaObjectName, Dn as createSource, Ea as PostgresConstraintExtension, Ec as binary, El as freezeSchemaMetadata, En as UnknownSourceSqlTypes, Fa as UniqueNullSemantics, Fc as nativeColumn, Fi as SchemaExpressionError, Fn as TableIdentity, Ga as AliasIdentity, Gc as ColumnBehaviorErrorCode, Gi as renderSchemaExpression, Gs as ColumnFromOptions, Ha as unique, Hc as uuid, Hi as defineSchemaExpression, Hn as table, Hs as ColumnDefaultOf, Ia as catalogCheck, Ic as nativeStorage, Ii as SchemaExpressionErrorCode, In as TableInsertInput, Ja as LateralSource, Jc as DefaultDescriptor, Ji as unsafeSchemaSql, Js as ColumnHasRuntimeDefault, Ka as AliasedSource, Kc as ColumnDefault, Ki as renderSchemaSql, Ks as ColumnGeneratedOf, La as catalogForeignKey, Lc as nullable, Li as SchemaExpressionInput, Ln as TableMetadataCallback, Ma as TableLike, Mc as encodeColumnParameter, Mi as SchemaDialectHooks, Mn as Table, Na as UniqueConstraint, Nc as integer, Ni as createSchemaDialect, Nn as TableColumns, Oa as SourceConstraint, Oc as column, Ol as isValidSchemaObjectName, On as customSource, Pa as UniqueConstraintOptions, Pc as json, Pi as RenderedSchemaExpression, Pn as TableDefinitions, Qa as lateral, Qc as ExternalGeneratedColumnDescriptor, Qi as SchemaOptions, Qs as ColumnIsNullable, Ra as check, Rc as numeric, Ri as SchemaExpressionMode, Rn as TableOptions, Sa as ForeignKeyTargetInput, Sc as StorageDialectOf, Sl as SchemaObjectIdentity, Sn as SourceProvision, Ta as MysqlConstraintExtension, Tc as bigint, Tl as dialectMismatchDiagnostic, Tn as SourceSqlTypes, Ua as uniqueConstraint, Uc as CanonicalLiteral, Ui as isUnsafeSchemaSql, Us as ColumnDefinition, Va as references, Vc as timestamp, Vi as UnsafeSchemaSqlExpression, Vn as TableUpdateInput, Vs as ColumnCodec, Wa as validateConstraintDialect, Wc as ColumnBehaviorError, Wi as normalizeSchemaSql, Ws as ColumnDefinitionConfig, Xa as QuerySource, Xc as ExpressionGeneratedColumnDescriptor, Xi as SchemaDiagnostic, Xs as ColumnInsertInput, Ya as QueryAliasIdentity, Yc as ExpressionDefaultDescriptor, Yi as Schema, Ys as ColumnIdentityOf, Za as alias, Zc as ExternalDefaultDescriptor, Zi as SchemaNamingPolicy, Zs as ColumnIsGenerated, _a as FieldLikeOptions, _c as PortableStorage, _l as resolveColumnBehavior, _n as SourceColumns, aa as generatedTableName, ac as ColumnStorageDescriptor, al as IdentityOptionValue, ao as SourceIndex, ba as ForeignKeyOptions, bc as StorageDeclarationOf, bl as SchemaMetadataDiagnostic, bn as SourceIdentity, ca as AnyKeyColumn, cc as ColumnStorageOf, cl as MysqlIdentityExtension, co as TableIndex, da as CheckConstraint, dc as ColumnUpdateInput, dl as SqliteIdentityExtension, dn as AnySource, do as DeclaredColumnNullability, ea as SchemaTableNames, ec as ColumnOptions, el as GeneratedColumnMode, eo as IndexOptions, fa as CheckConstraintOptions, fc as DialectNativeStorage, fl as canonicalLiteral, fn as CustomSource, ga as FieldLike, gc as PortableColumnStorage, gl as identityColumn, gn as Source, ha as ConstraintTiming, hc as NativeStorageDescriptor, hl as generatedColumn, hn as ProvidedSourceRow, ia as defaultSchemaNamingPolicy, ic as ColumnStorageDeclarationOf, il as IdentityGeneration, io as PostgresIndexExtension, ja as SqliteConstraintExtension, jc as date, ji as SchemaDialect, jn as AnyTable, ka as SourceConstraintsRecord, kc as columnResultValue, kl as materializeSchemaObjectIdentity, kn as exposeColumns, la as CatalogCheckExpression, lc as ColumnStorageType, ll as ResolvedColumnBehavior, lo as index, ma as ConstraintOptions, mc as NativeStorage, ml as externalGeneratedColumn, mn as ProvidedSourceIdentity, na as SchemaTableRegistry, nc as ColumnSqlType, nl as IdentityDescriptor, no as IndexTermOptions, oa as schema, oc as ColumnStorageDialectOf, ol as IdentityOptions, oo as SourceIndexesRecord, pa as ConstraintDialectExtension, pc as NativeColumnStorage, pl as externalDefault, pn as CustomSourceOptions, qa as LateralIdentity, qc as ColumnDefaultInput, qi as schemaExpression, qs as ColumnHasDefault, ra as SchemaValidationError, rc as ColumnStorage, rl as IdentityDialectExtension, ro as MysqlIndexExtension, sa as schemaNamingPolicyVersion, sc as ColumnStorageKindOf, sl as LiteralDefaultDescriptor, so as SqliteIndexExtension, ta as SchemaTableRecord, tc as ColumnOutput, tl as GeneratedDescriptor, to as IndexTerm, ua as CatalogCheckSql, uc as ColumnStorageTypeOf, ul as SchemaLiteralValue, uo as validateIndexDialect, va as ForeignKeyConstraint, vc as PortableStorageDescriptor, vl as SchemaDialectExtension, vn as SourceConfig, wa as KeyConstraintOptions, wc as StorageTypeOf, wl as assertSchemaDialectSupport, wn as SourceSqlTypeMap, xa as ForeignKeyTarget, xc as StorageDescriptor, xl as SchemaMetadataValidationError, xn as SourceKind, ya as ForeignKeyMatch, yc as PortableStorageType, yl as SchemaDialectName, yn as SourceConstraints, za as foreignKey, zc as portableStorage, zi as SchemaRenderContext, zn as TableRow } from "./types-DcIiNePM.mjs";
|
|
2
2
|
export { AliasIdentity, AliasedSource, AnyKeyColumn, AnySource, AnyTable, CanonicalLiteral, CatalogCheckExpression, CatalogCheckSql, CheckConstraint, CheckConstraintOptions, ColumnBehaviorError, ColumnBehaviorErrorCode, ColumnCodec, ColumnDefault, ColumnDefaultInput, ColumnDefaultOf, ColumnDefinition, ColumnDefinitionConfig, ColumnFromOptions, ColumnGeneratedOf, ColumnHasDefault, ColumnHasRuntimeDefault, 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, IdentityOptionValue, IdentityOptions, IndexDialectExtension, IndexOptions, IndexTerm, IndexTermOptions, 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, columnSqlType, createSchemaDialect, createSource, customSource, date, defaultSchemaNamingPolicy, defineSchemaExpression, dialectMismatchDiagnostic, encodeColumnParameter, 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,4 +1,4 @@
|
|
|
1
|
-
import { B as CompleteSchemaSnapshot, T as SnapshotJsonValue, V as CompleteSchemaSnapshotInput, Y as CompleteSnapshotDecodeResult, Yi as Schema, f as SnapshotDiagnostic, i as SchemaSnapshotInput, ji as SchemaDialect, l as SnapshotCreateResult, n as SchemaSnapshot, r as SchemaSnapshotAdapter, u as SnapshotDecodeResult } from "./types-
|
|
1
|
+
import { B as CompleteSchemaSnapshot, T as SnapshotJsonValue, V as CompleteSchemaSnapshotInput, Y as CompleteSnapshotDecodeResult, Yi as Schema, f as SnapshotDiagnostic, i as SchemaSnapshotInput, ji as SchemaDialect, l as SnapshotCreateResult, n as SchemaSnapshot, r as SchemaSnapshotAdapter, u as SnapshotDecodeResult } from "./types-DcIiNePM.mjs";
|
|
2
2
|
//#region src/snapshot/canonical.d.ts
|
|
3
3
|
/** Error raised when a value cannot cross the canonical JSON boundary. */
|
|
4
4
|
declare class SnapshotCanonicalError extends TypeError {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-
|
|
2
|
-
import { t as SchemaSnapshotOptions } from "../serialize-
|
|
1
|
+
import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-DcIiNePM.mjs";
|
|
2
|
+
import { t as SchemaSnapshotOptions } from "../serialize-Dg-Q55YQ.mjs";
|
|
3
3
|
//#region src/snapshot/mysql.d.ts
|
|
4
4
|
/** MySQL's snapshot dialect-extension identity. */
|
|
5
5
|
declare const mysqlSnapshotDialect: SnapshotDialect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-
|
|
2
|
-
import { t as SchemaSnapshotOptions } from "../serialize-
|
|
1
|
+
import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-DcIiNePM.mjs";
|
|
2
|
+
import { t as SchemaSnapshotOptions } from "../serialize-Dg-Q55YQ.mjs";
|
|
3
3
|
//#region src/snapshot/postgres.d.ts
|
|
4
4
|
/** PostgreSQL's snapshot dialect-extension identity. */
|
|
5
5
|
declare const postgresSnapshotDialect: SnapshotDialect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-
|
|
2
|
-
import { t as SchemaSnapshotOptions } from "../serialize-
|
|
1
|
+
import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-DcIiNePM.mjs";
|
|
2
|
+
import { t as SchemaSnapshotOptions } from "../serialize-Dg-Q55YQ.mjs";
|
|
3
3
|
//#region src/snapshot/sqlite.d.ts
|
|
4
4
|
/** SQLite's snapshot dialect-extension identity. */
|
|
5
5
|
declare const sqliteSnapshotDialect: SnapshotDialect;
|
|
@@ -384,7 +384,7 @@ function selectPreviousSnapshot(input, previous, selectedNamespace, diagnostics)
|
|
|
384
384
|
function collectIdentityEntries(input) {
|
|
385
385
|
const entries = [];
|
|
386
386
|
const seen = /* @__PURE__ */ new Set();
|
|
387
|
-
const add = (object, kind, currentId, physicalName, scopePhysicalName, scopeId, physicalIdentityName = physicalName) => {
|
|
387
|
+
const add = (object, kind, currentId, physicalName, scopePhysicalName, scopeId, physicalIdentityName = physicalName, metadataTarget) => {
|
|
388
388
|
if (seen.has(object)) return;
|
|
389
389
|
seen.add(object);
|
|
390
390
|
entries.push({
|
|
@@ -393,6 +393,7 @@ function collectIdentityEntries(input) {
|
|
|
393
393
|
currentId,
|
|
394
394
|
physicalName,
|
|
395
395
|
physicalIdentityName,
|
|
396
|
+
...metadataTarget === void 0 ? {} : { metadataTarget },
|
|
396
397
|
...scopePhysicalName === void 0 ? {} : { scopePhysicalName },
|
|
397
398
|
...scopeId === void 0 ? {} : { scopeId }
|
|
398
399
|
});
|
|
@@ -454,15 +455,30 @@ function collectIdentityEntries(input) {
|
|
|
454
455
|
add(object, kind, object.id, object.physicalName);
|
|
455
456
|
}
|
|
456
457
|
function addMetadataObject(object, kind) {
|
|
457
|
-
add(object, kind, object.id, object.reference?.name ?? object.id, void 0, void 0, object.id);
|
|
458
|
+
add(object, kind, object.id, object.reference?.name ?? object.id, void 0, void 0, object.id, metadataIdentityTarget(object.object, input));
|
|
458
459
|
}
|
|
459
460
|
}
|
|
461
|
+
function metadataIdentityTarget(reference, source) {
|
|
462
|
+
const owner = reference.owner;
|
|
463
|
+
const objects = [
|
|
464
|
+
...source.tables,
|
|
465
|
+
...source.views ?? [],
|
|
466
|
+
...source.domains ?? []
|
|
467
|
+
];
|
|
468
|
+
const physicalOwner = owner && objects.find((item) => item.kind === owner.kind && item.id === owner.id)?.physicalName;
|
|
469
|
+
return JSON.stringify([
|
|
470
|
+
reference.kind,
|
|
471
|
+
owner?.kind,
|
|
472
|
+
physicalOwner
|
|
473
|
+
]);
|
|
474
|
+
}
|
|
460
475
|
function collectPreviousIdentities(snapshot) {
|
|
461
476
|
const result = [];
|
|
462
|
-
const add = (kind, id, physicalName, scopePhysicalName) => result.push({
|
|
477
|
+
const add = (kind, id, physicalName, scopePhysicalName, metadataTarget) => result.push({
|
|
463
478
|
kind,
|
|
464
479
|
id,
|
|
465
480
|
physicalName,
|
|
481
|
+
...metadataTarget === void 0 ? {} : { metadataTarget },
|
|
466
482
|
...scopePhysicalName === void 0 ? {} : { scopePhysicalName }
|
|
467
483
|
});
|
|
468
484
|
for (const table of snapshot.tables) {
|
|
@@ -488,8 +504,8 @@ function collectPreviousIdentities(snapshot) {
|
|
|
488
504
|
for (const item of snapshot.policies) add("policy", item.id, item.physicalName);
|
|
489
505
|
for (const item of snapshot.extensions) add("extension", item.id, item.physicalName);
|
|
490
506
|
for (const item of snapshot.opaqueObjects) add("opaque-object", item.id, item.physicalName);
|
|
491
|
-
for (const item of snapshot.comments) add("comment", item.id, item.physicalName);
|
|
492
|
-
for (const item of snapshot.ownership) add("ownership", item.id, item.physicalName);
|
|
507
|
+
for (const item of snapshot.comments) add("comment", item.id, item.physicalName, void 0, metadataIdentityTarget(item.object, snapshot));
|
|
508
|
+
for (const item of snapshot.ownership) add("ownership", item.id, item.physicalName, void 0, metadataIdentityTarget(item.object, snapshot));
|
|
493
509
|
return result;
|
|
494
510
|
}
|
|
495
511
|
function createIdentityResolver(entries, hints, previous, policy, diagnostics) {
|
|
@@ -498,7 +514,7 @@ function createIdentityResolver(entries, hints, previous, policy, diagnostics) {
|
|
|
498
514
|
const byScope = /* @__PURE__ */ new Map();
|
|
499
515
|
const previousBySelector = /* @__PURE__ */ new Map();
|
|
500
516
|
for (const item of previous ?? []) {
|
|
501
|
-
const key = identitySelectorKey(item.kind, item.physicalName, item.scopePhysicalName);
|
|
517
|
+
const key = identitySelectorKey(item.kind, item.physicalName, item.scopePhysicalName, item.metadataTarget);
|
|
502
518
|
const existing = previousBySelector.get(key);
|
|
503
519
|
previousBySelector.set(key, existing === void 0 ? item : null);
|
|
504
520
|
}
|
|
@@ -550,7 +566,7 @@ function resolveIdentityEntry(entry, hints, previous, policy, diagnostics) {
|
|
|
550
566
|
source
|
|
551
567
|
};
|
|
552
568
|
} else if (source === "previous-snapshot") {
|
|
553
|
-
const match = previous.get(identitySelectorKey(entry.kind, entry.physicalName, entry.scopePhysicalName));
|
|
569
|
+
const match = previous.get(identitySelectorKey(entry.kind, entry.physicalName, entry.scopePhysicalName, entry.metadataTarget));
|
|
554
570
|
if (match !== void 0 && match !== null) return {
|
|
555
571
|
logicalId: match.id,
|
|
556
572
|
source
|
|
@@ -579,8 +595,8 @@ function resolveIdentityEntry(entry, hints, previous, policy, diagnostics) {
|
|
|
579
595
|
source: "deterministic-fallback"
|
|
580
596
|
};
|
|
581
597
|
}
|
|
582
|
-
function identitySelectorKey(kind, physicalName, scopePhysicalName) {
|
|
583
|
-
return `${kind}\u0000${scopePhysicalName ?? ""}\u0000${physicalName}`;
|
|
598
|
+
function identitySelectorKey(kind, physicalName, scopePhysicalName, metadataTarget) {
|
|
599
|
+
return `${metadataTarget ?? ""}\u0000${kind}\u0000${scopePhysicalName ?? ""}\u0000${physicalName}`;
|
|
584
600
|
}
|
|
585
601
|
function normalizeIdentityKind(kind) {
|
|
586
602
|
if (kind === "primary-key" || kind === "unique" || kind === "foreign-key" || kind === "check") return "constraint";
|
package/dist/snapshot.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CompleteSnapshotExtension, A as SnapshotStorage, At as schemaSnapshotCompleteVersion, B as CompleteSchemaSnapshot, C as SnapshotIndexTerm, Ct as CompleteSnapshotValueFact, D as SnapshotLiteral, Dt as SchemaSnapshotV1Input, E as SnapshotKeyConstraint, Et as SchemaSnapshotV1DecodeResult, F as neutralSnapshotDialect, G as CompleteSnapshotColumn, H as CompleteSnapshotCapabilities, I as schemaSnapshotDialectVersion, J as CompleteSnapshotCreateResult, K as CompleteSnapshotComment, L as schemaSnapshotFormat, M as SnapshotTable, Mi as SchemaDialectHooks, Mt as schemaSnapshotVersion1, N as SnapshotUniqueConstraint, Ni as createSchemaDialect, O as SnapshotNamingPolicy, Ot as completeSchemaSnapshotFormat, P as SnapshotValidationContext, Q as CompleteSnapshotEnum, R as schemaSnapshotNamingPolicyVersion, S as SnapshotIndex, St as CompleteSnapshotTrigger, T as SnapshotJsonValue, Tt as SchemaSnapshotV1, U as CompleteSnapshotCheckConstraint, V as CompleteSchemaSnapshotInput, W as CompleteSnapshotCollation, X as CompleteSnapshotDeferredObject, Y as CompleteSnapshotDecodeResult, Z as CompleteSnapshotDomain, _ as SnapshotExpressionContext, _t as CompleteSnapshotProvenance, a as SnapshotBigInt, at as CompleteSnapshotNamespace, b as SnapshotGeneratedColumn, bt as CompleteSnapshotSequence, c as SnapshotConstraint, ct as CompleteSnapshotObjectMetadata, d as SnapshotDefault, dt as CompleteSnapshotObjectReference, et as CompleteSnapshotForeignKey, f as SnapshotDiagnostic, ft as CompleteSnapshotOpaqueObject, g as SnapshotExpression, gc as PortableColumnStorage, gt as CompleteSnapshotPolicy, h as SnapshotDialectExtension, ht as CompleteSnapshotPhysicalReference, i as SchemaSnapshotInput, it as CompleteSnapshotKeyConstraint, j as SnapshotStorageContext, ji as SchemaDialect, jt as schemaSnapshotV1Version, k as SnapshotSpecialNumber, kt as completeSchemaSnapshotVersion, l as SnapshotCreateResult, lt as CompleteSnapshotObjectOwner, m as SnapshotDialect, mt as CompleteSnapshotPartition, n as SchemaSnapshot, nt as CompleteSnapshotIndex, o as SnapshotCheckConstraint, ot as CompleteSnapshotObject, p as SnapshotDiagnosticCode, pc as NativeColumnStorage, pt as CompleteSnapshotOwnership, q as CompleteSnapshotConstraint, r as SchemaSnapshotAdapter, rt as CompleteSnapshotIndexTerm, s as SnapshotColumn, st as CompleteSnapshotObjectKind, t as AnySchema, tt as CompleteSnapshotIdentity, u as SnapshotDecodeResult, ut as CompleteSnapshotObjectOwnerKind, v as SnapshotExtensionContext, vt as CompleteSnapshotRoutine, w as SnapshotIndexTermExpression, wt as CompleteSnapshotView, x as SnapshotIdentity, xt as CompleteSnapshotTable, y as SnapshotForeignKey, yt as CompleteSnapshotRoutineParameter, z as schemaSnapshotVersion } from "./types-
|
|
2
|
-
import { A as encodeCanonicalSnapshot, C as encodeCompleteSchemaSnapshot, D as schemaSnapshotV1Fingerprint, E as fingerprintCompleteSchemaSnapshot, M as toSnapshotJsonValue, O as SnapshotCanonicalError, S as decodeSchemaSnapshotV1, T as encodeSchemaSnapshotV1, _ as canonicalizeCompleteSchemaSnapshot, a as encodeSnapshot, b as decodeCompleteSchemaSnapshot, c as tryCreateSchemaSnapshot, d as canonicalizeSchemaSnapshot, f as decodeSchemaSnapshot, g as assertSchemaSnapshotV1, h as assertCompleteSnapshot, i as encodeSchemaSnapshot, j as schemaSnapshotFingerprint, k as canonicalJson, l as SnapshotValidationError, m as assertCompleteSchemaSnapshot, n as SnapshotSerializationError, o as fingerprintSchemaSnapshot, p as CompleteSnapshotValidationError, r as createSchemaSnapshot, s as serializeSchema, t as SchemaSnapshotOptions, u as assertSchemaSnapshot, v as canonicalizeSchemaSnapshotV1, w as encodeCompleteSnapshot, x as decodeCompleteSnapshot, y as completeSchemaSnapshotFingerprint } from "./serialize-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { $ as CompleteSnapshotExtension, A as SnapshotStorage, At as schemaSnapshotCompleteVersion, B as CompleteSchemaSnapshot, C as SnapshotIndexTerm, Ct as CompleteSnapshotValueFact, D as SnapshotLiteral, Dt as SchemaSnapshotV1Input, E as SnapshotKeyConstraint, Et as SchemaSnapshotV1DecodeResult, F as neutralSnapshotDialect, G as CompleteSnapshotColumn, H as CompleteSnapshotCapabilities, I as schemaSnapshotDialectVersion, J as CompleteSnapshotCreateResult, K as CompleteSnapshotComment, L as schemaSnapshotFormat, M as SnapshotTable, Mi as SchemaDialectHooks, Mt as schemaSnapshotVersion1, N as SnapshotUniqueConstraint, Ni as createSchemaDialect, O as SnapshotNamingPolicy, Ot as completeSchemaSnapshotFormat, P as SnapshotValidationContext, Q as CompleteSnapshotEnum, R as schemaSnapshotNamingPolicyVersion, S as SnapshotIndex, St as CompleteSnapshotTrigger, T as SnapshotJsonValue, Tt as SchemaSnapshotV1, U as CompleteSnapshotCheckConstraint, V as CompleteSchemaSnapshotInput, W as CompleteSnapshotCollation, X as CompleteSnapshotDeferredObject, Y as CompleteSnapshotDecodeResult, Z as CompleteSnapshotDomain, _ as SnapshotExpressionContext, _t as CompleteSnapshotProvenance, a as SnapshotBigInt, at as CompleteSnapshotNamespace, b as SnapshotGeneratedColumn, bt as CompleteSnapshotSequence, c as SnapshotConstraint, ct as CompleteSnapshotObjectMetadata, d as SnapshotDefault, dt as CompleteSnapshotObjectReference, et as CompleteSnapshotForeignKey, f as SnapshotDiagnostic, ft as CompleteSnapshotOpaqueObject, g as SnapshotExpression, gc as PortableColumnStorage, gt as CompleteSnapshotPolicy, h as SnapshotDialectExtension, ht as CompleteSnapshotPhysicalReference, i as SchemaSnapshotInput, it as CompleteSnapshotKeyConstraint, j as SnapshotStorageContext, ji as SchemaDialect, jt as schemaSnapshotV1Version, k as SnapshotSpecialNumber, kt as completeSchemaSnapshotVersion, l as SnapshotCreateResult, lt as CompleteSnapshotObjectOwner, m as SnapshotDialect, mt as CompleteSnapshotPartition, n as SchemaSnapshot, nt as CompleteSnapshotIndex, o as SnapshotCheckConstraint, ot as CompleteSnapshotObject, p as SnapshotDiagnosticCode, pc as NativeColumnStorage, pt as CompleteSnapshotOwnership, q as CompleteSnapshotConstraint, r as SchemaSnapshotAdapter, rt as CompleteSnapshotIndexTerm, s as SnapshotColumn, st as CompleteSnapshotObjectKind, t as AnySchema, tt as CompleteSnapshotIdentity, u as SnapshotDecodeResult, ut as CompleteSnapshotObjectOwnerKind, v as SnapshotExtensionContext, vt as CompleteSnapshotRoutine, w as SnapshotIndexTermExpression, wt as CompleteSnapshotView, x as SnapshotIdentity, xt as CompleteSnapshotTable, y as SnapshotForeignKey, yt as CompleteSnapshotRoutineParameter, z as schemaSnapshotVersion } from "./types-DcIiNePM.mjs";
|
|
2
|
+
import { A as encodeCanonicalSnapshot, C as encodeCompleteSchemaSnapshot, D as schemaSnapshotV1Fingerprint, E as fingerprintCompleteSchemaSnapshot, M as toSnapshotJsonValue, O as SnapshotCanonicalError, S as decodeSchemaSnapshotV1, T as encodeSchemaSnapshotV1, _ as canonicalizeCompleteSchemaSnapshot, a as encodeSnapshot, b as decodeCompleteSchemaSnapshot, c as tryCreateSchemaSnapshot, d as canonicalizeSchemaSnapshot, f as decodeSchemaSnapshot, g as assertSchemaSnapshotV1, h as assertCompleteSnapshot, i as encodeSchemaSnapshot, j as schemaSnapshotFingerprint, k as canonicalJson, l as SnapshotValidationError, m as assertCompleteSchemaSnapshot, n as SnapshotSerializationError, o as fingerprintSchemaSnapshot, p as CompleteSnapshotValidationError, r as createSchemaSnapshot, s as serializeSchema, t as SchemaSnapshotOptions, u as assertSchemaSnapshot, v as canonicalizeSchemaSnapshotV1, w as encodeCompleteSnapshot, x as decodeCompleteSnapshot, y as completeSchemaSnapshotFingerprint } from "./serialize-Dg-Q55YQ.mjs";
|
|
3
|
+
import "./index-DB07P2X8.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, CompleteSnapshotObjectOwner, CompleteSnapshotObjectOwnerKind, CompleteSnapshotObjectReference, CompleteSnapshotOpaqueObject, CompleteSnapshotOwnership, CompleteSnapshotPartition, CompleteSnapshotPhysicalReference, CompleteSnapshotPolicy, CompleteSnapshotProvenance, CompleteSnapshotRoutine, CompleteSnapshotRoutineParameter, CompleteSnapshotSequence, CompleteSnapshotTable, CompleteSnapshotTrigger, CompleteSnapshotValidationError, CompleteSnapshotValueFact, CompleteSnapshotView, type NativeColumnStorage, type PortableColumnStorage, type SchemaDialect, type SchemaDialectHooks, SchemaSnapshot, SchemaSnapshotAdapter, SchemaSnapshotInput, SchemaSnapshotOptions, SchemaSnapshotV1, SchemaSnapshotV1DecodeResult, SchemaSnapshotV1Input, 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, assertCompleteSchemaSnapshot, assertCompleteSnapshot, assertSchemaSnapshot, assertSchemaSnapshotV1, canonicalJson, canonicalizeCompleteSchemaSnapshot, canonicalizeSchemaSnapshot, canonicalizeSchemaSnapshotV1, completeSchemaSnapshotFingerprint, completeSchemaSnapshotFormat, completeSchemaSnapshotVersion, createSchemaDialect, createSchemaSnapshot, decodeCompleteSchemaSnapshot, decodeCompleteSnapshot, decodeSchemaSnapshot, decodeSchemaSnapshotV1, encodeCanonicalSnapshot, encodeCompleteSchemaSnapshot, encodeCompleteSnapshot, encodeSchemaSnapshot, encodeSchemaSnapshotV1, encodeSnapshot, fingerprintCompleteSchemaSnapshot, fingerprintSchemaSnapshot, neutralSnapshotDialect, schemaSnapshotCompleteVersion, schemaSnapshotDialectVersion, schemaSnapshotFingerprint, schemaSnapshotFormat, schemaSnapshotNamingPolicyVersion, schemaSnapshotV1Fingerprint, schemaSnapshotV1Version, schemaSnapshotVersion, schemaSnapshotVersion1, serializeSchema, toSnapshotJsonValue, tryCreateSchemaSnapshot };
|
package/dist/sqlite.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as Dialect, Us as ColumnDefinition, _r as excluded, dr as DoNothingAction, fr as DoUpdateAction, gr as doUpdate, hr as doNothing, lr as ConflictAction, mr as OnConflictClause, pc as NativeColumnStorage, pr as ExcludedSource, ur as ConflictTarget, vf as SqlTimestamp, vr as onConflict } from "./types-
|
|
1
|
+
import { Pt as Dialect, Us as ColumnDefinition, _r as excluded, dr as DoNothingAction, fr as DoUpdateAction, gr as doUpdate, hr as doNothing, lr as ConflictAction, mr as OnConflictClause, pc as NativeColumnStorage, pr as ExcludedSource, ur as ConflictTarget, vf as SqlTimestamp, vr as onConflict } from "./types-DcIiNePM.mjs";
|
|
2
2
|
//#region src/dialects/sqlite.d.ts
|
|
3
3
|
/** Integer encoding used by SQLite timestamp columns. */
|
|
4
4
|
type SqliteTimestampMode = "timestamp" | "timestamp_ms";
|
|
@@ -27,6 +27,6 @@ type SqliteTimestampColumn<TOptions extends SqliteTimestampOptions = {}> = Colum
|
|
|
27
27
|
}>;
|
|
28
28
|
/** Declare a SQLite `INTEGER` timestamp with a live Date codec. */
|
|
29
29
|
declare function sqliteTimestamp<const TOptions extends SqliteTimestampOptions = {}>(options?: TOptions): SqliteTimestampColumn<TOptions>;
|
|
30
|
-
declare function sqliteDialect(): Dialect<"
|
|
30
|
+
declare function sqliteDialect(): Dialect<"on-conflict" | "json">;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { type ConflictAction, type ConflictTarget, type DoNothingAction, type DoUpdateAction, type ExcludedSource, type OnConflictClause, SqliteTimestampColumn, SqliteTimestampMode, SqliteTimestampOptions, doNothing, doUpdate, excluded, onConflict, sqliteDialect, sqliteTimestamp };
|
|
@@ -424,6 +424,13 @@ declare function render<TQuery extends AnyFragment>(query: TQuery & RenderCapabi
|
|
|
424
424
|
declare function render<TQuery extends AnyFragment, TCapabilities extends string>(query: TQuery & RenderCapabilityValidation<TQuery, TCapabilities>, options: RenderOptions<TCapabilities> | Dialect<TCapabilities>): RenderedQuery;
|
|
425
425
|
//#endregion
|
|
426
426
|
//#region src/execution.d.ts
|
|
427
|
+
declare global {
|
|
428
|
+
interface AbortSignal {
|
|
429
|
+
readonly aborted: boolean;
|
|
430
|
+
readonly reason: any;
|
|
431
|
+
throwIfAborted(): void;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
427
434
|
type StreamableQuery<TRow extends object = Record<string, unknown>> = QueryWithRow<TRow> & {
|
|
428
435
|
readonly queryKind: "select" | "set";
|
|
429
436
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Dialects and execution
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Choose a SQL dialect and connect Qubu queries to your database driver.
|
|
4
4
|
|
|
5
5
|
## Render once, choose a policy at the boundary
|
|
6
6
|
|
|
@@ -77,10 +77,10 @@ Qubu does not open connections or bind values for a particular client. An
|
|
|
77
77
|
adapter receives an `ExecutionRequest` and returns driver-normalized object
|
|
78
78
|
rows. Qubu then uses the query's result shape and the adapter's decoder policy
|
|
79
79
|
to produce the typed `ExecutionResult`. A `TransactionalQueryAdapter` can also
|
|
80
|
-
pin one driver connection for a callback transaction
|
|
80
|
+
pin one driver connection for a callback transaction.
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
`request.statement.parameterSqlTypes`, when present, lists SQL domains in
|
|
83
|
+
the same order as `statement.parameters`. Adapters can pass each domain to their
|
|
84
84
|
value encoder or driver binding layer when a client distinguishes values such
|
|
85
85
|
as `DATE`, `TIMESTAMP`, `UUID`, and `DECIMAL`.
|
|
86
86
|
|
|
@@ -143,12 +143,14 @@ per request, binds Qubu's ordered parameters, copies object rows, and finalizes
|
|
|
143
143
|
the statement in a `finally` block. SQLite's change count and generated row ID
|
|
144
144
|
are returned as mutation metadata when the request is a mutation.
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
Your application manages the worker:
|
|
147
|
+
|
|
148
|
+
1. Initialize the official SQLite module inside a dedicated worker.
|
|
149
|
+
2. Construct the adapter around its `sqlite3.oo1.DB`.
|
|
150
|
+
3. Close the adapter before terminating the worker.
|
|
151
|
+
|
|
152
|
+
Serve the package’s `sqlite3.wasm` asset beside the bundled worker module. The
|
|
153
|
+
combo runner’s verified browser scenario demonstrates this setup.
|
|
152
154
|
|
|
153
155
|
### Decode schema-aware result values
|
|
154
156
|
|
|
@@ -434,12 +436,16 @@ queries identify their parent transaction operation. Hooks are synchronous,
|
|
|
434
436
|
and their failures are sent to `onHookError` without changing the database
|
|
435
437
|
operation's result.
|
|
436
438
|
|
|
439
|
+
### What observations include
|
|
440
|
+
|
|
437
441
|
Hook metadata accepts only strings, numbers, and booleans. Observations include
|
|
438
442
|
rendered SQL and parameter count, but never parameter values, result rows,
|
|
439
443
|
decoded values, or insert identifiers. Rendered SQL can still contain literals
|
|
440
444
|
introduced by unsafe SQL helpers, so treat it according to the application's
|
|
441
445
|
logging policy.
|
|
442
446
|
|
|
447
|
+
### Stream observation timing
|
|
448
|
+
|
|
443
449
|
Streaming adapters are still called eagerly. A consumed stream completes its
|
|
444
450
|
observation when it is exhausted, closed early, or fails. A stream created but
|
|
445
451
|
never consumed has no completion observation. Hooks are available only on
|
|
@@ -465,11 +471,16 @@ const result = await transactionalDb.transaction(async (transaction) => {
|
|
|
465
471
|
})
|
|
466
472
|
```
|
|
467
473
|
|
|
468
|
-
The adapter
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
474
|
+
The adapter manages the transaction:
|
|
475
|
+
|
|
476
|
+
1. Acquire and pin one connection.
|
|
477
|
+
2. Begin the transaction.
|
|
478
|
+
3. Run the callback.
|
|
479
|
+
4. Commit if the callback resolves, or roll back if it rejects.
|
|
480
|
+
5. Release the connection in either case.
|
|
481
|
+
|
|
482
|
+
Qubu creates the scoped client and returns the callback result. The adapter
|
|
483
|
+
emits `BEGIN`, `COMMIT`, and `ROLLBACK`.
|
|
473
484
|
|
|
474
485
|
A scoped client's methods follow its adapter's capabilities: `execute()` and
|
|
475
486
|
`rows()` are always available; EXPLAIN and streaming require their respective
|
|
@@ -503,20 +514,32 @@ failure escape also rolls back the outer transaction. Failed savepoint creation
|
|
|
503
514
|
or recovery makes the entire transaction unsafe to commit, even if the callback
|
|
504
515
|
catches the error. Primary and cleanup failures are retained in `AggregateError`.
|
|
505
516
|
|
|
517
|
+
#### Finish work before leaving a scope
|
|
518
|
+
|
|
506
519
|
Await every query and nested transaction before returning. These three adapters
|
|
507
|
-
reject
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
520
|
+
reject:
|
|
521
|
+
|
|
522
|
+
- Calls on a finished scoped client.
|
|
523
|
+
- Overlapping sibling scopes.
|
|
524
|
+
- A child scope started while its parent has pending queries.
|
|
525
|
+
- Parent queries while a child is active.
|
|
526
|
+
|
|
527
|
+
If a callback finishes with work pending, the adapter waits for that work and
|
|
528
|
+
rolls back.
|
|
529
|
+
|
|
530
|
+
Use the active scoped client for all work on a directly supplied connection.
|
|
531
|
+
Its root client rejects unrelated operations during the transaction. A pg pool
|
|
532
|
+
can still run independent queries on other connections.
|
|
533
|
+
|
|
534
|
+
Your application remains responsible for raw driver calls and separately
|
|
535
|
+
constructed adapters.
|
|
515
536
|
|
|
516
537
|
EXPLAIN and result decoding remain available at every depth. Nested transaction
|
|
517
538
|
hooks identify their enclosing transaction with `parentId`; queries identify
|
|
518
539
|
their immediate scope. Cancellation does not interrupt savepoint recovery.
|
|
519
540
|
|
|
541
|
+
## Execute without a bound client
|
|
542
|
+
|
|
520
543
|
The standalone functions remain useful when the adapter varies by call or a
|
|
521
544
|
small module does not need a bound client:
|
|
522
545
|
|
|
@@ -527,6 +550,8 @@ const result = await execute(query, adapter)
|
|
|
527
550
|
const rows = await executeRows(readQuery, adapter)
|
|
528
551
|
```
|
|
529
552
|
|
|
553
|
+
### Result fields
|
|
554
|
+
|
|
530
555
|
| Result field | Adapter type | Contract |
|
|
531
556
|
| -------------- | ------------------------------------ | ------------------------------------------------------------------------------------- |
|
|
532
557
|
| `rows` | `readonly Record<string, unknown>[]` | Key by rendered aliases; Qubu returns the decoded `readonly TRow[]` |
|
|
@@ -539,11 +564,15 @@ The last three fields are optional. For example, an adapter can map PostgreSQL
|
|
|
539
564
|
`changes` and `lastInsertRowid`. Omit a fact that the selected driver cannot
|
|
540
565
|
report accurately. Qubu does not derive mutation metadata from returned rows.
|
|
541
566
|
|
|
567
|
+
### Dialect overrides and errors
|
|
568
|
+
|
|
542
569
|
The adapter's `dialect` becomes the default for standalone and bound execution.
|
|
543
570
|
A `dialect` in the execution options overrides that rendering policy. Qubu
|
|
544
571
|
passes `signal`, `queryKind`, and `resultShape` to the adapter without changing
|
|
545
|
-
them.
|
|
546
|
-
|
|
572
|
+
them.
|
|
573
|
+
|
|
574
|
+
The adapter decides whether and how its driver supports cancellation. Driver
|
|
575
|
+
errors pass through unchanged. Decoder failures become a
|
|
547
576
|
`ResultDecodingError` that identifies the row and field without exposing the
|
|
548
577
|
raw value.
|
|
549
578
|
|