qubu 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen.mjs +1 -1
- package/dist/column-Da37jYSD.mjs +309 -0
- package/dist/column-r1Y4ivwt.mjs +327 -0
- package/dist/constraints-YGyNPQ_z.mjs +208 -0
- package/dist/core.mjs +3 -3
- package/dist/index-B2rZf3-2.d.mts +32 -0
- package/dist/index.mjs +9 -7
- package/dist/introspection.mjs +1 -1
- package/dist/{on-conflict-jPsl9l0K.mjs → on-conflict-DZQ85f1t.mjs} +3 -2
- package/dist/postgres.mjs +3 -3
- package/dist/registry-BRcUuazJ.mjs +256 -0
- package/dist/{relational-x3BDVX9e.mjs → relational-CxnLCqZQ.mjs} +2 -2
- package/dist/schema.mjs +6 -4
- package/dist/{sqlite-CsIUtZ2Q.mjs → serialize-BN07IK0v.mjs} +3 -317
- package/dist/serialize-CEIIlWhC.d.mts +66 -0
- package/dist/snapshot/mysql.d.mts +17 -0
- package/dist/snapshot/mysql.mjs +356 -0
- package/dist/snapshot/postgres.d.mts +17 -0
- package/dist/snapshot/postgres.mjs +237 -0
- package/dist/snapshot/sqlite.d.mts +25 -0
- package/dist/snapshot/sqlite.mjs +321 -0
- package/dist/{snapshot-BSraiLtH.mjs → snapshot-Xam8-q0j.mjs} +1 -1
- package/dist/snapshot.d.mts +3 -2
- package/dist/snapshot.mjs +2 -583
- package/dist/{source-C4Vmu5bb.mjs → source-SqrKWjFJ.mjs} +2 -1
- package/dist/sqlite.mjs +2 -2
- package/dist/{table-DLQ7YWth.mjs → table-BwflqeAj.mjs} +3 -2
- package/dist/{types-CTENnDh9.mjs → types-BIJsj2fJ.mjs} +3 -2
- package/dist/{value-BEEj_Ayd.mjs → value-D14I_XgL.mjs} +1 -1
- package/docs/dialects-and-execution.md +34 -0
- package/docs/migrations/index.md +7 -7
- package/docs/reference/mysql-snapshot.md +5 -5
- package/docs/reference/postgres-snapshot.md +7 -7
- package/docs/reference/sqlite-snapshot.md +5 -5
- package/docs/reference/supported-surface.md +40 -32
- package/docs/schema/code-generation.md +2 -2
- package/docs/schema/ddl-emission.md +1 -1
- package/docs/schema/snapshots.md +12 -0
- package/package.json +13 -1
- package/dist/column-DmazTL67.mjs +0 -633
- package/dist/index-C-480HmV.d.mts +0 -146
- package/dist/registry-BGqa05et.mjs +0 -461
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { c as dialectMismatchDiagnostic, l as freezeSchemaMetadata, r as isColumnReference } from "./column-r1Y4ivwt.mjs";
|
|
2
|
+
import { p as unsafeSchemaSql } from "./registry-BRcUuazJ.mjs";
|
|
3
|
+
//#region src/schema/indexes.ts
|
|
4
|
+
/**
|
|
5
|
+
* Validate portable and dialect-owned index facts for one target adapter. Unsupported features are
|
|
6
|
+
* reported as data so a serializer can aggregate diagnostics instead of failing during traversal
|
|
7
|
+
* with an opaque exception.
|
|
8
|
+
*/
|
|
9
|
+
function validateIndexDialect(indexMetadata, dialect, path = ["index"]) {
|
|
10
|
+
const diagnostics = [];
|
|
11
|
+
const extension = indexMetadata.dialect;
|
|
12
|
+
if (extension !== void 0) {
|
|
13
|
+
const mismatch = dialectMismatchDiagnostic(extension, dialect, [...path, "dialect"]);
|
|
14
|
+
if (mismatch !== void 0) diagnostics.push(mismatch);
|
|
15
|
+
}
|
|
16
|
+
if ((dialect === "sqlite" || dialect === "mysql") && indexMetadata.includedColumns !== void 0 && indexMetadata.includedColumns.length > 0) diagnostics.push({
|
|
17
|
+
code: "unsupported-dialect-option",
|
|
18
|
+
message: `${dialect} indexes do not support included columns`,
|
|
19
|
+
path: [...path, "includedColumns"],
|
|
20
|
+
dialect
|
|
21
|
+
});
|
|
22
|
+
const mysqlKeyBlockSize = extension?.dialect === "mysql" ? extension.keyBlockSize : void 0;
|
|
23
|
+
if (mysqlKeyBlockSize !== void 0 && (!Number.isInteger(mysqlKeyBlockSize) || mysqlKeyBlockSize <= 0)) diagnostics.push({
|
|
24
|
+
code: "unsupported-dialect-option",
|
|
25
|
+
message: "MySQL index keyBlockSize must be a positive integer",
|
|
26
|
+
path: [
|
|
27
|
+
...path,
|
|
28
|
+
"dialect",
|
|
29
|
+
"keyBlockSize"
|
|
30
|
+
],
|
|
31
|
+
dialect
|
|
32
|
+
});
|
|
33
|
+
return Object.freeze(diagnostics);
|
|
34
|
+
}
|
|
35
|
+
/** Declare a portable column or expression index. */
|
|
36
|
+
function index(terms, options) {
|
|
37
|
+
const resolvedOptions = options ?? {};
|
|
38
|
+
const candidateKey = resolvedOptions.unique === true && resolvedOptions.where === void 0 && terms.every((term) => {
|
|
39
|
+
return ("orderKind" in term ? term.expression : term).expressionKind === "column";
|
|
40
|
+
});
|
|
41
|
+
return Object.freeze({
|
|
42
|
+
kind: "index",
|
|
43
|
+
terms: Object.freeze([...terms]),
|
|
44
|
+
unique: resolvedOptions.unique === true,
|
|
45
|
+
predicate: resolvedOptions.where,
|
|
46
|
+
...resolvedOptions.include !== void 0 ? { includedColumns: Object.freeze([...resolvedOptions.include]) } : {},
|
|
47
|
+
...resolvedOptions.physicalName !== void 0 ? { physicalName: resolvedOptions.physicalName } : {},
|
|
48
|
+
...resolvedOptions.dialect !== void 0 ? { dialect: freezeSchemaMetadata(resolvedOptions.dialect) } : {},
|
|
49
|
+
candidateKey
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/schema/constraints.ts
|
|
54
|
+
/**
|
|
55
|
+
* Validate one constraint against a schema adapter dialect. This is kept separate from construction
|
|
56
|
+
* because the same declaration can be inspected for more than one target dialect before a
|
|
57
|
+
* serializer is selected.
|
|
58
|
+
*/
|
|
59
|
+
function validateConstraintDialect(constraint, dialect, path = ["constraint"]) {
|
|
60
|
+
const diagnostics = [];
|
|
61
|
+
const extension = constraint.dialect;
|
|
62
|
+
if (extension !== void 0) {
|
|
63
|
+
const mismatch = dialectMismatchDiagnostic(extension, dialect, [...path, "dialect"]);
|
|
64
|
+
if (mismatch !== void 0) diagnostics.push(mismatch);
|
|
65
|
+
if (extension.dialect === "postgresql" && "notValid" in extension && extension.notValid === true && (constraint.kind === "primary-key" || constraint.kind === "unique" || constraint.kind === "unique-constraint")) diagnostics.push({
|
|
66
|
+
code: "unsupported-dialect-option",
|
|
67
|
+
message: "PostgreSQL NOT VALID is not supported for key constraints",
|
|
68
|
+
path: [
|
|
69
|
+
...path,
|
|
70
|
+
"dialect",
|
|
71
|
+
"notValid"
|
|
72
|
+
],
|
|
73
|
+
dialect
|
|
74
|
+
});
|
|
75
|
+
if (extension.dialect === "sqlite" && "onConflict" in extension && extension.onConflict !== void 0 && constraint.kind === "foreign-key") diagnostics.push({
|
|
76
|
+
code: "unsupported-dialect-option",
|
|
77
|
+
message: "SQLite conflict policies do not apply to foreign keys",
|
|
78
|
+
path: [
|
|
79
|
+
...path,
|
|
80
|
+
"dialect",
|
|
81
|
+
"onConflict"
|
|
82
|
+
],
|
|
83
|
+
dialect
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
if (constraint.kind === "foreign-key" && constraint.match === "partial" && dialect === "mysql") diagnostics.push({
|
|
87
|
+
code: "unsupported-dialect-option",
|
|
88
|
+
message: "MySQL does not support MATCH PARTIAL foreign keys",
|
|
89
|
+
path: [...path, "match"],
|
|
90
|
+
dialect
|
|
91
|
+
});
|
|
92
|
+
if (constraint.kind === "foreign-key" && constraint.deferrable === true && dialect === "mysql") diagnostics.push({
|
|
93
|
+
code: "unsupported-dialect-option",
|
|
94
|
+
message: "MySQL foreign keys cannot be declared DEFERRABLE",
|
|
95
|
+
path: [...path, "deferrable"],
|
|
96
|
+
dialect
|
|
97
|
+
});
|
|
98
|
+
if (constraint.initially !== void 0 && constraint.deferrable !== true) diagnostics.push({
|
|
99
|
+
code: "unsupported-dialect-option",
|
|
100
|
+
message: "An initial constraint timing requires deferrable: true",
|
|
101
|
+
path: [...path, "initially"],
|
|
102
|
+
dialect
|
|
103
|
+
});
|
|
104
|
+
return Object.freeze(diagnostics);
|
|
105
|
+
}
|
|
106
|
+
function primaryKey(...columnsAndOptions) {
|
|
107
|
+
const last = columnsAndOptions.at(-1);
|
|
108
|
+
const options = last && typeof last === "object" && !("expressionKind" in last) ? last : void 0;
|
|
109
|
+
return freezeConstraint("primary-key", options ? columnsAndOptions.slice(0, -1) : columnsAndOptions, options);
|
|
110
|
+
}
|
|
111
|
+
function unique(...columnsAndOptions) {
|
|
112
|
+
const last = columnsAndOptions.at(-1);
|
|
113
|
+
const options = last && typeof last === "object" && !("expressionKind" in last) ? last : void 0;
|
|
114
|
+
return freezeConstraint("unique", options ? columnsAndOptions.slice(0, -1) : columnsAndOptions, options);
|
|
115
|
+
}
|
|
116
|
+
function uniqueConstraint(...columnsAndOptions) {
|
|
117
|
+
const last = columnsAndOptions.at(-1);
|
|
118
|
+
const options = last && typeof last === "object" && !("expressionKind" in last) ? last : void 0;
|
|
119
|
+
const columns = options ? columnsAndOptions.slice(0, -1) : columnsAndOptions;
|
|
120
|
+
const resolvedOptions = options ?? {};
|
|
121
|
+
return freezeConstraint("unique-constraint", columns, resolvedOptions, resolvedOptions.nulls ?? "distinct");
|
|
122
|
+
}
|
|
123
|
+
/** Pair a table with the exact columns targeted by a foreign key. */
|
|
124
|
+
function references(table, ...columns) {
|
|
125
|
+
return Object.freeze({
|
|
126
|
+
table,
|
|
127
|
+
columns: Object.freeze([...columns])
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/** Declare a single-column or composite foreign key. */
|
|
131
|
+
function foreignKey(columns, target, options) {
|
|
132
|
+
return freezeConstraint("foreign-key", columns, options, target);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Reconstruct a foreign key proved by database catalog metadata.
|
|
136
|
+
*
|
|
137
|
+
* @remarks
|
|
138
|
+
* Use this helper for generated or introspection-owned declarations when one or both native SQL
|
|
139
|
+
* domains are unresolved. It accepts unresolved domains, but still rejects known domain
|
|
140
|
+
* mismatches, unequal tuple arity, and local columns from different sources. The enclosing
|
|
141
|
+
* `table()` declaration continues to verify target-column ownership and candidate-key metadata.
|
|
142
|
+
* Resolved targets also receive runtime shape, ownership, and arity checks. The returned value
|
|
143
|
+
* serializes as an ordinary foreign-key constraint.
|
|
144
|
+
*/
|
|
145
|
+
function catalogForeignKey(columns, target, options) {
|
|
146
|
+
assertCatalogForeignKeyColumns(columns, "local");
|
|
147
|
+
return freezeConstraint("foreign-key", columns, options, validateCatalogForeignKeyTargetInput(target, columns.length));
|
|
148
|
+
}
|
|
149
|
+
/** Declare a boolean table invariant. */
|
|
150
|
+
function check(expression, options) {
|
|
151
|
+
return freezeConstraint("check", void 0, options, expression);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Reconstruct a boolean check from opaque SQL recovered from a database catalog.
|
|
155
|
+
*
|
|
156
|
+
* @remarks
|
|
157
|
+
* This helper records catalog origin as a narrow type-level proof. It gives the opaque expression
|
|
158
|
+
* the {@link SqlBoolean} semantic type without changing the ordinary {@link check} contract. Qubu
|
|
159
|
+
* does not parse or infer dependencies from the SQL. It preserves the text apart from normalizing
|
|
160
|
+
* line endings and retains the dialect tag in serialized schema metadata.
|
|
161
|
+
*/
|
|
162
|
+
function catalogCheck(input, options) {
|
|
163
|
+
assertCatalogCheckSql(input);
|
|
164
|
+
return freezeConstraint("check", void 0, options, unsafeSchemaSql(input.dialect, input.sql));
|
|
165
|
+
}
|
|
166
|
+
function assertCatalogCheckSql(value) {
|
|
167
|
+
if (typeof value !== "object" || value === null) throw new TypeError("catalogCheck() requires dialect-tagged SQL data");
|
|
168
|
+
const input = value;
|
|
169
|
+
if (input.dialect !== "postgresql" && input.dialect !== "sqlite" && input.dialect !== "mysql") throw new TypeError(`catalogCheck() requires a supported catalog dialect, received "${String(input.dialect)}"`);
|
|
170
|
+
if (typeof input.sql !== "string" || input.sql.trim().length === 0) throw new TypeError("catalogCheck() requires non-empty SQL text");
|
|
171
|
+
}
|
|
172
|
+
function assertCatalogForeignKeyColumns(value, side) {
|
|
173
|
+
if (!Array.isArray(value) || value.length === 0) throw new TypeError(`catalogForeignKey() requires at least one ${side} column`);
|
|
174
|
+
if (!value.every(isColumnReference)) throw new TypeError(`catalogForeignKey() requires ${side} columns to be column references`);
|
|
175
|
+
}
|
|
176
|
+
function validateCatalogForeignKeyTargetInput(value, localArity) {
|
|
177
|
+
return typeof value === "function" ? () => validateCatalogForeignKeyTarget(value(), localArity) : validateCatalogForeignKeyTarget(value, localArity);
|
|
178
|
+
}
|
|
179
|
+
function validateCatalogForeignKeyTarget(value, localArity) {
|
|
180
|
+
if (typeof value !== "object" || value === null) throw new TypeError("catalogForeignKey() requires a foreign-key target");
|
|
181
|
+
const target = value;
|
|
182
|
+
assertCatalogForeignKeyColumns(target.columns, "target");
|
|
183
|
+
if (target.columns.length !== localArity) throw new TypeError(`catalogForeignKey() column arity differs: ${localArity} local and ${target.columns.length} target`);
|
|
184
|
+
const table = target.table;
|
|
185
|
+
if (typeof table !== "object" || table === null || typeof table.columns !== "object" || table.columns === null) throw new TypeError("catalogForeignKey() target must reference a table");
|
|
186
|
+
for (const column of target.columns) if (table.columns[column.fieldName] !== column) throw new TypeError(`catalogForeignKey() target column "${column.fieldName}" does not belong to its table`);
|
|
187
|
+
return target;
|
|
188
|
+
}
|
|
189
|
+
function freezeConstraint(kind, columns, options, extra) {
|
|
190
|
+
const value = { kind };
|
|
191
|
+
const optionValues = options;
|
|
192
|
+
if (columns !== void 0) value.columns = Object.freeze([...columns]);
|
|
193
|
+
if (kind === "check") value.expression = extra;
|
|
194
|
+
else if (kind === "foreign-key") value.target = extra;
|
|
195
|
+
else if (kind === "unique-constraint") value.nulls = extra;
|
|
196
|
+
if (optionValues?.physicalName !== void 0) value.physicalName = optionValues.physicalName;
|
|
197
|
+
if (optionValues?.dialect !== void 0) value.dialect = freezeSchemaMetadata(optionValues.dialect);
|
|
198
|
+
if (optionValues?.deferrable !== void 0) value.deferrable = optionValues.deferrable;
|
|
199
|
+
if (optionValues?.initially !== void 0) value.initially = optionValues.initially;
|
|
200
|
+
if (kind === "foreign-key") {
|
|
201
|
+
if (optionValues?.onUpdate !== void 0) value.onUpdate = optionValues.onUpdate;
|
|
202
|
+
if (optionValues?.onDelete !== void 0) value.onDelete = optionValues.onDelete;
|
|
203
|
+
if (optionValues?.match !== void 0) value.match = optionValues.match;
|
|
204
|
+
}
|
|
205
|
+
return Object.freeze(value);
|
|
206
|
+
}
|
|
207
|
+
//#endregion
|
|
208
|
+
export { primaryKey as a, uniqueConstraint as c, validateIndexDialect as d, foreignKey as i, validateConstraintDialect as l, catalogForeignKey as n, references as o, check as r, unique as s, catalogCheck as t, index as u };
|
package/dist/core.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as assertDialectCapability, o as createDialect, s as resolveCastTarget } from "./json-Db7XRD91.mjs";
|
|
2
|
-
import { a as routineName, c as render, i as typedCall, s as typedCast, t as createClause } from "./types-
|
|
3
|
-
import {
|
|
4
|
-
import { a as parameter, r as typedValue } from "./value-
|
|
2
|
+
import { a as routineName, c as render, i as typedCall, s as typedCast, t as createClause } from "./types-BIJsj2fJ.mjs";
|
|
3
|
+
import { C as fragment, E as sequence, S as withDialectCapability, T as parenthesize, a as qualifiedIdentifier, b as markExpressionCategory, g as isExpression, i as identifier, n as expressionFragment, v as makeExpression, w as isFragment } from "./column-r1Y4ivwt.mjs";
|
|
4
|
+
import { a as parameter, r as typedValue } from "./value-D14I_XgL.mjs";
|
|
5
5
|
//#region src/core/primitives/compose.ts
|
|
6
6
|
function commaSeparated(parts) {
|
|
7
7
|
return sequence(parts, ", ");
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { f as SnapshotDiagnostic } from "./types-C0VkiwpR.mjs";
|
|
2
|
+
import { n as CompleteSchemaSnapshotInput, t as CompleteSchemaSnapshot, u as CompleteSnapshotDecodeResult } from "./complete-types-CY0KbzNw.mjs";
|
|
3
|
+
//#region src/snapshot/complete.d.ts
|
|
4
|
+
/** Error raised by throwing APIs after collecting strict v2 diagnostics. */
|
|
5
|
+
declare class CompleteSnapshotValidationError extends TypeError {
|
|
6
|
+
readonly name = "CompleteSnapshotValidationError";
|
|
7
|
+
readonly diagnostics: readonly SnapshotDiagnostic[];
|
|
8
|
+
readonly issues: readonly SnapshotDiagnostic[];
|
|
9
|
+
constructor(diagnostics: readonly SnapshotDiagnostic[]);
|
|
10
|
+
}
|
|
11
|
+
/** Decode and strictly validate a complete Snapshot v2 JSON value. */
|
|
12
|
+
declare function decodeCompleteSchemaSnapshot(input: string | unknown): CompleteSnapshotDecodeResult;
|
|
13
|
+
/** Validate a complete snapshot and throw one structured error on failure. */
|
|
14
|
+
declare function assertCompleteSchemaSnapshot(input: CompleteSchemaSnapshotInput | string): CompleteSchemaSnapshot;
|
|
15
|
+
/** Return a fixed-order, deeply immutable complete snapshot. */
|
|
16
|
+
declare function canonicalizeCompleteSchemaSnapshot(input: CompleteSchemaSnapshotInput): CompleteSchemaSnapshot;
|
|
17
|
+
/** Encode a complete snapshot with deterministic property and array order. */
|
|
18
|
+
declare function encodeCompleteSchemaSnapshot(snapshot: CompleteSchemaSnapshot): string;
|
|
19
|
+
/** Compute the deterministic content fingerprint for a complete Snapshot v2. */
|
|
20
|
+
declare function completeSchemaSnapshotFingerprint(snapshot: CompleteSchemaSnapshotInput | string): string;
|
|
21
|
+
/** Numbered aliases for tooling that keeps v1 and v2 side by side. */
|
|
22
|
+
declare const decodeSchemaSnapshotV2: typeof decodeCompleteSchemaSnapshot;
|
|
23
|
+
declare const assertSchemaSnapshotV2: typeof assertCompleteSchemaSnapshot;
|
|
24
|
+
declare const encodeSchemaSnapshotV2: typeof encodeCompleteSchemaSnapshot;
|
|
25
|
+
declare const canonicalizeSchemaSnapshotV2: typeof canonicalizeCompleteSchemaSnapshot;
|
|
26
|
+
declare const schemaSnapshotV2Fingerprint: typeof completeSchemaSnapshotFingerprint;
|
|
27
|
+
declare const decodeCompleteSnapshot: typeof decodeCompleteSchemaSnapshot;
|
|
28
|
+
declare const assertCompleteSnapshot: typeof assertCompleteSchemaSnapshot;
|
|
29
|
+
declare const encodeCompleteSnapshot: typeof encodeCompleteSchemaSnapshot;
|
|
30
|
+
declare const fingerprintCompleteSchemaSnapshot: typeof completeSchemaSnapshotFingerprint;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { canonicalizeCompleteSchemaSnapshot as a, decodeCompleteSchemaSnapshot as c, encodeCompleteSchemaSnapshot as d, encodeCompleteSnapshot as f, schemaSnapshotV2Fingerprint as h, assertSchemaSnapshotV2 as i, decodeCompleteSnapshot as l, fingerprintCompleteSchemaSnapshot as m, assertCompleteSchemaSnapshot as n, canonicalizeSchemaSnapshotV2 as o, encodeSchemaSnapshotV2 as p, assertCompleteSnapshot as r, completeSchemaSnapshotFingerprint as s, CompleteSnapshotValidationError as t, decodeSchemaSnapshotV2 as u };
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { a as assertDialectCapability } from "./json-Db7XRD91.mjs";
|
|
2
|
-
import { c as render, n as call, o as cast, r as schemaCall, t as createClause } from "./types-
|
|
2
|
+
import { c as render, n as call, o as cast, r as schemaCall, t as createClause } from "./types-BIJsj2fJ.mjs";
|
|
3
3
|
import { n as queryValidationError, t as QueryValidationError } from "./errors-Dxv73YJu.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { i as
|
|
6
|
-
import {
|
|
4
|
+
import { A as dateResultDecoder, C as fragment, D as ResultDecodingError, F as resultValueOf, I as timestampResultDecoder, M as jsonTextResultDecoder, N as resultShapeValue, O as booleanResultDecoder, P as resultValue, T as parenthesize, _ as isSchemaExpression, b as markExpressionCategory, g as isExpression, h as snakeCaseIdentifier, i as identifier, j as decodeResultRow, k as createResultShape, m as resolveSqlNames, t as createColumnReference, v as makeExpression, w as isFragment, x as markSchemaExpression, y as makeSchemaExpression } from "./column-r1Y4ivwt.mjs";
|
|
5
|
+
import { C as identityColumn, S as generatedColumn, _ as uuid, b as externalDefault, c as integer, d as nativeStorage, f as nullable, g as timestamp, h as text, i as column, l as json, m as portableStorage, n as binary, o as date, p as numeric, r as boolean, s as encodeColumnParameter, t as bigint, u as nativeColumn, x as externalGeneratedColumn } from "./column-Da37jYSD.mjs";
|
|
6
|
+
import { i as value, t as asValue } from "./value-D14I_XgL.mjs";
|
|
7
|
+
import { a as isDistinctFrom, c as lt, d as notLike, f as expressionOperand, i as gte, l as lte, m as renderOperands, n as eq, o as isNotDistinctFrom, p as isNullOperand, r as gt, s as like, u as ne } from "./relational-CxnLCqZQ.mjs";
|
|
7
8
|
import { t as omit } from "./omit-OxV58AwX.mjs";
|
|
8
|
-
import { r as exposeColumns, t as createSource } from "./source-
|
|
9
|
-
import { n as alias, r as lateral, t as table } from "./table-
|
|
10
|
-
import {
|
|
9
|
+
import { r as exposeColumns, t as createSource } from "./source-SqrKWjFJ.mjs";
|
|
10
|
+
import { n as alias, r as lateral, t as table } from "./table-BwflqeAj.mjs";
|
|
11
|
+
import { a as primaryKey, c as uniqueConstraint, i as foreignKey, n as catalogForeignKey, o as references, r as check, s as unique, t as catalogCheck, u as index } from "./constraints-YGyNPQ_z.mjs";
|
|
12
|
+
import { i as schema, p as unsafeSchemaSql } from "./registry-BRcUuazJ.mjs";
|
|
11
13
|
//#region src/execution.ts
|
|
12
14
|
function qubu(adapter, options = {}) {
|
|
13
15
|
const observation = createObservation(options.hooks);
|
package/dist/introspection.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as toSnapshotJsonValue } from "./canonical-DMvR9yBe.mjs";
|
|
2
|
-
import { a as hasIntrospectionErrors, i as createIntrospectionDiagnostic, n as introspectedPhysicalIdentityPolicy, r as IntrospectionError, t as mapCatalogToSnapshot } from "./snapshot-
|
|
2
|
+
import { a as hasIntrospectionErrors, i as createIntrospectionDiagnostic, n as introspectedPhysicalIdentityPolicy, r as IntrospectionError, t as mapCatalogToSnapshot } from "./snapshot-Xam8-q0j.mjs";
|
|
3
3
|
import { n as assertCompleteSchemaSnapshot } from "./complete-DP7pliuY.mjs";
|
|
4
4
|
import "./snapshot.mjs";
|
|
5
5
|
//#region src/introspection/catalog.ts
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { a as assertDialectCapability } from "./json-Db7XRD91.mjs";
|
|
2
2
|
import { n as queryValidationError } from "./errors-Dxv73YJu.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { C as fragment, g as isExpression, i as identifier, t as createColumnReference } from "./column-r1Y4ivwt.mjs";
|
|
4
|
+
import { a as columnResultValue, s as encodeColumnParameter } from "./column-Da37jYSD.mjs";
|
|
4
5
|
import { t as omit } from "./omit-OxV58AwX.mjs";
|
|
5
|
-
import { r as exposeColumns, t as createSource } from "./source-
|
|
6
|
+
import { r as exposeColumns, t as createSource } from "./source-SqrKWjFJ.mjs";
|
|
6
7
|
//#region src/query/mutation/on-conflict.ts
|
|
7
8
|
/** Columns from the proposed INSERT row, available inside DO UPDATE. */
|
|
8
9
|
function excluded(table) {
|
package/dist/postgres.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as postgresJson, o as createDialect } from "./json-Db7XRD91.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as comparison } from "./relational-
|
|
2
|
+
import { S as withDialectCapability } from "./column-r1Y4ivwt.mjs";
|
|
3
|
+
import { t as comparison } from "./relational-CxnLCqZQ.mjs";
|
|
4
4
|
import { n as postgresExplain } from "./explain-CkIK13L_.mjs";
|
|
5
|
-
import { i as onConflict, n as doUpdate, r as excluded, t as doNothing } from "./on-conflict-
|
|
5
|
+
import { i as onConflict, n as doUpdate, r as excluded, t as doNothing } from "./on-conflict-DZQ85f1t.mjs";
|
|
6
6
|
//#region src/dialects/postgres.ts
|
|
7
7
|
const postgresRowLockModeSql = {
|
|
8
8
|
update: "UPDATE",
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { t as standardDialect } from "./standard-DfcZEVOj.mjs";
|
|
2
|
+
import { _ as isSchemaExpression, h as snakeCaseIdentifier, r as isColumnReference, x as markSchemaExpression, y as makeSchemaExpression } from "./column-r1Y4ivwt.mjs";
|
|
3
|
+
import { n as isValueExpression } from "./value-D14I_XgL.mjs";
|
|
4
|
+
//#region src/schema/expressions.ts
|
|
5
|
+
/** Error raised before a schema expression can become persisted SQL. */
|
|
6
|
+
var SchemaExpressionError = class extends TypeError {
|
|
7
|
+
code;
|
|
8
|
+
mode;
|
|
9
|
+
constructor(code, message, mode) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = "SchemaExpressionError";
|
|
12
|
+
this.code = code;
|
|
13
|
+
this.mode = mode;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Normalize only line endings. Whitespace, quoting, and every other byte of a raw schema expression
|
|
18
|
+
* remain under the extension author's control.
|
|
19
|
+
*/
|
|
20
|
+
function normalizeSchemaSql(sql) {
|
|
21
|
+
return sql.replace(/\r\n?/g, "\n");
|
|
22
|
+
}
|
|
23
|
+
function schemaExpression(expression) {
|
|
24
|
+
return markSchemaExpression(expression);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Define an extension with the restricted schema context. This is the typed alternative to
|
|
28
|
+
* {@link unsafeSchemaSql} for deterministic custom syntax.
|
|
29
|
+
*/
|
|
30
|
+
function defineSchemaExpression(kind, render) {
|
|
31
|
+
return makeSchemaExpression(kind, (context) => render(context));
|
|
32
|
+
}
|
|
33
|
+
function unsafeSchemaSql(dialectOrOptions, sql) {
|
|
34
|
+
const dialect = typeof dialectOrOptions === "string" ? dialectOrOptions : dialectOrOptions.dialect;
|
|
35
|
+
const source = typeof dialectOrOptions === "string" ? sql : dialectOrOptions.sql;
|
|
36
|
+
if (!dialect) throw new TypeError("unsafeSchemaSql() requires a dialect tag");
|
|
37
|
+
if (source === void 0) throw new TypeError("unsafeSchemaSql() requires SQL text");
|
|
38
|
+
const normalized = normalizeSchemaSql(source);
|
|
39
|
+
const expression = makeSchemaExpression("unsafe", (context) => context.append(normalized));
|
|
40
|
+
return Object.freeze({
|
|
41
|
+
...expression,
|
|
42
|
+
schemaSqlDialect: dialect,
|
|
43
|
+
schemaSql: normalized
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/** Identify a dialect-tagged raw schema expression. */
|
|
47
|
+
function isUnsafeSchemaSql(value) {
|
|
48
|
+
return isSchemaExpression(value) && value.expressionKind === "unsafe" && typeof value.schemaSqlDialect === "string" && typeof value.schemaSql === "string";
|
|
49
|
+
}
|
|
50
|
+
function renderSchemaExpression(expression, optionsOrMode, dialectOption) {
|
|
51
|
+
const options = typeof optionsOrMode === "string" ? {
|
|
52
|
+
mode: optionsOrMode,
|
|
53
|
+
dialect: dialectOption
|
|
54
|
+
} : optionsOrMode;
|
|
55
|
+
const dialect = options.dialect ?? standardDialect();
|
|
56
|
+
if (!isSchemaExpression(expression)) throw new SchemaExpressionError("not-deterministic", "Only branded deterministic expressions can be rendered as schema SQL", options.mode);
|
|
57
|
+
assertSupportedExpression(expression, options.mode);
|
|
58
|
+
let text = "";
|
|
59
|
+
const context = {
|
|
60
|
+
dialect,
|
|
61
|
+
projectionMode: "result",
|
|
62
|
+
schemaMode: options.mode,
|
|
63
|
+
append(value) {
|
|
64
|
+
text += value;
|
|
65
|
+
},
|
|
66
|
+
parameter() {
|
|
67
|
+
throw new SchemaExpressionError("parameter", "Schema expressions cannot render query parameters", options.mode);
|
|
68
|
+
},
|
|
69
|
+
literal(value) {
|
|
70
|
+
text += renderSchemaLiteral(dialect, value, options.mode);
|
|
71
|
+
},
|
|
72
|
+
renderColumnReference(columnName) {
|
|
73
|
+
if (options.mode === "default") throw new SchemaExpressionError("column-not-allowed", "Default expressions cannot reference table columns", options.mode);
|
|
74
|
+
text += dialect.quoteIdentifier(columnName);
|
|
75
|
+
},
|
|
76
|
+
render(part) {
|
|
77
|
+
renderSchemaPart(context, part, options.mode);
|
|
78
|
+
},
|
|
79
|
+
renderRelation() {
|
|
80
|
+
throw new SchemaExpressionError("unsupported-expression", "Schema expressions cannot contain subqueries", options.mode);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
renderSchemaPart(context, expression, options.mode);
|
|
84
|
+
return Object.freeze({
|
|
85
|
+
text,
|
|
86
|
+
parameters: Object.freeze([])
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** Convenience form for callers that only need the SQL text. */
|
|
90
|
+
function renderSchemaSql(expression, options) {
|
|
91
|
+
return renderSchemaExpression(expression, options).text;
|
|
92
|
+
}
|
|
93
|
+
function renderSchemaPart(context, part, mode) {
|
|
94
|
+
if (isValueExpression(part)) {
|
|
95
|
+
context.literal(part.value);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (isColumnReference(part)) {
|
|
99
|
+
context.renderColumnReference(part.columnName);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (isUnsafeSchemaSql(part)) {
|
|
103
|
+
if (part.schemaSqlDialect !== context.dialect.name) throw new SchemaExpressionError("dialect-mismatch", `Schema SQL is tagged for "${part.schemaSqlDialect}" but rendered for "${context.dialect.name}"`, mode);
|
|
104
|
+
context.append(part.schemaSql);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (!isSchemaExpression(part)) throw new SchemaExpressionError("not-deterministic", "Schema expressions may only compose branded expressions, columns, and literals", mode);
|
|
108
|
+
assertSupportedExpression(part, mode);
|
|
109
|
+
part.render(context);
|
|
110
|
+
}
|
|
111
|
+
function assertSupportedExpression(expression, mode) {
|
|
112
|
+
if (expression.expressionKind === "subquery" || expression.expressionCategory) throw new SchemaExpressionError("unsupported-expression", "Aggregates, windows, and subqueries are not valid schema expressions", mode);
|
|
113
|
+
}
|
|
114
|
+
function renderSchemaLiteral(dialect, value, mode) {
|
|
115
|
+
if (dialect.renderSchemaLiteral) {
|
|
116
|
+
const rendered = dialect.renderSchemaLiteral(value);
|
|
117
|
+
if (typeof rendered !== "string" || rendered.includes("?")) throw new SchemaExpressionError("invalid-literal", "A schema literal renderer must return parameter-free SQL text", mode);
|
|
118
|
+
return rendered;
|
|
119
|
+
}
|
|
120
|
+
if (value === null) return "NULL";
|
|
121
|
+
if (typeof value === "boolean") return value ? "TRUE" : "FALSE";
|
|
122
|
+
if (typeof value === "string") return `'${value.replaceAll("'", "''")}'`;
|
|
123
|
+
if (typeof value === "bigint") return String(value);
|
|
124
|
+
if (typeof value === "number") {
|
|
125
|
+
if (!Number.isFinite(value)) throw new SchemaExpressionError("unsupported-value", "Schema literals require finite numbers", mode);
|
|
126
|
+
return Object.is(value, -0) ? "0" : String(value);
|
|
127
|
+
}
|
|
128
|
+
throw new SchemaExpressionError("unsupported-value", `Unsupported schema literal type: ${value === void 0 ? "undefined" : typeof value}`, mode);
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/schema/registry.ts
|
|
132
|
+
/** The first naming-policy version used by schema metadata. */
|
|
133
|
+
const schemaNamingPolicyVersion = 1;
|
|
134
|
+
/**
|
|
135
|
+
* The built-in naming policy for schema-generated physical names.
|
|
136
|
+
*
|
|
137
|
+
* Explicit names supplied to `table()` remain unchanged. The policy is used by tooling when it
|
|
138
|
+
* needs a physical name for a logical table ID.
|
|
139
|
+
*/
|
|
140
|
+
const defaultSchemaNamingPolicy = Object.freeze({
|
|
141
|
+
version: 1,
|
|
142
|
+
tableName: snakeCaseIdentifier
|
|
143
|
+
});
|
|
144
|
+
/** Error thrown when a root schema fails registry or naming validation. */
|
|
145
|
+
var SchemaValidationError = class extends Error {
|
|
146
|
+
name = "SchemaValidationError";
|
|
147
|
+
diagnostics;
|
|
148
|
+
/** Alias matching validation libraries that call findings "issues". */
|
|
149
|
+
issues;
|
|
150
|
+
constructor(diagnostics) {
|
|
151
|
+
const frozenDiagnostics = Object.freeze(diagnostics.map((diagnostic) => Object.freeze({
|
|
152
|
+
...diagnostic,
|
|
153
|
+
path: Object.freeze([...diagnostic.path]),
|
|
154
|
+
relatedPaths: diagnostic.relatedPaths ? Object.freeze(diagnostic.relatedPaths.map((path) => Object.freeze([...path]))) : void 0
|
|
155
|
+
})));
|
|
156
|
+
super(frozenDiagnostics.map((diagnostic) => diagnostic.message).join("\n"));
|
|
157
|
+
this.diagnostics = frozenDiagnostics;
|
|
158
|
+
this.issues = frozenDiagnostics;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
function entriesOf(input) {
|
|
162
|
+
if (Array.isArray(input)) return input;
|
|
163
|
+
return Object.entries(input);
|
|
164
|
+
}
|
|
165
|
+
function validLogicalId(id) {
|
|
166
|
+
return id.length > 0 && id === id.trim() && !/[.\\/\u0000-\u001f\u007f]/u.test(id);
|
|
167
|
+
}
|
|
168
|
+
function validNamespace(namespace) {
|
|
169
|
+
return namespace.length > 0 && namespace === namespace.trim() && !/[.\\/\u0000-\u001f\u007f"']/u.test(namespace);
|
|
170
|
+
}
|
|
171
|
+
function validateEntries(entries, namespace, namingPolicy) {
|
|
172
|
+
const diagnostics = [];
|
|
173
|
+
const ids = /* @__PURE__ */ new Map();
|
|
174
|
+
const physicalNames = /* @__PURE__ */ new Map();
|
|
175
|
+
const generatedNames = /* @__PURE__ */ new Map();
|
|
176
|
+
for (const [index, [id, table]] of entries.entries()) {
|
|
177
|
+
const path = ["tables", id];
|
|
178
|
+
const previousId = ids.get(id);
|
|
179
|
+
if (previousId !== void 0) diagnostics.push({
|
|
180
|
+
code: "duplicate-table-id",
|
|
181
|
+
message: `Table ID "${id}" is declared more than once`,
|
|
182
|
+
path,
|
|
183
|
+
relatedPaths: [["tables", entries[previousId][0]]]
|
|
184
|
+
});
|
|
185
|
+
else ids.set(id, index);
|
|
186
|
+
if (!validLogicalId(id)) diagnostics.push({
|
|
187
|
+
code: "invalid-table-id",
|
|
188
|
+
message: `Table ID "${id}" must be a non-empty logical identifier`,
|
|
189
|
+
path
|
|
190
|
+
});
|
|
191
|
+
const physicalName = table.tableName || namingPolicy.tableName(id);
|
|
192
|
+
const previousPhysicalName = physicalNames.get(physicalName);
|
|
193
|
+
if (previousPhysicalName !== void 0) diagnostics.push({
|
|
194
|
+
code: "duplicate-physical-name",
|
|
195
|
+
message: `Tables "${entries[previousPhysicalName][0]}" and "${id}" both use physical name "${physicalName}"`,
|
|
196
|
+
path: [...path, "physicalName"],
|
|
197
|
+
relatedPaths: [[
|
|
198
|
+
"tables",
|
|
199
|
+
entries[previousPhysicalName][0],
|
|
200
|
+
"physicalName"
|
|
201
|
+
]]
|
|
202
|
+
});
|
|
203
|
+
else physicalNames.set(physicalName, index);
|
|
204
|
+
const generatedName = namingPolicy.tableName(id);
|
|
205
|
+
const previousGeneratedName = generatedNames.get(generatedName);
|
|
206
|
+
if (previousGeneratedName !== void 0) diagnostics.push({
|
|
207
|
+
code: "generated-name-collision",
|
|
208
|
+
message: `Logical table IDs "${entries[previousGeneratedName][0]}" and "${id}" generate the same physical name "${generatedName}"`,
|
|
209
|
+
path: [...path, "generatedName"],
|
|
210
|
+
relatedPaths: [[
|
|
211
|
+
"tables",
|
|
212
|
+
entries[previousGeneratedName][0],
|
|
213
|
+
"generatedName"
|
|
214
|
+
]]
|
|
215
|
+
});
|
|
216
|
+
else generatedNames.set(generatedName, index);
|
|
217
|
+
}
|
|
218
|
+
if (namespace !== void 0 && !validNamespace(namespace)) diagnostics.push({
|
|
219
|
+
code: "invalid-namespace",
|
|
220
|
+
message: `Schema namespace "${namespace}" must be a non-empty identifier without qualification or control characters`,
|
|
221
|
+
path: ["namespace"]
|
|
222
|
+
});
|
|
223
|
+
return Object.freeze(diagnostics);
|
|
224
|
+
}
|
|
225
|
+
function freezeTableNames(entries, namingPolicy) {
|
|
226
|
+
return Object.freeze(Object.fromEntries(entries.map(([id, table]) => [id, table.tableName || namingPolicy.tableName(id)])));
|
|
227
|
+
}
|
|
228
|
+
function createSchema(entries, tables, options = {}) {
|
|
229
|
+
const namingPolicy = options.namingPolicy ?? defaultSchemaNamingPolicy;
|
|
230
|
+
const diagnostics = validateEntries(entries, options.namespace, namingPolicy);
|
|
231
|
+
if (diagnostics.length > 0) throw new SchemaValidationError(diagnostics);
|
|
232
|
+
const tableNames = freezeTableNames(entries, namingPolicy);
|
|
233
|
+
const registry = Object.freeze(Object.fromEntries(entries.map(([id, table]) => [id, Object.freeze({
|
|
234
|
+
id,
|
|
235
|
+
table,
|
|
236
|
+
physicalName: tableNames[id]
|
|
237
|
+
})])));
|
|
238
|
+
return Object.freeze({
|
|
239
|
+
schemaKind: "schema",
|
|
240
|
+
tables: Object.freeze({ ...tables }),
|
|
241
|
+
registry,
|
|
242
|
+
tableNames,
|
|
243
|
+
namespace: options.namespace,
|
|
244
|
+
namingPolicy: Object.freeze({ ...namingPolicy })
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function schema(tables, options) {
|
|
248
|
+
const entries = entriesOf(tables);
|
|
249
|
+
return createSchema(entries, Object.fromEntries(entries), options);
|
|
250
|
+
}
|
|
251
|
+
/** Generate a v1 physical name for a logical table ID. */
|
|
252
|
+
function generatedTableName(logicalId, namingPolicy = defaultSchemaNamingPolicy) {
|
|
253
|
+
return namingPolicy.tableName(logicalId);
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
export { schemaNamingPolicyVersion as a, isUnsafeSchemaSql as c, renderSchemaSql as d, schemaExpression as f, schema as i, normalizeSchemaSql as l, defaultSchemaNamingPolicy as n, SchemaExpressionError as o, unsafeSchemaSql as p, generatedTableName as r, defineSchemaExpression as s, SchemaValidationError as t, renderSchemaExpression as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as queryValidationError } from "./errors-Dxv73YJu.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as isValueExpression, t as asValue } from "./value-
|
|
2
|
+
import { P as resultValue, y as makeSchemaExpression } from "./column-r1Y4ivwt.mjs";
|
|
3
|
+
import { n as isValueExpression, t as asValue } from "./value-D14I_XgL.mjs";
|
|
4
4
|
//#region src/expressions/operators/shared.ts
|
|
5
5
|
function isNullOperand(value) {
|
|
6
6
|
return value === null || isValueExpression(value) && value.value === null;
|
package/dist/schema.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
1
|
+
import { c as dialectMismatchDiagnostic, d as isValidSchemaObjectName, f as materializeSchemaObjectIdentity, l as freezeSchemaMetadata, o as SchemaMetadataValidationError, p as materializeSchemaObjectRecord, s as assertSchemaDialectSupport, u as generatedSchemaObjectName } from "./column-r1Y4ivwt.mjs";
|
|
2
|
+
import { C as identityColumn, S as generatedColumn, _ as uuid, a as columnResultValue, b as externalDefault, c as integer, d as nativeStorage, f as nullable, g as timestamp, h as text, i as column, l as json, m as portableStorage, n as binary, o as date, p as numeric, r as boolean, s as encodeColumnParameter, t as bigint, u as nativeColumn, v as ColumnBehaviorError, w as resolveColumnBehavior, x as externalGeneratedColumn, y as canonicalLiteral } from "./column-Da37jYSD.mjs";
|
|
3
|
+
import { i as sourceIdentity, n as customSource, r as exposeColumns, t as createSource } from "./source-SqrKWjFJ.mjs";
|
|
4
|
+
import { n as alias, r as lateral, t as table } from "./table-BwflqeAj.mjs";
|
|
5
|
+
import { a as primaryKey, c as uniqueConstraint, d as validateIndexDialect, i as foreignKey, l as validateConstraintDialect, n as catalogForeignKey, o as references, r as check, s as unique, t as catalogCheck, u as index } from "./constraints-YGyNPQ_z.mjs";
|
|
6
|
+
import { a as schemaNamingPolicyVersion, c as isUnsafeSchemaSql, d as renderSchemaSql, f as schemaExpression, i as schema, l as normalizeSchemaSql, n as defaultSchemaNamingPolicy, o as SchemaExpressionError, p as unsafeSchemaSql, r as generatedTableName, s as defineSchemaExpression, t as SchemaValidationError, u as renderSchemaExpression } from "./registry-BRcUuazJ.mjs";
|
|
5
7
|
import { t as createSchemaDialect } from "./dialect-wUKrnPMB.mjs";
|
|
6
8
|
export { ColumnBehaviorError, SchemaExpressionError, SchemaMetadataValidationError, SchemaValidationError, alias, assertSchemaDialectSupport, bigint, binary, boolean, canonicalLiteral, catalogCheck, catalogForeignKey, check, column, columnResultValue, 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 };
|