Initial commit

This commit is contained in:
Ammaar Reshi
2025-01-04 14:06:53 +00:00
parent 7082408604
commit d6025af146
23760 changed files with 3299690 additions and 0 deletions

32
node_modules/drizzle-orm/pg-core/alias.cjs generated vendored Normal file
View File

@ -0,0 +1,32 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var alias_exports = {};
__export(alias_exports, {
alias: () => alias
});
module.exports = __toCommonJS(alias_exports);
var import_alias = require("../alias.cjs");
function alias(table, alias2) {
return new Proxy(table, new import_alias.TableAliasProxyHandler(alias2, false));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
alias
});
//# sourceMappingURL=alias.cjs.map

1
node_modules/drizzle-orm/pg-core/alias.cjs.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-core/alias.ts"],"sourcesContent":["import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { PgTable } from './table.ts';\nimport type { PgViewBase } from './view-base.ts';\n\nexport function alias<TTable extends PgTable | PgViewBase, TAlias extends string>(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable<TTable, TAlias> {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAMhC,SAAS,MACf,OACAA,QACkC;AAClC,SAAO,IAAI,MAAM,OAAO,IAAI,oCAAuBA,QAAO,KAAK,CAAC;AACjE;","names":["alias"]}

4
node_modules/drizzle-orm/pg-core/alias.d.cts generated vendored Normal file
View File

@ -0,0 +1,4 @@
import type { BuildAliasTable } from "./query-builders/select.types.cjs";
import type { PgTable } from "./table.cjs";
import type { PgViewBase } from "./view-base.cjs";
export declare function alias<TTable extends PgTable | PgViewBase, TAlias extends string>(table: TTable, alias: TAlias): BuildAliasTable<TTable, TAlias>;

4
node_modules/drizzle-orm/pg-core/alias.d.ts generated vendored Normal file
View File

@ -0,0 +1,4 @@
import type { BuildAliasTable } from "./query-builders/select.types.js";
import type { PgTable } from "./table.js";
import type { PgViewBase } from "./view-base.js";
export declare function alias<TTable extends PgTable | PgViewBase, TAlias extends string>(table: TTable, alias: TAlias): BuildAliasTable<TTable, TAlias>;

8
node_modules/drizzle-orm/pg-core/alias.js generated vendored Normal file
View File

@ -0,0 +1,8 @@
import { TableAliasProxyHandler } from "../alias.js";
function alias(table, alias2) {
return new Proxy(table, new TableAliasProxyHandler(alias2, false));
}
export {
alias
};
//# sourceMappingURL=alias.js.map

1
node_modules/drizzle-orm/pg-core/alias.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-core/alias.ts"],"sourcesContent":["import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { PgTable } from './table.ts';\nimport type { PgViewBase } from './view-base.ts';\n\nexport function alias<TTable extends PgTable | PgViewBase, TAlias extends string>(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable<TTable, TAlias> {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n"],"mappings":"AAAA,SAAS,8BAA8B;AAMhC,SAAS,MACf,OACAA,QACkC;AAClC,SAAO,IAAI,MAAM,OAAO,IAAI,uBAAuBA,QAAO,KAAK,CAAC;AACjE;","names":["alias"]}

58
node_modules/drizzle-orm/pg-core/checks.cjs generated vendored Normal file
View File

@ -0,0 +1,58 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var checks_exports = {};
__export(checks_exports, {
Check: () => Check,
CheckBuilder: () => CheckBuilder,
check: () => check
});
module.exports = __toCommonJS(checks_exports);
var import_entity = require("../entity.cjs");
class CheckBuilder {
constructor(name, value) {
this.name = name;
this.value = value;
}
static [import_entity.entityKind] = "PgCheckBuilder";
brand;
/** @internal */
build(table) {
return new Check(table, this);
}
}
class Check {
constructor(table, builder) {
this.table = table;
this.name = builder.name;
this.value = builder.value;
}
static [import_entity.entityKind] = "PgCheck";
name;
value;
}
function check(name, value) {
return new CheckBuilder(name, value);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Check,
CheckBuilder,
check
});
//# sourceMappingURL=checks.cjs.map

1
node_modules/drizzle-orm/pg-core/checks.cjs.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-core/checks.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'PgCheckBuilder';\n\n\tprotected brand!: 'PgConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\t/** @internal */\n\tbuild(table: PgTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'PgCheck';\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: PgTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAIpB,MAAM,aAAa;AAAA,EAKzB,YAAmB,MAAqB,OAAY;AAAjC;AAAqB;AAAA,EAAa;AAAA,EAJrD,QAAiB,wBAAU,IAAY;AAAA,EAE7B;AAAA;AAAA,EAKV,MAAM,OAAuB;AAC5B,WAAO,IAAI,MAAM,OAAO,IAAI;AAAA,EAC7B;AACD;AAEO,MAAM,MAAM;AAAA,EAMlB,YAAmB,OAAgB,SAAuB;AAAvC;AAClB,SAAK,OAAO,QAAQ;AACpB,SAAK,QAAQ,QAAQ;AAAA,EACtB;AAAA,EARA,QAAiB,wBAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAMV;AAEO,SAAS,MAAM,MAAc,OAA0B;AAC7D,SAAO,IAAI,aAAa,MAAM,KAAK;AACpC;","names":[]}

18
node_modules/drizzle-orm/pg-core/checks.d.cts generated vendored Normal file
View File

@ -0,0 +1,18 @@
import { entityKind } from "../entity.cjs";
import type { SQL } from "../sql/index.cjs";
import type { PgTable } from "./table.cjs";
export declare class CheckBuilder {
name: string;
value: SQL;
static readonly [entityKind]: string;
protected brand: 'PgConstraintBuilder';
constructor(name: string, value: SQL);
}
export declare class Check {
table: PgTable;
static readonly [entityKind]: string;
readonly name: string;
readonly value: SQL;
constructor(table: PgTable, builder: CheckBuilder);
}
export declare function check(name: string, value: SQL): CheckBuilder;

18
node_modules/drizzle-orm/pg-core/checks.d.ts generated vendored Normal file
View File

@ -0,0 +1,18 @@
import { entityKind } from "../entity.js";
import type { SQL } from "../sql/index.js";
import type { PgTable } from "./table.js";
export declare class CheckBuilder {
name: string;
value: SQL;
static readonly [entityKind]: string;
protected brand: 'PgConstraintBuilder';
constructor(name: string, value: SQL);
}
export declare class Check {
table: PgTable;
static readonly [entityKind]: string;
readonly name: string;
readonly value: SQL;
constructor(table: PgTable, builder: CheckBuilder);
}
export declare function check(name: string, value: SQL): CheckBuilder;

32
node_modules/drizzle-orm/pg-core/checks.js generated vendored Normal file
View File

@ -0,0 +1,32 @@
import { entityKind } from "../entity.js";
class CheckBuilder {
constructor(name, value) {
this.name = name;
this.value = value;
}
static [entityKind] = "PgCheckBuilder";
brand;
/** @internal */
build(table) {
return new Check(table, this);
}
}
class Check {
constructor(table, builder) {
this.table = table;
this.name = builder.name;
this.value = builder.value;
}
static [entityKind] = "PgCheck";
name;
value;
}
function check(name, value) {
return new CheckBuilder(name, value);
}
export {
Check,
CheckBuilder,
check
};
//# sourceMappingURL=checks.js.map

1
node_modules/drizzle-orm/pg-core/checks.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-core/checks.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/index.ts';\nimport type { PgTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'PgCheckBuilder';\n\n\tprotected brand!: 'PgConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\t/** @internal */\n\tbuild(table: PgTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'PgCheck';\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: PgTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAIpB,MAAM,aAAa;AAAA,EAKzB,YAAmB,MAAqB,OAAY;AAAjC;AAAqB;AAAA,EAAa;AAAA,EAJrD,QAAiB,UAAU,IAAY;AAAA,EAE7B;AAAA;AAAA,EAKV,MAAM,OAAuB;AAC5B,WAAO,IAAI,MAAM,OAAO,IAAI;AAAA,EAC7B;AACD;AAEO,MAAM,MAAM;AAAA,EAMlB,YAAmB,OAAgB,SAAuB;AAAvC;AAClB,SAAK,OAAO,QAAQ;AACpB,SAAK,QAAQ,QAAQ;AAAA,EACtB;AAAA,EARA,QAAiB,UAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAMV;AAEO,SAAS,MAAM,MAAc,OAA0B;AAC7D,SAAO,IAAI,aAAa,MAAM,KAAK;AACpC;","names":[]}

96
node_modules/drizzle-orm/pg-core/columns/all.cjs generated vendored Normal file
View File

@ -0,0 +1,96 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var all_exports = {};
__export(all_exports, {
getPgColumnBuilders: () => getPgColumnBuilders
});
module.exports = __toCommonJS(all_exports);
var import_bigint = require("./bigint.cjs");
var import_bigserial = require("./bigserial.cjs");
var import_boolean = require("./boolean.cjs");
var import_char = require("./char.cjs");
var import_cidr = require("./cidr.cjs");
var import_custom = require("./custom.cjs");
var import_date = require("./date.cjs");
var import_double_precision = require("./double-precision.cjs");
var import_inet = require("./inet.cjs");
var import_integer = require("./integer.cjs");
var import_interval = require("./interval.cjs");
var import_json = require("./json.cjs");
var import_jsonb = require("./jsonb.cjs");
var import_line = require("./line.cjs");
var import_macaddr = require("./macaddr.cjs");
var import_macaddr8 = require("./macaddr8.cjs");
var import_numeric = require("./numeric.cjs");
var import_point = require("./point.cjs");
var import_geometry = require("./postgis_extension/geometry.cjs");
var import_real = require("./real.cjs");
var import_serial = require("./serial.cjs");
var import_smallint = require("./smallint.cjs");
var import_smallserial = require("./smallserial.cjs");
var import_text = require("./text.cjs");
var import_time = require("./time.cjs");
var import_timestamp = require("./timestamp.cjs");
var import_uuid = require("./uuid.cjs");
var import_varchar = require("./varchar.cjs");
var import_bit = require("./vector_extension/bit.cjs");
var import_halfvec = require("./vector_extension/halfvec.cjs");
var import_sparsevec = require("./vector_extension/sparsevec.cjs");
var import_vector = require("./vector_extension/vector.cjs");
function getPgColumnBuilders() {
return {
bigint: import_bigint.bigint,
bigserial: import_bigserial.bigserial,
boolean: import_boolean.boolean,
char: import_char.char,
cidr: import_cidr.cidr,
customType: import_custom.customType,
date: import_date.date,
doublePrecision: import_double_precision.doublePrecision,
inet: import_inet.inet,
integer: import_integer.integer,
interval: import_interval.interval,
json: import_json.json,
jsonb: import_jsonb.jsonb,
line: import_line.line,
macaddr: import_macaddr.macaddr,
macaddr8: import_macaddr8.macaddr8,
numeric: import_numeric.numeric,
point: import_point.point,
geometry: import_geometry.geometry,
real: import_real.real,
serial: import_serial.serial,
smallint: import_smallint.smallint,
smallserial: import_smallserial.smallserial,
text: import_text.text,
time: import_time.time,
timestamp: import_timestamp.timestamp,
uuid: import_uuid.uuid,
varchar: import_varchar.varchar,
bit: import_bit.bit,
halfvec: import_halfvec.halfvec,
sparsevec: import_sparsevec.sparsevec,
vector: import_vector.vector
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getPgColumnBuilders
});
//# sourceMappingURL=all.cjs.map

1
node_modules/drizzle-orm/pg-core/columns/all.cjs.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/all.ts"],"sourcesContent":["import { bigint } from './bigint.ts';\nimport { bigserial } from './bigserial.ts';\nimport { boolean } from './boolean.ts';\nimport { char } from './char.ts';\nimport { cidr } from './cidr.ts';\nimport { customType } from './custom.ts';\nimport { date } from './date.ts';\nimport { doublePrecision } from './double-precision.ts';\nimport { inet } from './inet.ts';\nimport { integer } from './integer.ts';\nimport { interval } from './interval.ts';\nimport { json } from './json.ts';\nimport { jsonb } from './jsonb.ts';\nimport { line } from './line.ts';\nimport { macaddr } from './macaddr.ts';\nimport { macaddr8 } from './macaddr8.ts';\nimport { numeric } from './numeric.ts';\nimport { point } from './point.ts';\nimport { geometry } from './postgis_extension/geometry.ts';\nimport { real } from './real.ts';\nimport { serial } from './serial.ts';\nimport { smallint } from './smallint.ts';\nimport { smallserial } from './smallserial.ts';\nimport { text } from './text.ts';\nimport { time } from './time.ts';\nimport { timestamp } from './timestamp.ts';\nimport { uuid } from './uuid.ts';\nimport { varchar } from './varchar.ts';\nimport { bit } from './vector_extension/bit.ts';\nimport { halfvec } from './vector_extension/halfvec.ts';\nimport { sparsevec } from './vector_extension/sparsevec.ts';\nimport { vector } from './vector_extension/vector.ts';\n\nexport function getPgColumnBuilders() {\n\treturn {\n\t\tbigint,\n\t\tbigserial,\n\t\tboolean,\n\t\tchar,\n\t\tcidr,\n\t\tcustomType,\n\t\tdate,\n\t\tdoublePrecision,\n\t\tinet,\n\t\tinteger,\n\t\tinterval,\n\t\tjson,\n\t\tjsonb,\n\t\tline,\n\t\tmacaddr,\n\t\tmacaddr8,\n\t\tnumeric,\n\t\tpoint,\n\t\tgeometry,\n\t\treal,\n\t\tserial,\n\t\tsmallint,\n\t\tsmallserial,\n\t\ttext,\n\t\ttime,\n\t\ttimestamp,\n\t\tuuid,\n\t\tvarchar,\n\t\tbit,\n\t\thalfvec,\n\t\tsparsevec,\n\t\tvector,\n\t};\n}\n\nexport type PgColumnsBuilders = ReturnType<typeof getPgColumnBuilders>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AACvB,uBAA0B;AAC1B,qBAAwB;AACxB,kBAAqB;AACrB,kBAAqB;AACrB,oBAA2B;AAC3B,kBAAqB;AACrB,8BAAgC;AAChC,kBAAqB;AACrB,qBAAwB;AACxB,sBAAyB;AACzB,kBAAqB;AACrB,mBAAsB;AACtB,kBAAqB;AACrB,qBAAwB;AACxB,sBAAyB;AACzB,qBAAwB;AACxB,mBAAsB;AACtB,sBAAyB;AACzB,kBAAqB;AACrB,oBAAuB;AACvB,sBAAyB;AACzB,yBAA4B;AAC5B,kBAAqB;AACrB,kBAAqB;AACrB,uBAA0B;AAC1B,kBAAqB;AACrB,qBAAwB;AACxB,iBAAoB;AACpB,qBAAwB;AACxB,uBAA0B;AAC1B,oBAAuB;AAEhB,SAAS,sBAAsB;AACrC,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":[]}

67
node_modules/drizzle-orm/pg-core/columns/all.d.cts generated vendored Normal file
View File

@ -0,0 +1,67 @@
import { bigint } from "./bigint.cjs";
import { bigserial } from "./bigserial.cjs";
import { boolean } from "./boolean.cjs";
import { char } from "./char.cjs";
import { cidr } from "./cidr.cjs";
import { customType } from "./custom.cjs";
import { date } from "./date.cjs";
import { doublePrecision } from "./double-precision.cjs";
import { inet } from "./inet.cjs";
import { integer } from "./integer.cjs";
import { interval } from "./interval.cjs";
import { json } from "./json.cjs";
import { jsonb } from "./jsonb.cjs";
import { line } from "./line.cjs";
import { macaddr } from "./macaddr.cjs";
import { macaddr8 } from "./macaddr8.cjs";
import { numeric } from "./numeric.cjs";
import { point } from "./point.cjs";
import { geometry } from "./postgis_extension/geometry.cjs";
import { real } from "./real.cjs";
import { serial } from "./serial.cjs";
import { smallint } from "./smallint.cjs";
import { smallserial } from "./smallserial.cjs";
import { text } from "./text.cjs";
import { time } from "./time.cjs";
import { timestamp } from "./timestamp.cjs";
import { uuid } from "./uuid.cjs";
import { varchar } from "./varchar.cjs";
import { bit } from "./vector_extension/bit.cjs";
import { halfvec } from "./vector_extension/halfvec.cjs";
import { sparsevec } from "./vector_extension/sparsevec.cjs";
import { vector } from "./vector_extension/vector.cjs";
export declare function getPgColumnBuilders(): {
bigint: typeof bigint;
bigserial: typeof bigserial;
boolean: typeof boolean;
char: typeof char;
cidr: typeof cidr;
customType: typeof customType;
date: typeof date;
doublePrecision: typeof doublePrecision;
inet: typeof inet;
integer: typeof integer;
interval: typeof interval;
json: typeof json;
jsonb: typeof jsonb;
line: typeof line;
macaddr: typeof macaddr;
macaddr8: typeof macaddr8;
numeric: typeof numeric;
point: typeof point;
geometry: typeof geometry;
real: typeof real;
serial: typeof serial;
smallint: typeof smallint;
smallserial: typeof smallserial;
text: typeof text;
time: typeof time;
timestamp: typeof timestamp;
uuid: typeof uuid;
varchar: typeof varchar;
bit: typeof bit;
halfvec: typeof halfvec;
sparsevec: typeof sparsevec;
vector: typeof vector;
};
export type PgColumnsBuilders = ReturnType<typeof getPgColumnBuilders>;

67
node_modules/drizzle-orm/pg-core/columns/all.d.ts generated vendored Normal file
View File

@ -0,0 +1,67 @@
import { bigint } from "./bigint.js";
import { bigserial } from "./bigserial.js";
import { boolean } from "./boolean.js";
import { char } from "./char.js";
import { cidr } from "./cidr.js";
import { customType } from "./custom.js";
import { date } from "./date.js";
import { doublePrecision } from "./double-precision.js";
import { inet } from "./inet.js";
import { integer } from "./integer.js";
import { interval } from "./interval.js";
import { json } from "./json.js";
import { jsonb } from "./jsonb.js";
import { line } from "./line.js";
import { macaddr } from "./macaddr.js";
import { macaddr8 } from "./macaddr8.js";
import { numeric } from "./numeric.js";
import { point } from "./point.js";
import { geometry } from "./postgis_extension/geometry.js";
import { real } from "./real.js";
import { serial } from "./serial.js";
import { smallint } from "./smallint.js";
import { smallserial } from "./smallserial.js";
import { text } from "./text.js";
import { time } from "./time.js";
import { timestamp } from "./timestamp.js";
import { uuid } from "./uuid.js";
import { varchar } from "./varchar.js";
import { bit } from "./vector_extension/bit.js";
import { halfvec } from "./vector_extension/halfvec.js";
import { sparsevec } from "./vector_extension/sparsevec.js";
import { vector } from "./vector_extension/vector.js";
export declare function getPgColumnBuilders(): {
bigint: typeof bigint;
bigserial: typeof bigserial;
boolean: typeof boolean;
char: typeof char;
cidr: typeof cidr;
customType: typeof customType;
date: typeof date;
doublePrecision: typeof doublePrecision;
inet: typeof inet;
integer: typeof integer;
interval: typeof interval;
json: typeof json;
jsonb: typeof jsonb;
line: typeof line;
macaddr: typeof macaddr;
macaddr8: typeof macaddr8;
numeric: typeof numeric;
point: typeof point;
geometry: typeof geometry;
real: typeof real;
serial: typeof serial;
smallint: typeof smallint;
smallserial: typeof smallserial;
text: typeof text;
time: typeof time;
timestamp: typeof timestamp;
uuid: typeof uuid;
varchar: typeof varchar;
bit: typeof bit;
halfvec: typeof halfvec;
sparsevec: typeof sparsevec;
vector: typeof vector;
};
export type PgColumnsBuilders = ReturnType<typeof getPgColumnBuilders>;

72
node_modules/drizzle-orm/pg-core/columns/all.js generated vendored Normal file
View File

@ -0,0 +1,72 @@
import { bigint } from "./bigint.js";
import { bigserial } from "./bigserial.js";
import { boolean } from "./boolean.js";
import { char } from "./char.js";
import { cidr } from "./cidr.js";
import { customType } from "./custom.js";
import { date } from "./date.js";
import { doublePrecision } from "./double-precision.js";
import { inet } from "./inet.js";
import { integer } from "./integer.js";
import { interval } from "./interval.js";
import { json } from "./json.js";
import { jsonb } from "./jsonb.js";
import { line } from "./line.js";
import { macaddr } from "./macaddr.js";
import { macaddr8 } from "./macaddr8.js";
import { numeric } from "./numeric.js";
import { point } from "./point.js";
import { geometry } from "./postgis_extension/geometry.js";
import { real } from "./real.js";
import { serial } from "./serial.js";
import { smallint } from "./smallint.js";
import { smallserial } from "./smallserial.js";
import { text } from "./text.js";
import { time } from "./time.js";
import { timestamp } from "./timestamp.js";
import { uuid } from "./uuid.js";
import { varchar } from "./varchar.js";
import { bit } from "./vector_extension/bit.js";
import { halfvec } from "./vector_extension/halfvec.js";
import { sparsevec } from "./vector_extension/sparsevec.js";
import { vector } from "./vector_extension/vector.js";
function getPgColumnBuilders() {
return {
bigint,
bigserial,
boolean,
char,
cidr,
customType,
date,
doublePrecision,
inet,
integer,
interval,
json,
jsonb,
line,
macaddr,
macaddr8,
numeric,
point,
geometry,
real,
serial,
smallint,
smallserial,
text,
time,
timestamp,
uuid,
varchar,
bit,
halfvec,
sparsevec,
vector
};
}
export {
getPgColumnBuilders
};
//# sourceMappingURL=all.js.map

1
node_modules/drizzle-orm/pg-core/columns/all.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/all.ts"],"sourcesContent":["import { bigint } from './bigint.ts';\nimport { bigserial } from './bigserial.ts';\nimport { boolean } from './boolean.ts';\nimport { char } from './char.ts';\nimport { cidr } from './cidr.ts';\nimport { customType } from './custom.ts';\nimport { date } from './date.ts';\nimport { doublePrecision } from './double-precision.ts';\nimport { inet } from './inet.ts';\nimport { integer } from './integer.ts';\nimport { interval } from './interval.ts';\nimport { json } from './json.ts';\nimport { jsonb } from './jsonb.ts';\nimport { line } from './line.ts';\nimport { macaddr } from './macaddr.ts';\nimport { macaddr8 } from './macaddr8.ts';\nimport { numeric } from './numeric.ts';\nimport { point } from './point.ts';\nimport { geometry } from './postgis_extension/geometry.ts';\nimport { real } from './real.ts';\nimport { serial } from './serial.ts';\nimport { smallint } from './smallint.ts';\nimport { smallserial } from './smallserial.ts';\nimport { text } from './text.ts';\nimport { time } from './time.ts';\nimport { timestamp } from './timestamp.ts';\nimport { uuid } from './uuid.ts';\nimport { varchar } from './varchar.ts';\nimport { bit } from './vector_extension/bit.ts';\nimport { halfvec } from './vector_extension/halfvec.ts';\nimport { sparsevec } from './vector_extension/sparsevec.ts';\nimport { vector } from './vector_extension/vector.ts';\n\nexport function getPgColumnBuilders() {\n\treturn {\n\t\tbigint,\n\t\tbigserial,\n\t\tboolean,\n\t\tchar,\n\t\tcidr,\n\t\tcustomType,\n\t\tdate,\n\t\tdoublePrecision,\n\t\tinet,\n\t\tinteger,\n\t\tinterval,\n\t\tjson,\n\t\tjsonb,\n\t\tline,\n\t\tmacaddr,\n\t\tmacaddr8,\n\t\tnumeric,\n\t\tpoint,\n\t\tgeometry,\n\t\treal,\n\t\tserial,\n\t\tsmallint,\n\t\tsmallserial,\n\t\ttext,\n\t\ttime,\n\t\ttimestamp,\n\t\tuuid,\n\t\tvarchar,\n\t\tbit,\n\t\thalfvec,\n\t\tsparsevec,\n\t\tvector,\n\t};\n}\n\nexport type PgColumnsBuilders = ReturnType<typeof getPgColumnBuilders>;\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,WAAW;AACpB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AAEhB,SAAS,sBAAsB;AACrC,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":[]}

92
node_modules/drizzle-orm/pg-core/columns/bigint.cjs generated vendored Normal file
View File

@ -0,0 +1,92 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var bigint_exports = {};
__export(bigint_exports, {
PgBigInt53: () => PgBigInt53,
PgBigInt53Builder: () => PgBigInt53Builder,
PgBigInt64: () => PgBigInt64,
PgBigInt64Builder: () => PgBigInt64Builder,
bigint: () => bigint
});
module.exports = __toCommonJS(bigint_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
var import_int_common = require("./int.common.cjs");
class PgBigInt53Builder extends import_int_common.PgIntColumnBaseBuilder {
static [import_entity.entityKind] = "PgBigInt53Builder";
constructor(name) {
super(name, "number", "PgBigInt53");
}
/** @internal */
build(table) {
return new PgBigInt53(table, this.config);
}
}
class PgBigInt53 extends import_common.PgColumn {
static [import_entity.entityKind] = "PgBigInt53";
getSQLType() {
return "bigint";
}
mapFromDriverValue(value) {
if (typeof value === "number") {
return value;
}
return Number(value);
}
}
class PgBigInt64Builder extends import_int_common.PgIntColumnBaseBuilder {
static [import_entity.entityKind] = "PgBigInt64Builder";
constructor(name) {
super(name, "bigint", "PgBigInt64");
}
/** @internal */
build(table) {
return new PgBigInt64(
table,
this.config
);
}
}
class PgBigInt64 extends import_common.PgColumn {
static [import_entity.entityKind] = "PgBigInt64";
getSQLType() {
return "bigint";
}
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
mapFromDriverValue(value) {
return BigInt(value);
}
}
function bigint(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
if (config.mode === "number") {
return new PgBigInt53Builder(name);
}
return new PgBigInt64Builder(name);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgBigInt53,
PgBigInt53Builder,
PgBigInt64,
PgBigInt64Builder,
bigint
});
//# sourceMappingURL=bigint.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/bigint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\n\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { PgColumn } from './common.ts';\nimport { PgIntColumnBaseBuilder } from './int.common.ts';\n\nexport type PgBigInt53BuilderInitial<TName extends string> = PgBigInt53Builder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'PgBigInt53';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n}>;\n\nexport class PgBigInt53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigInt53'>>\n\textends PgIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgBigInt53Builder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'PgBigInt53');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgBigInt53<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgBigInt53<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgBigInt53<T extends ColumnBaseConfig<'number', 'PgBigInt53'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgBigInt53';\n\n\tgetSQLType(): string {\n\t\treturn 'bigint';\n\t}\n\n\toverride mapFromDriverValue(value: number | string): number {\n\t\tif (typeof value === 'number') {\n\t\t\treturn value;\n\t\t}\n\t\treturn Number(value);\n\t}\n}\n\nexport type PgBigInt64BuilderInitial<TName extends string> = PgBigInt64Builder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'PgBigInt64';\n\tdata: bigint;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigInt64'>>\n\textends PgIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgBigInt64Builder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'PgBigInt64');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgBigInt64<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgBigInt64<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgBigInt64<T extends ColumnBaseConfig<'bigint', 'PgBigInt64'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgBigInt64';\n\n\tgetSQLType(): string {\n\t\treturn 'bigint';\n\t}\n\n\t// eslint-disable-next-line unicorn/prefer-native-coercion-functions\n\toverride mapFromDriverValue(value: string): bigint {\n\t\treturn BigInt(value);\n\t}\n}\n\nexport interface PgBigIntConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {\n\tmode: T;\n}\n\nexport function bigint<TMode extends PgBigIntConfig['mode']>(\n\tconfig: PgBigIntConfig<TMode>,\n): TMode extends 'number' ? PgBigInt53BuilderInitial<''> : PgBigInt64BuilderInitial<''>;\nexport function bigint<TName extends string, TMode extends PgBigIntConfig['mode']>(\n\tname: TName,\n\tconfig: PgBigIntConfig<TMode>,\n): TMode extends 'number' ? PgBigInt53BuilderInitial<TName> : PgBigInt64BuilderInitial<TName>;\nexport function bigint(a: string | PgBigIntConfig, b?: PgBigIntConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgBigIntConfig>(a, b);\n\tif (config.mode === 'number') {\n\t\treturn new PgBigInt53Builder(name);\n\t}\n\treturn new PgBigInt64Builder(name);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAG3B,mBAAuC;AACvC,oBAAyB;AACzB,wBAAuC;AAWhC,MAAM,0BACJ,yCACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,YAAY;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI,WAA4C,OAAO,KAAK,MAA8C;AAAA,EAClH;AACD;AAEO,MAAM,mBAAuE,uBAAY;AAAA,EAC/F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO;AAAA,IACR;AACA,WAAO,OAAO,KAAK;AAAA,EACpB;AACD;AAWO,MAAM,0BACJ,yCACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,YAAY;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,mBAAuE,uBAAY;AAAA,EAC/F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA;AAAA,EAGS,mBAAmB,OAAuB;AAClD,WAAO,OAAO,KAAK;AAAA,EACpB;AACD;AAaO,SAAS,OAAO,GAA4B,GAAoB;AACtE,QAAM,EAAE,MAAM,OAAO,QAAI,qCAAuC,GAAG,CAAC;AACpE,MAAI,OAAO,SAAS,UAAU;AAC7B,WAAO,IAAI,kBAAkB,IAAI;AAAA,EAClC;AACA,SAAO,IAAI,kBAAkB,IAAI;AAClC;","names":[]}

44
node_modules/drizzle-orm/pg-core/columns/bigint.d.cts generated vendored Normal file
View File

@ -0,0 +1,44 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumn } from "./common.cjs";
import { PgIntColumnBaseBuilder } from "./int.common.cjs";
export type PgBigInt53BuilderInitial<TName extends string> = PgBigInt53Builder<{
name: TName;
dataType: 'number';
columnType: 'PgBigInt53';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class PgBigInt53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigInt53'>> extends PgIntColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBigInt53<T extends ColumnBaseConfig<'number', 'PgBigInt53'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export type PgBigInt64BuilderInitial<TName extends string> = PgBigInt64Builder<{
name: TName;
dataType: 'bigint';
columnType: 'PgBigInt64';
data: bigint;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigInt64'>> extends PgIntColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBigInt64<T extends ColumnBaseConfig<'bigint', 'PgBigInt64'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): bigint;
}
export interface PgBigIntConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {
mode: T;
}
export declare function bigint<TMode extends PgBigIntConfig['mode']>(config: PgBigIntConfig<TMode>): TMode extends 'number' ? PgBigInt53BuilderInitial<''> : PgBigInt64BuilderInitial<''>;
export declare function bigint<TName extends string, TMode extends PgBigIntConfig['mode']>(name: TName, config: PgBigIntConfig<TMode>): TMode extends 'number' ? PgBigInt53BuilderInitial<TName> : PgBigInt64BuilderInitial<TName>;

44
node_modules/drizzle-orm/pg-core/columns/bigint.d.ts generated vendored Normal file
View File

@ -0,0 +1,44 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn } from "./common.js";
import { PgIntColumnBaseBuilder } from "./int.common.js";
export type PgBigInt53BuilderInitial<TName extends string> = PgBigInt53Builder<{
name: TName;
dataType: 'number';
columnType: 'PgBigInt53';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class PgBigInt53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigInt53'>> extends PgIntColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBigInt53<T extends ColumnBaseConfig<'number', 'PgBigInt53'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export type PgBigInt64BuilderInitial<TName extends string> = PgBigInt64Builder<{
name: TName;
dataType: 'bigint';
columnType: 'PgBigInt64';
data: bigint;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigInt64'>> extends PgIntColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBigInt64<T extends ColumnBaseConfig<'bigint', 'PgBigInt64'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): bigint;
}
export interface PgBigIntConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {
mode: T;
}
export declare function bigint<TMode extends PgBigIntConfig['mode']>(config: PgBigIntConfig<TMode>): TMode extends 'number' ? PgBigInt53BuilderInitial<''> : PgBigInt64BuilderInitial<''>;
export declare function bigint<TName extends string, TMode extends PgBigIntConfig['mode']>(name: TName, config: PgBigIntConfig<TMode>): TMode extends 'number' ? PgBigInt53BuilderInitial<TName> : PgBigInt64BuilderInitial<TName>;

64
node_modules/drizzle-orm/pg-core/columns/bigint.js generated vendored Normal file
View File

@ -0,0 +1,64 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { PgColumn } from "./common.js";
import { PgIntColumnBaseBuilder } from "./int.common.js";
class PgBigInt53Builder extends PgIntColumnBaseBuilder {
static [entityKind] = "PgBigInt53Builder";
constructor(name) {
super(name, "number", "PgBigInt53");
}
/** @internal */
build(table) {
return new PgBigInt53(table, this.config);
}
}
class PgBigInt53 extends PgColumn {
static [entityKind] = "PgBigInt53";
getSQLType() {
return "bigint";
}
mapFromDriverValue(value) {
if (typeof value === "number") {
return value;
}
return Number(value);
}
}
class PgBigInt64Builder extends PgIntColumnBaseBuilder {
static [entityKind] = "PgBigInt64Builder";
constructor(name) {
super(name, "bigint", "PgBigInt64");
}
/** @internal */
build(table) {
return new PgBigInt64(
table,
this.config
);
}
}
class PgBigInt64 extends PgColumn {
static [entityKind] = "PgBigInt64";
getSQLType() {
return "bigint";
}
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
mapFromDriverValue(value) {
return BigInt(value);
}
}
function bigint(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
if (config.mode === "number") {
return new PgBigInt53Builder(name);
}
return new PgBigInt64Builder(name);
}
export {
PgBigInt53,
PgBigInt53Builder,
PgBigInt64,
PgBigInt64Builder,
bigint
};
//# sourceMappingURL=bigint.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/bigint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\n\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { PgColumn } from './common.ts';\nimport { PgIntColumnBaseBuilder } from './int.common.ts';\n\nexport type PgBigInt53BuilderInitial<TName extends string> = PgBigInt53Builder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'PgBigInt53';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n}>;\n\nexport class PgBigInt53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigInt53'>>\n\textends PgIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgBigInt53Builder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'PgBigInt53');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgBigInt53<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgBigInt53<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgBigInt53<T extends ColumnBaseConfig<'number', 'PgBigInt53'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgBigInt53';\n\n\tgetSQLType(): string {\n\t\treturn 'bigint';\n\t}\n\n\toverride mapFromDriverValue(value: number | string): number {\n\t\tif (typeof value === 'number') {\n\t\t\treturn value;\n\t\t}\n\t\treturn Number(value);\n\t}\n}\n\nexport type PgBigInt64BuilderInitial<TName extends string> = PgBigInt64Builder<{\n\tname: TName;\n\tdataType: 'bigint';\n\tcolumnType: 'PgBigInt64';\n\tdata: bigint;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigInt64'>>\n\textends PgIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgBigInt64Builder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'bigint', 'PgBigInt64');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgBigInt64<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgBigInt64<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgBigInt64<T extends ColumnBaseConfig<'bigint', 'PgBigInt64'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgBigInt64';\n\n\tgetSQLType(): string {\n\t\treturn 'bigint';\n\t}\n\n\t// eslint-disable-next-line unicorn/prefer-native-coercion-functions\n\toverride mapFromDriverValue(value: string): bigint {\n\t\treturn BigInt(value);\n\t}\n}\n\nexport interface PgBigIntConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {\n\tmode: T;\n}\n\nexport function bigint<TMode extends PgBigIntConfig['mode']>(\n\tconfig: PgBigIntConfig<TMode>,\n): TMode extends 'number' ? PgBigInt53BuilderInitial<''> : PgBigInt64BuilderInitial<''>;\nexport function bigint<TName extends string, TMode extends PgBigIntConfig['mode']>(\n\tname: TName,\n\tconfig: PgBigIntConfig<TMode>,\n): TMode extends 'number' ? PgBigInt53BuilderInitial<TName> : PgBigInt64BuilderInitial<TName>;\nexport function bigint(a: string | PgBigIntConfig, b?: PgBigIntConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgBigIntConfig>(a, b);\n\tif (config.mode === 'number') {\n\t\treturn new PgBigInt53Builder(name);\n\t}\n\treturn new PgBigInt64Builder(name);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAG3B,SAAS,8BAA8B;AACvC,SAAS,gBAAgB;AACzB,SAAS,8BAA8B;AAWhC,MAAM,0BACJ,uBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,YAAY;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI,WAA4C,OAAO,KAAK,MAA8C;AAAA,EAClH;AACD;AAEO,MAAM,mBAAuE,SAAY;AAAA,EAC/F,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO;AAAA,IACR;AACA,WAAO,OAAO,KAAK;AAAA,EACpB;AACD;AAWO,MAAM,0BACJ,uBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,YAAY;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,mBAAuE,SAAY;AAAA,EAC/F,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA;AAAA,EAGS,mBAAmB,OAAuB;AAClD,WAAO,OAAO,KAAK;AAAA,EACpB;AACD;AAaO,SAAS,OAAO,GAA4B,GAAoB;AACtE,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAuC,GAAG,CAAC;AACpE,MAAI,OAAO,SAAS,UAAU;AAC7B,WAAO,IAAI,kBAAkB,IAAI;AAAA,EAClC;AACA,SAAO,IAAI,kBAAkB,IAAI;AAClC;","names":[]}

97
node_modules/drizzle-orm/pg-core/columns/bigserial.cjs generated vendored Normal file
View File

@ -0,0 +1,97 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var bigserial_exports = {};
__export(bigserial_exports, {
PgBigSerial53: () => PgBigSerial53,
PgBigSerial53Builder: () => PgBigSerial53Builder,
PgBigSerial64: () => PgBigSerial64,
PgBigSerial64Builder: () => PgBigSerial64Builder,
bigserial: () => bigserial
});
module.exports = __toCommonJS(bigserial_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class PgBigSerial53Builder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgBigSerial53Builder";
constructor(name) {
super(name, "number", "PgBigSerial53");
this.config.hasDefault = true;
this.config.notNull = true;
}
/** @internal */
build(table) {
return new PgBigSerial53(
table,
this.config
);
}
}
class PgBigSerial53 extends import_common.PgColumn {
static [import_entity.entityKind] = "PgBigSerial53";
getSQLType() {
return "bigserial";
}
mapFromDriverValue(value) {
if (typeof value === "number") {
return value;
}
return Number(value);
}
}
class PgBigSerial64Builder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgBigSerial64Builder";
constructor(name) {
super(name, "bigint", "PgBigSerial64");
this.config.hasDefault = true;
}
/** @internal */
build(table) {
return new PgBigSerial64(
table,
this.config
);
}
}
class PgBigSerial64 extends import_common.PgColumn {
static [import_entity.entityKind] = "PgBigSerial64";
getSQLType() {
return "bigserial";
}
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
mapFromDriverValue(value) {
return BigInt(value);
}
}
function bigserial(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
if (config.mode === "number") {
return new PgBigSerial53Builder(name);
}
return new PgBigSerial64Builder(name);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgBigSerial53,
PgBigSerial53Builder,
PgBigSerial64,
PgBigSerial64Builder,
bigserial
});
//# sourceMappingURL=bigserial.cjs.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,43 @@
import type { ColumnBuilderBaseConfig, HasDefault, NotNull } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgBigSerial53BuilderInitial<TName extends string> = NotNull<HasDefault<PgBigSerial53Builder<{
name: TName;
dataType: 'number';
columnType: 'PgBigSerial53';
data: number;
driverParam: number;
enumValues: undefined;
}>>>;
export declare class PgBigSerial53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigSerial53'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: string);
}
export declare class PgBigSerial53<T extends ColumnBaseConfig<'number', 'PgBigSerial53'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number): number;
}
export type PgBigSerial64BuilderInitial<TName extends string> = NotNull<HasDefault<PgBigSerial64Builder<{
name: TName;
dataType: 'bigint';
columnType: 'PgBigSerial64';
data: bigint;
driverParam: string;
enumValues: undefined;
}>>>;
export declare class PgBigSerial64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigSerial64'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: string);
}
export declare class PgBigSerial64<T extends ColumnBaseConfig<'bigint', 'PgBigSerial64'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): bigint;
}
export interface PgBigSerialConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {
mode: T;
}
export declare function bigserial<TMode extends PgBigSerialConfig['mode']>(config: PgBigSerialConfig<TMode>): TMode extends 'number' ? PgBigSerial53BuilderInitial<''> : PgBigSerial64BuilderInitial<''>;
export declare function bigserial<TName extends string, TMode extends PgBigSerialConfig['mode']>(name: TName, config: PgBigSerialConfig<TMode>): TMode extends 'number' ? PgBigSerial53BuilderInitial<TName> : PgBigSerial64BuilderInitial<TName>;

