drizzle-kit 0.23.2-5be2712 → 0.23.2-6f27447
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +894 -511
- package/api.mjs +894 -511
- package/bin.cjs +4044 -49606
- package/package.json +2 -3
- package/utils.js +5 -0
- package/utils.mjs +4 -0
package/api.mjs
CHANGED
@@ -3597,7 +3597,7 @@ function createZodEnum(values, params) {
|
|
3597
3597
|
...processCreateParams(params)
|
3598
3598
|
});
|
3599
3599
|
}
|
3600
|
-
var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType;
|
3600
|
+
var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, coerce;
|
3601
3601
|
var init_lib = __esm({
|
3602
3602
|
"../node_modules/.pnpm/zod@3.23.7/node_modules/zod/lib/index.mjs"() {
|
3603
3603
|
"use strict";
|
@@ -7189,6 +7189,16 @@ var init_lib = __esm({
|
|
7189
7189
|
nullableType = ZodNullable.create;
|
7190
7190
|
preprocessType = ZodEffects.createWithPreprocess;
|
7191
7191
|
pipelineType = ZodPipeline.create;
|
7192
|
+
coerce = {
|
7193
|
+
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
7194
|
+
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
7195
|
+
boolean: (arg) => ZodBoolean.create({
|
7196
|
+
...arg,
|
7197
|
+
coerce: true
|
7198
|
+
}),
|
7199
|
+
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
7200
|
+
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
7201
|
+
};
|
7192
7202
|
}
|
7193
7203
|
});
|
7194
7204
|
|
@@ -8333,10 +8343,18 @@ var init_sqliteSchema = __esm({
|
|
8333
8343
|
});
|
8334
8344
|
|
8335
8345
|
// src/utils.ts
|
8346
|
+
function isPgArrayType(sqlType) {
|
8347
|
+
return sqlType.match(/.*\[\d*\].*|.*\[\].*/g) !== null;
|
8348
|
+
}
|
8336
8349
|
var copy, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey;
|
8337
8350
|
var init_utils = __esm({
|
8338
8351
|
"src/utils.ts"() {
|
8339
8352
|
"use strict";
|
8353
|
+
init_views();
|
8354
|
+
init_global();
|
8355
|
+
init_mysqlSchema();
|
8356
|
+
init_pgSchema();
|
8357
|
+
init_sqliteSchema();
|
8340
8358
|
copy = (it) => {
|
8341
8359
|
return JSON.parse(JSON.stringify(it));
|
8342
8360
|
};
|
@@ -8384,6 +8402,7 @@ var init_views = __esm({
|
|
8384
8402
|
"use strict";
|
8385
8403
|
init_source();
|
8386
8404
|
import_hanji = __toESM(require_hanji());
|
8405
|
+
init_utils();
|
8387
8406
|
warning = (msg) => {
|
8388
8407
|
(0, import_hanji.render)(`[${source_default.yellow("Warning")}] ${msg}`);
|
8389
8408
|
};
|
@@ -8580,6 +8599,7 @@ var init_serializer = __esm({
|
|
8580
8599
|
"src/serializer/index.ts"() {
|
8581
8600
|
"use strict";
|
8582
8601
|
glob = __toESM(require_glob());
|
8602
|
+
init_views();
|
8583
8603
|
sqlToStr = (sql2) => {
|
8584
8604
|
return sql2.toQuery({
|
8585
8605
|
escapeName: () => {
|
@@ -8601,6 +8621,10 @@ var fillPgSnapshot;
|
|
8601
8621
|
var init_migrationPreparator = __esm({
|
8602
8622
|
"src/migrationPreparator.ts"() {
|
8603
8623
|
"use strict";
|
8624
|
+
init_serializer();
|
8625
|
+
init_mysqlSchema();
|
8626
|
+
init_pgSchema();
|
8627
|
+
init_sqliteSchema();
|
8604
8628
|
fillPgSnapshot = ({
|
8605
8629
|
serialized,
|
8606
8630
|
id,
|
@@ -15798,6 +15822,13 @@ var init_snapshotsDiffer = __esm({
|
|
15798
15822
|
}
|
15799
15823
|
});
|
15800
15824
|
|
15825
|
+
// src/utils/words.ts
|
15826
|
+
var init_words = __esm({
|
15827
|
+
"src/utils/words.ts"() {
|
15828
|
+
"use strict";
|
15829
|
+
}
|
15830
|
+
});
|
15831
|
+
|
15801
15832
|
// src/schemaValidator.ts
|
15802
15833
|
var dialects, dialect3, commonSquashedSchema, commonSchema;
|
15803
15834
|
var init_schemaValidator = __esm({
|
@@ -15825,6 +15856,7 @@ var init_common = __esm({
|
|
15825
15856
|
"use strict";
|
15826
15857
|
init_lib();
|
15827
15858
|
init_schemaValidator();
|
15859
|
+
init_outputs();
|
15828
15860
|
sqliteDriversLiterals = [
|
15829
15861
|
literalType("turso"),
|
15830
15862
|
literalType("d1-http"),
|
@@ -15907,6 +15939,7 @@ var init_outputs = __esm({
|
|
15907
15939
|
"src/cli/validations/outputs.ts"() {
|
15908
15940
|
"use strict";
|
15909
15941
|
init_source();
|
15942
|
+
init_common();
|
15910
15943
|
withStyle = {
|
15911
15944
|
error: (str) => `${source_default.red(`${source_default.white.bgRed(" Invalid input ")} ${str}`)}`,
|
15912
15945
|
warning: (str) => `${source_default.white.bgGray(" Warning ")} ${str}`,
|
@@ -15923,8 +15956,16 @@ var import_hanji2, schemasResolver, tablesResolver, sequencesResolver, enumsReso
|
|
15923
15956
|
var init_migrate = __esm({
|
15924
15957
|
"src/cli/commands/migrate.ts"() {
|
15925
15958
|
"use strict";
|
15959
|
+
init_migrationPreparator();
|
15926
15960
|
init_source();
|
15927
15961
|
import_hanji2 = __toESM(require_hanji());
|
15962
|
+
init_mysqlSchema();
|
15963
|
+
init_pgSchema();
|
15964
|
+
init_sqliteSchema();
|
15965
|
+
init_snapshotsDiffer();
|
15966
|
+
init_utils();
|
15967
|
+
init_words();
|
15968
|
+
init_outputs();
|
15928
15969
|
init_views();
|
15929
15970
|
schemasResolver = async (input) => {
|
15930
15971
|
try {
|
@@ -17239,7 +17280,7 @@ var init_mjs = __esm({
|
|
17239
17280
|
}
|
17240
17281
|
});
|
17241
17282
|
|
17242
|
-
// ../
|
17283
|
+
// ../drizzle-orm/dist/entity.js
|
17243
17284
|
function is(value, type) {
|
17244
17285
|
if (!value || typeof value !== "object") {
|
17245
17286
|
return false;
|
@@ -17265,21 +17306,21 @@ function is(value, type) {
|
|
17265
17306
|
}
|
17266
17307
|
var entityKind, hasOwnEntityKind;
|
17267
17308
|
var init_entity = __esm({
|
17268
|
-
"../
|
17309
|
+
"../drizzle-orm/dist/entity.js"() {
|
17269
17310
|
"use strict";
|
17270
17311
|
entityKind = Symbol.for("drizzle:entityKind");
|
17271
17312
|
hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
17272
17313
|
}
|
17273
17314
|
});
|
17274
17315
|
|
17275
|
-
// ../
|
17276
|
-
var _a,
|
17316
|
+
// ../drizzle-orm/dist/column.js
|
17317
|
+
var _a, Column2;
|
17277
17318
|
var init_column = __esm({
|
17278
|
-
"../
|
17319
|
+
"../drizzle-orm/dist/column.js"() {
|
17279
17320
|
"use strict";
|
17280
17321
|
init_entity();
|
17281
17322
|
_a = entityKind;
|
17282
|
-
|
17323
|
+
Column2 = class {
|
17283
17324
|
constructor(table4, config) {
|
17284
17325
|
__publicField(this, "name");
|
17285
17326
|
__publicField(this, "primary");
|
@@ -17325,14 +17366,14 @@ var init_column = __esm({
|
|
17325
17366
|
return this.config.generated !== void 0 && this.config.generated.type !== "byDefault";
|
17326
17367
|
}
|
17327
17368
|
};
|
17328
|
-
__publicField(
|
17369
|
+
__publicField(Column2, _a, "Column");
|
17329
17370
|
}
|
17330
17371
|
});
|
17331
17372
|
|
17332
|
-
// ../
|
17373
|
+
// ../drizzle-orm/dist/column-builder.js
|
17333
17374
|
var _a2, ColumnBuilder;
|
17334
17375
|
var init_column_builder = __esm({
|
17335
|
-
"../
|
17376
|
+
"../drizzle-orm/dist/column-builder.js"() {
|
17336
17377
|
"use strict";
|
17337
17378
|
init_entity();
|
17338
17379
|
_a2 = entityKind;
|
@@ -17434,7 +17475,7 @@ var init_column_builder = __esm({
|
|
17434
17475
|
}
|
17435
17476
|
});
|
17436
17477
|
|
17437
|
-
// ../
|
17478
|
+
// ../drizzle-orm/dist/table.js
|
17438
17479
|
function isTable(table4) {
|
17439
17480
|
return typeof table4 === "object" && table4 !== null && IsDrizzleTable in table4;
|
17440
17481
|
}
|
@@ -17444,9 +17485,9 @@ function getTableName(table4) {
|
|
17444
17485
|
function getTableUniqueName(table4) {
|
17445
17486
|
return `${table4[Schema] ?? "public"}.${table4[TableName]}`;
|
17446
17487
|
}
|
17447
|
-
var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i,
|
17488
|
+
var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i, Table2;
|
17448
17489
|
var init_table = __esm({
|
17449
|
-
"../
|
17490
|
+
"../drizzle-orm/dist/table.js"() {
|
17450
17491
|
"use strict";
|
17451
17492
|
init_entity();
|
17452
17493
|
TableName = Symbol.for("drizzle:Name");
|
@@ -17459,7 +17500,7 @@ var init_table = __esm({
|
|
17459
17500
|
ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder");
|
17460
17501
|
IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable");
|
17461
17502
|
_i = entityKind, _h = TableName, _g = OriginalName, _f = Schema, _e = Columns, _d = ExtraConfigColumns, _c = BaseName, _b = IsAlias, _a3 = ExtraConfigBuilder;
|
17462
|
-
|
17503
|
+
Table2 = class {
|
17463
17504
|
constructor(name2, schema4, baseName) {
|
17464
17505
|
/**
|
17465
17506
|
* @internal
|
@@ -17491,9 +17532,9 @@ var init_table = __esm({
|
|
17491
17532
|
this[BaseName] = baseName;
|
17492
17533
|
}
|
17493
17534
|
};
|
17494
|
-
__publicField(
|
17535
|
+
__publicField(Table2, _i, "Table");
|
17495
17536
|
/** @internal */
|
17496
|
-
__publicField(
|
17537
|
+
__publicField(Table2, "Symbol", {
|
17497
17538
|
Name: TableName,
|
17498
17539
|
Schema,
|
17499
17540
|
OriginalName,
|
@@ -17506,7 +17547,7 @@ var init_table = __esm({
|
|
17506
17547
|
}
|
17507
17548
|
});
|
17508
17549
|
|
17509
|
-
// ../
|
17550
|
+
// ../drizzle-orm/dist/pg-core/table.js
|
17510
17551
|
function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name2) {
|
17511
17552
|
const rawTable = new PgTable(name2, schema4, baseName);
|
17512
17553
|
const builtColumns = Object.fromEntries(
|
@@ -17525,8 +17566,8 @@ function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name
|
|
17525
17566
|
})
|
17526
17567
|
);
|
17527
17568
|
const table4 = Object.assign(rawTable, builtColumns);
|
17528
|
-
table4[
|
17529
|
-
table4[
|
17569
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
17570
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;
|
17530
17571
|
if (extraConfig) {
|
17531
17572
|
table4[PgTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
17532
17573
|
}
|
@@ -17534,12 +17575,12 @@ function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name
|
|
17534
17575
|
}
|
17535
17576
|
var InlineForeignKeys, _a4, _b2, _c2, _d2, PgTable, pgTable;
|
17536
17577
|
var init_table2 = __esm({
|
17537
|
-
"../
|
17578
|
+
"../drizzle-orm/dist/pg-core/table.js"() {
|
17538
17579
|
"use strict";
|
17539
17580
|
init_entity();
|
17540
17581
|
init_table();
|
17541
17582
|
InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
17542
|
-
PgTable = class extends (_d2 =
|
17583
|
+
PgTable = class extends (_d2 = Table2, _c2 = entityKind, _b2 = InlineForeignKeys, _a4 = Table2.Symbol.ExtraConfigBuilder, _d2) {
|
17543
17584
|
constructor() {
|
17544
17585
|
super(...arguments);
|
17545
17586
|
/**@internal */
|
@@ -17550,7 +17591,7 @@ var init_table2 = __esm({
|
|
17550
17591
|
};
|
17551
17592
|
__publicField(PgTable, _c2, "PgTable");
|
17552
17593
|
/** @internal */
|
17553
|
-
__publicField(PgTable, "Symbol", Object.assign({},
|
17594
|
+
__publicField(PgTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
17554
17595
|
InlineForeignKeys
|
17555
17596
|
}));
|
17556
17597
|
pgTable = (name2, columns, extraConfig) => {
|
@@ -17559,10 +17600,10 @@ var init_table2 = __esm({
|
|
17559
17600
|
}
|
17560
17601
|
});
|
17561
17602
|
|
17562
|
-
// ../
|
17603
|
+
// ../drizzle-orm/dist/pg-core/foreign-keys.js
|
17563
17604
|
var _a5, ForeignKeyBuilder, _a6, ForeignKey;
|
17564
17605
|
var init_foreign_keys = __esm({
|
17565
|
-
"../
|
17606
|
+
"../drizzle-orm/dist/pg-core/foreign-keys.js"() {
|
17566
17607
|
"use strict";
|
17567
17608
|
init_entity();
|
17568
17609
|
init_table2();
|
@@ -17626,23 +17667,23 @@ var init_foreign_keys = __esm({
|
|
17626
17667
|
}
|
17627
17668
|
});
|
17628
17669
|
|
17629
|
-
// ../
|
17670
|
+
// ../drizzle-orm/dist/tracing-utils.js
|
17630
17671
|
function iife(fn, ...args) {
|
17631
17672
|
return fn(...args);
|
17632
17673
|
}
|
17633
17674
|
var init_tracing_utils = __esm({
|
17634
|
-
"../
|
17675
|
+
"../drizzle-orm/dist/tracing-utils.js"() {
|
17635
17676
|
"use strict";
|
17636
17677
|
}
|
17637
17678
|
});
|
17638
17679
|
|
17639
|
-
// ../
|
17680
|
+
// ../drizzle-orm/dist/pg-core/unique-constraint.js
|
17640
17681
|
function uniqueKeyName(table4, columns) {
|
17641
17682
|
return `${table4[PgTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
17642
17683
|
}
|
17643
17684
|
var _a7, UniqueConstraintBuilder, _a8, UniqueOnConstraintBuilder, _a9, UniqueConstraint;
|
17644
17685
|
var init_unique_constraint = __esm({
|
17645
|
-
"../
|
17686
|
+
"../drizzle-orm/dist/pg-core/unique-constraint.js"() {
|
17646
17687
|
"use strict";
|
17647
17688
|
init_entity();
|
17648
17689
|
init_table2();
|
@@ -17697,7 +17738,7 @@ var init_unique_constraint = __esm({
|
|
17697
17738
|
}
|
17698
17739
|
});
|
17699
17740
|
|
17700
|
-
// ../
|
17741
|
+
// ../drizzle-orm/dist/pg-core/utils/array.js
|
17701
17742
|
function parsePgArrayValue(arrayString, startFrom, inQuotes) {
|
17702
17743
|
for (let i = startFrom; i < arrayString.length; i++) {
|
17703
17744
|
const char = arrayString[i];
|
@@ -17773,15 +17814,15 @@ function makePgArray(array) {
|
|
17773
17814
|
}).join(",")}}`;
|
17774
17815
|
}
|
17775
17816
|
var init_array = __esm({
|
17776
|
-
"../
|
17817
|
+
"../drizzle-orm/dist/pg-core/utils/array.js"() {
|
17777
17818
|
"use strict";
|
17778
17819
|
}
|
17779
17820
|
});
|
17780
17821
|
|
17781
|
-
// ../
|
17822
|
+
// ../drizzle-orm/dist/pg-core/columns/common.js
|
17782
17823
|
var _a10, _b3, PgColumnBuilder, _a11, _b4, PgColumn, _a12, _b5, ExtraConfigColumn, _a13, IndexedColumn, _a14, _b6, PgArrayBuilder, _a15, _b7, _PgArray, PgArray;
|
17783
17824
|
var init_common2 = __esm({
|
17784
|
-
"../
|
17825
|
+
"../drizzle-orm/dist/pg-core/columns/common.js"() {
|
17785
17826
|
"use strict";
|
17786
17827
|
init_column_builder();
|
17787
17828
|
init_column();
|
@@ -17844,7 +17885,7 @@ var init_common2 = __esm({
|
|
17844
17885
|
}
|
17845
17886
|
};
|
17846
17887
|
__publicField(PgColumnBuilder, _a10, "PgColumnBuilder");
|
17847
|
-
PgColumn = class extends (_b4 =
|
17888
|
+
PgColumn = class extends (_b4 = Column2, _a11 = entityKind, _b4) {
|
17848
17889
|
constructor(table4, config) {
|
17849
17890
|
if (!config.uniqueName) {
|
17850
17891
|
config.uniqueName = uniqueKeyName(table4, [config.name]);
|
@@ -17982,7 +18023,7 @@ var init_common2 = __esm({
|
|
17982
18023
|
}
|
17983
18024
|
});
|
17984
18025
|
|
17985
|
-
// ../
|
18026
|
+
// ../drizzle-orm/dist/pg-core/columns/enum.js
|
17986
18027
|
function isPgEnum(obj) {
|
17987
18028
|
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
|
17988
18029
|
}
|
@@ -18000,7 +18041,7 @@ function pgEnumWithSchema(enumName, values, schema4) {
|
|
18000
18041
|
}
|
18001
18042
|
var isPgEnumSym, _a16, _b8, PgEnumColumnBuilder, _a17, _b9, PgEnumColumn;
|
18002
18043
|
var init_enum = __esm({
|
18003
|
-
"../
|
18044
|
+
"../drizzle-orm/dist/pg-core/columns/enum.js"() {
|
18004
18045
|
"use strict";
|
18005
18046
|
init_entity();
|
18006
18047
|
init_common2();
|
@@ -18034,10 +18075,10 @@ var init_enum = __esm({
|
|
18034
18075
|
}
|
18035
18076
|
});
|
18036
18077
|
|
18037
|
-
// ../
|
18078
|
+
// ../drizzle-orm/dist/subquery.js
|
18038
18079
|
var _a18, Subquery, _a19, _b10, WithSubquery;
|
18039
18080
|
var init_subquery = __esm({
|
18040
|
-
"../
|
18081
|
+
"../drizzle-orm/dist/subquery.js"() {
|
18041
18082
|
"use strict";
|
18042
18083
|
init_entity();
|
18043
18084
|
_a18 = entityKind;
|
@@ -18062,19 +18103,19 @@ var init_subquery = __esm({
|
|
18062
18103
|
}
|
18063
18104
|
});
|
18064
18105
|
|
18065
|
-
// ../
|
18106
|
+
// ../drizzle-orm/dist/version.js
|
18066
18107
|
var version;
|
18067
18108
|
var init_version = __esm({
|
18068
|
-
"../
|
18109
|
+
"../drizzle-orm/dist/version.js"() {
|
18069
18110
|
"use strict";
|
18070
|
-
version = "0.32.
|
18111
|
+
version = "0.32.2";
|
18071
18112
|
}
|
18072
18113
|
});
|
18073
18114
|
|
18074
|
-
// ../
|
18115
|
+
// ../drizzle-orm/dist/tracing.js
|
18075
18116
|
var otel, rawTracer, tracer;
|
18076
18117
|
var init_tracing = __esm({
|
18077
|
-
"../
|
18118
|
+
"../drizzle-orm/dist/tracing.js"() {
|
18078
18119
|
"use strict";
|
18079
18120
|
init_tracing_utils();
|
18080
18121
|
init_version();
|
@@ -18112,16 +18153,16 @@ var init_tracing = __esm({
|
|
18112
18153
|
}
|
18113
18154
|
});
|
18114
18155
|
|
18115
|
-
// ../
|
18156
|
+
// ../drizzle-orm/dist/view-common.js
|
18116
18157
|
var ViewBaseConfig;
|
18117
18158
|
var init_view_common = __esm({
|
18118
|
-
"../
|
18159
|
+
"../drizzle-orm/dist/view-common.js"() {
|
18119
18160
|
"use strict";
|
18120
18161
|
ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
18121
18162
|
}
|
18122
18163
|
});
|
18123
18164
|
|
18124
|
-
// ../
|
18165
|
+
// ../drizzle-orm/dist/sql/sql.js
|
18125
18166
|
function isSQLWrapper(value) {
|
18126
18167
|
return value !== null && value !== void 0 && typeof value.getSQL === "function";
|
18127
18168
|
}
|
@@ -18174,7 +18215,7 @@ function fillPlaceholders(params, values) {
|
|
18174
18215
|
}
|
18175
18216
|
var _a20, FakePrimitiveParam, _a21, StringChunk, _a22, _SQL, SQL, _a23, Name, noopDecoder, noopEncoder, noopMapper, _a24, Param, _a25, Placeholder, _a26, _b11, View;
|
18176
18217
|
var init_sql = __esm({
|
18177
|
-
"../
|
18218
|
+
"../drizzle-orm/dist/sql/sql.js"() {
|
18178
18219
|
"use strict";
|
18179
18220
|
init_entity();
|
18180
18221
|
init_enum();
|
@@ -18259,19 +18300,19 @@ var init_sql = __esm({
|
|
18259
18300
|
inlineParams: inlineParams || chunk.shouldInlineParams
|
18260
18301
|
});
|
18261
18302
|
}
|
18262
|
-
if (is(chunk,
|
18263
|
-
const schemaName = chunk[
|
18264
|
-
const tableName = chunk[
|
18303
|
+
if (is(chunk, Table2)) {
|
18304
|
+
const schemaName = chunk[Table2.Symbol.Schema];
|
18305
|
+
const tableName = chunk[Table2.Symbol.Name];
|
18265
18306
|
return {
|
18266
18307
|
sql: schemaName === void 0 ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName),
|
18267
18308
|
params: []
|
18268
18309
|
};
|
18269
18310
|
}
|
18270
|
-
if (is(chunk,
|
18311
|
+
if (is(chunk, Column2)) {
|
18271
18312
|
if (_config.invokeSource === "indexes") {
|
18272
18313
|
return { sql: escapeName(chunk.name), params: [] };
|
18273
18314
|
}
|
18274
|
-
return { sql: escapeName(chunk.table[
|
18315
|
+
return { sql: escapeName(chunk.table[Table2.Symbol.Name]) + "." + escapeName(chunk.name), params: [] };
|
18275
18316
|
}
|
18276
18317
|
if (is(chunk, View)) {
|
18277
18318
|
const schemaName = chunk[ViewBaseConfig].schema;
|
@@ -18289,7 +18330,7 @@ var init_sql = __esm({
|
|
18289
18330
|
if (inlineParams) {
|
18290
18331
|
return { sql: this.mapInlineParam(mappedValue, config), params: [] };
|
18291
18332
|
}
|
18292
|
-
let typings;
|
18333
|
+
let typings = ["none"];
|
18293
18334
|
if (prepareTyping) {
|
18294
18335
|
typings = [prepareTyping(chunk.encoder)];
|
18295
18336
|
}
|
@@ -18331,7 +18372,7 @@ var init_sql = __esm({
|
|
18331
18372
|
if (inlineParams) {
|
18332
18373
|
return { sql: this.mapInlineParam(chunk, config), params: [] };
|
18333
18374
|
}
|
18334
|
-
return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk] };
|
18375
|
+
return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] };
|
18335
18376
|
}));
|
18336
18377
|
}
|
18337
18378
|
mapInlineParam(chunk, { escapeString }) {
|
@@ -18508,10 +18549,10 @@ var init_sql = __esm({
|
|
18508
18549
|
}
|
18509
18550
|
};
|
18510
18551
|
__publicField(View, _b11, "View");
|
18511
|
-
|
18552
|
+
Column2.prototype.getSQL = function() {
|
18512
18553
|
return new SQL([this]);
|
18513
18554
|
};
|
18514
|
-
|
18555
|
+
Table2.prototype.getSQL = function() {
|
18515
18556
|
return new SQL([this]);
|
18516
18557
|
};
|
18517
18558
|
Subquery.prototype.getSQL = function() {
|
@@ -18520,7 +18561,7 @@ var init_sql = __esm({
|
|
18520
18561
|
}
|
18521
18562
|
});
|
18522
18563
|
|
18523
|
-
// ../
|
18564
|
+
// ../drizzle-orm/dist/alias.js
|
18524
18565
|
function aliasedTable(table4, tableAlias) {
|
18525
18566
|
return new Proxy(table4, new TableAliasProxyHandler(tableAlias, false));
|
18526
18567
|
}
|
@@ -18538,7 +18579,7 @@ function mapColumnsInAliasedSQLToAlias(query, alias) {
|
|
18538
18579
|
}
|
18539
18580
|
function mapColumnsInSQLToAlias(query, alias) {
|
18540
18581
|
return sql.join(query.queryChunks.map((c) => {
|
18541
|
-
if (is(c,
|
18582
|
+
if (is(c, Column2)) {
|
18542
18583
|
return aliasedTableColumn(c, alias);
|
18543
18584
|
}
|
18544
18585
|
if (is(c, SQL)) {
|
@@ -18552,7 +18593,7 @@ function mapColumnsInSQLToAlias(query, alias) {
|
|
18552
18593
|
}
|
18553
18594
|
var _a27, ColumnAliasProxyHandler, _a28, TableAliasProxyHandler, _a29, RelationTableAliasProxyHandler;
|
18554
18595
|
var init_alias = __esm({
|
18555
|
-
"../
|
18596
|
+
"../drizzle-orm/dist/alias.js"() {
|
18556
18597
|
"use strict";
|
18557
18598
|
init_column();
|
18558
18599
|
init_entity();
|
@@ -18579,13 +18620,13 @@ var init_alias = __esm({
|
|
18579
18620
|
this.replaceOriginalName = replaceOriginalName;
|
18580
18621
|
}
|
18581
18622
|
get(target, prop) {
|
18582
|
-
if (prop ===
|
18623
|
+
if (prop === Table2.Symbol.IsAlias) {
|
18583
18624
|
return true;
|
18584
18625
|
}
|
18585
|
-
if (prop ===
|
18626
|
+
if (prop === Table2.Symbol.Name) {
|
18586
18627
|
return this.alias;
|
18587
18628
|
}
|
18588
|
-
if (this.replaceOriginalName && prop ===
|
18629
|
+
if (this.replaceOriginalName && prop === Table2.Symbol.OriginalName) {
|
18589
18630
|
return this.alias;
|
18590
18631
|
}
|
18591
18632
|
if (prop === ViewBaseConfig) {
|
@@ -18595,8 +18636,8 @@ var init_alias = __esm({
|
|
18595
18636
|
isAlias: true
|
18596
18637
|
};
|
18597
18638
|
}
|
18598
|
-
if (prop ===
|
18599
|
-
const columns = target[
|
18639
|
+
if (prop === Table2.Symbol.Columns) {
|
18640
|
+
const columns = target[Table2.Symbol.Columns];
|
18600
18641
|
if (!columns) {
|
18601
18642
|
return columns;
|
18602
18643
|
}
|
@@ -18610,7 +18651,7 @@ var init_alias = __esm({
|
|
18610
18651
|
return proxiedColumns;
|
18611
18652
|
}
|
18612
18653
|
const value = target[prop];
|
18613
|
-
if (is(value,
|
18654
|
+
if (is(value, Column2)) {
|
18614
18655
|
return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this)));
|
18615
18656
|
}
|
18616
18657
|
return value;
|
@@ -18633,10 +18674,10 @@ var init_alias = __esm({
|
|
18633
18674
|
}
|
18634
18675
|
});
|
18635
18676
|
|
18636
|
-
// ../
|
18677
|
+
// ../drizzle-orm/dist/errors.js
|
18637
18678
|
var _a30, _b12, DrizzleError, _a31, _b13, TransactionRollbackError;
|
18638
18679
|
var init_errors = __esm({
|
18639
|
-
"../
|
18680
|
+
"../drizzle-orm/dist/errors.js"() {
|
18640
18681
|
"use strict";
|
18641
18682
|
init_entity();
|
18642
18683
|
DrizzleError = class extends (_b12 = Error, _a30 = entityKind, _b12) {
|
@@ -18656,9 +18697,9 @@ var init_errors = __esm({
|
|
18656
18697
|
}
|
18657
18698
|
});
|
18658
18699
|
|
18659
|
-
// ../
|
18700
|
+
// ../drizzle-orm/dist/sql/expressions/conditions.js
|
18660
18701
|
function bindIfParam(value, column4) {
|
18661
|
-
if (isDriverValueEncoder(column4) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value,
|
18702
|
+
if (isDriverValueEncoder(column4) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column2) && !is(value, Table2) && !is(value, View)) {
|
18662
18703
|
return new Param(value, column4);
|
18663
18704
|
}
|
18664
18705
|
return value;
|
@@ -18784,7 +18825,7 @@ function arrayOverlaps(column4, values) {
|
|
18784
18825
|
}
|
18785
18826
|
var eq, ne, gt, gte, lt, lte;
|
18786
18827
|
var init_conditions = __esm({
|
18787
|
-
"../
|
18828
|
+
"../drizzle-orm/dist/sql/expressions/conditions.js"() {
|
18788
18829
|
"use strict";
|
18789
18830
|
init_column();
|
18790
18831
|
init_entity();
|
@@ -18811,7 +18852,7 @@ var init_conditions = __esm({
|
|
18811
18852
|
}
|
18812
18853
|
});
|
18813
18854
|
|
18814
|
-
// ../
|
18855
|
+
// ../drizzle-orm/dist/sql/expressions/select.js
|
18815
18856
|
function asc(column4) {
|
18816
18857
|
return sql`${column4} asc`;
|
18817
18858
|
}
|
@@ -18819,33 +18860,33 @@ function desc(column4) {
|
|
18819
18860
|
return sql`${column4} desc`;
|
18820
18861
|
}
|
18821
18862
|
var init_select = __esm({
|
18822
|
-
"../
|
18863
|
+
"../drizzle-orm/dist/sql/expressions/select.js"() {
|
18823
18864
|
"use strict";
|
18824
18865
|
init_sql();
|
18825
18866
|
}
|
18826
18867
|
});
|
18827
18868
|
|
18828
|
-
// ../
|
18869
|
+
// ../drizzle-orm/dist/sql/expressions/index.js
|
18829
18870
|
var init_expressions = __esm({
|
18830
|
-
"../
|
18871
|
+
"../drizzle-orm/dist/sql/expressions/index.js"() {
|
18831
18872
|
"use strict";
|
18832
18873
|
init_conditions();
|
18833
18874
|
init_select();
|
18834
18875
|
}
|
18835
18876
|
});
|
18836
18877
|
|
18837
|
-
// ../
|
18878
|
+
// ../drizzle-orm/dist/expressions.js
|
18838
18879
|
var init_expressions2 = __esm({
|
18839
|
-
"../
|
18880
|
+
"../drizzle-orm/dist/expressions.js"() {
|
18840
18881
|
"use strict";
|
18841
18882
|
init_expressions();
|
18842
18883
|
}
|
18843
18884
|
});
|
18844
18885
|
|
18845
|
-
// ../
|
18886
|
+
// ../drizzle-orm/dist/logger.js
|
18846
18887
|
var _a32, ConsoleLogWriter, _a33, DefaultLogger, _a34, NoopLogger;
|
18847
18888
|
var init_logger = __esm({
|
18848
|
-
"../
|
18889
|
+
"../drizzle-orm/dist/logger.js"() {
|
18849
18890
|
"use strict";
|
18850
18891
|
init_entity();
|
18851
18892
|
_a32 = entityKind;
|
@@ -18883,17 +18924,17 @@ var init_logger = __esm({
|
|
18883
18924
|
}
|
18884
18925
|
});
|
18885
18926
|
|
18886
|
-
// ../
|
18927
|
+
// ../drizzle-orm/dist/operations.js
|
18887
18928
|
var init_operations = __esm({
|
18888
|
-
"../
|
18929
|
+
"../drizzle-orm/dist/operations.js"() {
|
18889
18930
|
"use strict";
|
18890
18931
|
}
|
18891
18932
|
});
|
18892
18933
|
|
18893
|
-
// ../
|
18934
|
+
// ../drizzle-orm/dist/query-promise.js
|
18894
18935
|
var _a35, _b14, QueryPromise;
|
18895
18936
|
var init_query_promise = __esm({
|
18896
|
-
"../
|
18937
|
+
"../drizzle-orm/dist/query-promise.js"() {
|
18897
18938
|
"use strict";
|
18898
18939
|
init_entity();
|
18899
18940
|
_b14 = entityKind, _a35 = Symbol.toStringTag;
|
@@ -18924,10 +18965,10 @@ var init_query_promise = __esm({
|
|
18924
18965
|
}
|
18925
18966
|
});
|
18926
18967
|
|
18927
|
-
// ../
|
18968
|
+
// ../drizzle-orm/dist/pg-core/primary-keys.js
|
18928
18969
|
var _a36, PrimaryKeyBuilder, _a37, PrimaryKey;
|
18929
18970
|
var init_primary_keys = __esm({
|
18930
|
-
"../
|
18971
|
+
"../drizzle-orm/dist/pg-core/primary-keys.js"() {
|
18931
18972
|
"use strict";
|
18932
18973
|
init_entity();
|
18933
18974
|
init_table2();
|
@@ -18964,7 +19005,7 @@ var init_primary_keys = __esm({
|
|
18964
19005
|
}
|
18965
19006
|
});
|
18966
19007
|
|
18967
|
-
// ../
|
19008
|
+
// ../drizzle-orm/dist/relations.js
|
18968
19009
|
function getOperators() {
|
18969
19010
|
return {
|
18970
19011
|
and,
|
@@ -18999,33 +19040,33 @@ function getOrderByOperators() {
|
|
18999
19040
|
};
|
19000
19041
|
}
|
19001
19042
|
function extractTablesRelationalConfig(schema4, configHelpers) {
|
19002
|
-
if (Object.keys(schema4).length === 1 && "default" in schema4 && !is(schema4["default"],
|
19043
|
+
if (Object.keys(schema4).length === 1 && "default" in schema4 && !is(schema4["default"], Table2)) {
|
19003
19044
|
schema4 = schema4["default"];
|
19004
19045
|
}
|
19005
19046
|
const tableNamesMap = {};
|
19006
19047
|
const relationsBuffer = {};
|
19007
19048
|
const tablesConfig = {};
|
19008
19049
|
for (const [key, value] of Object.entries(schema4)) {
|
19009
|
-
if (is(value,
|
19050
|
+
if (is(value, Table2)) {
|
19010
19051
|
const dbName = getTableUniqueName(value);
|
19011
19052
|
const bufferedRelations = relationsBuffer[dbName];
|
19012
19053
|
tableNamesMap[dbName] = key;
|
19013
19054
|
tablesConfig[key] = {
|
19014
19055
|
tsName: key,
|
19015
|
-
dbName: value[
|
19016
|
-
schema: value[
|
19017
|
-
columns: value[
|
19056
|
+
dbName: value[Table2.Symbol.Name],
|
19057
|
+
schema: value[Table2.Symbol.Schema],
|
19058
|
+
columns: value[Table2.Symbol.Columns],
|
19018
19059
|
relations: bufferedRelations?.relations ?? {},
|
19019
19060
|
primaryKey: bufferedRelations?.primaryKey ?? []
|
19020
19061
|
};
|
19021
19062
|
for (const column4 of Object.values(
|
19022
|
-
value[
|
19063
|
+
value[Table2.Symbol.Columns]
|
19023
19064
|
)) {
|
19024
19065
|
if (column4.primary) {
|
19025
19066
|
tablesConfig[key].primaryKey.push(column4);
|
19026
19067
|
}
|
19027
19068
|
}
|
19028
|
-
const extraConfig = value[
|
19069
|
+
const extraConfig = value[Table2.Symbol.ExtraConfigBuilder]?.(value[Table2.Symbol.ExtraConfigColumns]);
|
19029
19070
|
if (extraConfig) {
|
19030
19071
|
for (const configEntry of Object.values(extraConfig)) {
|
19031
19072
|
if (is(configEntry, PrimaryKeyBuilder)) {
|
@@ -19097,7 +19138,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19097
19138
|
const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];
|
19098
19139
|
if (!referencedTableTsName) {
|
19099
19140
|
throw new Error(
|
19100
|
-
`Table "${relation.referencedTable[
|
19141
|
+
`Table "${relation.referencedTable[Table2.Symbol.Name]}" not found in schema`
|
19101
19142
|
);
|
19102
19143
|
}
|
19103
19144
|
const referencedTableConfig = schema4[referencedTableTsName];
|
@@ -19108,7 +19149,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19108
19149
|
const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];
|
19109
19150
|
if (!sourceTableTsName) {
|
19110
19151
|
throw new Error(
|
19111
|
-
`Table "${sourceTable[
|
19152
|
+
`Table "${sourceTable[Table2.Symbol.Name]}" not found in schema`
|
19112
19153
|
);
|
19113
19154
|
}
|
19114
19155
|
const reverseRelations = [];
|
@@ -19123,7 +19164,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19123
19164
|
throw relation.relationName ? new Error(
|
19124
19165
|
`There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"`
|
19125
19166
|
) : new Error(
|
19126
|
-
`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[
|
19167
|
+
`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table2.Symbol.Name]}". Please specify relation name`
|
19127
19168
|
);
|
19128
19169
|
}
|
19129
19170
|
if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) {
|
@@ -19171,7 +19212,7 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
19171
19212
|
const value = mapColumnValue(row[selectionItemIndex]);
|
19172
19213
|
const field = selectionItem.field;
|
19173
19214
|
let decoder;
|
19174
|
-
if (is(field,
|
19215
|
+
if (is(field, Column2)) {
|
19175
19216
|
decoder = field;
|
19176
19217
|
} else if (is(field, SQL)) {
|
19177
19218
|
decoder = field.decoder;
|
@@ -19185,7 +19226,7 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
19185
19226
|
}
|
19186
19227
|
var _a38, Relation, _a39, Relations, _a40, _b15, _One, One, _a41, _b16, _Many, Many;
|
19187
19228
|
var init_relations = __esm({
|
19188
|
-
"../
|
19229
|
+
"../drizzle-orm/dist/relations.js"() {
|
19189
19230
|
"use strict";
|
19190
19231
|
init_table();
|
19191
19232
|
init_column();
|
@@ -19201,7 +19242,7 @@ var init_relations = __esm({
|
|
19201
19242
|
this.sourceTable = sourceTable;
|
19202
19243
|
this.referencedTable = referencedTable;
|
19203
19244
|
this.relationName = relationName;
|
19204
|
-
this.referencedTableName = referencedTable[
|
19245
|
+
this.referencedTableName = referencedTable[Table2.Symbol.Name];
|
19205
19246
|
}
|
19206
19247
|
};
|
19207
19248
|
__publicField(Relation, _a38, "Relation");
|
@@ -19252,7 +19293,7 @@ var init_relations = __esm({
|
|
19252
19293
|
}
|
19253
19294
|
});
|
19254
19295
|
|
19255
|
-
// ../
|
19296
|
+
// ../drizzle-orm/dist/sql/functions/aggregate.js
|
19256
19297
|
function count(expression) {
|
19257
19298
|
return sql`count(${expression || sql.raw("*")})`.mapWith(Number);
|
19258
19299
|
}
|
@@ -19272,13 +19313,13 @@ function sumDistinct(expression) {
|
|
19272
19313
|
return sql`sum(distinct ${expression})`.mapWith(String);
|
19273
19314
|
}
|
19274
19315
|
function max(expression) {
|
19275
|
-
return sql`max(${expression})`.mapWith(is(expression,
|
19316
|
+
return sql`max(${expression})`.mapWith(is(expression, Column2) ? expression : String);
|
19276
19317
|
}
|
19277
19318
|
function min(expression) {
|
19278
|
-
return sql`min(${expression})`.mapWith(is(expression,
|
19319
|
+
return sql`min(${expression})`.mapWith(is(expression, Column2) ? expression : String);
|
19279
19320
|
}
|
19280
19321
|
var init_aggregate = __esm({
|
19281
|
-
"../
|
19322
|
+
"../drizzle-orm/dist/sql/functions/aggregate.js"() {
|
19282
19323
|
"use strict";
|
19283
19324
|
init_column();
|
19284
19325
|
init_entity();
|
@@ -19286,7 +19327,7 @@ var init_aggregate = __esm({
|
|
19286
19327
|
}
|
19287
19328
|
});
|
19288
19329
|
|
19289
|
-
// ../
|
19330
|
+
// ../drizzle-orm/dist/sql/functions/vector.js
|
19290
19331
|
function toSql(value) {
|
19291
19332
|
return JSON.stringify(value);
|
19292
19333
|
}
|
@@ -19327,24 +19368,24 @@ function jaccardDistance(column4, value) {
|
|
19327
19368
|
return sql`${column4} <%> ${value}`;
|
19328
19369
|
}
|
19329
19370
|
var init_vector = __esm({
|
19330
|
-
"../
|
19371
|
+
"../drizzle-orm/dist/sql/functions/vector.js"() {
|
19331
19372
|
"use strict";
|
19332
19373
|
init_sql();
|
19333
19374
|
}
|
19334
19375
|
});
|
19335
19376
|
|
19336
|
-
// ../
|
19377
|
+
// ../drizzle-orm/dist/sql/functions/index.js
|
19337
19378
|
var init_functions = __esm({
|
19338
|
-
"../
|
19379
|
+
"../drizzle-orm/dist/sql/functions/index.js"() {
|
19339
19380
|
"use strict";
|
19340
19381
|
init_aggregate();
|
19341
19382
|
init_vector();
|
19342
19383
|
}
|
19343
19384
|
});
|
19344
19385
|
|
19345
|
-
// ../
|
19386
|
+
// ../drizzle-orm/dist/sql/index.js
|
19346
19387
|
var init_sql2 = __esm({
|
19347
|
-
"../
|
19388
|
+
"../drizzle-orm/dist/sql/index.js"() {
|
19348
19389
|
"use strict";
|
19349
19390
|
init_expressions();
|
19350
19391
|
init_functions();
|
@@ -19352,13 +19393,13 @@ var init_sql2 = __esm({
|
|
19352
19393
|
}
|
19353
19394
|
});
|
19354
19395
|
|
19355
|
-
// ../
|
19396
|
+
// ../drizzle-orm/dist/utils.js
|
19356
19397
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
19357
19398
|
const nullifyMap = {};
|
19358
19399
|
const result = columns.reduce(
|
19359
19400
|
(result2, { path: path2, field }, columnIndex) => {
|
19360
19401
|
let decoder;
|
19361
|
-
if (is(field,
|
19402
|
+
if (is(field, Column2)) {
|
19362
19403
|
decoder = field;
|
19363
19404
|
} else if (is(field, SQL)) {
|
19364
19405
|
decoder = field.decoder;
|
@@ -19375,7 +19416,7 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
19375
19416
|
} else {
|
19376
19417
|
const rawValue = row[columnIndex];
|
19377
19418
|
const value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
|
19378
|
-
if (joinsNotNullableMap && is(field,
|
19419
|
+
if (joinsNotNullableMap && is(field, Column2) && path2.length === 2) {
|
19379
19420
|
const objectName = path2[0];
|
19380
19421
|
if (!(objectName in nullifyMap)) {
|
19381
19422
|
nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
|
@@ -19404,10 +19445,10 @@ function orderSelectedFields(fields, pathPrefix) {
|
|
19404
19445
|
return result;
|
19405
19446
|
}
|
19406
19447
|
const newPath = pathPrefix ? [...pathPrefix, name2] : [name2];
|
19407
|
-
if (is(field,
|
19448
|
+
if (is(field, Column2) || is(field, SQL) || is(field, SQL.Aliased)) {
|
19408
19449
|
result.push({ path: newPath, field });
|
19409
|
-
} else if (is(field,
|
19410
|
-
result.push(...orderSelectedFields(field[
|
19450
|
+
} else if (is(field, Table2)) {
|
19451
|
+
result.push(...orderSelectedFields(field[Table2.Symbol.Columns], newPath));
|
19411
19452
|
} else {
|
19412
19453
|
result.push(...orderSelectedFields(field, newPath));
|
19413
19454
|
}
|
@@ -19432,7 +19473,7 @@ function mapUpdateSet(table4, values) {
|
|
19432
19473
|
if (is(value, SQL)) {
|
19433
19474
|
return [key, value];
|
19434
19475
|
} else {
|
19435
|
-
return [key, new Param(value, table4[
|
19476
|
+
return [key, new Param(value, table4[Table2.Symbol.Columns][key])];
|
19436
19477
|
}
|
19437
19478
|
});
|
19438
19479
|
if (entries.length === 0) {
|
@@ -19454,13 +19495,13 @@ function applyMixins(baseClass, extendedClasses) {
|
|
19454
19495
|
}
|
19455
19496
|
}
|
19456
19497
|
function getTableColumns(table4) {
|
19457
|
-
return table4[
|
19498
|
+
return table4[Table2.Symbol.Columns];
|
19458
19499
|
}
|
19459
19500
|
function getTableLikeName(table4) {
|
19460
|
-
return is(table4, Subquery) ? table4._.alias : is(table4, View) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : table4[
|
19501
|
+
return is(table4, Subquery) ? table4._.alias : is(table4, View) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : table4[Table2.Symbol.IsAlias] ? table4[Table2.Symbol.Name] : table4[Table2.Symbol.BaseName];
|
19461
19502
|
}
|
19462
19503
|
var init_utils2 = __esm({
|
19463
|
-
"../
|
19504
|
+
"../drizzle-orm/dist/utils.js"() {
|
19464
19505
|
"use strict";
|
19465
19506
|
init_column();
|
19466
19507
|
init_entity();
|
@@ -19471,11 +19512,11 @@ var init_utils2 = __esm({
|
|
19471
19512
|
}
|
19472
19513
|
});
|
19473
19514
|
|
19474
|
-
// ../
|
19475
|
-
var
|
19476
|
-
__export(
|
19515
|
+
// ../drizzle-orm/dist/index.js
|
19516
|
+
var dist_exports = {};
|
19517
|
+
__export(dist_exports, {
|
19477
19518
|
BaseName: () => BaseName,
|
19478
|
-
Column: () =>
|
19519
|
+
Column: () => Column2,
|
19479
19520
|
ColumnAliasProxyHandler: () => ColumnAliasProxyHandler,
|
19480
19521
|
ColumnBuilder: () => ColumnBuilder,
|
19481
19522
|
Columns: () => Columns,
|
@@ -19501,7 +19542,7 @@ __export(drizzle_orm_exports, {
|
|
19501
19542
|
Schema: () => Schema,
|
19502
19543
|
StringChunk: () => StringChunk,
|
19503
19544
|
Subquery: () => Subquery,
|
19504
|
-
Table: () =>
|
19545
|
+
Table: () => Table2,
|
19505
19546
|
TableAliasProxyHandler: () => TableAliasProxyHandler,
|
19506
19547
|
TableName: () => TableName,
|
19507
19548
|
TransactionRollbackError: () => TransactionRollbackError,
|
@@ -19587,8 +19628,8 @@ __export(drizzle_orm_exports, {
|
|
19587
19628
|
sum: () => sum,
|
19588
19629
|
sumDistinct: () => sumDistinct
|
19589
19630
|
});
|
19590
|
-
var
|
19591
|
-
"../
|
19631
|
+
var init_dist = __esm({
|
19632
|
+
"../drizzle-orm/dist/index.js"() {
|
19592
19633
|
"use strict";
|
19593
19634
|
init_alias();
|
19594
19635
|
init_column_builder();
|
@@ -19608,17 +19649,17 @@ var init_drizzle_orm = __esm({
|
|
19608
19649
|
}
|
19609
19650
|
});
|
19610
19651
|
|
19611
|
-
// ../
|
19652
|
+
// ../drizzle-orm/dist/pg-core/alias.js
|
19612
19653
|
var init_alias2 = __esm({
|
19613
|
-
"../
|
19654
|
+
"../drizzle-orm/dist/pg-core/alias.js"() {
|
19614
19655
|
"use strict";
|
19615
19656
|
}
|
19616
19657
|
});
|
19617
19658
|
|
19618
|
-
// ../
|
19659
|
+
// ../drizzle-orm/dist/pg-core/checks.js
|
19619
19660
|
var _a42, CheckBuilder, _a43, Check;
|
19620
19661
|
var init_checks = __esm({
|
19621
|
-
"../
|
19662
|
+
"../drizzle-orm/dist/pg-core/checks.js"() {
|
19622
19663
|
"use strict";
|
19623
19664
|
init_entity();
|
19624
19665
|
_a42 = entityKind;
|
@@ -19648,10 +19689,10 @@ var init_checks = __esm({
|
|
19648
19689
|
}
|
19649
19690
|
});
|
19650
19691
|
|
19651
|
-
// ../
|
19692
|
+
// ../drizzle-orm/dist/pg-core/columns/int.common.js
|
19652
19693
|
var _a44, _b17, PgIntColumnBaseBuilder;
|
19653
19694
|
var init_int_common = __esm({
|
19654
|
-
"../
|
19695
|
+
"../drizzle-orm/dist/pg-core/columns/int.common.js"() {
|
19655
19696
|
"use strict";
|
19656
19697
|
init_entity();
|
19657
19698
|
init_common2();
|
@@ -19695,10 +19736,10 @@ var init_int_common = __esm({
|
|
19695
19736
|
}
|
19696
19737
|
});
|
19697
19738
|
|
19698
|
-
// ../
|
19739
|
+
// ../drizzle-orm/dist/pg-core/columns/bigint.js
|
19699
19740
|
var _a45, _b18, PgBigInt53Builder, _a46, _b19, PgBigInt53, _a47, _b20, PgBigInt64Builder, _a48, _b21, PgBigInt64;
|
19700
19741
|
var init_bigint = __esm({
|
19701
|
-
"../
|
19742
|
+
"../drizzle-orm/dist/pg-core/columns/bigint.js"() {
|
19702
19743
|
"use strict";
|
19703
19744
|
init_entity();
|
19704
19745
|
init_common2();
|
@@ -19751,10 +19792,10 @@ var init_bigint = __esm({
|
|
19751
19792
|
}
|
19752
19793
|
});
|
19753
19794
|
|
19754
|
-
// ../
|
19795
|
+
// ../drizzle-orm/dist/pg-core/columns/bigserial.js
|
19755
19796
|
var _a49, _b22, PgBigSerial53Builder, _a50, _b23, PgBigSerial53, _a51, _b24, PgBigSerial64Builder, _a52, _b25, PgBigSerial64;
|
19756
19797
|
var init_bigserial = __esm({
|
19757
|
-
"../
|
19798
|
+
"../drizzle-orm/dist/pg-core/columns/bigserial.js"() {
|
19758
19799
|
"use strict";
|
19759
19800
|
init_entity();
|
19760
19801
|
init_common2();
|
@@ -19812,10 +19853,10 @@ var init_bigserial = __esm({
|
|
19812
19853
|
}
|
19813
19854
|
});
|
19814
19855
|
|
19815
|
-
// ../
|
19856
|
+
// ../drizzle-orm/dist/pg-core/columns/boolean.js
|
19816
19857
|
var _a53, _b26, PgBooleanBuilder, _a54, _b27, PgBoolean;
|
19817
19858
|
var init_boolean = __esm({
|
19818
|
-
"../
|
19859
|
+
"../drizzle-orm/dist/pg-core/columns/boolean.js"() {
|
19819
19860
|
"use strict";
|
19820
19861
|
init_entity();
|
19821
19862
|
init_common2();
|
@@ -19838,10 +19879,10 @@ var init_boolean = __esm({
|
|
19838
19879
|
}
|
19839
19880
|
});
|
19840
19881
|
|
19841
|
-
// ../
|
19882
|
+
// ../drizzle-orm/dist/pg-core/columns/char.js
|
19842
19883
|
var _a55, _b28, PgCharBuilder, _a56, _b29, PgChar;
|
19843
19884
|
var init_char = __esm({
|
19844
|
-
"../
|
19885
|
+
"../drizzle-orm/dist/pg-core/columns/char.js"() {
|
19845
19886
|
"use strict";
|
19846
19887
|
init_entity();
|
19847
19888
|
init_common2();
|
@@ -19871,10 +19912,10 @@ var init_char = __esm({
|
|
19871
19912
|
}
|
19872
19913
|
});
|
19873
19914
|
|
19874
|
-
// ../
|
19915
|
+
// ../drizzle-orm/dist/pg-core/columns/cidr.js
|
19875
19916
|
var _a57, _b30, PgCidrBuilder, _a58, _b31, PgCidr;
|
19876
19917
|
var init_cidr = __esm({
|
19877
|
-
"../
|
19918
|
+
"../drizzle-orm/dist/pg-core/columns/cidr.js"() {
|
19878
19919
|
"use strict";
|
19879
19920
|
init_entity();
|
19880
19921
|
init_common2();
|
@@ -19897,10 +19938,10 @@ var init_cidr = __esm({
|
|
19897
19938
|
}
|
19898
19939
|
});
|
19899
19940
|
|
19900
|
-
// ../
|
19941
|
+
// ../drizzle-orm/dist/pg-core/columns/custom.js
|
19901
19942
|
var _a59, _b32, PgCustomColumnBuilder, _a60, _b33, PgCustomColumn;
|
19902
19943
|
var init_custom = __esm({
|
19903
|
-
"../
|
19944
|
+
"../drizzle-orm/dist/pg-core/columns/custom.js"() {
|
19904
19945
|
"use strict";
|
19905
19946
|
init_entity();
|
19906
19947
|
init_common2();
|
@@ -19943,10 +19984,10 @@ var init_custom = __esm({
|
|
19943
19984
|
}
|
19944
19985
|
});
|
19945
19986
|
|
19946
|
-
// ../
|
19987
|
+
// ../drizzle-orm/dist/pg-core/columns/date.common.js
|
19947
19988
|
var _a61, _b34, PgDateColumnBaseBuilder;
|
19948
19989
|
var init_date_common = __esm({
|
19949
|
-
"../
|
19990
|
+
"../drizzle-orm/dist/pg-core/columns/date.common.js"() {
|
19950
19991
|
"use strict";
|
19951
19992
|
init_entity();
|
19952
19993
|
init_sql();
|
@@ -19960,10 +20001,10 @@ var init_date_common = __esm({
|
|
19960
20001
|
}
|
19961
20002
|
});
|
19962
20003
|
|
19963
|
-
// ../
|
20004
|
+
// ../drizzle-orm/dist/pg-core/columns/date.js
|
19964
20005
|
var _a62, _b35, PgDateBuilder, _a63, _b36, PgDate, _a64, _b37, PgDateStringBuilder, _a65, _b38, PgDateString;
|
19965
20006
|
var init_date = __esm({
|
19966
|
-
"../
|
20007
|
+
"../drizzle-orm/dist/pg-core/columns/date.js"() {
|
19967
20008
|
"use strict";
|
19968
20009
|
init_entity();
|
19969
20010
|
init_common2();
|
@@ -20012,10 +20053,10 @@ var init_date = __esm({
|
|
20012
20053
|
}
|
20013
20054
|
});
|
20014
20055
|
|
20015
|
-
// ../
|
20056
|
+
// ../drizzle-orm/dist/pg-core/columns/double-precision.js
|
20016
20057
|
var _a66, _b39, PgDoublePrecisionBuilder, _a67, _b40, PgDoublePrecision;
|
20017
20058
|
var init_double_precision = __esm({
|
20018
|
-
"../
|
20059
|
+
"../drizzle-orm/dist/pg-core/columns/double-precision.js"() {
|
20019
20060
|
"use strict";
|
20020
20061
|
init_entity();
|
20021
20062
|
init_common2();
|
@@ -20047,10 +20088,10 @@ var init_double_precision = __esm({
|
|
20047
20088
|
}
|
20048
20089
|
});
|
20049
20090
|
|
20050
|
-
// ../
|
20091
|
+
// ../drizzle-orm/dist/pg-core/columns/inet.js
|
20051
20092
|
var _a68, _b41, PgInetBuilder, _a69, _b42, PgInet;
|
20052
20093
|
var init_inet = __esm({
|
20053
|
-
"../
|
20094
|
+
"../drizzle-orm/dist/pg-core/columns/inet.js"() {
|
20054
20095
|
"use strict";
|
20055
20096
|
init_entity();
|
20056
20097
|
init_common2();
|
@@ -20073,10 +20114,10 @@ var init_inet = __esm({
|
|
20073
20114
|
}
|
20074
20115
|
});
|
20075
20116
|
|
20076
|
-
// ../
|
20117
|
+
// ../drizzle-orm/dist/pg-core/columns/integer.js
|
20077
20118
|
var _a70, _b43, PgIntegerBuilder, _a71, _b44, PgInteger;
|
20078
20119
|
var init_integer = __esm({
|
20079
|
-
"../
|
20120
|
+
"../drizzle-orm/dist/pg-core/columns/integer.js"() {
|
20080
20121
|
"use strict";
|
20081
20122
|
init_entity();
|
20082
20123
|
init_common2();
|
@@ -20106,10 +20147,10 @@ var init_integer = __esm({
|
|
20106
20147
|
}
|
20107
20148
|
});
|
20108
20149
|
|
20109
|
-
// ../
|
20150
|
+
// ../drizzle-orm/dist/pg-core/columns/interval.js
|
20110
20151
|
var _a72, _b45, PgIntervalBuilder, _a73, _b46, PgInterval;
|
20111
20152
|
var init_interval = __esm({
|
20112
|
-
"../
|
20153
|
+
"../drizzle-orm/dist/pg-core/columns/interval.js"() {
|
20113
20154
|
"use strict";
|
20114
20155
|
init_entity();
|
20115
20156
|
init_common2();
|
@@ -20140,10 +20181,10 @@ var init_interval = __esm({
|
|
20140
20181
|
}
|
20141
20182
|
});
|
20142
20183
|
|
20143
|
-
// ../
|
20184
|
+
// ../drizzle-orm/dist/pg-core/columns/json.js
|
20144
20185
|
var _a74, _b47, PgJsonBuilder, _a75, _b48, PgJson;
|
20145
20186
|
var init_json = __esm({
|
20146
|
-
"../
|
20187
|
+
"../drizzle-orm/dist/pg-core/columns/json.js"() {
|
20147
20188
|
"use strict";
|
20148
20189
|
init_entity();
|
20149
20190
|
init_common2();
|
@@ -20182,10 +20223,10 @@ var init_json = __esm({
|
|
20182
20223
|
}
|
20183
20224
|
});
|
20184
20225
|
|
20185
|
-
// ../
|
20226
|
+
// ../drizzle-orm/dist/pg-core/columns/jsonb.js
|
20186
20227
|
var _a76, _b49, PgJsonbBuilder, _a77, _b50, PgJsonb;
|
20187
20228
|
var init_jsonb = __esm({
|
20188
|
-
"../
|
20229
|
+
"../drizzle-orm/dist/pg-core/columns/jsonb.js"() {
|
20189
20230
|
"use strict";
|
20190
20231
|
init_entity();
|
20191
20232
|
init_common2();
|
@@ -20224,10 +20265,10 @@ var init_jsonb = __esm({
|
|
20224
20265
|
}
|
20225
20266
|
});
|
20226
20267
|
|
20227
|
-
// ../
|
20268
|
+
// ../drizzle-orm/dist/pg-core/columns/line.js
|
20228
20269
|
var _a78, _b51, PgLineBuilder, _a79, _b52, PgLineTuple, _a80, _b53, PgLineABCBuilder, _a81, _b54, PgLineABC;
|
20229
20270
|
var init_line = __esm({
|
20230
|
-
"../
|
20271
|
+
"../drizzle-orm/dist/pg-core/columns/line.js"() {
|
20231
20272
|
"use strict";
|
20232
20273
|
init_entity();
|
20233
20274
|
init_common2();
|
@@ -20286,10 +20327,10 @@ var init_line = __esm({
|
|
20286
20327
|
}
|
20287
20328
|
});
|
20288
20329
|
|
20289
|
-
// ../
|
20330
|
+
// ../drizzle-orm/dist/pg-core/columns/macaddr.js
|
20290
20331
|
var _a82, _b55, PgMacaddrBuilder, _a83, _b56, PgMacaddr;
|
20291
20332
|
var init_macaddr = __esm({
|
20292
|
-
"../
|
20333
|
+
"../drizzle-orm/dist/pg-core/columns/macaddr.js"() {
|
20293
20334
|
"use strict";
|
20294
20335
|
init_entity();
|
20295
20336
|
init_common2();
|
@@ -20312,10 +20353,10 @@ var init_macaddr = __esm({
|
|
20312
20353
|
}
|
20313
20354
|
});
|
20314
20355
|
|
20315
|
-
// ../
|
20356
|
+
// ../drizzle-orm/dist/pg-core/columns/macaddr8.js
|
20316
20357
|
var _a84, _b57, PgMacaddr8Builder, _a85, _b58, PgMacaddr8;
|
20317
20358
|
var init_macaddr8 = __esm({
|
20318
|
-
"../
|
20359
|
+
"../drizzle-orm/dist/pg-core/columns/macaddr8.js"() {
|
20319
20360
|
"use strict";
|
20320
20361
|
init_entity();
|
20321
20362
|
init_common2();
|
@@ -20338,10 +20379,10 @@ var init_macaddr8 = __esm({
|
|
20338
20379
|
}
|
20339
20380
|
});
|
20340
20381
|
|
20341
|
-
// ../
|
20382
|
+
// ../drizzle-orm/dist/pg-core/columns/numeric.js
|
20342
20383
|
var _a86, _b59, PgNumericBuilder, _a87, _b60, PgNumeric;
|
20343
20384
|
var init_numeric = __esm({
|
20344
|
-
"../
|
20385
|
+
"../drizzle-orm/dist/pg-core/columns/numeric.js"() {
|
20345
20386
|
"use strict";
|
20346
20387
|
init_entity();
|
20347
20388
|
init_common2();
|
@@ -20379,10 +20420,10 @@ var init_numeric = __esm({
|
|
20379
20420
|
}
|
20380
20421
|
});
|
20381
20422
|
|
20382
|
-
// ../
|
20423
|
+
// ../drizzle-orm/dist/pg-core/columns/point.js
|
20383
20424
|
var _a88, _b61, PgPointTupleBuilder, _a89, _b62, PgPointTuple, _a90, _b63, PgPointObjectBuilder, _a91, _b64, PgPointObject;
|
20384
20425
|
var init_point = __esm({
|
20385
|
-
"../
|
20426
|
+
"../drizzle-orm/dist/pg-core/columns/point.js"() {
|
20386
20427
|
"use strict";
|
20387
20428
|
init_entity();
|
20388
20429
|
init_common2();
|
@@ -20447,7 +20488,7 @@ var init_point = __esm({
|
|
20447
20488
|
}
|
20448
20489
|
});
|
20449
20490
|
|
20450
|
-
// ../
|
20491
|
+
// ../drizzle-orm/dist/pg-core/columns/postgis_extension/utils.js
|
20451
20492
|
function hexToBytes(hex) {
|
20452
20493
|
const bytes = [];
|
20453
20494
|
for (let c = 0; c < hex.length; c += 2) {
|
@@ -20486,15 +20527,15 @@ function parseEWKB(hex) {
|
|
20486
20527
|
throw new Error("Unsupported geometry type");
|
20487
20528
|
}
|
20488
20529
|
var init_utils3 = __esm({
|
20489
|
-
"../
|
20530
|
+
"../drizzle-orm/dist/pg-core/columns/postgis_extension/utils.js"() {
|
20490
20531
|
"use strict";
|
20491
20532
|
}
|
20492
20533
|
});
|
20493
20534
|
|
20494
|
-
// ../
|
20535
|
+
// ../drizzle-orm/dist/pg-core/columns/postgis_extension/geometry.js
|
20495
20536
|
var _a92, _b65, PgGeometryBuilder, _a93, _b66, PgGeometry, _a94, _b67, PgGeometryObjectBuilder, _a95, _b68, PgGeometryObject;
|
20496
20537
|
var init_geometry = __esm({
|
20497
|
-
"../
|
20538
|
+
"../drizzle-orm/dist/pg-core/columns/postgis_extension/geometry.js"() {
|
20498
20539
|
"use strict";
|
20499
20540
|
init_entity();
|
20500
20541
|
init_common2();
|
@@ -20553,10 +20594,10 @@ var init_geometry = __esm({
|
|
20553
20594
|
}
|
20554
20595
|
});
|
20555
20596
|
|
20556
|
-
// ../
|
20597
|
+
// ../drizzle-orm/dist/pg-core/columns/real.js
|
20557
20598
|
var _a96, _b69, PgRealBuilder, _a97, _b70, PgReal;
|
20558
20599
|
var init_real = __esm({
|
20559
|
-
"../
|
20600
|
+
"../drizzle-orm/dist/pg-core/columns/real.js"() {
|
20560
20601
|
"use strict";
|
20561
20602
|
init_entity();
|
20562
20603
|
init_common2();
|
@@ -20589,10 +20630,10 @@ var init_real = __esm({
|
|
20589
20630
|
}
|
20590
20631
|
});
|
20591
20632
|
|
20592
|
-
// ../
|
20633
|
+
// ../drizzle-orm/dist/pg-core/columns/serial.js
|
20593
20634
|
var _a98, _b71, PgSerialBuilder, _a99, _b72, PgSerial;
|
20594
20635
|
var init_serial = __esm({
|
20595
|
-
"../
|
20636
|
+
"../drizzle-orm/dist/pg-core/columns/serial.js"() {
|
20596
20637
|
"use strict";
|
20597
20638
|
init_entity();
|
20598
20639
|
init_common2();
|
@@ -20617,10 +20658,10 @@ var init_serial = __esm({
|
|
20617
20658
|
}
|
20618
20659
|
});
|
20619
20660
|
|
20620
|
-
// ../
|
20661
|
+
// ../drizzle-orm/dist/pg-core/columns/smallint.js
|
20621
20662
|
var _a100, _b73, PgSmallIntBuilder, _a101, _b74, PgSmallInt;
|
20622
20663
|
var init_smallint = __esm({
|
20623
|
-
"../
|
20664
|
+
"../drizzle-orm/dist/pg-core/columns/smallint.js"() {
|
20624
20665
|
"use strict";
|
20625
20666
|
init_entity();
|
20626
20667
|
init_common2();
|
@@ -20653,10 +20694,10 @@ var init_smallint = __esm({
|
|
20653
20694
|
}
|
20654
20695
|
});
|
20655
20696
|
|
20656
|
-
// ../
|
20697
|
+
// ../drizzle-orm/dist/pg-core/columns/smallserial.js
|
20657
20698
|
var _a102, _b75, PgSmallSerialBuilder, _a103, _b76, PgSmallSerial;
|
20658
20699
|
var init_smallserial = __esm({
|
20659
|
-
"../
|
20700
|
+
"../drizzle-orm/dist/pg-core/columns/smallserial.js"() {
|
20660
20701
|
"use strict";
|
20661
20702
|
init_entity();
|
20662
20703
|
init_common2();
|
@@ -20684,10 +20725,10 @@ var init_smallserial = __esm({
|
|
20684
20725
|
}
|
20685
20726
|
});
|
20686
20727
|
|
20687
|
-
// ../
|
20728
|
+
// ../drizzle-orm/dist/pg-core/columns/text.js
|
20688
20729
|
var _a104, _b77, PgTextBuilder, _a105, _b78, PgText;
|
20689
20730
|
var init_text = __esm({
|
20690
|
-
"../
|
20731
|
+
"../drizzle-orm/dist/pg-core/columns/text.js"() {
|
20691
20732
|
"use strict";
|
20692
20733
|
init_entity();
|
20693
20734
|
init_common2();
|
@@ -20715,10 +20756,10 @@ var init_text = __esm({
|
|
20715
20756
|
}
|
20716
20757
|
});
|
20717
20758
|
|
20718
|
-
// ../
|
20759
|
+
// ../drizzle-orm/dist/pg-core/columns/time.js
|
20719
20760
|
var _a106, _b79, PgTimeBuilder, _a107, _b80, PgTime;
|
20720
20761
|
var init_time = __esm({
|
20721
|
-
"../
|
20762
|
+
"../drizzle-orm/dist/pg-core/columns/time.js"() {
|
20722
20763
|
"use strict";
|
20723
20764
|
init_entity();
|
20724
20765
|
init_common2();
|
@@ -20754,10 +20795,10 @@ var init_time = __esm({
|
|
20754
20795
|
}
|
20755
20796
|
});
|
20756
20797
|
|
20757
|
-
// ../
|
20798
|
+
// ../drizzle-orm/dist/pg-core/columns/timestamp.js
|
20758
20799
|
var _a108, _b81, PgTimestampBuilder, _a109, _b82, PgTimestamp, _a110, _b83, PgTimestampStringBuilder, _a111, _b84, PgTimestampString;
|
20759
20800
|
var init_timestamp = __esm({
|
20760
|
-
"../
|
20801
|
+
"../drizzle-orm/dist/pg-core/columns/timestamp.js"() {
|
20761
20802
|
"use strict";
|
20762
20803
|
init_entity();
|
20763
20804
|
init_common2();
|
@@ -20826,10 +20867,10 @@ var init_timestamp = __esm({
|
|
20826
20867
|
}
|
20827
20868
|
});
|
20828
20869
|
|
20829
|
-
// ../
|
20870
|
+
// ../drizzle-orm/dist/pg-core/columns/uuid.js
|
20830
20871
|
var _a112, _b85, PgUUIDBuilder, _a113, _b86, PgUUID;
|
20831
20872
|
var init_uuid = __esm({
|
20832
|
-
"../
|
20873
|
+
"../drizzle-orm/dist/pg-core/columns/uuid.js"() {
|
20833
20874
|
"use strict";
|
20834
20875
|
init_entity();
|
20835
20876
|
init_sql();
|
@@ -20859,10 +20900,10 @@ var init_uuid = __esm({
|
|
20859
20900
|
}
|
20860
20901
|
});
|
20861
20902
|
|
20862
|
-
// ../
|
20903
|
+
// ../drizzle-orm/dist/pg-core/columns/varchar.js
|
20863
20904
|
var _a114, _b87, PgVarcharBuilder, _a115, _b88, PgVarchar;
|
20864
20905
|
var init_varchar = __esm({
|
20865
|
-
"../
|
20906
|
+
"../drizzle-orm/dist/pg-core/columns/varchar.js"() {
|
20866
20907
|
"use strict";
|
20867
20908
|
init_entity();
|
20868
20909
|
init_common2();
|
@@ -20892,10 +20933,10 @@ var init_varchar = __esm({
|
|
20892
20933
|
}
|
20893
20934
|
});
|
20894
20935
|
|
20895
|
-
// ../
|
20936
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/bit.js
|
20896
20937
|
var _a116, _b89, PgBinaryVectorBuilder, _a117, _b90, PgBinaryVector;
|
20897
20938
|
var init_bit = __esm({
|
20898
|
-
"../
|
20939
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/bit.js"() {
|
20899
20940
|
"use strict";
|
20900
20941
|
init_entity();
|
20901
20942
|
init_common2();
|
@@ -20926,10 +20967,10 @@ var init_bit = __esm({
|
|
20926
20967
|
}
|
20927
20968
|
});
|
20928
20969
|
|
20929
|
-
// ../
|
20970
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/halfvec.js
|
20930
20971
|
var _a118, _b91, PgHalfVectorBuilder, _a119, _b92, PgHalfVector;
|
20931
20972
|
var init_halfvec = __esm({
|
20932
|
-
"../
|
20973
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/halfvec.js"() {
|
20933
20974
|
"use strict";
|
20934
20975
|
init_entity();
|
20935
20976
|
init_common2();
|
@@ -20966,10 +21007,10 @@ var init_halfvec = __esm({
|
|
20966
21007
|
}
|
20967
21008
|
});
|
20968
21009
|
|
20969
|
-
// ../
|
21010
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/sparsevec.js
|
20970
21011
|
var _a120, _b93, PgSparseVectorBuilder, _a121, _b94, PgSparseVector;
|
20971
21012
|
var init_sparsevec = __esm({
|
20972
|
-
"../
|
21013
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/sparsevec.js"() {
|
20973
21014
|
"use strict";
|
20974
21015
|
init_entity();
|
20975
21016
|
init_common2();
|
@@ -21000,10 +21041,10 @@ var init_sparsevec = __esm({
|
|
21000
21041
|
}
|
21001
21042
|
});
|
21002
21043
|
|
21003
|
-
// ../
|
21044
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/vector.js
|
21004
21045
|
var _a122, _b95, PgVectorBuilder, _a123, _b96, PgVector;
|
21005
21046
|
var init_vector2 = __esm({
|
21006
|
-
"../
|
21047
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/vector.js"() {
|
21007
21048
|
"use strict";
|
21008
21049
|
init_entity();
|
21009
21050
|
init_common2();
|
@@ -21037,9 +21078,9 @@ var init_vector2 = __esm({
|
|
21037
21078
|
}
|
21038
21079
|
});
|
21039
21080
|
|
21040
|
-
// ../
|
21081
|
+
// ../drizzle-orm/dist/pg-core/columns/index.js
|
21041
21082
|
var init_columns = __esm({
|
21042
|
-
"../
|
21083
|
+
"../drizzle-orm/dist/pg-core/columns/index.js"() {
|
21043
21084
|
"use strict";
|
21044
21085
|
init_bigint();
|
21045
21086
|
init_bigserial();
|
@@ -21078,10 +21119,10 @@ var init_columns = __esm({
|
|
21078
21119
|
}
|
21079
21120
|
});
|
21080
21121
|
|
21081
|
-
// ../
|
21122
|
+
// ../drizzle-orm/dist/pg-core/query-builders/delete.js
|
21082
21123
|
var _a124, _b97, PgDeleteBase;
|
21083
21124
|
var init_delete = __esm({
|
21084
|
-
"../
|
21125
|
+
"../drizzle-orm/dist/pg-core/query-builders/delete.js"() {
|
21085
21126
|
"use strict";
|
21086
21127
|
init_entity();
|
21087
21128
|
init_query_promise();
|
@@ -21134,7 +21175,7 @@ var init_delete = __esm({
|
|
21134
21175
|
this.config.where = where;
|
21135
21176
|
return this;
|
21136
21177
|
}
|
21137
|
-
returning(fields = this.config.table[
|
21178
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
21138
21179
|
this.config.returning = orderSelectedFields(fields);
|
21139
21180
|
return this;
|
21140
21181
|
}
|
@@ -21163,10 +21204,10 @@ var init_delete = __esm({
|
|
21163
21204
|
}
|
21164
21205
|
});
|
21165
21206
|
|
21166
|
-
// ../
|
21207
|
+
// ../drizzle-orm/dist/pg-core/query-builders/insert.js
|
21167
21208
|
var _a125, PgInsertBuilder, _a126, _b98, PgInsertBase;
|
21168
21209
|
var init_insert = __esm({
|
21169
|
-
"../
|
21210
|
+
"../drizzle-orm/dist/pg-core/query-builders/insert.js"() {
|
21170
21211
|
"use strict";
|
21171
21212
|
init_entity();
|
21172
21213
|
init_query_promise();
|
@@ -21189,7 +21230,7 @@ var init_insert = __esm({
|
|
21189
21230
|
}
|
21190
21231
|
const mappedValues = values.map((entry) => {
|
21191
21232
|
const result = {};
|
21192
|
-
const cols = this.table[
|
21233
|
+
const cols = this.table[Table2.Symbol.Columns];
|
21193
21234
|
for (const colKey of Object.keys(entry)) {
|
21194
21235
|
const colValue = entry[colKey];
|
21195
21236
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -21213,7 +21254,7 @@ var init_insert = __esm({
|
|
21213
21254
|
this.dialect = dialect7;
|
21214
21255
|
this.config = { table: table4, values, withList };
|
21215
21256
|
}
|
21216
|
-
returning(fields = this.config.table[
|
21257
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
21217
21258
|
this.config.returning = orderSelectedFields(fields);
|
21218
21259
|
return this;
|
21219
21260
|
}
|
@@ -21319,10 +21360,10 @@ var init_insert = __esm({
|
|
21319
21360
|
}
|
21320
21361
|
});
|
21321
21362
|
|
21322
|
-
// ../
|
21363
|
+
// ../drizzle-orm/dist/pg-core/view-base.js
|
21323
21364
|
var _a127, _b99, PgViewBase;
|
21324
21365
|
var init_view_base = __esm({
|
21325
|
-
"../
|
21366
|
+
"../drizzle-orm/dist/pg-core/view-base.js"() {
|
21326
21367
|
"use strict";
|
21327
21368
|
init_entity();
|
21328
21369
|
init_sql();
|
@@ -21332,10 +21373,10 @@ var init_view_base = __esm({
|
|
21332
21373
|
}
|
21333
21374
|
});
|
21334
21375
|
|
21335
|
-
// ../
|
21376
|
+
// ../drizzle-orm/dist/pg-core/dialect.js
|
21336
21377
|
var _a128, PgDialect;
|
21337
21378
|
var init_dialect = __esm({
|
21338
|
-
"../
|
21379
|
+
"../drizzle-orm/dist/pg-core/dialect.js"() {
|
21339
21380
|
"use strict";
|
21340
21381
|
init_alias();
|
21341
21382
|
init_column();
|
@@ -21411,7 +21452,7 @@ var init_dialect = __esm({
|
|
21411
21452
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
21412
21453
|
}
|
21413
21454
|
buildUpdateSet(table4, set) {
|
21414
|
-
const tableColumns = table4[
|
21455
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
21415
21456
|
const columnNames = Object.keys(tableColumns).filter(
|
21416
21457
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
21417
21458
|
);
|
@@ -21469,7 +21510,7 @@ var init_dialect = __esm({
|
|
21469
21510
|
if (is(field, SQL.Aliased)) {
|
21470
21511
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
21471
21512
|
}
|
21472
|
-
} else if (is(field,
|
21513
|
+
} else if (is(field, Column2)) {
|
21473
21514
|
if (isSingleTable) {
|
21474
21515
|
chunk.push(sql.identifier(field.name));
|
21475
21516
|
} else {
|
@@ -21501,8 +21542,8 @@ var init_dialect = __esm({
|
|
21501
21542
|
}) {
|
21502
21543
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
21503
21544
|
for (const f of fieldsList) {
|
21504
|
-
if (is(f.field,
|
21505
|
-
({ alias }) => alias === (table22[
|
21545
|
+
if (is(f.field, Column2) && getTableName(f.field.table) !== (is(table4, Subquery) ? table4._.alias : is(table4, PgViewBase) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : getTableName(table4)) && !((table22) => joins?.some(
|
21546
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
21506
21547
|
))(f.field.table)) {
|
21507
21548
|
const tableName = getTableName(f.field.table);
|
21508
21549
|
throw new Error(
|
@@ -21518,12 +21559,12 @@ var init_dialect = __esm({
|
|
21518
21559
|
}
|
21519
21560
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
21520
21561
|
const tableSql = (() => {
|
21521
|
-
if (is(table4,
|
21522
|
-
let fullName = sql`${sql.identifier(table4[
|
21523
|
-
if (table4[
|
21524
|
-
fullName = sql`${sql.identifier(table4[
|
21562
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
21563
|
+
let fullName = sql`${sql.identifier(table4[Table2.Symbol.OriginalName])}`;
|
21564
|
+
if (table4[Table2.Symbol.Schema]) {
|
21565
|
+
fullName = sql`${sql.identifier(table4[Table2.Symbol.Schema])}.${fullName}`;
|
21525
21566
|
}
|
21526
|
-
return sql`${fullName} ${sql.identifier(table4[
|
21567
|
+
return sql`${fullName} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
21527
21568
|
}
|
21528
21569
|
return table4;
|
21529
21570
|
})();
|
@@ -21644,7 +21685,7 @@ var init_dialect = __esm({
|
|
21644
21685
|
}
|
21645
21686
|
buildInsertQuery({ table: table4, values, onConflict, returning, withList }) {
|
21646
21687
|
const valuesSqlList = [];
|
21647
|
-
const columns = table4[
|
21688
|
+
const columns = table4[Table2.Symbol.Columns];
|
21648
21689
|
const colEntries = Object.entries(columns).filter(([_2, col]) => !col.shouldDisableInsert());
|
21649
21690
|
const insertOrder = colEntries.map(([, column4]) => sql.identifier(column4.name));
|
21650
21691
|
for (const [valueIndex, value] of values.entries()) {
|
@@ -22265,7 +22306,7 @@ var init_dialect = __esm({
|
|
22265
22306
|
selection.push({
|
22266
22307
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
22267
22308
|
tsKey,
|
22268
|
-
field: is(value,
|
22309
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
22269
22310
|
relationTableTsKey: void 0,
|
22270
22311
|
isJson: false,
|
22271
22312
|
selection: []
|
@@ -22276,7 +22317,7 @@ var init_dialect = __esm({
|
|
22276
22317
|
orderByOrig = [orderByOrig];
|
22277
22318
|
}
|
22278
22319
|
orderBy = orderByOrig.map((orderByValue) => {
|
22279
|
-
if (is(orderByValue,
|
22320
|
+
if (is(orderByValue, Column2)) {
|
22280
22321
|
return aliasedTableColumn(orderByValue, tableAlias);
|
22281
22322
|
}
|
22282
22323
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -22379,7 +22420,7 @@ var init_dialect = __esm({
|
|
22379
22420
|
fields: {},
|
22380
22421
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
22381
22422
|
path: [],
|
22382
|
-
field: is(field2,
|
22423
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
22383
22424
|
})),
|
22384
22425
|
joins,
|
22385
22426
|
where,
|
@@ -22394,7 +22435,7 @@ var init_dialect = __esm({
|
|
22394
22435
|
fields: {},
|
22395
22436
|
fieldsFlat: selection.map(({ field }) => ({
|
22396
22437
|
path: [],
|
22397
|
-
field: is(field,
|
22438
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
22398
22439
|
})),
|
22399
22440
|
joins,
|
22400
22441
|
where,
|
@@ -22415,10 +22456,10 @@ var init_dialect = __esm({
|
|
22415
22456
|
}
|
22416
22457
|
});
|
22417
22458
|
|
22418
|
-
// ../
|
22459
|
+
// ../drizzle-orm/dist/selection-proxy.js
|
22419
22460
|
var _a129, _SelectionProxyHandler, SelectionProxyHandler;
|
22420
22461
|
var init_selection_proxy = __esm({
|
22421
|
-
"../
|
22462
|
+
"../drizzle-orm/dist/selection-proxy.js"() {
|
22422
22463
|
"use strict";
|
22423
22464
|
init_alias();
|
22424
22465
|
init_column();
|
@@ -22472,7 +22513,7 @@ var init_selection_proxy = __esm({
|
|
22472
22513
|
`You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`
|
22473
22514
|
);
|
22474
22515
|
}
|
22475
|
-
if (is(value,
|
22516
|
+
if (is(value, Column2)) {
|
22476
22517
|
if (this.config.alias) {
|
22477
22518
|
return new Proxy(
|
22478
22519
|
value,
|
@@ -22497,10 +22538,10 @@ var init_selection_proxy = __esm({
|
|
22497
22538
|
}
|
22498
22539
|
});
|
22499
22540
|
|
22500
|
-
// ../
|
22541
|
+
// ../drizzle-orm/dist/query-builders/query-builder.js
|
22501
22542
|
var _a130, TypedQueryBuilder;
|
22502
22543
|
var init_query_builder = __esm({
|
22503
|
-
"../
|
22544
|
+
"../drizzle-orm/dist/query-builders/query-builder.js"() {
|
22504
22545
|
"use strict";
|
22505
22546
|
init_entity();
|
22506
22547
|
_a130 = entityKind;
|
@@ -22514,7 +22555,7 @@ var init_query_builder = __esm({
|
|
22514
22555
|
}
|
22515
22556
|
});
|
22516
22557
|
|
22517
|
-
// ../
|
22558
|
+
// ../drizzle-orm/dist/pg-core/query-builders/select.js
|
22518
22559
|
function createSetOperator(type, isAll) {
|
22519
22560
|
return (leftSelect, rightSelect, ...restSelects) => {
|
22520
22561
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -22534,7 +22575,7 @@ function createSetOperator(type, isAll) {
|
|
22534
22575
|
}
|
22535
22576
|
var _a131, PgSelectBuilder, _a132, _b100, PgSelectQueryBuilderBase, _a133, _b101, PgSelectBase, getPgSetOperators, union, unionAll, intersect, intersectAll, except, exceptAll;
|
22536
22577
|
var init_select2 = __esm({
|
22537
|
-
"../
|
22578
|
+
"../drizzle-orm/dist/pg-core/query-builders/select.js"() {
|
22538
22579
|
"use strict";
|
22539
22580
|
init_entity();
|
22540
22581
|
init_view_base();
|
@@ -22936,7 +22977,7 @@ var init_select2 = __esm({
|
|
22936
22977
|
};
|
22937
22978
|
}
|
22938
22979
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
22939
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
22980
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
22940
22981
|
this.config.fields[tableName] = selection;
|
22941
22982
|
}
|
22942
22983
|
}
|
@@ -23251,10 +23292,10 @@ var init_select2 = __esm({
|
|
23251
23292
|
}
|
23252
23293
|
});
|
23253
23294
|
|
23254
|
-
// ../
|
23295
|
+
// ../drizzle-orm/dist/pg-core/query-builders/query-builder.js
|
23255
23296
|
var _a134, QueryBuilder;
|
23256
23297
|
var init_query_builder2 = __esm({
|
23257
|
-
"../
|
23298
|
+
"../drizzle-orm/dist/pg-core/query-builders/query-builder.js"() {
|
23258
23299
|
"use strict";
|
23259
23300
|
init_entity();
|
23260
23301
|
init_dialect();
|
@@ -23343,10 +23384,10 @@ var init_query_builder2 = __esm({
|
|
23343
23384
|
}
|
23344
23385
|
});
|
23345
23386
|
|
23346
|
-
// ../
|
23387
|
+
// ../drizzle-orm/dist/pg-core/query-builders/refresh-materialized-view.js
|
23347
23388
|
var _a135, _b102, PgRefreshMaterializedView;
|
23348
23389
|
var init_refresh_materialized_view = __esm({
|
23349
|
-
"../
|
23390
|
+
"../drizzle-orm/dist/pg-core/query-builders/refresh-materialized-view.js"() {
|
23350
23391
|
"use strict";
|
23351
23392
|
init_entity();
|
23352
23393
|
init_query_promise();
|
@@ -23400,17 +23441,17 @@ var init_refresh_materialized_view = __esm({
|
|
23400
23441
|
}
|
23401
23442
|
});
|
23402
23443
|
|
23403
|
-
// ../
|
23444
|
+
// ../drizzle-orm/dist/pg-core/query-builders/select.types.js
|
23404
23445
|
var init_select_types = __esm({
|
23405
|
-
"../
|
23446
|
+
"../drizzle-orm/dist/pg-core/query-builders/select.types.js"() {
|
23406
23447
|
"use strict";
|
23407
23448
|
}
|
23408
23449
|
});
|
23409
23450
|
|
23410
|
-
// ../
|
23451
|
+
// ../drizzle-orm/dist/pg-core/query-builders/update.js
|
23411
23452
|
var _a136, PgUpdateBuilder, _a137, _b103, PgUpdateBase;
|
23412
23453
|
var init_update = __esm({
|
23413
|
-
"../
|
23454
|
+
"../drizzle-orm/dist/pg-core/query-builders/update.js"() {
|
23414
23455
|
"use strict";
|
23415
23456
|
init_entity();
|
23416
23457
|
init_query_promise();
|
@@ -23483,7 +23524,7 @@ var init_update = __esm({
|
|
23483
23524
|
this.config.where = where;
|
23484
23525
|
return this;
|
23485
23526
|
}
|
23486
|
-
returning(fields = this.config.table[
|
23527
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
23487
23528
|
this.config.returning = orderSelectedFields(fields);
|
23488
23529
|
return this;
|
23489
23530
|
}
|
@@ -23510,9 +23551,9 @@ var init_update = __esm({
|
|
23510
23551
|
}
|
23511
23552
|
});
|
23512
23553
|
|
23513
|
-
// ../
|
23554
|
+
// ../drizzle-orm/dist/pg-core/query-builders/index.js
|
23514
23555
|
var init_query_builders = __esm({
|
23515
|
-
"../
|
23556
|
+
"../drizzle-orm/dist/pg-core/query-builders/index.js"() {
|
23516
23557
|
"use strict";
|
23517
23558
|
init_delete();
|
23518
23559
|
init_insert();
|
@@ -23524,10 +23565,10 @@ var init_query_builders = __esm({
|
|
23524
23565
|
}
|
23525
23566
|
});
|
23526
23567
|
|
23527
|
-
// ../
|
23568
|
+
// ../drizzle-orm/dist/pg-core/query-builders/query.js
|
23528
23569
|
var _a138, RelationalQueryBuilder, _a139, _b104, PgRelationalQuery;
|
23529
23570
|
var init_query = __esm({
|
23530
|
-
"../
|
23571
|
+
"../drizzle-orm/dist/pg-core/query-builders/query.js"() {
|
23531
23572
|
"use strict";
|
23532
23573
|
init_entity();
|
23533
23574
|
init_query_promise();
|
@@ -23642,10 +23683,10 @@ var init_query = __esm({
|
|
23642
23683
|
}
|
23643
23684
|
});
|
23644
23685
|
|
23645
|
-
// ../
|
23686
|
+
// ../drizzle-orm/dist/pg-core/query-builders/raw.js
|
23646
23687
|
var _a140, _b105, PgRaw;
|
23647
23688
|
var init_raw = __esm({
|
23648
|
-
"../
|
23689
|
+
"../drizzle-orm/dist/pg-core/query-builders/raw.js"() {
|
23649
23690
|
"use strict";
|
23650
23691
|
init_entity();
|
23651
23692
|
init_query_promise();
|
@@ -23679,10 +23720,10 @@ var init_raw = __esm({
|
|
23679
23720
|
}
|
23680
23721
|
});
|
23681
23722
|
|
23682
|
-
// ../
|
23723
|
+
// ../drizzle-orm/dist/pg-core/db.js
|
23683
23724
|
var _a141, PgDatabase;
|
23684
23725
|
var init_db = __esm({
|
23685
|
-
"../
|
23726
|
+
"../drizzle-orm/dist/pg-core/db.js"() {
|
23686
23727
|
"use strict";
|
23687
23728
|
init_entity();
|
23688
23729
|
init_query_builders();
|
@@ -23960,10 +24001,10 @@ var init_db = __esm({
|
|
23960
24001
|
}
|
23961
24002
|
});
|
23962
24003
|
|
23963
|
-
// ../
|
24004
|
+
// ../drizzle-orm/dist/pg-core/indexes.js
|
23964
24005
|
var _a142, IndexBuilderOn, _a143, IndexBuilder, _a144, Index2;
|
23965
24006
|
var init_indexes = __esm({
|
23966
|
-
"../
|
24007
|
+
"../drizzle-orm/dist/pg-core/indexes.js"() {
|
23967
24008
|
"use strict";
|
23968
24009
|
init_sql();
|
23969
24010
|
init_entity();
|
@@ -24078,7 +24119,7 @@ var init_indexes = __esm({
|
|
24078
24119
|
}
|
24079
24120
|
});
|
24080
24121
|
|
24081
|
-
// ../
|
24122
|
+
// ../drizzle-orm/dist/pg-core/sequence.js
|
24082
24123
|
function pgSequenceWithSchema(name2, options, schema4) {
|
24083
24124
|
return new PgSequence(name2, options, schema4);
|
24084
24125
|
}
|
@@ -24087,7 +24128,7 @@ function isPgSequence(obj) {
|
|
24087
24128
|
}
|
24088
24129
|
var _a145, PgSequence;
|
24089
24130
|
var init_sequence = __esm({
|
24090
|
-
"../
|
24131
|
+
"../drizzle-orm/dist/pg-core/sequence.js"() {
|
24091
24132
|
"use strict";
|
24092
24133
|
init_entity();
|
24093
24134
|
_a145 = entityKind;
|
@@ -24102,16 +24143,16 @@ var init_sequence = __esm({
|
|
24102
24143
|
}
|
24103
24144
|
});
|
24104
24145
|
|
24105
|
-
// ../
|
24146
|
+
// ../drizzle-orm/dist/pg-core/view-common.js
|
24106
24147
|
var PgViewConfig;
|
24107
24148
|
var init_view_common2 = __esm({
|
24108
|
-
"../
|
24149
|
+
"../drizzle-orm/dist/pg-core/view-common.js"() {
|
24109
24150
|
"use strict";
|
24110
24151
|
PgViewConfig = Symbol.for("drizzle:PgViewConfig");
|
24111
24152
|
}
|
24112
24153
|
});
|
24113
24154
|
|
24114
|
-
// ../
|
24155
|
+
// ../drizzle-orm/dist/pg-core/view.js
|
24115
24156
|
function pgViewWithSchema(name2, selection, schema4) {
|
24116
24157
|
if (selection) {
|
24117
24158
|
return new ManualViewBuilder(name2, selection, schema4);
|
@@ -24126,7 +24167,7 @@ function pgMaterializedViewWithSchema(name2, selection, schema4) {
|
|
24126
24167
|
}
|
24127
24168
|
var _a146, DefaultViewBuilderCore, _a147, _b106, ViewBuilder, _a148, _b107, ManualViewBuilder, _a149, MaterializedViewBuilderCore, _a150, _b108, MaterializedViewBuilder, _a151, _b109, ManualMaterializedViewBuilder, _a152, _b110, _c3, PgView, PgMaterializedViewConfig, _a153, _b111, _c4, PgMaterializedView;
|
24128
24169
|
var init_view = __esm({
|
24129
|
-
"../
|
24170
|
+
"../drizzle-orm/dist/pg-core/view.js"() {
|
24130
24171
|
"use strict";
|
24131
24172
|
init_entity();
|
24132
24173
|
init_selection_proxy();
|
@@ -24353,10 +24394,10 @@ var init_view = __esm({
|
|
24353
24394
|
}
|
24354
24395
|
});
|
24355
24396
|
|
24356
|
-
// ../
|
24357
|
-
var _a154,
|
24397
|
+
// ../drizzle-orm/dist/pg-core/schema.js
|
24398
|
+
var _a154, PgSchema5;
|
24358
24399
|
var init_schema = __esm({
|
24359
|
-
"../
|
24400
|
+
"../drizzle-orm/dist/pg-core/schema.js"() {
|
24360
24401
|
"use strict";
|
24361
24402
|
init_entity();
|
24362
24403
|
init_sql();
|
@@ -24365,7 +24406,7 @@ var init_schema = __esm({
|
|
24365
24406
|
init_table2();
|
24366
24407
|
init_view();
|
24367
24408
|
_a154 = entityKind;
|
24368
|
-
|
24409
|
+
PgSchema5 = class {
|
24369
24410
|
constructor(schemaName) {
|
24370
24411
|
__publicField(this, "table", (name2, columns, extraConfig) => {
|
24371
24412
|
return pgTableWithSchema(name2, columns, extraConfig, this.schemaName);
|
@@ -24391,14 +24432,14 @@ var init_schema = __esm({
|
|
24391
24432
|
return true;
|
24392
24433
|
}
|
24393
24434
|
};
|
24394
|
-
__publicField(
|
24435
|
+
__publicField(PgSchema5, _a154, "PgSchema");
|
24395
24436
|
}
|
24396
24437
|
});
|
24397
24438
|
|
24398
|
-
// ../
|
24439
|
+
// ../drizzle-orm/dist/pg-core/session.js
|
24399
24440
|
var _a155, PgPreparedQuery, _a156, PgSession, _a157, _b112, PgTransaction;
|
24400
24441
|
var init_session = __esm({
|
24401
|
-
"../
|
24442
|
+
"../drizzle-orm/dist/pg-core/session.js"() {
|
24402
24443
|
"use strict";
|
24403
24444
|
init_entity();
|
24404
24445
|
init_errors();
|
@@ -24479,26 +24520,26 @@ var init_session = __esm({
|
|
24479
24520
|
}
|
24480
24521
|
});
|
24481
24522
|
|
24482
|
-
// ../
|
24523
|
+
// ../drizzle-orm/dist/pg-core/subquery.js
|
24483
24524
|
var init_subquery2 = __esm({
|
24484
|
-
"../
|
24525
|
+
"../drizzle-orm/dist/pg-core/subquery.js"() {
|
24485
24526
|
"use strict";
|
24486
24527
|
}
|
24487
24528
|
});
|
24488
24529
|
|
24489
|
-
// ../
|
24530
|
+
// ../drizzle-orm/dist/pg-core/utils.js
|
24490
24531
|
function getTableConfig(table4) {
|
24491
|
-
const columns = Object.values(table4[
|
24532
|
+
const columns = Object.values(table4[Table2.Symbol.Columns]);
|
24492
24533
|
const indexes = [];
|
24493
24534
|
const checks = [];
|
24494
24535
|
const primaryKeys = [];
|
24495
24536
|
const foreignKeys = Object.values(table4[PgTable.Symbol.InlineForeignKeys]);
|
24496
24537
|
const uniqueConstraints = [];
|
24497
|
-
const name2 = table4[
|
24498
|
-
const schema4 = table4[
|
24538
|
+
const name2 = table4[Table2.Symbol.Name];
|
24539
|
+
const schema4 = table4[Table2.Symbol.Schema];
|
24499
24540
|
const extraConfigBuilder = table4[PgTable.Symbol.ExtraConfigBuilder];
|
24500
24541
|
if (extraConfigBuilder !== void 0) {
|
24501
|
-
const extraConfig = extraConfigBuilder(table4[
|
24542
|
+
const extraConfig = extraConfigBuilder(table4[Table2.Symbol.ExtraConfigColumns]);
|
24502
24543
|
for (const builder of Object.values(extraConfig)) {
|
24503
24544
|
if (is(builder, IndexBuilder)) {
|
24504
24545
|
indexes.push(builder.build(table4));
|
@@ -24525,7 +24566,7 @@ function getTableConfig(table4) {
|
|
24525
24566
|
};
|
24526
24567
|
}
|
24527
24568
|
var init_utils4 = __esm({
|
24528
|
-
"../
|
24569
|
+
"../drizzle-orm/dist/pg-core/utils.js"() {
|
24529
24570
|
"use strict";
|
24530
24571
|
init_entity();
|
24531
24572
|
init_table2();
|
@@ -24538,17 +24579,17 @@ var init_utils4 = __esm({
|
|
24538
24579
|
}
|
24539
24580
|
});
|
24540
24581
|
|
24541
|
-
// ../
|
24582
|
+
// ../drizzle-orm/dist/pg-core/utils/index.js
|
24542
24583
|
var init_utils5 = __esm({
|
24543
|
-
"../
|
24584
|
+
"../drizzle-orm/dist/pg-core/utils/index.js"() {
|
24544
24585
|
"use strict";
|
24545
24586
|
init_array();
|
24546
24587
|
}
|
24547
24588
|
});
|
24548
24589
|
|
24549
|
-
// ../
|
24590
|
+
// ../drizzle-orm/dist/pg-core/index.js
|
24550
24591
|
var init_pg_core = __esm({
|
24551
|
-
"../
|
24592
|
+
"../drizzle-orm/dist/pg-core/index.js"() {
|
24552
24593
|
"use strict";
|
24553
24594
|
init_alias2();
|
24554
24595
|
init_checks();
|
@@ -24603,16 +24644,41 @@ function minRangeForIdentityBasedOn(columnType) {
|
|
24603
24644
|
function stringFromDatabaseIdentityProperty(field) {
|
24604
24645
|
return typeof field === "string" ? field : typeof field === "undefined" ? void 0 : typeof field === "bigint" ? field.toString() : String(field);
|
24605
24646
|
}
|
24647
|
+
function buildArrayString(array, sqlType) {
|
24648
|
+
sqlType = sqlType.split("[")[0];
|
24649
|
+
const values = array.map((value) => {
|
24650
|
+
if (typeof value === "number" || typeof value === "bigint") {
|
24651
|
+
return value.toString();
|
24652
|
+
} else if (typeof value === "boolean") {
|
24653
|
+
return value ? "true" : "false";
|
24654
|
+
} else if (Array.isArray(value)) {
|
24655
|
+
return buildArrayString(value, sqlType);
|
24656
|
+
} else if (value instanceof Date) {
|
24657
|
+
if (sqlType === "date") {
|
24658
|
+
return `"${value.toISOString().split("T")[0]}"`;
|
24659
|
+
} else if (sqlType === "timestamp") {
|
24660
|
+
return `"${value.toISOString().replace("T", " ").slice(0, 23)}"`;
|
24661
|
+
} else {
|
24662
|
+
return `"${value.toISOString()}"`;
|
24663
|
+
}
|
24664
|
+
} else if (typeof value === "object") {
|
24665
|
+
return `"${JSON.stringify(value).replaceAll('"', '\\"')}"`;
|
24666
|
+
}
|
24667
|
+
return `"${value}"`;
|
24668
|
+
}).join(",");
|
24669
|
+
return `{${values}}`;
|
24670
|
+
}
|
24606
24671
|
var dialect4, indexName, generatePgSnapshot, trimChar, fromDatabase, columnToDefault, defaultForColumn;
|
24607
24672
|
var init_pgSerializer = __esm({
|
24608
24673
|
"src/serializer/pgSerializer.ts"() {
|
24609
24674
|
"use strict";
|
24610
24675
|
init_source();
|
24611
|
-
|
24676
|
+
init_dist();
|
24612
24677
|
init_pg_core();
|
24613
24678
|
init_pg_core();
|
24614
24679
|
init_vector3();
|
24615
24680
|
init_outputs();
|
24681
|
+
init_utils();
|
24616
24682
|
init_serializer();
|
24617
24683
|
dialect4 = new PgDialect();
|
24618
24684
|
indexName = (tableName, columns) => {
|
@@ -24719,6 +24785,11 @@ ${withStyle.errorWarning(`We've found duplicated unique constraint names in ${so
|
|
24719
24785
|
} else {
|
24720
24786
|
columnToSet.default = `'${column4.default.toISOString()}'`;
|
24721
24787
|
}
|
24788
|
+
} else if (isPgArrayType(sqlTypeLowered) && Array.isArray(column4.default)) {
|
24789
|
+
columnToSet.default = `'${buildArrayString(
|
24790
|
+
column4.default,
|
24791
|
+
sqlTypeLowered
|
24792
|
+
)}'::${sqlTypeLowered}`;
|
24722
24793
|
} else {
|
24723
24794
|
columnToSet.default = column4.default;
|
24724
24795
|
}
|
@@ -25517,17 +25588,17 @@ var init_selector_ui = __esm({
|
|
25517
25588
|
}
|
25518
25589
|
});
|
25519
25590
|
|
25520
|
-
// ../
|
25591
|
+
// ../drizzle-orm/dist/sqlite-core/alias.js
|
25521
25592
|
var init_alias3 = __esm({
|
25522
|
-
"../
|
25593
|
+
"../drizzle-orm/dist/sqlite-core/alias.js"() {
|
25523
25594
|
"use strict";
|
25524
25595
|
}
|
25525
25596
|
});
|
25526
25597
|
|
25527
|
-
// ../
|
25598
|
+
// ../drizzle-orm/dist/sqlite-core/checks.js
|
25528
25599
|
var _a158, CheckBuilder2, _a159, Check2;
|
25529
25600
|
var init_checks2 = __esm({
|
25530
|
-
"../
|
25601
|
+
"../drizzle-orm/dist/sqlite-core/checks.js"() {
|
25531
25602
|
"use strict";
|
25532
25603
|
init_entity();
|
25533
25604
|
_a158 = entityKind;
|
@@ -25556,7 +25627,7 @@ var init_checks2 = __esm({
|
|
25556
25627
|
}
|
25557
25628
|
});
|
25558
25629
|
|
25559
|
-
// ../
|
25630
|
+
// ../drizzle-orm/dist/sqlite-core/table.js
|
25560
25631
|
function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2) {
|
25561
25632
|
const rawTable = new SQLiteTable(name2, schema4, baseName);
|
25562
25633
|
const builtColumns = Object.fromEntries(
|
@@ -25568,8 +25639,8 @@ function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2)
|
|
25568
25639
|
})
|
25569
25640
|
);
|
25570
25641
|
const table4 = Object.assign(rawTable, builtColumns);
|
25571
|
-
table4[
|
25572
|
-
table4[
|
25642
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
25643
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumns;
|
25573
25644
|
if (extraConfig) {
|
25574
25645
|
table4[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
25575
25646
|
}
|
@@ -25577,12 +25648,12 @@ function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2)
|
|
25577
25648
|
}
|
25578
25649
|
var InlineForeignKeys2, _a160, _b113, _c5, _d3, _e2, SQLiteTable, sqliteTable;
|
25579
25650
|
var init_table3 = __esm({
|
25580
|
-
"../
|
25651
|
+
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
25581
25652
|
"use strict";
|
25582
25653
|
init_entity();
|
25583
25654
|
init_table();
|
25584
25655
|
InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
25585
|
-
SQLiteTable = class extends (_e2 =
|
25656
|
+
SQLiteTable = class extends (_e2 = Table2, _d3 = entityKind, _c5 = Table2.Symbol.Columns, _b113 = InlineForeignKeys2, _a160 = Table2.Symbol.ExtraConfigBuilder, _e2) {
|
25586
25657
|
constructor() {
|
25587
25658
|
super(...arguments);
|
25588
25659
|
/** @internal */
|
@@ -25595,7 +25666,7 @@ var init_table3 = __esm({
|
|
25595
25666
|
};
|
25596
25667
|
__publicField(SQLiteTable, _d3, "SQLiteTable");
|
25597
25668
|
/** @internal */
|
25598
|
-
__publicField(SQLiteTable, "Symbol", Object.assign({},
|
25669
|
+
__publicField(SQLiteTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
25599
25670
|
InlineForeignKeys: InlineForeignKeys2
|
25600
25671
|
}));
|
25601
25672
|
sqliteTable = (name2, columns, extraConfig) => {
|
@@ -25604,10 +25675,10 @@ var init_table3 = __esm({
|
|
25604
25675
|
}
|
25605
25676
|
});
|
25606
25677
|
|
25607
|
-
// ../
|
25678
|
+
// ../drizzle-orm/dist/sqlite-core/foreign-keys.js
|
25608
25679
|
var _a161, ForeignKeyBuilder2, _a162, ForeignKey2;
|
25609
25680
|
var init_foreign_keys2 = __esm({
|
25610
|
-
"../
|
25681
|
+
"../drizzle-orm/dist/sqlite-core/foreign-keys.js"() {
|
25611
25682
|
"use strict";
|
25612
25683
|
init_entity();
|
25613
25684
|
init_table3();
|
@@ -25671,13 +25742,13 @@ var init_foreign_keys2 = __esm({
|
|
25671
25742
|
}
|
25672
25743
|
});
|
25673
25744
|
|
25674
|
-
// ../
|
25745
|
+
// ../drizzle-orm/dist/sqlite-core/unique-constraint.js
|
25675
25746
|
function uniqueKeyName2(table4, columns) {
|
25676
25747
|
return `${table4[SQLiteTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
25677
25748
|
}
|
25678
25749
|
var _a163, UniqueConstraintBuilder2, _a164, UniqueOnConstraintBuilder2, _a165, UniqueConstraint2;
|
25679
25750
|
var init_unique_constraint2 = __esm({
|
25680
|
-
"../
|
25751
|
+
"../drizzle-orm/dist/sqlite-core/unique-constraint.js"() {
|
25681
25752
|
"use strict";
|
25682
25753
|
init_entity();
|
25683
25754
|
init_table3();
|
@@ -25724,10 +25795,10 @@ var init_unique_constraint2 = __esm({
|
|
25724
25795
|
}
|
25725
25796
|
});
|
25726
25797
|
|
25727
|
-
// ../
|
25798
|
+
// ../drizzle-orm/dist/sqlite-core/columns/common.js
|
25728
25799
|
var _a166, _b114, SQLiteColumnBuilder, _a167, _b115, SQLiteColumn;
|
25729
25800
|
var init_common3 = __esm({
|
25730
|
-
"../
|
25801
|
+
"../drizzle-orm/dist/sqlite-core/columns/common.js"() {
|
25731
25802
|
"use strict";
|
25732
25803
|
init_column_builder();
|
25733
25804
|
init_column();
|
@@ -25776,7 +25847,7 @@ var init_common3 = __esm({
|
|
25776
25847
|
}
|
25777
25848
|
};
|
25778
25849
|
__publicField(SQLiteColumnBuilder, _a166, "SQLiteColumnBuilder");
|
25779
|
-
SQLiteColumn = class extends (_b115 =
|
25850
|
+
SQLiteColumn = class extends (_b115 = Column2, _a167 = entityKind, _b115) {
|
25780
25851
|
constructor(table4, config) {
|
25781
25852
|
if (!config.uniqueName) {
|
25782
25853
|
config.uniqueName = uniqueKeyName2(table4, [config.name]);
|
@@ -25789,10 +25860,10 @@ var init_common3 = __esm({
|
|
25789
25860
|
}
|
25790
25861
|
});
|
25791
25862
|
|
25792
|
-
// ../
|
25863
|
+
// ../drizzle-orm/dist/sqlite-core/columns/blob.js
|
25793
25864
|
var _a168, _b116, SQLiteBigIntBuilder, _a169, _b117, SQLiteBigInt, _a170, _b118, SQLiteBlobJsonBuilder, _a171, _b119, SQLiteBlobJson, _a172, _b120, SQLiteBlobBufferBuilder, _a173, _b121, SQLiteBlobBuffer;
|
25794
25865
|
var init_blob = __esm({
|
25795
|
-
"../
|
25866
|
+
"../drizzle-orm/dist/sqlite-core/columns/blob.js"() {
|
25796
25867
|
"use strict";
|
25797
25868
|
init_entity();
|
25798
25869
|
init_common3();
|
@@ -25862,10 +25933,10 @@ var init_blob = __esm({
|
|
25862
25933
|
}
|
25863
25934
|
});
|
25864
25935
|
|
25865
|
-
// ../
|
25936
|
+
// ../drizzle-orm/dist/sqlite-core/columns/custom.js
|
25866
25937
|
var _a174, _b122, SQLiteCustomColumnBuilder, _a175, _b123, SQLiteCustomColumn;
|
25867
25938
|
var init_custom2 = __esm({
|
25868
|
-
"../
|
25939
|
+
"../drizzle-orm/dist/sqlite-core/columns/custom.js"() {
|
25869
25940
|
"use strict";
|
25870
25941
|
init_entity();
|
25871
25942
|
init_common3();
|
@@ -25908,10 +25979,10 @@ var init_custom2 = __esm({
|
|
25908
25979
|
}
|
25909
25980
|
});
|
25910
25981
|
|
25911
|
-
// ../
|
25982
|
+
// ../drizzle-orm/dist/sqlite-core/columns/integer.js
|
25912
25983
|
var _a176, _b124, SQLiteBaseIntegerBuilder, _a177, _b125, SQLiteBaseInteger, _a178, _b126, SQLiteIntegerBuilder, _a179, _b127, SQLiteInteger, _a180, _b128, SQLiteTimestampBuilder, _a181, _b129, SQLiteTimestamp, _a182, _b130, SQLiteBooleanBuilder, _a183, _b131, SQLiteBoolean;
|
25913
25984
|
var init_integer2 = __esm({
|
25914
|
-
"../
|
25985
|
+
"../drizzle-orm/dist/sqlite-core/columns/integer.js"() {
|
25915
25986
|
"use strict";
|
25916
25987
|
init_entity();
|
25917
25988
|
init_sql();
|
@@ -26025,10 +26096,10 @@ var init_integer2 = __esm({
|
|
26025
26096
|
}
|
26026
26097
|
});
|
26027
26098
|
|
26028
|
-
// ../
|
26099
|
+
// ../drizzle-orm/dist/sqlite-core/columns/numeric.js
|
26029
26100
|
var _a184, _b132, SQLiteNumericBuilder, _a185, _b133, SQLiteNumeric;
|
26030
26101
|
var init_numeric2 = __esm({
|
26031
|
-
"../
|
26102
|
+
"../drizzle-orm/dist/sqlite-core/columns/numeric.js"() {
|
26032
26103
|
"use strict";
|
26033
26104
|
init_entity();
|
26034
26105
|
init_common3();
|
@@ -26054,10 +26125,10 @@ var init_numeric2 = __esm({
|
|
26054
26125
|
}
|
26055
26126
|
});
|
26056
26127
|
|
26057
|
-
// ../
|
26128
|
+
// ../drizzle-orm/dist/sqlite-core/columns/real.js
|
26058
26129
|
var _a186, _b134, SQLiteRealBuilder, _a187, _b135, SQLiteReal;
|
26059
26130
|
var init_real2 = __esm({
|
26060
|
-
"../
|
26131
|
+
"../drizzle-orm/dist/sqlite-core/columns/real.js"() {
|
26061
26132
|
"use strict";
|
26062
26133
|
init_entity();
|
26063
26134
|
init_common3();
|
@@ -26080,10 +26151,10 @@ var init_real2 = __esm({
|
|
26080
26151
|
}
|
26081
26152
|
});
|
26082
26153
|
|
26083
|
-
// ../
|
26154
|
+
// ../drizzle-orm/dist/sqlite-core/columns/text.js
|
26084
26155
|
var _a188, _b136, SQLiteTextBuilder, _a189, _b137, SQLiteText, _a190, _b138, SQLiteTextJsonBuilder, _a191, _b139, SQLiteTextJson;
|
26085
26156
|
var init_text2 = __esm({
|
26086
|
-
"../
|
26157
|
+
"../drizzle-orm/dist/sqlite-core/columns/text.js"() {
|
26087
26158
|
"use strict";
|
26088
26159
|
init_entity();
|
26089
26160
|
init_common3();
|
@@ -26138,9 +26209,9 @@ var init_text2 = __esm({
|
|
26138
26209
|
}
|
26139
26210
|
});
|
26140
26211
|
|
26141
|
-
// ../
|
26212
|
+
// ../drizzle-orm/dist/sqlite-core/columns/index.js
|
26142
26213
|
var init_columns2 = __esm({
|
26143
|
-
"../
|
26214
|
+
"../drizzle-orm/dist/sqlite-core/columns/index.js"() {
|
26144
26215
|
"use strict";
|
26145
26216
|
init_blob();
|
26146
26217
|
init_common3();
|
@@ -26152,10 +26223,10 @@ var init_columns2 = __esm({
|
|
26152
26223
|
}
|
26153
26224
|
});
|
26154
26225
|
|
26155
|
-
// ../
|
26226
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/delete.js
|
26156
26227
|
var _a192, _b140, SQLiteDeleteBase;
|
26157
26228
|
var init_delete2 = __esm({
|
26158
|
-
"../
|
26229
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/delete.js"() {
|
26159
26230
|
"use strict";
|
26160
26231
|
init_entity();
|
26161
26232
|
init_query_promise();
|
@@ -26251,10 +26322,10 @@ var init_delete2 = __esm({
|
|
26251
26322
|
}
|
26252
26323
|
});
|
26253
26324
|
|
26254
|
-
// ../
|
26325
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/insert.js
|
26255
26326
|
var _a193, SQLiteInsertBuilder, _a194, _b141, SQLiteInsertBase;
|
26256
26327
|
var init_insert2 = __esm({
|
26257
|
-
"../
|
26328
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/insert.js"() {
|
26258
26329
|
"use strict";
|
26259
26330
|
init_entity();
|
26260
26331
|
init_query_promise();
|
@@ -26277,7 +26348,7 @@ var init_insert2 = __esm({
|
|
26277
26348
|
}
|
26278
26349
|
const mappedValues = values.map((entry) => {
|
26279
26350
|
const result = {};
|
26280
|
-
const cols = this.table[
|
26351
|
+
const cols = this.table[Table2.Symbol.Columns];
|
26281
26352
|
for (const colKey of Object.keys(entry)) {
|
26282
26353
|
const colValue = entry[colKey];
|
26283
26354
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -26419,10 +26490,10 @@ var init_insert2 = __esm({
|
|
26419
26490
|
}
|
26420
26491
|
});
|
26421
26492
|
|
26422
|
-
// ../
|
26493
|
+
// ../drizzle-orm/dist/sqlite-core/view-base.js
|
26423
26494
|
var _a195, _b142, SQLiteViewBase;
|
26424
26495
|
var init_view_base2 = __esm({
|
26425
|
-
"../
|
26496
|
+
"../drizzle-orm/dist/sqlite-core/view-base.js"() {
|
26426
26497
|
"use strict";
|
26427
26498
|
init_entity();
|
26428
26499
|
init_sql();
|
@@ -26432,10 +26503,10 @@ var init_view_base2 = __esm({
|
|
26432
26503
|
}
|
26433
26504
|
});
|
26434
26505
|
|
26435
|
-
// ../
|
26506
|
+
// ../drizzle-orm/dist/sqlite-core/dialect.js
|
26436
26507
|
var _a196, SQLiteDialect, _a197, _b143, SQLiteSyncDialect, _a198, _b144, SQLiteAsyncDialect;
|
26437
26508
|
var init_dialect2 = __esm({
|
26438
|
-
"../
|
26509
|
+
"../drizzle-orm/dist/sqlite-core/dialect.js"() {
|
26439
26510
|
"use strict";
|
26440
26511
|
init_alias();
|
26441
26512
|
init_column();
|
@@ -26482,7 +26553,7 @@ var init_dialect2 = __esm({
|
|
26482
26553
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
26483
26554
|
}
|
26484
26555
|
buildUpdateSet(table4, set) {
|
26485
|
-
const tableColumns = table4[
|
26556
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
26486
26557
|
const columnNames = Object.keys(tableColumns).filter(
|
26487
26558
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
26488
26559
|
);
|
@@ -26527,7 +26598,7 @@ var init_dialect2 = __esm({
|
|
26527
26598
|
chunk.push(
|
26528
26599
|
new SQL(
|
26529
26600
|
query.queryChunks.map((c) => {
|
26530
|
-
if (is(c,
|
26601
|
+
if (is(c, Column2)) {
|
26531
26602
|
return sql.identifier(c.name);
|
26532
26603
|
}
|
26533
26604
|
return c;
|
@@ -26540,8 +26611,8 @@ var init_dialect2 = __esm({
|
|
26540
26611
|
if (is(field, SQL.Aliased)) {
|
26541
26612
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
26542
26613
|
}
|
26543
|
-
} else if (is(field,
|
26544
|
-
const tableName = field.table[
|
26614
|
+
} else if (is(field, Column2)) {
|
26615
|
+
const tableName = field.table[Table2.Symbol.Name];
|
26545
26616
|
const columnName = field.name;
|
26546
26617
|
if (isSingleTable) {
|
26547
26618
|
chunk.push(sql.identifier(columnName));
|
@@ -26573,8 +26644,8 @@ var init_dialect2 = __esm({
|
|
26573
26644
|
}) {
|
26574
26645
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
26575
26646
|
for (const f of fieldsList) {
|
26576
|
-
if (is(f.field,
|
26577
|
-
({ alias }) => alias === (table22[
|
26647
|
+
if (is(f.field, Column2) && getTableName(f.field.table) !== (is(table4, Subquery) ? table4._.alias : is(table4, SQLiteViewBase) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : getTableName(table4)) && !((table22) => joins?.some(
|
26648
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
26578
26649
|
))(f.field.table)) {
|
26579
26650
|
const tableName = getTableName(f.field.table);
|
26580
26651
|
throw new Error(
|
@@ -26587,8 +26658,8 @@ var init_dialect2 = __esm({
|
|
26587
26658
|
const distinctSql = distinct ? sql` distinct` : void 0;
|
26588
26659
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
26589
26660
|
const tableSql = (() => {
|
26590
|
-
if (is(table4,
|
26591
|
-
return sql`${sql.identifier(table4[
|
26661
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
26662
|
+
return sql`${sql.identifier(table4[Table2.Symbol.OriginalName])} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
26592
26663
|
}
|
26593
26664
|
return table4;
|
26594
26665
|
})();
|
@@ -26694,7 +26765,7 @@ var init_dialect2 = __esm({
|
|
26694
26765
|
}
|
26695
26766
|
buildInsertQuery({ table: table4, values, onConflict, returning, withList }) {
|
26696
26767
|
const valuesSqlList = [];
|
26697
|
-
const columns = table4[
|
26768
|
+
const columns = table4[Table2.Symbol.Columns];
|
26698
26769
|
const colEntries = Object.entries(columns).filter(
|
26699
26770
|
([_2, col]) => !col.shouldDisableInsert()
|
26700
26771
|
);
|
@@ -26815,7 +26886,7 @@ var init_dialect2 = __esm({
|
|
26815
26886
|
selection.push({
|
26816
26887
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
26817
26888
|
tsKey,
|
26818
|
-
field: is(value,
|
26889
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
26819
26890
|
relationTableTsKey: void 0,
|
26820
26891
|
isJson: false,
|
26821
26892
|
selection: []
|
@@ -26826,7 +26897,7 @@ var init_dialect2 = __esm({
|
|
26826
26897
|
orderByOrig = [orderByOrig];
|
26827
26898
|
}
|
26828
26899
|
orderBy = orderByOrig.map((orderByValue) => {
|
26829
|
-
if (is(orderByValue,
|
26900
|
+
if (is(orderByValue, Column2)) {
|
26830
26901
|
return aliasedTableColumn(orderByValue, tableAlias);
|
26831
26902
|
}
|
26832
26903
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -26926,7 +26997,7 @@ var init_dialect2 = __esm({
|
|
26926
26997
|
fields: {},
|
26927
26998
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
26928
26999
|
path: [],
|
26929
|
-
field: is(field2,
|
27000
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
26930
27001
|
})),
|
26931
27002
|
joins,
|
26932
27003
|
where,
|
@@ -26941,7 +27012,7 @@ var init_dialect2 = __esm({
|
|
26941
27012
|
fields: {},
|
26942
27013
|
fieldsFlat: selection.map(({ field }) => ({
|
26943
27014
|
path: [],
|
26944
|
-
field: is(field,
|
27015
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
26945
27016
|
})),
|
26946
27017
|
joins,
|
26947
27018
|
where,
|
@@ -27027,7 +27098,7 @@ var init_dialect2 = __esm({
|
|
27027
27098
|
}
|
27028
27099
|
});
|
27029
27100
|
|
27030
|
-
// ../
|
27101
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/select.js
|
27031
27102
|
function createSetOperator2(type, isAll) {
|
27032
27103
|
return (leftSelect, rightSelect, ...restSelects) => {
|
27033
27104
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -27047,7 +27118,7 @@ function createSetOperator2(type, isAll) {
|
|
27047
27118
|
}
|
27048
27119
|
var _a199, SQLiteSelectBuilder, _a200, _b145, SQLiteSelectQueryBuilderBase, _a201, _b146, SQLiteSelectBase, getSQLiteSetOperators, union2, unionAll2, intersect2, except2;
|
27049
27120
|
var init_select3 = __esm({
|
27050
|
-
"../
|
27121
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/select.js"() {
|
27051
27122
|
"use strict";
|
27052
27123
|
init_entity();
|
27053
27124
|
init_query_builder();
|
@@ -27358,7 +27429,7 @@ var init_select3 = __esm({
|
|
27358
27429
|
};
|
27359
27430
|
}
|
27360
27431
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
27361
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
27432
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
27362
27433
|
this.config.fields[tableName] = selection;
|
27363
27434
|
}
|
27364
27435
|
}
|
@@ -27660,10 +27731,10 @@ var init_select3 = __esm({
|
|
27660
27731
|
}
|
27661
27732
|
});
|
27662
27733
|
|
27663
|
-
// ../
|
27734
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/query-builder.js
|
27664
27735
|
var _a202, QueryBuilder2;
|
27665
27736
|
var init_query_builder3 = __esm({
|
27666
|
-
"../
|
27737
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/query-builder.js"() {
|
27667
27738
|
"use strict";
|
27668
27739
|
init_entity();
|
27669
27740
|
init_selection_proxy();
|
@@ -27733,17 +27804,17 @@ var init_query_builder3 = __esm({
|
|
27733
27804
|
}
|
27734
27805
|
});
|
27735
27806
|
|
27736
|
-
// ../
|
27807
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/select.types.js
|
27737
27808
|
var init_select_types2 = __esm({
|
27738
|
-
"../
|
27809
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/select.types.js"() {
|
27739
27810
|
"use strict";
|
27740
27811
|
}
|
27741
27812
|
});
|
27742
27813
|
|
27743
|
-
// ../
|
27814
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/update.js
|
27744
27815
|
var _a203, SQLiteUpdateBuilder, _a204, _b147, SQLiteUpdateBase;
|
27745
27816
|
var init_update2 = __esm({
|
27746
|
-
"../
|
27817
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/update.js"() {
|
27747
27818
|
"use strict";
|
27748
27819
|
init_entity();
|
27749
27820
|
init_query_promise();
|
@@ -27861,9 +27932,9 @@ var init_update2 = __esm({
|
|
27861
27932
|
}
|
27862
27933
|
});
|
27863
27934
|
|
27864
|
-
// ../
|
27935
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/index.js
|
27865
27936
|
var init_query_builders2 = __esm({
|
27866
|
-
"../
|
27937
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/index.js"() {
|
27867
27938
|
"use strict";
|
27868
27939
|
init_delete2();
|
27869
27940
|
init_insert2();
|
@@ -27874,10 +27945,10 @@ var init_query_builders2 = __esm({
|
|
27874
27945
|
}
|
27875
27946
|
});
|
27876
27947
|
|
27877
|
-
// ../
|
27948
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/query.js
|
27878
27949
|
var _a205, RelationalQueryBuilder2, _a206, _b148, SQLiteRelationalQuery, _a207, _b149, SQLiteSyncRelationalQuery;
|
27879
27950
|
var init_query2 = __esm({
|
27880
|
-
"../
|
27951
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/query.js"() {
|
27881
27952
|
"use strict";
|
27882
27953
|
init_entity();
|
27883
27954
|
init_query_promise();
|
@@ -28028,10 +28099,10 @@ var init_query2 = __esm({
|
|
28028
28099
|
}
|
28029
28100
|
});
|
28030
28101
|
|
28031
|
-
// ../
|
28102
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/raw.js
|
28032
28103
|
var _a208, _b150, SQLiteRaw;
|
28033
28104
|
var init_raw2 = __esm({
|
28034
|
-
"../
|
28105
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/raw.js"() {
|
28035
28106
|
"use strict";
|
28036
28107
|
init_entity();
|
28037
28108
|
init_query_promise();
|
@@ -28064,10 +28135,10 @@ var init_raw2 = __esm({
|
|
28064
28135
|
}
|
28065
28136
|
});
|
28066
28137
|
|
28067
|
-
// ../
|
28138
|
+
// ../drizzle-orm/dist/sqlite-core/db.js
|
28068
28139
|
var _a209, BaseSQLiteDatabase;
|
28069
28140
|
var init_db2 = __esm({
|
28070
|
-
"../
|
28141
|
+
"../drizzle-orm/dist/sqlite-core/db.js"() {
|
28071
28142
|
"use strict";
|
28072
28143
|
init_entity();
|
28073
28144
|
init_selection_proxy();
|
@@ -28357,10 +28428,10 @@ var init_db2 = __esm({
|
|
28357
28428
|
}
|
28358
28429
|
});
|
28359
28430
|
|
28360
|
-
// ../
|
28431
|
+
// ../drizzle-orm/dist/sqlite-core/indexes.js
|
28361
28432
|
var _a210, IndexBuilderOn2, _a211, IndexBuilder2, _a212, Index4;
|
28362
28433
|
var init_indexes2 = __esm({
|
28363
|
-
"../
|
28434
|
+
"../drizzle-orm/dist/sqlite-core/indexes.js"() {
|
28364
28435
|
"use strict";
|
28365
28436
|
init_entity();
|
28366
28437
|
_a210 = entityKind;
|
@@ -28410,10 +28481,10 @@ var init_indexes2 = __esm({
|
|
28410
28481
|
}
|
28411
28482
|
});
|
28412
28483
|
|
28413
|
-
// ../
|
28484
|
+
// ../drizzle-orm/dist/sqlite-core/primary-keys.js
|
28414
28485
|
var _a213, PrimaryKeyBuilder2, _a214, PrimaryKey2;
|
28415
28486
|
var init_primary_keys2 = __esm({
|
28416
|
-
"../
|
28487
|
+
"../drizzle-orm/dist/sqlite-core/primary-keys.js"() {
|
28417
28488
|
"use strict";
|
28418
28489
|
init_entity();
|
28419
28490
|
init_table3();
|
@@ -28450,10 +28521,10 @@ var init_primary_keys2 = __esm({
|
|
28450
28521
|
}
|
28451
28522
|
});
|
28452
28523
|
|
28453
|
-
// ../
|
28524
|
+
// ../drizzle-orm/dist/sqlite-core/session.js
|
28454
28525
|
var _a215, _b151, ExecuteResultSync, _a216, SQLitePreparedQuery, _a217, SQLiteSession, _a218, _b152, SQLiteTransaction;
|
28455
28526
|
var init_session2 = __esm({
|
28456
|
-
"../
|
28527
|
+
"../drizzle-orm/dist/sqlite-core/session.js"() {
|
28457
28528
|
"use strict";
|
28458
28529
|
init_entity();
|
28459
28530
|
init_errors();
|
@@ -28571,23 +28642,23 @@ var init_session2 = __esm({
|
|
28571
28642
|
}
|
28572
28643
|
});
|
28573
28644
|
|
28574
|
-
// ../
|
28645
|
+
// ../drizzle-orm/dist/sqlite-core/subquery.js
|
28575
28646
|
var init_subquery3 = __esm({
|
28576
|
-
"../
|
28647
|
+
"../drizzle-orm/dist/sqlite-core/subquery.js"() {
|
28577
28648
|
"use strict";
|
28578
28649
|
}
|
28579
28650
|
});
|
28580
28651
|
|
28581
|
-
// ../
|
28652
|
+
// ../drizzle-orm/dist/sqlite-core/view-common.js
|
28582
28653
|
var SQLiteViewConfig;
|
28583
28654
|
var init_view_common3 = __esm({
|
28584
|
-
"../
|
28655
|
+
"../drizzle-orm/dist/sqlite-core/view-common.js"() {
|
28585
28656
|
"use strict";
|
28586
28657
|
SQLiteViewConfig = Symbol.for("drizzle:SQLiteViewConfig");
|
28587
28658
|
}
|
28588
28659
|
});
|
28589
28660
|
|
28590
|
-
// ../
|
28661
|
+
// ../drizzle-orm/dist/sqlite-core/utils.js
|
28591
28662
|
function getTableConfig2(table4) {
|
28592
28663
|
const columns = Object.values(table4[SQLiteTable.Symbol.Columns]);
|
28593
28664
|
const indexes = [];
|
@@ -28595,7 +28666,7 @@ function getTableConfig2(table4) {
|
|
28595
28666
|
const primaryKeys = [];
|
28596
28667
|
const uniqueConstraints = [];
|
28597
28668
|
const foreignKeys = Object.values(table4[SQLiteTable.Symbol.InlineForeignKeys]);
|
28598
|
-
const name2 = table4[
|
28669
|
+
const name2 = table4[Table2.Symbol.Name];
|
28599
28670
|
const extraConfigBuilder = table4[SQLiteTable.Symbol.ExtraConfigBuilder];
|
28600
28671
|
if (extraConfigBuilder !== void 0) {
|
28601
28672
|
const extraConfig = extraConfigBuilder(table4[SQLiteTable.Symbol.Columns]);
|
@@ -28624,7 +28695,7 @@ function getTableConfig2(table4) {
|
|
28624
28695
|
};
|
28625
28696
|
}
|
28626
28697
|
var init_utils6 = __esm({
|
28627
|
-
"../
|
28698
|
+
"../drizzle-orm/dist/sqlite-core/utils.js"() {
|
28628
28699
|
"use strict";
|
28629
28700
|
init_entity();
|
28630
28701
|
init_table();
|
@@ -28637,10 +28708,10 @@ var init_utils6 = __esm({
|
|
28637
28708
|
}
|
28638
28709
|
});
|
28639
28710
|
|
28640
|
-
// ../
|
28711
|
+
// ../drizzle-orm/dist/sqlite-core/view.js
|
28641
28712
|
var _a219, ViewBuilderCore, _a220, _b153, ViewBuilder2, _a221, _b154, ManualViewBuilder2, _a222, _b155, _c6, SQLiteView;
|
28642
28713
|
var init_view2 = __esm({
|
28643
|
-
"../
|
28714
|
+
"../drizzle-orm/dist/sqlite-core/view.js"() {
|
28644
28715
|
"use strict";
|
28645
28716
|
init_entity();
|
28646
28717
|
init_selection_proxy();
|
@@ -28742,9 +28813,9 @@ var init_view2 = __esm({
|
|
28742
28813
|
}
|
28743
28814
|
});
|
28744
28815
|
|
28745
|
-
// ../
|
28816
|
+
// ../drizzle-orm/dist/sqlite-core/index.js
|
28746
28817
|
var init_sqlite_core = __esm({
|
28747
|
-
"../
|
28818
|
+
"../drizzle-orm/dist/sqlite-core/index.js"() {
|
28748
28819
|
"use strict";
|
28749
28820
|
init_alias3();
|
28750
28821
|
init_checks2();
|
@@ -28831,7 +28902,7 @@ var init_sqliteSerializer = __esm({
|
|
28831
28902
|
"src/serializer/sqliteSerializer.ts"() {
|
28832
28903
|
"use strict";
|
28833
28904
|
init_source();
|
28834
|
-
|
28905
|
+
init_dist();
|
28835
28906
|
init_sqlite_core();
|
28836
28907
|
init_outputs();
|
28837
28908
|
init_serializer();
|
@@ -29244,17 +29315,17 @@ WHERE
|
|
29244
29315
|
}
|
29245
29316
|
});
|
29246
29317
|
|
29247
|
-
// ../
|
29318
|
+
// ../drizzle-orm/dist/mysql-core/alias.js
|
29248
29319
|
var init_alias4 = __esm({
|
29249
|
-
"../
|
29320
|
+
"../drizzle-orm/dist/mysql-core/alias.js"() {
|
29250
29321
|
"use strict";
|
29251
29322
|
}
|
29252
29323
|
});
|
29253
29324
|
|
29254
|
-
// ../
|
29325
|
+
// ../drizzle-orm/dist/mysql-core/checks.js
|
29255
29326
|
var _a223, CheckBuilder3, _a224, Check3;
|
29256
29327
|
var init_checks3 = __esm({
|
29257
|
-
"../
|
29328
|
+
"../drizzle-orm/dist/mysql-core/checks.js"() {
|
29258
29329
|
"use strict";
|
29259
29330
|
init_entity();
|
29260
29331
|
_a223 = entityKind;
|
@@ -29284,7 +29355,7 @@ var init_checks3 = __esm({
|
|
29284
29355
|
}
|
29285
29356
|
});
|
29286
29357
|
|
29287
|
-
// ../
|
29358
|
+
// ../drizzle-orm/dist/mysql-core/table.js
|
29288
29359
|
function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = name2) {
|
29289
29360
|
const rawTable = new MySqlTable(name2, schema4, baseName);
|
29290
29361
|
const builtColumns = Object.fromEntries(
|
@@ -29296,8 +29367,8 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = n
|
|
29296
29367
|
})
|
29297
29368
|
);
|
29298
29369
|
const table4 = Object.assign(rawTable, builtColumns);
|
29299
|
-
table4[
|
29300
|
-
table4[
|
29370
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
29371
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumns;
|
29301
29372
|
if (extraConfig) {
|
29302
29373
|
table4[MySqlTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
29303
29374
|
}
|
@@ -29305,12 +29376,12 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = n
|
|
29305
29376
|
}
|
29306
29377
|
var InlineForeignKeys3, _a225, _b156, _c7, _d4, _e3, MySqlTable, mysqlTable;
|
29307
29378
|
var init_table4 = __esm({
|
29308
|
-
"../
|
29379
|
+
"../drizzle-orm/dist/mysql-core/table.js"() {
|
29309
29380
|
"use strict";
|
29310
29381
|
init_entity();
|
29311
29382
|
init_table();
|
29312
29383
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
29313
|
-
MySqlTable = class extends (_e3 =
|
29384
|
+
MySqlTable = class extends (_e3 = Table2, _d4 = entityKind, _c7 = Table2.Symbol.Columns, _b156 = InlineForeignKeys3, _a225 = Table2.Symbol.ExtraConfigBuilder, _e3) {
|
29314
29385
|
constructor() {
|
29315
29386
|
super(...arguments);
|
29316
29387
|
/** @internal */
|
@@ -29323,7 +29394,7 @@ var init_table4 = __esm({
|
|
29323
29394
|
};
|
29324
29395
|
__publicField(MySqlTable, _d4, "MySqlTable");
|
29325
29396
|
/** @internal */
|
29326
|
-
__publicField(MySqlTable, "Symbol", Object.assign({},
|
29397
|
+
__publicField(MySqlTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
29327
29398
|
InlineForeignKeys: InlineForeignKeys3
|
29328
29399
|
}));
|
29329
29400
|
mysqlTable = (name2, columns, extraConfig) => {
|
@@ -29332,10 +29403,10 @@ var init_table4 = __esm({
|
|
29332
29403
|
}
|
29333
29404
|
});
|
29334
29405
|
|
29335
|
-
// ../
|
29406
|
+
// ../drizzle-orm/dist/mysql-core/foreign-keys.js
|
29336
29407
|
var _a226, ForeignKeyBuilder3, _a227, ForeignKey3;
|
29337
29408
|
var init_foreign_keys3 = __esm({
|
29338
|
-
"../
|
29409
|
+
"../drizzle-orm/dist/mysql-core/foreign-keys.js"() {
|
29339
29410
|
"use strict";
|
29340
29411
|
init_entity();
|
29341
29412
|
init_table4();
|
@@ -29399,13 +29470,13 @@ var init_foreign_keys3 = __esm({
|
|
29399
29470
|
}
|
29400
29471
|
});
|
29401
29472
|
|
29402
|
-
// ../
|
29473
|
+
// ../drizzle-orm/dist/mysql-core/unique-constraint.js
|
29403
29474
|
function uniqueKeyName3(table4, columns) {
|
29404
29475
|
return `${table4[MySqlTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
29405
29476
|
}
|
29406
29477
|
var _a228, UniqueConstraintBuilder3, _a229, UniqueOnConstraintBuilder3, _a230, UniqueConstraint3;
|
29407
29478
|
var init_unique_constraint3 = __esm({
|
29408
|
-
"../
|
29479
|
+
"../drizzle-orm/dist/mysql-core/unique-constraint.js"() {
|
29409
29480
|
"use strict";
|
29410
29481
|
init_entity();
|
29411
29482
|
init_table4();
|
@@ -29453,10 +29524,10 @@ var init_unique_constraint3 = __esm({
|
|
29453
29524
|
}
|
29454
29525
|
});
|
29455
29526
|
|
29456
|
-
// ../
|
29527
|
+
// ../drizzle-orm/dist/mysql-core/columns/common.js
|
29457
29528
|
var _a231, _b157, MySqlColumnBuilder, _a232, _b158, MySqlColumn, _a233, _b159, MySqlColumnBuilderWithAutoIncrement, _a234, _b160, MySqlColumnWithAutoIncrement;
|
29458
29529
|
var init_common4 = __esm({
|
29459
|
-
"../
|
29530
|
+
"../drizzle-orm/dist/mysql-core/columns/common.js"() {
|
29460
29531
|
"use strict";
|
29461
29532
|
init_column_builder();
|
29462
29533
|
init_column();
|
@@ -29505,7 +29576,7 @@ var init_common4 = __esm({
|
|
29505
29576
|
}
|
29506
29577
|
};
|
29507
29578
|
__publicField(MySqlColumnBuilder, _a231, "MySqlColumnBuilder");
|
29508
|
-
MySqlColumn = class extends (_b158 =
|
29579
|
+
MySqlColumn = class extends (_b158 = Column2, _a232 = entityKind, _b158) {
|
29509
29580
|
constructor(table4, config) {
|
29510
29581
|
if (!config.uniqueName) {
|
29511
29582
|
config.uniqueName = uniqueKeyName3(table4, [config.name]);
|
@@ -29537,10 +29608,10 @@ var init_common4 = __esm({
|
|
29537
29608
|
}
|
29538
29609
|
});
|
29539
29610
|
|
29540
|
-
// ../
|
29611
|
+
// ../drizzle-orm/dist/mysql-core/columns/bigint.js
|
29541
29612
|
var _a235, _b161, MySqlBigInt53Builder, _a236, _b162, MySqlBigInt53, _a237, _b163, MySqlBigInt64Builder, _a238, _b164, MySqlBigInt64;
|
29542
29613
|
var init_bigint2 = __esm({
|
29543
|
-
"../
|
29614
|
+
"../drizzle-orm/dist/mysql-core/columns/bigint.js"() {
|
29544
29615
|
"use strict";
|
29545
29616
|
init_entity();
|
29546
29617
|
init_common4();
|
@@ -29597,10 +29668,10 @@ var init_bigint2 = __esm({
|
|
29597
29668
|
}
|
29598
29669
|
});
|
29599
29670
|
|
29600
|
-
// ../
|
29671
|
+
// ../drizzle-orm/dist/mysql-core/columns/binary.js
|
29601
29672
|
var _a239, _b165, MySqlBinaryBuilder, _a240, _b166, MySqlBinary;
|
29602
29673
|
var init_binary = __esm({
|
29603
|
-
"../
|
29674
|
+
"../drizzle-orm/dist/mysql-core/columns/binary.js"() {
|
29604
29675
|
"use strict";
|
29605
29676
|
init_entity();
|
29606
29677
|
init_common4();
|
@@ -29628,10 +29699,10 @@ var init_binary = __esm({
|
|
29628
29699
|
}
|
29629
29700
|
});
|
29630
29701
|
|
29631
|
-
// ../
|
29702
|
+
// ../drizzle-orm/dist/mysql-core/columns/boolean.js
|
29632
29703
|
var _a241, _b167, MySqlBooleanBuilder, _a242, _b168, MySqlBoolean;
|
29633
29704
|
var init_boolean2 = __esm({
|
29634
|
-
"../
|
29705
|
+
"../drizzle-orm/dist/mysql-core/columns/boolean.js"() {
|
29635
29706
|
"use strict";
|
29636
29707
|
init_entity();
|
29637
29708
|
init_common4();
|
@@ -29663,10 +29734,10 @@ var init_boolean2 = __esm({
|
|
29663
29734
|
}
|
29664
29735
|
});
|
29665
29736
|
|
29666
|
-
// ../
|
29737
|
+
// ../drizzle-orm/dist/mysql-core/columns/char.js
|
29667
29738
|
var _a243, _b169, MySqlCharBuilder, _a244, _b170, MySqlChar;
|
29668
29739
|
var init_char2 = __esm({
|
29669
|
-
"../
|
29740
|
+
"../drizzle-orm/dist/mysql-core/columns/char.js"() {
|
29670
29741
|
"use strict";
|
29671
29742
|
init_entity();
|
29672
29743
|
init_common4();
|
@@ -29699,10 +29770,10 @@ var init_char2 = __esm({
|
|
29699
29770
|
}
|
29700
29771
|
});
|
29701
29772
|
|
29702
|
-
// ../
|
29773
|
+
// ../drizzle-orm/dist/mysql-core/columns/custom.js
|
29703
29774
|
var _a245, _b171, MySqlCustomColumnBuilder, _a246, _b172, MySqlCustomColumn;
|
29704
29775
|
var init_custom3 = __esm({
|
29705
|
-
"../
|
29776
|
+
"../drizzle-orm/dist/mysql-core/columns/custom.js"() {
|
29706
29777
|
"use strict";
|
29707
29778
|
init_entity();
|
29708
29779
|
init_common4();
|
@@ -29745,10 +29816,10 @@ var init_custom3 = __esm({
|
|
29745
29816
|
}
|
29746
29817
|
});
|
29747
29818
|
|
29748
|
-
// ../
|
29819
|
+
// ../drizzle-orm/dist/mysql-core/columns/date.js
|
29749
29820
|
var _a247, _b173, MySqlDateBuilder, _a248, _b174, MySqlDate, _a249, _b175, MySqlDateStringBuilder, _a250, _b176, MySqlDateString;
|
29750
29821
|
var init_date2 = __esm({
|
29751
|
-
"../
|
29822
|
+
"../drizzle-orm/dist/mysql-core/columns/date.js"() {
|
29752
29823
|
"use strict";
|
29753
29824
|
init_entity();
|
29754
29825
|
init_common4();
|
@@ -29799,10 +29870,10 @@ var init_date2 = __esm({
|
|
29799
29870
|
}
|
29800
29871
|
});
|
29801
29872
|
|
29802
|
-
// ../
|
29873
|
+
// ../drizzle-orm/dist/mysql-core/columns/datetime.js
|
29803
29874
|
var _a251, _b177, MySqlDateTimeBuilder, _a252, _b178, MySqlDateTime, _a253, _b179, MySqlDateTimeStringBuilder, _a254, _b180, MySqlDateTimeString;
|
29804
29875
|
var init_datetime = __esm({
|
29805
|
-
"../
|
29876
|
+
"../drizzle-orm/dist/mysql-core/columns/datetime.js"() {
|
29806
29877
|
"use strict";
|
29807
29878
|
init_entity();
|
29808
29879
|
init_common4();
|
@@ -29867,10 +29938,10 @@ var init_datetime = __esm({
|
|
29867
29938
|
}
|
29868
29939
|
});
|
29869
29940
|
|
29870
|
-
// ../
|
29941
|
+
// ../drizzle-orm/dist/mysql-core/columns/decimal.js
|
29871
29942
|
var _a255, _b181, MySqlDecimalBuilder, _a256, _b182, MySqlDecimal;
|
29872
29943
|
var init_decimal = __esm({
|
29873
|
-
"../
|
29944
|
+
"../drizzle-orm/dist/mysql-core/columns/decimal.js"() {
|
29874
29945
|
"use strict";
|
29875
29946
|
init_entity();
|
29876
29947
|
init_common4();
|
@@ -29909,10 +29980,10 @@ var init_decimal = __esm({
|
|
29909
29980
|
}
|
29910
29981
|
});
|
29911
29982
|
|
29912
|
-
// ../
|
29983
|
+
// ../drizzle-orm/dist/mysql-core/columns/double.js
|
29913
29984
|
var _a257, _b183, MySqlDoubleBuilder, _a258, _b184, MySqlDouble;
|
29914
29985
|
var init_double = __esm({
|
29915
|
-
"../
|
29986
|
+
"../drizzle-orm/dist/mysql-core/columns/double.js"() {
|
29916
29987
|
"use strict";
|
29917
29988
|
init_entity();
|
29918
29989
|
init_common4();
|
@@ -29948,10 +30019,10 @@ var init_double = __esm({
|
|
29948
30019
|
}
|
29949
30020
|
});
|
29950
30021
|
|
29951
|
-
// ../
|
30022
|
+
// ../drizzle-orm/dist/mysql-core/columns/enum.js
|
29952
30023
|
var _a259, _b185, MySqlEnumColumnBuilder, _a260, _b186, MySqlEnumColumn;
|
29953
30024
|
var init_enum2 = __esm({
|
29954
|
-
"../
|
30025
|
+
"../drizzle-orm/dist/mysql-core/columns/enum.js"() {
|
29955
30026
|
"use strict";
|
29956
30027
|
init_entity();
|
29957
30028
|
init_common4();
|
@@ -29982,10 +30053,10 @@ var init_enum2 = __esm({
|
|
29982
30053
|
}
|
29983
30054
|
});
|
29984
30055
|
|
29985
|
-
// ../
|
30056
|
+
// ../drizzle-orm/dist/mysql-core/columns/float.js
|
29986
30057
|
var _a261, _b187, MySqlFloatBuilder, _a262, _b188, MySqlFloat;
|
29987
30058
|
var init_float = __esm({
|
29988
|
-
"../
|
30059
|
+
"../drizzle-orm/dist/mysql-core/columns/float.js"() {
|
29989
30060
|
"use strict";
|
29990
30061
|
init_entity();
|
29991
30062
|
init_common4();
|
@@ -30008,10 +30079,10 @@ var init_float = __esm({
|
|
30008
30079
|
}
|
30009
30080
|
});
|
30010
30081
|
|
30011
|
-
// ../
|
30082
|
+
// ../drizzle-orm/dist/mysql-core/columns/int.js
|
30012
30083
|
var _a263, _b189, MySqlIntBuilder, _a264, _b190, MySqlInt;
|
30013
30084
|
var init_int = __esm({
|
30014
|
-
"../
|
30085
|
+
"../drizzle-orm/dist/mysql-core/columns/int.js"() {
|
30015
30086
|
"use strict";
|
30016
30087
|
init_entity();
|
30017
30088
|
init_common4();
|
@@ -30041,10 +30112,10 @@ var init_int = __esm({
|
|
30041
30112
|
}
|
30042
30113
|
});
|
30043
30114
|
|
30044
|
-
// ../
|
30115
|
+
// ../drizzle-orm/dist/mysql-core/columns/json.js
|
30045
30116
|
var _a265, _b191, MySqlJsonBuilder, _a266, _b192, MySqlJson;
|
30046
30117
|
var init_json2 = __esm({
|
30047
|
-
"../
|
30118
|
+
"../drizzle-orm/dist/mysql-core/columns/json.js"() {
|
30048
30119
|
"use strict";
|
30049
30120
|
init_entity();
|
30050
30121
|
init_common4();
|
@@ -30070,10 +30141,10 @@ var init_json2 = __esm({
|
|
30070
30141
|
}
|
30071
30142
|
});
|
30072
30143
|
|
30073
|
-
// ../
|
30144
|
+
// ../drizzle-orm/dist/mysql-core/columns/mediumint.js
|
30074
30145
|
var _a267, _b193, MySqlMediumIntBuilder, _a268, _b194, MySqlMediumInt;
|
30075
30146
|
var init_mediumint = __esm({
|
30076
|
-
"../
|
30147
|
+
"../drizzle-orm/dist/mysql-core/columns/mediumint.js"() {
|
30077
30148
|
"use strict";
|
30078
30149
|
init_entity();
|
30079
30150
|
init_common4();
|
@@ -30106,10 +30177,10 @@ var init_mediumint = __esm({
|
|
30106
30177
|
}
|
30107
30178
|
});
|
30108
30179
|
|
30109
|
-
// ../
|
30180
|
+
// ../drizzle-orm/dist/mysql-core/columns/real.js
|
30110
30181
|
var _a269, _b195, MySqlRealBuilder, _a270, _b196, MySqlReal;
|
30111
30182
|
var init_real3 = __esm({
|
30112
|
-
"../
|
30183
|
+
"../drizzle-orm/dist/mysql-core/columns/real.js"() {
|
30113
30184
|
"use strict";
|
30114
30185
|
init_entity();
|
30115
30186
|
init_common4();
|
@@ -30145,10 +30216,10 @@ var init_real3 = __esm({
|
|
30145
30216
|
}
|
30146
30217
|
});
|
30147
30218
|
|
30148
|
-
// ../
|
30219
|
+
// ../drizzle-orm/dist/mysql-core/columns/serial.js
|
30149
30220
|
var _a271, _b197, MySqlSerialBuilder, _a272, _b198, MySqlSerial;
|
30150
30221
|
var init_serial2 = __esm({
|
30151
|
-
"../
|
30222
|
+
"../drizzle-orm/dist/mysql-core/columns/serial.js"() {
|
30152
30223
|
"use strict";
|
30153
30224
|
init_entity();
|
30154
30225
|
init_common4();
|
@@ -30179,10 +30250,10 @@ var init_serial2 = __esm({
|
|
30179
30250
|
}
|
30180
30251
|
});
|
30181
30252
|
|
30182
|
-
// ../
|
30253
|
+
// ../drizzle-orm/dist/mysql-core/columns/smallint.js
|
30183
30254
|
var _a273, _b199, MySqlSmallIntBuilder, _a274, _b200, MySqlSmallInt;
|
30184
30255
|
var init_smallint2 = __esm({
|
30185
|
-
"../
|
30256
|
+
"../drizzle-orm/dist/mysql-core/columns/smallint.js"() {
|
30186
30257
|
"use strict";
|
30187
30258
|
init_entity();
|
30188
30259
|
init_common4();
|
@@ -30215,10 +30286,10 @@ var init_smallint2 = __esm({
|
|
30215
30286
|
}
|
30216
30287
|
});
|
30217
30288
|
|
30218
|
-
// ../
|
30289
|
+
// ../drizzle-orm/dist/mysql-core/columns/text.js
|
30219
30290
|
var _a275, _b201, MySqlTextBuilder, _a276, _b202, MySqlText;
|
30220
30291
|
var init_text3 = __esm({
|
30221
|
-
"../
|
30292
|
+
"../drizzle-orm/dist/mysql-core/columns/text.js"() {
|
30222
30293
|
"use strict";
|
30223
30294
|
init_entity();
|
30224
30295
|
init_common4();
|
@@ -30248,10 +30319,10 @@ var init_text3 = __esm({
|
|
30248
30319
|
}
|
30249
30320
|
});
|
30250
30321
|
|
30251
|
-
// ../
|
30322
|
+
// ../drizzle-orm/dist/mysql-core/columns/time.js
|
30252
30323
|
var _a277, _b203, MySqlTimeBuilder, _a278, _b204, MySqlTime;
|
30253
30324
|
var init_time2 = __esm({
|
30254
|
-
"../
|
30325
|
+
"../drizzle-orm/dist/mysql-core/columns/time.js"() {
|
30255
30326
|
"use strict";
|
30256
30327
|
init_entity();
|
30257
30328
|
init_common4();
|
@@ -30280,10 +30351,10 @@ var init_time2 = __esm({
|
|
30280
30351
|
}
|
30281
30352
|
});
|
30282
30353
|
|
30283
|
-
// ../
|
30354
|
+
// ../drizzle-orm/dist/mysql-core/columns/date.common.js
|
30284
30355
|
var _a279, _b205, MySqlDateColumnBaseBuilder, _a280, _b206, MySqlDateBaseColumn;
|
30285
30356
|
var init_date_common2 = __esm({
|
30286
|
-
"../
|
30357
|
+
"../drizzle-orm/dist/mysql-core/columns/date.common.js"() {
|
30287
30358
|
"use strict";
|
30288
30359
|
init_entity();
|
30289
30360
|
init_sql();
|
@@ -30310,10 +30381,10 @@ var init_date_common2 = __esm({
|
|
30310
30381
|
}
|
30311
30382
|
});
|
30312
30383
|
|
30313
|
-
// ../
|
30384
|
+
// ../drizzle-orm/dist/mysql-core/columns/timestamp.js
|
30314
30385
|
var _a281, _b207, MySqlTimestampBuilder, _a282, _b208, MySqlTimestamp, _a283, _b209, MySqlTimestampStringBuilder, _a284, _b210, MySqlTimestampString;
|
30315
30386
|
var init_timestamp2 = __esm({
|
30316
|
-
"../
|
30387
|
+
"../drizzle-orm/dist/mysql-core/columns/timestamp.js"() {
|
30317
30388
|
"use strict";
|
30318
30389
|
init_entity();
|
30319
30390
|
init_date_common2();
|
@@ -30376,10 +30447,10 @@ var init_timestamp2 = __esm({
|
|
30376
30447
|
}
|
30377
30448
|
});
|
30378
30449
|
|
30379
|
-
// ../
|
30450
|
+
// ../drizzle-orm/dist/mysql-core/columns/tinyint.js
|
30380
30451
|
var _a285, _b211, MySqlTinyIntBuilder, _a286, _b212, MySqlTinyInt;
|
30381
30452
|
var init_tinyint = __esm({
|
30382
|
-
"../
|
30453
|
+
"../drizzle-orm/dist/mysql-core/columns/tinyint.js"() {
|
30383
30454
|
"use strict";
|
30384
30455
|
init_entity();
|
30385
30456
|
init_common4();
|
@@ -30412,10 +30483,10 @@ var init_tinyint = __esm({
|
|
30412
30483
|
}
|
30413
30484
|
});
|
30414
30485
|
|
30415
|
-
// ../
|
30486
|
+
// ../drizzle-orm/dist/mysql-core/columns/varbinary.js
|
30416
30487
|
var _a287, _b213, MySqlVarBinaryBuilder, _a288, _b214, MySqlVarBinary;
|
30417
30488
|
var init_varbinary = __esm({
|
30418
|
-
"../
|
30489
|
+
"../drizzle-orm/dist/mysql-core/columns/varbinary.js"() {
|
30419
30490
|
"use strict";
|
30420
30491
|
init_entity();
|
30421
30492
|
init_common4();
|
@@ -30447,10 +30518,10 @@ var init_varbinary = __esm({
|
|
30447
30518
|
}
|
30448
30519
|
});
|
30449
30520
|
|
30450
|
-
// ../
|
30521
|
+
// ../drizzle-orm/dist/mysql-core/columns/varchar.js
|
30451
30522
|
var _a289, _b215, MySqlVarCharBuilder, _a290, _b216, MySqlVarChar;
|
30452
30523
|
var init_varchar2 = __esm({
|
30453
|
-
"../
|
30524
|
+
"../drizzle-orm/dist/mysql-core/columns/varchar.js"() {
|
30454
30525
|
"use strict";
|
30455
30526
|
init_entity();
|
30456
30527
|
init_common4();
|
@@ -30484,10 +30555,10 @@ var init_varchar2 = __esm({
|
|
30484
30555
|
}
|
30485
30556
|
});
|
30486
30557
|
|
30487
|
-
// ../
|
30558
|
+
// ../drizzle-orm/dist/mysql-core/columns/year.js
|
30488
30559
|
var _a291, _b217, MySqlYearBuilder, _a292, _b218, MySqlYear;
|
30489
30560
|
var init_year = __esm({
|
30490
|
-
"../
|
30561
|
+
"../drizzle-orm/dist/mysql-core/columns/year.js"() {
|
30491
30562
|
"use strict";
|
30492
30563
|
init_entity();
|
30493
30564
|
init_common4();
|
@@ -30510,9 +30581,9 @@ var init_year = __esm({
|
|
30510
30581
|
}
|
30511
30582
|
});
|
30512
30583
|
|
30513
|
-
// ../
|
30584
|
+
// ../drizzle-orm/dist/mysql-core/columns/index.js
|
30514
30585
|
var init_columns3 = __esm({
|
30515
|
-
"../
|
30586
|
+
"../drizzle-orm/dist/mysql-core/columns/index.js"() {
|
30516
30587
|
"use strict";
|
30517
30588
|
init_bigint2();
|
30518
30589
|
init_binary();
|
@@ -30542,10 +30613,10 @@ var init_columns3 = __esm({
|
|
30542
30613
|
}
|
30543
30614
|
});
|
30544
30615
|
|
30545
|
-
// ../
|
30616
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/delete.js
|
30546
30617
|
var _a293, _b219, MySqlDeleteBase;
|
30547
30618
|
var init_delete3 = __esm({
|
30548
|
-
"../
|
30619
|
+
"../drizzle-orm/dist/mysql-core/query-builders/delete.js"() {
|
30549
30620
|
"use strict";
|
30550
30621
|
init_entity();
|
30551
30622
|
init_query_promise();
|
@@ -30623,10 +30694,10 @@ var init_delete3 = __esm({
|
|
30623
30694
|
}
|
30624
30695
|
});
|
30625
30696
|
|
30626
|
-
// ../
|
30697
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/insert.js
|
30627
30698
|
var _a294, MySqlInsertBuilder, _a295, _b220, MySqlInsertBase;
|
30628
30699
|
var init_insert3 = __esm({
|
30629
|
-
"../
|
30700
|
+
"../drizzle-orm/dist/mysql-core/query-builders/insert.js"() {
|
30630
30701
|
"use strict";
|
30631
30702
|
init_entity();
|
30632
30703
|
init_query_promise();
|
@@ -30652,7 +30723,7 @@ var init_insert3 = __esm({
|
|
30652
30723
|
}
|
30653
30724
|
const mappedValues = values.map((entry) => {
|
30654
30725
|
const result = {};
|
30655
|
-
const cols = this.table[
|
30726
|
+
const cols = this.table[Table2.Symbol.Columns];
|
30656
30727
|
for (const colKey of Object.keys(entry)) {
|
30657
30728
|
const colValue = entry[colKey];
|
30658
30729
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -30714,12 +30785,12 @@ var init_insert3 = __esm({
|
|
30714
30785
|
}
|
30715
30786
|
$returningId() {
|
30716
30787
|
const returning = [];
|
30717
|
-
for (const [key, value] of Object.entries(this.config.table[
|
30788
|
+
for (const [key, value] of Object.entries(this.config.table[Table2.Symbol.Columns])) {
|
30718
30789
|
if (value.primary) {
|
30719
30790
|
returning.push({ field: value, path: [key] });
|
30720
30791
|
}
|
30721
30792
|
}
|
30722
|
-
this.config.returning = orderSelectedFields(this.config.table[
|
30793
|
+
this.config.returning = orderSelectedFields(this.config.table[Table2.Symbol.Columns]);
|
30723
30794
|
return this;
|
30724
30795
|
}
|
30725
30796
|
/** @internal */
|
@@ -30748,10 +30819,10 @@ var init_insert3 = __esm({
|
|
30748
30819
|
}
|
30749
30820
|
});
|
30750
30821
|
|
30751
|
-
// ../
|
30822
|
+
// ../drizzle-orm/dist/mysql-core/view-base.js
|
30752
30823
|
var _a296, _b221, MySqlViewBase;
|
30753
30824
|
var init_view_base3 = __esm({
|
30754
|
-
"../
|
30825
|
+
"../drizzle-orm/dist/mysql-core/view-base.js"() {
|
30755
30826
|
"use strict";
|
30756
30827
|
init_entity();
|
30757
30828
|
init_sql();
|
@@ -30761,10 +30832,10 @@ var init_view_base3 = __esm({
|
|
30761
30832
|
}
|
30762
30833
|
});
|
30763
30834
|
|
30764
|
-
// ../
|
30835
|
+
// ../drizzle-orm/dist/mysql-core/dialect.js
|
30765
30836
|
var _a297, MySqlDialect;
|
30766
30837
|
var init_dialect3 = __esm({
|
30767
|
-
"../
|
30838
|
+
"../drizzle-orm/dist/mysql-core/dialect.js"() {
|
30768
30839
|
"use strict";
|
30769
30840
|
init_alias();
|
30770
30841
|
init_column();
|
@@ -30838,7 +30909,7 @@ var init_dialect3 = __esm({
|
|
30838
30909
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
30839
30910
|
}
|
30840
30911
|
buildUpdateSet(table4, set) {
|
30841
|
-
const tableColumns = table4[
|
30912
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
30842
30913
|
const columnNames = Object.keys(tableColumns).filter(
|
30843
30914
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
30844
30915
|
);
|
@@ -30896,7 +30967,7 @@ var init_dialect3 = __esm({
|
|
30896
30967
|
if (is(field, SQL.Aliased)) {
|
30897
30968
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
30898
30969
|
}
|
30899
|
-
} else if (is(field,
|
30970
|
+
} else if (is(field, Column2)) {
|
30900
30971
|
if (isSingleTable) {
|
30901
30972
|
chunk.push(sql.identifier(field.name));
|
30902
30973
|
} else {
|
@@ -30928,8 +30999,8 @@ var init_dialect3 = __esm({
|
|
30928
30999
|
}) {
|
30929
31000
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
30930
31001
|
for (const f of fieldsList) {
|
30931
|
-
if (is(f.field,
|
30932
|
-
({ alias }) => alias === (table22[
|
31002
|
+
if (is(f.field, Column2) && getTableName(f.field.table) !== (is(table4, Subquery) ? table4._.alias : is(table4, MySqlViewBase) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : getTableName(table4)) && !((table22) => joins?.some(
|
31003
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
30933
31004
|
))(f.field.table)) {
|
30934
31005
|
const tableName = getTableName(f.field.table);
|
30935
31006
|
throw new Error(
|
@@ -30942,8 +31013,8 @@ var init_dialect3 = __esm({
|
|
30942
31013
|
const distinctSql = distinct ? sql` distinct` : void 0;
|
30943
31014
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
30944
31015
|
const tableSql = (() => {
|
30945
|
-
if (is(table4,
|
30946
|
-
return sql`${sql.identifier(table4[
|
31016
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
31017
|
+
return sql`${sql.identifier(table4[Table2.Symbol.OriginalName])} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
30947
31018
|
}
|
30948
31019
|
return table4;
|
30949
31020
|
})();
|
@@ -31056,7 +31127,7 @@ var init_dialect3 = __esm({
|
|
31056
31127
|
}
|
31057
31128
|
buildInsertQuery({ table: table4, values, ignore, onConflict }) {
|
31058
31129
|
const valuesSqlList = [];
|
31059
|
-
const columns = table4[
|
31130
|
+
const columns = table4[Table2.Symbol.Columns];
|
31060
31131
|
const colEntries = Object.entries(columns).filter(
|
31061
31132
|
([_2, col]) => !col.shouldDisableInsert()
|
31062
31133
|
);
|
@@ -31184,7 +31255,7 @@ var init_dialect3 = __esm({
|
|
31184
31255
|
selection.push({
|
31185
31256
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
31186
31257
|
tsKey,
|
31187
|
-
field: is(value,
|
31258
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
31188
31259
|
relationTableTsKey: void 0,
|
31189
31260
|
isJson: false,
|
31190
31261
|
selection: []
|
@@ -31195,7 +31266,7 @@ var init_dialect3 = __esm({
|
|
31195
31266
|
orderByOrig = [orderByOrig];
|
31196
31267
|
}
|
31197
31268
|
orderBy = orderByOrig.map((orderByValue) => {
|
31198
|
-
if (is(orderByValue,
|
31269
|
+
if (is(orderByValue, Column2)) {
|
31199
31270
|
return aliasedTableColumn(orderByValue, tableAlias);
|
31200
31271
|
}
|
31201
31272
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -31303,7 +31374,7 @@ var init_dialect3 = __esm({
|
|
31303
31374
|
fields: {},
|
31304
31375
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
31305
31376
|
path: [],
|
31306
|
-
field: is(field2,
|
31377
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
31307
31378
|
})),
|
31308
31379
|
joins,
|
31309
31380
|
where,
|
@@ -31318,7 +31389,7 @@ var init_dialect3 = __esm({
|
|
31318
31389
|
fields: {},
|
31319
31390
|
fieldsFlat: selection.map(({ field }) => ({
|
31320
31391
|
path: [],
|
31321
|
-
field: is(field,
|
31392
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
31322
31393
|
})),
|
31323
31394
|
joins,
|
31324
31395
|
where,
|
@@ -31408,7 +31479,7 @@ var init_dialect3 = __esm({
|
|
31408
31479
|
selection.push({
|
31409
31480
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
31410
31481
|
tsKey,
|
31411
|
-
field: is(value,
|
31482
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
31412
31483
|
relationTableTsKey: void 0,
|
31413
31484
|
isJson: false,
|
31414
31485
|
selection: []
|
@@ -31419,7 +31490,7 @@ var init_dialect3 = __esm({
|
|
31419
31490
|
orderByOrig = [orderByOrig];
|
31420
31491
|
}
|
31421
31492
|
orderBy = orderByOrig.map((orderByValue) => {
|
31422
|
-
if (is(orderByValue,
|
31493
|
+
if (is(orderByValue, Column2)) {
|
31423
31494
|
return aliasedTableColumn(orderByValue, tableAlias);
|
31424
31495
|
}
|
31425
31496
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -31526,7 +31597,7 @@ var init_dialect3 = __esm({
|
|
31526
31597
|
fields: {},
|
31527
31598
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
31528
31599
|
path: [],
|
31529
|
-
field: is(field2,
|
31600
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
31530
31601
|
})),
|
31531
31602
|
where,
|
31532
31603
|
limit,
|
@@ -31540,7 +31611,7 @@ var init_dialect3 = __esm({
|
|
31540
31611
|
fields: {},
|
31541
31612
|
fieldsFlat: selection.map(({ field }) => ({
|
31542
31613
|
path: [],
|
31543
|
-
field: is(field,
|
31614
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
31544
31615
|
})),
|
31545
31616
|
where,
|
31546
31617
|
limit,
|
@@ -31560,7 +31631,7 @@ var init_dialect3 = __esm({
|
|
31560
31631
|
}
|
31561
31632
|
});
|
31562
31633
|
|
31563
|
-
// ../
|
31634
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/select.js
|
31564
31635
|
function createSetOperator3(type, isAll) {
|
31565
31636
|
return (leftSelect, rightSelect, ...restSelects) => {
|
31566
31637
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -31580,7 +31651,7 @@ function createSetOperator3(type, isAll) {
|
|
31580
31651
|
}
|
31581
31652
|
var _a298, MySqlSelectBuilder, _a299, _b222, MySqlSelectQueryBuilderBase, _a300, _b223, MySqlSelectBase, getMySqlSetOperators, union3, unionAll3, intersect3, intersectAll2, except3, exceptAll2;
|
31582
31653
|
var init_select4 = __esm({
|
31583
|
-
"../
|
31654
|
+
"../drizzle-orm/dist/mysql-core/query-builders/select.js"() {
|
31584
31655
|
"use strict";
|
31585
31656
|
init_entity();
|
31586
31657
|
init_query_builder();
|
@@ -31978,7 +32049,7 @@ var init_select4 = __esm({
|
|
31978
32049
|
};
|
31979
32050
|
}
|
31980
32051
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
31981
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
32052
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
31982
32053
|
this.config.fields[tableName] = selection;
|
31983
32054
|
}
|
31984
32055
|
}
|
@@ -32284,10 +32355,10 @@ var init_select4 = __esm({
|
|
32284
32355
|
}
|
32285
32356
|
});
|
32286
32357
|
|
32287
|
-
// ../
|
32358
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/query-builder.js
|
32288
32359
|
var _a301, QueryBuilder3;
|
32289
32360
|
var init_query_builder4 = __esm({
|
32290
|
-
"../
|
32361
|
+
"../drizzle-orm/dist/mysql-core/query-builders/query-builder.js"() {
|
32291
32362
|
"use strict";
|
32292
32363
|
init_entity();
|
32293
32364
|
init_dialect3();
|
@@ -32357,17 +32428,17 @@ var init_query_builder4 = __esm({
|
|
32357
32428
|
}
|
32358
32429
|
});
|
32359
32430
|
|
32360
|
-
// ../
|
32431
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/select.types.js
|
32361
32432
|
var init_select_types3 = __esm({
|
32362
|
-
"../
|
32433
|
+
"../drizzle-orm/dist/mysql-core/query-builders/select.types.js"() {
|
32363
32434
|
"use strict";
|
32364
32435
|
}
|
32365
32436
|
});
|
32366
32437
|
|
32367
|
-
// ../
|
32438
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/update.js
|
32368
32439
|
var _a302, MySqlUpdateBuilder, _a303, _b224, MySqlUpdateBase;
|
32369
32440
|
var init_update3 = __esm({
|
32370
|
-
"../
|
32441
|
+
"../drizzle-orm/dist/mysql-core/query-builders/update.js"() {
|
32371
32442
|
"use strict";
|
32372
32443
|
init_entity();
|
32373
32444
|
init_query_promise();
|
@@ -32462,9 +32533,9 @@ var init_update3 = __esm({
|
|
32462
32533
|
}
|
32463
32534
|
});
|
32464
32535
|
|
32465
|
-
// ../
|
32536
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/index.js
|
32466
32537
|
var init_query_builders3 = __esm({
|
32467
|
-
"../
|
32538
|
+
"../drizzle-orm/dist/mysql-core/query-builders/index.js"() {
|
32468
32539
|
"use strict";
|
32469
32540
|
init_delete3();
|
32470
32541
|
init_insert3();
|
@@ -32475,10 +32546,10 @@ var init_query_builders3 = __esm({
|
|
32475
32546
|
}
|
32476
32547
|
});
|
32477
32548
|
|
32478
|
-
// ../
|
32549
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/query.js
|
32479
32550
|
var _a304, RelationalQueryBuilder3, _a305, _b225, MySqlRelationalQuery;
|
32480
32551
|
var init_query3 = __esm({
|
32481
|
-
"../
|
32552
|
+
"../drizzle-orm/dist/mysql-core/query-builders/query.js"() {
|
32482
32553
|
"use strict";
|
32483
32554
|
init_entity();
|
32484
32555
|
init_query_promise();
|
@@ -32593,10 +32664,10 @@ var init_query3 = __esm({
|
|
32593
32664
|
}
|
32594
32665
|
});
|
32595
32666
|
|
32596
|
-
// ../
|
32667
|
+
// ../drizzle-orm/dist/mysql-core/db.js
|
32597
32668
|
var _a306, MySqlDatabase;
|
32598
32669
|
var init_db3 = __esm({
|
32599
|
-
"../
|
32670
|
+
"../drizzle-orm/dist/mysql-core/db.js"() {
|
32600
32671
|
"use strict";
|
32601
32672
|
init_entity();
|
32602
32673
|
init_selection_proxy();
|
@@ -32816,10 +32887,10 @@ var init_db3 = __esm({
|
|
32816
32887
|
}
|
32817
32888
|
});
|
32818
32889
|
|
32819
|
-
// ../
|
32890
|
+
// ../drizzle-orm/dist/mysql-core/indexes.js
|
32820
32891
|
var _a307, IndexBuilderOn3, _a308, IndexBuilder3, _a309, Index5;
|
32821
32892
|
var init_indexes3 = __esm({
|
32822
|
-
"../
|
32893
|
+
"../drizzle-orm/dist/mysql-core/indexes.js"() {
|
32823
32894
|
"use strict";
|
32824
32895
|
init_entity();
|
32825
32896
|
_a307 = entityKind;
|
@@ -32873,10 +32944,10 @@ var init_indexes3 = __esm({
|
|
32873
32944
|
}
|
32874
32945
|
});
|
32875
32946
|
|
32876
|
-
// ../
|
32947
|
+
// ../drizzle-orm/dist/mysql-core/primary-keys.js
|
32877
32948
|
var _a310, PrimaryKeyBuilder3, _a311, PrimaryKey3;
|
32878
32949
|
var init_primary_keys3 = __esm({
|
32879
|
-
"../
|
32950
|
+
"../drizzle-orm/dist/mysql-core/primary-keys.js"() {
|
32880
32951
|
"use strict";
|
32881
32952
|
init_entity();
|
32882
32953
|
init_table4();
|
@@ -32913,16 +32984,16 @@ var init_primary_keys3 = __esm({
|
|
32913
32984
|
}
|
32914
32985
|
});
|
32915
32986
|
|
32916
|
-
// ../
|
32987
|
+
// ../drizzle-orm/dist/mysql-core/view-common.js
|
32917
32988
|
var MySqlViewConfig;
|
32918
32989
|
var init_view_common4 = __esm({
|
32919
|
-
"../
|
32990
|
+
"../drizzle-orm/dist/mysql-core/view-common.js"() {
|
32920
32991
|
"use strict";
|
32921
32992
|
MySqlViewConfig = Symbol.for("drizzle:MySqlViewConfig");
|
32922
32993
|
}
|
32923
32994
|
});
|
32924
32995
|
|
32925
|
-
// ../
|
32996
|
+
// ../drizzle-orm/dist/mysql-core/view.js
|
32926
32997
|
function mysqlViewWithSchema(name2, selection, schema4) {
|
32927
32998
|
if (selection) {
|
32928
32999
|
return new ManualViewBuilder3(name2, selection, schema4);
|
@@ -32931,7 +33002,7 @@ function mysqlViewWithSchema(name2, selection, schema4) {
|
|
32931
33002
|
}
|
32932
33003
|
var _a312, ViewBuilderCore2, _a313, _b226, ViewBuilder3, _a314, _b227, ManualViewBuilder3, _a315, _b228, _c8, MySqlView;
|
32933
33004
|
var init_view3 = __esm({
|
32934
|
-
"../
|
33005
|
+
"../drizzle-orm/dist/mysql-core/view.js"() {
|
32935
33006
|
"use strict";
|
32936
33007
|
init_entity();
|
32937
33008
|
init_selection_proxy();
|
@@ -33049,16 +33120,16 @@ var init_view3 = __esm({
|
|
33049
33120
|
}
|
33050
33121
|
});
|
33051
33122
|
|
33052
|
-
// ../
|
33053
|
-
var _a316,
|
33123
|
+
// ../drizzle-orm/dist/mysql-core/schema.js
|
33124
|
+
var _a316, MySqlSchema5;
|
33054
33125
|
var init_schema2 = __esm({
|
33055
|
-
"../
|
33126
|
+
"../drizzle-orm/dist/mysql-core/schema.js"() {
|
33056
33127
|
"use strict";
|
33057
33128
|
init_entity();
|
33058
33129
|
init_table4();
|
33059
33130
|
init_view3();
|
33060
33131
|
_a316 = entityKind;
|
33061
|
-
|
33132
|
+
MySqlSchema5 = class {
|
33062
33133
|
constructor(schemaName) {
|
33063
33134
|
__publicField(this, "table", (name2, columns, extraConfig) => {
|
33064
33135
|
return mysqlTableWithSchema(name2, columns, extraConfig, this.schemaName);
|
@@ -33069,14 +33140,14 @@ var init_schema2 = __esm({
|
|
33069
33140
|
this.schemaName = schemaName;
|
33070
33141
|
}
|
33071
33142
|
};
|
33072
|
-
__publicField(
|
33143
|
+
__publicField(MySqlSchema5, _a316, "MySqlSchema");
|
33073
33144
|
}
|
33074
33145
|
});
|
33075
33146
|
|
33076
|
-
// ../
|
33147
|
+
// ../drizzle-orm/dist/mysql-core/session.js
|
33077
33148
|
var _a317, MySqlPreparedQuery, _a318, MySqlSession, _a319, _b229, MySqlTransaction;
|
33078
33149
|
var init_session3 = __esm({
|
33079
|
-
"../
|
33150
|
+
"../drizzle-orm/dist/mysql-core/session.js"() {
|
33080
33151
|
"use strict";
|
33081
33152
|
init_entity();
|
33082
33153
|
init_errors();
|
@@ -33106,7 +33177,7 @@ var init_session3 = __esm({
|
|
33106
33177
|
if (config.isolationLevel) {
|
33107
33178
|
parts.push(`isolation level ${config.isolationLevel}`);
|
33108
33179
|
}
|
33109
|
-
return parts.length ? sql
|
33180
|
+
return parts.length ? sql`set transaction ${sql.raw(parts.join(" "))}` : void 0;
|
33110
33181
|
}
|
33111
33182
|
getStartTransactionSQL(config) {
|
33112
33183
|
const parts = [];
|
@@ -33116,7 +33187,7 @@ var init_session3 = __esm({
|
|
33116
33187
|
if (config.accessMode) {
|
33117
33188
|
parts.push(config.accessMode);
|
33118
33189
|
}
|
33119
|
-
return parts.length ? sql
|
33190
|
+
return parts.length ? sql`start transaction ${sql.raw(parts.join(" "))}` : void 0;
|
33120
33191
|
}
|
33121
33192
|
};
|
33122
33193
|
__publicField(MySqlSession, _a318, "MySqlSession");
|
@@ -33134,14 +33205,14 @@ var init_session3 = __esm({
|
|
33134
33205
|
}
|
33135
33206
|
});
|
33136
33207
|
|
33137
|
-
// ../
|
33208
|
+
// ../drizzle-orm/dist/mysql-core/subquery.js
|
33138
33209
|
var init_subquery4 = __esm({
|
33139
|
-
"../
|
33210
|
+
"../drizzle-orm/dist/mysql-core/subquery.js"() {
|
33140
33211
|
"use strict";
|
33141
33212
|
}
|
33142
33213
|
});
|
33143
33214
|
|
33144
|
-
// ../
|
33215
|
+
// ../drizzle-orm/dist/mysql-core/utils.js
|
33145
33216
|
function getTableConfig3(table4) {
|
33146
33217
|
const columns = Object.values(table4[MySqlTable.Symbol.Columns]);
|
33147
33218
|
const indexes = [];
|
@@ -33149,9 +33220,9 @@ function getTableConfig3(table4) {
|
|
33149
33220
|
const primaryKeys = [];
|
33150
33221
|
const uniqueConstraints = [];
|
33151
33222
|
const foreignKeys = Object.values(table4[MySqlTable.Symbol.InlineForeignKeys]);
|
33152
|
-
const name2 = table4[
|
33153
|
-
const schema4 = table4[
|
33154
|
-
const baseName = table4[
|
33223
|
+
const name2 = table4[Table2.Symbol.Name];
|
33224
|
+
const schema4 = table4[Table2.Symbol.Schema];
|
33225
|
+
const baseName = table4[Table2.Symbol.BaseName];
|
33155
33226
|
const extraConfigBuilder = table4[MySqlTable.Symbol.ExtraConfigBuilder];
|
33156
33227
|
if (extraConfigBuilder !== void 0) {
|
33157
33228
|
const extraConfig = extraConfigBuilder(table4[MySqlTable.Symbol.Columns]);
|
@@ -33182,7 +33253,7 @@ function getTableConfig3(table4) {
|
|
33182
33253
|
};
|
33183
33254
|
}
|
33184
33255
|
var init_utils7 = __esm({
|
33185
|
-
"../
|
33256
|
+
"../drizzle-orm/dist/mysql-core/utils.js"() {
|
33186
33257
|
"use strict";
|
33187
33258
|
init_entity();
|
33188
33259
|
init_table();
|
@@ -33195,9 +33266,9 @@ var init_utils7 = __esm({
|
|
33195
33266
|
}
|
33196
33267
|
});
|
33197
33268
|
|
33198
|
-
// ../
|
33269
|
+
// ../drizzle-orm/dist/mysql-core/index.js
|
33199
33270
|
var init_mysql_core = __esm({
|
33200
|
-
"../
|
33271
|
+
"../drizzle-orm/dist/mysql-core/index.js"() {
|
33201
33272
|
"use strict";
|
33202
33273
|
init_alias4();
|
33203
33274
|
init_checks3();
|
@@ -33242,8 +33313,8 @@ var init_mysqlSerializer = __esm({
|
|
33242
33313
|
"src/serializer/mysqlSerializer.ts"() {
|
33243
33314
|
"use strict";
|
33244
33315
|
init_source();
|
33245
|
-
|
33246
|
-
|
33316
|
+
init_dist();
|
33317
|
+
init_dist();
|
33247
33318
|
init_mysql_core();
|
33248
33319
|
init_mysql_core();
|
33249
33320
|
init_outputs();
|
@@ -33770,6 +33841,200 @@ We have encountered a collision between the index name on columns ${source_defau
|
|
33770
33841
|
}
|
33771
33842
|
});
|
33772
33843
|
|
33844
|
+
// src/cli/validations/cli.ts
|
33845
|
+
var cliConfigGenerate, pushParams, pullParams, configCheck, cliConfigCheck;
|
33846
|
+
var init_cli = __esm({
|
33847
|
+
"src/cli/validations/cli.ts"() {
|
33848
|
+
"use strict";
|
33849
|
+
init_lib();
|
33850
|
+
init_schemaValidator();
|
33851
|
+
init_common();
|
33852
|
+
cliConfigGenerate = objectType({
|
33853
|
+
dialect: dialect3.optional(),
|
33854
|
+
schema: unionType([stringType(), stringType().array()]).optional(),
|
33855
|
+
out: stringType().optional().default("./drizzle"),
|
33856
|
+
config: stringType().optional(),
|
33857
|
+
name: stringType().optional(),
|
33858
|
+
prefix: prefix.optional(),
|
33859
|
+
breakpoints: booleanType().optional().default(true),
|
33860
|
+
custom: booleanType().optional().default(false)
|
33861
|
+
}).strict();
|
33862
|
+
pushParams = objectType({
|
33863
|
+
dialect: dialect3,
|
33864
|
+
schema: unionType([stringType(), stringType().array()]),
|
33865
|
+
tablesFilter: unionType([stringType(), stringType().array()]).optional(),
|
33866
|
+
schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
|
33867
|
+
extensionsFilters: literalType("postgis").array().optional(),
|
33868
|
+
verbose: booleanType().optional(),
|
33869
|
+
strict: booleanType().optional()
|
33870
|
+
}).passthrough();
|
33871
|
+
pullParams = objectType({
|
33872
|
+
config: stringType().optional(),
|
33873
|
+
dialect: dialect3,
|
33874
|
+
out: stringType().optional().default("drizzle"),
|
33875
|
+
tablesFilter: unionType([stringType(), stringType().array()]).optional(),
|
33876
|
+
schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
|
33877
|
+
extensionsFilters: literalType("postgis").array().optional(),
|
33878
|
+
introspectCasing: casing,
|
33879
|
+
breakpoints: booleanType().optional().default(true),
|
33880
|
+
database: objectType({
|
33881
|
+
prefix: prefix.optional().default("index")
|
33882
|
+
}).optional()
|
33883
|
+
}).passthrough();
|
33884
|
+
configCheck = objectType({
|
33885
|
+
dialect: dialect3.optional(),
|
33886
|
+
out: stringType().optional()
|
33887
|
+
});
|
33888
|
+
cliConfigCheck = intersectionType(
|
33889
|
+
objectType({
|
33890
|
+
config: stringType().optional()
|
33891
|
+
}),
|
33892
|
+
configCheck
|
33893
|
+
);
|
33894
|
+
}
|
33895
|
+
});
|
33896
|
+
|
33897
|
+
// src/cli/validations/mysql.ts
|
33898
|
+
var mysqlCredentials;
|
33899
|
+
var init_mysql = __esm({
|
33900
|
+
"src/cli/validations/mysql.ts"() {
|
33901
|
+
"use strict";
|
33902
|
+
init_lib();
|
33903
|
+
init_views();
|
33904
|
+
init_common();
|
33905
|
+
init_outputs();
|
33906
|
+
mysqlCredentials = unionType([
|
33907
|
+
objectType({
|
33908
|
+
host: stringType().min(1),
|
33909
|
+
port: coerce.number().min(1).optional(),
|
33910
|
+
user: stringType().min(1).optional(),
|
33911
|
+
password: stringType().min(1).optional(),
|
33912
|
+
database: stringType().min(1),
|
33913
|
+
ssl: unionType([
|
33914
|
+
stringType(),
|
33915
|
+
objectType({
|
33916
|
+
pfx: stringType().optional(),
|
33917
|
+
key: stringType().optional(),
|
33918
|
+
passphrase: stringType().optional(),
|
33919
|
+
cert: stringType().optional(),
|
33920
|
+
ca: unionType([stringType(), stringType().array()]).optional(),
|
33921
|
+
crl: unionType([stringType(), stringType().array()]).optional(),
|
33922
|
+
ciphers: stringType().optional(),
|
33923
|
+
rejectUnauthorized: booleanType().optional()
|
33924
|
+
})
|
33925
|
+
]).optional()
|
33926
|
+
}),
|
33927
|
+
objectType({
|
33928
|
+
url: stringType().min(1)
|
33929
|
+
})
|
33930
|
+
]);
|
33931
|
+
}
|
33932
|
+
});
|
33933
|
+
|
33934
|
+
// src/cli/validations/postgres.ts
|
33935
|
+
var postgresCredentials;
|
33936
|
+
var init_postgres = __esm({
|
33937
|
+
"src/cli/validations/postgres.ts"() {
|
33938
|
+
"use strict";
|
33939
|
+
init_lib();
|
33940
|
+
init_views();
|
33941
|
+
init_common();
|
33942
|
+
postgresCredentials = unionType([
|
33943
|
+
objectType({
|
33944
|
+
driver: undefinedType(),
|
33945
|
+
host: stringType().min(1),
|
33946
|
+
port: coerce.number().min(1).optional(),
|
33947
|
+
user: stringType().min(1).optional(),
|
33948
|
+
password: stringType().min(1).optional(),
|
33949
|
+
database: stringType().min(1),
|
33950
|
+
ssl: unionType([
|
33951
|
+
literalType("require"),
|
33952
|
+
literalType("allow"),
|
33953
|
+
literalType("prefer"),
|
33954
|
+
literalType("verify-full"),
|
33955
|
+
booleanType(),
|
33956
|
+
objectType({}).passthrough()
|
33957
|
+
]).optional()
|
33958
|
+
}).transform((o) => {
|
33959
|
+
delete o.driver;
|
33960
|
+
return o;
|
33961
|
+
}),
|
33962
|
+
objectType({
|
33963
|
+
driver: undefinedType(),
|
33964
|
+
url: stringType().min(1)
|
33965
|
+
}).transform((o) => {
|
33966
|
+
delete o.driver;
|
33967
|
+
return o;
|
33968
|
+
}),
|
33969
|
+
objectType({
|
33970
|
+
driver: literalType("aws-data-api"),
|
33971
|
+
database: stringType().min(1),
|
33972
|
+
secretArn: stringType().min(1),
|
33973
|
+
resourceArn: stringType().min(1)
|
33974
|
+
})
|
33975
|
+
]);
|
33976
|
+
}
|
33977
|
+
});
|
33978
|
+
|
33979
|
+
// src/cli/validations/sqlite.ts
|
33980
|
+
var sqliteCredentials;
|
33981
|
+
var init_sqlite = __esm({
|
33982
|
+
"src/cli/validations/sqlite.ts"() {
|
33983
|
+
"use strict";
|
33984
|
+
init_global();
|
33985
|
+
init_lib();
|
33986
|
+
init_views();
|
33987
|
+
init_common();
|
33988
|
+
sqliteCredentials = unionType([
|
33989
|
+
objectType({
|
33990
|
+
driver: literalType("turso"),
|
33991
|
+
url: stringType().min(1),
|
33992
|
+
authToken: stringType().min(1).optional()
|
33993
|
+
}),
|
33994
|
+
objectType({
|
33995
|
+
driver: literalType("d1-http"),
|
33996
|
+
accountId: stringType().min(1),
|
33997
|
+
databaseId: stringType().min(1),
|
33998
|
+
token: stringType().min(1)
|
33999
|
+
}),
|
34000
|
+
objectType({
|
34001
|
+
driver: undefinedType(),
|
34002
|
+
url: stringType().min(1)
|
34003
|
+
}).transform((o) => {
|
34004
|
+
delete o.driver;
|
34005
|
+
return o;
|
34006
|
+
})
|
34007
|
+
]);
|
34008
|
+
}
|
34009
|
+
});
|
34010
|
+
|
34011
|
+
// src/cli/validations/studio.ts
|
34012
|
+
var credentials, studioCliParams, studioConfig;
|
34013
|
+
var init_studio = __esm({
|
34014
|
+
"src/cli/validations/studio.ts"() {
|
34015
|
+
"use strict";
|
34016
|
+
init_lib();
|
34017
|
+
init_schemaValidator();
|
34018
|
+
init_mysql();
|
34019
|
+
init_postgres();
|
34020
|
+
init_sqlite();
|
34021
|
+
credentials = intersectionType(
|
34022
|
+
postgresCredentials,
|
34023
|
+
mysqlCredentials,
|
34024
|
+
sqliteCredentials
|
34025
|
+
);
|
34026
|
+
studioCliParams = objectType({
|
34027
|
+
port: coerce.number().optional().default(4983),
|
34028
|
+
host: stringType().optional().default("127.0.0.1"),
|
34029
|
+
config: stringType().optional()
|
34030
|
+
});
|
34031
|
+
studioConfig = objectType({
|
34032
|
+
dialect: dialect3,
|
34033
|
+
schema: unionType([stringType(), stringType().array()]).optional()
|
34034
|
+
});
|
34035
|
+
}
|
34036
|
+
});
|
34037
|
+
|
33773
34038
|
// src/cli/commands/_es5.ts
|
33774
34039
|
var es5_exports = {};
|
33775
34040
|
__export(es5_exports, {
|
@@ -33791,8 +34056,16 @@ var init_utils8 = __esm({
|
|
33791
34056
|
"use strict";
|
33792
34057
|
import_hanji7 = __toESM(require_hanji());
|
33793
34058
|
init_lib();
|
34059
|
+
init_global();
|
33794
34060
|
init_schemaValidator();
|
34061
|
+
init_serializer();
|
34062
|
+
init_cli();
|
33795
34063
|
init_common();
|
34064
|
+
init_mysql();
|
34065
|
+
init_outputs();
|
34066
|
+
init_postgres();
|
34067
|
+
init_sqlite();
|
34068
|
+
init_studio();
|
33796
34069
|
init_views();
|
33797
34070
|
assertES5 = async (unregister) => {
|
33798
34071
|
try {
|
@@ -33843,8 +34116,9 @@ var prepareFromExports;
|
|
33843
34116
|
var init_pgImports = __esm({
|
33844
34117
|
"src/serializer/pgImports.ts"() {
|
33845
34118
|
"use strict";
|
33846
|
-
|
34119
|
+
init_dist();
|
33847
34120
|
init_pg_core();
|
34121
|
+
init_utils8();
|
33848
34122
|
prepareFromExports = (exports) => {
|
33849
34123
|
const tables = [];
|
33850
34124
|
const enums = [];
|
@@ -33859,7 +34133,7 @@ var init_pgImports = __esm({
|
|
33859
34133
|
if (is(t, PgTable)) {
|
33860
34134
|
tables.push(t);
|
33861
34135
|
}
|
33862
|
-
if (is(t,
|
34136
|
+
if (is(t, PgSchema5)) {
|
33863
34137
|
schemas.push(t);
|
33864
34138
|
}
|
33865
34139
|
if (isPgSequence(t)) {
|
@@ -33881,7 +34155,7 @@ var prepareFromExports2, prepareFromSqliteImports;
|
|
33881
34155
|
var init_sqliteImports = __esm({
|
33882
34156
|
"src/serializer/sqliteImports.ts"() {
|
33883
34157
|
"use strict";
|
33884
|
-
|
34158
|
+
init_dist();
|
33885
34159
|
init_sqlite_core();
|
33886
34160
|
init_utils8();
|
33887
34161
|
prepareFromExports2 = (exports) => {
|
@@ -33919,7 +34193,7 @@ var prepareFromExports3, prepareFromMySqlImports;
|
|
33919
34193
|
var init_mysqlImports = __esm({
|
33920
34194
|
"src/serializer/mysqlImports.ts"() {
|
33921
34195
|
"use strict";
|
33922
|
-
|
34196
|
+
init_dist();
|
33923
34197
|
init_mysql_core();
|
33924
34198
|
init_utils8();
|
33925
34199
|
prepareFromExports3 = (exports) => {
|
@@ -34536,6 +34810,7 @@ var pgSuggestions = async (db, statements) => {
|
|
34536
34810
|
|
34537
34811
|
// src/cli/commands/pgUp.ts
|
34538
34812
|
init_pgSchema();
|
34813
|
+
init_utils();
|
34539
34814
|
var updateUpToV6 = (json) => {
|
34540
34815
|
const schema4 = pgSchemaV5.parse(json);
|
34541
34816
|
const tables = Object.fromEntries(
|
@@ -34571,6 +34846,114 @@ var updateUpToV6 = (json) => {
|
|
34571
34846
|
var import_hanji6 = __toESM(require_hanji());
|
34572
34847
|
init_mjs();
|
34573
34848
|
init_global();
|
34849
|
+
|
34850
|
+
// ../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
|
34851
|
+
var UPPERCASE = /[\p{Lu}]/u;
|
34852
|
+
var LOWERCASE = /[\p{Ll}]/u;
|
34853
|
+
var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
34854
|
+
var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
34855
|
+
var SEPARATORS = /[_.\- ]+/;
|
34856
|
+
var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
|
34857
|
+
var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
34858
|
+
var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
34859
|
+
var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
34860
|
+
let isLastCharLower = false;
|
34861
|
+
let isLastCharUpper = false;
|
34862
|
+
let isLastLastCharUpper = false;
|
34863
|
+
let isLastLastCharPreserved = false;
|
34864
|
+
for (let index4 = 0; index4 < string.length; index4++) {
|
34865
|
+
const character = string[index4];
|
34866
|
+
isLastLastCharPreserved = index4 > 2 ? string[index4 - 3] === "-" : true;
|
34867
|
+
if (isLastCharLower && UPPERCASE.test(character)) {
|
34868
|
+
string = string.slice(0, index4) + "-" + string.slice(index4);
|
34869
|
+
isLastCharLower = false;
|
34870
|
+
isLastLastCharUpper = isLastCharUpper;
|
34871
|
+
isLastCharUpper = true;
|
34872
|
+
index4++;
|
34873
|
+
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
|
34874
|
+
string = string.slice(0, index4 - 1) + "-" + string.slice(index4 - 1);
|
34875
|
+
isLastLastCharUpper = isLastCharUpper;
|
34876
|
+
isLastCharUpper = false;
|
34877
|
+
isLastCharLower = true;
|
34878
|
+
} else {
|
34879
|
+
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
34880
|
+
isLastLastCharUpper = isLastCharUpper;
|
34881
|
+
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
34882
|
+
}
|
34883
|
+
}
|
34884
|
+
return string;
|
34885
|
+
};
|
34886
|
+
var preserveConsecutiveUppercase = (input, toLowerCase) => {
|
34887
|
+
LEADING_CAPITAL.lastIndex = 0;
|
34888
|
+
return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
|
34889
|
+
};
|
34890
|
+
var postProcess = (input, toUpperCase) => {
|
34891
|
+
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
34892
|
+
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
34893
|
+
return input.replace(SEPARATORS_AND_IDENTIFIER, (_2, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
|
34894
|
+
};
|
34895
|
+
function camelCase(input, options) {
|
34896
|
+
if (!(typeof input === "string" || Array.isArray(input))) {
|
34897
|
+
throw new TypeError("Expected the input to be `string | string[]`");
|
34898
|
+
}
|
34899
|
+
options = {
|
34900
|
+
pascalCase: false,
|
34901
|
+
preserveConsecutiveUppercase: false,
|
34902
|
+
...options
|
34903
|
+
};
|
34904
|
+
if (Array.isArray(input)) {
|
34905
|
+
input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
|
34906
|
+
} else {
|
34907
|
+
input = input.trim();
|
34908
|
+
}
|
34909
|
+
if (input.length === 0) {
|
34910
|
+
return "";
|
34911
|
+
}
|
34912
|
+
const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
|
34913
|
+
const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
|
34914
|
+
if (input.length === 1) {
|
34915
|
+
if (SEPARATORS.test(input)) {
|
34916
|
+
return "";
|
34917
|
+
}
|
34918
|
+
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
34919
|
+
}
|
34920
|
+
const hasUpperCase = input !== toLowerCase(input);
|
34921
|
+
if (hasUpperCase) {
|
34922
|
+
input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
|
34923
|
+
}
|
34924
|
+
input = input.replace(LEADING_SEPARATORS, "");
|
34925
|
+
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
34926
|
+
if (options.pascalCase) {
|
34927
|
+
input = toUpperCase(input.charAt(0)) + input.slice(1);
|
34928
|
+
}
|
34929
|
+
return postProcess(input, toUpperCase);
|
34930
|
+
}
|
34931
|
+
|
34932
|
+
// src/@types/utils.ts
|
34933
|
+
String.prototype.trimChar = function(char) {
|
34934
|
+
let start = 0;
|
34935
|
+
let end = this.length;
|
34936
|
+
while (start < end && this[start] === char) ++start;
|
34937
|
+
while (end > start && this[end - 1] === char) --end;
|
34938
|
+
return start > 0 || end < this.length ? this.substring(start, end) : this.toString();
|
34939
|
+
};
|
34940
|
+
String.prototype.squashSpaces = function() {
|
34941
|
+
return this.replace(/ +/g, " ").trim();
|
34942
|
+
};
|
34943
|
+
String.prototype.camelCase = function() {
|
34944
|
+
return camelCase(String(this));
|
34945
|
+
};
|
34946
|
+
String.prototype.capitalise = function() {
|
34947
|
+
return this && this.length > 0 ? `${this[0].toUpperCase()}${this.slice(1)}` : String(this);
|
34948
|
+
};
|
34949
|
+
String.prototype.concatIf = function(it, condition) {
|
34950
|
+
return condition ? `${this}${it}` : String(this);
|
34951
|
+
};
|
34952
|
+
Array.prototype.random = function() {
|
34953
|
+
return this[~~(Math.random() * this.length)];
|
34954
|
+
};
|
34955
|
+
|
34956
|
+
// src/cli/commands/sqliteIntrospect.ts
|
34574
34957
|
init_sqliteSerializer();
|
34575
34958
|
init_views();
|
34576
34959
|
var sqlitePushIntrospect = async (db, filters) => {
|
@@ -34928,7 +35311,7 @@ var generateMigration = async (prev, cur) => {
|
|
34928
35311
|
};
|
34929
35312
|
var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
|
34930
35313
|
const { applyPgSnapshotsDiff: applyPgSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
34931
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35314
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
34932
35315
|
const db = {
|
34933
35316
|
query: async (query, params) => {
|
34934
35317
|
const res = await drizzleInstance.execute(sql2.raw(query));
|
@@ -34998,7 +35381,7 @@ var generateSQLiteMigration = async (prev, cur) => {
|
|
34998
35381
|
};
|
34999
35382
|
var pushSQLiteSchema = async (imports, drizzleInstance) => {
|
35000
35383
|
const { applySqliteSnapshotsDiff: applySqliteSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
35001
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35384
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
35002
35385
|
const db = {
|
35003
35386
|
query: async (query, params) => {
|
35004
35387
|
const res = drizzleInstance.all(sql2.raw(query));
|
@@ -35075,7 +35458,7 @@ var pushMySQLSchema = async (imports, drizzleInstance, databaseName) => {
|
|
35075
35458
|
const { applyMysqlSnapshotsDiff: applyMysqlSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
35076
35459
|
const { logSuggestionsAndReturn: logSuggestionsAndReturn3 } = await Promise.resolve().then(() => (init_mysqlPushUtils(), mysqlPushUtils_exports));
|
35077
35460
|
const { mysqlPushIntrospect: mysqlPushIntrospect2 } = await Promise.resolve().then(() => (init_mysqlIntrospect(), mysqlIntrospect_exports));
|
35078
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35461
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
35079
35462
|
const db = {
|
35080
35463
|
query: async (query, params) => {
|
35081
35464
|
const res = await drizzleInstance.execute(sql2.raw(query));
|