drizzle-kit 0.23.2-5be2712 → 0.23.2-6234cbf
Sign up to get free protection for your applications and to get access to all the features.
- package/api.js +861 -511
- package/api.mjs +861 -511
- package/bin.cjs +4047 -49642
- package/package.json +2 -3
package/api.js
CHANGED
@@ -3592,7 +3592,7 @@ function createZodEnum(values, params) {
|
|
3592
3592
|
...processCreateParams(params)
|
3593
3593
|
});
|
3594
3594
|
}
|
3595
|
-
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;
|
3595
|
+
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;
|
3596
3596
|
var init_lib = __esm({
|
3597
3597
|
"../node_modules/.pnpm/zod@3.23.7/node_modules/zod/lib/index.mjs"() {
|
3598
3598
|
"use strict";
|
@@ -7184,6 +7184,16 @@ var init_lib = __esm({
|
|
7184
7184
|
nullableType = ZodNullable.create;
|
7185
7185
|
preprocessType = ZodEffects.createWithPreprocess;
|
7186
7186
|
pipelineType = ZodPipeline.create;
|
7187
|
+
coerce = {
|
7188
|
+
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
7189
|
+
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
7190
|
+
boolean: (arg) => ZodBoolean.create({
|
7191
|
+
...arg,
|
7192
|
+
coerce: true
|
7193
|
+
}),
|
7194
|
+
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
7195
|
+
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
7196
|
+
};
|
7187
7197
|
}
|
7188
7198
|
});
|
7189
7199
|
|
@@ -8332,6 +8342,11 @@ var copy, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey
|
|
8332
8342
|
var init_utils = __esm({
|
8333
8343
|
"src/utils.ts"() {
|
8334
8344
|
"use strict";
|
8345
|
+
init_views();
|
8346
|
+
init_global();
|
8347
|
+
init_mysqlSchema();
|
8348
|
+
init_pgSchema();
|
8349
|
+
init_sqliteSchema();
|
8335
8350
|
copy = (it) => {
|
8336
8351
|
return JSON.parse(JSON.stringify(it));
|
8337
8352
|
};
|
@@ -8379,6 +8394,7 @@ var init_views = __esm({
|
|
8379
8394
|
"use strict";
|
8380
8395
|
init_source();
|
8381
8396
|
import_hanji = __toESM(require_hanji());
|
8397
|
+
init_utils();
|
8382
8398
|
warning = (msg) => {
|
8383
8399
|
(0, import_hanji.render)(`[${source_default.yellow("Warning")}] ${msg}`);
|
8384
8400
|
};
|
@@ -8575,6 +8591,7 @@ var init_serializer = __esm({
|
|
8575
8591
|
"src/serializer/index.ts"() {
|
8576
8592
|
"use strict";
|
8577
8593
|
glob = __toESM(require_glob());
|
8594
|
+
init_views();
|
8578
8595
|
sqlToStr = (sql2) => {
|
8579
8596
|
return sql2.toQuery({
|
8580
8597
|
escapeName: () => {
|
@@ -8596,6 +8613,10 @@ var fillPgSnapshot;
|
|
8596
8613
|
var init_migrationPreparator = __esm({
|
8597
8614
|
"src/migrationPreparator.ts"() {
|
8598
8615
|
"use strict";
|
8616
|
+
init_serializer();
|
8617
|
+
init_mysqlSchema();
|
8618
|
+
init_pgSchema();
|
8619
|
+
init_sqliteSchema();
|
8599
8620
|
fillPgSnapshot = ({
|
8600
8621
|
serialized,
|
8601
8622
|
id,
|
@@ -15793,6 +15814,13 @@ var init_snapshotsDiffer = __esm({
|
|
15793
15814
|
}
|
15794
15815
|
});
|
15795
15816
|
|
15817
|
+
// src/utils/words.ts
|
15818
|
+
var init_words = __esm({
|
15819
|
+
"src/utils/words.ts"() {
|
15820
|
+
"use strict";
|
15821
|
+
}
|
15822
|
+
});
|
15823
|
+
|
15796
15824
|
// src/schemaValidator.ts
|
15797
15825
|
var dialects, dialect3, commonSquashedSchema, commonSchema;
|
15798
15826
|
var init_schemaValidator = __esm({
|
@@ -15820,6 +15848,7 @@ var init_common = __esm({
|
|
15820
15848
|
"use strict";
|
15821
15849
|
init_lib();
|
15822
15850
|
init_schemaValidator();
|
15851
|
+
init_outputs();
|
15823
15852
|
sqliteDriversLiterals = [
|
15824
15853
|
literalType("turso"),
|
15825
15854
|
literalType("d1-http"),
|
@@ -15902,6 +15931,7 @@ var init_outputs = __esm({
|
|
15902
15931
|
"src/cli/validations/outputs.ts"() {
|
15903
15932
|
"use strict";
|
15904
15933
|
init_source();
|
15934
|
+
init_common();
|
15905
15935
|
withStyle = {
|
15906
15936
|
error: (str) => `${source_default.red(`${source_default.white.bgRed(" Invalid input ")} ${str}`)}`,
|
15907
15937
|
warning: (str) => `${source_default.white.bgGray(" Warning ")} ${str}`,
|
@@ -15918,8 +15948,16 @@ var import_hanji2, schemasResolver, tablesResolver, sequencesResolver, enumsReso
|
|
15918
15948
|
var init_migrate = __esm({
|
15919
15949
|
"src/cli/commands/migrate.ts"() {
|
15920
15950
|
"use strict";
|
15951
|
+
init_migrationPreparator();
|
15921
15952
|
init_source();
|
15922
15953
|
import_hanji2 = __toESM(require_hanji());
|
15954
|
+
init_mysqlSchema();
|
15955
|
+
init_pgSchema();
|
15956
|
+
init_sqliteSchema();
|
15957
|
+
init_snapshotsDiffer();
|
15958
|
+
init_utils();
|
15959
|
+
init_words();
|
15960
|
+
init_outputs();
|
15923
15961
|
init_views();
|
15924
15962
|
schemasResolver = async (input) => {
|
15925
15963
|
try {
|
@@ -17234,7 +17272,7 @@ var init_mjs = __esm({
|
|
17234
17272
|
}
|
17235
17273
|
});
|
17236
17274
|
|
17237
|
-
// ../
|
17275
|
+
// ../drizzle-orm/dist/entity.js
|
17238
17276
|
function is(value, type) {
|
17239
17277
|
if (!value || typeof value !== "object") {
|
17240
17278
|
return false;
|
@@ -17260,21 +17298,21 @@ function is(value, type) {
|
|
17260
17298
|
}
|
17261
17299
|
var entityKind, hasOwnEntityKind;
|
17262
17300
|
var init_entity = __esm({
|
17263
|
-
"../
|
17301
|
+
"../drizzle-orm/dist/entity.js"() {
|
17264
17302
|
"use strict";
|
17265
17303
|
entityKind = Symbol.for("drizzle:entityKind");
|
17266
17304
|
hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
17267
17305
|
}
|
17268
17306
|
});
|
17269
17307
|
|
17270
|
-
// ../
|
17271
|
-
var _a,
|
17308
|
+
// ../drizzle-orm/dist/column.js
|
17309
|
+
var _a, Column2;
|
17272
17310
|
var init_column = __esm({
|
17273
|
-
"../
|
17311
|
+
"../drizzle-orm/dist/column.js"() {
|
17274
17312
|
"use strict";
|
17275
17313
|
init_entity();
|
17276
17314
|
_a = entityKind;
|
17277
|
-
|
17315
|
+
Column2 = class {
|
17278
17316
|
constructor(table4, config) {
|
17279
17317
|
__publicField(this, "name");
|
17280
17318
|
__publicField(this, "primary");
|
@@ -17320,14 +17358,14 @@ var init_column = __esm({
|
|
17320
17358
|
return this.config.generated !== void 0 && this.config.generated.type !== "byDefault";
|
17321
17359
|
}
|
17322
17360
|
};
|
17323
|
-
__publicField(
|
17361
|
+
__publicField(Column2, _a, "Column");
|
17324
17362
|
}
|
17325
17363
|
});
|
17326
17364
|
|
17327
|
-
// ../
|
17365
|
+
// ../drizzle-orm/dist/column-builder.js
|
17328
17366
|
var _a2, ColumnBuilder;
|
17329
17367
|
var init_column_builder = __esm({
|
17330
|
-
"../
|
17368
|
+
"../drizzle-orm/dist/column-builder.js"() {
|
17331
17369
|
"use strict";
|
17332
17370
|
init_entity();
|
17333
17371
|
_a2 = entityKind;
|
@@ -17429,7 +17467,7 @@ var init_column_builder = __esm({
|
|
17429
17467
|
}
|
17430
17468
|
});
|
17431
17469
|
|
17432
|
-
// ../
|
17470
|
+
// ../drizzle-orm/dist/table.js
|
17433
17471
|
function isTable(table4) {
|
17434
17472
|
return typeof table4 === "object" && table4 !== null && IsDrizzleTable in table4;
|
17435
17473
|
}
|
@@ -17439,9 +17477,9 @@ function getTableName(table4) {
|
|
17439
17477
|
function getTableUniqueName(table4) {
|
17440
17478
|
return `${table4[Schema] ?? "public"}.${table4[TableName]}`;
|
17441
17479
|
}
|
17442
|
-
var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i,
|
17480
|
+
var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i, Table2;
|
17443
17481
|
var init_table = __esm({
|
17444
|
-
"../
|
17482
|
+
"../drizzle-orm/dist/table.js"() {
|
17445
17483
|
"use strict";
|
17446
17484
|
init_entity();
|
17447
17485
|
TableName = Symbol.for("drizzle:Name");
|
@@ -17454,7 +17492,7 @@ var init_table = __esm({
|
|
17454
17492
|
ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder");
|
17455
17493
|
IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable");
|
17456
17494
|
_i = entityKind, _h = TableName, _g = OriginalName, _f = Schema, _e = Columns, _d = ExtraConfigColumns, _c = BaseName, _b = IsAlias, _a3 = ExtraConfigBuilder;
|
17457
|
-
|
17495
|
+
Table2 = class {
|
17458
17496
|
constructor(name2, schema4, baseName) {
|
17459
17497
|
/**
|
17460
17498
|
* @internal
|
@@ -17486,9 +17524,9 @@ var init_table = __esm({
|
|
17486
17524
|
this[BaseName] = baseName;
|
17487
17525
|
}
|
17488
17526
|
};
|
17489
|
-
__publicField(
|
17527
|
+
__publicField(Table2, _i, "Table");
|
17490
17528
|
/** @internal */
|
17491
|
-
__publicField(
|
17529
|
+
__publicField(Table2, "Symbol", {
|
17492
17530
|
Name: TableName,
|
17493
17531
|
Schema,
|
17494
17532
|
OriginalName,
|
@@ -17501,7 +17539,7 @@ var init_table = __esm({
|
|
17501
17539
|
}
|
17502
17540
|
});
|
17503
17541
|
|
17504
|
-
// ../
|
17542
|
+
// ../drizzle-orm/dist/pg-core/table.js
|
17505
17543
|
function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name2) {
|
17506
17544
|
const rawTable = new PgTable(name2, schema4, baseName);
|
17507
17545
|
const builtColumns = Object.fromEntries(
|
@@ -17520,8 +17558,8 @@ function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name
|
|
17520
17558
|
})
|
17521
17559
|
);
|
17522
17560
|
const table4 = Object.assign(rawTable, builtColumns);
|
17523
|
-
table4[
|
17524
|
-
table4[
|
17561
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
17562
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;
|
17525
17563
|
if (extraConfig) {
|
17526
17564
|
table4[PgTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
17527
17565
|
}
|
@@ -17529,12 +17567,12 @@ function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name
|
|
17529
17567
|
}
|
17530
17568
|
var InlineForeignKeys, _a4, _b2, _c2, _d2, PgTable, pgTable;
|
17531
17569
|
var init_table2 = __esm({
|
17532
|
-
"../
|
17570
|
+
"../drizzle-orm/dist/pg-core/table.js"() {
|
17533
17571
|
"use strict";
|
17534
17572
|
init_entity();
|
17535
17573
|
init_table();
|
17536
17574
|
InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
17537
|
-
PgTable = class extends (_d2 =
|
17575
|
+
PgTable = class extends (_d2 = Table2, _c2 = entityKind, _b2 = InlineForeignKeys, _a4 = Table2.Symbol.ExtraConfigBuilder, _d2) {
|
17538
17576
|
constructor() {
|
17539
17577
|
super(...arguments);
|
17540
17578
|
/**@internal */
|
@@ -17545,7 +17583,7 @@ var init_table2 = __esm({
|
|
17545
17583
|
};
|
17546
17584
|
__publicField(PgTable, _c2, "PgTable");
|
17547
17585
|
/** @internal */
|
17548
|
-
__publicField(PgTable, "Symbol", Object.assign({},
|
17586
|
+
__publicField(PgTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
17549
17587
|
InlineForeignKeys
|
17550
17588
|
}));
|
17551
17589
|
pgTable = (name2, columns, extraConfig) => {
|
@@ -17554,10 +17592,10 @@ var init_table2 = __esm({
|
|
17554
17592
|
}
|
17555
17593
|
});
|
17556
17594
|
|
17557
|
-
// ../
|
17595
|
+
// ../drizzle-orm/dist/pg-core/foreign-keys.js
|
17558
17596
|
var _a5, ForeignKeyBuilder, _a6, ForeignKey;
|
17559
17597
|
var init_foreign_keys = __esm({
|
17560
|
-
"../
|
17598
|
+
"../drizzle-orm/dist/pg-core/foreign-keys.js"() {
|
17561
17599
|
"use strict";
|
17562
17600
|
init_entity();
|
17563
17601
|
init_table2();
|
@@ -17621,23 +17659,23 @@ var init_foreign_keys = __esm({
|
|
17621
17659
|
}
|
17622
17660
|
});
|
17623
17661
|
|
17624
|
-
// ../
|
17662
|
+
// ../drizzle-orm/dist/tracing-utils.js
|
17625
17663
|
function iife(fn, ...args) {
|
17626
17664
|
return fn(...args);
|
17627
17665
|
}
|
17628
17666
|
var init_tracing_utils = __esm({
|
17629
|
-
"../
|
17667
|
+
"../drizzle-orm/dist/tracing-utils.js"() {
|
17630
17668
|
"use strict";
|
17631
17669
|
}
|
17632
17670
|
});
|
17633
17671
|
|
17634
|
-
// ../
|
17672
|
+
// ../drizzle-orm/dist/pg-core/unique-constraint.js
|
17635
17673
|
function uniqueKeyName(table4, columns) {
|
17636
17674
|
return `${table4[PgTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
17637
17675
|
}
|
17638
17676
|
var _a7, UniqueConstraintBuilder, _a8, UniqueOnConstraintBuilder, _a9, UniqueConstraint;
|
17639
17677
|
var init_unique_constraint = __esm({
|
17640
|
-
"../
|
17678
|
+
"../drizzle-orm/dist/pg-core/unique-constraint.js"() {
|
17641
17679
|
"use strict";
|
17642
17680
|
init_entity();
|
17643
17681
|
init_table2();
|
@@ -17692,7 +17730,7 @@ var init_unique_constraint = __esm({
|
|
17692
17730
|
}
|
17693
17731
|
});
|
17694
17732
|
|
17695
|
-
// ../
|
17733
|
+
// ../drizzle-orm/dist/pg-core/utils/array.js
|
17696
17734
|
function parsePgArrayValue(arrayString, startFrom, inQuotes) {
|
17697
17735
|
for (let i = startFrom; i < arrayString.length; i++) {
|
17698
17736
|
const char = arrayString[i];
|
@@ -17768,15 +17806,15 @@ function makePgArray(array) {
|
|
17768
17806
|
}).join(",")}}`;
|
17769
17807
|
}
|
17770
17808
|
var init_array = __esm({
|
17771
|
-
"../
|
17809
|
+
"../drizzle-orm/dist/pg-core/utils/array.js"() {
|
17772
17810
|
"use strict";
|
17773
17811
|
}
|
17774
17812
|
});
|
17775
17813
|
|
17776
|
-
// ../
|
17814
|
+
// ../drizzle-orm/dist/pg-core/columns/common.js
|
17777
17815
|
var _a10, _b3, PgColumnBuilder, _a11, _b4, PgColumn, _a12, _b5, ExtraConfigColumn, _a13, IndexedColumn, _a14, _b6, PgArrayBuilder, _a15, _b7, _PgArray, PgArray;
|
17778
17816
|
var init_common2 = __esm({
|
17779
|
-
"../
|
17817
|
+
"../drizzle-orm/dist/pg-core/columns/common.js"() {
|
17780
17818
|
"use strict";
|
17781
17819
|
init_column_builder();
|
17782
17820
|
init_column();
|
@@ -17839,7 +17877,7 @@ var init_common2 = __esm({
|
|
17839
17877
|
}
|
17840
17878
|
};
|
17841
17879
|
__publicField(PgColumnBuilder, _a10, "PgColumnBuilder");
|
17842
|
-
PgColumn = class extends (_b4 =
|
17880
|
+
PgColumn = class extends (_b4 = Column2, _a11 = entityKind, _b4) {
|
17843
17881
|
constructor(table4, config) {
|
17844
17882
|
if (!config.uniqueName) {
|
17845
17883
|
config.uniqueName = uniqueKeyName(table4, [config.name]);
|
@@ -17977,7 +18015,7 @@ var init_common2 = __esm({
|
|
17977
18015
|
}
|
17978
18016
|
});
|
17979
18017
|
|
17980
|
-
// ../
|
18018
|
+
// ../drizzle-orm/dist/pg-core/columns/enum.js
|
17981
18019
|
function isPgEnum(obj) {
|
17982
18020
|
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
|
17983
18021
|
}
|
@@ -17995,7 +18033,7 @@ function pgEnumWithSchema(enumName, values, schema4) {
|
|
17995
18033
|
}
|
17996
18034
|
var isPgEnumSym, _a16, _b8, PgEnumColumnBuilder, _a17, _b9, PgEnumColumn;
|
17997
18035
|
var init_enum = __esm({
|
17998
|
-
"../
|
18036
|
+
"../drizzle-orm/dist/pg-core/columns/enum.js"() {
|
17999
18037
|
"use strict";
|
18000
18038
|
init_entity();
|
18001
18039
|
init_common2();
|
@@ -18029,10 +18067,10 @@ var init_enum = __esm({
|
|
18029
18067
|
}
|
18030
18068
|
});
|
18031
18069
|
|
18032
|
-
// ../
|
18070
|
+
// ../drizzle-orm/dist/subquery.js
|
18033
18071
|
var _a18, Subquery, _a19, _b10, WithSubquery;
|
18034
18072
|
var init_subquery = __esm({
|
18035
|
-
"../
|
18073
|
+
"../drizzle-orm/dist/subquery.js"() {
|
18036
18074
|
"use strict";
|
18037
18075
|
init_entity();
|
18038
18076
|
_a18 = entityKind;
|
@@ -18057,19 +18095,19 @@ var init_subquery = __esm({
|
|
18057
18095
|
}
|
18058
18096
|
});
|
18059
18097
|
|
18060
|
-
// ../
|
18098
|
+
// ../drizzle-orm/dist/version.js
|
18061
18099
|
var version;
|
18062
18100
|
var init_version = __esm({
|
18063
|
-
"../
|
18101
|
+
"../drizzle-orm/dist/version.js"() {
|
18064
18102
|
"use strict";
|
18065
|
-
version = "0.32.
|
18103
|
+
version = "0.32.2";
|
18066
18104
|
}
|
18067
18105
|
});
|
18068
18106
|
|
18069
|
-
// ../
|
18107
|
+
// ../drizzle-orm/dist/tracing.js
|
18070
18108
|
var otel, rawTracer, tracer;
|
18071
18109
|
var init_tracing = __esm({
|
18072
|
-
"../
|
18110
|
+
"../drizzle-orm/dist/tracing.js"() {
|
18073
18111
|
"use strict";
|
18074
18112
|
init_tracing_utils();
|
18075
18113
|
init_version();
|
@@ -18107,16 +18145,16 @@ var init_tracing = __esm({
|
|
18107
18145
|
}
|
18108
18146
|
});
|
18109
18147
|
|
18110
|
-
// ../
|
18148
|
+
// ../drizzle-orm/dist/view-common.js
|
18111
18149
|
var ViewBaseConfig;
|
18112
18150
|
var init_view_common = __esm({
|
18113
|
-
"../
|
18151
|
+
"../drizzle-orm/dist/view-common.js"() {
|
18114
18152
|
"use strict";
|
18115
18153
|
ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
18116
18154
|
}
|
18117
18155
|
});
|
18118
18156
|
|
18119
|
-
// ../
|
18157
|
+
// ../drizzle-orm/dist/sql/sql.js
|
18120
18158
|
function isSQLWrapper(value) {
|
18121
18159
|
return value !== null && value !== void 0 && typeof value.getSQL === "function";
|
18122
18160
|
}
|
@@ -18169,7 +18207,7 @@ function fillPlaceholders(params, values) {
|
|
18169
18207
|
}
|
18170
18208
|
var _a20, FakePrimitiveParam, _a21, StringChunk, _a22, _SQL, SQL, _a23, Name, noopDecoder, noopEncoder, noopMapper, _a24, Param, _a25, Placeholder, _a26, _b11, View;
|
18171
18209
|
var init_sql = __esm({
|
18172
|
-
"../
|
18210
|
+
"../drizzle-orm/dist/sql/sql.js"() {
|
18173
18211
|
"use strict";
|
18174
18212
|
init_entity();
|
18175
18213
|
init_enum();
|
@@ -18254,19 +18292,19 @@ var init_sql = __esm({
|
|
18254
18292
|
inlineParams: inlineParams || chunk.shouldInlineParams
|
18255
18293
|
});
|
18256
18294
|
}
|
18257
|
-
if (is(chunk,
|
18258
|
-
const schemaName = chunk[
|
18259
|
-
const tableName = chunk[
|
18295
|
+
if (is(chunk, Table2)) {
|
18296
|
+
const schemaName = chunk[Table2.Symbol.Schema];
|
18297
|
+
const tableName = chunk[Table2.Symbol.Name];
|
18260
18298
|
return {
|
18261
18299
|
sql: schemaName === void 0 ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName),
|
18262
18300
|
params: []
|
18263
18301
|
};
|
18264
18302
|
}
|
18265
|
-
if (is(chunk,
|
18303
|
+
if (is(chunk, Column2)) {
|
18266
18304
|
if (_config.invokeSource === "indexes") {
|
18267
18305
|
return { sql: escapeName(chunk.name), params: [] };
|
18268
18306
|
}
|
18269
|
-
return { sql: escapeName(chunk.table[
|
18307
|
+
return { sql: escapeName(chunk.table[Table2.Symbol.Name]) + "." + escapeName(chunk.name), params: [] };
|
18270
18308
|
}
|
18271
18309
|
if (is(chunk, View)) {
|
18272
18310
|
const schemaName = chunk[ViewBaseConfig].schema;
|
@@ -18284,7 +18322,7 @@ var init_sql = __esm({
|
|
18284
18322
|
if (inlineParams) {
|
18285
18323
|
return { sql: this.mapInlineParam(mappedValue, config), params: [] };
|
18286
18324
|
}
|
18287
|
-
let typings;
|
18325
|
+
let typings = ["none"];
|
18288
18326
|
if (prepareTyping) {
|
18289
18327
|
typings = [prepareTyping(chunk.encoder)];
|
18290
18328
|
}
|
@@ -18326,7 +18364,7 @@ var init_sql = __esm({
|
|
18326
18364
|
if (inlineParams) {
|
18327
18365
|
return { sql: this.mapInlineParam(chunk, config), params: [] };
|
18328
18366
|
}
|
18329
|
-
return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk] };
|
18367
|
+
return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] };
|
18330
18368
|
}));
|
18331
18369
|
}
|
18332
18370
|
mapInlineParam(chunk, { escapeString }) {
|
@@ -18503,10 +18541,10 @@ var init_sql = __esm({
|
|
18503
18541
|
}
|
18504
18542
|
};
|
18505
18543
|
__publicField(View, _b11, "View");
|
18506
|
-
|
18544
|
+
Column2.prototype.getSQL = function() {
|
18507
18545
|
return new SQL([this]);
|
18508
18546
|
};
|
18509
|
-
|
18547
|
+
Table2.prototype.getSQL = function() {
|
18510
18548
|
return new SQL([this]);
|
18511
18549
|
};
|
18512
18550
|
Subquery.prototype.getSQL = function() {
|
@@ -18515,7 +18553,7 @@ var init_sql = __esm({
|
|
18515
18553
|
}
|
18516
18554
|
});
|
18517
18555
|
|
18518
|
-
// ../
|
18556
|
+
// ../drizzle-orm/dist/alias.js
|
18519
18557
|
function aliasedTable(table4, tableAlias) {
|
18520
18558
|
return new Proxy(table4, new TableAliasProxyHandler(tableAlias, false));
|
18521
18559
|
}
|
@@ -18533,7 +18571,7 @@ function mapColumnsInAliasedSQLToAlias(query, alias) {
|
|
18533
18571
|
}
|
18534
18572
|
function mapColumnsInSQLToAlias(query, alias) {
|
18535
18573
|
return sql.join(query.queryChunks.map((c) => {
|
18536
|
-
if (is(c,
|
18574
|
+
if (is(c, Column2)) {
|
18537
18575
|
return aliasedTableColumn(c, alias);
|
18538
18576
|
}
|
18539
18577
|
if (is(c, SQL)) {
|
@@ -18547,7 +18585,7 @@ function mapColumnsInSQLToAlias(query, alias) {
|
|
18547
18585
|
}
|
18548
18586
|
var _a27, ColumnAliasProxyHandler, _a28, TableAliasProxyHandler, _a29, RelationTableAliasProxyHandler;
|
18549
18587
|
var init_alias = __esm({
|
18550
|
-
"../
|
18588
|
+
"../drizzle-orm/dist/alias.js"() {
|
18551
18589
|
"use strict";
|
18552
18590
|
init_column();
|
18553
18591
|
init_entity();
|
@@ -18574,13 +18612,13 @@ var init_alias = __esm({
|
|
18574
18612
|
this.replaceOriginalName = replaceOriginalName;
|
18575
18613
|
}
|
18576
18614
|
get(target, prop) {
|
18577
|
-
if (prop ===
|
18615
|
+
if (prop === Table2.Symbol.IsAlias) {
|
18578
18616
|
return true;
|
18579
18617
|
}
|
18580
|
-
if (prop ===
|
18618
|
+
if (prop === Table2.Symbol.Name) {
|
18581
18619
|
return this.alias;
|
18582
18620
|
}
|
18583
|
-
if (this.replaceOriginalName && prop ===
|
18621
|
+
if (this.replaceOriginalName && prop === Table2.Symbol.OriginalName) {
|
18584
18622
|
return this.alias;
|
18585
18623
|
}
|
18586
18624
|
if (prop === ViewBaseConfig) {
|
@@ -18590,8 +18628,8 @@ var init_alias = __esm({
|
|
18590
18628
|
isAlias: true
|
18591
18629
|
};
|
18592
18630
|
}
|
18593
|
-
if (prop ===
|
18594
|
-
const columns = target[
|
18631
|
+
if (prop === Table2.Symbol.Columns) {
|
18632
|
+
const columns = target[Table2.Symbol.Columns];
|
18595
18633
|
if (!columns) {
|
18596
18634
|
return columns;
|
18597
18635
|
}
|
@@ -18605,7 +18643,7 @@ var init_alias = __esm({
|
|
18605
18643
|
return proxiedColumns;
|
18606
18644
|
}
|
18607
18645
|
const value = target[prop];
|
18608
|
-
if (is(value,
|
18646
|
+
if (is(value, Column2)) {
|
18609
18647
|
return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this)));
|
18610
18648
|
}
|
18611
18649
|
return value;
|
@@ -18628,10 +18666,10 @@ var init_alias = __esm({
|
|
18628
18666
|
}
|
18629
18667
|
});
|
18630
18668
|
|
18631
|
-
// ../
|
18669
|
+
// ../drizzle-orm/dist/errors.js
|
18632
18670
|
var _a30, _b12, DrizzleError, _a31, _b13, TransactionRollbackError;
|
18633
18671
|
var init_errors = __esm({
|
18634
|
-
"../
|
18672
|
+
"../drizzle-orm/dist/errors.js"() {
|
18635
18673
|
"use strict";
|
18636
18674
|
init_entity();
|
18637
18675
|
DrizzleError = class extends (_b12 = Error, _a30 = entityKind, _b12) {
|
@@ -18651,9 +18689,9 @@ var init_errors = __esm({
|
|
18651
18689
|
}
|
18652
18690
|
});
|
18653
18691
|
|
18654
|
-
// ../
|
18692
|
+
// ../drizzle-orm/dist/sql/expressions/conditions.js
|
18655
18693
|
function bindIfParam(value, column4) {
|
18656
|
-
if (isDriverValueEncoder(column4) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value,
|
18694
|
+
if (isDriverValueEncoder(column4) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column2) && !is(value, Table2) && !is(value, View)) {
|
18657
18695
|
return new Param(value, column4);
|
18658
18696
|
}
|
18659
18697
|
return value;
|
@@ -18779,7 +18817,7 @@ function arrayOverlaps(column4, values) {
|
|
18779
18817
|
}
|
18780
18818
|
var eq, ne, gt, gte, lt, lte;
|
18781
18819
|
var init_conditions = __esm({
|
18782
|
-
"../
|
18820
|
+
"../drizzle-orm/dist/sql/expressions/conditions.js"() {
|
18783
18821
|
"use strict";
|
18784
18822
|
init_column();
|
18785
18823
|
init_entity();
|
@@ -18806,7 +18844,7 @@ var init_conditions = __esm({
|
|
18806
18844
|
}
|
18807
18845
|
});
|
18808
18846
|
|
18809
|
-
// ../
|
18847
|
+
// ../drizzle-orm/dist/sql/expressions/select.js
|
18810
18848
|
function asc(column4) {
|
18811
18849
|
return sql`${column4} asc`;
|
18812
18850
|
}
|
@@ -18814,33 +18852,33 @@ function desc(column4) {
|
|
18814
18852
|
return sql`${column4} desc`;
|
18815
18853
|
}
|
18816
18854
|
var init_select = __esm({
|
18817
|
-
"../
|
18855
|
+
"../drizzle-orm/dist/sql/expressions/select.js"() {
|
18818
18856
|
"use strict";
|
18819
18857
|
init_sql();
|
18820
18858
|
}
|
18821
18859
|
});
|
18822
18860
|
|
18823
|
-
// ../
|
18861
|
+
// ../drizzle-orm/dist/sql/expressions/index.js
|
18824
18862
|
var init_expressions = __esm({
|
18825
|
-
"../
|
18863
|
+
"../drizzle-orm/dist/sql/expressions/index.js"() {
|
18826
18864
|
"use strict";
|
18827
18865
|
init_conditions();
|
18828
18866
|
init_select();
|
18829
18867
|
}
|
18830
18868
|
});
|
18831
18869
|
|
18832
|
-
// ../
|
18870
|
+
// ../drizzle-orm/dist/expressions.js
|
18833
18871
|
var init_expressions2 = __esm({
|
18834
|
-
"../
|
18872
|
+
"../drizzle-orm/dist/expressions.js"() {
|
18835
18873
|
"use strict";
|
18836
18874
|
init_expressions();
|
18837
18875
|
}
|
18838
18876
|
});
|
18839
18877
|
|
18840
|
-
// ../
|
18878
|
+
// ../drizzle-orm/dist/logger.js
|
18841
18879
|
var _a32, ConsoleLogWriter, _a33, DefaultLogger, _a34, NoopLogger;
|
18842
18880
|
var init_logger = __esm({
|
18843
|
-
"../
|
18881
|
+
"../drizzle-orm/dist/logger.js"() {
|
18844
18882
|
"use strict";
|
18845
18883
|
init_entity();
|
18846
18884
|
_a32 = entityKind;
|
@@ -18878,17 +18916,17 @@ var init_logger = __esm({
|
|
18878
18916
|
}
|
18879
18917
|
});
|
18880
18918
|
|
18881
|
-
// ../
|
18919
|
+
// ../drizzle-orm/dist/operations.js
|
18882
18920
|
var init_operations = __esm({
|
18883
|
-
"../
|
18921
|
+
"../drizzle-orm/dist/operations.js"() {
|
18884
18922
|
"use strict";
|
18885
18923
|
}
|
18886
18924
|
});
|
18887
18925
|
|
18888
|
-
// ../
|
18926
|
+
// ../drizzle-orm/dist/query-promise.js
|
18889
18927
|
var _a35, _b14, QueryPromise;
|
18890
18928
|
var init_query_promise = __esm({
|
18891
|
-
"../
|
18929
|
+
"../drizzle-orm/dist/query-promise.js"() {
|
18892
18930
|
"use strict";
|
18893
18931
|
init_entity();
|
18894
18932
|
_b14 = entityKind, _a35 = Symbol.toStringTag;
|
@@ -18919,10 +18957,10 @@ var init_query_promise = __esm({
|
|
18919
18957
|
}
|
18920
18958
|
});
|
18921
18959
|
|
18922
|
-
// ../
|
18960
|
+
// ../drizzle-orm/dist/pg-core/primary-keys.js
|
18923
18961
|
var _a36, PrimaryKeyBuilder, _a37, PrimaryKey;
|
18924
18962
|
var init_primary_keys = __esm({
|
18925
|
-
"../
|
18963
|
+
"../drizzle-orm/dist/pg-core/primary-keys.js"() {
|
18926
18964
|
"use strict";
|
18927
18965
|
init_entity();
|
18928
18966
|
init_table2();
|
@@ -18959,7 +18997,7 @@ var init_primary_keys = __esm({
|
|
18959
18997
|
}
|
18960
18998
|
});
|
18961
18999
|
|
18962
|
-
// ../
|
19000
|
+
// ../drizzle-orm/dist/relations.js
|
18963
19001
|
function getOperators() {
|
18964
19002
|
return {
|
18965
19003
|
and,
|
@@ -18994,33 +19032,33 @@ function getOrderByOperators() {
|
|
18994
19032
|
};
|
18995
19033
|
}
|
18996
19034
|
function extractTablesRelationalConfig(schema4, configHelpers) {
|
18997
|
-
if (Object.keys(schema4).length === 1 && "default" in schema4 && !is(schema4["default"],
|
19035
|
+
if (Object.keys(schema4).length === 1 && "default" in schema4 && !is(schema4["default"], Table2)) {
|
18998
19036
|
schema4 = schema4["default"];
|
18999
19037
|
}
|
19000
19038
|
const tableNamesMap = {};
|
19001
19039
|
const relationsBuffer = {};
|
19002
19040
|
const tablesConfig = {};
|
19003
19041
|
for (const [key, value] of Object.entries(schema4)) {
|
19004
|
-
if (is(value,
|
19042
|
+
if (is(value, Table2)) {
|
19005
19043
|
const dbName = getTableUniqueName(value);
|
19006
19044
|
const bufferedRelations = relationsBuffer[dbName];
|
19007
19045
|
tableNamesMap[dbName] = key;
|
19008
19046
|
tablesConfig[key] = {
|
19009
19047
|
tsName: key,
|
19010
|
-
dbName: value[
|
19011
|
-
schema: value[
|
19012
|
-
columns: value[
|
19048
|
+
dbName: value[Table2.Symbol.Name],
|
19049
|
+
schema: value[Table2.Symbol.Schema],
|
19050
|
+
columns: value[Table2.Symbol.Columns],
|
19013
19051
|
relations: bufferedRelations?.relations ?? {},
|
19014
19052
|
primaryKey: bufferedRelations?.primaryKey ?? []
|
19015
19053
|
};
|
19016
19054
|
for (const column4 of Object.values(
|
19017
|
-
value[
|
19055
|
+
value[Table2.Symbol.Columns]
|
19018
19056
|
)) {
|
19019
19057
|
if (column4.primary) {
|
19020
19058
|
tablesConfig[key].primaryKey.push(column4);
|
19021
19059
|
}
|
19022
19060
|
}
|
19023
|
-
const extraConfig = value[
|
19061
|
+
const extraConfig = value[Table2.Symbol.ExtraConfigBuilder]?.(value[Table2.Symbol.ExtraConfigColumns]);
|
19024
19062
|
if (extraConfig) {
|
19025
19063
|
for (const configEntry of Object.values(extraConfig)) {
|
19026
19064
|
if (is(configEntry, PrimaryKeyBuilder)) {
|
@@ -19092,7 +19130,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19092
19130
|
const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];
|
19093
19131
|
if (!referencedTableTsName) {
|
19094
19132
|
throw new Error(
|
19095
|
-
`Table "${relation.referencedTable[
|
19133
|
+
`Table "${relation.referencedTable[Table2.Symbol.Name]}" not found in schema`
|
19096
19134
|
);
|
19097
19135
|
}
|
19098
19136
|
const referencedTableConfig = schema4[referencedTableTsName];
|
@@ -19103,7 +19141,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19103
19141
|
const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];
|
19104
19142
|
if (!sourceTableTsName) {
|
19105
19143
|
throw new Error(
|
19106
|
-
`Table "${sourceTable[
|
19144
|
+
`Table "${sourceTable[Table2.Symbol.Name]}" not found in schema`
|
19107
19145
|
);
|
19108
19146
|
}
|
19109
19147
|
const reverseRelations = [];
|
@@ -19118,7 +19156,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19118
19156
|
throw relation.relationName ? new Error(
|
19119
19157
|
`There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"`
|
19120
19158
|
) : new Error(
|
19121
|
-
`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[
|
19159
|
+
`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table2.Symbol.Name]}". Please specify relation name`
|
19122
19160
|
);
|
19123
19161
|
}
|
19124
19162
|
if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) {
|
@@ -19166,7 +19204,7 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
19166
19204
|
const value = mapColumnValue(row[selectionItemIndex]);
|
19167
19205
|
const field = selectionItem.field;
|
19168
19206
|
let decoder;
|
19169
|
-
if (is(field,
|
19207
|
+
if (is(field, Column2)) {
|
19170
19208
|
decoder = field;
|
19171
19209
|
} else if (is(field, SQL)) {
|
19172
19210
|
decoder = field.decoder;
|
@@ -19180,7 +19218,7 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
19180
19218
|
}
|
19181
19219
|
var _a38, Relation, _a39, Relations, _a40, _b15, _One, One, _a41, _b16, _Many, Many;
|
19182
19220
|
var init_relations = __esm({
|
19183
|
-
"../
|
19221
|
+
"../drizzle-orm/dist/relations.js"() {
|
19184
19222
|
"use strict";
|
19185
19223
|
init_table();
|
19186
19224
|
init_column();
|
@@ -19196,7 +19234,7 @@ var init_relations = __esm({
|
|
19196
19234
|
this.sourceTable = sourceTable;
|
19197
19235
|
this.referencedTable = referencedTable;
|
19198
19236
|
this.relationName = relationName;
|
19199
|
-
this.referencedTableName = referencedTable[
|
19237
|
+
this.referencedTableName = referencedTable[Table2.Symbol.Name];
|
19200
19238
|
}
|
19201
19239
|
};
|
19202
19240
|
__publicField(Relation, _a38, "Relation");
|
@@ -19247,7 +19285,7 @@ var init_relations = __esm({
|
|
19247
19285
|
}
|
19248
19286
|
});
|
19249
19287
|
|
19250
|
-
// ../
|
19288
|
+
// ../drizzle-orm/dist/sql/functions/aggregate.js
|
19251
19289
|
function count(expression) {
|
19252
19290
|
return sql`count(${expression || sql.raw("*")})`.mapWith(Number);
|
19253
19291
|
}
|
@@ -19267,13 +19305,13 @@ function sumDistinct(expression) {
|
|
19267
19305
|
return sql`sum(distinct ${expression})`.mapWith(String);
|
19268
19306
|
}
|
19269
19307
|
function max(expression) {
|
19270
|
-
return sql`max(${expression})`.mapWith(is(expression,
|
19308
|
+
return sql`max(${expression})`.mapWith(is(expression, Column2) ? expression : String);
|
19271
19309
|
}
|
19272
19310
|
function min(expression) {
|
19273
|
-
return sql`min(${expression})`.mapWith(is(expression,
|
19311
|
+
return sql`min(${expression})`.mapWith(is(expression, Column2) ? expression : String);
|
19274
19312
|
}
|
19275
19313
|
var init_aggregate = __esm({
|
19276
|
-
"../
|
19314
|
+
"../drizzle-orm/dist/sql/functions/aggregate.js"() {
|
19277
19315
|
"use strict";
|
19278
19316
|
init_column();
|
19279
19317
|
init_entity();
|
@@ -19281,7 +19319,7 @@ var init_aggregate = __esm({
|
|
19281
19319
|
}
|
19282
19320
|
});
|
19283
19321
|
|
19284
|
-
// ../
|
19322
|
+
// ../drizzle-orm/dist/sql/functions/vector.js
|
19285
19323
|
function toSql(value) {
|
19286
19324
|
return JSON.stringify(value);
|
19287
19325
|
}
|
@@ -19322,24 +19360,24 @@ function jaccardDistance(column4, value) {
|
|
19322
19360
|
return sql`${column4} <%> ${value}`;
|
19323
19361
|
}
|
19324
19362
|
var init_vector = __esm({
|
19325
|
-
"../
|
19363
|
+
"../drizzle-orm/dist/sql/functions/vector.js"() {
|
19326
19364
|
"use strict";
|
19327
19365
|
init_sql();
|
19328
19366
|
}
|
19329
19367
|
});
|
19330
19368
|
|
19331
|
-
// ../
|
19369
|
+
// ../drizzle-orm/dist/sql/functions/index.js
|
19332
19370
|
var init_functions = __esm({
|
19333
|
-
"../
|
19371
|
+
"../drizzle-orm/dist/sql/functions/index.js"() {
|
19334
19372
|
"use strict";
|
19335
19373
|
init_aggregate();
|
19336
19374
|
init_vector();
|
19337
19375
|
}
|
19338
19376
|
});
|
19339
19377
|
|
19340
|
-
// ../
|
19378
|
+
// ../drizzle-orm/dist/sql/index.js
|
19341
19379
|
var init_sql2 = __esm({
|
19342
|
-
"../
|
19380
|
+
"../drizzle-orm/dist/sql/index.js"() {
|
19343
19381
|
"use strict";
|
19344
19382
|
init_expressions();
|
19345
19383
|
init_functions();
|
@@ -19347,13 +19385,13 @@ var init_sql2 = __esm({
|
|
19347
19385
|
}
|
19348
19386
|
});
|
19349
19387
|
|
19350
|
-
// ../
|
19388
|
+
// ../drizzle-orm/dist/utils.js
|
19351
19389
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
19352
19390
|
const nullifyMap = {};
|
19353
19391
|
const result = columns.reduce(
|
19354
19392
|
(result2, { path: path2, field }, columnIndex) => {
|
19355
19393
|
let decoder;
|
19356
|
-
if (is(field,
|
19394
|
+
if (is(field, Column2)) {
|
19357
19395
|
decoder = field;
|
19358
19396
|
} else if (is(field, SQL)) {
|
19359
19397
|
decoder = field.decoder;
|
@@ -19370,7 +19408,7 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
19370
19408
|
} else {
|
19371
19409
|
const rawValue = row[columnIndex];
|
19372
19410
|
const value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
|
19373
|
-
if (joinsNotNullableMap && is(field,
|
19411
|
+
if (joinsNotNullableMap && is(field, Column2) && path2.length === 2) {
|
19374
19412
|
const objectName = path2[0];
|
19375
19413
|
if (!(objectName in nullifyMap)) {
|
19376
19414
|
nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
|
@@ -19399,10 +19437,10 @@ function orderSelectedFields(fields, pathPrefix) {
|
|
19399
19437
|
return result;
|
19400
19438
|
}
|
19401
19439
|
const newPath = pathPrefix ? [...pathPrefix, name2] : [name2];
|
19402
|
-
if (is(field,
|
19440
|
+
if (is(field, Column2) || is(field, SQL) || is(field, SQL.Aliased)) {
|
19403
19441
|
result.push({ path: newPath, field });
|
19404
|
-
} else if (is(field,
|
19405
|
-
result.push(...orderSelectedFields(field[
|
19442
|
+
} else if (is(field, Table2)) {
|
19443
|
+
result.push(...orderSelectedFields(field[Table2.Symbol.Columns], newPath));
|
19406
19444
|
} else {
|
19407
19445
|
result.push(...orderSelectedFields(field, newPath));
|
19408
19446
|
}
|
@@ -19427,7 +19465,7 @@ function mapUpdateSet(table4, values) {
|
|
19427
19465
|
if (is(value, SQL)) {
|
19428
19466
|
return [key, value];
|
19429
19467
|
} else {
|
19430
|
-
return [key, new Param(value, table4[
|
19468
|
+
return [key, new Param(value, table4[Table2.Symbol.Columns][key])];
|
19431
19469
|
}
|
19432
19470
|
});
|
19433
19471
|
if (entries.length === 0) {
|
@@ -19449,13 +19487,13 @@ function applyMixins(baseClass, extendedClasses) {
|
|
19449
19487
|
}
|
19450
19488
|
}
|
19451
19489
|
function getTableColumns(table4) {
|
19452
|
-
return table4[
|
19490
|
+
return table4[Table2.Symbol.Columns];
|
19453
19491
|
}
|
19454
19492
|
function getTableLikeName(table4) {
|
19455
|
-
return is(table4, Subquery) ? table4._.alias : is(table4, View) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : table4[
|
19493
|
+
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];
|
19456
19494
|
}
|
19457
19495
|
var init_utils2 = __esm({
|
19458
|
-
"../
|
19496
|
+
"../drizzle-orm/dist/utils.js"() {
|
19459
19497
|
"use strict";
|
19460
19498
|
init_column();
|
19461
19499
|
init_entity();
|
@@ -19466,11 +19504,11 @@ var init_utils2 = __esm({
|
|
19466
19504
|
}
|
19467
19505
|
});
|
19468
19506
|
|
19469
|
-
// ../
|
19470
|
-
var
|
19471
|
-
__export(
|
19507
|
+
// ../drizzle-orm/dist/index.js
|
19508
|
+
var dist_exports = {};
|
19509
|
+
__export(dist_exports, {
|
19472
19510
|
BaseName: () => BaseName,
|
19473
|
-
Column: () =>
|
19511
|
+
Column: () => Column2,
|
19474
19512
|
ColumnAliasProxyHandler: () => ColumnAliasProxyHandler,
|
19475
19513
|
ColumnBuilder: () => ColumnBuilder,
|
19476
19514
|
Columns: () => Columns,
|
@@ -19496,7 +19534,7 @@ __export(drizzle_orm_exports, {
|
|
19496
19534
|
Schema: () => Schema,
|
19497
19535
|
StringChunk: () => StringChunk,
|
19498
19536
|
Subquery: () => Subquery,
|
19499
|
-
Table: () =>
|
19537
|
+
Table: () => Table2,
|
19500
19538
|
TableAliasProxyHandler: () => TableAliasProxyHandler,
|
19501
19539
|
TableName: () => TableName,
|
19502
19540
|
TransactionRollbackError: () => TransactionRollbackError,
|
@@ -19582,8 +19620,8 @@ __export(drizzle_orm_exports, {
|
|
19582
19620
|
sum: () => sum,
|
19583
19621
|
sumDistinct: () => sumDistinct
|
19584
19622
|
});
|
19585
|
-
var
|
19586
|
-
"../
|
19623
|
+
var init_dist = __esm({
|
19624
|
+
"../drizzle-orm/dist/index.js"() {
|
19587
19625
|
"use strict";
|
19588
19626
|
init_alias();
|
19589
19627
|
init_column_builder();
|
@@ -19603,17 +19641,17 @@ var init_drizzle_orm = __esm({
|
|
19603
19641
|
}
|
19604
19642
|
});
|
19605
19643
|
|
19606
|
-
// ../
|
19644
|
+
// ../drizzle-orm/dist/pg-core/alias.js
|
19607
19645
|
var init_alias2 = __esm({
|
19608
|
-
"../
|
19646
|
+
"../drizzle-orm/dist/pg-core/alias.js"() {
|
19609
19647
|
"use strict";
|
19610
19648
|
}
|
19611
19649
|
});
|
19612
19650
|
|
19613
|
-
// ../
|
19651
|
+
// ../drizzle-orm/dist/pg-core/checks.js
|
19614
19652
|
var _a42, CheckBuilder, _a43, Check;
|
19615
19653
|
var init_checks = __esm({
|
19616
|
-
"../
|
19654
|
+
"../drizzle-orm/dist/pg-core/checks.js"() {
|
19617
19655
|
"use strict";
|
19618
19656
|
init_entity();
|
19619
19657
|
_a42 = entityKind;
|
@@ -19643,10 +19681,10 @@ var init_checks = __esm({
|
|
19643
19681
|
}
|
19644
19682
|
});
|
19645
19683
|
|
19646
|
-
// ../
|
19684
|
+
// ../drizzle-orm/dist/pg-core/columns/int.common.js
|
19647
19685
|
var _a44, _b17, PgIntColumnBaseBuilder;
|
19648
19686
|
var init_int_common = __esm({
|
19649
|
-
"../
|
19687
|
+
"../drizzle-orm/dist/pg-core/columns/int.common.js"() {
|
19650
19688
|
"use strict";
|
19651
19689
|
init_entity();
|
19652
19690
|
init_common2();
|
@@ -19690,10 +19728,10 @@ var init_int_common = __esm({
|
|
19690
19728
|
}
|
19691
19729
|
});
|
19692
19730
|
|
19693
|
-
// ../
|
19731
|
+
// ../drizzle-orm/dist/pg-core/columns/bigint.js
|
19694
19732
|
var _a45, _b18, PgBigInt53Builder, _a46, _b19, PgBigInt53, _a47, _b20, PgBigInt64Builder, _a48, _b21, PgBigInt64;
|
19695
19733
|
var init_bigint = __esm({
|
19696
|
-
"../
|
19734
|
+
"../drizzle-orm/dist/pg-core/columns/bigint.js"() {
|
19697
19735
|
"use strict";
|
19698
19736
|
init_entity();
|
19699
19737
|
init_common2();
|
@@ -19746,10 +19784,10 @@ var init_bigint = __esm({
|
|
19746
19784
|
}
|
19747
19785
|
});
|
19748
19786
|
|
19749
|
-
// ../
|
19787
|
+
// ../drizzle-orm/dist/pg-core/columns/bigserial.js
|
19750
19788
|
var _a49, _b22, PgBigSerial53Builder, _a50, _b23, PgBigSerial53, _a51, _b24, PgBigSerial64Builder, _a52, _b25, PgBigSerial64;
|
19751
19789
|
var init_bigserial = __esm({
|
19752
|
-
"../
|
19790
|
+
"../drizzle-orm/dist/pg-core/columns/bigserial.js"() {
|
19753
19791
|
"use strict";
|
19754
19792
|
init_entity();
|
19755
19793
|
init_common2();
|
@@ -19807,10 +19845,10 @@ var init_bigserial = __esm({
|
|
19807
19845
|
}
|
19808
19846
|
});
|
19809
19847
|
|
19810
|
-
// ../
|
19848
|
+
// ../drizzle-orm/dist/pg-core/columns/boolean.js
|
19811
19849
|
var _a53, _b26, PgBooleanBuilder, _a54, _b27, PgBoolean;
|
19812
19850
|
var init_boolean = __esm({
|
19813
|
-
"../
|
19851
|
+
"../drizzle-orm/dist/pg-core/columns/boolean.js"() {
|
19814
19852
|
"use strict";
|
19815
19853
|
init_entity();
|
19816
19854
|
init_common2();
|
@@ -19833,10 +19871,10 @@ var init_boolean = __esm({
|
|
19833
19871
|
}
|
19834
19872
|
});
|
19835
19873
|
|
19836
|
-
// ../
|
19874
|
+
// ../drizzle-orm/dist/pg-core/columns/char.js
|
19837
19875
|
var _a55, _b28, PgCharBuilder, _a56, _b29, PgChar;
|
19838
19876
|
var init_char = __esm({
|
19839
|
-
"../
|
19877
|
+
"../drizzle-orm/dist/pg-core/columns/char.js"() {
|
19840
19878
|
"use strict";
|
19841
19879
|
init_entity();
|
19842
19880
|
init_common2();
|
@@ -19866,10 +19904,10 @@ var init_char = __esm({
|
|
19866
19904
|
}
|
19867
19905
|
});
|
19868
19906
|
|
19869
|
-
// ../
|
19907
|
+
// ../drizzle-orm/dist/pg-core/columns/cidr.js
|
19870
19908
|
var _a57, _b30, PgCidrBuilder, _a58, _b31, PgCidr;
|
19871
19909
|
var init_cidr = __esm({
|
19872
|
-
"../
|
19910
|
+
"../drizzle-orm/dist/pg-core/columns/cidr.js"() {
|
19873
19911
|
"use strict";
|
19874
19912
|
init_entity();
|
19875
19913
|
init_common2();
|
@@ -19892,10 +19930,10 @@ var init_cidr = __esm({
|
|
19892
19930
|
}
|
19893
19931
|
});
|
19894
19932
|
|
19895
|
-
// ../
|
19933
|
+
// ../drizzle-orm/dist/pg-core/columns/custom.js
|
19896
19934
|
var _a59, _b32, PgCustomColumnBuilder, _a60, _b33, PgCustomColumn;
|
19897
19935
|
var init_custom = __esm({
|
19898
|
-
"../
|
19936
|
+
"../drizzle-orm/dist/pg-core/columns/custom.js"() {
|
19899
19937
|
"use strict";
|
19900
19938
|
init_entity();
|
19901
19939
|
init_common2();
|
@@ -19938,10 +19976,10 @@ var init_custom = __esm({
|
|
19938
19976
|
}
|
19939
19977
|
});
|
19940
19978
|
|
19941
|
-
// ../
|
19979
|
+
// ../drizzle-orm/dist/pg-core/columns/date.common.js
|
19942
19980
|
var _a61, _b34, PgDateColumnBaseBuilder;
|
19943
19981
|
var init_date_common = __esm({
|
19944
|
-
"../
|
19982
|
+
"../drizzle-orm/dist/pg-core/columns/date.common.js"() {
|
19945
19983
|
"use strict";
|
19946
19984
|
init_entity();
|
19947
19985
|
init_sql();
|
@@ -19955,10 +19993,10 @@ var init_date_common = __esm({
|
|
19955
19993
|
}
|
19956
19994
|
});
|
19957
19995
|
|
19958
|
-
// ../
|
19996
|
+
// ../drizzle-orm/dist/pg-core/columns/date.js
|
19959
19997
|
var _a62, _b35, PgDateBuilder, _a63, _b36, PgDate, _a64, _b37, PgDateStringBuilder, _a65, _b38, PgDateString;
|
19960
19998
|
var init_date = __esm({
|
19961
|
-
"../
|
19999
|
+
"../drizzle-orm/dist/pg-core/columns/date.js"() {
|
19962
20000
|
"use strict";
|
19963
20001
|
init_entity();
|
19964
20002
|
init_common2();
|
@@ -20007,10 +20045,10 @@ var init_date = __esm({
|
|
20007
20045
|
}
|
20008
20046
|
});
|
20009
20047
|
|
20010
|
-
// ../
|
20048
|
+
// ../drizzle-orm/dist/pg-core/columns/double-precision.js
|
20011
20049
|
var _a66, _b39, PgDoublePrecisionBuilder, _a67, _b40, PgDoublePrecision;
|
20012
20050
|
var init_double_precision = __esm({
|
20013
|
-
"../
|
20051
|
+
"../drizzle-orm/dist/pg-core/columns/double-precision.js"() {
|
20014
20052
|
"use strict";
|
20015
20053
|
init_entity();
|
20016
20054
|
init_common2();
|
@@ -20042,10 +20080,10 @@ var init_double_precision = __esm({
|
|
20042
20080
|
}
|
20043
20081
|
});
|
20044
20082
|
|
20045
|
-
// ../
|
20083
|
+
// ../drizzle-orm/dist/pg-core/columns/inet.js
|
20046
20084
|
var _a68, _b41, PgInetBuilder, _a69, _b42, PgInet;
|
20047
20085
|
var init_inet = __esm({
|
20048
|
-
"../
|
20086
|
+
"../drizzle-orm/dist/pg-core/columns/inet.js"() {
|
20049
20087
|
"use strict";
|
20050
20088
|
init_entity();
|
20051
20089
|
init_common2();
|
@@ -20068,10 +20106,10 @@ var init_inet = __esm({
|
|
20068
20106
|
}
|
20069
20107
|
});
|
20070
20108
|
|
20071
|
-
// ../
|
20109
|
+
// ../drizzle-orm/dist/pg-core/columns/integer.js
|
20072
20110
|
var _a70, _b43, PgIntegerBuilder, _a71, _b44, PgInteger;
|
20073
20111
|
var init_integer = __esm({
|
20074
|
-
"../
|
20112
|
+
"../drizzle-orm/dist/pg-core/columns/integer.js"() {
|
20075
20113
|
"use strict";
|
20076
20114
|
init_entity();
|
20077
20115
|
init_common2();
|
@@ -20101,10 +20139,10 @@ var init_integer = __esm({
|
|
20101
20139
|
}
|
20102
20140
|
});
|
20103
20141
|
|
20104
|
-
// ../
|
20142
|
+
// ../drizzle-orm/dist/pg-core/columns/interval.js
|
20105
20143
|
var _a72, _b45, PgIntervalBuilder, _a73, _b46, PgInterval;
|
20106
20144
|
var init_interval = __esm({
|
20107
|
-
"../
|
20145
|
+
"../drizzle-orm/dist/pg-core/columns/interval.js"() {
|
20108
20146
|
"use strict";
|
20109
20147
|
init_entity();
|
20110
20148
|
init_common2();
|
@@ -20135,10 +20173,10 @@ var init_interval = __esm({
|
|
20135
20173
|
}
|
20136
20174
|
});
|
20137
20175
|
|
20138
|
-
// ../
|
20176
|
+
// ../drizzle-orm/dist/pg-core/columns/json.js
|
20139
20177
|
var _a74, _b47, PgJsonBuilder, _a75, _b48, PgJson;
|
20140
20178
|
var init_json = __esm({
|
20141
|
-
"../
|
20179
|
+
"../drizzle-orm/dist/pg-core/columns/json.js"() {
|
20142
20180
|
"use strict";
|
20143
20181
|
init_entity();
|
20144
20182
|
init_common2();
|
@@ -20177,10 +20215,10 @@ var init_json = __esm({
|
|
20177
20215
|
}
|
20178
20216
|
});
|
20179
20217
|
|
20180
|
-
// ../
|
20218
|
+
// ../drizzle-orm/dist/pg-core/columns/jsonb.js
|
20181
20219
|
var _a76, _b49, PgJsonbBuilder, _a77, _b50, PgJsonb;
|
20182
20220
|
var init_jsonb = __esm({
|
20183
|
-
"../
|
20221
|
+
"../drizzle-orm/dist/pg-core/columns/jsonb.js"() {
|
20184
20222
|
"use strict";
|
20185
20223
|
init_entity();
|
20186
20224
|
init_common2();
|
@@ -20219,10 +20257,10 @@ var init_jsonb = __esm({
|
|
20219
20257
|
}
|
20220
20258
|
});
|
20221
20259
|
|
20222
|
-
// ../
|
20260
|
+
// ../drizzle-orm/dist/pg-core/columns/line.js
|
20223
20261
|
var _a78, _b51, PgLineBuilder, _a79, _b52, PgLineTuple, _a80, _b53, PgLineABCBuilder, _a81, _b54, PgLineABC;
|
20224
20262
|
var init_line = __esm({
|
20225
|
-
"../
|
20263
|
+
"../drizzle-orm/dist/pg-core/columns/line.js"() {
|
20226
20264
|
"use strict";
|
20227
20265
|
init_entity();
|
20228
20266
|
init_common2();
|
@@ -20281,10 +20319,10 @@ var init_line = __esm({
|
|
20281
20319
|
}
|
20282
20320
|
});
|
20283
20321
|
|
20284
|
-
// ../
|
20322
|
+
// ../drizzle-orm/dist/pg-core/columns/macaddr.js
|
20285
20323
|
var _a82, _b55, PgMacaddrBuilder, _a83, _b56, PgMacaddr;
|
20286
20324
|
var init_macaddr = __esm({
|
20287
|
-
"../
|
20325
|
+
"../drizzle-orm/dist/pg-core/columns/macaddr.js"() {
|
20288
20326
|
"use strict";
|
20289
20327
|
init_entity();
|
20290
20328
|
init_common2();
|
@@ -20307,10 +20345,10 @@ var init_macaddr = __esm({
|
|
20307
20345
|
}
|
20308
20346
|
});
|
20309
20347
|
|
20310
|
-
// ../
|
20348
|
+
// ../drizzle-orm/dist/pg-core/columns/macaddr8.js
|
20311
20349
|
var _a84, _b57, PgMacaddr8Builder, _a85, _b58, PgMacaddr8;
|
20312
20350
|
var init_macaddr8 = __esm({
|
20313
|
-
"../
|
20351
|
+
"../drizzle-orm/dist/pg-core/columns/macaddr8.js"() {
|
20314
20352
|
"use strict";
|
20315
20353
|
init_entity();
|
20316
20354
|
init_common2();
|
@@ -20333,10 +20371,10 @@ var init_macaddr8 = __esm({
|
|
20333
20371
|
}
|
20334
20372
|
});
|
20335
20373
|
|
20336
|
-
// ../
|
20374
|
+
// ../drizzle-orm/dist/pg-core/columns/numeric.js
|
20337
20375
|
var _a86, _b59, PgNumericBuilder, _a87, _b60, PgNumeric;
|
20338
20376
|
var init_numeric = __esm({
|
20339
|
-
"../
|
20377
|
+
"../drizzle-orm/dist/pg-core/columns/numeric.js"() {
|
20340
20378
|
"use strict";
|
20341
20379
|
init_entity();
|
20342
20380
|
init_common2();
|
@@ -20374,10 +20412,10 @@ var init_numeric = __esm({
|
|
20374
20412
|
}
|
20375
20413
|
});
|
20376
20414
|
|
20377
|
-
// ../
|
20415
|
+
// ../drizzle-orm/dist/pg-core/columns/point.js
|
20378
20416
|
var _a88, _b61, PgPointTupleBuilder, _a89, _b62, PgPointTuple, _a90, _b63, PgPointObjectBuilder, _a91, _b64, PgPointObject;
|
20379
20417
|
var init_point = __esm({
|
20380
|
-
"../
|
20418
|
+
"../drizzle-orm/dist/pg-core/columns/point.js"() {
|
20381
20419
|
"use strict";
|
20382
20420
|
init_entity();
|
20383
20421
|
init_common2();
|
@@ -20442,7 +20480,7 @@ var init_point = __esm({
|
|
20442
20480
|
}
|
20443
20481
|
});
|
20444
20482
|
|
20445
|
-
// ../
|
20483
|
+
// ../drizzle-orm/dist/pg-core/columns/postgis_extension/utils.js
|
20446
20484
|
function hexToBytes(hex) {
|
20447
20485
|
const bytes = [];
|
20448
20486
|
for (let c = 0; c < hex.length; c += 2) {
|
@@ -20481,15 +20519,15 @@ function parseEWKB(hex) {
|
|
20481
20519
|
throw new Error("Unsupported geometry type");
|
20482
20520
|
}
|
20483
20521
|
var init_utils3 = __esm({
|
20484
|
-
"../
|
20522
|
+
"../drizzle-orm/dist/pg-core/columns/postgis_extension/utils.js"() {
|
20485
20523
|
"use strict";
|
20486
20524
|
}
|
20487
20525
|
});
|
20488
20526
|
|
20489
|
-
// ../
|
20527
|
+
// ../drizzle-orm/dist/pg-core/columns/postgis_extension/geometry.js
|
20490
20528
|
var _a92, _b65, PgGeometryBuilder, _a93, _b66, PgGeometry, _a94, _b67, PgGeometryObjectBuilder, _a95, _b68, PgGeometryObject;
|
20491
20529
|
var init_geometry = __esm({
|
20492
|
-
"../
|
20530
|
+
"../drizzle-orm/dist/pg-core/columns/postgis_extension/geometry.js"() {
|
20493
20531
|
"use strict";
|
20494
20532
|
init_entity();
|
20495
20533
|
init_common2();
|
@@ -20548,10 +20586,10 @@ var init_geometry = __esm({
|
|
20548
20586
|
}
|
20549
20587
|
});
|
20550
20588
|
|
20551
|
-
// ../
|
20589
|
+
// ../drizzle-orm/dist/pg-core/columns/real.js
|
20552
20590
|
var _a96, _b69, PgRealBuilder, _a97, _b70, PgReal;
|
20553
20591
|
var init_real = __esm({
|
20554
|
-
"../
|
20592
|
+
"../drizzle-orm/dist/pg-core/columns/real.js"() {
|
20555
20593
|
"use strict";
|
20556
20594
|
init_entity();
|
20557
20595
|
init_common2();
|
@@ -20584,10 +20622,10 @@ var init_real = __esm({
|
|
20584
20622
|
}
|
20585
20623
|
});
|
20586
20624
|
|
20587
|
-
// ../
|
20625
|
+
// ../drizzle-orm/dist/pg-core/columns/serial.js
|
20588
20626
|
var _a98, _b71, PgSerialBuilder, _a99, _b72, PgSerial;
|
20589
20627
|
var init_serial = __esm({
|
20590
|
-
"../
|
20628
|
+
"../drizzle-orm/dist/pg-core/columns/serial.js"() {
|
20591
20629
|
"use strict";
|
20592
20630
|
init_entity();
|
20593
20631
|
init_common2();
|
@@ -20612,10 +20650,10 @@ var init_serial = __esm({
|
|
20612
20650
|
}
|
20613
20651
|
});
|
20614
20652
|
|
20615
|
-
// ../
|
20653
|
+
// ../drizzle-orm/dist/pg-core/columns/smallint.js
|
20616
20654
|
var _a100, _b73, PgSmallIntBuilder, _a101, _b74, PgSmallInt;
|
20617
20655
|
var init_smallint = __esm({
|
20618
|
-
"../
|
20656
|
+
"../drizzle-orm/dist/pg-core/columns/smallint.js"() {
|
20619
20657
|
"use strict";
|
20620
20658
|
init_entity();
|
20621
20659
|
init_common2();
|
@@ -20648,10 +20686,10 @@ var init_smallint = __esm({
|
|
20648
20686
|
}
|
20649
20687
|
});
|
20650
20688
|
|
20651
|
-
// ../
|
20689
|
+
// ../drizzle-orm/dist/pg-core/columns/smallserial.js
|
20652
20690
|
var _a102, _b75, PgSmallSerialBuilder, _a103, _b76, PgSmallSerial;
|
20653
20691
|
var init_smallserial = __esm({
|
20654
|
-
"../
|
20692
|
+
"../drizzle-orm/dist/pg-core/columns/smallserial.js"() {
|
20655
20693
|
"use strict";
|
20656
20694
|
init_entity();
|
20657
20695
|
init_common2();
|
@@ -20679,10 +20717,10 @@ var init_smallserial = __esm({
|
|
20679
20717
|
}
|
20680
20718
|
});
|
20681
20719
|
|
20682
|
-
// ../
|
20720
|
+
// ../drizzle-orm/dist/pg-core/columns/text.js
|
20683
20721
|
var _a104, _b77, PgTextBuilder, _a105, _b78, PgText;
|
20684
20722
|
var init_text = __esm({
|
20685
|
-
"../
|
20723
|
+
"../drizzle-orm/dist/pg-core/columns/text.js"() {
|
20686
20724
|
"use strict";
|
20687
20725
|
init_entity();
|
20688
20726
|
init_common2();
|
@@ -20710,10 +20748,10 @@ var init_text = __esm({
|
|
20710
20748
|
}
|
20711
20749
|
});
|
20712
20750
|
|
20713
|
-
// ../
|
20751
|
+
// ../drizzle-orm/dist/pg-core/columns/time.js
|
20714
20752
|
var _a106, _b79, PgTimeBuilder, _a107, _b80, PgTime;
|
20715
20753
|
var init_time = __esm({
|
20716
|
-
"../
|
20754
|
+
"../drizzle-orm/dist/pg-core/columns/time.js"() {
|
20717
20755
|
"use strict";
|
20718
20756
|
init_entity();
|
20719
20757
|
init_common2();
|
@@ -20749,10 +20787,10 @@ var init_time = __esm({
|
|
20749
20787
|
}
|
20750
20788
|
});
|
20751
20789
|
|
20752
|
-
// ../
|
20790
|
+
// ../drizzle-orm/dist/pg-core/columns/timestamp.js
|
20753
20791
|
var _a108, _b81, PgTimestampBuilder, _a109, _b82, PgTimestamp, _a110, _b83, PgTimestampStringBuilder, _a111, _b84, PgTimestampString;
|
20754
20792
|
var init_timestamp = __esm({
|
20755
|
-
"../
|
20793
|
+
"../drizzle-orm/dist/pg-core/columns/timestamp.js"() {
|
20756
20794
|
"use strict";
|
20757
20795
|
init_entity();
|
20758
20796
|
init_common2();
|
@@ -20821,10 +20859,10 @@ var init_timestamp = __esm({
|
|
20821
20859
|
}
|
20822
20860
|
});
|
20823
20861
|
|
20824
|
-
// ../
|
20862
|
+
// ../drizzle-orm/dist/pg-core/columns/uuid.js
|
20825
20863
|
var _a112, _b85, PgUUIDBuilder, _a113, _b86, PgUUID;
|
20826
20864
|
var init_uuid = __esm({
|
20827
|
-
"../
|
20865
|
+
"../drizzle-orm/dist/pg-core/columns/uuid.js"() {
|
20828
20866
|
"use strict";
|
20829
20867
|
init_entity();
|
20830
20868
|
init_sql();
|
@@ -20854,10 +20892,10 @@ var init_uuid = __esm({
|
|
20854
20892
|
}
|
20855
20893
|
});
|
20856
20894
|
|
20857
|
-
// ../
|
20895
|
+
// ../drizzle-orm/dist/pg-core/columns/varchar.js
|
20858
20896
|
var _a114, _b87, PgVarcharBuilder, _a115, _b88, PgVarchar;
|
20859
20897
|
var init_varchar = __esm({
|
20860
|
-
"../
|
20898
|
+
"../drizzle-orm/dist/pg-core/columns/varchar.js"() {
|
20861
20899
|
"use strict";
|
20862
20900
|
init_entity();
|
20863
20901
|
init_common2();
|
@@ -20887,10 +20925,10 @@ var init_varchar = __esm({
|
|
20887
20925
|
}
|
20888
20926
|
});
|
20889
20927
|
|
20890
|
-
// ../
|
20928
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/bit.js
|
20891
20929
|
var _a116, _b89, PgBinaryVectorBuilder, _a117, _b90, PgBinaryVector;
|
20892
20930
|
var init_bit = __esm({
|
20893
|
-
"../
|
20931
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/bit.js"() {
|
20894
20932
|
"use strict";
|
20895
20933
|
init_entity();
|
20896
20934
|
init_common2();
|
@@ -20921,10 +20959,10 @@ var init_bit = __esm({
|
|
20921
20959
|
}
|
20922
20960
|
});
|
20923
20961
|
|
20924
|
-
// ../
|
20962
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/halfvec.js
|
20925
20963
|
var _a118, _b91, PgHalfVectorBuilder, _a119, _b92, PgHalfVector;
|
20926
20964
|
var init_halfvec = __esm({
|
20927
|
-
"../
|
20965
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/halfvec.js"() {
|
20928
20966
|
"use strict";
|
20929
20967
|
init_entity();
|
20930
20968
|
init_common2();
|
@@ -20961,10 +20999,10 @@ var init_halfvec = __esm({
|
|
20961
20999
|
}
|
20962
21000
|
});
|
20963
21001
|
|
20964
|
-
// ../
|
21002
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/sparsevec.js
|
20965
21003
|
var _a120, _b93, PgSparseVectorBuilder, _a121, _b94, PgSparseVector;
|
20966
21004
|
var init_sparsevec = __esm({
|
20967
|
-
"../
|
21005
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/sparsevec.js"() {
|
20968
21006
|
"use strict";
|
20969
21007
|
init_entity();
|
20970
21008
|
init_common2();
|
@@ -20995,10 +21033,10 @@ var init_sparsevec = __esm({
|
|
20995
21033
|
}
|
20996
21034
|
});
|
20997
21035
|
|
20998
|
-
// ../
|
21036
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/vector.js
|
20999
21037
|
var _a122, _b95, PgVectorBuilder, _a123, _b96, PgVector;
|
21000
21038
|
var init_vector2 = __esm({
|
21001
|
-
"../
|
21039
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/vector.js"() {
|
21002
21040
|
"use strict";
|
21003
21041
|
init_entity();
|
21004
21042
|
init_common2();
|
@@ -21032,9 +21070,9 @@ var init_vector2 = __esm({
|
|
21032
21070
|
}
|
21033
21071
|
});
|
21034
21072
|
|
21035
|
-
// ../
|
21073
|
+
// ../drizzle-orm/dist/pg-core/columns/index.js
|
21036
21074
|
var init_columns = __esm({
|
21037
|
-
"../
|
21075
|
+
"../drizzle-orm/dist/pg-core/columns/index.js"() {
|
21038
21076
|
"use strict";
|
21039
21077
|
init_bigint();
|
21040
21078
|
init_bigserial();
|
@@ -21073,10 +21111,10 @@ var init_columns = __esm({
|
|
21073
21111
|
}
|
21074
21112
|
});
|
21075
21113
|
|
21076
|
-
// ../
|
21114
|
+
// ../drizzle-orm/dist/pg-core/query-builders/delete.js
|
21077
21115
|
var _a124, _b97, PgDeleteBase;
|
21078
21116
|
var init_delete = __esm({
|
21079
|
-
"../
|
21117
|
+
"../drizzle-orm/dist/pg-core/query-builders/delete.js"() {
|
21080
21118
|
"use strict";
|
21081
21119
|
init_entity();
|
21082
21120
|
init_query_promise();
|
@@ -21129,7 +21167,7 @@ var init_delete = __esm({
|
|
21129
21167
|
this.config.where = where;
|
21130
21168
|
return this;
|
21131
21169
|
}
|
21132
|
-
returning(fields = this.config.table[
|
21170
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
21133
21171
|
this.config.returning = orderSelectedFields(fields);
|
21134
21172
|
return this;
|
21135
21173
|
}
|
@@ -21158,10 +21196,10 @@ var init_delete = __esm({
|
|
21158
21196
|
}
|
21159
21197
|
});
|
21160
21198
|
|
21161
|
-
// ../
|
21199
|
+
// ../drizzle-orm/dist/pg-core/query-builders/insert.js
|
21162
21200
|
var _a125, PgInsertBuilder, _a126, _b98, PgInsertBase;
|
21163
21201
|
var init_insert = __esm({
|
21164
|
-
"../
|
21202
|
+
"../drizzle-orm/dist/pg-core/query-builders/insert.js"() {
|
21165
21203
|
"use strict";
|
21166
21204
|
init_entity();
|
21167
21205
|
init_query_promise();
|
@@ -21184,7 +21222,7 @@ var init_insert = __esm({
|
|
21184
21222
|
}
|
21185
21223
|
const mappedValues = values.map((entry) => {
|
21186
21224
|
const result = {};
|
21187
|
-
const cols = this.table[
|
21225
|
+
const cols = this.table[Table2.Symbol.Columns];
|
21188
21226
|
for (const colKey of Object.keys(entry)) {
|
21189
21227
|
const colValue = entry[colKey];
|
21190
21228
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -21208,7 +21246,7 @@ var init_insert = __esm({
|
|
21208
21246
|
this.dialect = dialect7;
|
21209
21247
|
this.config = { table: table4, values, withList };
|
21210
21248
|
}
|
21211
|
-
returning(fields = this.config.table[
|
21249
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
21212
21250
|
this.config.returning = orderSelectedFields(fields);
|
21213
21251
|
return this;
|
21214
21252
|
}
|
@@ -21314,10 +21352,10 @@ var init_insert = __esm({
|
|
21314
21352
|
}
|
21315
21353
|
});
|
21316
21354
|
|
21317
|
-
// ../
|
21355
|
+
// ../drizzle-orm/dist/pg-core/view-base.js
|
21318
21356
|
var _a127, _b99, PgViewBase;
|
21319
21357
|
var init_view_base = __esm({
|
21320
|
-
"../
|
21358
|
+
"../drizzle-orm/dist/pg-core/view-base.js"() {
|
21321
21359
|
"use strict";
|
21322
21360
|
init_entity();
|
21323
21361
|
init_sql();
|
@@ -21327,10 +21365,10 @@ var init_view_base = __esm({
|
|
21327
21365
|
}
|
21328
21366
|
});
|
21329
21367
|
|
21330
|
-
// ../
|
21368
|
+
// ../drizzle-orm/dist/pg-core/dialect.js
|
21331
21369
|
var _a128, PgDialect;
|
21332
21370
|
var init_dialect = __esm({
|
21333
|
-
"../
|
21371
|
+
"../drizzle-orm/dist/pg-core/dialect.js"() {
|
21334
21372
|
"use strict";
|
21335
21373
|
init_alias();
|
21336
21374
|
init_column();
|
@@ -21406,7 +21444,7 @@ var init_dialect = __esm({
|
|
21406
21444
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
21407
21445
|
}
|
21408
21446
|
buildUpdateSet(table4, set) {
|
21409
|
-
const tableColumns = table4[
|
21447
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
21410
21448
|
const columnNames = Object.keys(tableColumns).filter(
|
21411
21449
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
21412
21450
|
);
|
@@ -21464,7 +21502,7 @@ var init_dialect = __esm({
|
|
21464
21502
|
if (is(field, SQL.Aliased)) {
|
21465
21503
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
21466
21504
|
}
|
21467
|
-
} else if (is(field,
|
21505
|
+
} else if (is(field, Column2)) {
|
21468
21506
|
if (isSingleTable) {
|
21469
21507
|
chunk.push(sql.identifier(field.name));
|
21470
21508
|
} else {
|
@@ -21496,8 +21534,8 @@ var init_dialect = __esm({
|
|
21496
21534
|
}) {
|
21497
21535
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
21498
21536
|
for (const f of fieldsList) {
|
21499
|
-
if (is(f.field,
|
21500
|
-
({ alias }) => alias === (table22[
|
21537
|
+
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(
|
21538
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
21501
21539
|
))(f.field.table)) {
|
21502
21540
|
const tableName = getTableName(f.field.table);
|
21503
21541
|
throw new Error(
|
@@ -21513,12 +21551,12 @@ var init_dialect = __esm({
|
|
21513
21551
|
}
|
21514
21552
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
21515
21553
|
const tableSql = (() => {
|
21516
|
-
if (is(table4,
|
21517
|
-
let fullName = sql`${sql.identifier(table4[
|
21518
|
-
if (table4[
|
21519
|
-
fullName = sql`${sql.identifier(table4[
|
21554
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
21555
|
+
let fullName = sql`${sql.identifier(table4[Table2.Symbol.OriginalName])}`;
|
21556
|
+
if (table4[Table2.Symbol.Schema]) {
|
21557
|
+
fullName = sql`${sql.identifier(table4[Table2.Symbol.Schema])}.${fullName}`;
|
21520
21558
|
}
|
21521
|
-
return sql`${fullName} ${sql.identifier(table4[
|
21559
|
+
return sql`${fullName} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
21522
21560
|
}
|
21523
21561
|
return table4;
|
21524
21562
|
})();
|
@@ -21639,7 +21677,7 @@ var init_dialect = __esm({
|
|
21639
21677
|
}
|
21640
21678
|
buildInsertQuery({ table: table4, values, onConflict, returning, withList }) {
|
21641
21679
|
const valuesSqlList = [];
|
21642
|
-
const columns = table4[
|
21680
|
+
const columns = table4[Table2.Symbol.Columns];
|
21643
21681
|
const colEntries = Object.entries(columns).filter(([_2, col]) => !col.shouldDisableInsert());
|
21644
21682
|
const insertOrder = colEntries.map(([, column4]) => sql.identifier(column4.name));
|
21645
21683
|
for (const [valueIndex, value] of values.entries()) {
|
@@ -22260,7 +22298,7 @@ var init_dialect = __esm({
|
|
22260
22298
|
selection.push({
|
22261
22299
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
22262
22300
|
tsKey,
|
22263
|
-
field: is(value,
|
22301
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
22264
22302
|
relationTableTsKey: void 0,
|
22265
22303
|
isJson: false,
|
22266
22304
|
selection: []
|
@@ -22271,7 +22309,7 @@ var init_dialect = __esm({
|
|
22271
22309
|
orderByOrig = [orderByOrig];
|
22272
22310
|
}
|
22273
22311
|
orderBy = orderByOrig.map((orderByValue) => {
|
22274
|
-
if (is(orderByValue,
|
22312
|
+
if (is(orderByValue, Column2)) {
|
22275
22313
|
return aliasedTableColumn(orderByValue, tableAlias);
|
22276
22314
|
}
|
22277
22315
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -22374,7 +22412,7 @@ var init_dialect = __esm({
|
|
22374
22412
|
fields: {},
|
22375
22413
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
22376
22414
|
path: [],
|
22377
|
-
field: is(field2,
|
22415
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
22378
22416
|
})),
|
22379
22417
|
joins,
|
22380
22418
|
where,
|
@@ -22389,7 +22427,7 @@ var init_dialect = __esm({
|
|
22389
22427
|
fields: {},
|
22390
22428
|
fieldsFlat: selection.map(({ field }) => ({
|
22391
22429
|
path: [],
|
22392
|
-
field: is(field,
|
22430
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
22393
22431
|
})),
|
22394
22432
|
joins,
|
22395
22433
|
where,
|
@@ -22410,10 +22448,10 @@ var init_dialect = __esm({
|
|
22410
22448
|
}
|
22411
22449
|
});
|
22412
22450
|
|
22413
|
-
// ../
|
22451
|
+
// ../drizzle-orm/dist/selection-proxy.js
|
22414
22452
|
var _a129, _SelectionProxyHandler, SelectionProxyHandler;
|
22415
22453
|
var init_selection_proxy = __esm({
|
22416
|
-
"../
|
22454
|
+
"../drizzle-orm/dist/selection-proxy.js"() {
|
22417
22455
|
"use strict";
|
22418
22456
|
init_alias();
|
22419
22457
|
init_column();
|
@@ -22467,7 +22505,7 @@ var init_selection_proxy = __esm({
|
|
22467
22505
|
`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.`
|
22468
22506
|
);
|
22469
22507
|
}
|
22470
|
-
if (is(value,
|
22508
|
+
if (is(value, Column2)) {
|
22471
22509
|
if (this.config.alias) {
|
22472
22510
|
return new Proxy(
|
22473
22511
|
value,
|
@@ -22492,10 +22530,10 @@ var init_selection_proxy = __esm({
|
|
22492
22530
|
}
|
22493
22531
|
});
|
22494
22532
|
|
22495
|
-
// ../
|
22533
|
+
// ../drizzle-orm/dist/query-builders/query-builder.js
|
22496
22534
|
var _a130, TypedQueryBuilder;
|
22497
22535
|
var init_query_builder = __esm({
|
22498
|
-
"../
|
22536
|
+
"../drizzle-orm/dist/query-builders/query-builder.js"() {
|
22499
22537
|
"use strict";
|
22500
22538
|
init_entity();
|
22501
22539
|
_a130 = entityKind;
|
@@ -22509,7 +22547,7 @@ var init_query_builder = __esm({
|
|
22509
22547
|
}
|
22510
22548
|
});
|
22511
22549
|
|
22512
|
-
// ../
|
22550
|
+
// ../drizzle-orm/dist/pg-core/query-builders/select.js
|
22513
22551
|
function createSetOperator(type, isAll) {
|
22514
22552
|
return (leftSelect, rightSelect, ...restSelects) => {
|
22515
22553
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -22529,7 +22567,7 @@ function createSetOperator(type, isAll) {
|
|
22529
22567
|
}
|
22530
22568
|
var _a131, PgSelectBuilder, _a132, _b100, PgSelectQueryBuilderBase, _a133, _b101, PgSelectBase, getPgSetOperators, union, unionAll, intersect, intersectAll, except, exceptAll;
|
22531
22569
|
var init_select2 = __esm({
|
22532
|
-
"../
|
22570
|
+
"../drizzle-orm/dist/pg-core/query-builders/select.js"() {
|
22533
22571
|
"use strict";
|
22534
22572
|
init_entity();
|
22535
22573
|
init_view_base();
|
@@ -22931,7 +22969,7 @@ var init_select2 = __esm({
|
|
22931
22969
|
};
|
22932
22970
|
}
|
22933
22971
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
22934
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
22972
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
22935
22973
|
this.config.fields[tableName] = selection;
|
22936
22974
|
}
|
22937
22975
|
}
|
@@ -23246,10 +23284,10 @@ var init_select2 = __esm({
|
|
23246
23284
|
}
|
23247
23285
|
});
|
23248
23286
|
|
23249
|
-
// ../
|
23287
|
+
// ../drizzle-orm/dist/pg-core/query-builders/query-builder.js
|
23250
23288
|
var _a134, QueryBuilder;
|
23251
23289
|
var init_query_builder2 = __esm({
|
23252
|
-
"../
|
23290
|
+
"../drizzle-orm/dist/pg-core/query-builders/query-builder.js"() {
|
23253
23291
|
"use strict";
|
23254
23292
|
init_entity();
|
23255
23293
|
init_dialect();
|
@@ -23338,10 +23376,10 @@ var init_query_builder2 = __esm({
|
|
23338
23376
|
}
|
23339
23377
|
});
|
23340
23378
|
|
23341
|
-
// ../
|
23379
|
+
// ../drizzle-orm/dist/pg-core/query-builders/refresh-materialized-view.js
|
23342
23380
|
var _a135, _b102, PgRefreshMaterializedView;
|
23343
23381
|
var init_refresh_materialized_view = __esm({
|
23344
|
-
"../
|
23382
|
+
"../drizzle-orm/dist/pg-core/query-builders/refresh-materialized-view.js"() {
|
23345
23383
|
"use strict";
|
23346
23384
|
init_entity();
|
23347
23385
|
init_query_promise();
|
@@ -23395,17 +23433,17 @@ var init_refresh_materialized_view = __esm({
|
|
23395
23433
|
}
|
23396
23434
|
});
|
23397
23435
|
|
23398
|
-
// ../
|
23436
|
+
// ../drizzle-orm/dist/pg-core/query-builders/select.types.js
|
23399
23437
|
var init_select_types = __esm({
|
23400
|
-
"../
|
23438
|
+
"../drizzle-orm/dist/pg-core/query-builders/select.types.js"() {
|
23401
23439
|
"use strict";
|
23402
23440
|
}
|
23403
23441
|
});
|
23404
23442
|
|
23405
|
-
// ../
|
23443
|
+
// ../drizzle-orm/dist/pg-core/query-builders/update.js
|
23406
23444
|
var _a136, PgUpdateBuilder, _a137, _b103, PgUpdateBase;
|
23407
23445
|
var init_update = __esm({
|
23408
|
-
"../
|
23446
|
+
"../drizzle-orm/dist/pg-core/query-builders/update.js"() {
|
23409
23447
|
"use strict";
|
23410
23448
|
init_entity();
|
23411
23449
|
init_query_promise();
|
@@ -23478,7 +23516,7 @@ var init_update = __esm({
|
|
23478
23516
|
this.config.where = where;
|
23479
23517
|
return this;
|
23480
23518
|
}
|
23481
|
-
returning(fields = this.config.table[
|
23519
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
23482
23520
|
this.config.returning = orderSelectedFields(fields);
|
23483
23521
|
return this;
|
23484
23522
|
}
|
@@ -23505,9 +23543,9 @@ var init_update = __esm({
|
|
23505
23543
|
}
|
23506
23544
|
});
|
23507
23545
|
|
23508
|
-
// ../
|
23546
|
+
// ../drizzle-orm/dist/pg-core/query-builders/index.js
|
23509
23547
|
var init_query_builders = __esm({
|
23510
|
-
"../
|
23548
|
+
"../drizzle-orm/dist/pg-core/query-builders/index.js"() {
|
23511
23549
|
"use strict";
|
23512
23550
|
init_delete();
|
23513
23551
|
init_insert();
|
@@ -23519,10 +23557,10 @@ var init_query_builders = __esm({
|
|
23519
23557
|
}
|
23520
23558
|
});
|
23521
23559
|
|
23522
|
-
// ../
|
23560
|
+
// ../drizzle-orm/dist/pg-core/query-builders/query.js
|
23523
23561
|
var _a138, RelationalQueryBuilder, _a139, _b104, PgRelationalQuery;
|
23524
23562
|
var init_query = __esm({
|
23525
|
-
"../
|
23563
|
+
"../drizzle-orm/dist/pg-core/query-builders/query.js"() {
|
23526
23564
|
"use strict";
|
23527
23565
|
init_entity();
|
23528
23566
|
init_query_promise();
|
@@ -23637,10 +23675,10 @@ var init_query = __esm({
|
|
23637
23675
|
}
|
23638
23676
|
});
|
23639
23677
|
|
23640
|
-
// ../
|
23678
|
+
// ../drizzle-orm/dist/pg-core/query-builders/raw.js
|
23641
23679
|
var _a140, _b105, PgRaw;
|
23642
23680
|
var init_raw = __esm({
|
23643
|
-
"../
|
23681
|
+
"../drizzle-orm/dist/pg-core/query-builders/raw.js"() {
|
23644
23682
|
"use strict";
|
23645
23683
|
init_entity();
|
23646
23684
|
init_query_promise();
|
@@ -23674,10 +23712,10 @@ var init_raw = __esm({
|
|
23674
23712
|
}
|
23675
23713
|
});
|
23676
23714
|
|
23677
|
-
// ../
|
23715
|
+
// ../drizzle-orm/dist/pg-core/db.js
|
23678
23716
|
var _a141, PgDatabase;
|
23679
23717
|
var init_db = __esm({
|
23680
|
-
"../
|
23718
|
+
"../drizzle-orm/dist/pg-core/db.js"() {
|
23681
23719
|
"use strict";
|
23682
23720
|
init_entity();
|
23683
23721
|
init_query_builders();
|
@@ -23955,10 +23993,10 @@ var init_db = __esm({
|
|
23955
23993
|
}
|
23956
23994
|
});
|
23957
23995
|
|
23958
|
-
// ../
|
23996
|
+
// ../drizzle-orm/dist/pg-core/indexes.js
|
23959
23997
|
var _a142, IndexBuilderOn, _a143, IndexBuilder, _a144, Index2;
|
23960
23998
|
var init_indexes = __esm({
|
23961
|
-
"../
|
23999
|
+
"../drizzle-orm/dist/pg-core/indexes.js"() {
|
23962
24000
|
"use strict";
|
23963
24001
|
init_sql();
|
23964
24002
|
init_entity();
|
@@ -24073,7 +24111,7 @@ var init_indexes = __esm({
|
|
24073
24111
|
}
|
24074
24112
|
});
|
24075
24113
|
|
24076
|
-
// ../
|
24114
|
+
// ../drizzle-orm/dist/pg-core/sequence.js
|
24077
24115
|
function pgSequenceWithSchema(name2, options, schema4) {
|
24078
24116
|
return new PgSequence(name2, options, schema4);
|
24079
24117
|
}
|
@@ -24082,7 +24120,7 @@ function isPgSequence(obj) {
|
|
24082
24120
|
}
|
24083
24121
|
var _a145, PgSequence;
|
24084
24122
|
var init_sequence = __esm({
|
24085
|
-
"../
|
24123
|
+
"../drizzle-orm/dist/pg-core/sequence.js"() {
|
24086
24124
|
"use strict";
|
24087
24125
|
init_entity();
|
24088
24126
|
_a145 = entityKind;
|
@@ -24097,16 +24135,16 @@ var init_sequence = __esm({
|
|
24097
24135
|
}
|
24098
24136
|
});
|
24099
24137
|
|
24100
|
-
// ../
|
24138
|
+
// ../drizzle-orm/dist/pg-core/view-common.js
|
24101
24139
|
var PgViewConfig;
|
24102
24140
|
var init_view_common2 = __esm({
|
24103
|
-
"../
|
24141
|
+
"../drizzle-orm/dist/pg-core/view-common.js"() {
|
24104
24142
|
"use strict";
|
24105
24143
|
PgViewConfig = Symbol.for("drizzle:PgViewConfig");
|
24106
24144
|
}
|
24107
24145
|
});
|
24108
24146
|
|
24109
|
-
// ../
|
24147
|
+
// ../drizzle-orm/dist/pg-core/view.js
|
24110
24148
|
function pgViewWithSchema(name2, selection, schema4) {
|
24111
24149
|
if (selection) {
|
24112
24150
|
return new ManualViewBuilder(name2, selection, schema4);
|
@@ -24121,7 +24159,7 @@ function pgMaterializedViewWithSchema(name2, selection, schema4) {
|
|
24121
24159
|
}
|
24122
24160
|
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;
|
24123
24161
|
var init_view = __esm({
|
24124
|
-
"../
|
24162
|
+
"../drizzle-orm/dist/pg-core/view.js"() {
|
24125
24163
|
"use strict";
|
24126
24164
|
init_entity();
|
24127
24165
|
init_selection_proxy();
|
@@ -24348,10 +24386,10 @@ var init_view = __esm({
|
|
24348
24386
|
}
|
24349
24387
|
});
|
24350
24388
|
|
24351
|
-
// ../
|
24352
|
-
var _a154,
|
24389
|
+
// ../drizzle-orm/dist/pg-core/schema.js
|
24390
|
+
var _a154, PgSchema5;
|
24353
24391
|
var init_schema = __esm({
|
24354
|
-
"../
|
24392
|
+
"../drizzle-orm/dist/pg-core/schema.js"() {
|
24355
24393
|
"use strict";
|
24356
24394
|
init_entity();
|
24357
24395
|
init_sql();
|
@@ -24360,7 +24398,7 @@ var init_schema = __esm({
|
|
24360
24398
|
init_table2();
|
24361
24399
|
init_view();
|
24362
24400
|
_a154 = entityKind;
|
24363
|
-
|
24401
|
+
PgSchema5 = class {
|
24364
24402
|
constructor(schemaName) {
|
24365
24403
|
__publicField(this, "table", (name2, columns, extraConfig) => {
|
24366
24404
|
return pgTableWithSchema(name2, columns, extraConfig, this.schemaName);
|
@@ -24386,14 +24424,14 @@ var init_schema = __esm({
|
|
24386
24424
|
return true;
|
24387
24425
|
}
|
24388
24426
|
};
|
24389
|
-
__publicField(
|
24427
|
+
__publicField(PgSchema5, _a154, "PgSchema");
|
24390
24428
|
}
|
24391
24429
|
});
|
24392
24430
|
|
24393
|
-
// ../
|
24431
|
+
// ../drizzle-orm/dist/pg-core/session.js
|
24394
24432
|
var _a155, PgPreparedQuery, _a156, PgSession, _a157, _b112, PgTransaction;
|
24395
24433
|
var init_session = __esm({
|
24396
|
-
"../
|
24434
|
+
"../drizzle-orm/dist/pg-core/session.js"() {
|
24397
24435
|
"use strict";
|
24398
24436
|
init_entity();
|
24399
24437
|
init_errors();
|
@@ -24474,26 +24512,26 @@ var init_session = __esm({
|
|
24474
24512
|
}
|
24475
24513
|
});
|
24476
24514
|
|
24477
|
-
// ../
|
24515
|
+
// ../drizzle-orm/dist/pg-core/subquery.js
|
24478
24516
|
var init_subquery2 = __esm({
|
24479
|
-
"../
|
24517
|
+
"../drizzle-orm/dist/pg-core/subquery.js"() {
|
24480
24518
|
"use strict";
|
24481
24519
|
}
|
24482
24520
|
});
|
24483
24521
|
|
24484
|
-
// ../
|
24522
|
+
// ../drizzle-orm/dist/pg-core/utils.js
|
24485
24523
|
function getTableConfig(table4) {
|
24486
|
-
const columns = Object.values(table4[
|
24524
|
+
const columns = Object.values(table4[Table2.Symbol.Columns]);
|
24487
24525
|
const indexes = [];
|
24488
24526
|
const checks = [];
|
24489
24527
|
const primaryKeys = [];
|
24490
24528
|
const foreignKeys = Object.values(table4[PgTable.Symbol.InlineForeignKeys]);
|
24491
24529
|
const uniqueConstraints = [];
|
24492
|
-
const name2 = table4[
|
24493
|
-
const schema4 = table4[
|
24530
|
+
const name2 = table4[Table2.Symbol.Name];
|
24531
|
+
const schema4 = table4[Table2.Symbol.Schema];
|
24494
24532
|
const extraConfigBuilder = table4[PgTable.Symbol.ExtraConfigBuilder];
|
24495
24533
|
if (extraConfigBuilder !== void 0) {
|
24496
|
-
const extraConfig = extraConfigBuilder(table4[
|
24534
|
+
const extraConfig = extraConfigBuilder(table4[Table2.Symbol.ExtraConfigColumns]);
|
24497
24535
|
for (const builder of Object.values(extraConfig)) {
|
24498
24536
|
if (is(builder, IndexBuilder)) {
|
24499
24537
|
indexes.push(builder.build(table4));
|
@@ -24520,7 +24558,7 @@ function getTableConfig(table4) {
|
|
24520
24558
|
};
|
24521
24559
|
}
|
24522
24560
|
var init_utils4 = __esm({
|
24523
|
-
"../
|
24561
|
+
"../drizzle-orm/dist/pg-core/utils.js"() {
|
24524
24562
|
"use strict";
|
24525
24563
|
init_entity();
|
24526
24564
|
init_table2();
|
@@ -24533,17 +24571,17 @@ var init_utils4 = __esm({
|
|
24533
24571
|
}
|
24534
24572
|
});
|
24535
24573
|
|
24536
|
-
// ../
|
24574
|
+
// ../drizzle-orm/dist/pg-core/utils/index.js
|
24537
24575
|
var init_utils5 = __esm({
|
24538
|
-
"../
|
24576
|
+
"../drizzle-orm/dist/pg-core/utils/index.js"() {
|
24539
24577
|
"use strict";
|
24540
24578
|
init_array();
|
24541
24579
|
}
|
24542
24580
|
});
|
24543
24581
|
|
24544
|
-
// ../
|
24582
|
+
// ../drizzle-orm/dist/pg-core/index.js
|
24545
24583
|
var init_pg_core = __esm({
|
24546
|
-
"../
|
24584
|
+
"../drizzle-orm/dist/pg-core/index.js"() {
|
24547
24585
|
"use strict";
|
24548
24586
|
init_alias2();
|
24549
24587
|
init_checks();
|
@@ -24603,7 +24641,7 @@ var init_pgSerializer = __esm({
|
|
24603
24641
|
"src/serializer/pgSerializer.ts"() {
|
24604
24642
|
"use strict";
|
24605
24643
|
init_source();
|
24606
|
-
|
24644
|
+
init_dist();
|
24607
24645
|
init_pg_core();
|
24608
24646
|
init_pg_core();
|
24609
24647
|
init_vector3();
|
@@ -25512,17 +25550,17 @@ var init_selector_ui = __esm({
|
|
25512
25550
|
}
|
25513
25551
|
});
|
25514
25552
|
|
25515
|
-
// ../
|
25553
|
+
// ../drizzle-orm/dist/sqlite-core/alias.js
|
25516
25554
|
var init_alias3 = __esm({
|
25517
|
-
"../
|
25555
|
+
"../drizzle-orm/dist/sqlite-core/alias.js"() {
|
25518
25556
|
"use strict";
|
25519
25557
|
}
|
25520
25558
|
});
|
25521
25559
|
|
25522
|
-
// ../
|
25560
|
+
// ../drizzle-orm/dist/sqlite-core/checks.js
|
25523
25561
|
var _a158, CheckBuilder2, _a159, Check2;
|
25524
25562
|
var init_checks2 = __esm({
|
25525
|
-
"../
|
25563
|
+
"../drizzle-orm/dist/sqlite-core/checks.js"() {
|
25526
25564
|
"use strict";
|
25527
25565
|
init_entity();
|
25528
25566
|
_a158 = entityKind;
|
@@ -25551,7 +25589,7 @@ var init_checks2 = __esm({
|
|
25551
25589
|
}
|
25552
25590
|
});
|
25553
25591
|
|
25554
|
-
// ../
|
25592
|
+
// ../drizzle-orm/dist/sqlite-core/table.js
|
25555
25593
|
function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2) {
|
25556
25594
|
const rawTable = new SQLiteTable(name2, schema4, baseName);
|
25557
25595
|
const builtColumns = Object.fromEntries(
|
@@ -25563,8 +25601,8 @@ function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2)
|
|
25563
25601
|
})
|
25564
25602
|
);
|
25565
25603
|
const table4 = Object.assign(rawTable, builtColumns);
|
25566
|
-
table4[
|
25567
|
-
table4[
|
25604
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
25605
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumns;
|
25568
25606
|
if (extraConfig) {
|
25569
25607
|
table4[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
25570
25608
|
}
|
@@ -25572,12 +25610,12 @@ function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2)
|
|
25572
25610
|
}
|
25573
25611
|
var InlineForeignKeys2, _a160, _b113, _c5, _d3, _e2, SQLiteTable, sqliteTable;
|
25574
25612
|
var init_table3 = __esm({
|
25575
|
-
"../
|
25613
|
+
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
25576
25614
|
"use strict";
|
25577
25615
|
init_entity();
|
25578
25616
|
init_table();
|
25579
25617
|
InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
25580
|
-
SQLiteTable = class extends (_e2 =
|
25618
|
+
SQLiteTable = class extends (_e2 = Table2, _d3 = entityKind, _c5 = Table2.Symbol.Columns, _b113 = InlineForeignKeys2, _a160 = Table2.Symbol.ExtraConfigBuilder, _e2) {
|
25581
25619
|
constructor() {
|
25582
25620
|
super(...arguments);
|
25583
25621
|
/** @internal */
|
@@ -25590,7 +25628,7 @@ var init_table3 = __esm({
|
|
25590
25628
|
};
|
25591
25629
|
__publicField(SQLiteTable, _d3, "SQLiteTable");
|
25592
25630
|
/** @internal */
|
25593
|
-
__publicField(SQLiteTable, "Symbol", Object.assign({},
|
25631
|
+
__publicField(SQLiteTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
25594
25632
|
InlineForeignKeys: InlineForeignKeys2
|
25595
25633
|
}));
|
25596
25634
|
sqliteTable = (name2, columns, extraConfig) => {
|
@@ -25599,10 +25637,10 @@ var init_table3 = __esm({
|
|
25599
25637
|
}
|
25600
25638
|
});
|
25601
25639
|
|
25602
|
-
// ../
|
25640
|
+
// ../drizzle-orm/dist/sqlite-core/foreign-keys.js
|
25603
25641
|
var _a161, ForeignKeyBuilder2, _a162, ForeignKey2;
|
25604
25642
|
var init_foreign_keys2 = __esm({
|
25605
|
-
"../
|
25643
|
+
"../drizzle-orm/dist/sqlite-core/foreign-keys.js"() {
|
25606
25644
|
"use strict";
|
25607
25645
|
init_entity();
|
25608
25646
|
init_table3();
|
@@ -25666,13 +25704,13 @@ var init_foreign_keys2 = __esm({
|
|
25666
25704
|
}
|
25667
25705
|
});
|
25668
25706
|
|
25669
|
-
// ../
|
25707
|
+
// ../drizzle-orm/dist/sqlite-core/unique-constraint.js
|
25670
25708
|
function uniqueKeyName2(table4, columns) {
|
25671
25709
|
return `${table4[SQLiteTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
25672
25710
|
}
|
25673
25711
|
var _a163, UniqueConstraintBuilder2, _a164, UniqueOnConstraintBuilder2, _a165, UniqueConstraint2;
|
25674
25712
|
var init_unique_constraint2 = __esm({
|
25675
|
-
"../
|
25713
|
+
"../drizzle-orm/dist/sqlite-core/unique-constraint.js"() {
|
25676
25714
|
"use strict";
|
25677
25715
|
init_entity();
|
25678
25716
|
init_table3();
|
@@ -25719,10 +25757,10 @@ var init_unique_constraint2 = __esm({
|
|
25719
25757
|
}
|
25720
25758
|
});
|
25721
25759
|
|
25722
|
-
// ../
|
25760
|
+
// ../drizzle-orm/dist/sqlite-core/columns/common.js
|
25723
25761
|
var _a166, _b114, SQLiteColumnBuilder, _a167, _b115, SQLiteColumn;
|
25724
25762
|
var init_common3 = __esm({
|
25725
|
-
"../
|
25763
|
+
"../drizzle-orm/dist/sqlite-core/columns/common.js"() {
|
25726
25764
|
"use strict";
|
25727
25765
|
init_column_builder();
|
25728
25766
|
init_column();
|
@@ -25771,7 +25809,7 @@ var init_common3 = __esm({
|
|
25771
25809
|
}
|
25772
25810
|
};
|
25773
25811
|
__publicField(SQLiteColumnBuilder, _a166, "SQLiteColumnBuilder");
|
25774
|
-
SQLiteColumn = class extends (_b115 =
|
25812
|
+
SQLiteColumn = class extends (_b115 = Column2, _a167 = entityKind, _b115) {
|
25775
25813
|
constructor(table4, config) {
|
25776
25814
|
if (!config.uniqueName) {
|
25777
25815
|
config.uniqueName = uniqueKeyName2(table4, [config.name]);
|
@@ -25784,10 +25822,10 @@ var init_common3 = __esm({
|
|
25784
25822
|
}
|
25785
25823
|
});
|
25786
25824
|
|
25787
|
-
// ../
|
25825
|
+
// ../drizzle-orm/dist/sqlite-core/columns/blob.js
|
25788
25826
|
var _a168, _b116, SQLiteBigIntBuilder, _a169, _b117, SQLiteBigInt, _a170, _b118, SQLiteBlobJsonBuilder, _a171, _b119, SQLiteBlobJson, _a172, _b120, SQLiteBlobBufferBuilder, _a173, _b121, SQLiteBlobBuffer;
|
25789
25827
|
var init_blob = __esm({
|
25790
|
-
"../
|
25828
|
+
"../drizzle-orm/dist/sqlite-core/columns/blob.js"() {
|
25791
25829
|
"use strict";
|
25792
25830
|
init_entity();
|
25793
25831
|
init_common3();
|
@@ -25857,10 +25895,10 @@ var init_blob = __esm({
|
|
25857
25895
|
}
|
25858
25896
|
});
|
25859
25897
|
|
25860
|
-
// ../
|
25898
|
+
// ../drizzle-orm/dist/sqlite-core/columns/custom.js
|
25861
25899
|
var _a174, _b122, SQLiteCustomColumnBuilder, _a175, _b123, SQLiteCustomColumn;
|
25862
25900
|
var init_custom2 = __esm({
|
25863
|
-
"../
|
25901
|
+
"../drizzle-orm/dist/sqlite-core/columns/custom.js"() {
|
25864
25902
|
"use strict";
|
25865
25903
|
init_entity();
|
25866
25904
|
init_common3();
|
@@ -25903,10 +25941,10 @@ var init_custom2 = __esm({
|
|
25903
25941
|
}
|
25904
25942
|
});
|
25905
25943
|
|
25906
|
-
// ../
|
25944
|
+
// ../drizzle-orm/dist/sqlite-core/columns/integer.js
|
25907
25945
|
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;
|
25908
25946
|
var init_integer2 = __esm({
|
25909
|
-
"../
|
25947
|
+
"../drizzle-orm/dist/sqlite-core/columns/integer.js"() {
|
25910
25948
|
"use strict";
|
25911
25949
|
init_entity();
|
25912
25950
|
init_sql();
|
@@ -26020,10 +26058,10 @@ var init_integer2 = __esm({
|
|
26020
26058
|
}
|
26021
26059
|
});
|
26022
26060
|
|
26023
|
-
// ../
|
26061
|
+
// ../drizzle-orm/dist/sqlite-core/columns/numeric.js
|
26024
26062
|
var _a184, _b132, SQLiteNumericBuilder, _a185, _b133, SQLiteNumeric;
|
26025
26063
|
var init_numeric2 = __esm({
|
26026
|
-
"../
|
26064
|
+
"../drizzle-orm/dist/sqlite-core/columns/numeric.js"() {
|
26027
26065
|
"use strict";
|
26028
26066
|
init_entity();
|
26029
26067
|
init_common3();
|
@@ -26049,10 +26087,10 @@ var init_numeric2 = __esm({
|
|
26049
26087
|
}
|
26050
26088
|
});
|
26051
26089
|
|
26052
|
-
// ../
|
26090
|
+
// ../drizzle-orm/dist/sqlite-core/columns/real.js
|
26053
26091
|
var _a186, _b134, SQLiteRealBuilder, _a187, _b135, SQLiteReal;
|
26054
26092
|
var init_real2 = __esm({
|
26055
|
-
"../
|
26093
|
+
"../drizzle-orm/dist/sqlite-core/columns/real.js"() {
|
26056
26094
|
"use strict";
|
26057
26095
|
init_entity();
|
26058
26096
|
init_common3();
|
@@ -26075,10 +26113,10 @@ var init_real2 = __esm({
|
|
26075
26113
|
}
|
26076
26114
|
});
|
26077
26115
|
|
26078
|
-
// ../
|
26116
|
+
// ../drizzle-orm/dist/sqlite-core/columns/text.js
|
26079
26117
|
var _a188, _b136, SQLiteTextBuilder, _a189, _b137, SQLiteText, _a190, _b138, SQLiteTextJsonBuilder, _a191, _b139, SQLiteTextJson;
|
26080
26118
|
var init_text2 = __esm({
|
26081
|
-
"../
|
26119
|
+
"../drizzle-orm/dist/sqlite-core/columns/text.js"() {
|
26082
26120
|
"use strict";
|
26083
26121
|
init_entity();
|
26084
26122
|
init_common3();
|
@@ -26133,9 +26171,9 @@ var init_text2 = __esm({
|
|
26133
26171
|
}
|
26134
26172
|
});
|
26135
26173
|
|
26136
|
-
// ../
|
26174
|
+
// ../drizzle-orm/dist/sqlite-core/columns/index.js
|
26137
26175
|
var init_columns2 = __esm({
|
26138
|
-
"../
|
26176
|
+
"../drizzle-orm/dist/sqlite-core/columns/index.js"() {
|
26139
26177
|
"use strict";
|
26140
26178
|
init_blob();
|
26141
26179
|
init_common3();
|
@@ -26147,10 +26185,10 @@ var init_columns2 = __esm({
|
|
26147
26185
|
}
|
26148
26186
|
});
|
26149
26187
|
|
26150
|
-
// ../
|
26188
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/delete.js
|
26151
26189
|
var _a192, _b140, SQLiteDeleteBase;
|
26152
26190
|
var init_delete2 = __esm({
|
26153
|
-
"../
|
26191
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/delete.js"() {
|
26154
26192
|
"use strict";
|
26155
26193
|
init_entity();
|
26156
26194
|
init_query_promise();
|
@@ -26246,10 +26284,10 @@ var init_delete2 = __esm({
|
|
26246
26284
|
}
|
26247
26285
|
});
|
26248
26286
|
|
26249
|
-
// ../
|
26287
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/insert.js
|
26250
26288
|
var _a193, SQLiteInsertBuilder, _a194, _b141, SQLiteInsertBase;
|
26251
26289
|
var init_insert2 = __esm({
|
26252
|
-
"../
|
26290
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/insert.js"() {
|
26253
26291
|
"use strict";
|
26254
26292
|
init_entity();
|
26255
26293
|
init_query_promise();
|
@@ -26272,7 +26310,7 @@ var init_insert2 = __esm({
|
|
26272
26310
|
}
|
26273
26311
|
const mappedValues = values.map((entry) => {
|
26274
26312
|
const result = {};
|
26275
|
-
const cols = this.table[
|
26313
|
+
const cols = this.table[Table2.Symbol.Columns];
|
26276
26314
|
for (const colKey of Object.keys(entry)) {
|
26277
26315
|
const colValue = entry[colKey];
|
26278
26316
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -26414,10 +26452,10 @@ var init_insert2 = __esm({
|
|
26414
26452
|
}
|
26415
26453
|
});
|
26416
26454
|
|
26417
|
-
// ../
|
26455
|
+
// ../drizzle-orm/dist/sqlite-core/view-base.js
|
26418
26456
|
var _a195, _b142, SQLiteViewBase;
|
26419
26457
|
var init_view_base2 = __esm({
|
26420
|
-
"../
|
26458
|
+
"../drizzle-orm/dist/sqlite-core/view-base.js"() {
|
26421
26459
|
"use strict";
|
26422
26460
|
init_entity();
|
26423
26461
|
init_sql();
|
@@ -26427,10 +26465,10 @@ var init_view_base2 = __esm({
|
|
26427
26465
|
}
|
26428
26466
|
});
|
26429
26467
|
|
26430
|
-
// ../
|
26468
|
+
// ../drizzle-orm/dist/sqlite-core/dialect.js
|
26431
26469
|
var _a196, SQLiteDialect, _a197, _b143, SQLiteSyncDialect, _a198, _b144, SQLiteAsyncDialect;
|
26432
26470
|
var init_dialect2 = __esm({
|
26433
|
-
"../
|
26471
|
+
"../drizzle-orm/dist/sqlite-core/dialect.js"() {
|
26434
26472
|
"use strict";
|
26435
26473
|
init_alias();
|
26436
26474
|
init_column();
|
@@ -26477,7 +26515,7 @@ var init_dialect2 = __esm({
|
|
26477
26515
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
26478
26516
|
}
|
26479
26517
|
buildUpdateSet(table4, set) {
|
26480
|
-
const tableColumns = table4[
|
26518
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
26481
26519
|
const columnNames = Object.keys(tableColumns).filter(
|
26482
26520
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
26483
26521
|
);
|
@@ -26522,7 +26560,7 @@ var init_dialect2 = __esm({
|
|
26522
26560
|
chunk.push(
|
26523
26561
|
new SQL(
|
26524
26562
|
query.queryChunks.map((c) => {
|
26525
|
-
if (is(c,
|
26563
|
+
if (is(c, Column2)) {
|
26526
26564
|
return sql.identifier(c.name);
|
26527
26565
|
}
|
26528
26566
|
return c;
|
@@ -26535,8 +26573,8 @@ var init_dialect2 = __esm({
|
|
26535
26573
|
if (is(field, SQL.Aliased)) {
|
26536
26574
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
26537
26575
|
}
|
26538
|
-
} else if (is(field,
|
26539
|
-
const tableName = field.table[
|
26576
|
+
} else if (is(field, Column2)) {
|
26577
|
+
const tableName = field.table[Table2.Symbol.Name];
|
26540
26578
|
const columnName = field.name;
|
26541
26579
|
if (isSingleTable) {
|
26542
26580
|
chunk.push(sql.identifier(columnName));
|
@@ -26568,8 +26606,8 @@ var init_dialect2 = __esm({
|
|
26568
26606
|
}) {
|
26569
26607
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
26570
26608
|
for (const f of fieldsList) {
|
26571
|
-
if (is(f.field,
|
26572
|
-
({ alias }) => alias === (table22[
|
26609
|
+
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(
|
26610
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
26573
26611
|
))(f.field.table)) {
|
26574
26612
|
const tableName = getTableName(f.field.table);
|
26575
26613
|
throw new Error(
|
@@ -26582,8 +26620,8 @@ var init_dialect2 = __esm({
|
|
26582
26620
|
const distinctSql = distinct ? sql` distinct` : void 0;
|
26583
26621
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
26584
26622
|
const tableSql = (() => {
|
26585
|
-
if (is(table4,
|
26586
|
-
return sql`${sql.identifier(table4[
|
26623
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
26624
|
+
return sql`${sql.identifier(table4[Table2.Symbol.OriginalName])} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
26587
26625
|
}
|
26588
26626
|
return table4;
|
26589
26627
|
})();
|
@@ -26689,7 +26727,7 @@ var init_dialect2 = __esm({
|
|
26689
26727
|
}
|
26690
26728
|
buildInsertQuery({ table: table4, values, onConflict, returning, withList }) {
|
26691
26729
|
const valuesSqlList = [];
|
26692
|
-
const columns = table4[
|
26730
|
+
const columns = table4[Table2.Symbol.Columns];
|
26693
26731
|
const colEntries = Object.entries(columns).filter(
|
26694
26732
|
([_2, col]) => !col.shouldDisableInsert()
|
26695
26733
|
);
|
@@ -26810,7 +26848,7 @@ var init_dialect2 = __esm({
|
|
26810
26848
|
selection.push({
|
26811
26849
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
26812
26850
|
tsKey,
|
26813
|
-
field: is(value,
|
26851
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
26814
26852
|
relationTableTsKey: void 0,
|
26815
26853
|
isJson: false,
|
26816
26854
|
selection: []
|
@@ -26821,7 +26859,7 @@ var init_dialect2 = __esm({
|
|
26821
26859
|
orderByOrig = [orderByOrig];
|
26822
26860
|
}
|
26823
26861
|
orderBy = orderByOrig.map((orderByValue) => {
|
26824
|
-
if (is(orderByValue,
|
26862
|
+
if (is(orderByValue, Column2)) {
|
26825
26863
|
return aliasedTableColumn(orderByValue, tableAlias);
|
26826
26864
|
}
|
26827
26865
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -26921,7 +26959,7 @@ var init_dialect2 = __esm({
|
|
26921
26959
|
fields: {},
|
26922
26960
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
26923
26961
|
path: [],
|
26924
|
-
field: is(field2,
|
26962
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
26925
26963
|
})),
|
26926
26964
|
joins,
|
26927
26965
|
where,
|
@@ -26936,7 +26974,7 @@ var init_dialect2 = __esm({
|
|
26936
26974
|
fields: {},
|
26937
26975
|
fieldsFlat: selection.map(({ field }) => ({
|
26938
26976
|
path: [],
|
26939
|
-
field: is(field,
|
26977
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
26940
26978
|
})),
|
26941
26979
|
joins,
|
26942
26980
|
where,
|
@@ -27022,7 +27060,7 @@ var init_dialect2 = __esm({
|
|
27022
27060
|
}
|
27023
27061
|
});
|
27024
27062
|
|
27025
|
-
// ../
|
27063
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/select.js
|
27026
27064
|
function createSetOperator2(type, isAll) {
|
27027
27065
|
return (leftSelect, rightSelect, ...restSelects) => {
|
27028
27066
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -27042,7 +27080,7 @@ function createSetOperator2(type, isAll) {
|
|
27042
27080
|
}
|
27043
27081
|
var _a199, SQLiteSelectBuilder, _a200, _b145, SQLiteSelectQueryBuilderBase, _a201, _b146, SQLiteSelectBase, getSQLiteSetOperators, union2, unionAll2, intersect2, except2;
|
27044
27082
|
var init_select3 = __esm({
|
27045
|
-
"../
|
27083
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/select.js"() {
|
27046
27084
|
"use strict";
|
27047
27085
|
init_entity();
|
27048
27086
|
init_query_builder();
|
@@ -27353,7 +27391,7 @@ var init_select3 = __esm({
|
|
27353
27391
|
};
|
27354
27392
|
}
|
27355
27393
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
27356
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
27394
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
27357
27395
|
this.config.fields[tableName] = selection;
|
27358
27396
|
}
|
27359
27397
|
}
|
@@ -27655,10 +27693,10 @@ var init_select3 = __esm({
|
|
27655
27693
|
}
|
27656
27694
|
});
|
27657
27695
|
|
27658
|
-
// ../
|
27696
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/query-builder.js
|
27659
27697
|
var _a202, QueryBuilder2;
|
27660
27698
|
var init_query_builder3 = __esm({
|
27661
|
-
"../
|
27699
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/query-builder.js"() {
|
27662
27700
|
"use strict";
|
27663
27701
|
init_entity();
|
27664
27702
|
init_selection_proxy();
|
@@ -27728,17 +27766,17 @@ var init_query_builder3 = __esm({
|
|
27728
27766
|
}
|
27729
27767
|
});
|
27730
27768
|
|
27731
|
-
// ../
|
27769
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/select.types.js
|
27732
27770
|
var init_select_types2 = __esm({
|
27733
|
-
"../
|
27771
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/select.types.js"() {
|
27734
27772
|
"use strict";
|
27735
27773
|
}
|
27736
27774
|
});
|
27737
27775
|
|
27738
|
-
// ../
|
27776
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/update.js
|
27739
27777
|
var _a203, SQLiteUpdateBuilder, _a204, _b147, SQLiteUpdateBase;
|
27740
27778
|
var init_update2 = __esm({
|
27741
|
-
"../
|
27779
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/update.js"() {
|
27742
27780
|
"use strict";
|
27743
27781
|
init_entity();
|
27744
27782
|
init_query_promise();
|
@@ -27856,9 +27894,9 @@ var init_update2 = __esm({
|
|
27856
27894
|
}
|
27857
27895
|
});
|
27858
27896
|
|
27859
|
-
// ../
|
27897
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/index.js
|
27860
27898
|
var init_query_builders2 = __esm({
|
27861
|
-
"../
|
27899
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/index.js"() {
|
27862
27900
|
"use strict";
|
27863
27901
|
init_delete2();
|
27864
27902
|
init_insert2();
|
@@ -27869,10 +27907,10 @@ var init_query_builders2 = __esm({
|
|
27869
27907
|
}
|
27870
27908
|
});
|
27871
27909
|
|
27872
|
-
// ../
|
27910
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/query.js
|
27873
27911
|
var _a205, RelationalQueryBuilder2, _a206, _b148, SQLiteRelationalQuery, _a207, _b149, SQLiteSyncRelationalQuery;
|
27874
27912
|
var init_query2 = __esm({
|
27875
|
-
"../
|
27913
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/query.js"() {
|
27876
27914
|
"use strict";
|
27877
27915
|
init_entity();
|
27878
27916
|
init_query_promise();
|
@@ -28023,10 +28061,10 @@ var init_query2 = __esm({
|
|
28023
28061
|
}
|
28024
28062
|
});
|
28025
28063
|
|
28026
|
-
// ../
|
28064
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/raw.js
|
28027
28065
|
var _a208, _b150, SQLiteRaw;
|
28028
28066
|
var init_raw2 = __esm({
|
28029
|
-
"../
|
28067
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/raw.js"() {
|
28030
28068
|
"use strict";
|
28031
28069
|
init_entity();
|
28032
28070
|
init_query_promise();
|
@@ -28059,10 +28097,10 @@ var init_raw2 = __esm({
|
|
28059
28097
|
}
|
28060
28098
|
});
|
28061
28099
|
|
28062
|
-
// ../
|
28100
|
+
// ../drizzle-orm/dist/sqlite-core/db.js
|
28063
28101
|
var _a209, BaseSQLiteDatabase;
|
28064
28102
|
var init_db2 = __esm({
|
28065
|
-
"../
|
28103
|
+
"../drizzle-orm/dist/sqlite-core/db.js"() {
|
28066
28104
|
"use strict";
|
28067
28105
|
init_entity();
|
28068
28106
|
init_selection_proxy();
|
@@ -28352,10 +28390,10 @@ var init_db2 = __esm({
|
|
28352
28390
|
}
|
28353
28391
|
});
|
28354
28392
|
|
28355
|
-
// ../
|
28393
|
+
// ../drizzle-orm/dist/sqlite-core/indexes.js
|
28356
28394
|
var _a210, IndexBuilderOn2, _a211, IndexBuilder2, _a212, Index4;
|
28357
28395
|
var init_indexes2 = __esm({
|
28358
|
-
"../
|
28396
|
+
"../drizzle-orm/dist/sqlite-core/indexes.js"() {
|
28359
28397
|
"use strict";
|
28360
28398
|
init_entity();
|
28361
28399
|
_a210 = entityKind;
|
@@ -28405,10 +28443,10 @@ var init_indexes2 = __esm({
|
|
28405
28443
|
}
|
28406
28444
|
});
|
28407
28445
|
|
28408
|
-
// ../
|
28446
|
+
// ../drizzle-orm/dist/sqlite-core/primary-keys.js
|
28409
28447
|
var _a213, PrimaryKeyBuilder2, _a214, PrimaryKey2;
|
28410
28448
|
var init_primary_keys2 = __esm({
|
28411
|
-
"../
|
28449
|
+
"../drizzle-orm/dist/sqlite-core/primary-keys.js"() {
|
28412
28450
|
"use strict";
|
28413
28451
|
init_entity();
|
28414
28452
|
init_table3();
|
@@ -28445,10 +28483,10 @@ var init_primary_keys2 = __esm({
|
|
28445
28483
|
}
|
28446
28484
|
});
|
28447
28485
|
|
28448
|
-
// ../
|
28486
|
+
// ../drizzle-orm/dist/sqlite-core/session.js
|
28449
28487
|
var _a215, _b151, ExecuteResultSync, _a216, SQLitePreparedQuery, _a217, SQLiteSession, _a218, _b152, SQLiteTransaction;
|
28450
28488
|
var init_session2 = __esm({
|
28451
|
-
"../
|
28489
|
+
"../drizzle-orm/dist/sqlite-core/session.js"() {
|
28452
28490
|
"use strict";
|
28453
28491
|
init_entity();
|
28454
28492
|
init_errors();
|
@@ -28566,23 +28604,23 @@ var init_session2 = __esm({
|
|
28566
28604
|
}
|
28567
28605
|
});
|
28568
28606
|
|
28569
|
-
// ../
|
28607
|
+
// ../drizzle-orm/dist/sqlite-core/subquery.js
|
28570
28608
|
var init_subquery3 = __esm({
|
28571
|
-
"../
|
28609
|
+
"../drizzle-orm/dist/sqlite-core/subquery.js"() {
|
28572
28610
|
"use strict";
|
28573
28611
|
}
|
28574
28612
|
});
|
28575
28613
|
|
28576
|
-
// ../
|
28614
|
+
// ../drizzle-orm/dist/sqlite-core/view-common.js
|
28577
28615
|
var SQLiteViewConfig;
|
28578
28616
|
var init_view_common3 = __esm({
|
28579
|
-
"../
|
28617
|
+
"../drizzle-orm/dist/sqlite-core/view-common.js"() {
|
28580
28618
|
"use strict";
|
28581
28619
|
SQLiteViewConfig = Symbol.for("drizzle:SQLiteViewConfig");
|
28582
28620
|
}
|
28583
28621
|
});
|
28584
28622
|
|
28585
|
-
// ../
|
28623
|
+
// ../drizzle-orm/dist/sqlite-core/utils.js
|
28586
28624
|
function getTableConfig2(table4) {
|
28587
28625
|
const columns = Object.values(table4[SQLiteTable.Symbol.Columns]);
|
28588
28626
|
const indexes = [];
|
@@ -28590,7 +28628,7 @@ function getTableConfig2(table4) {
|
|
28590
28628
|
const primaryKeys = [];
|
28591
28629
|
const uniqueConstraints = [];
|
28592
28630
|
const foreignKeys = Object.values(table4[SQLiteTable.Symbol.InlineForeignKeys]);
|
28593
|
-
const name2 = table4[
|
28631
|
+
const name2 = table4[Table2.Symbol.Name];
|
28594
28632
|
const extraConfigBuilder = table4[SQLiteTable.Symbol.ExtraConfigBuilder];
|
28595
28633
|
if (extraConfigBuilder !== void 0) {
|
28596
28634
|
const extraConfig = extraConfigBuilder(table4[SQLiteTable.Symbol.Columns]);
|
@@ -28619,7 +28657,7 @@ function getTableConfig2(table4) {
|
|
28619
28657
|
};
|
28620
28658
|
}
|
28621
28659
|
var init_utils6 = __esm({
|
28622
|
-
"../
|
28660
|
+
"../drizzle-orm/dist/sqlite-core/utils.js"() {
|
28623
28661
|
"use strict";
|
28624
28662
|
init_entity();
|
28625
28663
|
init_table();
|
@@ -28632,10 +28670,10 @@ var init_utils6 = __esm({
|
|
28632
28670
|
}
|
28633
28671
|
});
|
28634
28672
|
|
28635
|
-
// ../
|
28673
|
+
// ../drizzle-orm/dist/sqlite-core/view.js
|
28636
28674
|
var _a219, ViewBuilderCore, _a220, _b153, ViewBuilder2, _a221, _b154, ManualViewBuilder2, _a222, _b155, _c6, SQLiteView;
|
28637
28675
|
var init_view2 = __esm({
|
28638
|
-
"../
|
28676
|
+
"../drizzle-orm/dist/sqlite-core/view.js"() {
|
28639
28677
|
"use strict";
|
28640
28678
|
init_entity();
|
28641
28679
|
init_selection_proxy();
|
@@ -28737,9 +28775,9 @@ var init_view2 = __esm({
|
|
28737
28775
|
}
|
28738
28776
|
});
|
28739
28777
|
|
28740
|
-
// ../
|
28778
|
+
// ../drizzle-orm/dist/sqlite-core/index.js
|
28741
28779
|
var init_sqlite_core = __esm({
|
28742
|
-
"../
|
28780
|
+
"../drizzle-orm/dist/sqlite-core/index.js"() {
|
28743
28781
|
"use strict";
|
28744
28782
|
init_alias3();
|
28745
28783
|
init_checks2();
|
@@ -28826,7 +28864,7 @@ var init_sqliteSerializer = __esm({
|
|
28826
28864
|
"src/serializer/sqliteSerializer.ts"() {
|
28827
28865
|
"use strict";
|
28828
28866
|
init_source();
|
28829
|
-
|
28867
|
+
init_dist();
|
28830
28868
|
init_sqlite_core();
|
28831
28869
|
init_outputs();
|
28832
28870
|
init_serializer();
|
@@ -29239,17 +29277,17 @@ WHERE
|
|
29239
29277
|
}
|
29240
29278
|
});
|
29241
29279
|
|
29242
|
-
// ../
|
29280
|
+
// ../drizzle-orm/dist/mysql-core/alias.js
|
29243
29281
|
var init_alias4 = __esm({
|
29244
|
-
"../
|
29282
|
+
"../drizzle-orm/dist/mysql-core/alias.js"() {
|
29245
29283
|
"use strict";
|
29246
29284
|
}
|
29247
29285
|
});
|
29248
29286
|
|
29249
|
-
// ../
|
29287
|
+
// ../drizzle-orm/dist/mysql-core/checks.js
|
29250
29288
|
var _a223, CheckBuilder3, _a224, Check3;
|
29251
29289
|
var init_checks3 = __esm({
|
29252
|
-
"../
|
29290
|
+
"../drizzle-orm/dist/mysql-core/checks.js"() {
|
29253
29291
|
"use strict";
|
29254
29292
|
init_entity();
|
29255
29293
|
_a223 = entityKind;
|
@@ -29279,7 +29317,7 @@ var init_checks3 = __esm({
|
|
29279
29317
|
}
|
29280
29318
|
});
|
29281
29319
|
|
29282
|
-
// ../
|
29320
|
+
// ../drizzle-orm/dist/mysql-core/table.js
|
29283
29321
|
function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = name2) {
|
29284
29322
|
const rawTable = new MySqlTable(name2, schema4, baseName);
|
29285
29323
|
const builtColumns = Object.fromEntries(
|
@@ -29291,8 +29329,8 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = n
|
|
29291
29329
|
})
|
29292
29330
|
);
|
29293
29331
|
const table4 = Object.assign(rawTable, builtColumns);
|
29294
|
-
table4[
|
29295
|
-
table4[
|
29332
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
29333
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumns;
|
29296
29334
|
if (extraConfig) {
|
29297
29335
|
table4[MySqlTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
29298
29336
|
}
|
@@ -29300,12 +29338,12 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = n
|
|
29300
29338
|
}
|
29301
29339
|
var InlineForeignKeys3, _a225, _b156, _c7, _d4, _e3, MySqlTable, mysqlTable;
|
29302
29340
|
var init_table4 = __esm({
|
29303
|
-
"../
|
29341
|
+
"../drizzle-orm/dist/mysql-core/table.js"() {
|
29304
29342
|
"use strict";
|
29305
29343
|
init_entity();
|
29306
29344
|
init_table();
|
29307
29345
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
29308
|
-
MySqlTable = class extends (_e3 =
|
29346
|
+
MySqlTable = class extends (_e3 = Table2, _d4 = entityKind, _c7 = Table2.Symbol.Columns, _b156 = InlineForeignKeys3, _a225 = Table2.Symbol.ExtraConfigBuilder, _e3) {
|
29309
29347
|
constructor() {
|
29310
29348
|
super(...arguments);
|
29311
29349
|
/** @internal */
|
@@ -29318,7 +29356,7 @@ var init_table4 = __esm({
|
|
29318
29356
|
};
|
29319
29357
|
__publicField(MySqlTable, _d4, "MySqlTable");
|
29320
29358
|
/** @internal */
|
29321
|
-
__publicField(MySqlTable, "Symbol", Object.assign({},
|
29359
|
+
__publicField(MySqlTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
29322
29360
|
InlineForeignKeys: InlineForeignKeys3
|
29323
29361
|
}));
|
29324
29362
|
mysqlTable = (name2, columns, extraConfig) => {
|
@@ -29327,10 +29365,10 @@ var init_table4 = __esm({
|
|
29327
29365
|
}
|
29328
29366
|
});
|
29329
29367
|
|
29330
|
-
// ../
|
29368
|
+
// ../drizzle-orm/dist/mysql-core/foreign-keys.js
|
29331
29369
|
var _a226, ForeignKeyBuilder3, _a227, ForeignKey3;
|
29332
29370
|
var init_foreign_keys3 = __esm({
|
29333
|
-
"../
|
29371
|
+
"../drizzle-orm/dist/mysql-core/foreign-keys.js"() {
|
29334
29372
|
"use strict";
|
29335
29373
|
init_entity();
|
29336
29374
|
init_table4();
|
@@ -29394,13 +29432,13 @@ var init_foreign_keys3 = __esm({
|
|
29394
29432
|
}
|
29395
29433
|
});
|
29396
29434
|
|
29397
|
-
// ../
|
29435
|
+
// ../drizzle-orm/dist/mysql-core/unique-constraint.js
|
29398
29436
|
function uniqueKeyName3(table4, columns) {
|
29399
29437
|
return `${table4[MySqlTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
29400
29438
|
}
|
29401
29439
|
var _a228, UniqueConstraintBuilder3, _a229, UniqueOnConstraintBuilder3, _a230, UniqueConstraint3;
|
29402
29440
|
var init_unique_constraint3 = __esm({
|
29403
|
-
"../
|
29441
|
+
"../drizzle-orm/dist/mysql-core/unique-constraint.js"() {
|
29404
29442
|
"use strict";
|
29405
29443
|
init_entity();
|
29406
29444
|
init_table4();
|
@@ -29448,10 +29486,10 @@ var init_unique_constraint3 = __esm({
|
|
29448
29486
|
}
|
29449
29487
|
});
|
29450
29488
|
|
29451
|
-
// ../
|
29489
|
+
// ../drizzle-orm/dist/mysql-core/columns/common.js
|
29452
29490
|
var _a231, _b157, MySqlColumnBuilder, _a232, _b158, MySqlColumn, _a233, _b159, MySqlColumnBuilderWithAutoIncrement, _a234, _b160, MySqlColumnWithAutoIncrement;
|
29453
29491
|
var init_common4 = __esm({
|
29454
|
-
"../
|
29492
|
+
"../drizzle-orm/dist/mysql-core/columns/common.js"() {
|
29455
29493
|
"use strict";
|
29456
29494
|
init_column_builder();
|
29457
29495
|
init_column();
|
@@ -29500,7 +29538,7 @@ var init_common4 = __esm({
|
|
29500
29538
|
}
|
29501
29539
|
};
|
29502
29540
|
__publicField(MySqlColumnBuilder, _a231, "MySqlColumnBuilder");
|
29503
|
-
MySqlColumn = class extends (_b158 =
|
29541
|
+
MySqlColumn = class extends (_b158 = Column2, _a232 = entityKind, _b158) {
|
29504
29542
|
constructor(table4, config) {
|
29505
29543
|
if (!config.uniqueName) {
|
29506
29544
|
config.uniqueName = uniqueKeyName3(table4, [config.name]);
|
@@ -29532,10 +29570,10 @@ var init_common4 = __esm({
|
|
29532
29570
|
}
|
29533
29571
|
});
|
29534
29572
|
|
29535
|
-
// ../
|
29573
|
+
// ../drizzle-orm/dist/mysql-core/columns/bigint.js
|
29536
29574
|
var _a235, _b161, MySqlBigInt53Builder, _a236, _b162, MySqlBigInt53, _a237, _b163, MySqlBigInt64Builder, _a238, _b164, MySqlBigInt64;
|
29537
29575
|
var init_bigint2 = __esm({
|
29538
|
-
"../
|
29576
|
+
"../drizzle-orm/dist/mysql-core/columns/bigint.js"() {
|
29539
29577
|
"use strict";
|
29540
29578
|
init_entity();
|
29541
29579
|
init_common4();
|
@@ -29592,10 +29630,10 @@ var init_bigint2 = __esm({
|
|
29592
29630
|
}
|
29593
29631
|
});
|
29594
29632
|
|
29595
|
-
// ../
|
29633
|
+
// ../drizzle-orm/dist/mysql-core/columns/binary.js
|
29596
29634
|
var _a239, _b165, MySqlBinaryBuilder, _a240, _b166, MySqlBinary;
|
29597
29635
|
var init_binary = __esm({
|
29598
|
-
"../
|
29636
|
+
"../drizzle-orm/dist/mysql-core/columns/binary.js"() {
|
29599
29637
|
"use strict";
|
29600
29638
|
init_entity();
|
29601
29639
|
init_common4();
|
@@ -29623,10 +29661,10 @@ var init_binary = __esm({
|
|
29623
29661
|
}
|
29624
29662
|
});
|
29625
29663
|
|
29626
|
-
// ../
|
29664
|
+
// ../drizzle-orm/dist/mysql-core/columns/boolean.js
|
29627
29665
|
var _a241, _b167, MySqlBooleanBuilder, _a242, _b168, MySqlBoolean;
|
29628
29666
|
var init_boolean2 = __esm({
|
29629
|
-
"../
|
29667
|
+
"../drizzle-orm/dist/mysql-core/columns/boolean.js"() {
|
29630
29668
|
"use strict";
|
29631
29669
|
init_entity();
|
29632
29670
|
init_common4();
|
@@ -29658,10 +29696,10 @@ var init_boolean2 = __esm({
|
|
29658
29696
|
}
|
29659
29697
|
});
|
29660
29698
|
|
29661
|
-
// ../
|
29699
|
+
// ../drizzle-orm/dist/mysql-core/columns/char.js
|
29662
29700
|
var _a243, _b169, MySqlCharBuilder, _a244, _b170, MySqlChar;
|
29663
29701
|
var init_char2 = __esm({
|
29664
|
-
"../
|
29702
|
+
"../drizzle-orm/dist/mysql-core/columns/char.js"() {
|
29665
29703
|
"use strict";
|
29666
29704
|
init_entity();
|
29667
29705
|
init_common4();
|
@@ -29694,10 +29732,10 @@ var init_char2 = __esm({
|
|
29694
29732
|
}
|
29695
29733
|
});
|
29696
29734
|
|
29697
|
-
// ../
|
29735
|
+
// ../drizzle-orm/dist/mysql-core/columns/custom.js
|
29698
29736
|
var _a245, _b171, MySqlCustomColumnBuilder, _a246, _b172, MySqlCustomColumn;
|
29699
29737
|
var init_custom3 = __esm({
|
29700
|
-
"../
|
29738
|
+
"../drizzle-orm/dist/mysql-core/columns/custom.js"() {
|
29701
29739
|
"use strict";
|
29702
29740
|
init_entity();
|
29703
29741
|
init_common4();
|
@@ -29740,10 +29778,10 @@ var init_custom3 = __esm({
|
|
29740
29778
|
}
|
29741
29779
|
});
|
29742
29780
|
|
29743
|
-
// ../
|
29781
|
+
// ../drizzle-orm/dist/mysql-core/columns/date.js
|
29744
29782
|
var _a247, _b173, MySqlDateBuilder, _a248, _b174, MySqlDate, _a249, _b175, MySqlDateStringBuilder, _a250, _b176, MySqlDateString;
|
29745
29783
|
var init_date2 = __esm({
|
29746
|
-
"../
|
29784
|
+
"../drizzle-orm/dist/mysql-core/columns/date.js"() {
|
29747
29785
|
"use strict";
|
29748
29786
|
init_entity();
|
29749
29787
|
init_common4();
|
@@ -29794,10 +29832,10 @@ var init_date2 = __esm({
|
|
29794
29832
|
}
|
29795
29833
|
});
|
29796
29834
|
|
29797
|
-
// ../
|
29835
|
+
// ../drizzle-orm/dist/mysql-core/columns/datetime.js
|
29798
29836
|
var _a251, _b177, MySqlDateTimeBuilder, _a252, _b178, MySqlDateTime, _a253, _b179, MySqlDateTimeStringBuilder, _a254, _b180, MySqlDateTimeString;
|
29799
29837
|
var init_datetime = __esm({
|
29800
|
-
"../
|
29838
|
+
"../drizzle-orm/dist/mysql-core/columns/datetime.js"() {
|
29801
29839
|
"use strict";
|
29802
29840
|
init_entity();
|
29803
29841
|
init_common4();
|
@@ -29862,10 +29900,10 @@ var init_datetime = __esm({
|
|
29862
29900
|
}
|
29863
29901
|
});
|
29864
29902
|
|
29865
|
-
// ../
|
29903
|
+
// ../drizzle-orm/dist/mysql-core/columns/decimal.js
|
29866
29904
|
var _a255, _b181, MySqlDecimalBuilder, _a256, _b182, MySqlDecimal;
|
29867
29905
|
var init_decimal = __esm({
|
29868
|
-
"../
|
29906
|
+
"../drizzle-orm/dist/mysql-core/columns/decimal.js"() {
|
29869
29907
|
"use strict";
|
29870
29908
|
init_entity();
|
29871
29909
|
init_common4();
|
@@ -29904,10 +29942,10 @@ var init_decimal = __esm({
|
|
29904
29942
|
}
|
29905
29943
|
});
|
29906
29944
|
|
29907
|
-
// ../
|
29945
|
+
// ../drizzle-orm/dist/mysql-core/columns/double.js
|
29908
29946
|
var _a257, _b183, MySqlDoubleBuilder, _a258, _b184, MySqlDouble;
|
29909
29947
|
var init_double = __esm({
|
29910
|
-
"../
|
29948
|
+
"../drizzle-orm/dist/mysql-core/columns/double.js"() {
|
29911
29949
|
"use strict";
|
29912
29950
|
init_entity();
|
29913
29951
|
init_common4();
|
@@ -29943,10 +29981,10 @@ var init_double = __esm({
|
|
29943
29981
|
}
|
29944
29982
|
});
|
29945
29983
|
|
29946
|
-
// ../
|
29984
|
+
// ../drizzle-orm/dist/mysql-core/columns/enum.js
|
29947
29985
|
var _a259, _b185, MySqlEnumColumnBuilder, _a260, _b186, MySqlEnumColumn;
|
29948
29986
|
var init_enum2 = __esm({
|
29949
|
-
"../
|
29987
|
+
"../drizzle-orm/dist/mysql-core/columns/enum.js"() {
|
29950
29988
|
"use strict";
|
29951
29989
|
init_entity();
|
29952
29990
|
init_common4();
|
@@ -29977,10 +30015,10 @@ var init_enum2 = __esm({
|
|
29977
30015
|
}
|
29978
30016
|
});
|
29979
30017
|
|
29980
|
-
// ../
|
30018
|
+
// ../drizzle-orm/dist/mysql-core/columns/float.js
|
29981
30019
|
var _a261, _b187, MySqlFloatBuilder, _a262, _b188, MySqlFloat;
|
29982
30020
|
var init_float = __esm({
|
29983
|
-
"../
|
30021
|
+
"../drizzle-orm/dist/mysql-core/columns/float.js"() {
|
29984
30022
|
"use strict";
|
29985
30023
|
init_entity();
|
29986
30024
|
init_common4();
|
@@ -30003,10 +30041,10 @@ var init_float = __esm({
|
|
30003
30041
|
}
|
30004
30042
|
});
|
30005
30043
|
|
30006
|
-
// ../
|
30044
|
+
// ../drizzle-orm/dist/mysql-core/columns/int.js
|
30007
30045
|
var _a263, _b189, MySqlIntBuilder, _a264, _b190, MySqlInt;
|
30008
30046
|
var init_int = __esm({
|
30009
|
-
"../
|
30047
|
+
"../drizzle-orm/dist/mysql-core/columns/int.js"() {
|
30010
30048
|
"use strict";
|
30011
30049
|
init_entity();
|
30012
30050
|
init_common4();
|
@@ -30036,10 +30074,10 @@ var init_int = __esm({
|
|
30036
30074
|
}
|
30037
30075
|
});
|
30038
30076
|
|
30039
|
-
// ../
|
30077
|
+
// ../drizzle-orm/dist/mysql-core/columns/json.js
|
30040
30078
|
var _a265, _b191, MySqlJsonBuilder, _a266, _b192, MySqlJson;
|
30041
30079
|
var init_json2 = __esm({
|
30042
|
-
"../
|
30080
|
+
"../drizzle-orm/dist/mysql-core/columns/json.js"() {
|
30043
30081
|
"use strict";
|
30044
30082
|
init_entity();
|
30045
30083
|
init_common4();
|
@@ -30065,10 +30103,10 @@ var init_json2 = __esm({
|
|
30065
30103
|
}
|
30066
30104
|
});
|
30067
30105
|
|
30068
|
-
// ../
|
30106
|
+
// ../drizzle-orm/dist/mysql-core/columns/mediumint.js
|
30069
30107
|
var _a267, _b193, MySqlMediumIntBuilder, _a268, _b194, MySqlMediumInt;
|
30070
30108
|
var init_mediumint = __esm({
|
30071
|
-
"../
|
30109
|
+
"../drizzle-orm/dist/mysql-core/columns/mediumint.js"() {
|
30072
30110
|
"use strict";
|
30073
30111
|
init_entity();
|
30074
30112
|
init_common4();
|
@@ -30101,10 +30139,10 @@ var init_mediumint = __esm({
|
|
30101
30139
|
}
|
30102
30140
|
});
|
30103
30141
|
|
30104
|
-
// ../
|
30142
|
+
// ../drizzle-orm/dist/mysql-core/columns/real.js
|
30105
30143
|
var _a269, _b195, MySqlRealBuilder, _a270, _b196, MySqlReal;
|
30106
30144
|
var init_real3 = __esm({
|
30107
|
-
"../
|
30145
|
+
"../drizzle-orm/dist/mysql-core/columns/real.js"() {
|
30108
30146
|
"use strict";
|
30109
30147
|
init_entity();
|
30110
30148
|
init_common4();
|
@@ -30140,10 +30178,10 @@ var init_real3 = __esm({
|
|
30140
30178
|
}
|
30141
30179
|
});
|
30142
30180
|
|
30143
|
-
// ../
|
30181
|
+
// ../drizzle-orm/dist/mysql-core/columns/serial.js
|
30144
30182
|
var _a271, _b197, MySqlSerialBuilder, _a272, _b198, MySqlSerial;
|
30145
30183
|
var init_serial2 = __esm({
|
30146
|
-
"../
|
30184
|
+
"../drizzle-orm/dist/mysql-core/columns/serial.js"() {
|
30147
30185
|
"use strict";
|
30148
30186
|
init_entity();
|
30149
30187
|
init_common4();
|
@@ -30174,10 +30212,10 @@ var init_serial2 = __esm({
|
|
30174
30212
|
}
|
30175
30213
|
});
|
30176
30214
|
|
30177
|
-
// ../
|
30215
|
+
// ../drizzle-orm/dist/mysql-core/columns/smallint.js
|
30178
30216
|
var _a273, _b199, MySqlSmallIntBuilder, _a274, _b200, MySqlSmallInt;
|
30179
30217
|
var init_smallint2 = __esm({
|
30180
|
-
"../
|
30218
|
+
"../drizzle-orm/dist/mysql-core/columns/smallint.js"() {
|
30181
30219
|
"use strict";
|
30182
30220
|
init_entity();
|
30183
30221
|
init_common4();
|
@@ -30210,10 +30248,10 @@ var init_smallint2 = __esm({
|
|
30210
30248
|
}
|
30211
30249
|
});
|
30212
30250
|
|
30213
|
-
// ../
|
30251
|
+
// ../drizzle-orm/dist/mysql-core/columns/text.js
|
30214
30252
|
var _a275, _b201, MySqlTextBuilder, _a276, _b202, MySqlText;
|
30215
30253
|
var init_text3 = __esm({
|
30216
|
-
"../
|
30254
|
+
"../drizzle-orm/dist/mysql-core/columns/text.js"() {
|
30217
30255
|
"use strict";
|
30218
30256
|
init_entity();
|
30219
30257
|
init_common4();
|
@@ -30243,10 +30281,10 @@ var init_text3 = __esm({
|
|
30243
30281
|
}
|
30244
30282
|
});
|
30245
30283
|
|
30246
|
-
// ../
|
30284
|
+
// ../drizzle-orm/dist/mysql-core/columns/time.js
|
30247
30285
|
var _a277, _b203, MySqlTimeBuilder, _a278, _b204, MySqlTime;
|
30248
30286
|
var init_time2 = __esm({
|
30249
|
-
"../
|
30287
|
+
"../drizzle-orm/dist/mysql-core/columns/time.js"() {
|
30250
30288
|
"use strict";
|
30251
30289
|
init_entity();
|
30252
30290
|
init_common4();
|
@@ -30275,10 +30313,10 @@ var init_time2 = __esm({
|
|
30275
30313
|
}
|
30276
30314
|
});
|
30277
30315
|
|
30278
|
-
// ../
|
30316
|
+
// ../drizzle-orm/dist/mysql-core/columns/date.common.js
|
30279
30317
|
var _a279, _b205, MySqlDateColumnBaseBuilder, _a280, _b206, MySqlDateBaseColumn;
|
30280
30318
|
var init_date_common2 = __esm({
|
30281
|
-
"../
|
30319
|
+
"../drizzle-orm/dist/mysql-core/columns/date.common.js"() {
|
30282
30320
|
"use strict";
|
30283
30321
|
init_entity();
|
30284
30322
|
init_sql();
|
@@ -30305,10 +30343,10 @@ var init_date_common2 = __esm({
|
|
30305
30343
|
}
|
30306
30344
|
});
|
30307
30345
|
|
30308
|
-
// ../
|
30346
|
+
// ../drizzle-orm/dist/mysql-core/columns/timestamp.js
|
30309
30347
|
var _a281, _b207, MySqlTimestampBuilder, _a282, _b208, MySqlTimestamp, _a283, _b209, MySqlTimestampStringBuilder, _a284, _b210, MySqlTimestampString;
|
30310
30348
|
var init_timestamp2 = __esm({
|
30311
|
-
"../
|
30349
|
+
"../drizzle-orm/dist/mysql-core/columns/timestamp.js"() {
|
30312
30350
|
"use strict";
|
30313
30351
|
init_entity();
|
30314
30352
|
init_date_common2();
|
@@ -30371,10 +30409,10 @@ var init_timestamp2 = __esm({
|
|
30371
30409
|
}
|
30372
30410
|
});
|
30373
30411
|
|
30374
|
-
// ../
|
30412
|
+
// ../drizzle-orm/dist/mysql-core/columns/tinyint.js
|
30375
30413
|
var _a285, _b211, MySqlTinyIntBuilder, _a286, _b212, MySqlTinyInt;
|
30376
30414
|
var init_tinyint = __esm({
|
30377
|
-
"../
|
30415
|
+
"../drizzle-orm/dist/mysql-core/columns/tinyint.js"() {
|
30378
30416
|
"use strict";
|
30379
30417
|
init_entity();
|
30380
30418
|
init_common4();
|
@@ -30407,10 +30445,10 @@ var init_tinyint = __esm({
|
|
30407
30445
|
}
|
30408
30446
|
});
|
30409
30447
|
|
30410
|
-
// ../
|
30448
|
+
// ../drizzle-orm/dist/mysql-core/columns/varbinary.js
|
30411
30449
|
var _a287, _b213, MySqlVarBinaryBuilder, _a288, _b214, MySqlVarBinary;
|
30412
30450
|
var init_varbinary = __esm({
|
30413
|
-
"../
|
30451
|
+
"../drizzle-orm/dist/mysql-core/columns/varbinary.js"() {
|
30414
30452
|
"use strict";
|
30415
30453
|
init_entity();
|
30416
30454
|
init_common4();
|
@@ -30442,10 +30480,10 @@ var init_varbinary = __esm({
|
|
30442
30480
|
}
|
30443
30481
|
});
|
30444
30482
|
|
30445
|
-
// ../
|
30483
|
+
// ../drizzle-orm/dist/mysql-core/columns/varchar.js
|
30446
30484
|
var _a289, _b215, MySqlVarCharBuilder, _a290, _b216, MySqlVarChar;
|
30447
30485
|
var init_varchar2 = __esm({
|
30448
|
-
"../
|
30486
|
+
"../drizzle-orm/dist/mysql-core/columns/varchar.js"() {
|
30449
30487
|
"use strict";
|
30450
30488
|
init_entity();
|
30451
30489
|
init_common4();
|
@@ -30479,10 +30517,10 @@ var init_varchar2 = __esm({
|
|
30479
30517
|
}
|
30480
30518
|
});
|
30481
30519
|
|
30482
|
-
// ../
|
30520
|
+
// ../drizzle-orm/dist/mysql-core/columns/year.js
|
30483
30521
|
var _a291, _b217, MySqlYearBuilder, _a292, _b218, MySqlYear;
|
30484
30522
|
var init_year = __esm({
|
30485
|
-
"../
|
30523
|
+
"../drizzle-orm/dist/mysql-core/columns/year.js"() {
|
30486
30524
|
"use strict";
|
30487
30525
|
init_entity();
|
30488
30526
|
init_common4();
|
@@ -30505,9 +30543,9 @@ var init_year = __esm({
|
|
30505
30543
|
}
|
30506
30544
|
});
|
30507
30545
|
|
30508
|
-
// ../
|
30546
|
+
// ../drizzle-orm/dist/mysql-core/columns/index.js
|
30509
30547
|
var init_columns3 = __esm({
|
30510
|
-
"../
|
30548
|
+
"../drizzle-orm/dist/mysql-core/columns/index.js"() {
|
30511
30549
|
"use strict";
|
30512
30550
|
init_bigint2();
|
30513
30551
|
init_binary();
|
@@ -30537,10 +30575,10 @@ var init_columns3 = __esm({
|
|
30537
30575
|
}
|
30538
30576
|
});
|
30539
30577
|
|
30540
|
-
// ../
|
30578
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/delete.js
|
30541
30579
|
var _a293, _b219, MySqlDeleteBase;
|
30542
30580
|
var init_delete3 = __esm({
|
30543
|
-
"../
|
30581
|
+
"../drizzle-orm/dist/mysql-core/query-builders/delete.js"() {
|
30544
30582
|
"use strict";
|
30545
30583
|
init_entity();
|
30546
30584
|
init_query_promise();
|
@@ -30618,10 +30656,10 @@ var init_delete3 = __esm({
|
|
30618
30656
|
}
|
30619
30657
|
});
|
30620
30658
|
|
30621
|
-
// ../
|
30659
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/insert.js
|
30622
30660
|
var _a294, MySqlInsertBuilder, _a295, _b220, MySqlInsertBase;
|
30623
30661
|
var init_insert3 = __esm({
|
30624
|
-
"../
|
30662
|
+
"../drizzle-orm/dist/mysql-core/query-builders/insert.js"() {
|
30625
30663
|
"use strict";
|
30626
30664
|
init_entity();
|
30627
30665
|
init_query_promise();
|
@@ -30647,7 +30685,7 @@ var init_insert3 = __esm({
|
|
30647
30685
|
}
|
30648
30686
|
const mappedValues = values.map((entry) => {
|
30649
30687
|
const result = {};
|
30650
|
-
const cols = this.table[
|
30688
|
+
const cols = this.table[Table2.Symbol.Columns];
|
30651
30689
|
for (const colKey of Object.keys(entry)) {
|
30652
30690
|
const colValue = entry[colKey];
|
30653
30691
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -30709,12 +30747,12 @@ var init_insert3 = __esm({
|
|
30709
30747
|
}
|
30710
30748
|
$returningId() {
|
30711
30749
|
const returning = [];
|
30712
|
-
for (const [key, value] of Object.entries(this.config.table[
|
30750
|
+
for (const [key, value] of Object.entries(this.config.table[Table2.Symbol.Columns])) {
|
30713
30751
|
if (value.primary) {
|
30714
30752
|
returning.push({ field: value, path: [key] });
|
30715
30753
|
}
|
30716
30754
|
}
|
30717
|
-
this.config.returning = orderSelectedFields(this.config.table[
|
30755
|
+
this.config.returning = orderSelectedFields(this.config.table[Table2.Symbol.Columns]);
|
30718
30756
|
return this;
|
30719
30757
|
}
|
30720
30758
|
/** @internal */
|
@@ -30743,10 +30781,10 @@ var init_insert3 = __esm({
|
|
30743
30781
|
}
|
30744
30782
|
});
|
30745
30783
|
|
30746
|
-
// ../
|
30784
|
+
// ../drizzle-orm/dist/mysql-core/view-base.js
|
30747
30785
|
var _a296, _b221, MySqlViewBase;
|
30748
30786
|
var init_view_base3 = __esm({
|
30749
|
-
"../
|
30787
|
+
"../drizzle-orm/dist/mysql-core/view-base.js"() {
|
30750
30788
|
"use strict";
|
30751
30789
|
init_entity();
|
30752
30790
|
init_sql();
|
@@ -30756,10 +30794,10 @@ var init_view_base3 = __esm({
|
|
30756
30794
|
}
|
30757
30795
|
});
|
30758
30796
|
|
30759
|
-
// ../
|
30797
|
+
// ../drizzle-orm/dist/mysql-core/dialect.js
|
30760
30798
|
var _a297, MySqlDialect;
|
30761
30799
|
var init_dialect3 = __esm({
|
30762
|
-
"../
|
30800
|
+
"../drizzle-orm/dist/mysql-core/dialect.js"() {
|
30763
30801
|
"use strict";
|
30764
30802
|
init_alias();
|
30765
30803
|
init_column();
|
@@ -30833,7 +30871,7 @@ var init_dialect3 = __esm({
|
|
30833
30871
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
30834
30872
|
}
|
30835
30873
|
buildUpdateSet(table4, set) {
|
30836
|
-
const tableColumns = table4[
|
30874
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
30837
30875
|
const columnNames = Object.keys(tableColumns).filter(
|
30838
30876
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
30839
30877
|
);
|
@@ -30891,7 +30929,7 @@ var init_dialect3 = __esm({
|
|
30891
30929
|
if (is(field, SQL.Aliased)) {
|
30892
30930
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
30893
30931
|
}
|
30894
|
-
} else if (is(field,
|
30932
|
+
} else if (is(field, Column2)) {
|
30895
30933
|
if (isSingleTable) {
|
30896
30934
|
chunk.push(sql.identifier(field.name));
|
30897
30935
|
} else {
|
@@ -30923,8 +30961,8 @@ var init_dialect3 = __esm({
|
|
30923
30961
|
}) {
|
30924
30962
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
30925
30963
|
for (const f of fieldsList) {
|
30926
|
-
if (is(f.field,
|
30927
|
-
({ alias }) => alias === (table22[
|
30964
|
+
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(
|
30965
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
30928
30966
|
))(f.field.table)) {
|
30929
30967
|
const tableName = getTableName(f.field.table);
|
30930
30968
|
throw new Error(
|
@@ -30937,8 +30975,8 @@ var init_dialect3 = __esm({
|
|
30937
30975
|
const distinctSql = distinct ? sql` distinct` : void 0;
|
30938
30976
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
30939
30977
|
const tableSql = (() => {
|
30940
|
-
if (is(table4,
|
30941
|
-
return sql`${sql.identifier(table4[
|
30978
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
30979
|
+
return sql`${sql.identifier(table4[Table2.Symbol.OriginalName])} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
30942
30980
|
}
|
30943
30981
|
return table4;
|
30944
30982
|
})();
|
@@ -31051,7 +31089,7 @@ var init_dialect3 = __esm({
|
|
31051
31089
|
}
|
31052
31090
|
buildInsertQuery({ table: table4, values, ignore, onConflict }) {
|
31053
31091
|
const valuesSqlList = [];
|
31054
|
-
const columns = table4[
|
31092
|
+
const columns = table4[Table2.Symbol.Columns];
|
31055
31093
|
const colEntries = Object.entries(columns).filter(
|
31056
31094
|
([_2, col]) => !col.shouldDisableInsert()
|
31057
31095
|
);
|
@@ -31179,7 +31217,7 @@ var init_dialect3 = __esm({
|
|
31179
31217
|
selection.push({
|
31180
31218
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
31181
31219
|
tsKey,
|
31182
|
-
field: is(value,
|
31220
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
31183
31221
|
relationTableTsKey: void 0,
|
31184
31222
|
isJson: false,
|
31185
31223
|
selection: []
|
@@ -31190,7 +31228,7 @@ var init_dialect3 = __esm({
|
|
31190
31228
|
orderByOrig = [orderByOrig];
|
31191
31229
|
}
|
31192
31230
|
orderBy = orderByOrig.map((orderByValue) => {
|
31193
|
-
if (is(orderByValue,
|
31231
|
+
if (is(orderByValue, Column2)) {
|
31194
31232
|
return aliasedTableColumn(orderByValue, tableAlias);
|
31195
31233
|
}
|
31196
31234
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -31298,7 +31336,7 @@ var init_dialect3 = __esm({
|
|
31298
31336
|
fields: {},
|
31299
31337
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
31300
31338
|
path: [],
|
31301
|
-
field: is(field2,
|
31339
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
31302
31340
|
})),
|
31303
31341
|
joins,
|
31304
31342
|
where,
|
@@ -31313,7 +31351,7 @@ var init_dialect3 = __esm({
|
|
31313
31351
|
fields: {},
|
31314
31352
|
fieldsFlat: selection.map(({ field }) => ({
|
31315
31353
|
path: [],
|
31316
|
-
field: is(field,
|
31354
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
31317
31355
|
})),
|
31318
31356
|
joins,
|
31319
31357
|
where,
|
@@ -31403,7 +31441,7 @@ var init_dialect3 = __esm({
|
|
31403
31441
|
selection.push({
|
31404
31442
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
31405
31443
|
tsKey,
|
31406
|
-
field: is(value,
|
31444
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
31407
31445
|
relationTableTsKey: void 0,
|
31408
31446
|
isJson: false,
|
31409
31447
|
selection: []
|
@@ -31414,7 +31452,7 @@ var init_dialect3 = __esm({
|
|
31414
31452
|
orderByOrig = [orderByOrig];
|
31415
31453
|
}
|
31416
31454
|
orderBy = orderByOrig.map((orderByValue) => {
|
31417
|
-
if (is(orderByValue,
|
31455
|
+
if (is(orderByValue, Column2)) {
|
31418
31456
|
return aliasedTableColumn(orderByValue, tableAlias);
|
31419
31457
|
}
|
31420
31458
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -31521,7 +31559,7 @@ var init_dialect3 = __esm({
|
|
31521
31559
|
fields: {},
|
31522
31560
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
31523
31561
|
path: [],
|
31524
|
-
field: is(field2,
|
31562
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
31525
31563
|
})),
|
31526
31564
|
where,
|
31527
31565
|
limit,
|
@@ -31535,7 +31573,7 @@ var init_dialect3 = __esm({
|
|
31535
31573
|
fields: {},
|
31536
31574
|
fieldsFlat: selection.map(({ field }) => ({
|
31537
31575
|
path: [],
|
31538
|
-
field: is(field,
|
31576
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
31539
31577
|
})),
|
31540
31578
|
where,
|
31541
31579
|
limit,
|
@@ -31555,7 +31593,7 @@ var init_dialect3 = __esm({
|
|
31555
31593
|
}
|
31556
31594
|
});
|
31557
31595
|
|
31558
|
-
// ../
|
31596
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/select.js
|
31559
31597
|
function createSetOperator3(type, isAll) {
|
31560
31598
|
return (leftSelect, rightSelect, ...restSelects) => {
|
31561
31599
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -31575,7 +31613,7 @@ function createSetOperator3(type, isAll) {
|
|
31575
31613
|
}
|
31576
31614
|
var _a298, MySqlSelectBuilder, _a299, _b222, MySqlSelectQueryBuilderBase, _a300, _b223, MySqlSelectBase, getMySqlSetOperators, union3, unionAll3, intersect3, intersectAll2, except3, exceptAll2;
|
31577
31615
|
var init_select4 = __esm({
|
31578
|
-
"../
|
31616
|
+
"../drizzle-orm/dist/mysql-core/query-builders/select.js"() {
|
31579
31617
|
"use strict";
|
31580
31618
|
init_entity();
|
31581
31619
|
init_query_builder();
|
@@ -31973,7 +32011,7 @@ var init_select4 = __esm({
|
|
31973
32011
|
};
|
31974
32012
|
}
|
31975
32013
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
31976
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
32014
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
31977
32015
|
this.config.fields[tableName] = selection;
|
31978
32016
|
}
|
31979
32017
|
}
|
@@ -32279,10 +32317,10 @@ var init_select4 = __esm({
|
|
32279
32317
|
}
|
32280
32318
|
});
|
32281
32319
|
|
32282
|
-
// ../
|
32320
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/query-builder.js
|
32283
32321
|
var _a301, QueryBuilder3;
|
32284
32322
|
var init_query_builder4 = __esm({
|
32285
|
-
"../
|
32323
|
+
"../drizzle-orm/dist/mysql-core/query-builders/query-builder.js"() {
|
32286
32324
|
"use strict";
|
32287
32325
|
init_entity();
|
32288
32326
|
init_dialect3();
|
@@ -32352,17 +32390,17 @@ var init_query_builder4 = __esm({
|
|
32352
32390
|
}
|
32353
32391
|
});
|
32354
32392
|
|
32355
|
-
// ../
|
32393
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/select.types.js
|
32356
32394
|
var init_select_types3 = __esm({
|
32357
|
-
"../
|
32395
|
+
"../drizzle-orm/dist/mysql-core/query-builders/select.types.js"() {
|
32358
32396
|
"use strict";
|
32359
32397
|
}
|
32360
32398
|
});
|
32361
32399
|
|
32362
|
-
// ../
|
32400
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/update.js
|
32363
32401
|
var _a302, MySqlUpdateBuilder, _a303, _b224, MySqlUpdateBase;
|
32364
32402
|
var init_update3 = __esm({
|
32365
|
-
"../
|
32403
|
+
"../drizzle-orm/dist/mysql-core/query-builders/update.js"() {
|
32366
32404
|
"use strict";
|
32367
32405
|
init_entity();
|
32368
32406
|
init_query_promise();
|
@@ -32457,9 +32495,9 @@ var init_update3 = __esm({
|
|
32457
32495
|
}
|
32458
32496
|
});
|
32459
32497
|
|
32460
|
-
// ../
|
32498
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/index.js
|
32461
32499
|
var init_query_builders3 = __esm({
|
32462
|
-
"../
|
32500
|
+
"../drizzle-orm/dist/mysql-core/query-builders/index.js"() {
|
32463
32501
|
"use strict";
|
32464
32502
|
init_delete3();
|
32465
32503
|
init_insert3();
|
@@ -32470,10 +32508,10 @@ var init_query_builders3 = __esm({
|
|
32470
32508
|
}
|
32471
32509
|
});
|
32472
32510
|
|
32473
|
-
// ../
|
32511
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/query.js
|
32474
32512
|
var _a304, RelationalQueryBuilder3, _a305, _b225, MySqlRelationalQuery;
|
32475
32513
|
var init_query3 = __esm({
|
32476
|
-
"../
|
32514
|
+
"../drizzle-orm/dist/mysql-core/query-builders/query.js"() {
|
32477
32515
|
"use strict";
|
32478
32516
|
init_entity();
|
32479
32517
|
init_query_promise();
|
@@ -32588,10 +32626,10 @@ var init_query3 = __esm({
|
|
32588
32626
|
}
|
32589
32627
|
});
|
32590
32628
|
|
32591
|
-
// ../
|
32629
|
+
// ../drizzle-orm/dist/mysql-core/db.js
|
32592
32630
|
var _a306, MySqlDatabase;
|
32593
32631
|
var init_db3 = __esm({
|
32594
|
-
"../
|
32632
|
+
"../drizzle-orm/dist/mysql-core/db.js"() {
|
32595
32633
|
"use strict";
|
32596
32634
|
init_entity();
|
32597
32635
|
init_selection_proxy();
|
@@ -32811,10 +32849,10 @@ var init_db3 = __esm({
|
|
32811
32849
|
}
|
32812
32850
|
});
|
32813
32851
|
|
32814
|
-
// ../
|
32852
|
+
// ../drizzle-orm/dist/mysql-core/indexes.js
|
32815
32853
|
var _a307, IndexBuilderOn3, _a308, IndexBuilder3, _a309, Index5;
|
32816
32854
|
var init_indexes3 = __esm({
|
32817
|
-
"../
|
32855
|
+
"../drizzle-orm/dist/mysql-core/indexes.js"() {
|
32818
32856
|
"use strict";
|
32819
32857
|
init_entity();
|
32820
32858
|
_a307 = entityKind;
|
@@ -32868,10 +32906,10 @@ var init_indexes3 = __esm({
|
|
32868
32906
|
}
|
32869
32907
|
});
|
32870
32908
|
|
32871
|
-
// ../
|
32909
|
+
// ../drizzle-orm/dist/mysql-core/primary-keys.js
|
32872
32910
|
var _a310, PrimaryKeyBuilder3, _a311, PrimaryKey3;
|
32873
32911
|
var init_primary_keys3 = __esm({
|
32874
|
-
"../
|
32912
|
+
"../drizzle-orm/dist/mysql-core/primary-keys.js"() {
|
32875
32913
|
"use strict";
|
32876
32914
|
init_entity();
|
32877
32915
|
init_table4();
|
@@ -32908,16 +32946,16 @@ var init_primary_keys3 = __esm({
|
|
32908
32946
|
}
|
32909
32947
|
});
|
32910
32948
|
|
32911
|
-
// ../
|
32949
|
+
// ../drizzle-orm/dist/mysql-core/view-common.js
|
32912
32950
|
var MySqlViewConfig;
|
32913
32951
|
var init_view_common4 = __esm({
|
32914
|
-
"../
|
32952
|
+
"../drizzle-orm/dist/mysql-core/view-common.js"() {
|
32915
32953
|
"use strict";
|
32916
32954
|
MySqlViewConfig = Symbol.for("drizzle:MySqlViewConfig");
|
32917
32955
|
}
|
32918
32956
|
});
|
32919
32957
|
|
32920
|
-
// ../
|
32958
|
+
// ../drizzle-orm/dist/mysql-core/view.js
|
32921
32959
|
function mysqlViewWithSchema(name2, selection, schema4) {
|
32922
32960
|
if (selection) {
|
32923
32961
|
return new ManualViewBuilder3(name2, selection, schema4);
|
@@ -32926,7 +32964,7 @@ function mysqlViewWithSchema(name2, selection, schema4) {
|
|
32926
32964
|
}
|
32927
32965
|
var _a312, ViewBuilderCore2, _a313, _b226, ViewBuilder3, _a314, _b227, ManualViewBuilder3, _a315, _b228, _c8, MySqlView;
|
32928
32966
|
var init_view3 = __esm({
|
32929
|
-
"../
|
32967
|
+
"../drizzle-orm/dist/mysql-core/view.js"() {
|
32930
32968
|
"use strict";
|
32931
32969
|
init_entity();
|
32932
32970
|
init_selection_proxy();
|
@@ -33044,16 +33082,16 @@ var init_view3 = __esm({
|
|
33044
33082
|
}
|
33045
33083
|
});
|
33046
33084
|
|
33047
|
-
// ../
|
33048
|
-
var _a316,
|
33085
|
+
// ../drizzle-orm/dist/mysql-core/schema.js
|
33086
|
+
var _a316, MySqlSchema5;
|
33049
33087
|
var init_schema2 = __esm({
|
33050
|
-
"../
|
33088
|
+
"../drizzle-orm/dist/mysql-core/schema.js"() {
|
33051
33089
|
"use strict";
|
33052
33090
|
init_entity();
|
33053
33091
|
init_table4();
|
33054
33092
|
init_view3();
|
33055
33093
|
_a316 = entityKind;
|
33056
|
-
|
33094
|
+
MySqlSchema5 = class {
|
33057
33095
|
constructor(schemaName) {
|
33058
33096
|
__publicField(this, "table", (name2, columns, extraConfig) => {
|
33059
33097
|
return mysqlTableWithSchema(name2, columns, extraConfig, this.schemaName);
|
@@ -33064,14 +33102,14 @@ var init_schema2 = __esm({
|
|
33064
33102
|
this.schemaName = schemaName;
|
33065
33103
|
}
|
33066
33104
|
};
|
33067
|
-
__publicField(
|
33105
|
+
__publicField(MySqlSchema5, _a316, "MySqlSchema");
|
33068
33106
|
}
|
33069
33107
|
});
|
33070
33108
|
|
33071
|
-
// ../
|
33109
|
+
// ../drizzle-orm/dist/mysql-core/session.js
|
33072
33110
|
var _a317, MySqlPreparedQuery, _a318, MySqlSession, _a319, _b229, MySqlTransaction;
|
33073
33111
|
var init_session3 = __esm({
|
33074
|
-
"../
|
33112
|
+
"../drizzle-orm/dist/mysql-core/session.js"() {
|
33075
33113
|
"use strict";
|
33076
33114
|
init_entity();
|
33077
33115
|
init_errors();
|
@@ -33101,7 +33139,7 @@ var init_session3 = __esm({
|
|
33101
33139
|
if (config.isolationLevel) {
|
33102
33140
|
parts.push(`isolation level ${config.isolationLevel}`);
|
33103
33141
|
}
|
33104
|
-
return parts.length ? sql
|
33142
|
+
return parts.length ? sql`set transaction ${sql.raw(parts.join(" "))}` : void 0;
|
33105
33143
|
}
|
33106
33144
|
getStartTransactionSQL(config) {
|
33107
33145
|
const parts = [];
|
@@ -33111,7 +33149,7 @@ var init_session3 = __esm({
|
|
33111
33149
|
if (config.accessMode) {
|
33112
33150
|
parts.push(config.accessMode);
|
33113
33151
|
}
|
33114
|
-
return parts.length ? sql
|
33152
|
+
return parts.length ? sql`start transaction ${sql.raw(parts.join(" "))}` : void 0;
|
33115
33153
|
}
|
33116
33154
|
};
|
33117
33155
|
__publicField(MySqlSession, _a318, "MySqlSession");
|
@@ -33129,14 +33167,14 @@ var init_session3 = __esm({
|
|
33129
33167
|
}
|
33130
33168
|
});
|
33131
33169
|
|
33132
|
-
// ../
|
33170
|
+
// ../drizzle-orm/dist/mysql-core/subquery.js
|
33133
33171
|
var init_subquery4 = __esm({
|
33134
|
-
"../
|
33172
|
+
"../drizzle-orm/dist/mysql-core/subquery.js"() {
|
33135
33173
|
"use strict";
|
33136
33174
|
}
|
33137
33175
|
});
|
33138
33176
|
|
33139
|
-
// ../
|
33177
|
+
// ../drizzle-orm/dist/mysql-core/utils.js
|
33140
33178
|
function getTableConfig3(table4) {
|
33141
33179
|
const columns = Object.values(table4[MySqlTable.Symbol.Columns]);
|
33142
33180
|
const indexes = [];
|
@@ -33144,9 +33182,9 @@ function getTableConfig3(table4) {
|
|
33144
33182
|
const primaryKeys = [];
|
33145
33183
|
const uniqueConstraints = [];
|
33146
33184
|
const foreignKeys = Object.values(table4[MySqlTable.Symbol.InlineForeignKeys]);
|
33147
|
-
const name2 = table4[
|
33148
|
-
const schema4 = table4[
|
33149
|
-
const baseName = table4[
|
33185
|
+
const name2 = table4[Table2.Symbol.Name];
|
33186
|
+
const schema4 = table4[Table2.Symbol.Schema];
|
33187
|
+
const baseName = table4[Table2.Symbol.BaseName];
|
33150
33188
|
const extraConfigBuilder = table4[MySqlTable.Symbol.ExtraConfigBuilder];
|
33151
33189
|
if (extraConfigBuilder !== void 0) {
|
33152
33190
|
const extraConfig = extraConfigBuilder(table4[MySqlTable.Symbol.Columns]);
|
@@ -33177,7 +33215,7 @@ function getTableConfig3(table4) {
|
|
33177
33215
|
};
|
33178
33216
|
}
|
33179
33217
|
var init_utils7 = __esm({
|
33180
|
-
"../
|
33218
|
+
"../drizzle-orm/dist/mysql-core/utils.js"() {
|
33181
33219
|
"use strict";
|
33182
33220
|
init_entity();
|
33183
33221
|
init_table();
|
@@ -33190,9 +33228,9 @@ var init_utils7 = __esm({
|
|
33190
33228
|
}
|
33191
33229
|
});
|
33192
33230
|
|
33193
|
-
// ../
|
33231
|
+
// ../drizzle-orm/dist/mysql-core/index.js
|
33194
33232
|
var init_mysql_core = __esm({
|
33195
|
-
"../
|
33233
|
+
"../drizzle-orm/dist/mysql-core/index.js"() {
|
33196
33234
|
"use strict";
|
33197
33235
|
init_alias4();
|
33198
33236
|
init_checks3();
|
@@ -33237,8 +33275,8 @@ var init_mysqlSerializer = __esm({
|
|
33237
33275
|
"src/serializer/mysqlSerializer.ts"() {
|
33238
33276
|
"use strict";
|
33239
33277
|
init_source();
|
33240
|
-
|
33241
|
-
|
33278
|
+
init_dist();
|
33279
|
+
init_dist();
|
33242
33280
|
init_mysql_core();
|
33243
33281
|
init_mysql_core();
|
33244
33282
|
init_outputs();
|
@@ -33765,6 +33803,200 @@ We have encountered a collision between the index name on columns ${source_defau
|
|
33765
33803
|
}
|
33766
33804
|
});
|
33767
33805
|
|
33806
|
+
// src/cli/validations/cli.ts
|
33807
|
+
var cliConfigGenerate, pushParams, pullParams, configCheck, cliConfigCheck;
|
33808
|
+
var init_cli = __esm({
|
33809
|
+
"src/cli/validations/cli.ts"() {
|
33810
|
+
"use strict";
|
33811
|
+
init_lib();
|
33812
|
+
init_schemaValidator();
|
33813
|
+
init_common();
|
33814
|
+
cliConfigGenerate = objectType({
|
33815
|
+
dialect: dialect3.optional(),
|
33816
|
+
schema: unionType([stringType(), stringType().array()]).optional(),
|
33817
|
+
out: stringType().optional().default("./drizzle"),
|
33818
|
+
config: stringType().optional(),
|
33819
|
+
name: stringType().optional(),
|
33820
|
+
prefix: prefix.optional(),
|
33821
|
+
breakpoints: booleanType().optional().default(true),
|
33822
|
+
custom: booleanType().optional().default(false)
|
33823
|
+
}).strict();
|
33824
|
+
pushParams = objectType({
|
33825
|
+
dialect: dialect3,
|
33826
|
+
schema: unionType([stringType(), stringType().array()]),
|
33827
|
+
tablesFilter: unionType([stringType(), stringType().array()]).optional(),
|
33828
|
+
schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
|
33829
|
+
extensionsFilters: literalType("postgis").array().optional(),
|
33830
|
+
verbose: booleanType().optional(),
|
33831
|
+
strict: booleanType().optional()
|
33832
|
+
}).passthrough();
|
33833
|
+
pullParams = objectType({
|
33834
|
+
config: stringType().optional(),
|
33835
|
+
dialect: dialect3,
|
33836
|
+
out: stringType().optional().default("drizzle"),
|
33837
|
+
tablesFilter: unionType([stringType(), stringType().array()]).optional(),
|
33838
|
+
schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
|
33839
|
+
extensionsFilters: literalType("postgis").array().optional(),
|
33840
|
+
introspectCasing: casing,
|
33841
|
+
breakpoints: booleanType().optional().default(true),
|
33842
|
+
database: objectType({
|
33843
|
+
prefix: prefix.optional().default("index")
|
33844
|
+
}).optional()
|
33845
|
+
}).passthrough();
|
33846
|
+
configCheck = objectType({
|
33847
|
+
dialect: dialect3.optional(),
|
33848
|
+
out: stringType().optional()
|
33849
|
+
});
|
33850
|
+
cliConfigCheck = intersectionType(
|
33851
|
+
objectType({
|
33852
|
+
config: stringType().optional()
|
33853
|
+
}),
|
33854
|
+
configCheck
|
33855
|
+
);
|
33856
|
+
}
|
33857
|
+
});
|
33858
|
+
|
33859
|
+
// src/cli/validations/mysql.ts
|
33860
|
+
var mysqlCredentials;
|
33861
|
+
var init_mysql = __esm({
|
33862
|
+
"src/cli/validations/mysql.ts"() {
|
33863
|
+
"use strict";
|
33864
|
+
init_lib();
|
33865
|
+
init_views();
|
33866
|
+
init_common();
|
33867
|
+
init_outputs();
|
33868
|
+
mysqlCredentials = unionType([
|
33869
|
+
objectType({
|
33870
|
+
host: stringType().min(1),
|
33871
|
+
port: coerce.number().min(1).optional(),
|
33872
|
+
user: stringType().min(1).optional(),
|
33873
|
+
password: stringType().min(1).optional(),
|
33874
|
+
database: stringType().min(1),
|
33875
|
+
ssl: unionType([
|
33876
|
+
stringType(),
|
33877
|
+
objectType({
|
33878
|
+
pfx: stringType().optional(),
|
33879
|
+
key: stringType().optional(),
|
33880
|
+
passphrase: stringType().optional(),
|
33881
|
+
cert: stringType().optional(),
|
33882
|
+
ca: unionType([stringType(), stringType().array()]).optional(),
|
33883
|
+
crl: unionType([stringType(), stringType().array()]).optional(),
|
33884
|
+
ciphers: stringType().optional(),
|
33885
|
+
rejectUnauthorized: booleanType().optional()
|
33886
|
+
})
|
33887
|
+
]).optional()
|
33888
|
+
}),
|
33889
|
+
objectType({
|
33890
|
+
url: stringType().min(1)
|
33891
|
+
})
|
33892
|
+
]);
|
33893
|
+
}
|
33894
|
+
});
|
33895
|
+
|
33896
|
+
// src/cli/validations/postgres.ts
|
33897
|
+
var postgresCredentials;
|
33898
|
+
var init_postgres = __esm({
|
33899
|
+
"src/cli/validations/postgres.ts"() {
|
33900
|
+
"use strict";
|
33901
|
+
init_lib();
|
33902
|
+
init_views();
|
33903
|
+
init_common();
|
33904
|
+
postgresCredentials = unionType([
|
33905
|
+
objectType({
|
33906
|
+
driver: undefinedType(),
|
33907
|
+
host: stringType().min(1),
|
33908
|
+
port: coerce.number().min(1).optional(),
|
33909
|
+
user: stringType().min(1).optional(),
|
33910
|
+
password: stringType().min(1).optional(),
|
33911
|
+
database: stringType().min(1),
|
33912
|
+
ssl: unionType([
|
33913
|
+
literalType("require"),
|
33914
|
+
literalType("allow"),
|
33915
|
+
literalType("prefer"),
|
33916
|
+
literalType("verify-full"),
|
33917
|
+
booleanType(),
|
33918
|
+
objectType({}).passthrough()
|
33919
|
+
]).optional()
|
33920
|
+
}).transform((o) => {
|
33921
|
+
delete o.driver;
|
33922
|
+
return o;
|
33923
|
+
}),
|
33924
|
+
objectType({
|
33925
|
+
driver: undefinedType(),
|
33926
|
+
url: stringType().min(1)
|
33927
|
+
}).transform((o) => {
|
33928
|
+
delete o.driver;
|
33929
|
+
return o;
|
33930
|
+
}),
|
33931
|
+
objectType({
|
33932
|
+
driver: literalType("aws-data-api"),
|
33933
|
+
database: stringType().min(1),
|
33934
|
+
secretArn: stringType().min(1),
|
33935
|
+
resourceArn: stringType().min(1)
|
33936
|
+
})
|
33937
|
+
]);
|
33938
|
+
}
|
33939
|
+
});
|
33940
|
+
|
33941
|
+
// src/cli/validations/sqlite.ts
|
33942
|
+
var sqliteCredentials;
|
33943
|
+
var init_sqlite = __esm({
|
33944
|
+
"src/cli/validations/sqlite.ts"() {
|
33945
|
+
"use strict";
|
33946
|
+
init_global();
|
33947
|
+
init_lib();
|
33948
|
+
init_views();
|
33949
|
+
init_common();
|
33950
|
+
sqliteCredentials = unionType([
|
33951
|
+
objectType({
|
33952
|
+
driver: literalType("turso"),
|
33953
|
+
url: stringType().min(1),
|
33954
|
+
authToken: stringType().min(1).optional()
|
33955
|
+
}),
|
33956
|
+
objectType({
|
33957
|
+
driver: literalType("d1-http"),
|
33958
|
+
accountId: stringType().min(1),
|
33959
|
+
databaseId: stringType().min(1),
|
33960
|
+
token: stringType().min(1)
|
33961
|
+
}),
|
33962
|
+
objectType({
|
33963
|
+
driver: undefinedType(),
|
33964
|
+
url: stringType().min(1)
|
33965
|
+
}).transform((o) => {
|
33966
|
+
delete o.driver;
|
33967
|
+
return o;
|
33968
|
+
})
|
33969
|
+
]);
|
33970
|
+
}
|
33971
|
+
});
|
33972
|
+
|
33973
|
+
// src/cli/validations/studio.ts
|
33974
|
+
var credentials, studioCliParams, studioConfig;
|
33975
|
+
var init_studio = __esm({
|
33976
|
+
"src/cli/validations/studio.ts"() {
|
33977
|
+
"use strict";
|
33978
|
+
init_lib();
|
33979
|
+
init_schemaValidator();
|
33980
|
+
init_mysql();
|
33981
|
+
init_postgres();
|
33982
|
+
init_sqlite();
|
33983
|
+
credentials = intersectionType(
|
33984
|
+
postgresCredentials,
|
33985
|
+
mysqlCredentials,
|
33986
|
+
sqliteCredentials
|
33987
|
+
);
|
33988
|
+
studioCliParams = objectType({
|
33989
|
+
port: coerce.number().optional().default(4983),
|
33990
|
+
host: stringType().optional().default("127.0.0.1"),
|
33991
|
+
config: stringType().optional()
|
33992
|
+
});
|
33993
|
+
studioConfig = objectType({
|
33994
|
+
dialect: dialect3,
|
33995
|
+
schema: unionType([stringType(), stringType().array()]).optional()
|
33996
|
+
});
|
33997
|
+
}
|
33998
|
+
});
|
33999
|
+
|
33768
34000
|
// src/cli/commands/_es5.ts
|
33769
34001
|
var es5_exports = {};
|
33770
34002
|
__export(es5_exports, {
|
@@ -33786,8 +34018,16 @@ var init_utils8 = __esm({
|
|
33786
34018
|
"use strict";
|
33787
34019
|
import_hanji7 = __toESM(require_hanji());
|
33788
34020
|
init_lib();
|
34021
|
+
init_global();
|
33789
34022
|
init_schemaValidator();
|
34023
|
+
init_serializer();
|
34024
|
+
init_cli();
|
33790
34025
|
init_common();
|
34026
|
+
init_mysql();
|
34027
|
+
init_outputs();
|
34028
|
+
init_postgres();
|
34029
|
+
init_sqlite();
|
34030
|
+
init_studio();
|
33791
34031
|
init_views();
|
33792
34032
|
assertES5 = async (unregister) => {
|
33793
34033
|
try {
|
@@ -33838,8 +34078,9 @@ var prepareFromExports;
|
|
33838
34078
|
var init_pgImports = __esm({
|
33839
34079
|
"src/serializer/pgImports.ts"() {
|
33840
34080
|
"use strict";
|
33841
|
-
|
34081
|
+
init_dist();
|
33842
34082
|
init_pg_core();
|
34083
|
+
init_utils8();
|
33843
34084
|
prepareFromExports = (exports2) => {
|
33844
34085
|
const tables = [];
|
33845
34086
|
const enums = [];
|
@@ -33854,7 +34095,7 @@ var init_pgImports = __esm({
|
|
33854
34095
|
if (is(t, PgTable)) {
|
33855
34096
|
tables.push(t);
|
33856
34097
|
}
|
33857
|
-
if (is(t,
|
34098
|
+
if (is(t, PgSchema5)) {
|
33858
34099
|
schemas.push(t);
|
33859
34100
|
}
|
33860
34101
|
if (isPgSequence(t)) {
|
@@ -33876,7 +34117,7 @@ var prepareFromExports2, prepareFromSqliteImports;
|
|
33876
34117
|
var init_sqliteImports = __esm({
|
33877
34118
|
"src/serializer/sqliteImports.ts"() {
|
33878
34119
|
"use strict";
|
33879
|
-
|
34120
|
+
init_dist();
|
33880
34121
|
init_sqlite_core();
|
33881
34122
|
init_utils8();
|
33882
34123
|
prepareFromExports2 = (exports2) => {
|
@@ -33914,7 +34155,7 @@ var prepareFromExports3, prepareFromMySqlImports;
|
|
33914
34155
|
var init_mysqlImports = __esm({
|
33915
34156
|
"src/serializer/mysqlImports.ts"() {
|
33916
34157
|
"use strict";
|
33917
|
-
|
34158
|
+
init_dist();
|
33918
34159
|
init_mysql_core();
|
33919
34160
|
init_utils8();
|
33920
34161
|
prepareFromExports3 = (exports2) => {
|
@@ -34545,6 +34786,7 @@ var pgSuggestions = async (db, statements) => {
|
|
34545
34786
|
|
34546
34787
|
// src/cli/commands/pgUp.ts
|
34547
34788
|
init_pgSchema();
|
34789
|
+
init_utils();
|
34548
34790
|
var updateUpToV6 = (json) => {
|
34549
34791
|
const schema4 = pgSchemaV5.parse(json);
|
34550
34792
|
const tables = Object.fromEntries(
|
@@ -34580,6 +34822,114 @@ var updateUpToV6 = (json) => {
|
|
34580
34822
|
var import_hanji6 = __toESM(require_hanji());
|
34581
34823
|
init_mjs();
|
34582
34824
|
init_global();
|
34825
|
+
|
34826
|
+
// ../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
|
34827
|
+
var UPPERCASE = /[\p{Lu}]/u;
|
34828
|
+
var LOWERCASE = /[\p{Ll}]/u;
|
34829
|
+
var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
34830
|
+
var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
34831
|
+
var SEPARATORS = /[_.\- ]+/;
|
34832
|
+
var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
|
34833
|
+
var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
34834
|
+
var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
34835
|
+
var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
34836
|
+
let isLastCharLower = false;
|
34837
|
+
let isLastCharUpper = false;
|
34838
|
+
let isLastLastCharUpper = false;
|
34839
|
+
let isLastLastCharPreserved = false;
|
34840
|
+
for (let index4 = 0; index4 < string.length; index4++) {
|
34841
|
+
const character = string[index4];
|
34842
|
+
isLastLastCharPreserved = index4 > 2 ? string[index4 - 3] === "-" : true;
|
34843
|
+
if (isLastCharLower && UPPERCASE.test(character)) {
|
34844
|
+
string = string.slice(0, index4) + "-" + string.slice(index4);
|
34845
|
+
isLastCharLower = false;
|
34846
|
+
isLastLastCharUpper = isLastCharUpper;
|
34847
|
+
isLastCharUpper = true;
|
34848
|
+
index4++;
|
34849
|
+
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
|
34850
|
+
string = string.slice(0, index4 - 1) + "-" + string.slice(index4 - 1);
|
34851
|
+
isLastLastCharUpper = isLastCharUpper;
|
34852
|
+
isLastCharUpper = false;
|
34853
|
+
isLastCharLower = true;
|
34854
|
+
} else {
|
34855
|
+
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
34856
|
+
isLastLastCharUpper = isLastCharUpper;
|
34857
|
+
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
34858
|
+
}
|
34859
|
+
}
|
34860
|
+
return string;
|
34861
|
+
};
|
34862
|
+
var preserveConsecutiveUppercase = (input, toLowerCase) => {
|
34863
|
+
LEADING_CAPITAL.lastIndex = 0;
|
34864
|
+
return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
|
34865
|
+
};
|
34866
|
+
var postProcess = (input, toUpperCase) => {
|
34867
|
+
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
34868
|
+
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
34869
|
+
return input.replace(SEPARATORS_AND_IDENTIFIER, (_2, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
|
34870
|
+
};
|
34871
|
+
function camelCase(input, options) {
|
34872
|
+
if (!(typeof input === "string" || Array.isArray(input))) {
|
34873
|
+
throw new TypeError("Expected the input to be `string | string[]`");
|
34874
|
+
}
|
34875
|
+
options = {
|
34876
|
+
pascalCase: false,
|
34877
|
+
preserveConsecutiveUppercase: false,
|
34878
|
+
...options
|
34879
|
+
};
|
34880
|
+
if (Array.isArray(input)) {
|
34881
|
+
input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
|
34882
|
+
} else {
|
34883
|
+
input = input.trim();
|
34884
|
+
}
|
34885
|
+
if (input.length === 0) {
|
34886
|
+
return "";
|
34887
|
+
}
|
34888
|
+
const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
|
34889
|
+
const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
|
34890
|
+
if (input.length === 1) {
|
34891
|
+
if (SEPARATORS.test(input)) {
|
34892
|
+
return "";
|
34893
|
+
}
|
34894
|
+
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
34895
|
+
}
|
34896
|
+
const hasUpperCase = input !== toLowerCase(input);
|
34897
|
+
if (hasUpperCase) {
|
34898
|
+
input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
|
34899
|
+
}
|
34900
|
+
input = input.replace(LEADING_SEPARATORS, "");
|
34901
|
+
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
34902
|
+
if (options.pascalCase) {
|
34903
|
+
input = toUpperCase(input.charAt(0)) + input.slice(1);
|
34904
|
+
}
|
34905
|
+
return postProcess(input, toUpperCase);
|
34906
|
+
}
|
34907
|
+
|
34908
|
+
// src/@types/utils.ts
|
34909
|
+
String.prototype.trimChar = function(char) {
|
34910
|
+
let start = 0;
|
34911
|
+
let end = this.length;
|
34912
|
+
while (start < end && this[start] === char) ++start;
|
34913
|
+
while (end > start && this[end - 1] === char) --end;
|
34914
|
+
return start > 0 || end < this.length ? this.substring(start, end) : this.toString();
|
34915
|
+
};
|
34916
|
+
String.prototype.squashSpaces = function() {
|
34917
|
+
return this.replace(/ +/g, " ").trim();
|
34918
|
+
};
|
34919
|
+
String.prototype.camelCase = function() {
|
34920
|
+
return camelCase(String(this));
|
34921
|
+
};
|
34922
|
+
String.prototype.capitalise = function() {
|
34923
|
+
return this && this.length > 0 ? `${this[0].toUpperCase()}${this.slice(1)}` : String(this);
|
34924
|
+
};
|
34925
|
+
String.prototype.concatIf = function(it, condition) {
|
34926
|
+
return condition ? `${this}${it}` : String(this);
|
34927
|
+
};
|
34928
|
+
Array.prototype.random = function() {
|
34929
|
+
return this[~~(Math.random() * this.length)];
|
34930
|
+
};
|
34931
|
+
|
34932
|
+
// src/cli/commands/sqliteIntrospect.ts
|
34583
34933
|
init_sqliteSerializer();
|
34584
34934
|
init_views();
|
34585
34935
|
var sqlitePushIntrospect = async (db, filters) => {
|
@@ -34937,7 +35287,7 @@ var generateMigration = async (prev, cur) => {
|
|
34937
35287
|
};
|
34938
35288
|
var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
|
34939
35289
|
const { applyPgSnapshotsDiff: applyPgSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
34940
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35290
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
34941
35291
|
const db = {
|
34942
35292
|
query: async (query, params) => {
|
34943
35293
|
const res = await drizzleInstance.execute(sql2.raw(query));
|
@@ -35007,7 +35357,7 @@ var generateSQLiteMigration = async (prev, cur) => {
|
|
35007
35357
|
};
|
35008
35358
|
var pushSQLiteSchema = async (imports, drizzleInstance) => {
|
35009
35359
|
const { applySqliteSnapshotsDiff: applySqliteSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
35010
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35360
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
35011
35361
|
const db = {
|
35012
35362
|
query: async (query, params) => {
|
35013
35363
|
const res = drizzleInstance.all(sql2.raw(query));
|
@@ -35084,7 +35434,7 @@ var pushMySQLSchema = async (imports, drizzleInstance, databaseName) => {
|
|
35084
35434
|
const { applyMysqlSnapshotsDiff: applyMysqlSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
35085
35435
|
const { logSuggestionsAndReturn: logSuggestionsAndReturn3 } = await Promise.resolve().then(() => (init_mysqlPushUtils(), mysqlPushUtils_exports));
|
35086
35436
|
const { mysqlPushIntrospect: mysqlPushIntrospect2 } = await Promise.resolve().then(() => (init_mysqlIntrospect(), mysqlIntrospect_exports));
|
35087
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35437
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
35088
35438
|
const db = {
|
35089
35439
|
query: async (query, params) => {
|
35090
35440
|
const res = await drizzleInstance.execute(sql2.raw(query));
|