View File

@ -0,0 +1,43 @@
import type { ColumnBuilderBaseConfig, HasDefault, NotNull } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgBigSerial53BuilderInitial<TName extends string> = NotNull<HasDefault<PgBigSerial53Builder<{
name: TName;
dataType: 'number';
columnType: 'PgBigSerial53';
data: number;
driverParam: number;
enumValues: undefined;
}>>>;
export declare class PgBigSerial53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigSerial53'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: string);
}
export declare class PgBigSerial53<T extends ColumnBaseConfig<'number', 'PgBigSerial53'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number): number;
}
export type PgBigSerial64BuilderInitial<TName extends string> = NotNull<HasDefault<PgBigSerial64Builder<{
name: TName;
dataType: 'bigint';
columnType: 'PgBigSerial64';
data: bigint;
driverParam: string;
enumValues: undefined;
}>>>;
export declare class PgBigSerial64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigSerial64'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: string);
}
export declare class PgBigSerial64<T extends ColumnBaseConfig<'bigint', 'PgBigSerial64'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): bigint;
}
export interface PgBigSerialConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {
mode: T;
}
export declare function bigserial<TMode extends PgBigSerialConfig['mode']>(config: PgBigSerialConfig<TMode>): TMode extends 'number' ? PgBigSerial53BuilderInitial<''> : PgBigSerial64BuilderInitial<''>;
export declare function bigserial<TName extends string, TMode extends PgBigSerialConfig['mode']>(name: TName, config: PgBigSerialConfig<TMode>): TMode extends 'number' ? PgBigSerial53BuilderInitial<TName> : PgBigSerial64BuilderInitial<TName>;

