durcno 1.0.0-alpha.5 → 1.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/bin.cjs +116 -21
  2. package/dist/src/columns/bigint.d.mts +7 -7
  3. package/dist/src/columns/bigint.mjs +4 -4
  4. package/dist/src/columns/bigserial.d.mts +7 -7
  5. package/dist/src/columns/bigserial.mjs +4 -4
  6. package/dist/src/columns/boolean.d.mts +1 -1
  7. package/dist/src/columns/bytea.d.mts +1 -1
  8. package/dist/src/columns/char.d.mts +1 -1
  9. package/dist/src/columns/cidr.d.mts +1 -1
  10. package/dist/src/columns/common.d.mts +3 -3
  11. package/dist/src/columns/date.d.mts +1 -1
  12. package/dist/src/columns/enum.d.mts +2 -2
  13. package/dist/src/columns/inet.d.mts +1 -1
  14. package/dist/src/columns/integer.d.mts +1 -1
  15. package/dist/src/columns/json.d.mts +1 -1
  16. package/dist/src/columns/jsonb.d.mts +1 -1
  17. package/dist/src/columns/macaddr.d.mts +1 -1
  18. package/dist/src/columns/numeric.d.mts +1 -1
  19. package/dist/src/columns/postgis/geography/linestring.d.mts +1 -1
  20. package/dist/src/columns/postgis/geography/multilinestring.d.mts +1 -1
  21. package/dist/src/columns/postgis/geography/multipoint.d.mts +1 -1
  22. package/dist/src/columns/postgis/geography/multipolygon.d.mts +1 -1
  23. package/dist/src/columns/postgis/geography/point.d.mts +1 -1
  24. package/dist/src/columns/postgis/geography/polygon.d.mts +1 -1
  25. package/dist/src/columns/serial.d.mts +1 -1
  26. package/dist/src/columns/smallint.d.mts +1 -1
  27. package/dist/src/columns/smallserial.d.mts +1 -1
  28. package/dist/src/columns/text.d.mts +1 -1
  29. package/dist/src/columns/time.d.mts +1 -1
  30. package/dist/src/columns/timestamp.d.mts +1 -1
  31. package/dist/src/columns/uuid.d.mts +1 -1
  32. package/dist/src/columns/varchar.d.mts +1 -1
  33. package/dist/src/constraints/check.d.mts +117 -24
  34. package/dist/src/constraints/check.mjs +228 -28
  35. package/dist/src/db.d.mts +1 -1
  36. package/dist/src/filters/array.d.mts +2 -7
  37. package/dist/src/filters/array.mjs +0 -15
  38. package/dist/src/filters/custom.d.mts +1 -2
  39. package/dist/src/filters/index.d.mts +3 -20
  40. package/dist/src/filters/index.mjs +0 -64
  41. package/dist/src/index.d.mts +7 -7
  42. package/dist/src/migration/ddl/table.d.mts +16 -6
  43. package/dist/src/migration/ddl/table.mjs +15 -5
  44. package/dist/src/migration/index.d.mts +3 -1
  45. package/dist/src/migration/index.mjs +3 -1
  46. package/dist/src/migration/snapshot.d.mts +1 -1
  47. package/dist/src/models.d.mts +1 -1
  48. package/dist/src/query-builders/aggregates.d.mts +2 -2
  49. package/dist/src/query-builders/aggregates.mjs +1 -2
  50. package/dist/src/query-builders/count.d.mts +2 -2
  51. package/dist/src/query-builders/count.mjs +1 -2
  52. package/dist/src/query-builders/delete.d.mts +2 -2
  53. package/dist/src/query-builders/delete.mjs +1 -2
  54. package/dist/src/query-builders/distinct.d.mts +2 -2
  55. package/dist/src/query-builders/distinct.mjs +1 -2
  56. package/dist/src/query-builders/exists.d.mts +2 -2
  57. package/dist/src/query-builders/exists.mjs +1 -2
  58. package/dist/src/query-builders/first.d.mts +2 -2
  59. package/dist/src/query-builders/first.mjs +1 -2
  60. package/dist/src/query-builders/insert-returning.d.mts +2 -2
  61. package/dist/src/query-builders/insert.d.mts +2 -2
  62. package/dist/src/query-builders/pre.d.mts +2 -2
  63. package/dist/src/query-builders/raw.d.mts +1 -1
  64. package/dist/src/query-builders/rq.d.mts +2 -2
  65. package/dist/src/query-builders/rq.mjs +4 -1
  66. package/dist/src/query-builders/select.d.mts +2 -2
  67. package/dist/src/query-builders/select.mjs +3 -3
  68. package/dist/src/query-builders/update.d.mts +2 -2
  69. package/dist/src/query-builders/update.mjs +1 -2
  70. package/dist/src/sequence.d.mts +1 -1
  71. package/dist/src/sql.d.mts +1 -1
  72. package/dist/src/table.d.mts +2 -2
  73. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -12063,13 +12063,16 @@ var Column = class {
12063
12063
  };
