qubu 0.7.3 → 0.8.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.
@@ -1,4 +1,4 @@
1
- import { V as CatalogPortableStorageType, i as CatalogClassificationConfidence, p as CatalogDialect, pt as IntrospectionResult, wt as IntrospectionDiagnostic } from "./types-CdcYI0lU.mjs";
1
+ import { V as CatalogPortableStorageType, i as CatalogClassificationConfidence, p as CatalogDialect, pt as IntrospectionResult, wt as IntrospectionDiagnostic } from "./types-_CBj28Qo.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/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-DcIiNePM.mjs";
1
+ import { $d as isFragment, $t as assertDialectCapability, Ad as MetadataOf, Ao as SelectClause, Bd as RenderFunction, Bt as DialectPagination, Cd as GroupingKeysOf, Dd as HasWindow, Du as RenderedQuery, Ed as HasSubquery, Eu as RenderOptions, Fd as ProvidesOuterOf, Fs as typedValue, Ft as DialectCapability, Fu as expressionFragment, Gd as RequiresOuterSourceMeta, Gt as NamedCastTarget, Hd as RequiresOf, Ht as ExplainFormat, Id as ProvidesOuterSourceMeta, It as DialectCastTypes, Iu as AggregateResultExpression, 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 render, 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, Tu as RenderCapabilityValidation, 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, 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, zs as typedCast, zt as DialectOptions, zu as Expression } from "./types-BG9DHEZi.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>;
@@ -30,4 +30,24 @@ declare function customClause<TMetadata = never>(options: {
30
30
  readonly render: (context: RenderContext) => void;
31
31
  }): SelectClause<TMetadata>;
32
32
  //#endregion
33
- export { AggregateDependenciesOf, AggregateMeta, AnyFragment, AnySqlType, CapabilitiesOf, CapabilityMetadataOf, CardinalityMeta, CardinalityOf, CastTarget, DependenciesOf, Dialect, DialectCapability, DialectCastTypes, DialectExplain, DialectJson, DialectOptions, DialectPagination, DialectRowLocking, ExplainFormat, ExplainRenderOptions, ExpressionMeta, Fragment, FragmentMeta, GroupingDependenciesOf, GroupingKeysOf, GroupingMeta, HasAggregate, HasSubquery, HasWindow, InheritedMetadata, InheritedMetadataOf, JsonScalarKind, MetadataOf, NamedCastTarget, NullabilityOf, NullableSourceMeta, NullableSourcesOf, OutputOf, PaginationKind, PaginationPart, PortableCastTarget, PortableCastType, ProvidesOuterOf, ProvidesOuterSourceMeta, ProvidesSourceMeta, QueryCardinality, RenderCapabilityValidation, RenderContext, RenderFunction, RenderOptions, RenderedQuery, RequiresCapabilityMeta, RequiresOf, RequiresOuterMetadataOf, RequiresOuterOf, RequiresOuterSourceMeta, RequiresSourceMeta, ResultMeta, RowLockMode, RowLockWaitPolicy, SchemaLiteralRenderer, SqlBigInt, SqlBinary, SqlBoolean, SqlDate, SqlDecimal, SqlEqualityComparable, SqlEqualityCompatible, SqlInteger, SqlJson, SqlNumericLike, SqlOrderCompatible, SqlOrderable, SqlSemanticType, SqlText, SqlTextLike, SqlTimestamp, SqlTypeName, SqlTypeOf, SqlTypeSatisfies, SqlUnknown, SqlUuid, SubqueryMeta, VisibleDependenciesOf, WindowMeta, assertDialectCapability, commaSeparated, createDialect, customClause, expressionFragment, extendDialect, fragment, identifier, isExpression, isFragment, keyword, makeExpression, markExpressionCategory, parameter, parenthesize, qualifiedIdentifier, render, resolveCastTarget, resultValue, routineName, sequence, syntax, typedCall, typedCast, typedValue, unsafeExpression, withDialectCapability };
33
+ //#region src/expressions/aggregate-function.d.ts
34
+ /**
35
+ * Declare a reusable SQL aggregate while inferring dependencies from each call's arguments.
36
+ *
37
+ * The result uses `SqlUnknown` and inherits argument nullability, like `call()`. `TOutput` declares
38
+ * the result type without attaching a decoder. Function availability, argument restrictions, and
39
+ * result policies belong to the downstream declaration.
40
+ *
41
+ * @example
42
+ * const jsonGroupArray = aggregateFunction<string>("json_group_array")
43
+ * const categories = jsonGroupArray(gameCategory.name)
44
+ *
45
+ * @throws If the name is not a valid SQL routine name.
46
+ */
47
+ declare function aggregateFunction<TOutput = unknown>(name: string): <const TArguments extends readonly unknown[]>(...args: TArguments) => AggregateResultExpression<{
48
+ readonly output: TOutput;
49
+ readonly children: TArguments[number];
50
+ readonly kind: "function";
51
+ }>;
52
+ //#endregion
53
+ export { AggregateDependenciesOf, AggregateMeta, AnyFragment, AnySqlType, CapabilitiesOf, CapabilityMetadataOf, CardinalityMeta, CardinalityOf, CastTarget, DependenciesOf, Dialect, DialectCapability, DialectCastTypes, DialectExplain, DialectJson, DialectOptions, DialectPagination, DialectRowLocking, ExplainFormat, ExplainRenderOptions, ExpressionMeta, Fragment, FragmentMeta, GroupingDependenciesOf, GroupingKeysOf, GroupingMeta, HasAggregate, HasSubquery, HasWindow, InheritedMetadata, InheritedMetadataOf, JsonScalarKind, MetadataOf, NamedCastTarget, NullabilityOf, NullableSourceMeta, NullableSourcesOf, OutputOf, PaginationKind, PaginationPart, PortableCastTarget, PortableCastType, ProvidesOuterOf, ProvidesOuterSourceMeta, ProvidesSourceMeta, QueryCardinality, RenderCapabilityValidation, RenderContext, RenderFunction, RenderOptions, RenderedQuery, RequiresCapabilityMeta, RequiresOf, RequiresOuterMetadataOf, RequiresOuterOf, RequiresOuterSourceMeta, RequiresSourceMeta, ResultMeta, RowLockMode, RowLockWaitPolicy, SchemaLiteralRenderer, SqlBigInt, SqlBinary, SqlBoolean, SqlDate, SqlDecimal, SqlEqualityComparable, SqlEqualityCompatible, SqlInteger, SqlJson, SqlNumericLike, SqlOrderCompatible, SqlOrderable, SqlSemanticType, SqlText, SqlTextLike, SqlTimestamp, SqlTypeName, SqlTypeOf, SqlTypeSatisfies, SqlUnknown, SqlUuid, SubqueryMeta, VisibleDependenciesOf, WindowMeta, aggregateFunction, assertDialectCapability, commaSeparated, createDialect, customClause, expressionFragment, extendDialect, fragment, identifier, isExpression, isFragment, keyword, makeExpression, markExpressionCategory, parameter, parenthesize, qualifiedIdentifier, render, resolveCastTarget, resultValue, routineName, sequence, syntax, typedCall, typedCast, typedValue, unsafeExpression, withDialectCapability };
package/dist/core.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $ as resolveCastTarget, A as fragment, C as isExpression, D as markExpressionCategory, M as parenthesize, N as sequence, Q as extendDialect, T as makeExpression, U as resultValue, X as assertDialectCapability, Z as createDialect, a as qualifiedIdentifier, i as identifier, j as isFragment, k as withDialectCapability, n as expressionFragment } from "./column-DDRvD7SF.mjs";
2
2
  import { a as parameter, r as typedValue } from "./value-CpaUFtjw.mjs";
3
- import { a as routineName, c as render, i as typedCall, s as typedCast, t as createClause } from "./types-CYHpSPwj.mjs";
3
+ import { a as routineName, c as render, i as typedCall, n as call, s as typedCast, t as createClause } from "./types-CYHpSPwj.mjs";
4
4
  //#region src/core/primitives/compose.ts