69
node_modules/drizzle-orm/pg-core/columns/bigserial.js generated vendored Normal file
View File

@ -0,0 +1,69 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgBigSerial53Builder extends PgColumnBuilder {
static [entityKind] = "PgBigSerial53Builder";
constructor(name) {
super(name, "number", "PgBigSerial53");
this.config.hasDefault = true;
this.config.notNull = true;
}
/** @internal */
build(table) {
return new PgBigSerial53(
table,
this.config
);
}
}
class PgBigSerial53 extends PgColumn {
static [entityKind] = "PgBigSerial53";
getSQLType() {
return "bigserial";
}
mapFromDriverValue(value) {
if (typeof value === "number") {
return value;
}
return Number(value);
}
}
class PgBigSerial64Builder extends PgColumnBuilder {
static [entityKind] = "PgBigSerial64Builder";
constructor(name) {
super(name, "bigint", "PgBigSerial64");
this.config.hasDefault = true;
}
/** @internal */
build(table) {
return new PgBigSerial64(
table,
this.config
);
}
}
class PgBigSerial64 extends PgColumn {
static [entityKind] = "PgBigSerial64";
getSQLType() {
return "bigserial";
}
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
mapFromDriverValue(value) {
return BigInt(value);
}
}
function bigserial(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
if (config.mode === "number") {
return new PgBigSerial53Builder(name);
}
return new PgBigSerial64Builder(name);
}
export {
PgBigSerial53,
PgBigSerial53Builder,
PgBigSerial64,
PgBigSerial64Builder,
bigserial
};
//# sourceMappingURL=bigserial.js.map

File diff suppressed because one or more lines are too long

53
node_modules/drizzle-orm/pg-core/columns/boolean.cjs generated vendored Normal file
View File

@ -0,0 +1,53 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var boolean_exports = {};
__export(boolean_exports, {
PgBoolean: () => PgBoolean,
PgBooleanBuilder: () => PgBooleanBuilder,
boolean: () => boolean
});
module.exports = __toCommonJS(boolean_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgBooleanBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgBooleanBuilder";
constructor(name) {
super(name, "boolean", "PgBoolean");
}
/** @internal */
build(table) {
return new PgBoolean(table, this.config);
}
}
class PgBoolean extends import_common.PgColumn {
static [import_entity.entityKind] = "PgBoolean";
getSQLType() {
return "boolean";
}
}
function boolean(name) {
return new PgBooleanBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgBoolean,
PgBooleanBuilder,
boolean
});
//# sourceMappingURL=boolean.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/boolean.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgBooleanBuilderInitial<TName extends string> = PgBooleanBuilder<{\n\tname: TName;\n\tdataType: 'boolean';\n\tcolumnType: 'PgBoolean';\n\tdata: boolean;\n\tdriverParam: boolean;\n\tenumValues: undefined;\n}>;\n\nexport class PgBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'PgBoolean'>> extends PgColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgBooleanBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'boolean', 'PgBoolean');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgBoolean<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgBoolean<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgBoolean<T extends ColumnBaseConfig<'boolean', 'PgBoolean'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgBoolean';\n\n\tgetSQLType(): string {\n\t\treturn 'boolean';\n\t}\n}\n\nexport function boolean(): PgBooleanBuilderInitial<''>;\nexport function boolean<TName extends string>(name: TName): PgBooleanBuilderInitial<TName>;\nexport function boolean(name?: string) {\n\treturn new PgBooleanBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA0C;AAWnC,MAAM,yBAAoF,8BAAmB;AAAA,EACnH,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,WAAW,WAAW;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC6C;AAC7C,WAAO,IAAI,UAA2C,OAAO,KAAK,MAA8C;AAAA,EACjH;AACD;AAEO,MAAM,kBAAsE,uBAAY;AAAA,EAC9F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,QAAQ,MAAe;AACtC,SAAO,IAAI,iBAAiB,QAAQ,EAAE;AACvC;","names":[]}

22
node_modules/drizzle-orm/pg-core/columns/boolean.d.cts generated vendored Normal file
View File

@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgBooleanBuilderInitial<TName extends string> = PgBooleanBuilder<{
name: TName;
dataType: 'boolean';
columnType: 'PgBoolean';
data: boolean;
driverParam: boolean;
enumValues: undefined;
}>;
export declare class PgBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'PgBoolean'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBoolean<T extends ColumnBaseConfig<'boolean', 'PgBoolean'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function boolean(): PgBooleanBuilderInitial<''>;
export declare function boolean<TName extends string>(name: TName): PgBooleanBuilderInitial<TName>;

22
node_modules/drizzle-orm/pg-core/columns/boolean.d.ts generated vendored Normal file
View File

@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgBooleanBuilderInitial<TName extends string> = PgBooleanBuilder<{
name: TName;
dataType: 'boolean';
columnType: 'PgBoolean';
data: boolean;
driverParam: boolean;
enumValues: undefined;
}>;
export declare class PgBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'PgBoolean'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBoolean<T extends ColumnBaseConfig<'boolean', 'PgBoolean'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function boolean(): PgBooleanBuilderInitial<''>;
export declare function boolean<TName extends string>(name: TName): PgBooleanBuilderInitial<TName>;

27
node_modules/drizzle-orm/pg-core/columns/boolean.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgBooleanBuilder extends PgColumnBuilder {
static [entityKind] = "PgBooleanBuilder";
constructor(name) {
super(name, "boolean", "PgBoolean");
}
/** @internal */
build(table) {
return new PgBoolean(table, this.config);
}
}
class PgBoolean extends PgColumn {
static [entityKind] = "PgBoolean";
getSQLType() {
return "boolean";
}
}
function boolean(name) {
return new PgBooleanBuilder(name ?? "");
}
export {
PgBoolean,
PgBooleanBuilder,
boolean
};
//# sourceMappingURL=boolean.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/boolean.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgBooleanBuilderInitial<TName extends string> = PgBooleanBuilder<{\n\tname: TName;\n\tdataType: 'boolean';\n\tcolumnType: 'PgBoolean';\n\tdata: boolean;\n\tdriverParam: boolean;\n\tenumValues: undefined;\n}>;\n\nexport class PgBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'PgBoolean'>> extends PgColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgBooleanBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'boolean', 'PgBoolean');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgBoolean<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgBoolean<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgBoolean<T extends ColumnBaseConfig<'boolean', 'PgBoolean'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgBoolean';\n\n\tgetSQLType(): string {\n\t\treturn 'boolean';\n\t}\n}\n\nexport function boolean(): PgBooleanBuilderInitial<''>;\nexport function boolean<TName extends string>(name: TName): PgBooleanBuilderInitial<TName>;\nexport function boolean(name?: string) {\n\treturn new PgBooleanBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,UAAU,uBAAuB;AAWnC,MAAM,yBAAoF,gBAAmB;AAAA,EACnH,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,WAAW,WAAW;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC6C;AAC7C,WAAO,IAAI,UAA2C,OAAO,KAAK,MAA8C;AAAA,EACjH;AACD;AAEO,MAAM,kBAAsE,SAAY;AAAA,EAC9F,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,QAAQ,MAAe;AACtC,SAAO,IAAI,iBAAiB,QAAQ,EAAE;AACvC;","names":[]}

62
node_modules/drizzle-orm/pg-core/columns/char.cjs generated vendored Normal file
View File

@ -0,0 +1,62 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var char_exports = {};
__export(char_exports, {
PgChar: () => PgChar,
PgCharBuilder: () => PgCharBuilder,
char: () => char
});
module.exports = __toCommonJS(char_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class PgCharBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgCharBuilder";
constructor(name, config) {
super(name, "string", "PgChar");
this.config.length = config.length;
this.config.enumValues = config.enum;
}
/** @internal */
build(table) {
return new PgChar(
table,
this.config
);
}
}
class PgChar extends import_common.PgColumn {
static [import_entity.entityKind] = "PgChar";
length = this.config.length;
enumValues = this.config.enumValues;
getSQLType() {
return this.length === void 0 ? `char` : `char(${this.length})`;
}
}
function char(a, b = {}) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new PgCharBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgChar,
PgCharBuilder,
char
});
//# sourceMappingURL=char.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/char.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgCharBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = PgCharBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgChar';\n\tdata: TEnum[number];\n\tenumValues: TEnum;\n\tdriverParam: string;\n\tlength: TLength;\n}>;\n\nexport class PgCharBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgChar'> & { length?: number | undefined }>\n\textends PgColumnBuilder<\n\t\tT,\n\t\t{ length: T['length']; enumValues: T['enumValues'] },\n\t\t{ length: T['length'] }\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'PgCharBuilder';\n\n\tconstructor(name: T['name'], config: PgCharConfig<T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'PgChar');\n\t\tthis.config.length = config.length;\n\t\tthis.config.enumValues = config.enum;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgChar<MakeColumnConfig<T, TTableName> & { length: T['length'] }> {\n\t\treturn new PgChar<MakeColumnConfig<T, TTableName> & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgChar<T extends ColumnBaseConfig<'string', 'PgChar'> & { length?: number | undefined }>\n\textends PgColumn<T, { length: T['length']; enumValues: T['enumValues'] }, { length: T['length'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgChar';\n\n\treadonly length = this.config.length;\n\toverride readonly enumValues = this.config.enumValues;\n\n\tgetSQLType(): string {\n\t\treturn this.length === undefined ? `char` : `char(${this.length})`;\n\t}\n}\n\nexport interface PgCharConfig<\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> {\n\tenum?: TEnum;\n\tlength?: TLength;\n}\n\nexport function char(): PgCharBuilderInitial<'', [string, ...string[]], undefined>;\nexport function char<U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(\n\tconfig?: PgCharConfig<T | Writable<T>, L>,\n): PgCharBuilderInitial<'', Writable<T>, L>;\nexport function char<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n>(\n\tname: TName,\n\tconfig?: PgCharConfig<T | Writable<T>, L>,\n): PgCharBuilderInitial<TName, Writable<T>, L>;\nexport function char(a?: string | PgCharConfig, b: PgCharConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig<PgCharConfig>(a, b);\n\treturn new PgCharBuilder(name, config as any);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAsD;AACtD,oBAA0C;AAgBnC,MAAM,sBACJ,8BAKT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAoD;AAChF,UAAM,MAAM,UAAU,QAAQ;AAC9B,SAAK,OAAO,SAAS,OAAO;AAC5B,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACoE;AACpE,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,eACJ,uBACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,SAAS,KAAK,OAAO;AAAA,EACZ,aAAa,KAAK,OAAO;AAAA,EAE3C,aAAqB;AACpB,WAAO,KAAK,WAAW,SAAY,SAAS,QAAQ,KAAK,MAAM;AAAA,EAChE;AACD;AAuBO,SAAS,KAAK,GAA2B,IAAkB,CAAC,GAAQ;AAC1E,QAAM,EAAE,MAAM,OAAO,QAAI,qCAAqC,GAAG,CAAC;AAClE,SAAO,IAAI,cAAc,MAAM,MAAa;AAC7C;","names":[]}

45
node_modules/drizzle-orm/pg-core/columns/char.d.cts generated vendored Normal file
View File

@ -0,0 +1,45 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Writable } from "../../utils.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgCharBuilderInitial<TName extends string, TEnum extends [string, ...string[]], TLength extends number | undefined> = PgCharBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgChar';
data: TEnum[number];
enumValues: TEnum;
driverParam: string;
length: TLength;
}>;
export declare class PgCharBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgChar'> & {
length?: number | undefined;
}> extends PgColumnBuilder<T, {
length: T['length'];
enumValues: T['enumValues'];
}, {
length: T['length'];
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: PgCharConfig<T['enumValues'], T['length']>);
}
export declare class PgChar<T extends ColumnBaseConfig<'string', 'PgChar'> & {
length?: number | undefined;
}> extends PgColumn<T, {
length: T['length'];
enumValues: T['enumValues'];
}, {
length: T['length'];
}> {
static readonly [entityKind]: string;
readonly length: T["length"];
readonly enumValues: T["enumValues"];
getSQLType(): string;
}
export interface PgCharConfig<TEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined, TLength extends number | undefined = number | undefined> {
enum?: TEnum;
length?: TLength;
}
export declare function char(): PgCharBuilderInitial<'', [string, ...string[]], undefined>;
export declare function char<U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(config?: PgCharConfig<T | Writable<T>, L>): PgCharBuilderInitial<'', Writable<T>, L>;
export declare function char<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(name: TName, config?: PgCharConfig<T | Writable<T>, L>): PgCharBuilderInitial<TName, Writable<T>, L>;

45
node_modules/drizzle-orm/pg-core/columns/char.d.ts generated vendored Normal file
View File

@ -0,0 +1,45 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { type Writable } from "../../utils.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgCharBuilderInitial<TName extends string, TEnum extends [string, ...string[]], TLength extends number | undefined> = PgCharBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgChar';
data: TEnum[number];
enumValues: TEnum;
driverParam: string;
length: TLength;
}>;
export declare class PgCharBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgChar'> & {
length?: number | undefined;
}> extends PgColumnBuilder<T, {
length: T['length'];
enumValues: T['enumValues'];
}, {
length: T['length'];
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: PgCharConfig<T['enumValues'], T['length']>);
}
export declare class PgChar<T extends ColumnBaseConfig<'string', 'PgChar'> & {
length?: number | undefined;
}> extends PgColumn<T, {
length: T['length'];
enumValues: T['enumValues'];
}, {
length: T['length'];
}> {
static readonly [entityKind]: string;
readonly length: T["length"];
readonly enumValues: T["enumValues"];
getSQLType(): string;
}
export interface PgCharConfig<TEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined, TLength extends number | undefined = number | undefined> {
enum?: TEnum;
length?: TLength;
}
export declare function char(): PgCharBuilderInitial<'', [string, ...string[]], undefined>;
export declare function char<U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(config?: PgCharConfig<T | Writable<T>, L>): PgCharBuilderInitial<'', Writable<T>, L>;
export declare function char<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(name: TName, config?: PgCharConfig<T | Writable<T>, L>): PgCharBuilderInitial<TName, Writable<T>, L>;

36
node_modules/drizzle-orm/pg-core/columns/char.js generated vendored Normal file
View File

@ -0,0 +1,36 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgCharBuilder extends PgColumnBuilder {
static [entityKind] = "PgCharBuilder";
constructor(name, config) {
super(name, "string", "PgChar");
this.config.length = config.length;
this.config.enumValues = config.enum;
}
/** @internal */
build(table) {
return new PgChar(
table,
this.config
);
}
}
class PgChar extends PgColumn {
static [entityKind] = "PgChar";
length = this.config.length;
enumValues = this.config.enumValues;
getSQLType() {
return this.length === void 0 ? `char` : `char(${this.length})`;
}
}
function char(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new PgCharBuilder(name, config);
}
export {
PgChar,
PgCharBuilder,
char
};
//# sourceMappingURL=char.js.map