12064
12064
 
12065
12065
  // src/constraints/check.ts
12066
+ function isExprColumnRef(value) {
12067
+ return typeof value === "object" && value !== null && value.type === "col";
12068
+ }
12066
12069
  function snapshotExprToSQL(expr) {
12067
12070
  if (expr.type === "raw") {
12068
12071
  return expr.sql;
12069
12072
  }
12070
12073
  if (expr.type === "comparison") {
12071
- const left = typeof expr.left === "string" ? `"${expr.left}"` : snapshotExprToSQL(expr.left);
12072
- const right = formatSnapshotValue(expr.right);
12074
+ const left = isExprColumnRef(expr.left) ? `"${expr.left.name}"` : snapshotExprToSQL(expr.left);
12075
+ const right = isExprColumnRef(expr.right) ? `"${expr.right.name}"` : expr.right;
12073
12076
  return `${left} ${expr.op} ${right}`;
12074
12077
  }
12075
12078
  if (expr.type === "logical") {
@@ -12078,23 +12081,113 @@ function snapshotExprToSQL(expr) {
12078
12081
  return wrappedParts.join(` ${expr.op} `);
12079
12082
  }
12080
12083
  if (expr.type === "function") {
12081
- const args = expr.args.map(
12082
- (a) => typeof a === "string" ? `"${a}"` : formatSnapshotValue(a)
12083
- );
12084
+ const args = expr.args.map((a) => isExprColumnRef(a) ? `"${a.name}"` : a);
12084
12085
  return `${expr.name}(${args.join(", ")})`;
12085
12086
  }
12086
12087
  throw new Error("Unknown expression type");
12087
12088
  }
12088
- function formatSnapshotValue(value) {
12089
- if (value === null) return "NULL";
12090
- if (Array.isArray(value)) {
12091
- const list = value.map((v) => formatSnapshotValue(v)).join(", ");
12092
- return `(${list})`;
12089
+ var opToMethod = {
12090
+ "=": "eq",
12091
+ "<>": "neq",
12092
+ ">": "gt",
12093
+ ">=": "gte",
12094
+ "<": "lt",
12095
+ "<=": "lte",
12096
+ LIKE: "like",
12097
+ "SIMILAR TO": "similarTo",
12098
+ "~": "regex",
12099
+ IN: "in",
12100
+ "NOT IN": "notIn"
12101
+ };
12102
+ var fnOpToMethod = {
12103
+ "=": "fnEq",
12104
+ "<>": "fnNeq",
12105
+ ">": "fnGt",
12106
+ ">=": "fnGte",
12107
+ "<": "fnLt",
12108
+ "<=": "fnLte"
12109
+ };
12110
+ var reservedMethodAlias = {
12111
+ in: "inOp"
12112
+ };
12113
+ function wrapSql(value) {
12114
+ return `sql\`${value.replace(/`/g, "\\`")}\``;
12115
+ }
12116
+ function collectMethods(expr, names) {
12117
+ if (expr.type === "raw") {
12118
+ names.add("raw");
12119
+ return;
12093
12120
  }
12094
- if (typeof value === "string") return `'${value.replace(/'/g, "''")}'`;
12095
- if (typeof value === "number") return String(value);
12096
- if (typeof value === "boolean") return value ? "TRUE" : "FALSE";
12097
- return String(value);
12121
+ if (expr.type === "comparison") {
12122
+ if (isExprColumnRef(expr.right)) {
12123
+ names.add("raw");
12124
+ return;
12125
+ }
12126
+ if (expr.left.type === "function") {
12127
+ names.add(fnOpToMethod[expr.op] ?? "fnEq");
12128
+ names.add(expr.left.name);
12129
+ } else {
12130
+ names.add(opToMethod[expr.op] ?? "eq");
12131
+ }
12132
+ return;
12133
+ }
12134
+ if (expr.type === "logical") {
12135
+ names.add(expr.op === "AND" ? "and" : "or");
12136
+ for (const e of expr.expressions) {
12137
+ collectMethods(e, names);
12138
+ }
12139
+ return;
12140
+ }
12141
+ if (expr.type === "function") {
12142
+ names.add(expr.name);
12143
+ }
12144
+ }
12145
+ function buildDestructure(names) {
12146
+ return [...names].sort().map((name) => {
12147
+ const alias = reservedMethodAlias[name];
12148
+ return alias ? `${name}: ${alias}` : name;
12149
+ }).join(", ");
12150
+ }
12151
+ function callName(method) {
12152
+ return reservedMethodAlias[method] ?? method;
12153
+ }
12154
+ function renderFunctionExpr(fn) {
12155
+ const args = fn.args.map(
12156
+ (a) => typeof a === "string" ? wrapSql(a) : isExprColumnRef(a) ? JSON.stringify(a.name) : wrapSql(snapshotExprToSQL(a))
12157
+ );
12158
+ return `${fn.name}(${args.join(", ")})`;
12159
+ }
12160
+ function renderExpr(expr) {
12161
+ if (expr.type === "raw") {
12162
+ return `raw(${JSON.stringify(expr.sql)})`;
12163
+ }
12164
+ if (expr.type === "comparison") {
12165
+ if (isExprColumnRef(expr.right)) {
12166
+ return `raw(${JSON.stringify(snapshotExprToSQL(expr))})`;
12167
+ }
12168
+ if (expr.left.type === "function") {
12169
+ const method2 = fnOpToMethod[expr.op] ?? "fnEq";
12170
+ return `${callName(method2)}(${renderFunctionExpr(expr.left)}, ${wrapSql(expr.right)})`;
12171
+ }
12172
+ const method = opToMethod[expr.op] ?? "eq";
12173
+ return `${callName(method)}(${JSON.stringify(expr.left.name)}, ${wrapSql(expr.right)})`;
12174
+ }
12175
+ if (expr.type === "logical") {
12176
+ const method = expr.op === "AND" ? "and" : "or";
12177
+ const parts = expr.expressions.map((e) => renderExpr(e)).join(", ");
12178
+ return `${method}(${parts})`;
12179
+ }
12180
+ if (expr.type === "function") {
12181
+ return renderFunctionExpr(expr);
12182
+ }
12183
+ throw new Error("Unknown SnapshotCheckExpr type");
12184
+ }
12185
+ function snapshotExprToCheckBuilderCode(expr) {
12186
+ const names = /* @__PURE__ */ new Set();
12187
+ collectMethods(expr, names);
12188
+ const destructure = buildDestructure(names);
12189
+ const body = renderExpr(expr);
12190
+ return `({ ${destructure} }) => ${body}`;
12098
12191
  }
12099
12192
 
12100
12193
  // src/cli/utils.ts
@@ -12489,7 +12582,9 @@ function generateMigration(prev, curr, direction, renamedTables = {}, renamedCol
12489
12582
  );
12490
12583
  }