5
5
  function commaSeparated(parts) {
6
6
  return sequence(parts, ", ");
@@ -32,4 +32,23 @@ function customClause(options) {
32
32
  return createClause(options.name, options.placement ?? "after-select", options.order, options.render);
33
33
  }
34
34
  //#endregion
35
- export { assertDialectCapability, commaSeparated, createDialect, customClause, expressionFragment, extendDialect, fragment, identifier, isExpression, isFragment, keyword, makeExpression, markExpressionCategory, parameter, parenthesize, qualifiedIdentifier, render, resolveCastTarget, resultValue, routineName, sequence, syntax, typedCall, typedCast, typedValue, unsafeExpression, withDialectCapability };
35
+ //#region src/expressions/aggregate-function.ts
36
+ /**
37
+ * Declare a reusable SQL aggregate while inferring dependencies from each call's arguments.
38
+ *
39
+ * The result uses `SqlUnknown` and inherits argument nullability, like `call()`. `TOutput` declares
40
+ * the result type without attaching a decoder. Function availability, argument restrictions, and
41
+ * result policies belong to the downstream declaration.
42
+ *
43
+ * @example
44
+ * const jsonGroupArray = aggregateFunction<string>("json_group_array")
45
+ * const categories = jsonGroupArray(gameCategory.name)
46
+ *
47
+ * @throws If the name is not a valid SQL routine name.
48
+ */
49
+ function aggregateFunction(name) {
50
+ routineName(name);
51
+ return (...args) => markExpressionCategory(call(name, ...args), "aggregate");
52
+ }
53
+ //#endregion
54
+ export { aggregateFunction, assertDialectCapability, commaSeparated, createDialect, customClause, expressionFragment, extendDialect, fragment, identifier, isExpression, isFragment, keyword, makeExpression, markExpressionCategory, parameter, parenthesize, qualifiedIdentifier, render, resolveCastTarget, resultValue, routineName, sequence, syntax, typedCall, typedCast, typedValue, unsafeExpression, withDialectCapability };
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-DcIiNePM.mjs";
1
+ import { T as SnapshotJsonValue, m as SnapshotDialect, n as SchemaSnapshot, st as CompleteSnapshotObjectKind } from "./types-BG9DHEZi.mjs";
2
2
  //#region src/diff/types.d.ts
3
3
  /** Object families understood by the snapshot diff engine. */
4
4
  type SnapshotDiffObjectKind = CompleteSnapshotObjectKind;
@@ -0,0 +1,2 @@
1
+ import "./types-BG9DHEZi.mjs";
2
+ import "./serialize-DzPyKT4f.mjs";
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-DcIiNePM.mjs";
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
+ import { $a as IndexDialectExtension, $c as GeneratedColumnMode, $i as SchemaTableEntry, $l as NestedTransactionalQueryAdapter, $n as DefaultValuesSource, $o as avg, $r as RequiredScope, $s as ColumnOptions, $u as ResultDecodeContext, Aa as SourceLike, Ac as date, Ad as MetadataOf, Ai as all, Al as AdapterExecutionResult, Ao as SelectClause, Ar as AllowAllClause, Au as QueryValidationError, Ba as primaryKey, Bc as timestamp, Bd as RenderFunction, Bi as SchemaRenderOptions, Bl as ExplainRequest, Bn as TableSqlTypes, Bo as jsonPath, Br as allowAll, Bs as ColumnCodec, Bt as DialectPagination, Bu as ExpressionKind, Ca as KeyConstraint, Cd as GroupingKeysOf, Ci as FromScope, Cn as SourceRow, Co as fetchFirst, Cs as notLike, Cu as qubu, Da as ReferentialAction, Dc as column, Dd as HasWindow, Di as SelectionObject, Do as distinct, Ds as isNotNull, Du as RenderedQuery, Ea as PostgresConstraintExtension, Ec as boolean, Ed as HasSubquery, Ei as Selection, Eo as having, Er as update, Es as notIn, Eu as RenderOptions, Fa as UniqueNullSemantics, Fc as nativeStorage, Fd as ProvidesOuterOf, Fl as ExplainMutationOptions, Fn as TableIdentity, Fo as subtract, Fr as MutationReturning, Ft as DialectCapability, Ga as AliasIdentity, Gc as ColumnDefault, Gd as RequiresOuterSourceMeta, Gl as HookMetadataValue, Gn as desc, Go as rowNumber, Gr as correlate, Gs as ColumnGeneratedOf, Gt as NamedCastTarget, Gu as ExpressionWithOutput, Ha as unique, Hc as CanonicalLiteral, Hd as RequiresOf, Hl as ExplainableQueryAdapter, Hn as table, Ho as denseRank, Hr as ReturningRow, Hs as ColumnDefinition, Ht as ExplainFormat, Hu as ExpressionOutput, Ia as catalogCheck, Ic as nullable, Id as ProvidesOuterSourceMeta, Ii as SchemaExpressionErrorCode, Il as ExplainOptions, In as TableInsertInput, Io as JsonPath, Ir as MutationReturningClause, Is as value, It as DialectCastTypes, Ja as LateralSource, Jc as ExpressionDefaultDescriptor, Jd as SqlTypeOf, Ji as unsafeSchemaSql, Jl as HookOutcome, Jn as order, Jo as lower, Jr as AvailableScope, Js as ColumnIdentityOf, Jt as PortableCastTarget, Ka as AliasedSource, Kc as ColumnDefaultInput, Kd as RequiresSourceMeta, Kl as HookOperation, Kn as nullsFirst, Ko as coalesce, Kr as select, Ks as ColumnHasDefault, Kt as PaginationKind, Ku as SchemaExpression, La as catalogForeignKey, Lc as numeric, Ld as ProvidesSourceMeta, Li as SchemaExpressionInput, Ll as ExplainOptionsFor, Lo as jsonBoolean, Lr as MutationRow, Ls as mapResult, Lt as DialectExplain, Lu as AnyExpression, Ma as TableLike, Mc as integer, Md as NullableSourceMeta, Mi as SchemaDialectHooks, Ml as ExecutionOptions, Mn as Table, Mo as divide, Mr as MutationKind, Mu as QueryValidationIssue, Na as UniqueConstraint, Nc as json, Nd as NullableSourcesOf, Nl as ExecutionRequest, Nn as TableColumns, No as modulo, Nr as MutationQuery, Nt as CastTarget, Nu as ColumnDependency, Oa as SourceConstraint, Od as InheritedMetadata, Oi as SelectionOutput, Oo as AnySelectClause, Os as isNull, Ou as render, Pa as UniqueConstraintOptions, Pc as nativeColumn, Pd as OutputOf, Pi as RenderedSchemaExpression, Pl as ExecutionResult, Pn as TableDefinitions, Po as multiply, Pr as MutationQueryConfig, Ps as asValue, Pt as Dialect, Pu as ColumnReference, Qa as lateral, Qc as GeneratedColumnDescriptor, Qi as SchemaOptions, Ql as HookTransactionOperation, Qn as deleteFrom, Qr as RequiredOuterScope, Qs as ColumnOnUpdateOf, Qt as SchemaLiteralRenderer, Qu as DecodableResultType, Ra as check, Rc as portableStorage, Rd as QueryCardinality, Ri as SchemaExpressionMode, Rl as ExplainPlanRow, Ro as jsonExists, Rr as MutationScopeValidation, Rs as cast, Rt as DialectJson, Ru as AnySchemaExpression, Sa as ForeignKeyTargetInput, Sd as GroupingDependenciesOf, Sf as SqlUuid, Si as FromClause, Sl as SchemaObjectNameOptions, Sn as SourceProvision, So as rowLock, Ss as ne, Su as explain, Ta as MysqlConstraintExtension, Tc as binary, Td as HasAggregate, Ti as from, To as offset, Tr as UpdateAssignments, Ts as inList, Ua as uniqueConstraint, Uc as ColumnBehaviorError, Ud as RequiresOuterMetadataOf, Ul as HookErrorOutcome, Un as OrderTerm, Uo as over, Ur as ReturningSqlTypes, Us as ColumnDefinitionConfig, Ut as ExplainRenderOptions, Uu as ExpressionRequires, Va as references, Vc as uuid, Vd as RequiresCapabilityMeta, Vi as UnsafeSchemaSqlExpression, Vl as ExplainResult, Vn as TableUpdateInput, Vo as jsonText, Vr as ReturningClause, Vs as ColumnDefaultOf, Vt as DialectRowLocking, Vu as ExpressionNullability, Wc as ColumnBehaviorErrorCode, Wd as RequiresOuterOf, Wl as HookMetadata, Wn as asc, Wo as rank, Wr as returning, Wt as JsonScalarKind, Wu as ExpressionSqlType, Xa as QuerySource, Xc as ExternalDefaultDescriptor, Xd as VisibleDependenciesOf, Xi as SchemaDiagnostic, Xl as HookStreamEnd, Xn as jsonArrayFrom, Xo as call, Xr as GroupingValidation, Xs as ColumnIsGenerated, Xt as RowLockMode, Ya as QueryAliasIdentity, Yc as ExpressionGeneratedColumnDescriptor, Yd as SubqueryMeta, Yi as Schema, Yl as HookQueryOperation, Yn as orderBy, Yo as upper, Yr as ClauseScope, Ys as ColumnInsertInput, Yt as PortableCastType, Za as alias, Zc as ExternalGeneratedColumnDescriptor, Zd as WindowMeta, Zi as SchemaNamingPolicy, Zl as HookSuccessOutcome, Zn as jsonObjectFrom, Zo as schemaCall, Zr as MissingScope, Zt as RowLockWaitPolicy, _a as FieldLikeOptions, _d as CardinalityOf, _f as SqlTextLike, _i as innerJoin, _l as SchemaDialectExtension, _n as SourceColumns, _o as SelectPart, _s as isDistinctFrom, _u as StreamingTransactionalQueryAdapter, ac as ColumnStorageDialectOf, ad as bigintResultDecoder, af as SqlBoolean, ai as WithClause, al as IdentityOptions, an as QueryConfig, ao as SourceIndex, ar as defaultValues, as as SqlFragment, au as QubuHooks, ba as ForeignKeyOptions, bd as Fragment, bf as SqlTypeSatisfies, bi as rightJoin, bn as SourceIdentity, bo as RowLockClause, bs as lt, bu as execute, ca as AnyKeyColumn, cd as jsonTextResultDecoder, cf as SqlEqualityComparable, ci as withCte, cl as ResolvedColumnBehavior, cn as QuerySqlTypeMap, co as TableIndex, cr as values, cs as caseWhen, cu as QubuStreamingExplainableClient, da as CheckConstraint, dd as AggregateDependenciesOf, df as SqlJson, di as except, dn as AnySource, do as DeclaredColumnNullability, ds as notExists, du as QubuTransaction, ea as SchemaTableNames, ec as ColumnOutput, ed as ResultDecoder, ei as ScopeValidation, el as GeneratedDescriptor, eo as IndexOptions, er as InsertSelectSource, es as count, eu as OperationEndHook, fa as CheckConstraintOptions, fc as NativeColumnStorage, fd as AggregateMeta, ff as SqlNumericLike, fi as intersect, fl as externalDefault, fo as and, fs as scalar, fu as QubuTransactionalClient, ga as FieldLike, gd as CardinalityMeta, gf as SqlText, gi as fullJoin, gn as Source, go as OmittableSelectClause, gs as gte, gu as StreamingQueryAdapter, ha as ConstraintTiming, hc as PortableColumnStorage, hd as CapabilityMetadataOf, hf as SqlSemanticType, hi as crossJoin, hl as identityColumn, hn as ProvidedSourceRow, ho as Omit, hs as gt, hu as StreamableQuery, id as ResultShape, if as SqlBinary, ii as RecursiveCteSource, il as IdentityOptionValue, in as Query, io as PostgresIndexExtension, ir as ValuesSource, is as sum, iu as QubuExplainableTransactionalClient, ja as SqliteConstraintExtension, jd as NullabilityOf, ji as SchemaDialect, jl as DriverValueEncoder, jn as AnyTable, jo as add, jr as MutationClause, ju as QueryValidationErrorCode, ka as SourceConstraintsRecord, kd as InheritedMetadataOf, ki as SelectionSqlTypes, ko as ClausePlacement, ks as isTrue, ku as QueryTypeValidation, la as CatalogCheckExpression, lc as ColumnStorageTypeOf, lf as SqlEqualityCompatible, li as SetOperator, ll as SchemaLiteralValue, ln as QueryWithRow, lo as index, ls as exists, lu as QubuStreamingTransaction, ma as ConstraintOptions, md as CapabilitiesOf, mf as SqlOrderable, mi as unionAll, ml as generatedColumn, mn as ProvidedSourceIdentity, mo as or, ms as eq, mu as QueryExecutor, na as SchemaTableRegistry, nc as ColumnStorage, nd as ResultDecodingError, nf as AnySqlType, ni as SelectQuery, nl as IdentityDialectExtension, no as IndexTermOptions, nr as InsertValue, ns as max, nu as QubuExplainableClient, oa as schema, oc as ColumnStorageKindOf, od as booleanResultDecoder, of as SqlDate, oi as cte, ol as LiteralDefaultDescriptor, on as QueryKind, oo as SourceIndexesRecord, or as insertInto, os as SqlTag, ou as QubuOptions, pa as ConstraintDialectExtension, pd as AnyFragment, pf as SqlOrderCompatible, pi as union, pl as externalGeneratedColumn, po as not, pu as QueryAdapter, qa as LateralIdentity, qc as DefaultDescriptor, qd as ResultMeta, ql as HookOperationKind, qn as nullsLast, qo as concat, qr as AvailableOuterScope, qs as ColumnHasRuntimeDefault, qt as PaginationPart, qu as SchemaExpressionBrand, rc as ColumnStorageDeclarationOf, rd as ResultField, rf as SqlBigInt, ri as CteSource, rl as IdentityGeneration, rn as AnyQuery, ro as MysqlIndexExtension, rr as InsertValuesRow, rs as min, ru as QubuExplainableStreamingTransactionalClient, sc as ColumnStorageOf, sd as dateResultDecoder, sf as SqlDecimal, si as recursiveCte, sl as MysqlIdentityExtension, sn as QueryRow, so as SqliteIndexExtension, sr as insertSelect, ss as sql, su as QubuStreamingClient, ta as SchemaTableRecord, tc as ColumnSqlType, td as ResultDecoders, ti as SelectCardinality, tl as IdentityDescriptor, to as IndexTerm, tr as InsertSource, ts as countDistinct, tu as QubuClient, ua as CatalogCheckSql, uc as ColumnUpdateInput, ud as timestampResultDecoder, uf as SqlInteger, ui as SetQuery, ul as SqliteIdentityExtension, un as Row, us as inQuery, uu as QubuStreamingTransactionalClient, va as ForeignKeyConstraint, vd as DependenciesOf, vf as SqlTimestamp, vi as leftJoin, vl as SchemaDialectName, vn as SourceConfig, vo as omit, vs as isNotDistinctFrom, vu as TransactionOptions, wa as KeyConstraintOptions, wc as bigint, wd as GroupingMeta, wi as FromSource, wn as SourceSqlTypeMap, wo as fetchNext, wr as UpdateAssignmentValue, ws as between, wu as stream, xa as ForeignKeyTarget, xd as FragmentMeta, xf as SqlUnknown, xi as groupBy, xl as SchemaObjectIdentity, xn as SourceKind, xo as RowLockOptions, xs as lte, xu as executeRows, ya as ForeignKeyMatch, yd as ExpressionMeta, yf as SqlTypeName, yi as naturalJoin, yl as SchemaMetadataDiagnostic, yn as SourceConstraints, yo as where, ys as like, yu as TransactionalQueryAdapter, za as foreignKey, zc as text, zd as RenderContext, zi as SchemaRenderContext, zl as ExplainReadOptions, zn as TableRow, zo as jsonNumber, zr as MutationSqlTypes, zt as DialectOptions, zu as Expression } from "./types-BG9DHEZi.mjs";
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 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 };
package/dist/index.mjs CHANGED
@@ -320,7 +320,7 @@ function caseWhen(condition, thenValue, elseValue) {
320
320
  //#endregion
321
321
  //#region src/expressions/sql.ts
322
322
  function sqlTemplate(strings, values) {
323
- return makeExpression("sql", (context) => {
323
+ const expression = makeExpression("sql", (context) => {
324
324
  strings.forEach((text, index) => {
325
325
  context.append(text);
326
326
  if (index >= values.length) return;
@@ -333,22 +333,22 @@ function sqlTemplate(strings, values) {
333
333
  else context.render(value);
334
334
  });
335
335
  });
336
+ const result = Object.freeze({
337
+ ...expression,
338
+ $type: () => result
339
+ });
340
+ return result;
336
341
  }
337
- function createSqlTag() {
338
- return (strings, ...values) => sqlTemplate(strings, values);
339
- }
340
- const sqlTag = createSqlTag();
341
- sqlTag.type = createSqlTag;
342
342
  /**
343
343
  * Build trusted SQL syntax while binding every ordinary substitution as a parameter. Qubu fragments
344
344
  * remain composable substitutions.
345
345
  *
346
346
  * @remarks
347
347
  * Template text is trusted and is not parsed. Use `identifier()` from `qubu/core` for runtime
348
- * identifiers and `unsafeExpression()` for deliberately dynamic syntax. Use `sql.type<Output,
349
- * SqlType>()` when the fragment's result is known.
348
+ * identifiers and `unsafeExpression()` for deliberately dynamic syntax. Use `.$type<Output,
349
+ * SqlType>()` on the returned fragment when the fragment's result is known.
350
350
  */
351
- const sql = Object.freeze(sqlTag);
351
+ const sql = Object.freeze((strings, ...values) => sqlTemplate(strings, values));
352
352
  function isQueryFragment(value) {
353
353
  return "queryKind" in value && "row" in value;
354
354
  }
@@ -1,4 +1,4 @@
1
- import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-CdcYI0lU.mjs";
1
+ import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-_CBj28Qo.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-CdcYI0lU.mjs";
1
+ import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-_CBj28Qo.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-CdcYI0lU.mjs";
1
+ import { ft as IntrospectionOptions, jt as CatalogConnection, lt as IntrospectionCatalog } from "../types-_CBj28Qo.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";
@@ -1,6 +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-CdcYI0lU.mjs";
2
- import { B as CompleteSchemaSnapshot } from "./types-DcIiNePM.mjs";
3
- import "./index-DB07P2X8.mjs";
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-_CBj28Qo.mjs";
2
+ import { B as CompleteSchemaSnapshot } from "./types-BG9DHEZi.mjs";
3
+ import "./index-BFl0GKZX.mjs";
4
4
  //#region src/introspection/catalog.d.ts
5
5
  /**
6
6
  * Materialize every optional object-family collection and deeply freeze the normalized catalog.
package/dist/mysql.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Cr as onDuplicateKeyUpdate, Pt as Dialect, Sr as incoming, br as IncomingIdentity, xr as OnDuplicateKeyUpdateClause, yr as IncomingColumns } from "./types-DcIiNePM.mjs";
1
+ import { Cr as onDuplicateKeyUpdate, Pt as Dialect, Sr as incoming, br as IncomingIdentity, xr as OnDuplicateKeyUpdateClause, yr as IncomingColumns } from "./types-BG9DHEZi.mjs";
2
2
  //#region src/dialects/mysql.d.ts
3
3
  declare function mysqlDialect(): Dialect<"json" | "row-locking" | "on-duplicate-key-update">;
4
4
  //#endregion
@@ -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-DcIiNePM.mjs";
1
+ import { Ad as MetadataOf, As as Operand, Dr as UpdateFromClause, Gu as ExpressionWithOutput, Ku as SchemaExpression, Ms as OperandSqlType, Ns as SqlCapabilityValidation, Or as UpdateFromScope, 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 OperandNullability, kr as updateFrom, lr as ConflictAction, mr as OnConflictClause, nf as AnySqlType, pr as ExcludedSource, ps as ComparisonValidation, qd as ResultMeta, ur as ConflictTarget, vr as onConflict, xf as SqlUnknown, yd as ExpressionMeta } from "./types-BG9DHEZi.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<"on-conflict" | "json" | "ilike" | "row-locking" | "update-from">;
7
+ declare function postgresDialect(): Dialect<"json" | "ilike" | "on-conflict" | "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-DcIiNePM.mjs";
1
+ import { $a as IndexDialectExtension, $c as GeneratedColumnMode, $i as SchemaTableEntry, $s as ColumnOptions, Aa as SourceLike, Ac as date, An as sourceIdentity, Ba as primaryKey, Bc as timestamp, Bi as SchemaRenderOptions, Bn as TableSqlTypes, Bs as ColumnCodec, Ca as KeyConstraint, Cc as StorageTypeOf, Cl as assertSchemaDialectSupport, Cn as SourceRow, Da as ReferentialAction, Dc as column, Dl as isValidSchemaObjectName, Dn as createSource, Ea as PostgresConstraintExtension, Ec as boolean, El as generatedSchemaObjectName, En as UnknownSourceSqlTypes, Fa as UniqueNullSemantics, Fc as nativeStorage, Fi as SchemaExpressionError, Fn as TableIdentity, Ga as AliasIdentity, Gc as ColumnDefault, Gi as renderSchemaExpression, Gs as ColumnGeneratedOf, Ha as unique, Hc as CanonicalLiteral, Hi as defineSchemaExpression, Hn as table, Hs as ColumnDefinition, Ia as catalogCheck, Ic as nullable, Ii as SchemaExpressionErrorCode, In as TableInsertInput, Ja as LateralSource, Jc as ExpressionDefaultDescriptor, Ji as unsafeSchemaSql, Js as ColumnIdentityOf, Ka as AliasedSource, Kc as ColumnDefaultInput, Ki as renderSchemaSql, Ks as ColumnHasDefault, La as catalogForeignKey, Lc as numeric, Li as SchemaExpressionInput, Ln as TableMetadataCallback, Ma as TableLike, Mc as integer, Mi as SchemaDialectHooks, Mn as Table, Na as UniqueConstraint, Nc as json, Ni as createSchemaDialect, Nn as TableColumns, Oa as SourceConstraint, Oc as columnResultValue, Ol as materializeSchemaObjectIdentity, On as customSource, Pa as UniqueConstraintOptions, Pc as nativeColumn, Pi as RenderedSchemaExpression, Pn as TableDefinitions, Qa as lateral, Qc as GeneratedColumnDescriptor, Qi as SchemaOptions, Qs as ColumnOnUpdateOf, Ra as check, Rc as portableStorage, Ri as SchemaExpressionMode, Rn as TableOptions, Sa as ForeignKeyTargetInput, Sc as StorageOf, Sl as SchemaObjectNameOptions, Sn as SourceProvision, Ta as MysqlConstraintExtension, Tc as binary, Tl as freezeSchemaMetadata, Tn as SourceSqlTypes, Ua as uniqueConstraint, Uc as ColumnBehaviorError, Ui as isUnsafeSchemaSql, Us as ColumnDefinitionConfig, Va as references, Vc as uuid, Vi as UnsafeSchemaSqlExpression, Vn as TableUpdateInput, Vs as ColumnDefaultOf, Wa as validateConstraintDialect, Wc as ColumnBehaviorErrorCode, Wi as normalizeSchemaSql, Ws as ColumnFromOptions, Xa as QuerySource, Xc as ExternalDefaultDescriptor, Xi as SchemaDiagnostic, Xs as ColumnIsGenerated, Ya as QueryAliasIdentity, Yc as ExpressionGeneratedColumnDescriptor, Yi as Schema, Ys as ColumnInsertInput, Za as alias, Zc as ExternalGeneratedColumnDescriptor, Zi as SchemaNamingPolicy, Zs as ColumnIsNullable, _a as FieldLikeOptions, _c as PortableStorageDescriptor, _l as SchemaDialectExtension, _n as SourceColumns, aa as generatedTableName, ac as ColumnStorageDialectOf, al as IdentityOptions, ao as SourceIndex, ba as ForeignKeyOptions, bc as StorageDescriptor, bl as SchemaMetadataValidationError, bn as SourceIdentity, ca as AnyKeyColumn, cc as ColumnStorageType, cl as ResolvedColumnBehavior, co as TableIndex, da as CheckConstraint, dc as DialectNativeStorage, dl as canonicalLiteral, dn as AnySource, do as DeclaredColumnNullability, ea as SchemaTableNames, ec as ColumnOutput, el as GeneratedDescriptor, eo as IndexOptions, fa as CheckConstraintOptions, fc as NativeColumnStorage, fl as externalDefault, fn as CustomSource, ga as FieldLike, gc as PortableStorage, gl as resolveColumnBehavior, gn as Source, ha as ConstraintTiming, hc as PortableColumnStorage, hl as identityColumn, hn as ProvidedSourceRow, ia as defaultSchemaNamingPolicy, ic as ColumnStorageDescriptor, il as IdentityOptionValue, io as PostgresIndexExtension, ja as SqliteConstraintExtension, jc as encodeColumnParameter, ji as SchemaDialect, jn as AnyTable, ka as SourceConstraintsRecord, kc as columnSqlType, kl as materializeSchemaObjectRecord, kn as exposeColumns, la as CatalogCheckExpression, lc as ColumnStorageTypeOf, ll as SchemaLiteralValue, lo as index, ma as ConstraintOptions, mc as NativeStorageDescriptor, ml as generatedColumn, mn as ProvidedSourceIdentity, na as SchemaTableRegistry, nc as ColumnStorage, nl as IdentityDialectExtension, no as IndexTermOptions, oa as schema, oc as ColumnStorageKindOf, ol as LiteralDefaultDescriptor, oo as SourceIndexesRecord, pa as ConstraintDialectExtension, pc as NativeStorage, pl as externalGeneratedColumn, pn as CustomSourceOptions, qa as LateralIdentity, qc as DefaultDescriptor, qi as schemaExpression, qs as ColumnHasRuntimeDefault, ra as SchemaValidationError, rc as ColumnStorageDeclarationOf, rl as IdentityGeneration, ro as MysqlIndexExtension, sa as schemaNamingPolicyVersion, sc as ColumnStorageOf, sl as MysqlIdentityExtension, so as SqliteIndexExtension, ta as SchemaTableRecord, tc as ColumnSqlType, tl as IdentityDescriptor, to as IndexTerm, ua as CatalogCheckSql, uc as ColumnUpdateInput, ul as SqliteIdentityExtension, uo as validateIndexDialect, va as ForeignKeyConstraint, vc as PortableStorageType, vl as SchemaDialectName, vn as SourceConfig, wa as KeyConstraintOptions, wc as bigint, wl as dialectMismatchDiagnostic, wn as SourceSqlTypeMap, xa as ForeignKeyTarget, xc as StorageDialectOf, xl as SchemaObjectIdentity, xn as SourceKind, ya as ForeignKeyMatch, yc as StorageDeclarationOf, yl as SchemaMetadataDiagnostic, yn as SourceConstraints, za as foreignKey, zc as text, zi as SchemaRenderContext, zn as TableRow } from "./types-BG9DHEZi.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-DcIiNePM.mjs";
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-BG9DHEZi.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-DcIiNePM.mjs";
2
- import { t as SchemaSnapshotOptions } from "../serialize-Dg-Q55YQ.mjs";
1
+ import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-BG9DHEZi.mjs";
2
+ import { t as SchemaSnapshotOptions } from "../serialize-DzPyKT4f.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-DcIiNePM.mjs";
2
- import { t as SchemaSnapshotOptions } from "../serialize-Dg-Q55YQ.mjs";
1
+ import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-BG9DHEZi.mjs";
2
+ import { t as SchemaSnapshotOptions } from "../serialize-DzPyKT4f.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-DcIiNePM.mjs";
2
- import { t as SchemaSnapshotOptions } from "../serialize-Dg-Q55YQ.mjs";
1
+ import { Yi as Schema, ji as SchemaDialect, l as SnapshotCreateResult, m as SnapshotDialect, n as SchemaSnapshot, r as SchemaSnapshotAdapter } from "../types-BG9DHEZi.mjs";
2
+ import { t as SchemaSnapshotOptions } from "../serialize-DzPyKT4f.mjs";
3
3
  //#region src/snapshot/sqlite.d.ts
4
4
  /** SQLite's snapshot dialect-extension identity. */
5
5
  declare const sqliteSnapshotDialect: SnapshotDialect;
@@ -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-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";
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, fc as NativeColumnStorage, ft as CompleteSnapshotOpaqueObject, g as SnapshotExpression, gt as CompleteSnapshotPolicy, h as SnapshotDialectExtension, hc as PortableColumnStorage, 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, 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-BG9DHEZi.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-DzPyKT4f.mjs";
3
+ import "./index-BFl0GKZX.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-DcIiNePM.mjs";
1
+ import { Hs as ColumnDefinition, Pt as Dialect, _r as excluded, dr as DoNothingAction, fc as NativeColumnStorage, fr as DoUpdateAction, gr as doUpdate, hr as doNothing, lr as ConflictAction, mr as OnConflictClause, pr as ExcludedSource, ur as ConflictTarget, vf as SqlTimestamp, vr as onConflict } from "./types-BG9DHEZi.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<"on-conflict" | "json">;
30
+ declare function sqliteDialect(): Dialect<"json" | "on-conflict">;
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 };
@@ -1648,18 +1648,17 @@ type EmbeddedQueryMetadata<TChild> = TChild extends AnyQuery ? SubqueryMeta : ne
1648
1648
  * A parameterized SQL template that composes with Qubu expressions and queries through the normal
1649
1649
  * renderer.
1650
1650
  */
1651
- type SqlFragment<TOutput = unknown, TSqlType extends AnySqlType = SqlUnknown, TChild extends AnyFragment = never> = Expression<ResultMeta<TOutput, NullabilityOf<TChild>, TSqlType> | ExpressionMeta<DependenciesOf<TChild>> | InheritedMetadata<TChild> | EmbeddedQueryMetadata<TChild>, "sql">;
1652
- /** A SQL template tag with an explicitly declared output and SQL domain. */
1653
- interface TypedSqlTag<TOutput, TSqlType extends AnySqlType = SqlUnknown> {
1654
- <const TValues extends readonly unknown[]>(strings: TemplateStringsArray, ...values: TValues): SqlFragment<TOutput, TSqlType, SqlChild<TValues>>;
1655
- }
1656
- /** Public call contract for {@link sql}. */
1657
- interface SqlTag extends TypedSqlTag<unknown, SqlUnknown> {
1651
+ type SqlFragment<TOutput = unknown, TSqlType extends AnySqlType = SqlUnknown, TChild extends AnyFragment = never> = Expression<ResultMeta<TOutput, NullabilityOf<TChild>, TSqlType> | ExpressionMeta<DependenciesOf<TChild>> | InheritedMetadata<TChild> | EmbeddedQueryMetadata<TChild>, "sql"> & {
1658
1652
  /**
1659
- * Declare the application output and SQL semantic domain without changing how template
1660
- * substitutions render.
1653
+ * Declare the application output and optionally the SQL semantic domain. Omitting the domain
1654
+ * preserves its current declaration. This changes only type metadata: rendering, interpolation
1655
+ * metadata, and nullable-source tracking remain unchanged. No SQL cast or decoder is applied.
1661
1656
  */
1662
- type<TOutput, TSqlType extends AnySqlType = SqlUnknown>(): TypedSqlTag<TOutput, TSqlType>;
1657
+ $type<TNextOutput, TNextSqlType extends AnySqlType = TSqlType>(): SqlFragment<TNextOutput, TNextSqlType, TChild>;
1658
+ };
1659
+ /** Public call contract for {@link sql}. */
1660
+ interface SqlTag {
1661
+ <const TValues extends readonly unknown[]>(strings: TemplateStringsArray, ...values: TValues): SqlFragment<unknown, SqlUnknown, SqlChild<TValues>>;
1663
1662
  }
1664
1663
  /**
1665
1664
  * Build trusted SQL syntax while binding every ordinary substitution as a parameter. Qubu fragments
@@ -1667,8 +1666,8 @@ interface SqlTag extends TypedSqlTag<unknown, SqlUnknown> {
1667
1666
  *
1668
1667
  * @remarks
1669
1668
  * Template text is trusted and is not parsed. Use `identifier()` from `qubu/core` for runtime
1670
- * identifiers and `unsafeExpression()` for deliberately dynamic syntax. Use `sql.type<Output,
1671
- * SqlType>()` when the fragment's result is known.
1669
+ * identifiers and `unsafeExpression()` for deliberately dynamic syntax. Use `.$type<Output,
1670
+ * SqlType>()` on the returned fragment when the fragment's result is known.
1672
1671
  */
1673
1672
  declare const sql: SqlTag;
1674
1673
  //#endregion
@@ -3493,14 +3492,19 @@ type ConditionalPaginationClause<TParts extends readonly SelectPart[]> = { [TInd
3493
3492
  * unless a known row-reducing clause is present. Conditional pagination, predicates, and arbitrary
3494
3493
  * clauses do not prove exactness.
3495
3494
  */
3496
- type SelectCardinality<TParts extends readonly SelectPart[]> = UnconditionalAtMostOneClause<TParts> extends never ? ConditionalPaginationClause<TParts> extends never ? Exclude<TParts[number], ExactlyOneSafeClause | Omit$1> extends never ? "exactly-one" : "many" : "many" : "zero-or-one";
3495
+ type SelectCardinalityForParts<TParts extends readonly SelectPart[]> = UnconditionalAtMostOneClause<TParts> extends never ? ConditionalPaginationClause<TParts> extends never ? Exclude<TParts[number], ExactlyOneSafeClause | Omit$1> extends never ? "exactly-one" : "many" : "many" : "zero-or-one";
3496
+ type PossibleSelectCardinality<TParts extends readonly SelectPart[]> = TParts extends readonly SelectPart[] ? SelectCardinalityForParts<TParts> : never;
3497
+ /** Collapse every possible clause tuple to the weakest cardinality guaranteed by all branches. */
3498
+ type SelectCardinality<TParts extends readonly SelectPart[]> = "many" extends PossibleSelectCardinality<TParts> ? "many" : "zero-or-one" extends PossibleSelectCardinality<TParts> ? "zero-or-one" : "exactly-one";
3497
3499
  type ClauseScope<TClause> = TClause extends FromClause ? FromScope<TClause> : TClause extends JoinClause<infer TSource, any> ? ProvidedSourceIdentity<TSource> : never;
3498
3500
  type AvailableScope<TClauses extends readonly AnySelectClause[]> = ClauseScope<TClauses[number]>;
3499
3501
  type AvailableOuterScope<TClauses extends readonly AnySelectClause[]> = ProvidesOuterOf<TClauses[number]>;
3500
3502
  type NullableSources<TClauses extends readonly AnySelectClause[]> = NullableSourcesOf<TClauses[number]>;
3501
3503
  type RequiredScope<TSelection, TClauses extends readonly AnySelectClause[]> = SelectionRequires<TSelection> | RequiresOuterOf<SelectionItems<TSelection>> | RequiresOf<TClauses[number]> | RequiresOuterOf<TClauses[number]>;
3502
- type MissingScope<TSelection, TClauses extends readonly AnySelectClause[]> = Exclude<RequiredScope<TSelection, TClauses>, AvailableScope<TClauses> | AvailableOuterScope<TClauses>>;
3503
- type RequiredOuterScope<TSelection, TClauses extends readonly AnySelectClause[]> = Extract<Exclude<RequiredScope<TSelection, TClauses>, AvailableScope<TClauses>>, AvailableOuterScope<TClauses>>;
3504
+ type MissingScopeForClauses<TSelection, TClauses extends readonly AnySelectClause[]> = Exclude<RequiredScope<TSelection, TClauses>, AvailableScope<TClauses> | AvailableOuterScope<TClauses>>;
3505
+ type MissingScope<TSelection, TClauses extends readonly AnySelectClause[]> = TClauses extends readonly AnySelectClause[] ? MissingScopeForClauses<TSelection, TClauses> : never;
3506
+ type RequiredOuterScopeForClauses<TSelection, TClauses extends readonly AnySelectClause[]> = Extract<Exclude<RequiredScope<TSelection, TClauses>, AvailableScope<TClauses>>, AvailableOuterScope<TClauses>>;
3507
+ type RequiredOuterScope<TSelection, TClauses extends readonly AnySelectClause[]> = TClauses extends readonly AnySelectClause[] ? RequiredOuterScopeForClauses<TSelection, TClauses> : never;
3504
3508
  type ScopeValidation<TSelection, TClauses extends readonly AnySelectClause[]> = [MissingScope<TSelection, TClauses>] extends [never] ? unknown : QueryTypeValidation<"missing-source", "select.scope", "Add a FROM, JOIN, or correlate() clause that provides the referenced source.", MissingScope<TSelection, TClauses>>;
3505
3509
  type GroupingRuleClause = HavingClause<any> | OrderByClause<any>;
3506
3510
  type HasGroupByClause<TClauses extends readonly AnySelectClause[]> = Extract<TClauses[number], GroupByClause<any>> extends never ? false : true;
@@ -3527,12 +3531,13 @@ type SelectionGroupingFailures<TSelection, TClauses extends readonly AnySelectCl
3527
3531
  type ClauseGroupingFailures<TClauses extends readonly AnySelectClause[]> = TClauses[number] extends (infer TClause) ? TClause extends GroupingRuleClause ? GroupingFailure<TClause, TClauses> : never : never;
3528
3532
  type GroupByAggregateFailures<TClauses extends readonly AnySelectClause[]> = TClauses[number] extends (infer TClause) ? TClause extends GroupByClause<any> ? HasAggregate<TClause> extends true ? TClause : never : never : never;
3529
3533
  type GroupingFailures<TSelection, TClauses extends readonly AnySelectClause[]> = SelectionGroupingFailures<TSelection, TClauses> | ClauseGroupingFailures<TClauses> | GroupByAggregateFailures<TClauses>;
3534
+ type PossibleGroupingFailures<TSelection, TClauses extends readonly AnySelectClause[]> = TClauses extends readonly AnySelectClause[] ? RequiresGrouping<TSelection, TClauses> extends true ? GroupingFailures<TSelection, TClauses> : never : never;
3530
3535
  /**
3531
3536
  * Enforce the grouped-query rule: visible column dependencies must be grouped or functionally
3532
3537
  * determined by a grouped, declared key from the same source. Aggregate arguments are consumed by
3533
3538
  * the aggregate. Non-column GROUP BY expressions are accepted as exact grouping keys only.
3534
3539
  */
3535
- type GroupingValidation<TSelection, TClauses extends readonly AnySelectClause[]> = RequiresGrouping<TSelection, TClauses> extends true ? [GroupingFailures<TSelection, TClauses>] extends [never] ? unknown : QueryTypeValidation<"invalid-grouping", "select.grouping", "Group every visible dependency or project it through an aggregate.", GroupingFailures<TSelection, TClauses>> : unknown;
3540
+ type GroupingValidation<TSelection, TClauses extends readonly AnySelectClause[]> = [PossibleGroupingFailures<TSelection, TClauses>] extends [never] ? unknown : QueryTypeValidation<"invalid-grouping", "select.grouping", "Group every visible dependency or project it through an aggregate.", PossibleGroupingFailures<TSelection, TClauses>>;
3536
3541
  //#endregion
3537
3542
  //#region src/query/select.d.ts
3538
3543
  type SelectMetadata<TSelection, TClauses extends readonly AnySelectClause[]> = ([RequiredOuterScope<TSelection, TClauses>] extends [never] ? never : RequiresOuterSourceMeta<RequiredOuterScope<TSelection, TClauses>>) | CapabilityMetadataOf<SelectionItems<TSelection> | TClauses[number]>;
@@ -4707,4 +4712,4 @@ type SchemaSnapshotInput = CompleteSchemaSnapshotInput;
4707
4712
  /** Expose the schema generic in tooling declarations without widening APIs. */
4708
4713
  type AnySchema = Schema<any>;
4709
4714
  //#endregion
4710
- export { CompleteSnapshotExtension as $, IndexDialectExtension as $a, GeneratedColumnDescriptor as $c, isFragment as $d, SchemaTableEntry as $i, HookTransactionOperation as $l, DefaultValuesSource as $n, avg as $o, RequiredScope as $r, ColumnOnUpdateOf as $s, assertDialectCapability as $t, ResultDecodeContext as $u, SnapshotStorage as A, SourceLike as Aa, columnSqlType as Ac, MetadataOf as Ad, all as Ai, materializeSchemaObjectRecord as Al, sourceIdentity as An, SelectClause as Ao, AllowAllClause as Ar, isTrue as As, schemaSnapshotCompleteVersion as At, QueryTypeValidation as Au, CompleteSchemaSnapshot as B, primaryKey as Ba, text as Bc, RenderFunction as Bd, SchemaRenderOptions as Bi, ExplainReadOptions as Bl, TableSqlTypes as Bn, jsonPath as Bo, allowAll as Br, typedCast as Bs, DialectPagination as Bt, ExpressionKind as Bu, SnapshotIndexTerm as C, KeyConstraint as Ca, StorageOf as Cc, GroupingKeysOf as Cd, FromScope as Ci, SchemaObjectNameOptions as Cl, SourceRow as Cn, fetchFirst as Co, onDuplicateKeyUpdate as Cr, ne as Cs, CompleteSnapshotValueFact as Ct, explain as Cu, SnapshotLiteral as D, ReferentialAction as Da, boolean as Dc, HasWindow as Dd, SelectionObject as Di, generatedSchemaObjectName as Dl, createSource as Dn, distinct as Do, UpdateFromClause as Dr, notIn as Ds, SchemaSnapshotV1Input as Dt, RenderOptions as Du, SnapshotKeyConstraint as E, PostgresConstraintExtension as Ea, binary as Ec, HasSubquery as Ed, Selection as Ei, freezeSchemaMetadata as El, UnknownSourceSqlTypes as En, having as Eo, update as Er, inList as Es, SchemaSnapshotV1DecodeResult as Et, RenderCapabilityValidation as Eu, neutralSnapshotDialect as F, UniqueNullSemantics as Fa, nativeColumn as Fc, ProvidesOuterOf as Fd, SchemaExpressionError as Fi, ExecutionResult as Fl, TableIdentity as Fn, subtract as Fo, MutationReturning as Fr, asValue as Fs, DialectCapability as Ft, ColumnReference as Fu, CompleteSnapshotColumn as G, AliasIdentity as Ga, ColumnBehaviorErrorCode as Gc, RequiresOuterSourceMeta as Gd, renderSchemaExpression as Gi, HookMetadata as Gl, desc as Gn, rowNumber as Go, correlate as Gr, ColumnFromOptions as Gs, NamedCastTarget as Gt, ExpressionWithOutput as Gu, CompleteSnapshotCapabilities as H, unique as Ha, uuid as Hc, RequiresOf as Hd, defineSchemaExpression as Hi, ExplainResult as Hl, table as Hn, denseRank as Ho, ReturningRow as Hr, ColumnDefaultOf as Hs, ExplainFormat as Ht, ExpressionOutput as Hu, schemaSnapshotDialectVersion as I, catalogCheck as Ia, nativeStorage as Ic, ProvidesOuterSourceMeta as Id, SchemaExpressionErrorCode as Ii, ExplainMutationOptions as Il, TableInsertInput as In, JsonPath as Io, MutationReturningClause as Ir, typedValue as Is, DialectCastTypes as It, expressionFragment as Iu, CompleteSnapshotCreateResult as J, LateralSource as Ja, DefaultDescriptor as Jc, SqlTypeOf as Jd, unsafeSchemaSql as Ji, HookOperationKind as Jl, order as Jn, lower as Jo, AvailableScope as Jr, ColumnHasRuntimeDefault as Js, PortableCastTarget as Jt, isExpression as Ju, CompleteSnapshotComment as K, AliasedSource as Ka, ColumnDefault as Kc, RequiresSourceMeta as Kd, renderSchemaSql as Ki, HookMetadataValue as Kl, nullsFirst as Kn, coalesce as Ko, select as Kr, ColumnGeneratedOf as Ks, PaginationKind as Kt, SchemaExpression as Ku, schemaSnapshotFormat as L, catalogForeignKey as La, nullable as Lc, ProvidesSourceMeta as Ld, SchemaExpressionInput as Li, ExplainOptions as Ll, TableMetadataCallback as Ln, jsonBoolean as Lo, MutationRow as Lr, value as Ls, DialectExplain as Lt, AnyExpression as Lu, SnapshotTable as M, TableLike as Ma, encodeColumnParameter as Mc, NullableSourceMeta as Md, SchemaDialectHooks as Mi, DriverValueEncoder as Ml, Table as Mn, divide as Mo, MutationKind as Mr, OperandNullability as Ms, schemaSnapshotVersion1 as Mt, QueryValidationErrorCode as Mu, SnapshotUniqueConstraint as N, UniqueConstraint as Na, integer as Nc, NullableSourcesOf as Nd, createSchemaDialect as Ni, ExecutionOptions as Nl, TableColumns as Nn, modulo as No, MutationQuery as Nr, OperandSqlType as Ns, CastTarget as Nt, QueryValidationIssue as Nu, SnapshotNamingPolicy as O, SourceConstraint as Oa, column as Oc, InheritedMetadata as Od, SelectionOutput as Oi, isValidSchemaObjectName as Ol, customSource as On, AnySelectClause as Oo, UpdateFromScope as Or, isNotNull as Os, completeSchemaSnapshotFormat as Ot, RenderedQuery as Ou, SnapshotValidationContext as P, UniqueConstraintOptions as Pa, json as Pc, OutputOf as Pd, RenderedSchemaExpression as Pi, ExecutionRequest as Pl, TableDefinitions as Pn, multiply as Po, MutationQueryConfig as Pr, SqlCapabilityValidation as Ps, Dialect as Pt, ColumnDependency as Pu, CompleteSnapshotEnum as Q, lateral as Qa, ExternalGeneratedColumnDescriptor as Qc, fragment as Qd, SchemaOptions as Qi, HookSuccessOutcome as Ql, deleteFrom as Qn, typedCall as Qo, RequiredOuterScope as Qr, ColumnIsNullable as Qs, SchemaLiteralRenderer as Qt, DecodableResultType as Qu, schemaSnapshotNamingPolicyVersion as R, check as Ra, numeric as Rc, QueryCardinality as Rd, SchemaExpressionMode as Ri, ExplainOptionsFor as Rl, TableOptions as Rn, jsonExists as Ro, MutationScopeValidation as Rr, mapResult as Rs, DialectJson as Rt, AnySchemaExpression as Ru, SnapshotIndex as S, ForeignKeyTargetInput as Sa, StorageDialectOf as Sc, GroupingDependenciesOf as Sd, SqlUuid as Sf, FromClause as Si, SchemaObjectIdentity as Sl, SourceProvision as Sn, rowLock as So, incoming as Sr, lte as Ss, CompleteSnapshotTrigger as St, executeRows as Su, SnapshotJsonValue as T, MysqlConstraintExtension as Ta, bigint as Tc, HasAggregate as Td, from as Ti, dialectMismatchDiagnostic as Tl, SourceSqlTypes as Tn, offset as To, UpdateAssignments as Tr, between as Ts, SchemaSnapshotV1 as Tt, stream as Tu, CompleteSnapshotCheckConstraint as U, uniqueConstraint as Ua, CanonicalLiteral as Uc, RequiresOuterMetadataOf as Ud, isUnsafeSchemaSql as Ui, ExplainableQueryAdapter as Ul, OrderTerm as Un, over as Uo, ReturningSqlTypes as Ur, ColumnDefinition as Us, ExplainRenderOptions as Ut, ExpressionRequires as Uu, CompleteSchemaSnapshotInput as V, references as Va, timestamp as Vc, RequiresCapabilityMeta as Vd, UnsafeSchemaSqlExpression as Vi, ExplainRequest as Vl, TableUpdateInput as Vn, jsonText as Vo, ReturningClause as Vr, ColumnCodec as Vs, DialectRowLocking as Vt, ExpressionNullability as Vu, CompleteSnapshotCollation as W, validateConstraintDialect as Wa, ColumnBehaviorError as Wc, RequiresOuterOf as Wd, normalizeSchemaSql as Wi, HookErrorOutcome as Wl, asc as Wn, rank as Wo, returning as Wr, ColumnDefinitionConfig as Ws, JsonScalarKind as Wt, ExpressionSqlType as Wu, CompleteSnapshotDeferredObject as X, QuerySource as Xa, ExpressionGeneratedColumnDescriptor as Xc, VisibleDependenciesOf as Xd, SchemaDiagnostic as Xi, HookQueryOperation as Xl, jsonArrayFrom as Xn, call as Xo, GroupingValidation as Xr, ColumnInsertInput as Xs, RowLockMode as Xt, markExpressionCategory as Xu, CompleteSnapshotDecodeResult as Y, QueryAliasIdentity as Ya, ExpressionDefaultDescriptor as Yc, SubqueryMeta as Yd, Schema as Yi, HookOutcome as Yl, orderBy as Yn, upper as Yo, ClauseScope as Yr, ColumnIdentityOf as Ys, PortableCastType as Yt, makeExpression as Yu, CompleteSnapshotDomain as Z, alias as Za, ExternalDefaultDescriptor as Zc, WindowMeta as Zd, SchemaNamingPolicy as Zi, HookStreamEnd as Zl, jsonObjectFrom as Zn, schemaCall as Zo, MissingScope as Zr, ColumnIsGenerated as Zs, RowLockWaitPolicy as Zt, withDialectCapability as Zu, SnapshotExpressionContext as _, FieldLikeOptions as _a, PortableStorage as _c, CardinalityOf as _d, SqlTextLike as _f, innerJoin as _i, resolveColumnBehavior as _l, SourceColumns as _n, SelectPart as _o, excluded as _r, gte as _s, CompleteSnapshotProvenance as _t, StreamingQueryAdapter as _u, SnapshotBigInt as a, generatedTableName as aa, ColumnStorageDescriptor as ac, bigintResultDecoder as ad, SqlBoolean as af, WithClause as ai, IdentityOptionValue as al, QueryConfig as an, SourceIndex as ao, defaultValues as ar, SqlFragment as as, CompleteSnapshotNamespace as at, QubuExplainableTransactionalClient as au, SnapshotGeneratedColumn as b, ForeignKeyOptions as ba, StorageDeclarationOf as bc, Fragment as bd, SqlTypeSatisfies as bf, rightJoin as bi, SchemaMetadataDiagnostic as bl, SourceIdentity as bn, RowLockClause as bo, IncomingIdentity as br, like as bs, CompleteSnapshotSequence as bt, TransactionalQueryAdapter as bu, SnapshotConstraint as c, AnyKeyColumn as ca, ColumnStorageOf as cc, jsonTextResultDecoder as cd, SqlEqualityComparable as cf, withCte as ci, MysqlIdentityExtension as cl, QuerySqlTypeMap as cn, TableIndex as co, values as cr, sql as cs, CompleteSnapshotObjectMetadata as ct, QubuStreamingClient as cu, SnapshotDefault as d, CheckConstraint as da, ColumnUpdateInput as dc, AggregateDependenciesOf as dd, SqlJson as df, except as di, SqliteIdentityExtension as dl, AnySource as dn, DeclaredColumnNullability as do, DoNothingAction as dr, inQuery as ds, CompleteSnapshotObjectReference as dt, QubuStreamingTransactionalClient as du, SchemaTableNames as ea, ColumnOptions as ec, ResultDecoder as ed, parenthesize as ef, ScopeValidation as ei, GeneratedColumnMode as el, createDialect as en, IndexOptions as eo, InsertSelectSource as er, count as es, CompleteSnapshotForeignKey as et, NestedTransactionalQueryAdapter as eu, SnapshotDiagnostic as f, CheckConstraintOptions as fa, DialectNativeStorage as fc, AggregateMeta as fd, SqlNumericLike as ff, intersect as fi, canonicalLiteral as fl, CustomSource as fn, and as fo, DoUpdateAction as fr, notExists as fs, CompleteSnapshotOpaqueObject as ft, QubuTransaction as fu, SnapshotExpression as g, FieldLike as ga, PortableColumnStorage as gc, CardinalityMeta as gd, SqlText as gf, fullJoin as gi, identityColumn as gl, Source as gn, OmittableSelectClause as go, doUpdate as gr, gt as gs, CompleteSnapshotPolicy as gt, StreamableQuery as gu, SnapshotDialectExtension as h, ConstraintTiming as ha, NativeStorageDescriptor as hc, CapabilityMetadataOf as hd, SqlSemanticType as hf, crossJoin as hi, generatedColumn as hl, ProvidedSourceRow as hn, Omit$1 as ho, doNothing as hr, eq as hs, CompleteSnapshotPhysicalReference as ht, QueryExecutor as hu, SchemaSnapshotInput as i, defaultSchemaNamingPolicy as ia, ColumnStorageDeclarationOf as ic, ResultShape as id, SqlBinary as if, RecursiveCteSource as ii, IdentityGeneration as il, Query as in, PostgresIndexExtension as io, ValuesSource as ir, sum as is, CompleteSnapshotKeyConstraint as it, QubuExplainableStreamingTransactionalClient as iu, SnapshotStorageContext as j, SqliteConstraintExtension as ja, date as jc, NullabilityOf as jd, SchemaDialect as ji, AdapterExecutionResult as jl, AnyTable as jn, add as jo, MutationClause as jr, Operand as js, schemaSnapshotV1Version as jt, QueryValidationError as ju, SnapshotSpecialNumber as k, SourceConstraintsRecord as ka, columnResultValue as kc, InheritedMetadataOf as kd, SelectionSqlTypes as ki, materializeSchemaObjectIdentity as kl, exposeColumns as kn, ClausePlacement as ko, updateFrom as kr, isNull as ks, completeSchemaSnapshotVersion as kt, render as ku, SnapshotCreateResult as l, CatalogCheckExpression as la, ColumnStorageType as lc, resultValue as ld, SqlEqualityCompatible as lf, SetOperator as li, ResolvedColumnBehavior as ll, QueryWithRow as ln, index as lo, ConflictAction as lr, caseWhen as ls, CompleteSnapshotObjectOwner as lt, QubuStreamingExplainableClient as lu, SnapshotDialect as m, ConstraintOptions as ma, NativeStorage as mc, CapabilitiesOf as md, SqlOrderable as mf, unionAll as mi, externalGeneratedColumn as ml, ProvidedSourceIdentity as mn, or as mo, OnConflictClause as mr, ComparisonValidation as ms, CompleteSnapshotPartition as mt, QueryAdapter as mu, SchemaSnapshot as n, SchemaTableRegistry as na, ColumnSqlType as nc, ResultDecodingError as nd, AnySqlType as nf, SelectQuery as ni, IdentityDescriptor as nl, resolveCastTarget as nn, IndexTermOptions as no, InsertValue as nr, max as ns, CompleteSnapshotIndex as nt, QubuClient as nu, SnapshotCheckConstraint as o, schema as oa, ColumnStorageDialectOf as oc, booleanResultDecoder as od, SqlDate as of, cte as oi, IdentityOptions as ol, QueryKind as on, SourceIndexesRecord as oo, insertInto as or, SqlTag as os, CompleteSnapshotObject as ot, QubuHooks as ou, SnapshotDiagnosticCode as p, ConstraintDialectExtension as pa, NativeColumnStorage as pc, AnyFragment as pd, SqlOrderCompatible as pf, union as pi, externalDefault as pl, CustomSourceOptions as pn, not as po, ExcludedSource as pr, scalar as ps, CompleteSnapshotOwnership as pt, QubuTransactionalClient as pu, CompleteSnapshotConstraint as q, LateralIdentity as qa, ColumnDefaultInput as qc, ResultMeta as qd, schemaExpression as qi, HookOperation as ql, nullsLast as qn, concat as qo, AvailableOuterScope as qr, ColumnHasDefault as qs, PaginationPart as qt, SchemaExpressionBrand as qu, SchemaSnapshotAdapter as r, SchemaValidationError as ra, ColumnStorage as rc, ResultField as rd, SqlBigInt as rf, CteSource as ri, IdentityDialectExtension as rl, AnyQuery as rn, MysqlIndexExtension as ro, InsertValuesRow as rr, min as rs, CompleteSnapshotIndexTerm as rt, QubuExplainableClient as ru, SnapshotColumn as s, schemaNamingPolicyVersion as sa, ColumnStorageKindOf as sc, dateResultDecoder as sd, SqlDecimal as sf, recursiveCte as si, LiteralDefaultDescriptor as sl, QueryRow as sn, SqliteIndexExtension as so, insertSelect as sr, TypedSqlTag as ss, CompleteSnapshotObjectKind as st, QubuOptions as su, AnySchema as t, SchemaTableRecord as ta, ColumnOutput as tc, ResultDecoders as td, sequence as tf, SelectCardinality as ti, GeneratedDescriptor as tl, extendDialect as tn, IndexTerm as to, InsertSource as tr, countDistinct as ts, CompleteSnapshotIdentity as tt, OperationEndHook as tu, SnapshotDecodeResult as u, CatalogCheckSql as ua, ColumnStorageTypeOf as uc, timestampResultDecoder as ud, SqlInteger as uf, SetQuery as ui, SchemaLiteralValue as ul, Row as un, validateIndexDialect as uo, ConflictTarget as ur, exists as us, CompleteSnapshotObjectOwnerKind as ut, QubuStreamingTransaction as uu, SnapshotExtensionContext as v, ForeignKeyConstraint as va, PortableStorageDescriptor as vc, DependenciesOf as vd, SqlTimestamp as vf, leftJoin as vi, SchemaDialectExtension as vl, SourceConfig as vn, omit as vo, onConflict as vr, isDistinctFrom as vs, CompleteSnapshotRoutine as vt, StreamingTransactionalQueryAdapter as vu, SnapshotIndexTermExpression as w, KeyConstraintOptions as wa, StorageTypeOf as wc, GroupingMeta as wd, FromSource as wi, assertSchemaDialectSupport as wl, SourceSqlTypeMap as wn, fetchNext as wo, UpdateAssignmentValue as wr, notLike as ws, CompleteSnapshotView as wt, qubu as wu, SnapshotIdentity as x, ForeignKeyTarget as xa, StorageDescriptor as xc, FragmentMeta as xd, SqlUnknown as xf, groupBy as xi, SchemaMetadataValidationError as xl, SourceKind as xn, RowLockOptions as xo, OnDuplicateKeyUpdateClause as xr, lt as xs, CompleteSnapshotTable as xt, execute as xu, SnapshotForeignKey as y, ForeignKeyMatch as ya, PortableStorageType as yc, ExpressionMeta as yd, SqlTypeName as yf, naturalJoin as yi, SchemaDialectName as yl, SourceConstraints as yn, where as yo, IncomingColumns as yr, isNotDistinctFrom as ys, CompleteSnapshotRoutineParameter as yt, TransactionOptions as yu, schemaSnapshotVersion as z, foreignKey as za, portableStorage as zc, RenderContext as zd, SchemaRenderContext as zi, ExplainPlanRow as zl, TableRow as zn, jsonNumber as zo, MutationSqlTypes as zr, cast as zs, DialectOptions as zt, Expression as zu };
4715
+ export { CompleteSnapshotExtension as $, IndexDialectExtension as $a, GeneratedColumnMode as $c, isFragment as $d, SchemaTableEntry as $i, NestedTransactionalQueryAdapter as $l, DefaultValuesSource as $n, avg as $o, RequiredScope as $r, ColumnOptions as $s, assertDialectCapability as $t, ResultDecodeContext as $u, SnapshotStorage as A, SourceLike as Aa, date as Ac, MetadataOf as Ad, all as Ai, AdapterExecutionResult as Al, sourceIdentity as An, SelectClause as Ao, AllowAllClause as Ar, Operand as As, schemaSnapshotCompleteVersion as At, QueryValidationError as Au, CompleteSchemaSnapshot as B, primaryKey as Ba, timestamp as Bc, RenderFunction as Bd, SchemaRenderOptions as Bi, ExplainRequest as Bl, TableSqlTypes as Bn, jsonPath as Bo, allowAll as Br, ColumnCodec as Bs, DialectPagination as Bt, ExpressionKind as Bu, SnapshotIndexTerm as C, KeyConstraint as Ca, StorageTypeOf as Cc, GroupingKeysOf as Cd, FromScope as Ci, assertSchemaDialectSupport as Cl, SourceRow as Cn, fetchFirst as Co, onDuplicateKeyUpdate as Cr, notLike as Cs, CompleteSnapshotValueFact as Ct, qubu as Cu, SnapshotLiteral as D, ReferentialAction as Da, column as Dc, HasWindow as Dd, SelectionObject as Di, isValidSchemaObjectName as Dl, createSource as Dn, distinct as Do, UpdateFromClause as Dr, isNotNull as Ds, SchemaSnapshotV1Input as Dt, RenderedQuery as Du, SnapshotKeyConstraint as E, PostgresConstraintExtension as Ea, boolean as Ec, HasSubquery as Ed, Selection as Ei, generatedSchemaObjectName as El, UnknownSourceSqlTypes as En, having as Eo, update as Er, notIn as Es, SchemaSnapshotV1DecodeResult as Et, RenderOptions as Eu, neutralSnapshotDialect as F, UniqueNullSemantics as Fa, nativeStorage as Fc, ProvidesOuterOf as Fd, SchemaExpressionError as Fi, ExplainMutationOptions as Fl, TableIdentity as Fn, subtract as Fo, MutationReturning as Fr, typedValue as Fs, DialectCapability as Ft, expressionFragment as Fu, CompleteSnapshotColumn as G, AliasIdentity as Ga, ColumnDefault as Gc, RequiresOuterSourceMeta as Gd, renderSchemaExpression as Gi, HookMetadataValue as Gl, desc as Gn, rowNumber as Go, correlate as Gr, ColumnGeneratedOf as Gs, NamedCastTarget as Gt, ExpressionWithOutput as Gu, CompleteSnapshotCapabilities as H, unique as Ha, CanonicalLiteral as Hc, RequiresOf as Hd, defineSchemaExpression as Hi, ExplainableQueryAdapter as Hl, table as Hn, denseRank as Ho, ReturningRow as Hr, ColumnDefinition as Hs, ExplainFormat as Ht, ExpressionOutput as Hu, schemaSnapshotDialectVersion as I, catalogCheck as Ia, nullable as Ic, ProvidesOuterSourceMeta as Id, SchemaExpressionErrorCode as Ii, ExplainOptions as Il, TableInsertInput as In, JsonPath as Io, MutationReturningClause as Ir, value as Is, DialectCastTypes as It, AggregateResultExpression as Iu, CompleteSnapshotCreateResult as J, LateralSource as Ja, ExpressionDefaultDescriptor as Jc, SqlTypeOf as Jd, unsafeSchemaSql as Ji, HookOutcome as Jl, order as Jn, lower as Jo, AvailableScope as Jr, ColumnIdentityOf as Js, PortableCastTarget as Jt, isExpression as Ju, CompleteSnapshotComment as K, AliasedSource as Ka, ColumnDefaultInput as Kc, RequiresSourceMeta as Kd, renderSchemaSql as Ki, HookOperation as Kl, nullsFirst as Kn, coalesce as Ko, select as Kr, ColumnHasDefault as Ks, PaginationKind as Kt, SchemaExpression as Ku, schemaSnapshotFormat as L, catalogForeignKey as La, numeric as Lc, ProvidesSourceMeta as Ld, SchemaExpressionInput as Li, ExplainOptionsFor as Ll, TableMetadataCallback as Ln, jsonBoolean as Lo, MutationRow as Lr, mapResult as Ls, DialectExplain as Lt, AnyExpression as Lu, SnapshotTable as M, TableLike as Ma, integer as Mc, NullableSourceMeta as Md, SchemaDialectHooks as Mi, ExecutionOptions as Ml, Table as Mn, divide as Mo, MutationKind as Mr, OperandSqlType as Ms, schemaSnapshotVersion1 as Mt, QueryValidationIssue as Mu, SnapshotUniqueConstraint as N, UniqueConstraint as Na, json as Nc, NullableSourcesOf as Nd, createSchemaDialect as Ni, ExecutionRequest as Nl, TableColumns as Nn, modulo as No, MutationQuery as Nr, SqlCapabilityValidation as Ns, CastTarget as Nt, ColumnDependency as Nu, SnapshotNamingPolicy as O, SourceConstraint as Oa, columnResultValue as Oc, InheritedMetadata as Od, SelectionOutput as Oi, materializeSchemaObjectIdentity as Ol, customSource as On, AnySelectClause as Oo, UpdateFromScope as Or, isNull as Os, completeSchemaSnapshotFormat as Ot, render as Ou, SnapshotValidationContext as P, UniqueConstraintOptions as Pa, nativeColumn as Pc, OutputOf as Pd, RenderedSchemaExpression as Pi, ExecutionResult as Pl, TableDefinitions as Pn, multiply as Po, MutationQueryConfig as Pr, asValue as Ps, Dialect as Pt, ColumnReference as Pu, CompleteSnapshotEnum as Q, lateral as Qa, GeneratedColumnDescriptor as Qc, fragment as Qd, SchemaOptions as Qi, HookTransactionOperation as Ql, deleteFrom as Qn, typedCall as Qo, RequiredOuterScope as Qr, ColumnOnUpdateOf as Qs, SchemaLiteralRenderer as Qt, DecodableResultType as Qu, schemaSnapshotNamingPolicyVersion as R, check as Ra, portableStorage as Rc, QueryCardinality as Rd, SchemaExpressionMode as Ri, ExplainPlanRow as Rl, TableOptions as Rn, jsonExists as Ro, MutationScopeValidation as Rr, cast as Rs, DialectJson as Rt, AnySchemaExpression as Ru, SnapshotIndex as S, ForeignKeyTargetInput as Sa, StorageOf as Sc, GroupingDependenciesOf as Sd, SqlUuid as Sf, FromClause as Si, SchemaObjectNameOptions as Sl, SourceProvision as Sn, rowLock as So, incoming as Sr, ne as Ss, CompleteSnapshotTrigger as St, explain as Su, SnapshotJsonValue as T, MysqlConstraintExtension as Ta, binary as Tc, HasAggregate as Td, from as Ti, freezeSchemaMetadata as Tl, SourceSqlTypes as Tn, offset as To, UpdateAssignments as Tr, inList as Ts, SchemaSnapshotV1 as Tt, RenderCapabilityValidation as Tu, CompleteSnapshotCheckConstraint as U, uniqueConstraint as Ua, ColumnBehaviorError as Uc, RequiresOuterMetadataOf as Ud, isUnsafeSchemaSql as Ui, HookErrorOutcome as Ul, OrderTerm as Un, over as Uo, ReturningSqlTypes as Ur, ColumnDefinitionConfig as Us, ExplainRenderOptions as Ut, ExpressionRequires as Uu, CompleteSchemaSnapshotInput as V, references as Va, uuid as Vc, RequiresCapabilityMeta as Vd, UnsafeSchemaSqlExpression as Vi, ExplainResult as Vl, TableUpdateInput as Vn, jsonText as Vo, ReturningClause as Vr, ColumnDefaultOf as Vs, DialectRowLocking as Vt, ExpressionNullability as Vu, CompleteSnapshotCollation as W, validateConstraintDialect as Wa, ColumnBehaviorErrorCode as Wc, RequiresOuterOf as Wd, normalizeSchemaSql as Wi, HookMetadata as Wl, asc as Wn, rank as Wo, returning as Wr, ColumnFromOptions as Ws, JsonScalarKind as Wt, ExpressionSqlType as Wu, CompleteSnapshotDeferredObject as X, QuerySource as Xa, ExternalDefaultDescriptor as Xc, VisibleDependenciesOf as Xd, SchemaDiagnostic as Xi, HookStreamEnd as Xl, jsonArrayFrom as Xn, call as Xo, GroupingValidation as Xr, ColumnIsGenerated as Xs, RowLockMode as Xt, markExpressionCategory as Xu, CompleteSnapshotDecodeResult as Y, QueryAliasIdentity as Ya, ExpressionGeneratedColumnDescriptor as Yc, SubqueryMeta as Yd, Schema as Yi, HookQueryOperation as Yl, orderBy as Yn, upper as Yo, ClauseScope as Yr, ColumnInsertInput as Ys, PortableCastType as Yt, makeExpression as Yu, CompleteSnapshotDomain as Z, alias as Za, ExternalGeneratedColumnDescriptor as Zc, WindowMeta as Zd, SchemaNamingPolicy as Zi, HookSuccessOutcome as Zl, jsonObjectFrom as Zn, schemaCall as Zo, MissingScope as Zr, ColumnIsNullable as Zs, RowLockWaitPolicy as Zt, withDialectCapability as Zu, SnapshotExpressionContext as _, FieldLikeOptions as _a, PortableStorageDescriptor as _c, CardinalityOf as _d, SqlTextLike as _f, innerJoin as _i, SchemaDialectExtension as _l, SourceColumns as _n, SelectPart as _o, excluded as _r, isDistinctFrom as _s, CompleteSnapshotProvenance as _t, StreamingTransactionalQueryAdapter as _u, SnapshotBigInt as a, generatedTableName as aa, ColumnStorageDialectOf as ac, bigintResultDecoder as ad, SqlBoolean as af, WithClause as ai, IdentityOptions as al, QueryConfig as an, SourceIndex as ao, defaultValues as ar, SqlFragment as as, CompleteSnapshotNamespace as at, QubuHooks as au, SnapshotGeneratedColumn as b, ForeignKeyOptions as ba, StorageDescriptor as bc, Fragment as bd, SqlTypeSatisfies as bf, rightJoin as bi, SchemaMetadataValidationError as bl, SourceIdentity as bn, RowLockClause as bo, IncomingIdentity as br, lt as bs, CompleteSnapshotSequence as bt, execute as bu, SnapshotConstraint as c, AnyKeyColumn as ca, ColumnStorageType as cc, jsonTextResultDecoder as cd, SqlEqualityComparable as cf, withCte as ci, ResolvedColumnBehavior as cl, QuerySqlTypeMap as cn, TableIndex as co, values as cr, caseWhen as cs, CompleteSnapshotObjectMetadata as ct, QubuStreamingExplainableClient as cu, SnapshotDefault as d, CheckConstraint as da, DialectNativeStorage as dc, AggregateDependenciesOf as dd, SqlJson as df, except as di, canonicalLiteral as dl, AnySource as dn, DeclaredColumnNullability as do, DoNothingAction as dr, notExists as ds, CompleteSnapshotObjectReference as dt, QubuTransaction as du, SchemaTableNames as ea, ColumnOutput as ec, ResultDecoder as ed, parenthesize as ef, ScopeValidation as ei, GeneratedDescriptor as el, createDialect as en, IndexOptions as eo, InsertSelectSource as er, count as es, CompleteSnapshotForeignKey as et, OperationEndHook as eu, SnapshotDiagnostic as f, CheckConstraintOptions as fa, NativeColumnStorage as fc, AggregateMeta as fd, SqlNumericLike as ff, intersect as fi, externalDefault as fl, CustomSource as fn, and as fo, DoUpdateAction as fr, scalar as fs, CompleteSnapshotOpaqueObject as ft, QubuTransactionalClient as fu, SnapshotExpression as g, FieldLike as ga, PortableStorage as gc, CardinalityMeta as gd, SqlText as gf, fullJoin as gi, resolveColumnBehavior as gl, Source as gn, OmittableSelectClause as go, doUpdate as gr, gte as gs, CompleteSnapshotPolicy as gt, StreamingQueryAdapter as gu, SnapshotDialectExtension as h, ConstraintTiming as ha, PortableColumnStorage as hc, CapabilityMetadataOf as hd, SqlSemanticType as hf, crossJoin as hi, identityColumn as hl, ProvidedSourceRow as hn, Omit$1 as ho, doNothing as hr, gt as hs, CompleteSnapshotPhysicalReference as ht, StreamableQuery as hu, SchemaSnapshotInput as i, defaultSchemaNamingPolicy as ia, ColumnStorageDescriptor as ic, ResultShape as id, SqlBinary as if, RecursiveCteSource as ii, IdentityOptionValue as il, Query as in, PostgresIndexExtension as io, ValuesSource as ir, sum as is, CompleteSnapshotKeyConstraint as it, QubuExplainableTransactionalClient as iu, SnapshotStorageContext as j, SqliteConstraintExtension as ja, encodeColumnParameter as jc, NullabilityOf as jd, SchemaDialect as ji, DriverValueEncoder as jl, AnyTable as jn, add as jo, MutationClause as jr, OperandNullability as js, schemaSnapshotV1Version as jt, QueryValidationErrorCode as ju, SnapshotSpecialNumber as k, SourceConstraintsRecord as ka, columnSqlType as kc, InheritedMetadataOf as kd, SelectionSqlTypes as ki, materializeSchemaObjectRecord as kl, exposeColumns as kn, ClausePlacement as ko, updateFrom as kr, isTrue as ks, completeSchemaSnapshotVersion as kt, QueryTypeValidation as ku, SnapshotCreateResult as l, CatalogCheckExpression as la, ColumnStorageTypeOf as lc, resultValue as ld, SqlEqualityCompatible as lf, SetOperator as li, SchemaLiteralValue as ll, QueryWithRow as ln, index as lo, ConflictAction as lr, exists as ls, CompleteSnapshotObjectOwner as lt, QubuStreamingTransaction as lu, SnapshotDialect as m, ConstraintOptions as ma, NativeStorageDescriptor as mc, CapabilitiesOf as md, SqlOrderable as mf, unionAll as mi, generatedColumn as ml, ProvidedSourceIdentity as mn, or as mo, OnConflictClause as mr, eq as ms, CompleteSnapshotPartition as mt, QueryExecutor as mu, SchemaSnapshot as n, SchemaTableRegistry as na, ColumnStorage as nc, ResultDecodingError as nd, AnySqlType as nf, SelectQuery as ni, IdentityDialectExtension as nl, resolveCastTarget as nn, IndexTermOptions as no, InsertValue as nr, max as ns, CompleteSnapshotIndex as nt, QubuExplainableClient as nu, SnapshotCheckConstraint as o, schema as oa, ColumnStorageKindOf as oc, booleanResultDecoder as od, SqlDate as of, cte as oi, LiteralDefaultDescriptor as ol, QueryKind as on, SourceIndexesRecord as oo, insertInto as or, SqlTag as os, CompleteSnapshotObject as ot, QubuOptions as ou, SnapshotDiagnosticCode as p, ConstraintDialectExtension as pa, NativeStorage as pc, AnyFragment as pd, SqlOrderCompatible as pf, union as pi, externalGeneratedColumn as pl, CustomSourceOptions as pn, not as po, ExcludedSource as pr, ComparisonValidation as ps, CompleteSnapshotOwnership as pt, QueryAdapter as pu, CompleteSnapshotConstraint as q, LateralIdentity as qa, DefaultDescriptor as qc, ResultMeta as qd, schemaExpression as qi, HookOperationKind as ql, nullsLast as qn, concat as qo, AvailableOuterScope as qr, ColumnHasRuntimeDefault as qs, PaginationPart as qt, SchemaExpressionBrand as qu, SchemaSnapshotAdapter as r, SchemaValidationError as ra, ColumnStorageDeclarationOf as rc, ResultField as rd, SqlBigInt as rf, CteSource as ri, IdentityGeneration as rl, AnyQuery as rn, MysqlIndexExtension as ro, InsertValuesRow as rr, min as rs, CompleteSnapshotIndexTerm as rt, QubuExplainableStreamingTransactionalClient as ru, SnapshotColumn as s, schemaNamingPolicyVersion as sa, ColumnStorageOf as sc, dateResultDecoder as sd, SqlDecimal as sf, recursiveCte as si, MysqlIdentityExtension as sl, QueryRow as sn, SqliteIndexExtension as so, insertSelect as sr, sql as ss, CompleteSnapshotObjectKind as st, QubuStreamingClient as su, AnySchema as t, SchemaTableRecord as ta, ColumnSqlType as tc, ResultDecoders as td, sequence as tf, SelectCardinality as ti, IdentityDescriptor as tl, extendDialect as tn, IndexTerm as to, InsertSource as tr, countDistinct as ts, CompleteSnapshotIdentity as tt, QubuClient as tu, SnapshotDecodeResult as u, CatalogCheckSql as ua, ColumnUpdateInput as uc, timestampResultDecoder as ud, SqlInteger as uf, SetQuery as ui, SqliteIdentityExtension as ul, Row as un, validateIndexDialect as uo, ConflictTarget as ur, inQuery as us, CompleteSnapshotObjectOwnerKind as ut, QubuStreamingTransactionalClient as uu, SnapshotExtensionContext as v, ForeignKeyConstraint as va, PortableStorageType as vc, DependenciesOf as vd, SqlTimestamp as vf, leftJoin as vi, SchemaDialectName as vl, SourceConfig as vn, omit as vo, onConflict as vr, isNotDistinctFrom as vs, CompleteSnapshotRoutine as vt, TransactionOptions as vu, SnapshotIndexTermExpression as w, KeyConstraintOptions as wa, bigint as wc, GroupingMeta as wd, FromSource as wi, dialectMismatchDiagnostic as wl, SourceSqlTypeMap as wn, fetchNext as wo, UpdateAssignmentValue as wr, between as ws, CompleteSnapshotView as wt, stream as wu, SnapshotIdentity as x, ForeignKeyTarget as xa, StorageDialectOf as xc, FragmentMeta as xd, SqlUnknown as xf, groupBy as xi, SchemaObjectIdentity as xl, SourceKind as xn, RowLockOptions as xo, OnDuplicateKeyUpdateClause as xr, lte as xs, CompleteSnapshotTable as xt, executeRows as xu, SnapshotForeignKey as y, ForeignKeyMatch as ya, StorageDeclarationOf as yc, ExpressionMeta as yd, SqlTypeName as yf, naturalJoin as yi, SchemaMetadataDiagnostic as yl, SourceConstraints as yn, where as yo, IncomingColumns as yr, like as ys, CompleteSnapshotRoutineParameter as yt, TransactionalQueryAdapter as yu, schemaSnapshotVersion as z, foreignKey as za, text as zc, RenderContext as zd, SchemaRenderContext as zi, ExplainReadOptions as zl, TableRow as zn, jsonNumber as zo, MutationSqlTypes as zr, typedCast as zs, DialectOptions as zt, Expression as zu };
@@ -1,4 +1,4 @@
1
- import { n as SchemaSnapshot } from "./types-DcIiNePM.mjs";
1
+ import { n as SchemaSnapshot } from "./types-BG9DHEZi.mjs";
2
2
  //#region src/introspection/connection.d.ts
3
3
  /** A parameterized statement owned by a catalog adapter. */
4
4
  interface CatalogQuery {
@@ -230,10 +230,6 @@ declare global {
230
230
  TChild extends import("qubu").AnyFragment = never,
231
231
  > = import("qubu").SqlFragment<TOutput, TSqlType, TChild>
232
232
  type SqlTag = import("qubu").SqlTag
233
- type TypedSqlTag<
234
- TOutput,
235
- TSqlType extends import("qubu").AnySqlType = import("qubu").SqlUnknown,
236
- > = import("qubu").TypedSqlTag<TOutput, TSqlType>
237
233
  type SqlTypeSatisfies<TActual, TConstraint> = import("qubu").SqlTypeSatisfies<
238
234
  TActual,
239
235
  TConstraint
@@ -97,6 +97,55 @@ known domain opts the extension into incompatible-operation errors. See
97
97
  [SQL semantic types](../../sql-semantic-types.md) for the capability model and
98
98
  its limits.
99
99
 
100
+ ## Declare a downstream aggregate
101
+
102
+ Declare reusable SQL aggregates with `aggregateFunction()` from `qubu/core`.
103
+ The returned function infers its arguments on each call and preserves their
104
+ source, dependency, nullability, and capability metadata:
105
+
106
+ ```ts
107
+ import { aggregateFunction } from "qubu/core"
108
+
109
+ const jsonGroupArray = aggregateFunction<string>("json_group_array")
110
+ ```
111
+
112
+ The helper adds both the runtime aggregate category and the type-level metadata
113
+ used by grouping checks. This avoids manually composing `call()` and
114
+ `markExpressionCategory()`: `call<string>(...)` defaults its remaining type
115
+ parameters, losing argument inference, and `markExpressionCategory()` alone
116
+ does not add type-level aggregate metadata.
117
+
118
+ For a SQLite query, declare the function once and use it in projections:
119
+
120
+ ```ts
121
+ import { from, groupBy, select, table, text } from "qubu"
122
+
123
+ const gameCategory = table("game_category", {
124
+ gameId: text(),
125
+ name: text(),
126
+ })
127
+
128
+ const categoriesByGame = select(
129
+ {
130
+ gameId: gameCategory.gameId,
131
+ categories: jsonGroupArray(gameCategory.name),
132
+ },
133
+ from(gameCategory),
134
+ groupBy(gameCategory.gameId),
135
+ )
136
+ ```
137
+
138
+ Qubu rejects a missing argument source, an ungrouped selected column, or an
139
+ aggregate used as a grouping key. The factory uses `call()`'s default
140
+ `SqlUnknown` result domain and argument-derived nullability; declare a different
141
+ result contract in the downstream helper when the SQL function requires one.
142
+ `TOutput` declares the JavaScript result type without decoding database values.
143
+
144
+ Keep the function catalog, argument restrictions, decoding, null filtering,
145
+ distinctness, and sorting policy downstream. An application can decode the
146
+ returned JSON text with its own `parseCategories()` helper after execution, or
147
+ attach its decoder with `mapResult()`.
148
+
100
149
  ## Read next
101
150
 
102
151
  - [Add sources and clauses](sources-and-clauses.md) covers custom relations and
@@ -61,19 +61,33 @@ named projection:
61
61
  import { from, select, sql } from "qubu"
62
62
  import type { SqlText } from "qubu"
63
63
 
64
- const normalizedName = sql.type<string, SqlText>()`LOWER(${users.name})`
64
+ const normalizedName = sql`LOWER(${users.name})`.$type<string, SqlText>()
65
65
 
66
66
  const query = select({ name: normalizedName }, from(users))
67
67
  // typeof query.row is { name: string }
68
68
  ```
69
69
 
70
- `sql.type<Output, SqlType>()` changes only TypeScript metadata. It does not
70
+ `sql` changes only TypeScript metadata. It does not
71
71
  parse the SQL or validate the declared types against the database. The tag
72
- still binds ordinary substitutions.
72
+ still binds ordinary substitutions. It does not emit a SQL cast or decode runtime
73
+ values.
74
+
75
+ Use `.$type<number>()` when only the application output is known. The SQL
76
+ domain stays `SqlUnknown` on a fresh template; `number` does not distinguish
77
+ integer from decimal. On an already annotated fragment, an output-only call
78
+ preserves the declared SQL domain:
79
+
80
+ ```ts
81
+ const renamedOutput = normalizedName.$type<"Ada" | "Grace">()
82
+ // Output: "Ada" | "Grace"; SQL domain: SqlText
83
+ ```
84
+
85
+ Each annotation replaces the previous output declaration. These declarations
86
+ are caller assertions; Qubu does not validate the returned values.
73
87
 
74
88
  Interpolated fragments contribute their source requirements and
75
- nullability. For example, a `sql.type<string, SqlText>()` template containing a
76
- column from the right side of a `leftJoin()` produces `string | null` in the
89
+ nullability. For example, a `.$type<Output, SqlType>()sql` template containing a
90
+ column from the right side of a `.$type<string, SqlText>()leftJoin()` produces `string | null` in the
77
91
  selected row.
78
92
 
79
93
  ## Keep identifiers and dynamic syntax explicit
@@ -125,14 +139,14 @@ Use a built-in expression as the substitution when its semantics matter:
125
139
  import { count, sql } from "qubu"
126
140
  import type { SqlInteger } from "qubu"
127
141
 
128
- const postCount = sql.type<number, SqlInteger>()`${count(posts.id)}`
142
+ const postCount = sql`${count(posts.id)}`.$type<number, SqlInteger>()
129
143
  ```
130
144
 
131
145
  This wrapper retains the aggregate dependency recorded by `count()`. Writing
132
146
  the aggregate name in template text would not record that fact:
133
147
 
134
148
  ```ts
135
- const untrackedPostCount = sql.type<number, SqlInteger>()`COUNT(${posts.id})`
149
+ const untrackedPostCount = sql`COUNT(${posts.id})`.$type<number, SqlInteger>()
136
150
  ```
137
151
 
138
152
  This renders valid SQL, but Qubu sees an ordinary column dependency because it
@@ -147,7 +161,7 @@ import { withDialectCapability } from "qubu/core"
147
161
  import type { SqlBoolean } from "qubu"
148
162
 
149
163
  const postgresMatch = withDialectCapability(
150
- sql.type<boolean, SqlBoolean>()`${users.name} ILIKE ${search}`,
164
+ sql`${users.name} ILIKE ${search}`.$type<boolean, SqlBoolean>(),
151
165
  "ilike",
152
166
  )
153
167
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qubu",
3
- "version": "0.7.3",
3
+ "version": "0.8.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/aleclarson/qubu"
@@ -1,2 +0,0 @@
1
- import "./types-DcIiNePM.mjs";
2
- import "./serialize-Dg-Q55YQ.mjs";