1
node_modules/drizzle-orm/pg-core/columns/char.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/char.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgCharBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = PgCharBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgChar';\n\tdata: TEnum[number];\n\tenumValues: TEnum;\n\tdriverParam: string;\n\tlength: TLength;\n}>;\n\nexport class PgCharBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgChar'> & { length?: number | undefined }>\n\textends PgColumnBuilder<\n\t\tT,\n\t\t{ length: T['length']; enumValues: T['enumValues'] },\n\t\t{ length: T['length'] }\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'PgCharBuilder';\n\n\tconstructor(name: T['name'], config: PgCharConfig<T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'PgChar');\n\t\tthis.config.length = config.length;\n\t\tthis.config.enumValues = config.enum;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgChar<MakeColumnConfig<T, TTableName> & { length: T['length'] }> {\n\t\treturn new PgChar<MakeColumnConfig<T, TTableName> & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgChar<T extends ColumnBaseConfig<'string', 'PgChar'> & { length?: number | undefined }>\n\textends PgColumn<T, { length: T['length']; enumValues: T['enumValues'] }, { length: T['length'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgChar';\n\n\treadonly length = this.config.length;\n\toverride readonly enumValues = this.config.enumValues;\n\n\tgetSQLType(): string {\n\t\treturn this.length === undefined ? `char` : `char(${this.length})`;\n\t}\n}\n\nexport interface PgCharConfig<\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> {\n\tenum?: TEnum;\n\tlength?: TLength;\n}\n\nexport function char(): PgCharBuilderInitial<'', [string, ...string[]], undefined>;\nexport function char<U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(\n\tconfig?: PgCharConfig<T | Writable<T>, L>,\n): PgCharBuilderInitial<'', Writable<T>, L>;\nexport function char<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n>(\n\tname: TName,\n\tconfig?: PgCharConfig<T | Writable<T>, L>,\n): PgCharBuilderInitial<TName, Writable<T>, L>;\nexport function char(a?: string | PgCharConfig, b: PgCharConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig<PgCharConfig>(a, b);\n\treturn new PgCharBuilder(name, config as any);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA6C;AACtD,SAAS,UAAU,uBAAuB;AAgBnC,MAAM,sBACJ,gBAKT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAoD;AAChF,UAAM,MAAM,UAAU,QAAQ;AAC9B,SAAK,OAAO,SAAS,OAAO;AAC5B,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACoE;AACpE,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,eACJ,SACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,SAAS,KAAK,OAAO;AAAA,EACZ,aAAa,KAAK,OAAO;AAAA,EAE3C,aAAqB;AACpB,WAAO,KAAK,WAAW,SAAY,SAAS,QAAQ,KAAK,MAAM;AAAA,EAChE;AACD;AAuBO,SAAS,KAAK,GAA2B,IAAkB,CAAC,GAAQ;AAC1E,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAqC,GAAG,CAAC;AAClE,SAAO,IAAI,cAAc,MAAM,MAAa;AAC7C;","names":[]}

53
node_modules/drizzle-orm/pg-core/columns/cidr.cjs generated vendored Normal file
View File

@ -0,0 +1,53 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var cidr_exports = {};
__export(cidr_exports, {
PgCidr: () => PgCidr,
PgCidrBuilder: () => PgCidrBuilder,
cidr: () => cidr
});
module.exports = __toCommonJS(cidr_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgCidrBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgCidrBuilder";
constructor(name) {
super(name, "string", "PgCidr");
}
/** @internal */
build(table) {
return new PgCidr(table, this.config);
}
}
class PgCidr extends import_common.PgColumn {
static [import_entity.entityKind] = "PgCidr";
getSQLType() {
return "cidr";
}
}
function cidr(name) {
return new PgCidrBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgCidr,
PgCidrBuilder,
cidr
});
//# sourceMappingURL=cidr.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/cidr.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '../table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgCidrBuilderInitial<TName extends string> = PgCidrBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgCidr';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgCidrBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgCidr'>> extends PgColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgCidrBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'PgCidr');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgCidr<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgCidr<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgCidr<T extends ColumnBaseConfig<'string', 'PgCidr'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgCidr';\n\n\tgetSQLType(): string {\n\t\treturn 'cidr';\n\t}\n}\n\nexport function cidr(): PgCidrBuilderInitial<''>;\nexport function cidr<TName extends string>(name: TName): PgCidrBuilderInitial<TName>;\nexport function cidr(name?: string) {\n\treturn new PgCidrBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA0C;AAWnC,MAAM,sBAA6E,8BAAmB;AAAA,EAC5G,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,QAAQ;AAAA,EAC/B;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA+D,uBAAY;AAAA,EACvF,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,cAAc,QAAQ,EAAE;AACpC;","names":[]}

22
node_modules/drizzle-orm/pg-core/columns/cidr.d.cts generated vendored Normal file
View File

@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgCidrBuilderInitial<TName extends string> = PgCidrBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgCidr';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgCidrBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgCidr'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgCidr<T extends ColumnBaseConfig<'string', 'PgCidr'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function cidr(): PgCidrBuilderInitial<''>;
export declare function cidr<TName extends string>(name: TName): PgCidrBuilderInitial<TName>;

22
node_modules/drizzle-orm/pg-core/columns/cidr.d.ts generated vendored Normal file
View File

@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgCidrBuilderInitial<TName extends string> = PgCidrBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgCidr';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgCidrBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgCidr'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgCidr<T extends ColumnBaseConfig<'string', 'PgCidr'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function cidr(): PgCidrBuilderInitial<''>;
export declare function cidr<TName extends string>(name: TName): PgCidrBuilderInitial<TName>;

27
node_modules/drizzle-orm/pg-core/columns/cidr.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgCidrBuilder extends PgColumnBuilder {
static [entityKind] = "PgCidrBuilder";
constructor(name) {
super(name, "string", "PgCidr");
}
/** @internal */
build(table) {
return new PgCidr(table, this.config);
}
}
class PgCidr extends PgColumn {
static [entityKind] = "PgCidr";
getSQLType() {
return "cidr";
}
}
function cidr(name) {
return new PgCidrBuilder(name ?? "");
}
export {
PgCidr,
PgCidrBuilder,
cidr
};
//# sourceMappingURL=cidr.js.map

1
node_modules/drizzle-orm/pg-core/columns/cidr.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/cidr.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '../table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgCidrBuilderInitial<TName extends string> = PgCidrBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgCidr';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgCidrBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgCidr'>> extends PgColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgCidrBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'PgCidr');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgCidr<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgCidr<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgCidr<T extends ColumnBaseConfig<'string', 'PgCidr'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgCidr';\n\n\tgetSQLType(): string {\n\t\treturn 'cidr';\n\t}\n}\n\nexport function cidr(): PgCidrBuilderInitial<''>;\nexport function cidr<TName extends string>(name: TName): PgCidrBuilderInitial<TName>;\nexport function cidr(name?: string) {\n\treturn new PgCidrBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,UAAU,uBAAuB;AAWnC,MAAM,sBAA6E,gBAAmB;AAAA,EAC5G,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,QAAQ;AAAA,EAC/B;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA+D,SAAY;AAAA,EACvF,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,cAAc,QAAQ,EAAE;AACpC;","names":[]}

228
node_modules/drizzle-orm/pg-core/columns/common.cjs generated vendored Normal file
View File

@ -0,0 +1,228 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var common_exports = {};
__export(common_exports, {
ExtraConfigColumn: () => ExtraConfigColumn,
IndexedColumn: () => IndexedColumn,
PgArray: () => PgArray,
PgArrayBuilder: () => PgArrayBuilder,
PgColumn: () => PgColumn,
PgColumnBuilder: () => PgColumnBuilder
});
module.exports = __toCommonJS(common_exports);
var import_column_builder = require("../../column-builder.cjs");
var import_column = require("../../column.cjs");
var import_entity = require("../../entity.cjs");
var import_foreign_keys = require("../foreign-keys.cjs");
var import_tracing_utils = require("../../tracing-utils.cjs");
var import_unique_constraint = require("../unique-constraint.cjs");
var import_array = require("../utils/array.cjs");
class PgColumnBuilder extends import_column_builder.ColumnBuilder {
foreignKeyConfigs = [];
static [import_entity.entityKind] = "PgColumnBuilder";
array(size) {
return new PgArrayBuilder(this.config.name, this, size);
}
references(ref, actions = {}) {
this.foreignKeyConfigs.push({ ref, actions });
return this;
}
unique(name, config) {
this.config.isUnique = true;
this.config.uniqueName = name;
this.config.uniqueType = config?.nulls;
return this;
}
generatedAlwaysAs(as) {
this.config.generated = {
as,
type: "always",
mode: "stored"
};
return this;
}
/** @internal */
buildForeignKeys(column, table) {
return this.foreignKeyConfigs.map(({ ref, actions }) => {
return (0, import_tracing_utils.iife)(
(ref2, actions2) => {
const builder = new import_foreign_keys.ForeignKeyBuilder(() => {
const foreignColumn = ref2();
return { columns: [column], foreignColumns: [foreignColumn] };
});
if (actions2.onUpdate) {
builder.onUpdate(actions2.onUpdate);
}
if (actions2.onDelete) {
builder.onDelete(actions2.onDelete);
}
return builder.build(table);
},
ref,
actions
);
});
}
/** @internal */
buildExtraConfigColumn(table) {
return new ExtraConfigColumn(table, this.config);
}
}
class PgColumn extends import_column.Column {
constructor(table, config) {
if (!config.uniqueName) {
config.uniqueName = (0, import_unique_constraint.uniqueKeyName)(table, [config.name]);
}
super(table, config);
this.table = table;
}
static [import_entity.entityKind] = "PgColumn";
}
class ExtraConfigColumn extends PgColumn {
static [import_entity.entityKind] = "ExtraConfigColumn";
getSQLType() {
return this.getSQLType();
}
indexConfig = {
order: this.config.order ?? "asc",
nulls: this.config.nulls ?? "last",
opClass: this.config.opClass
};
defaultConfig = {
order: "asc",
nulls: "last",
opClass: void 0
};
asc() {
this.indexConfig.order = "asc";
return this;
}
desc() {
this.indexConfig.order = "desc";
return this;
}
nullsFirst() {
this.indexConfig.nulls = "first";
return this;
}
nullsLast() {
this.indexConfig.nulls = "last";
return this;
}
/**
* ### PostgreSQL documentation quote
*
* > An operator class with optional parameters can be specified for each column of an index.
* The operator class identifies the operators to be used by the index for that column.
* For example, a B-tree index on four-byte integers would use the int4_ops class;
* this operator class includes comparison functions for four-byte integers.
* In practice the default operator class for the column's data type is usually sufficient.
* The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.
* For example, we might want to sort a complex-number data type either by absolute value or by real part.
* We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.
* More information about operator classes check:
*
* ### Useful links
* https://www.postgresql.org/docs/current/sql-createindex.html
*
* https://www.postgresql.org/docs/current/indexes-opclass.html
*
* https://www.postgresql.org/docs/current/xindex.html
*
* ### Additional types
* If you have the `pg_vector` extension installed in your database, you can use the
* `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.
*
* **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**
*
* @param opClass
* @returns
*/
op(opClass) {
this.indexConfig.opClass = opClass;
return this;
}
}
class IndexedColumn {
static [import_entity.entityKind] = "IndexedColumn";
constructor(name, keyAsName, type, indexConfig) {
this.name = name;
this.keyAsName = keyAsName;
this.type = type;
this.indexConfig = indexConfig;
}
name;
keyAsName;
type;
indexConfig;
}
class PgArrayBuilder extends PgColumnBuilder {
static [import_entity.entityKind] = "PgArrayBuilder";
constructor(name, baseBuilder, size) {
super(name, "array", "PgArray");
this.config.baseBuilder = baseBuilder;
this.config.size = size;
}
/** @internal */
build(table) {
const baseColumn = this.config.baseBuilder.build(table);
return new PgArray(
table,
this.config,
baseColumn
);
}
}
class PgArray extends PgColumn {
constructor(table, config, baseColumn, range) {
super(table, config);
this.baseColumn = baseColumn;
this.range = range;
this.size = config.size;
}
size;
static [import_entity.entityKind] = "PgArray";
getSQLType() {
return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`;
}
mapFromDriverValue(value) {
if (typeof value === "string") {
value = (0, import_array.parsePgArray)(value);
}
return value.map((v) => this.baseColumn.mapFromDriverValue(v));
}
mapToDriverValue(value, isNestedArray = false) {
const a = value.map(
(v) => v === null ? null : (0, import_entity.is)(this.baseColumn, PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v)
);
if (isNestedArray)
return a;
return (0, import_array.makePgArray)(a);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ExtraConfigColumn,
IndexedColumn,
PgArray,
PgArrayBuilder,
PgColumn,
PgColumnBuilder
});
//# sourceMappingURL=common.cjs.map

File diff suppressed because one or more lines are too long

149
node_modules/drizzle-orm/pg-core/columns/common.d.cts generated vendored Normal file
View File

@ -0,0 +1,149 @@
import type { ColumnBuilderBase, ColumnBuilderBaseConfig, ColumnBuilderExtraConfig, ColumnBuilderRuntimeConfig, ColumnDataType, HasGenerated } from "../../column-builder.cjs";
import { ColumnBuilder } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { Column } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { Simplify, Update } from "../../utils.cjs";
import type { UpdateDeleteAction } from "../foreign-keys.cjs";
import type { AnyPgTable, PgTable } from "../table.cjs";
import type { SQL } from "../../sql/sql.cjs";
import type { PgIndexOpClass } from "../indexes.cjs";
export interface ReferenceConfig {
ref: () => PgColumn;
actions: {
onUpdate?: UpdateDeleteAction;
onDelete?: UpdateDeleteAction;
};
}
export interface PgColumnBuilderBase<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TTypeConfig extends object = object> extends ColumnBuilderBase<T, TTypeConfig & {
dialect: 'pg';
}> {
}
export declare abstract class PgColumnBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object, TTypeConfig extends object = object, TExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig> extends ColumnBuilder<T, TRuntimeConfig, TTypeConfig & {
dialect: 'pg';
}, TExtraConfig> implements PgColumnBuilderBase<T, TTypeConfig> {
private foreignKeyConfigs;
static readonly [entityKind]: string;
array<TSize extends number | undefined = undefined>(size?: TSize): PgArrayBuilder<{
name: T['name'];
dataType: 'array';
columnType: 'PgArray';
data: T['data'][];
driverParam: T['driverParam'][] | string;
enumValues: T['enumValues'];
size: TSize;
baseBuilder: T;
} & (T extends {
notNull: true;
} ? {
notNull: true;
} : {}) & (T extends {
hasDefault: true;
} ? {
hasDefault: true;
} : {}), T>;
references(ref: ReferenceConfig['ref'], actions?: ReferenceConfig['actions']): this;
unique(name?: string, config?: {
nulls: 'distinct' | 'not distinct';
}): this;
generatedAlwaysAs(as: SQL | T['data'] | (() => SQL)): HasGenerated<this, {
type: 'always';
}>;
}
export declare abstract class PgColumn<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = {}, TTypeConfig extends object = {}> extends Column<T, TRuntimeConfig, TTypeConfig & {
dialect: 'pg';
}> {
readonly table: PgTable;
static readonly [entityKind]: string;
constructor(table: PgTable, config: ColumnBuilderRuntimeConfig<T['data'], TRuntimeConfig>);
}
export type IndexedExtraConfigType = {
order?: 'asc' | 'desc';
nulls?: 'first' | 'last';
opClass?: string;
};
export declare class ExtraConfigColumn<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>> extends PgColumn<T, IndexedExtraConfigType> {
static readonly [entityKind]: string;
getSQLType(): string;
indexConfig: IndexedExtraConfigType;
defaultConfig: IndexedExtraConfigType;
asc(): Omit<this, 'asc' | 'desc'>;
desc(): Omit<this, 'asc' | 'desc'>;
nullsFirst(): Omit<this, 'nullsFirst' | 'nullsLast'>;
nullsLast(): Omit<this, 'nullsFirst' | 'nullsLast'>;
/**
* ### PostgreSQL documentation quote
*
* > An operator class with optional parameters can be specified for each column of an index.
* The operator class identifies the operators to be used by the index for that column.
* For example, a B-tree index on four-byte integers would use the int4_ops class;
* this operator class includes comparison functions for four-byte integers.
* In practice the default operator class for the column's data type is usually sufficient.
* The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.
* For example, we might want to sort a complex-number data type either by absolute value or by real part.
* We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.
* More information about operator classes check:
*
* ### Useful links
* https://www.postgresql.org/docs/current/sql-createindex.html
*
* https://www.postgresql.org/docs/current/indexes-opclass.html
*
* https://www.postgresql.org/docs/current/xindex.html
*
* ### Additional types
* If you have the `pg_vector` extension installed in your database, you can use the
* `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.
*
* **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**
*
* @param opClass
* @returns
*/
op(opClass: PgIndexOpClass): Omit<this, 'op'>;
}
export declare class IndexedColumn {
static readonly [entityKind]: string;
constructor(name: string | undefined, keyAsName: boolean, type: string, indexConfig: IndexedExtraConfigType);
name: string | undefined;
keyAsName: boolean;
type: string;
indexConfig: IndexedExtraConfigType;
}
export type AnyPgColumn<TPartial extends Partial<ColumnBaseConfig<ColumnDataType, string>> = {}> = PgColumn<Required<Update<ColumnBaseConfig<ColumnDataType, string>, TPartial>>>;
export type PgArrayColumnBuilderBaseConfig = ColumnBuilderBaseConfig<'array', 'PgArray'> & {
size: number | undefined;
baseBuilder: ColumnBuilderBaseConfig<ColumnDataType, string>;
};
export declare class PgArrayBuilder<T extends PgArrayColumnBuilderBaseConfig, TBase extends ColumnBuilderBaseConfig<ColumnDataType, string> | PgArrayColumnBuilderBaseConfig> extends PgColumnBuilder<T, {
baseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<TBase, TBase extends {
baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig<any, any>;
} ? TBaseBuilder : never> : PgColumnBuilder<TBase, {}, Simplify<Omit<TBase, keyof ColumnBuilderBaseConfig<any, any>>>>;
size: T['size'];
}, {
baseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<TBase, TBase extends {
baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig<any, any>;
} ? TBaseBuilder : never> : PgColumnBuilder<TBase, {}, Simplify<Omit<TBase, keyof ColumnBuilderBaseConfig<any, any>>>>;
size: T['size'];
}> {
static readonly [entityKind] = "PgArrayBuilder";
constructor(name: string, baseBuilder: PgArrayBuilder<T, TBase>['config']['baseBuilder'], size: T['size']);
}
export declare class PgArray<T extends ColumnBaseConfig<'array', 'PgArray'> & {
size: number | undefined;
baseBuilder: ColumnBuilderBaseConfig<ColumnDataType, string>;
}, TBase extends ColumnBuilderBaseConfig<ColumnDataType, string>> extends PgColumn<T, {}, {
size: T['size'];
baseBuilder: T['baseBuilder'];
}> {
readonly baseColumn: PgColumn;
readonly range?: [number | undefined, number | undefined] | undefined;
readonly size: T['size'];
static readonly [entityKind]: string;
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgArrayBuilder<T, TBase>['config'], baseColumn: PgColumn, range?: [number | undefined, number | undefined] | undefined);
getSQLType(): string;
mapFromDriverValue(value: unknown[] | string): T['data'];
mapToDriverValue(value: unknown[], isNestedArray?: boolean): unknown[] | string;
}

149
node_modules/drizzle-orm/pg-core/columns/common.d.ts generated vendored Normal file
View File

@ -0,0 +1,149 @@
import type { ColumnBuilderBase, ColumnBuilderBaseConfig, ColumnBuilderExtraConfig, ColumnBuilderRuntimeConfig, ColumnDataType, HasGenerated } from "../../column-builder.js";
import { ColumnBuilder } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { Column } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { Simplify, Update } from "../../utils.js";
import type { UpdateDeleteAction } from "../foreign-keys.js";
import type { AnyPgTable, PgTable } from "../table.js";
import type { SQL } from "../../sql/sql.js";
import type { PgIndexOpClass } from "../indexes.js";
export interface ReferenceConfig {
ref: () => PgColumn;
actions: {
onUpdate?: UpdateDeleteAction;
onDelete?: UpdateDeleteAction;
};
}
export interface PgColumnBuilderBase<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TTypeConfig extends object = object> extends ColumnBuilderBase<T, TTypeConfig & {
dialect: 'pg';
}> {
}
export declare abstract class PgColumnBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object, TTypeConfig extends object = object, TExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig> extends ColumnBuilder<T, TRuntimeConfig, TTypeConfig & {
dialect: 'pg';
}, TExtraConfig> implements PgColumnBuilderBase<T, TTypeConfig> {
private foreignKeyConfigs;
static readonly [entityKind]: string;
array<TSize extends number | undefined = undefined>(size?: TSize): PgArrayBuilder<{
name: T['name'];
dataType: 'array';
columnType: 'PgArray';
data: T['data'][];
driverParam: T['driverParam'][] | string;
enumValues: T['enumValues'];
size: TSize;
baseBuilder: T;
} & (T extends {
notNull: true;
} ? {
notNull: true;
} : {}) & (T extends {
hasDefault: true;
} ? {
hasDefault: true;
} : {}), T>;
references(ref: ReferenceConfig['ref'], actions?: ReferenceConfig['actions']): this;
unique(name?: string, config?: {
nulls: 'distinct' | 'not distinct';
}): this;
generatedAlwaysAs(as: SQL | T['data'] | (() => SQL)): HasGenerated<this, {
type: 'always';
}>;
}
export declare abstract class PgColumn<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = {}, TTypeConfig extends object = {}> extends Column<T, TRuntimeConfig, TTypeConfig & {
dialect: 'pg';
}> {
readonly table: PgTable;
static readonly [entityKind]: string;
constructor(table: PgTable, config: ColumnBuilderRuntimeConfig<T['data'], TRuntimeConfig>);
}
export type IndexedExtraConfigType = {
order?: 'asc' | 'desc';
nulls?: 'first' | 'last';
opClass?: string;
};
export declare class ExtraConfigColumn<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>> extends PgColumn<T, IndexedExtraConfigType> {
static readonly [entityKind]: string;
getSQLType(): string;
indexConfig: IndexedExtraConfigType;
defaultConfig: IndexedExtraConfigType;
asc(): Omit<this, 'asc' | 'desc'>;
desc(): Omit<this, 'asc' | 'desc'>;
nullsFirst(): Omit<this, 'nullsFirst' | 'nullsLast'>;
nullsLast(): Omit<this, 'nullsFirst' | 'nullsLast'>;
/**
* ### PostgreSQL documentation quote
*
* > An operator class with optional parameters can be specified for each column of an index.
* The operator class identifies the operators to be used by the index for that column.
* For example, a B-tree index on four-byte integers would use the int4_ops class;
* this operator class includes comparison functions for four-byte integers.
* In practice the default operator class for the column's data type is usually sufficient.
* The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.
* For example, we might want to sort a complex-number data type either by absolute value or by real part.
* We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.
* More information about operator classes check:
*
* ### Useful links
* https://www.postgresql.org/docs/current/sql-createindex.html
*
* https://www.postgresql.org/docs/current/indexes-opclass.html
*
* https://www.postgresql.org/docs/current/xindex.html
*
* ### Additional types
* If you have the `pg_vector` extension installed in your database, you can use the
* `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.
*
* **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**
*
* @param opClass
* @returns
*/
op(opClass: PgIndexOpClass): Omit<this, 'op'>;
}
export declare class IndexedColumn {
static readonly [entityKind]: string;
constructor(name: string | undefined, keyAsName: boolean, type: string, indexConfig: IndexedExtraConfigType);
name: string | undefined;
keyAsName: boolean;
type: string;
indexConfig: IndexedExtraConfigType;
}
export type AnyPgColumn<TPartial extends Partial<ColumnBaseConfig<ColumnDataType, string>> = {}> = PgColumn<Required<Update<ColumnBaseConfig<ColumnDataType, string>, TPartial>>>;
export type PgArrayColumnBuilderBaseConfig = ColumnBuilderBaseConfig<'array', 'PgArray'> & {
size: number | undefined;
baseBuilder: ColumnBuilderBaseConfig<ColumnDataType, string>;
};
export declare class PgArrayBuilder<T extends PgArrayColumnBuilderBaseConfig, TBase extends ColumnBuilderBaseConfig<ColumnDataType, string> | PgArrayColumnBuilderBaseConfig> extends PgColumnBuilder<T, {
baseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<TBase, TBase extends {
baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig<any, any>;
} ? TBaseBuilder : never> : PgColumnBuilder<TBase, {}, Simplify<Omit<TBase, keyof ColumnBuilderBaseConfig<any, any>>>>;
size: T['size'];
}, {
baseBuilder: TBase extends PgArrayColumnBuilderBaseConfig ? PgArrayBuilder<TBase, TBase extends {
baseBuilder: infer TBaseBuilder extends ColumnBuilderBaseConfig<any, any>;
} ? TBaseBuilder : never> : PgColumnBuilder<TBase, {}, Simplify<Omit<TBase, keyof ColumnBuilderBaseConfig<any, any>>>>;
size: T['size'];
}> {
static readonly [entityKind] = "PgArrayBuilder";
constructor(name: string, baseBuilder: PgArrayBuilder<T, TBase>['config']['baseBuilder'], size: T['size']);
}
export declare class PgArray<T extends ColumnBaseConfig<'array', 'PgArray'> & {
size: number | undefined;
baseBuilder: ColumnBuilderBaseConfig<ColumnDataType, string>;
}, TBase extends ColumnBuilderBaseConfig<ColumnDataType, string>> extends PgColumn<T, {}, {
size: T['size'];
baseBuilder: T['baseBuilder'];
}> {
readonly baseColumn: PgColumn;
readonly range?: [number | undefined, number | undefined] | undefined;
readonly size: T['size'];
static readonly [entityKind]: string;
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgArrayBuilder<T, TBase>['config'], baseColumn: PgColumn, range?: [number | undefined, number | undefined] | undefined);
getSQLType(): string;
mapFromDriverValue(value: unknown[] | string): T['data'];
mapToDriverValue(value: unknown[], isNestedArray?: boolean): unknown[] | string;
}

199
node_modules/drizzle-orm/pg-core/columns/common.js generated vendored Normal file
View File

@ -0,0 +1,199 @@
import { ColumnBuilder } from "../../column-builder.js";
import { Column } from "../../column.js";
import { entityKind, is } from "../../entity.js";
import { ForeignKeyBuilder } from "../foreign-keys.js";
import { iife } from "../../tracing-utils.js";
import { uniqueKeyName } from "../unique-constraint.js";
import { makePgArray, parsePgArray } from "../utils/array.js";
class PgColumnBuilder extends ColumnBuilder {
foreignKeyConfigs = [];
static [entityKind] = "PgColumnBuilder";
array(size) {
return new PgArrayBuilder(this.config.name, this, size);
}
references(ref, actions = {}) {
this.foreignKeyConfigs.push({ ref, actions });
return this;
}
unique(name, config) {
this.config.isUnique = true;
this.config.uniqueName = name;
this.config.uniqueType = config?.nulls;
return this;
}
generatedAlwaysAs(as) {
this.config.generated = {
as,
type: "always",
mode: "stored"
};
return this;
}
/** @internal */
buildForeignKeys(column, table) {
return this.foreignKeyConfigs.map(({ ref, actions }) => {
return iife(
(ref2, actions2) => {
const builder = new ForeignKeyBuilder(() => {
const foreignColumn = ref2();
return { columns: [column], foreignColumns: [foreignColumn] };
});
if (actions2.onUpdate) {
builder.onUpdate(actions2.onUpdate);
}
if (actions2.onDelete) {
builder.onDelete(actions2.onDelete);
}
return builder.build(table);
},
ref,
actions
);
});
}
/** @internal */
buildExtraConfigColumn(table) {
return new ExtraConfigColumn(table, this.config);
}
}
class PgColumn extends Column {
constructor(table, config) {
if (!config.uniqueName) {
config.uniqueName = uniqueKeyName(table, [config.name]);
}
super(table, config);
this.table = table;
}
static [entityKind] = "PgColumn";
}
class ExtraConfigColumn extends PgColumn {
static [entityKind] = "ExtraConfigColumn";
getSQLType() {
return this.getSQLType();
}
indexConfig = {
order: this.config.order ?? "asc",
nulls: this.config.nulls ?? "last",
opClass: this.config.opClass
};
defaultConfig = {
order: "asc",
nulls: "last",
opClass: void 0
};
asc() {
this.indexConfig.order = "asc";
return this;
}
desc() {
this.indexConfig.order = "desc";
return this;
}
nullsFirst() {
this.indexConfig.nulls = "first";
return this;
}
nullsLast() {
this.indexConfig.nulls = "last";
return this;
}
/**
* ### PostgreSQL documentation quote
*
* > An operator class with optional parameters can be specified for each column of an index.
* The operator class identifies the operators to be used by the index for that column.
* For example, a B-tree index on four-byte integers would use the int4_ops class;
* this operator class includes comparison functions for four-byte integers.
* In practice the default operator class for the column's data type is usually sufficient.
* The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.
* For example, we might want to sort a complex-number data type either by absolute value or by real part.
* We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.
* More information about operator classes check:
*
* ### Useful links
* https://www.postgresql.org/docs/current/sql-createindex.html
*
* https://www.postgresql.org/docs/current/indexes-opclass.html
*
* https://www.postgresql.org/docs/current/xindex.html
*
* ### Additional types
* If you have the `pg_vector` extension installed in your database, you can use the
* `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.
*
* **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**
*
* @param opClass
* @returns
*/
op(opClass) {
this.indexConfig.opClass = opClass;
return this;
}
}
class IndexedColumn {
static [entityKind] = "IndexedColumn";
constructor(name, keyAsName, type, indexConfig) {
this.name = name;
this.keyAsName = keyAsName;
this.type = type;
this.indexConfig = indexConfig;
}
name;
keyAsName;
type;
indexConfig;
}
class PgArrayBuilder extends PgColumnBuilder {
static [entityKind] = "PgArrayBuilder";
constructor(name, baseBuilder, size) {
super(name, "array", "PgArray");
this.config.baseBuilder = baseBuilder;
this.config.size = size;
}
/** @internal */
build(table) {
const baseColumn = this.config.baseBuilder.build(table);
return new PgArray(
table,
this.config,
baseColumn
);
}
}
class PgArray extends PgColumn {
constructor(table, config, baseColumn, range) {
super(table, config);
this.baseColumn = baseColumn;
this.range = range;
this.size = config.size;
}
size;
static [entityKind] = "PgArray";
getSQLType() {
return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`;
}
mapFromDriverValue(value) {
if (typeof value === "string") {
value = parsePgArray(value);
}
return value.map((v) => this.baseColumn.mapFromDriverValue(v));
}
mapToDriverValue(value, isNestedArray = false) {
const a = value.map(
(v) => v === null ? null : is(this.baseColumn, PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v)
);
if (isNestedArray)
return a;
return makePgArray(a);
}
}
export {
ExtraConfigColumn,
IndexedColumn,
PgArray,
PgArrayBuilder,
PgColumn,
PgColumnBuilder
};
//# sourceMappingURL=common.js.map

File diff suppressed because one or more lines are too long

77
node_modules/drizzle-orm/pg-core/columns/custom.cjs generated vendored Normal file
View File

@ -0,0 +1,77 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var custom_exports = {};
__export(custom_exports, {
PgCustomColumn: () => PgCustomColumn,
PgCustomColumnBuilder: () => PgCustomColumnBuilder,
customType: () => customType
});
module.exports = __toCommonJS(custom_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class PgCustomColumnBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgCustomColumnBuilder";
constructor(name, fieldConfig, customTypeParams) {
super(name, "custom", "PgCustomColumn");
this.config.fieldConfig = fieldConfig;
this.config.customTypeParams = customTypeParams;
}
/** @internal */
build(table) {
return new PgCustomColumn(
table,
this.config
);
}
}
class PgCustomColumn extends import_common.PgColumn {
static [import_entity.entityKind] = "PgCustomColumn";
sqlName;
mapTo;
mapFrom;
constructor(table, config) {
super(table, config);
this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
this.mapTo = config.customTypeParams.toDriver;
this.mapFrom = config.customTypeParams.fromDriver;
}
getSQLType() {
return this.sqlName;
}
mapFromDriverValue(value) {
return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
}
mapToDriverValue(value) {
return typeof this.mapTo === "function" ? this.mapTo(value) : value;
}
}
function customType(customTypeParams) {
return (a, b) => {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new PgCustomColumnBuilder(name, config, customTypeParams);
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgCustomColumn,
PgCustomColumnBuilder,
customType
});
//# sourceMappingURL=custom.cjs.map

File diff suppressed because one or more lines are too long

155
node_modules/drizzle-orm/pg-core/columns/custom.d.cts generated vendored Normal file
View File

@ -0,0 +1,155 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { AnyPgTable } from "../table.cjs";
import type { SQL } from "../../sql/sql.cjs";
import { type Equal } from "../../utils.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type ConvertCustomConfig<TName extends string, T extends Partial<CustomTypeValues>> = {
name: TName;
dataType: 'custom';
columnType: 'PgCustomColumn';
data: T['data'];
driverParam: T['driverData'];
enumValues: undefined;
} & (T['notNull'] extends true ? {
notNull: true;
} : {}) & (T['default'] extends true ? {
hasDefault: true;
} : {});
export interface PgCustomColumnInnerConfig {
customTypeValues: CustomTypeValues;
}
export declare class PgCustomColumnBuilder<T extends ColumnBuilderBaseConfig<'custom', 'PgCustomColumn'>> extends PgColumnBuilder<T, {
fieldConfig: CustomTypeValues['config'];
customTypeParams: CustomTypeParams<any>;
}, {
pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], fieldConfig: CustomTypeValues['config'], customTypeParams: CustomTypeParams<any>);
}
export declare class PgCustomColumn<T extends ColumnBaseConfig<'custom', 'PgCustomColumn'>> extends PgColumn<T> {
static readonly [entityKind]: string;
private sqlName;
private mapTo?;
private mapFrom?;
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgCustomColumnBuilder<T>['config']);
getSQLType(): string;
mapFromDriverValue(value: T['driverParam']): T['data'];
mapToDriverValue(value: T['data']): T['driverParam'];
}
export type CustomTypeValues = {
/**
* Required type for custom column, that will infer proper type model
*
* Examples:
*
* If you want your column to be `string` type after selecting/or on inserting - use `data: string`. Like `text`, `varchar`
*
* If you want your column to be `number` type after selecting/or on inserting - use `data: number`. Like `integer`
*/
data: unknown;
/**
* Type helper, that represents what type database driver is accepting for specific database data type
*/
driverData?: unknown;
/**
* What config type should be used for {@link CustomTypeParams} `dataType` generation
*/
config?: Record<string, any>;
/**
* Whether the config argument should be required or not
* @default false
*/
configRequired?: boolean;
/**
* If your custom data type should be notNull by default you can use `notNull: true`
*
* @example
* const customSerial = customType<{ data: number, notNull: true, default: true }>({
* dataType() {
* return 'serial';
* },
* });
*/
notNull?: boolean;
/**
* If your custom data type has default you can use `default: true`
*
* @example
* const customSerial = customType<{ data: number, notNull: true, default: true }>({
* dataType() {
* return 'serial';
* },
* });
*/
default?: boolean;
};
export interface CustomTypeParams<T extends CustomTypeValues> {
/**
* Database data type string representation, that is used for migrations
* @example
* ```
* `jsonb`, `text`
* ```
*
* If database data type needs additional params you can use them from `config` param
* @example
* ```
* `varchar(256)`, `numeric(2,3)`
* ```
*
* To make `config` be of specific type please use config generic in {@link CustomTypeValues}
*
* @example
* Usage example
* ```
* dataType() {
* return 'boolean';
* },
* ```
* Or
* ```
* dataType(config) {
* return typeof config.length !== 'undefined' ? `varchar(${config.length})` : `varchar`;
* }
* ```
*/
dataType: (config: T['config'] | (Equal<T['configRequired'], true> extends true ? never : undefined)) => string;
/**
* Optional mapping function, between user input and driver
* @example
* For example, when using jsonb we need to map JS/TS object to string before writing to database
* ```
* toDriver(value: TData): string {
* return JSON.stringify(value);
* }
* ```
*/
toDriver?: (value: T['data']) => T['driverData'] | SQL;
/**
* Optional mapping function, that is responsible for data mapping from database to JS/TS code
* @example
* For example, when using timestamp we need to map string Date representation to JS Date
* ```
* fromDriver(value: string): Date {
* return new Date(value);
* },
* ```
*/
fromDriver?: (value: T['driverData']) => T['data'];
}
/**
* Custom pg database data type generator
*/
export declare function customType<T extends CustomTypeValues = CustomTypeValues>(customTypeParams: CustomTypeParams<T>): Equal<T['configRequired'], true> extends true ? {
<TConfig extends Record<string, any> & T['config']>(fieldConfig: TConfig): PgCustomColumnBuilder<ConvertCustomConfig<'', T>>;
<TName extends string>(dbName: TName, fieldConfig: T['config']): PgCustomColumnBuilder<ConvertCustomConfig<TName, T>>;
} : {
(): PgCustomColumnBuilder<ConvertCustomConfig<'', T>>;
<TConfig extends Record<string, any> & T['config']>(fieldConfig?: TConfig): PgCustomColumnBuilder<ConvertCustomConfig<'', T>>;
<TName extends string>(dbName: TName, fieldConfig?: T['config']): PgCustomColumnBuilder<ConvertCustomConfig<TName, T>>;
};

155
node_modules/drizzle-orm/pg-core/columns/custom.d.ts generated vendored Normal file
View File

@ -0,0 +1,155 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { AnyPgTable } from "../table.js";
import type { SQL } from "../../sql/sql.js";
import { type Equal } from "../../utils.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type ConvertCustomConfig<TName extends string, T extends Partial<CustomTypeValues>> = {
name: TName;
dataType: 'custom';
columnType: 'PgCustomColumn';
data: T['data'];
driverParam: T['driverData'];
enumValues: undefined;
} & (T['notNull'] extends true ? {
notNull: true;
} : {}) & (T['default'] extends true ? {
hasDefault: true;
} : {});
export interface PgCustomColumnInnerConfig {
customTypeValues: CustomTypeValues;
}
export declare class PgCustomColumnBuilder<T extends ColumnBuilderBaseConfig<'custom', 'PgCustomColumn'>> extends PgColumnBuilder<T, {
fieldConfig: CustomTypeValues['config'];
customTypeParams: CustomTypeParams<any>;
}, {
pgColumnBuilderBrand: 'PgCustomColumnBuilderBrand';
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], fieldConfig: CustomTypeValues['config'], customTypeParams: CustomTypeParams<any>);
}
export declare class PgCustomColumn<T extends ColumnBaseConfig<'custom', 'PgCustomColumn'>> extends PgColumn<T> {
static readonly [entityKind]: string;
private sqlName;
private mapTo?;
private mapFrom?;
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgCustomColumnBuilder<T>['config']);
getSQLType(): string;
mapFromDriverValue(value: T['driverParam']): T['data'];
mapToDriverValue(value: T['data']): T['driverParam'];
}
export type CustomTypeValues = {
/**
* Required type for custom column, that will infer proper type model
*
* Examples:
*
* If you want your column to be `string` type after selecting/or on inserting - use `data: string`. Like `text`, `varchar`
*
* If you want your column to be `number` type after selecting/or on inserting - use `data: number`. Like `integer`
*/
data: unknown;
/**
* Type helper, that represents what type database driver is accepting for specific database data type
*/
driverData?: unknown;
/**
* What config type should be used for {@link CustomTypeParams} `dataType` generation
*/
config?: Record<string, any>;
/**
* Whether the config argument should be required or not
* @default false
*/
configRequired?: boolean;
/**
* If your custom data type should be notNull by default you can use `notNull: true`
*
* @example
* const customSerial = customType<{ data: number, notNull: true, default: true }>({
* dataType() {
* return 'serial';
* },
* });
*/
notNull?: boolean;
/**
* If your custom data type has default you can use `default: true`
*
* @example
* const customSerial = customType<{ data: number, notNull: true, default: true }>({
* dataType() {
* return 'serial';
* },
* });
*/
default?: boolean;
};
export interface CustomTypeParams<T extends CustomTypeValues> {
/**
* Database data type string representation, that is used for migrations
* @example
* ```
* `jsonb`, `text`
* ```
*
* If database data type needs additional params you can use them from `config` param
* @example
* ```
* `varchar(256)`, `numeric(2,3)`
* ```
*
* To make `config` be of specific type please use config generic in {@link CustomTypeValues}
*
* @example
* Usage example
* ```
* dataType() {
* return 'boolean';
* },
* ```
* Or
* ```
* dataType(config) {
* return typeof config.length !== 'undefined' ? `varchar(${config.length})` : `varchar`;
* }
* ```
*/
dataType: (config: T['config'] | (Equal<T['configRequired'], true> extends true ? never : undefined)) => string;
/**
* Optional mapping function, between user input and driver
* @example
* For example, when using jsonb we need to map JS/TS object to string before writing to database
* ```
* toDriver(value: TData): string {
* return JSON.stringify(value);
* }
* ```
*/
toDriver?: (value: T['data']) => T['driverData'] | SQL;
/**
* Optional mapping function, that is responsible for data mapping from database to JS/TS code
* @example
* For example, when using timestamp we need to map string Date representation to JS Date
* ```
* fromDriver(value: string): Date {
* return new Date(value);
* },
* ```
*/
fromDriver?: (value: T['driverData']) => T['data'];
}
/**
* Custom pg database data type generator
*/
export declare function customType<T extends CustomTypeValues = CustomTypeValues>(customTypeParams: CustomTypeParams<T>): Equal<T['configRequired'], true> extends true ? {
<TConfig extends Record<string, any> & T['config']>(fieldConfig: TConfig): PgCustomColumnBuilder<ConvertCustomConfig<'', T>>;
<TName extends string>(dbName: TName, fieldConfig: T['config']): PgCustomColumnBuilder<ConvertCustomConfig<TName, T>>;
} : {
(): PgCustomColumnBuilder<ConvertCustomConfig<'', T>>;
<TConfig extends Record<string, any> & T['config']>(fieldConfig?: TConfig): PgCustomColumnBuilder<ConvertCustomConfig<'', T>>;
<TName extends string>(dbName: TName, fieldConfig?: T['config']): PgCustomColumnBuilder<ConvertCustomConfig<TName, T>>;
};

51
node_modules/drizzle-orm/pg-core/columns/custom.js generated vendored Normal file
View File

@ -0,0 +1,51 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgCustomColumnBuilder extends PgColumnBuilder {
static [entityKind] = "PgCustomColumnBuilder";
constructor(name, fieldConfig, customTypeParams) {
super(name, "custom", "PgCustomColumn");
this.config.fieldConfig = fieldConfig;
this.config.customTypeParams = customTypeParams;
}
/** @internal */
build(table) {
return new PgCustomColumn(
table,
this.config
);
}
}
class PgCustomColumn extends PgColumn {
static [entityKind] = "PgCustomColumn";
sqlName;
mapTo;
mapFrom;
constructor(table, config) {
super(table, config);
this.sqlName = config.customTypeParams.dataType(config.fieldConfig);
this.mapTo = config.customTypeParams.toDriver;
this.mapFrom = config.customTypeParams.fromDriver;
}
getSQLType() {
return this.sqlName;
}
mapFromDriverValue(value) {
return typeof this.mapFrom === "function" ? this.mapFrom(value) : value;
}
mapToDriverValue(value) {
return typeof this.mapTo === "function" ? this.mapTo(value) : value;
}
}
function customType(customTypeParams) {
return (a, b) => {
const { name, config } = getColumnNameAndConfig(a, b);
return new PgCustomColumnBuilder(name, config, customTypeParams);
};
}
export {
PgCustomColumn,
PgCustomColumnBuilder,
customType
};
//# sourceMappingURL=custom.js.map

File diff suppressed because one or more lines are too long

88
node_modules/drizzle-orm/pg-core/columns/date.cjs generated vendored Normal file
View File

@ -0,0 +1,88 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var date_exports = {};
__export(date_exports, {
PgDate: () => PgDate,
PgDateBuilder: () => PgDateBuilder,
PgDateString: () => PgDateString,
PgDateStringBuilder: () => PgDateStringBuilder,
date: () => date
});
module.exports = __toCommonJS(date_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
var import_date_common = require("./date.common.cjs");
class PgDateBuilder extends import_date_common.PgDateColumnBaseBuilder {
static [import_entity.entityKind] = "PgDateBuilder";
constructor(name) {
super(name, "date", "PgDate");
}
/** @internal */
build(table) {
return new PgDate(table, this.config);
}
}
class PgDate extends import_common.PgColumn {
static [import_entity.entityKind] = "PgDate";
getSQLType() {
return "date";
}
mapFromDriverValue(value) {
return new Date(value);
}
mapToDriverValue(value) {
return value.toISOString();
}
}
class PgDateStringBuilder extends import_date_common.PgDateColumnBaseBuilder {
static [import_entity.entityKind] = "PgDateStringBuilder";
constructor(name) {
super(name, "string", "PgDateString");
}
/** @internal */
build(table) {
return new PgDateString(
table,
this.config
);
}
}
class PgDateString extends import_common.PgColumn {
static [import_entity.entityKind] = "PgDateString";
getSQLType() {
return "date";
}
}
function date(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
if (config?.mode === "date") {
return new PgDateBuilder(name);
}
return new PgDateStringBuilder(name);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgDate,
PgDateBuilder,
PgDateString,
PgDateStringBuilder,
date
});
//# sourceMappingURL=date.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/date.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { PgColumn } from './common.ts';\nimport { PgDateColumnBaseBuilder } from './date.common.ts';\n\nexport type PgDateBuilderInitial<TName extends string> = PgDateBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'PgDate';\n\tdata: Date;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgDateBuilder<T extends ColumnBuilderBaseConfig<'date', 'PgDate'>> extends PgDateColumnBaseBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgDateBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'date', 'PgDate');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgDate<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgDate<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgDate<T extends ColumnBaseConfig<'date', 'PgDate'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgDate';\n\n\tgetSQLType(): string {\n\t\treturn 'date';\n\t}\n\n\toverride mapFromDriverValue(value: string): Date {\n\t\treturn new Date(value);\n\t}\n\n\toverride mapToDriverValue(value: Date): string {\n\t\treturn value.toISOString();\n\t}\n}\n\nexport type PgDateStringBuilderInitial<TName extends string> = PgDateStringBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgDateString';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgDateStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgDateString'>>\n\textends PgDateColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgDateStringBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'PgDateString');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgDateString<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgDateString<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgDateString<T extends ColumnBaseConfig<'string', 'PgDateString'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgDateString';\n\n\tgetSQLType(): string {\n\t\treturn 'date';\n\t}\n}\n\nexport interface PgDateConfig<T extends 'date' | 'string' = 'date' | 'string'> {\n\tmode: T;\n}\n\nexport function date(): PgDateStringBuilderInitial<''>;\nexport function date<TMode extends PgDateConfig['mode'] & {}>(\n\tconfig?: PgDateConfig<TMode>,\n): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<''> : PgDateStringBuilderInitial<''>;\nexport function date<TName extends string, TMode extends PgDateConfig['mode'] & {}>(\n\tname: TName,\n\tconfig?: PgDateConfig<TMode>,\n): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<TName> : PgDateStringBuilderInitial<TName>;\nexport function date(a?: string | PgDateConfig, b?: PgDateConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgDateConfig>(a, b);\n\tif (config?.mode === 'date') {\n\t\treturn new PgDateBuilder(name);\n\t}\n\treturn new PgDateStringBuilder(name);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAmD;AACnD,oBAAyB;AACzB,yBAAwC;AAWjC,MAAM,sBAA2E,2CAA2B;AAAA,EAClH,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,QAAQ,QAAQ;AAAA,EAC7B;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA6D,uBAAY;AAAA,EACrF,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAqB;AAChD,WAAO,IAAI,KAAK,KAAK;AAAA,EACtB;AAAA,EAES,iBAAiB,OAAqB;AAC9C,WAAO,MAAM,YAAY;AAAA,EAC1B;AACD;AAWO,MAAM,4BACJ,2CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,cAAc;AAAA,EACrC;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBAA2E,uBAAY;AAAA,EACnG,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAcO,SAAS,KAAK,GAA2B,GAAkB;AACjE,QAAM,EAAE,MAAM,OAAO,QAAI,qCAAqC,GAAG,CAAC;AAClE,MAAI,QAAQ,SAAS,QAAQ;AAC5B,WAAO,IAAI,cAAc,IAAI;AAAA,EAC9B;AACA,SAAO,IAAI,oBAAoB,IAAI;AACpC;","names":[]}

View File

@ -0,0 +1,37 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var date_common_exports = {};
__export(date_common_exports, {
PgDateColumnBaseBuilder: () => PgDateColumnBaseBuilder
});
module.exports = __toCommonJS(date_common_exports);
var import_entity = require("../../entity.cjs");
var import_sql = require("../../sql/sql.cjs");
var import_common = require("./common.cjs");
class PgDateColumnBaseBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgDateColumnBaseBuilder";
defaultNow() {
return this.default(import_sql.sql`now()`);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgDateColumnBaseBuilder
});
//# sourceMappingURL=date.common.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/date.common.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnDataType } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { sql } from '~/sql/sql.ts';\nimport { PgColumnBuilder } from './common.ts';\n\nexport abstract class PgDateColumnBaseBuilder<\n\tT extends ColumnBuilderBaseConfig<ColumnDataType, string>,\n\tTRuntimeConfig extends object = object,\n> extends PgColumnBuilder<T, TRuntimeConfig> {\n\tstatic override readonly [entityKind]: string = 'PgDateColumnBaseBuilder';\n\n\tdefaultNow() {\n\t\treturn this.default(sql`now()`);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAC3B,iBAAoB;AACpB,oBAAgC;AAEzB,MAAe,gCAGZ,8BAAmC;AAAA,EAC5C,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAa;AACZ,WAAO,KAAK,QAAQ,qBAAU;AAAA,EAC/B;AACD;","names":[]}

View File

@ -0,0 +1,7 @@
import type { ColumnBuilderBaseConfig, ColumnDataType } from "../../column-builder.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumnBuilder } from "./common.cjs";
export declare abstract class PgDateColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object> extends PgColumnBuilder<T, TRuntimeConfig> {
static readonly [entityKind]: string;
defaultNow(): import("../../column-builder.ts").HasDefault<this>;
}

View File

@ -0,0 +1,7 @@
import type { ColumnBuilderBaseConfig, ColumnDataType } from "../../column-builder.js";
import { entityKind } from "../../entity.js";
import { PgColumnBuilder } from "./common.js";
export declare abstract class PgDateColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object> extends PgColumnBuilder<T, TRuntimeConfig> {
static readonly [entityKind]: string;
defaultNow(): import("../../column-builder.js").HasDefault<this>;
}

View File

@ -0,0 +1,13 @@
import { entityKind } from "../../entity.js";
import { sql } from "../../sql/sql.js";
import { PgColumnBuilder } from "./common.js";
class PgDateColumnBaseBuilder extends PgColumnBuilder {
static [entityKind] = "PgDateColumnBaseBuilder";
defaultNow() {
return this.default(sql`now()`);
}
}
export {
PgDateColumnBaseBuilder
};
//# sourceMappingURL=date.common.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/date.common.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnDataType } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { sql } from '~/sql/sql.ts';\nimport { PgColumnBuilder } from './common.ts';\n\nexport abstract class PgDateColumnBaseBuilder<\n\tT extends ColumnBuilderBaseConfig<ColumnDataType, string>,\n\tTRuntimeConfig extends object = object,\n> extends PgColumnBuilder<T, TRuntimeConfig> {\n\tstatic override readonly [entityKind]: string = 'PgDateColumnBaseBuilder';\n\n\tdefaultNow() {\n\t\treturn this.default(sql`now()`);\n\t}\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAC3B,SAAS,WAAW;AACpB,SAAS,uBAAuB;AAEzB,MAAe,gCAGZ,gBAAmC;AAAA,EAC5C,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAa;AACZ,WAAO,KAAK,QAAQ,UAAU;AAAA,EAC/B;AACD;","names":[]}

46
node_modules/drizzle-orm/pg-core/columns/date.d.cts generated vendored Normal file
View File

@ -0,0 +1,46 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Equal } from "../../utils.cjs";
import { PgColumn } from "./common.cjs";
import { PgDateColumnBaseBuilder } from "./date.common.cjs";
export type PgDateBuilderInitial<TName extends string> = PgDateBuilder<{
name: TName;
dataType: 'date';
columnType: 'PgDate';
data: Date;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgDateBuilder<T extends ColumnBuilderBaseConfig<'date', 'PgDate'>> extends PgDateColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgDate<T extends ColumnBaseConfig<'date', 'PgDate'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): Date;
mapToDriverValue(value: Date): string;
}
export type PgDateStringBuilderInitial<TName extends string> = PgDateStringBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgDateString';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgDateStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgDateString'>> extends PgDateColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgDateString<T extends ColumnBaseConfig<'string', 'PgDateString'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export interface PgDateConfig<T extends 'date' | 'string' = 'date' | 'string'> {
mode: T;
}
export declare function date(): PgDateStringBuilderInitial<''>;
export declare function date<TMode extends PgDateConfig['mode'] & {}>(config?: PgDateConfig<TMode>): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<''> : PgDateStringBuilderInitial<''>;
export declare function date<TName extends string, TMode extends PgDateConfig['mode'] & {}>(name: TName, config?: PgDateConfig<TMode>): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<TName> : PgDateStringBuilderInitial<TName>;

46
node_modules/drizzle-orm/pg-core/columns/date.d.ts generated vendored Normal file
View File

@ -0,0 +1,46 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { type Equal } from "../../utils.js";
import { PgColumn } from "./common.js";
import { PgDateColumnBaseBuilder } from "./date.common.js";
export type PgDateBuilderInitial<TName extends string> = PgDateBuilder<{
name: TName;
dataType: 'date';
columnType: 'PgDate';
data: Date;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgDateBuilder<T extends ColumnBuilderBaseConfig<'date', 'PgDate'>> extends PgDateColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgDate<T extends ColumnBaseConfig<'date', 'PgDate'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): Date;
mapToDriverValue(value: Date): string;
}
export type PgDateStringBuilderInitial<TName extends string> = PgDateStringBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgDateString';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgDateStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgDateString'>> extends PgDateColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgDateString<T extends ColumnBaseConfig<'string', 'PgDateString'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export interface PgDateConfig<T extends 'date' | 'string' = 'date' | 'string'> {
mode: T;
}
export declare function date(): PgDateStringBuilderInitial<''>;
export declare function date<TMode extends PgDateConfig['mode'] & {}>(config?: PgDateConfig<TMode>): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<''> : PgDateStringBuilderInitial<''>;
export declare function date<TName extends string, TMode extends PgDateConfig['mode'] & {}>(name: TName, config?: PgDateConfig<TMode>): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<TName> : PgDateStringBuilderInitial<TName>;

60
node_modules/drizzle-orm/pg-core/columns/date.js generated vendored Normal file
View File

@ -0,0 +1,60 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { PgColumn } from "./common.js";
import { PgDateColumnBaseBuilder } from "./date.common.js";
class PgDateBuilder extends PgDateColumnBaseBuilder {
static [entityKind] = "PgDateBuilder";
constructor(name) {
super(name, "date", "PgDate");
}
/** @internal */
build(table) {
return new PgDate(table, this.config);
}
}
class PgDate extends PgColumn {
static [entityKind] = "PgDate";
getSQLType() {
return "date";
}
mapFromDriverValue(value) {
return new Date(value);
}
mapToDriverValue(value) {
return value.toISOString();
}
}
class PgDateStringBuilder extends PgDateColumnBaseBuilder {
static [entityKind] = "PgDateStringBuilder";
constructor(name) {
super(name, "string", "PgDateString");
}
/** @internal */
build(table) {
return new PgDateString(
table,
this.config
);
}
}
class PgDateString extends PgColumn {
static [entityKind] = "PgDateString";
getSQLType() {
return "date";
}
}
function date(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
if (config?.mode === "date") {
return new PgDateBuilder(name);
}
return new PgDateStringBuilder(name);
}
export {
PgDate,
PgDateBuilder,
PgDateString,
PgDateStringBuilder,
date
};
//# sourceMappingURL=date.js.map

1
node_modules/drizzle-orm/pg-core/columns/date.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/date.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { type Equal, getColumnNameAndConfig } from '~/utils.ts';\nimport { PgColumn } from './common.ts';\nimport { PgDateColumnBaseBuilder } from './date.common.ts';\n\nexport type PgDateBuilderInitial<TName extends string> = PgDateBuilder<{\n\tname: TName;\n\tdataType: 'date';\n\tcolumnType: 'PgDate';\n\tdata: Date;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgDateBuilder<T extends ColumnBuilderBaseConfig<'date', 'PgDate'>> extends PgDateColumnBaseBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgDateBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'date', 'PgDate');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgDate<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgDate<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgDate<T extends ColumnBaseConfig<'date', 'PgDate'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgDate';\n\n\tgetSQLType(): string {\n\t\treturn 'date';\n\t}\n\n\toverride mapFromDriverValue(value: string): Date {\n\t\treturn new Date(value);\n\t}\n\n\toverride mapToDriverValue(value: Date): string {\n\t\treturn value.toISOString();\n\t}\n}\n\nexport type PgDateStringBuilderInitial<TName extends string> = PgDateStringBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgDateString';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgDateStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgDateString'>>\n\textends PgDateColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgDateStringBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'PgDateString');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgDateString<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgDateString<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgDateString<T extends ColumnBaseConfig<'string', 'PgDateString'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgDateString';\n\n\tgetSQLType(): string {\n\t\treturn 'date';\n\t}\n}\n\nexport interface PgDateConfig<T extends 'date' | 'string' = 'date' | 'string'> {\n\tmode: T;\n}\n\nexport function date(): PgDateStringBuilderInitial<''>;\nexport function date<TMode extends PgDateConfig['mode'] & {}>(\n\tconfig?: PgDateConfig<TMode>,\n): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<''> : PgDateStringBuilderInitial<''>;\nexport function date<TName extends string, TMode extends PgDateConfig['mode'] & {}>(\n\tname: TName,\n\tconfig?: PgDateConfig<TMode>,\n): Equal<TMode, 'date'> extends true ? PgDateBuilderInitial<TName> : PgDateStringBuilderInitial<TName>;\nexport function date(a?: string | PgDateConfig, b?: PgDateConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgDateConfig>(a, b);\n\tif (config?.mode === 'date') {\n\t\treturn new PgDateBuilder(name);\n\t}\n\treturn new PgDateStringBuilder(name);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAqB,8BAA8B;AACnD,SAAS,gBAAgB;AACzB,SAAS,+BAA+B;AAWjC,MAAM,sBAA2E,wBAA2B;AAAA,EAClH,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,QAAQ,QAAQ;AAAA,EAC7B;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA6D,SAAY;AAAA,EACrF,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAqB;AAChD,WAAO,IAAI,KAAK,KAAK;AAAA,EACtB;AAAA,EAES,iBAAiB,OAAqB;AAC9C,WAAO,MAAM,YAAY;AAAA,EAC1B;AACD;AAWO,MAAM,4BACJ,wBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,cAAc;AAAA,EACrC;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBAA2E,SAAY;AAAA,EACnG,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAcO,SAAS,KAAK,GAA2B,GAAkB;AACjE,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAqC,GAAG,CAAC;AAClE,MAAI,QAAQ,SAAS,QAAQ;AAC5B,WAAO,IAAI,cAAc,IAAI;AAAA,EAC9B;AACA,SAAO,IAAI,oBAAoB,IAAI;AACpC;","names":[]}

View File

@ -0,0 +1,62 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var double_precision_exports = {};
__export(double_precision_exports, {
PgDoublePrecision: () => PgDoublePrecision,
PgDoublePrecisionBuilder: () => PgDoublePrecisionBuilder,
doublePrecision: () => doublePrecision
});
module.exports = __toCommonJS(double_precision_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgDoublePrecisionBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgDoublePrecisionBuilder";
constructor(name) {
super(name, "number", "PgDoublePrecision");
}
/** @internal */
build(table) {
return new PgDoublePrecision(
table,
this.config
);
}
}
class PgDoublePrecision extends import_common.PgColumn {
static [import_entity.entityKind] = "PgDoublePrecision";
getSQLType() {
return "double precision";
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number.parseFloat(value);
}
return value;
}
}
function doublePrecision(name) {
return new PgDoublePrecisionBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgDoublePrecision,
PgDoublePrecisionBuilder,
doublePrecision
});
//# sourceMappingURL=double-precision.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/double-precision.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgDoublePrecisionBuilderInitial<TName extends string> = PgDoublePrecisionBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'PgDoublePrecision';\n\tdata: number;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n}>;\n\nexport class PgDoublePrecisionBuilder<T extends ColumnBuilderBaseConfig<'number', 'PgDoublePrecision'>>\n\textends PgColumnBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgDoublePrecisionBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'PgDoublePrecision');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgDoublePrecision<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgDoublePrecision<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgDoublePrecision<T extends ColumnBaseConfig<'number', 'PgDoublePrecision'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgDoublePrecision';\n\n\tgetSQLType(): string {\n\t\treturn 'double precision';\n\t}\n\n\toverride mapFromDriverValue(value: string | number): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number.parseFloat(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function doublePrecision(): PgDoublePrecisionBuilderInitial<''>;\nexport function doublePrecision<TName extends string>(name: TName): PgDoublePrecisionBuilderInitial<TName>;\nexport function doublePrecision(name?: string) {\n\treturn new PgDoublePrecisionBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA0C;AAWnC,MAAM,iCACJ,8BACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,mBAAmB;AAAA,EAC1C;AAAA;AAAA,EAGS,MACR,OACqD;AACrD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,0BAAqF,uBAAY;AAAA,EAC7G,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,WAAW,KAAK;AAAA,IAC/B;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,gBAAgB,MAAe;AAC9C,SAAO,IAAI,yBAAyB,QAAQ,EAAE;AAC/C;","names":[]}

View File

@ -0,0 +1,23 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgDoublePrecisionBuilderInitial<TName extends string> = PgDoublePrecisionBuilder<{
name: TName;
dataType: 'number';
columnType: 'PgDoublePrecision';
data: number;
driverParam: string | number;
enumValues: undefined;
}>;
export declare class PgDoublePrecisionBuilder<T extends ColumnBuilderBaseConfig<'number', 'PgDoublePrecision'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgDoublePrecision<T extends ColumnBaseConfig<'number', 'PgDoublePrecision'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string | number): number;
}
export declare function doublePrecision(): PgDoublePrecisionBuilderInitial<''>;
export declare function doublePrecision<TName extends string>(name: TName): PgDoublePrecisionBuilderInitial<TName>;

View File

@ -0,0 +1,23 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgDoublePrecisionBuilderInitial<TName extends string> = PgDoublePrecisionBuilder<{
name: TName;
dataType: 'number';
columnType: 'PgDoublePrecision';
data: number;
driverParam: string | number;
enumValues: undefined;
}>;
export declare class PgDoublePrecisionBuilder<T extends ColumnBuilderBaseConfig<'number', 'PgDoublePrecision'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgDoublePrecision<T extends ColumnBaseConfig<'number', 'PgDoublePrecision'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string | number): number;
}
export declare function doublePrecision(): PgDoublePrecisionBuilderInitial<''>;
export declare function doublePrecision<TName extends string>(name: TName): PgDoublePrecisionBuilderInitial<TName>;

View File

@ -0,0 +1,36 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgDoublePrecisionBuilder extends PgColumnBuilder {
static [entityKind] = "PgDoublePrecisionBuilder";
constructor(name) {
super(name, "number", "PgDoublePrecision");
}
/** @internal */
build(table) {
return new PgDoublePrecision(
table,
this.config
);
}
}
class PgDoublePrecision extends PgColumn {
static [entityKind] = "PgDoublePrecision";
getSQLType() {
return "double precision";
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number.parseFloat(value);
}
return value;
}
}
function doublePrecision(name) {
return new PgDoublePrecisionBuilder(name ?? "");
}
export {
PgDoublePrecision,
PgDoublePrecisionBuilder,
doublePrecision
};
//# sourceMappingURL=double-precision.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/double-precision.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgDoublePrecisionBuilderInitial<TName extends string> = PgDoublePrecisionBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'PgDoublePrecision';\n\tdata: number;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n}>;\n\nexport class PgDoublePrecisionBuilder<T extends ColumnBuilderBaseConfig<'number', 'PgDoublePrecision'>>\n\textends PgColumnBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgDoublePrecisionBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'PgDoublePrecision');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgDoublePrecision<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgDoublePrecision<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgDoublePrecision<T extends ColumnBaseConfig<'number', 'PgDoublePrecision'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgDoublePrecision';\n\n\tgetSQLType(): string {\n\t\treturn 'double precision';\n\t}\n\n\toverride mapFromDriverValue(value: string | number): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number.parseFloat(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function doublePrecision(): PgDoublePrecisionBuilderInitial<''>;\nexport function doublePrecision<TName extends string>(name: TName): PgDoublePrecisionBuilderInitial<TName>;\nexport function doublePrecision(name?: string) {\n\treturn new PgDoublePrecisionBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,UAAU,uBAAuB;AAWnC,MAAM,iCACJ,gBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,mBAAmB;AAAA,EAC1C;AAAA;AAAA,EAGS,MACR,OACqD;AACrD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,0BAAqF,SAAY;AAAA,EAC7G,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,WAAW,KAAK;AAAA,IAC/B;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,gBAAgB,MAAe;AAC9C,SAAO,IAAI,yBAAyB,QAAQ,EAAE;AAC/C;","names":[]}

83
node_modules/drizzle-orm/pg-core/columns/enum.cjs generated vendored Normal file
View File

@ -0,0 +1,83 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var enum_exports = {};
__export(enum_exports, {
PgEnumColumn: () => PgEnumColumn,
PgEnumColumnBuilder: () => PgEnumColumnBuilder,
isPgEnum: () => isPgEnum,
pgEnum: () => pgEnum,
pgEnumWithSchema: () => pgEnumWithSchema
});
module.exports = __toCommonJS(enum_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
const isPgEnumSym = Symbol.for("drizzle:isPgEnum");
function isPgEnum(obj) {
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
}
class PgEnumColumnBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgEnumColumnBuilder";
constructor(name, enumInstance) {
super(name, "string", "PgEnumColumn");
this.config.enum = enumInstance;
}
/** @internal */
build(table) {
return new PgEnumColumn(
table,
this.config
);
}
}
class PgEnumColumn extends import_common.PgColumn {
static [import_entity.entityKind] = "PgEnumColumn";
enum = this.config.enum;
enumValues = this.config.enum.enumValues;
constructor(table, config) {
super(table, config);
this.enum = config.enum;
}
getSQLType() {
return this.enum.enumName;
}
}
function pgEnum(enumName, values) {
return pgEnumWithSchema(enumName, values, void 0);
}
function pgEnumWithSchema(enumName, values, schema) {
const enumInstance = Object.assign(
(name) => new PgEnumColumnBuilder(name ?? "", enumInstance),
{
enumName,
enumValues: values,
schema,
[isPgEnumSym]: true
}
);
return enumInstance;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgEnumColumn,
PgEnumColumnBuilder,
isPgEnum,
pgEnum,
pgEnumWithSchema
});
//# sourceMappingURL=enum.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/enum.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport type { Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgEnumColumnBuilderInitial<TName extends string, TValues extends [string, ...string[]]> =\n\tPgEnumColumnBuilder<{\n\t\tname: TName;\n\t\tdataType: 'string';\n\t\tcolumnType: 'PgEnumColumn';\n\t\tdata: TValues[number];\n\t\tenumValues: TValues;\n\t\tdriverParam: string;\n\t}>;\n\nconst isPgEnumSym = Symbol.for('drizzle:isPgEnum');\nexport interface PgEnum<TValues extends [string, ...string[]]> {\n\t(): PgEnumColumnBuilderInitial<'', TValues>;\n\t<TName extends string>(name: TName): PgEnumColumnBuilderInitial<TName, TValues>;\n\t<TName extends string>(name?: TName): PgEnumColumnBuilderInitial<TName, TValues>;\n\n\treadonly enumName: string;\n\treadonly enumValues: TValues;\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]> {\n\treturn !!obj && typeof obj === 'function' && isPgEnumSym in obj && obj[isPgEnumSym] === true;\n}\n\nexport class PgEnumColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] },\n> extends PgColumnBuilder<T, { enum: PgEnum<T['enumValues']> }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnum<T['enumValues']>) {\n\t\tsuper(name, 'string', 'PgEnumColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumColumn<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgEnumColumn<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgEnumColumn<T extends ColumnBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] }>\n\textends PgColumn<T, { enum: PgEnum<T['enumValues']> }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumColumn';\n\n\treadonly enum = this.config.enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumColumnBuilder<T>['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\n// Gratitude to zod for the enum function types\nexport function pgEnum<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tenumName: string,\n\tvalues: T | Writable<T>,\n): PgEnum<Writable<T>> {\n\treturn pgEnumWithSchema(enumName, values, undefined);\n}\n\n/** @internal */\nexport function pgEnumWithSchema<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tenumName: string,\n\tvalues: T | Writable<T>,\n\tschema?: string,\n): PgEnum<Writable<T>> {\n\tconst enumInstance: PgEnum<Writable<T>> = Object.assign(\n\t\t<TName extends string>(name?: TName): PgEnumColumnBuilderInitial<TName, Writable<T>> =>\n\t\t\tnew PgEnumColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: values,\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAG3B,oBAA0C;AAY1C,MAAM,cAAc,OAAO,IAAI,kBAAkB;AAa1C,SAAS,SAAS,KAAoD;AAC5E,SAAO,CAAC,CAAC,OAAO,OAAO,QAAQ,cAAc,eAAe,OAAO,IAAI,WAAW,MAAM;AACzF;AAEO,MAAM,4BAEH,8BAAsD;AAAA,EAC/D,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,cAAuC;AACnE,UAAM,MAAM,UAAU,cAAc;AACpC,SAAK,OAAO,OAAO;AAAA,EACpB;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,uBACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,OAAO,KAAK,OAAO;AAAA,EACV,aAAa,KAAK,OAAO,KAAK;AAAA,EAEhD,YACC,OACA,QACC;AACD,UAAM,OAAO,MAAM;AACnB,SAAK,OAAO,OAAO;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO,KAAK,KAAK;AAAA,EAClB;AACD;AAGO,SAAS,OACf,UACA,QACsB;AACtB,SAAO,iBAAiB,UAAU,QAAQ,MAAS;AACpD;AAGO,SAAS,iBACf,UACA,QACA,QACsB;AACtB,QAAM,eAAoC,OAAO;AAAA,IAChD,CAAuB,SACtB,IAAI,oBAAoB,QAAQ,IAAa,YAAY;AAAA,IAC1D;AAAA,MACC;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA,CAAC,WAAW,GAAG;AAAA,IAChB;AAAA,EACD;AAEA,SAAO;AACR;","names":[]}

45
node_modules/drizzle-orm/pg-core/columns/enum.d.cts generated vendored Normal file
View File

@ -0,0 +1,45 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { AnyPgTable } from "../table.cjs";
import type { Writable } from "../../utils.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgEnumColumnBuilderInitial<TName extends string, TValues extends [string, ...string[]]> = PgEnumColumnBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgEnumColumn';
data: TValues[number];
enumValues: TValues;
driverParam: string;
}>;
export interface PgEnum<TValues extends [string, ...string[]]> {
(): PgEnumColumnBuilderInitial<'', TValues>;
<TName extends string>(name: TName): PgEnumColumnBuilderInitial<TName, TValues>;
<TName extends string>(name?: TName): PgEnumColumnBuilderInitial<TName, TValues>;
readonly enumName: string;
readonly enumValues: TValues;
readonly schema: string | undefined;
}
export declare function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]>;
export declare class PgEnumColumnBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & {
enumValues: [string, ...string[]];
}> extends PgColumnBuilder<T, {
enum: PgEnum<T['enumValues']>;
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], enumInstance: PgEnum<T['enumValues']>);
}
export declare class PgEnumColumn<T extends ColumnBaseConfig<'string', 'PgEnumColumn'> & {
enumValues: [string, ...string[]];
}> extends PgColumn<T, {
enum: PgEnum<T['enumValues']>;
}> {
static readonly [entityKind]: string;
readonly enum: PgEnum<T["enumValues"]>;
readonly enumValues: T["enumValues"];
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgEnumColumnBuilder<T>['config']);
getSQLType(): string;
}
export declare function pgEnum<U extends string, T extends Readonly<[U, ...U[]]>>(enumName: string, values: T | Writable<T>): PgEnum<Writable<T>>;

45
node_modules/drizzle-orm/pg-core/columns/enum.d.ts generated vendored Normal file
View File

@ -0,0 +1,45 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { AnyPgTable } from "../table.js";
import type { Writable } from "../../utils.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgEnumColumnBuilderInitial<TName extends string, TValues extends [string, ...string[]]> = PgEnumColumnBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgEnumColumn';
data: TValues[number];
enumValues: TValues;
driverParam: string;
}>;
export interface PgEnum<TValues extends [string, ...string[]]> {
(): PgEnumColumnBuilderInitial<'', TValues>;
<TName extends string>(name: TName): PgEnumColumnBuilderInitial<TName, TValues>;
<TName extends string>(name?: TName): PgEnumColumnBuilderInitial<TName, TValues>;
readonly enumName: string;
readonly enumValues: TValues;
readonly schema: string | undefined;
}
export declare function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]>;
export declare class PgEnumColumnBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & {
enumValues: [string, ...string[]];
}> extends PgColumnBuilder<T, {
enum: PgEnum<T['enumValues']>;
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], enumInstance: PgEnum<T['enumValues']>);
}
export declare class PgEnumColumn<T extends ColumnBaseConfig<'string', 'PgEnumColumn'> & {
enumValues: [string, ...string[]];
}> extends PgColumn<T, {
enum: PgEnum<T['enumValues']>;
}> {
static readonly [entityKind]: string;
readonly enum: PgEnum<T["enumValues"]>;
readonly enumValues: T["enumValues"];
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgEnumColumnBuilder<T>['config']);
getSQLType(): string;
}
export declare function pgEnum<U extends string, T extends Readonly<[U, ...U[]]>>(enumName: string, values: T | Writable<T>): PgEnum<Writable<T>>;

55
node_modules/drizzle-orm/pg-core/columns/enum.js generated vendored Normal file
View File

@ -0,0 +1,55 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
const isPgEnumSym = Symbol.for("drizzle:isPgEnum");
function isPgEnum(obj) {
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
}
class PgEnumColumnBuilder extends PgColumnBuilder {
static [entityKind] = "PgEnumColumnBuilder";
constructor(name, enumInstance) {
super(name, "string", "PgEnumColumn");
this.config.enum = enumInstance;
}
/** @internal */
build(table) {
return new PgEnumColumn(
table,
this.config
);
}
}
class PgEnumColumn extends PgColumn {
static [entityKind] = "PgEnumColumn";
enum = this.config.enum;
enumValues = this.config.enum.enumValues;
constructor(table, config) {
super(table, config);
this.enum = config.enum;
}
getSQLType() {
return this.enum.enumName;
}
}
function pgEnum(enumName, values) {
return pgEnumWithSchema(enumName, values, void 0);
}
function pgEnumWithSchema(enumName, values, schema) {
const enumInstance = Object.assign(
(name) => new PgEnumColumnBuilder(name ?? "", enumInstance),
{
enumName,
enumValues: values,
schema,
[isPgEnumSym]: true
}
);
return enumInstance;
}
export {
PgEnumColumn,
PgEnumColumnBuilder,
isPgEnum,
pgEnum,
pgEnumWithSchema
};
//# sourceMappingURL=enum.js.map

1
node_modules/drizzle-orm/pg-core/columns/enum.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/enum.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport type { Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgEnumColumnBuilderInitial<TName extends string, TValues extends [string, ...string[]]> =\n\tPgEnumColumnBuilder<{\n\t\tname: TName;\n\t\tdataType: 'string';\n\t\tcolumnType: 'PgEnumColumn';\n\t\tdata: TValues[number];\n\t\tenumValues: TValues;\n\t\tdriverParam: string;\n\t}>;\n\nconst isPgEnumSym = Symbol.for('drizzle:isPgEnum');\nexport interface PgEnum<TValues extends [string, ...string[]]> {\n\t(): PgEnumColumnBuilderInitial<'', TValues>;\n\t<TName extends string>(name: TName): PgEnumColumnBuilderInitial<TName, TValues>;\n\t<TName extends string>(name?: TName): PgEnumColumnBuilderInitial<TName, TValues>;\n\n\treadonly enumName: string;\n\treadonly enumValues: TValues;\n\treadonly schema: string | undefined;\n\t/** @internal */\n\t[isPgEnumSym]: true;\n}\n\nexport function isPgEnum(obj: unknown): obj is PgEnum<[string, ...string[]]> {\n\treturn !!obj && typeof obj === 'function' && isPgEnumSym in obj && obj[isPgEnumSym] === true;\n}\n\nexport class PgEnumColumnBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] },\n> extends PgColumnBuilder<T, { enum: PgEnum<T['enumValues']> }> {\n\tstatic override readonly [entityKind]: string = 'PgEnumColumnBuilder';\n\n\tconstructor(name: T['name'], enumInstance: PgEnum<T['enumValues']>) {\n\t\tsuper(name, 'string', 'PgEnumColumn');\n\t\tthis.config.enum = enumInstance;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgEnumColumn<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgEnumColumn<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgEnumColumn<T extends ColumnBaseConfig<'string', 'PgEnumColumn'> & { enumValues: [string, ...string[]] }>\n\textends PgColumn<T, { enum: PgEnum<T['enumValues']> }>\n{\n\tstatic override readonly [entityKind]: string = 'PgEnumColumn';\n\n\treadonly enum = this.config.enum;\n\toverride readonly enumValues = this.config.enum.enumValues;\n\n\tconstructor(\n\t\ttable: AnyPgTable<{ name: T['tableName'] }>,\n\t\tconfig: PgEnumColumnBuilder<T>['config'],\n\t) {\n\t\tsuper(table, config);\n\t\tthis.enum = config.enum;\n\t}\n\n\tgetSQLType(): string {\n\t\treturn this.enum.enumName;\n\t}\n}\n\n// Gratitude to zod for the enum function types\nexport function pgEnum<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tenumName: string,\n\tvalues: T | Writable<T>,\n): PgEnum<Writable<T>> {\n\treturn pgEnumWithSchema(enumName, values, undefined);\n}\n\n/** @internal */\nexport function pgEnumWithSchema<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tenumName: string,\n\tvalues: T | Writable<T>,\n\tschema?: string,\n): PgEnum<Writable<T>> {\n\tconst enumInstance: PgEnum<Writable<T>> = Object.assign(\n\t\t<TName extends string>(name?: TName): PgEnumColumnBuilderInitial<TName, Writable<T>> =>\n\t\t\tnew PgEnumColumnBuilder(name ?? '' as TName, enumInstance),\n\t\t{\n\t\t\tenumName,\n\t\t\tenumValues: values,\n\t\t\tschema,\n\t\t\t[isPgEnumSym]: true,\n\t\t} as const,\n\t);\n\n\treturn enumInstance;\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAG3B,SAAS,UAAU,uBAAuB;AAY1C,MAAM,cAAc,OAAO,IAAI,kBAAkB;AAa1C,SAAS,SAAS,KAAoD;AAC5E,SAAO,CAAC,CAAC,OAAO,OAAO,QAAQ,cAAc,eAAe,OAAO,IAAI,WAAW,MAAM;AACzF;AAEO,MAAM,4BAEH,gBAAsD;AAAA,EAC/D,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,cAAuC;AACnE,UAAM,MAAM,UAAU,cAAc;AACpC,SAAK,OAAO,OAAO;AAAA,EACpB;AAAA;AAAA,EAGS,MACR,OACgD;AAChD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,qBACJ,SACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,OAAO,KAAK,OAAO;AAAA,EACV,aAAa,KAAK,OAAO,KAAK;AAAA,EAEhD,YACC,OACA,QACC;AACD,UAAM,OAAO,MAAM;AACnB,SAAK,OAAO,OAAO;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO,KAAK,KAAK;AAAA,EAClB;AACD;AAGO,SAAS,OACf,UACA,QACsB;AACtB,SAAO,iBAAiB,UAAU,QAAQ,MAAS;AACpD;AAGO,SAAS,iBACf,UACA,QACA,QACsB;AACtB,QAAM,eAAoC,OAAO;AAAA,IAChD,CAAuB,SACtB,IAAI,oBAAoB,QAAQ,IAAa,YAAY;AAAA,IAC1D;AAAA,MACC;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA,CAAC,WAAW,GAAG;AAAA,IAChB;AAAA,EACD;AAEA,SAAO;AACR;","names":[]}

91
node_modules/drizzle-orm/pg-core/columns/index.cjs generated vendored Normal file
View File

@ -0,0 +1,91 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var columns_exports = {};
module.exports = __toCommonJS(columns_exports);
__reExport(columns_exports, require("./bigint.cjs"), module.exports);
__reExport(columns_exports, require("./bigserial.cjs"), module.exports);
__reExport(columns_exports, require("./boolean.cjs"), module.exports);
__reExport(columns_exports, require("./char.cjs"), module.exports);
__reExport(columns_exports, require("./cidr.cjs"), module.exports);
__reExport(columns_exports, require("./common.cjs"), module.exports);
__reExport(columns_exports, require("./custom.cjs"), module.exports);
__reExport(columns_exports, require("./date.cjs"), module.exports);
__reExport(columns_exports, require("./double-precision.cjs"), module.exports);
__reExport(columns_exports, require("./enum.cjs"), module.exports);
__reExport(columns_exports, require("./inet.cjs"), module.exports);
__reExport(columns_exports, require("./int.common.cjs"), module.exports);
__reExport(columns_exports, require("./integer.cjs"), module.exports);
__reExport(columns_exports, require("./interval.cjs"), module.exports);
__reExport(columns_exports, require("./json.cjs"), module.exports);
__reExport(columns_exports, require("./jsonb.cjs"), module.exports);
__reExport(columns_exports, require("./line.cjs"), module.exports);
__reExport(columns_exports, require("./macaddr.cjs"), module.exports);
__reExport(columns_exports, require("./macaddr8.cjs"), module.exports);
__reExport(columns_exports, require("./numeric.cjs"), module.exports);
__reExport(columns_exports, require("./point.cjs"), module.exports);
__reExport(columns_exports, require("./postgis_extension/geometry.cjs"), module.exports);
__reExport(columns_exports, require("./real.cjs"), module.exports);
__reExport(columns_exports, require("./serial.cjs"), module.exports);
__reExport(columns_exports, require("./smallint.cjs"), module.exports);
__reExport(columns_exports, require("./smallserial.cjs"), module.exports);
__reExport(columns_exports, require("./text.cjs"), module.exports);
__reExport(columns_exports, require("./time.cjs"), module.exports);
__reExport(columns_exports, require("./timestamp.cjs"), module.exports);
__reExport(columns_exports, require("./uuid.cjs"), module.exports);
__reExport(columns_exports, require("./varchar.cjs"), module.exports);
__reExport(columns_exports, require("./vector_extension/bit.cjs"), module.exports);
__reExport(columns_exports, require("./vector_extension/halfvec.cjs"), module.exports);
__reExport(columns_exports, require("./vector_extension/sparsevec.cjs"), module.exports);
__reExport(columns_exports, require("./vector_extension/vector.cjs"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./bigint.cjs"),
...require("./bigserial.cjs"),
...require("./boolean.cjs"),
...require("./char.cjs"),
...require("./cidr.cjs"),
...require("./common.cjs"),
...require("./custom.cjs"),
...require("./date.cjs"),
...require("./double-precision.cjs"),
...require("./enum.cjs"),
...require("./inet.cjs"),
...require("./int.common.cjs"),
...require("./integer.cjs"),
...require("./interval.cjs"),
...require("./json.cjs"),
...require("./jsonb.cjs"),
...require("./line.cjs"),
...require("./macaddr.cjs"),
...require("./macaddr8.cjs"),
...require("./numeric.cjs"),
...require("./point.cjs"),
...require("./postgis_extension/geometry.cjs"),
...require("./real.cjs"),
...require("./serial.cjs"),
...require("./smallint.cjs"),
...require("./smallserial.cjs"),
...require("./text.cjs"),
...require("./time.cjs"),
...require("./timestamp.cjs"),
...require("./uuid.cjs"),
...require("./varchar.cjs"),
...require("./vector_extension/bit.cjs"),
...require("./vector_extension/halfvec.cjs"),
...require("./vector_extension/sparsevec.cjs"),
...require("./vector_extension/vector.cjs")
});
//# sourceMappingURL=index.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/index.ts"],"sourcesContent":["export * from './bigint.ts';\nexport * from './bigserial.ts';\nexport * from './boolean.ts';\nexport * from './char.ts';\nexport * from './cidr.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './date.ts';\nexport * from './double-precision.ts';\nexport * from './enum.ts';\nexport * from './inet.ts';\nexport * from './int.common.ts';\nexport * from './integer.ts';\nexport * from './interval.ts';\nexport * from './json.ts';\nexport * from './jsonb.ts';\nexport * from './line.ts';\nexport * from './macaddr.ts';\nexport * from './macaddr8.ts';\nexport * from './numeric.ts';\nexport * from './point.ts';\nexport * from './postgis_extension/geometry.ts';\nexport * from './real.ts';\nexport * from './serial.ts';\nexport * from './smallint.ts';\nexport * from './smallserial.ts';\nexport * from './text.ts';\nexport * from './time.ts';\nexport * from './timestamp.ts';\nexport * from './uuid.ts';\nexport * from './varchar.ts';\nexport * from './vector_extension/bit.ts';\nexport * from './vector_extension/halfvec.ts';\nexport * from './vector_extension/sparsevec.ts';\nexport * from './vector_extension/vector.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,4BAAc,wBAAd;AACA,4BAAc,2BADd;AAEA,4BAAc,yBAFd;AAGA,4BAAc,sBAHd;AAIA,4BAAc,sBAJd;AAKA,4BAAc,wBALd;AAMA,4BAAc,wBANd;AAOA,4BAAc,sBAPd;AAQA,4BAAc,kCARd;AASA,4BAAc,sBATd;AAUA,4BAAc,sBAVd;AAWA,4BAAc,4BAXd;AAYA,4BAAc,yBAZd;AAaA,4BAAc,0BAbd;AAcA,4BAAc,sBAdd;AAeA,4BAAc,uBAfd;AAgBA,4BAAc,sBAhBd;AAiBA,4BAAc,yBAjBd;AAkBA,4BAAc,0BAlBd;AAmBA,4BAAc,yBAnBd;AAoBA,4BAAc,uBApBd;AAqBA,4BAAc,4CArBd;AAsBA,4BAAc,sBAtBd;AAuBA,4BAAc,wBAvBd;AAwBA,4BAAc,0BAxBd;AAyBA,4BAAc,6BAzBd;AA0BA,4BAAc,sBA1Bd;AA2BA,4BAAc,sBA3Bd;AA4BA,4BAAc,2BA5Bd;AA6BA,4BAAc,sBA7Bd;AA8BA,4BAAc,yBA9Bd;AA+BA,4BAAc,sCA/Bd;AAgCA,4BAAc,0CAhCd;AAiCA,4BAAc,4CAjCd;AAkCA,4BAAc,yCAlCd;","names":[]}

35
node_modules/drizzle-orm/pg-core/columns/index.d.cts generated vendored Normal file
View File

@ -0,0 +1,35 @@
export * from "./bigint.cjs";
export * from "./bigserial.cjs";
export * from "./boolean.cjs";
export * from "./char.cjs";
export * from "./cidr.cjs";
export * from "./common.cjs";
export * from "./custom.cjs";
export * from "./date.cjs";
export * from "./double-precision.cjs";
export * from "./enum.cjs";
export * from "./inet.cjs";
export * from "./int.common.cjs";
export * from "./integer.cjs";
export * from "./interval.cjs";
export * from "./json.cjs";
export * from "./jsonb.cjs";
export * from "./line.cjs";
export * from "./macaddr.cjs";
export * from "./macaddr8.cjs";
export * from "./numeric.cjs";
export * from "./point.cjs";
export * from "./postgis_extension/geometry.cjs";
export * from "./real.cjs";
export * from "./serial.cjs";
export * from "./smallint.cjs";
export * from "./smallserial.cjs";
export * from "./text.cjs";
export * from "./time.cjs";
export * from "./timestamp.cjs";
export * from "./uuid.cjs";
export * from "./varchar.cjs";
export * from "./vector_extension/bit.cjs";
export * from "./vector_extension/halfvec.cjs";
export * from "./vector_extension/sparsevec.cjs";
export * from "./vector_extension/vector.cjs";

35
node_modules/drizzle-orm/pg-core/columns/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,35 @@
export * from "./bigint.js";
export * from "./bigserial.js";
export * from "./boolean.js";
export * from "./char.js";
export * from "./cidr.js";
export * from "./common.js";
export * from "./custom.js";
export * from "./date.js";
export * from "./double-precision.js";
export * from "./enum.js";
export * from "./inet.js";
export * from "./int.common.js";
export * from "./integer.js";
export * from "./interval.js";
export * from "./json.js";
export * from "./jsonb.js";
export * from "./line.js";
export * from "./macaddr.js";
export * from "./macaddr8.js";
export * from "./numeric.js";
export * from "./point.js";
export * from "./postgis_extension/geometry.js";
export * from "./real.js";
export * from "./serial.js";
export * from "./smallint.js";
export * from "./smallserial.js";
export * from "./text.js";
export * from "./time.js";
export * from "./timestamp.js";
export * from "./uuid.js";
export * from "./varchar.js";
export * from "./vector_extension/bit.js";
export * from "./vector_extension/halfvec.js";
export * from "./vector_extension/sparsevec.js";
export * from "./vector_extension/vector.js";

36
node_modules/drizzle-orm/pg-core/columns/index.js generated vendored Normal file
View File

@ -0,0 +1,36 @@
export * from "./bigint.js";
export * from "./bigserial.js";
export * from "./boolean.js";
export * from "./char.js";
export * from "./cidr.js";
export * from "./common.js";
export * from "./custom.js";
export * from "./date.js";
export * from "./double-precision.js";
export * from "./enum.js";
export * from "./inet.js";
export * from "./int.common.js";
export * from "./integer.js";
export * from "./interval.js";
export * from "./json.js";
export * from "./jsonb.js";
export * from "./line.js";
export * from "./macaddr.js";
export * from "./macaddr8.js";
export * from "./numeric.js";
export * from "./point.js";
export * from "./postgis_extension/geometry.js";
export * from "./real.js";
export * from "./serial.js";
export * from "./smallint.js";
export * from "./smallserial.js";
export * from "./text.js";
export * from "./time.js";
export * from "./timestamp.js";
export * from "./uuid.js";
export * from "./varchar.js";
export * from "./vector_extension/bit.js";
export * from "./vector_extension/halfvec.js";
export * from "./vector_extension/sparsevec.js";
export * from "./vector_extension/vector.js";
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/index.ts"],"sourcesContent":["export * from './bigint.ts';\nexport * from './bigserial.ts';\nexport * from './boolean.ts';\nexport * from './char.ts';\nexport * from './cidr.ts';\nexport * from './common.ts';\nexport * from './custom.ts';\nexport * from './date.ts';\nexport * from './double-precision.ts';\nexport * from './enum.ts';\nexport * from './inet.ts';\nexport * from './int.common.ts';\nexport * from './integer.ts';\nexport * from './interval.ts';\nexport * from './json.ts';\nexport * from './jsonb.ts';\nexport * from './line.ts';\nexport * from './macaddr.ts';\nexport * from './macaddr8.ts';\nexport * from './numeric.ts';\nexport * from './point.ts';\nexport * from './postgis_extension/geometry.ts';\nexport * from './real.ts';\nexport * from './serial.ts';\nexport * from './smallint.ts';\nexport * from './smallserial.ts';\nexport * from './text.ts';\nexport * from './time.ts';\nexport * from './timestamp.ts';\nexport * from './uuid.ts';\nexport * from './varchar.ts';\nexport * from './vector_extension/bit.ts';\nexport * from './vector_extension/halfvec.ts';\nexport * from './vector_extension/sparsevec.ts';\nexport * from './vector_extension/vector.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}

53
node_modules/drizzle-orm/pg-core/columns/inet.cjs generated vendored Normal file
View File

@ -0,0 +1,53 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var inet_exports = {};
__export(inet_exports, {
PgInet: () => PgInet,
PgInetBuilder: () => PgInetBuilder,
inet: () => inet
});
module.exports = __toCommonJS(inet_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgInetBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgInetBuilder";
constructor(name) {
super(name, "string", "PgInet");
}
/** @internal */
build(table) {
return new PgInet(table, this.config);
}
}
class PgInet extends import_common.PgColumn {
static [import_entity.entityKind] = "PgInet";
getSQLType() {
return "inet";
}
}
function inet(name) {
return new PgInetBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgInet,
PgInetBuilder,
inet
});
//# sourceMappingURL=inet.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/inet.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '../table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgInetBuilderInitial<TName extends string> = PgInetBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgInet';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgInetBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgInet'>> extends PgColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgInetBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'PgInet');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgInet<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgInet<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgInet<T extends ColumnBaseConfig<'string', 'PgInet'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgInet';\n\n\tgetSQLType(): string {\n\t\treturn 'inet';\n\t}\n}\n\nexport function inet(): PgInetBuilderInitial<''>;\nexport function inet<TName extends string>(name: TName): PgInetBuilderInitial<TName>;\nexport function inet(name?: string) {\n\treturn new PgInetBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA0C;AAWnC,MAAM,sBAA6E,8BAAmB;AAAA,EAC5G,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,QAAQ;AAAA,EAC/B;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA+D,uBAAY;AAAA,EACvF,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,cAAc,QAAQ,EAAE;AACpC;","names":[]}

22
node_modules/drizzle-orm/pg-core/columns/inet.d.cts generated vendored Normal file
View File

@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgInetBuilderInitial<TName extends string> = PgInetBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgInet';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgInetBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgInet'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgInet<T extends ColumnBaseConfig<'string', 'PgInet'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function inet(): PgInetBuilderInitial<''>;
export declare function inet<TName extends string>(name: TName): PgInetBuilderInitial<TName>;

22
node_modules/drizzle-orm/pg-core/columns/inet.d.ts generated vendored Normal file
View File

@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgInetBuilderInitial<TName extends string> = PgInetBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgInet';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgInetBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgInet'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgInet<T extends ColumnBaseConfig<'string', 'PgInet'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function inet(): PgInetBuilderInitial<''>;
export declare function inet<TName extends string>(name: TName): PgInetBuilderInitial<TName>;

27
node_modules/drizzle-orm/pg-core/columns/inet.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgInetBuilder extends PgColumnBuilder {
static [entityKind] = "PgInetBuilder";
constructor(name) {
super(name, "string", "PgInet");
}
/** @internal */
build(table) {
return new PgInet(table, this.config);
}
}
class PgInet extends PgColumn {
static [entityKind] = "PgInet";
getSQLType() {
return "inet";
}
}
function inet(name) {
return new PgInetBuilder(name ?? "");
}
export {
PgInet,
PgInetBuilder,
inet
};
//# sourceMappingURL=inet.js.map

1
node_modules/drizzle-orm/pg-core/columns/inet.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/inet.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '../table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgInetBuilderInitial<TName extends string> = PgInetBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgInet';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgInetBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgInet'>> extends PgColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'PgInetBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'string', 'PgInet');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgInet<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgInet<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgInet<T extends ColumnBaseConfig<'string', 'PgInet'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgInet';\n\n\tgetSQLType(): string {\n\t\treturn 'inet';\n\t}\n}\n\nexport function inet(): PgInetBuilderInitial<''>;\nexport function inet<TName extends string>(name: TName): PgInetBuilderInitial<TName>;\nexport function inet(name?: string) {\n\treturn new PgInetBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,UAAU,uBAAuB;AAWnC,MAAM,sBAA6E,gBAAmB;AAAA,EAC5G,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,QAAQ;AAAA,EAC/B;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA+D,SAAY;AAAA,EACvF,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,cAAc,QAAQ,EAAE;AACpC;","names":[]}

View File

@ -0,0 +1,67 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var int_common_exports = {};
__export(int_common_exports, {
PgIntColumnBaseBuilder: () => PgIntColumnBaseBuilder
});
module.exports = __toCommonJS(int_common_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgIntColumnBaseBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgIntColumnBaseBuilder";
generatedAlwaysAsIdentity(sequence) {
if (sequence) {
const { name, ...options } = sequence;
this.config.generatedIdentity = {
type: "always",
sequenceName: name,
sequenceOptions: options
};
} else {
this.config.generatedIdentity = {
type: "always"
};
}
this.config.hasDefault = true;
this.config.notNull = true;
return this;
}
generatedByDefaultAsIdentity(sequence) {
if (sequence) {
const { name, ...options } = sequence;
this.config.generatedIdentity = {
type: "byDefault",
sequenceName: name,
sequenceOptions: options
};
} else {
this.config.generatedIdentity = {
type: "byDefault"
};
}
this.config.hasDefault = true;
this.config.notNull = true;
return this;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgIntColumnBaseBuilder
});
//# sourceMappingURL=int.common.cjs.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/int.common.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { PgSequenceOptions } from '../sequence.ts';\nimport { PgColumnBuilder } from './common.ts';\n\nexport abstract class PgIntColumnBaseBuilder<\n\tT extends ColumnBuilderBaseConfig<ColumnDataType, string>,\n> extends PgColumnBuilder<\n\tT,\n\t{ generatedIdentity: GeneratedIdentityConfig }\n> {\n\tstatic override readonly [entityKind]: string = 'PgIntColumnBaseBuilder';\n\n\tgeneratedAlwaysAsIdentity(\n\t\tsequence?: PgSequenceOptions & { name?: string },\n\t): IsIdentity<this, 'always'> {\n\t\tif (sequence) {\n\t\t\tconst { name, ...options } = sequence;\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'always',\n\t\t\t\tsequenceName: name,\n\t\t\t\tsequenceOptions: options,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'always',\n\t\t\t};\n\t\t}\n\n\t\tthis.config.hasDefault = true;\n\t\tthis.config.notNull = true;\n\n\t\treturn this as IsIdentity<this, 'always'>;\n\t}\n\n\tgeneratedByDefaultAsIdentity(\n\t\tsequence?: PgSequenceOptions & { name?: string },\n\t): IsIdentity<this, 'byDefault'> {\n\t\tif (sequence) {\n\t\t\tconst { name, ...options } = sequence;\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'byDefault',\n\t\t\t\tsequenceName: name,\n\t\t\t\tsequenceOptions: options,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'byDefault',\n\t\t\t};\n\t\t}\n\n\t\tthis.config.hasDefault = true;\n\t\tthis.config.notNull = true;\n\n\t\treturn this as IsIdentity<this, 'byDefault'>;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAE3B,oBAAgC;AAEzB,MAAe,+BAEZ,8BAGR;AAAA,EACD,QAA0B,wBAAU,IAAY;AAAA,EAEhD,0BACC,UAC6B;AAC7B,QAAI,UAAU;AACb,YAAM,EAAE,MAAM,GAAG,QAAQ,IAAI;AAC7B,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,QACN,cAAc;AAAA,QACd,iBAAiB;AAAA,MAClB;AAAA,IACD,OAAO;AACN,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,MACP;AAAA,IACD;AAEA,SAAK,OAAO,aAAa;AACzB,SAAK,OAAO,UAAU;AAEtB,WAAO;AAAA,EACR;AAAA,EAEA,6BACC,UACgC;AAChC,QAAI,UAAU;AACb,YAAM,EAAE,MAAM,GAAG,QAAQ,IAAI;AAC7B,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,QACN,cAAc;AAAA,QACd,iBAAiB;AAAA,MAClB;AAAA,IACD,OAAO;AACN,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,MACP;AAAA,IACD;AAEA,SAAK,OAAO,aAAa;AACzB,SAAK,OAAO,UAAU;AAEtB,WAAO;AAAA,EACR;AACD;","names":[]}

View File

@ -0,0 +1,15 @@
import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from "../../column-builder.cjs";
import { entityKind } from "../../entity.cjs";
import type { PgSequenceOptions } from "../sequence.cjs";
import { PgColumnBuilder } from "./common.cjs";
export declare abstract class PgIntColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>> extends PgColumnBuilder<T, {
generatedIdentity: GeneratedIdentityConfig;
}> {
static readonly [entityKind]: string;
generatedAlwaysAsIdentity(sequence?: PgSequenceOptions & {
name?: string;
}): IsIdentity<this, 'always'>;
generatedByDefaultAsIdentity(sequence?: PgSequenceOptions & {
name?: string;
}): IsIdentity<this, 'byDefault'>;
}

View File

@ -0,0 +1,15 @@
import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from "../../column-builder.js";
import { entityKind } from "../../entity.js";
import type { PgSequenceOptions } from "../sequence.js";
import { PgColumnBuilder } from "./common.js";
export declare abstract class PgIntColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>> extends PgColumnBuilder<T, {
generatedIdentity: GeneratedIdentityConfig;
}> {
static readonly [entityKind]: string;
generatedAlwaysAsIdentity(sequence?: PgSequenceOptions & {
name?: string;
}): IsIdentity<this, 'always'>;
generatedByDefaultAsIdentity(sequence?: PgSequenceOptions & {
name?: string;
}): IsIdentity<this, 'byDefault'>;
}

Some files were not shown because too many files have changed in this diff Show More