12491
12584
  for (const chk of Object.values(currTable.checkConstraints)) {
12492
- tableBuilder.push(`.check("${chk.name}", ${JSON.stringify(chk.expr)})`);
12585
+ tableBuilder.push(
12586
+ `.check("${chk.name}", ${snapshotExprToCheckBuilderCode(chk.expr)})`
12587
+ );
12493
12588
  }
12494
12589
  for (const uc of Object.values(currTable.uniqueConstraints ?? {})) {
12495
12590
  const cols = uc.columns.map((c) => `"${c}"`).join(", ");
@@ -12524,9 +12619,9 @@ function generateMigration(prev, curr, direction, renamedTables = {}, renamedCol
12524
12619
  }
12525
12620
  }
12526
12621
  if (statements.length === 0) return null;
12527
- return `import { type DDLStatement, ddl, type MigrationOptions } from "durcno/migration";
12622
+ return `import { type DDLStatement, ddl, sql, type MigrationOptions } from "durcno/migration";
12528
12623
 
12529
- export const options: MigrationOptions = ${stringifyMigrationOpts(defaultOptions ?? { transaction: true })};
12624
+ export const options: MigrationOptions = ${stringifyMigrationOpts(defaultOptions ?? {})};
12530
12625
 
12531
12626
  export const statements: DDLStatement[] = [
12532
12627
  ${statements.join(",\n ")},
@@ -12536,7 +12631,7 @@ export const statements: DDLStatement[] = [
12536
12631
  function generateNoOpMigration(defaultOptions) {
12537
12632
  return `import { type DDLStatement, ddl, type MigrationOptions } from "durcno/migration";
12538
12633
 
12539
- export const options: MigrationOptions = ${stringifyMigrationOpts(defaultOptions ?? { transaction: true })};
12634
+ export const options: MigrationOptions = ${stringifyMigrationOpts(defaultOptions ?? {})};
12540
12635
 
12541
12636
  export const statements: DDLStatement[] = [];
12542
12637
  `;
@@ -12646,14 +12741,14 @@ function generateAlterTableStmts(prevTable, currTable, tableName, curr, statemen
12646
12741
  const prevChk = prevTable.checkConstraints[chkName];
12647
12742
  if (!prevChk) {
12648
12743
  alterStatements.push(
12649
- `.addCheck("${chkName}", ${JSON.stringify(currChk.expr)})`
12744
+ `.addCheck("${chkName}", ${snapshotExprToCheckBuilderCode(currChk.expr)})`
12650
12745
  );
12651
12746
  } else {
12652
12747
  const prevSql = snapshotExprToSQL(prevChk.expr);
12653
12748
  const currSql = snapshotExprToSQL(currChk.expr);
12654
12749
  if (prevSql !== currSql) {
12655
12750
  alterStatements.push(
12656
- `.addCheck("${chkName}", ${JSON.stringify(currChk.expr)})`
12751
+ `.addCheck("${chkName}", ${snapshotExprToCheckBuilderCode(currChk.expr)})`
12657
12752
  );
12658
12753
  }
12659
12754
  }
@@ -13508,7 +13603,7 @@ async function status(options) {
13508
13603
  }
13509
13604
 
13510
13605
  // src/cli/index.ts
13511
- program.version("1.0.0-alpha.4");
13606
+ program.version("1.0.0-alpha.6");
13512
13607
  var Options = {
13513
13608
  config: ["--config <path>", "Path to the config file"]
13514
13609
  };
@@ -1,20 +1,20 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/bigint.d.ts
6
- type BigintValType = number;
6
+ type BigintValType = bigint;
7
7
  type BigintConfig = ColumnConfig;
8
8
  declare class BigintColumn<TConfig extends BigintConfig> extends Column<TConfig, BigintValType> {
9
9
  static readonly id = "Column.Bigint";
10
10
  get sqlTypeScalar(): string;
11
11
  get sqlCastScalar(): null;
12
- get zodTypeScaler(): z.ZodCoercedNumber<unknown>;
13
- toDriverScalar(value: BigintValType | Sql | null): string | number | null;
14
- toSQLScalar(value: number | Sql | null): string;
15
- fromDriverScalar(value: number | string | null): BigintValType | null;
12
+ get zodTypeScaler(): z.ZodCoercedBigInt<unknown>;
13
+ toDriverScalar(value: BigintValType | Sql | null): string | null;
14
+ toSQLScalar(value: BigintValType | Sql | null): string;
15
+ fromDriverScalar(value: bigint | string | null): BigintValType | null;
16
16
  }
17
- /** Creates a `bigint` column. PostgreSQL 64-bit signed integer, maps to `number`. */
17
+ /** Creates a `bigint` column. PostgreSQL 64-bit signed integer, maps to `bigint`. */
18
18
  declare function bigint<TConfig extends BigintConfig>(config: TConfig): BigintColumn<TConfig>;
19
19
  //#endregion
20
20
  export { BigintColumn, bigint };
@@ -11,11 +11,11 @@ var BigintColumn = class extends Column {
11
11
  return null;
12
12
  }
13
13
  get zodTypeScaler() {
14
- return z.coerce.number();
14
+ return z.coerce.bigint();
15
15
  }
16
16
  toDriverScalar(value) {
17
17
  if (value === null) return null;
18
- return value instanceof Sql ? value.string : value;
18
+ return value instanceof Sql ? value.string : value.toString();
19
19
  }
20
20
  toSQLScalar(value) {
21
21
  if (value === null) return "NULL";
@@ -24,10 +24,10 @@ var BigintColumn = class extends Column {
24
24
  }
25
25
  fromDriverScalar(value) {
26
26
  if (value === null) return null;
27
- return typeof value === "string" ? parseInt(value, 10) : value;
27
+ return BigInt(value);
28
28
  }
29
29
  };
30
- /** Creates a `bigint` column. PostgreSQL 64-bit signed integer, maps to `number`. */
30
+ /** Creates a `bigint` column. PostgreSQL 64-bit signed integer, maps to `bigint`. */
31
31
  function bigint(config) {
32
32
  return new BigintColumn(config);
33
33
  }
@@ -1,9 +1,9 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/bigserial.d.ts
6
- type BigserialValType = number;
6
+ type BigserialValType = bigint;
7
7
  type BigserialConfig = Pick<ColumnConfig, "primaryKey" | "unique">;
8
8
  type BigserialInternalConfig<TConfig extends BigserialConfig> = TConfig & {
9
9
  generated: "BY DEFAULT";
@@ -14,12 +14,12 @@ declare class BigserialColumn<TConfig extends BigserialConfig> extends Column<Bi
14
14
  constructor(config: TConfig);
15
15
  get sqlTypeScalar(): string;
16
16
  get sqlCastScalar(): null;
17
- get zodTypeScaler(): z.ZodCoercedNumber<unknown>;
18
- toDriverScalar(value: BigserialValType | Sql | null): string | number | null;
19
- toSQLScalar(value: number | Sql | null): string;
20
- fromDriverScalar(value: number | string | null): BigserialValType | null;
17
+ get zodTypeScaler(): z.ZodCoercedBigInt<unknown>;
18
+ toDriverScalar(value: BigserialValType | Sql | null): string | null;
19
+ toSQLScalar(value: BigserialValType | Sql | null): string;
20
+ fromDriverScalar(value: BigserialValType | string | null): BigserialValType | null;
21
21
  }
22
- /** Creates a `bigserial` column. Auto-incrementing 64-bit integer, implicitly `NOT NULL`. Maps to `number`. */
22
+ /** Creates a `bigserial` column. Auto-incrementing 64-bit integer, implicitly `NOT NULL`. Maps to `bigint`. */
23
23
  declare function bigserial<TConfig extends BigserialConfig>(config: TConfig): BigserialColumn<TConfig>;
24
24
  //#endregion
25
25
  export { bigserial };
@@ -14,11 +14,11 @@ var BigserialColumn = class extends Column {
14
14
  return null;
15
15
  }
16
16
  get zodTypeScaler() {
17
- return z.coerce.number();
17
+ return z.coerce.bigint();
18
18
  }
19
19
  toDriverScalar(value) {
20
20
  if (value === null) return null;
21
- return value instanceof Sql ? value.string : value;
21
+ return value instanceof Sql ? value.string : value.toString();
22
22
  }
23
23
  toSQLScalar(value) {
24
24
  if (value === null) return "NULL";
@@ -27,10 +27,10 @@ var BigserialColumn = class extends Column {
27
27
  }
28
28
  fromDriverScalar(value) {
29
29
  if (value === null) return null;
30
- return typeof value === "string" ? parseInt(value, 10) : value;
30
+ return BigInt(value);
31
31
  }
32
32
  };
33
- /** Creates a `bigserial` column. Auto-incrementing 64-bit integer, implicitly `NOT NULL`. Maps to `number`. */
33
+ /** Creates a `bigserial` column. Auto-incrementing 64-bit integer, implicitly `NOT NULL`. Maps to `bigint`. */
34
34
  function bigserial(config) {
35
35
  return new BigserialColumn(config);
36
36
  }
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/boolean.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/bytea.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/char.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/cidr.d.ts
@@ -1,8 +1,8 @@
1
- import { Key } from "../types.mjs";
2
- import { Sql } from "../sql.mjs";
3
1
  import { entityType } from "../symbols.mjs";
4
- import { Arg } from "../query-builders/pre.mjs";
2
+ import { Key } from "../types.mjs";
5
3
  import { StdTableColumn, TableColumn } from "../table.mjs";
4
+ import { Arg } from "../query-builders/pre.mjs";
5
+ import { Sql } from "../sql.mjs";
6
6
  import * as z from "zod";
7
7
 
8
8
  //#region src/columns/common.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/date.d.ts
@@ -1,6 +1,6 @@
1
- import { Sql } from "../sql.mjs";
2
- import { Enum } from "../enumtype.mjs";
3
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Enum } from "../enumtype.mjs";
3
+ import { Sql } from "../sql.mjs";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/columns/enum.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/inet.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/integer.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/json.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/jsonb.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/macaddr.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/numeric.d.ts
@@ -1,6 +1,6 @@
1
1
  import { SelfOrReadonly } from "../../../types.mjs";
2
- import { Sql } from "../../../sql.mjs";
3
2
  import { Column, ColumnConfig } from "../../common.mjs";
3
+ import { Sql } from "../../../sql.mjs";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/columns/postgis/geography/linestring.d.ts
@@ -1,6 +1,6 @@
1
1
  import { SelfOrReadonly } from "../../../types.mjs";
2
- import { Sql } from "../../../sql.mjs";
3
2
  import { Column, ColumnConfig } from "../../common.mjs";
3
+ import { Sql } from "../../../sql.mjs";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/columns/postgis/geography/multilinestring.d.ts
@@ -1,6 +1,6 @@
1
1
  import { SelfOrReadonly } from "../../../types.mjs";
2
- import { Sql } from "../../../sql.mjs";
3
2
  import { Column, ColumnConfig } from "../../common.mjs";
3
+ import { Sql } from "../../../sql.mjs";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/columns/postgis/geography/multipoint.d.ts
@@ -1,6 +1,6 @@
1
1
  import { SelfOrReadonly } from "../../../types.mjs";
2
- import { Sql } from "../../../sql.mjs";
3
2
  import { Column, ColumnConfig } from "../../common.mjs";
3
+ import { Sql } from "../../../sql.mjs";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/columns/postgis/geography/multipolygon.d.ts
@@ -1,6 +1,6 @@
1
1
  import { SelfOrReadonly } from "../../../types.mjs";
2
- import { Sql } from "../../../sql.mjs";
3
2
  import { Column, ColumnConfig } from "../../common.mjs";
3
+ import { Sql } from "../../../sql.mjs";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/columns/postgis/geography/point.d.ts
@@ -1,6 +1,6 @@
1
1
  import { SelfOrReadonly } from "../../../types.mjs";
2
- import { Sql } from "../../../sql.mjs";
3
2
  import { Column, ColumnConfig } from "../../common.mjs";
3
+ import { Sql } from "../../../sql.mjs";
4
4
  import * as z from "zod";
5
5
 
6
6
  //#region src/columns/postgis/geography/polygon.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/serial.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/smallint.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/smallserial.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/text.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/time.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/timestamp.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/uuid.d.ts
@@ -1,5 +1,5 @@
1
- import { Sql } from "../sql.mjs";
2
1
  import { Column, ColumnConfig } from "./common.mjs";
2
+ import { Sql } from "../sql.mjs";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/columns/varchar.d.ts