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.mjs
CHANGED
@@ -3597,7 +3597,7 @@ function createZodEnum(values, params) {
|
|
3597
3597
|
...processCreateParams(params)
|
3598
3598
|
});
|
3599
3599
|
}
|
3600
|
-
var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType;
|
3600
|
+
var util, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, ZodError, errorMap, overrideErrorMap, makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv6Regex, base64Regex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, coerce;
|
3601
3601
|
var init_lib = __esm({
|
3602
3602
|
"../node_modules/.pnpm/zod@3.23.7/node_modules/zod/lib/index.mjs"() {
|
3603
3603
|
"use strict";
|
@@ -7189,6 +7189,16 @@ var init_lib = __esm({
|
|
7189
7189
|
nullableType = ZodNullable.create;
|
7190
7190
|
preprocessType = ZodEffects.createWithPreprocess;
|
7191
7191
|
pipelineType = ZodPipeline.create;
|
7192
|
+
coerce = {
|
7193
|
+
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
7194
|
+
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
7195
|
+
boolean: (arg) => ZodBoolean.create({
|
7196
|
+
...arg,
|
7197
|
+
coerce: true
|
7198
|
+
}),
|
7199
|
+
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
7200
|
+
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
7201
|
+
};
|
7192
7202
|
}
|
7193
7203
|
});
|
7194
7204
|
|
@@ -8337,6 +8347,11 @@ var copy, prepareMigrationMeta, schemaRenameKey, tableRenameKey, columnRenameKey
|
|
8337
8347
|
var init_utils = __esm({
|
8338
8348
|
"src/utils.ts"() {
|
8339
8349
|
"use strict";
|
8350
|
+
init_views();
|
8351
|
+
init_global();
|
8352
|
+
init_mysqlSchema();
|
8353
|
+
init_pgSchema();
|
8354
|
+
init_sqliteSchema();
|
8340
8355
|
copy = (it) => {
|
8341
8356
|
return JSON.parse(JSON.stringify(it));
|
8342
8357
|
};
|
@@ -8384,6 +8399,7 @@ var init_views = __esm({
|
|
8384
8399
|
"use strict";
|
8385
8400
|
init_source();
|
8386
8401
|
import_hanji = __toESM(require_hanji());
|
8402
|
+
init_utils();
|
8387
8403
|
warning = (msg) => {
|
8388
8404
|
(0, import_hanji.render)(`[${source_default.yellow("Warning")}] ${msg}`);
|
8389
8405
|
};
|
@@ -8580,6 +8596,7 @@ var init_serializer = __esm({
|
|
8580
8596
|
"src/serializer/index.ts"() {
|
8581
8597
|
"use strict";
|
8582
8598
|
glob = __toESM(require_glob());
|
8599
|
+
init_views();
|
8583
8600
|
sqlToStr = (sql2) => {
|
8584
8601
|
return sql2.toQuery({
|
8585
8602
|
escapeName: () => {
|
@@ -8601,6 +8618,10 @@ var fillPgSnapshot;
|
|
8601
8618
|
var init_migrationPreparator = __esm({
|
8602
8619
|
"src/migrationPreparator.ts"() {
|
8603
8620
|
"use strict";
|
8621
|
+
init_serializer();
|
8622
|
+
init_mysqlSchema();
|
8623
|
+
init_pgSchema();
|
8624
|
+
init_sqliteSchema();
|
8604
8625
|
fillPgSnapshot = ({
|
8605
8626
|
serialized,
|
8606
8627
|
id,
|
@@ -15798,6 +15819,13 @@ var init_snapshotsDiffer = __esm({
|
|
15798
15819
|
}
|
15799
15820
|
});
|
15800
15821
|
|
15822
|
+
// src/utils/words.ts
|
15823
|
+
var init_words = __esm({
|
15824
|
+
"src/utils/words.ts"() {
|
15825
|
+
"use strict";
|
15826
|
+
}
|
15827
|
+
});
|
15828
|
+
|
15801
15829
|
// src/schemaValidator.ts
|
15802
15830
|
var dialects, dialect3, commonSquashedSchema, commonSchema;
|
15803
15831
|
var init_schemaValidator = __esm({
|
@@ -15825,6 +15853,7 @@ var init_common = __esm({
|
|
15825
15853
|
"use strict";
|
15826
15854
|
init_lib();
|
15827
15855
|
init_schemaValidator();
|
15856
|
+
init_outputs();
|
15828
15857
|
sqliteDriversLiterals = [
|
15829
15858
|
literalType("turso"),
|
15830
15859
|
literalType("d1-http"),
|
@@ -15907,6 +15936,7 @@ var init_outputs = __esm({
|
|
15907
15936
|
"src/cli/validations/outputs.ts"() {
|
15908
15937
|
"use strict";
|
15909
15938
|
init_source();
|
15939
|
+
init_common();
|
15910
15940
|
withStyle = {
|
15911
15941
|
error: (str) => `${source_default.red(`${source_default.white.bgRed(" Invalid input ")} ${str}`)}`,
|
15912
15942
|
warning: (str) => `${source_default.white.bgGray(" Warning ")} ${str}`,
|
@@ -15923,8 +15953,16 @@ var import_hanji2, schemasResolver, tablesResolver, sequencesResolver, enumsReso
|
|
15923
15953
|
var init_migrate = __esm({
|
15924
15954
|
"src/cli/commands/migrate.ts"() {
|
15925
15955
|
"use strict";
|
15956
|
+
init_migrationPreparator();
|
15926
15957
|
init_source();
|
15927
15958
|
import_hanji2 = __toESM(require_hanji());
|
15959
|
+
init_mysqlSchema();
|
15960
|
+
init_pgSchema();
|
15961
|
+
init_sqliteSchema();
|
15962
|
+
init_snapshotsDiffer();
|
15963
|
+
init_utils();
|
15964
|
+
init_words();
|
15965
|
+
init_outputs();
|
15928
15966
|
init_views();
|
15929
15967
|
schemasResolver = async (input) => {
|
15930
15968
|
try {
|
@@ -17239,7 +17277,7 @@ var init_mjs = __esm({
|
|
17239
17277
|
}
|
17240
17278
|
});
|
17241
17279
|
|
17242
|
-
// ../
|
17280
|
+
// ../drizzle-orm/dist/entity.js
|
17243
17281
|
function is(value, type) {
|
17244
17282
|
if (!value || typeof value !== "object") {
|
17245
17283
|
return false;
|
@@ -17265,21 +17303,21 @@ function is(value, type) {
|
|
17265
17303
|
}
|
17266
17304
|
var entityKind, hasOwnEntityKind;
|
17267
17305
|
var init_entity = __esm({
|
17268
|
-
"../
|
17306
|
+
"../drizzle-orm/dist/entity.js"() {
|
17269
17307
|
"use strict";
|
17270
17308
|
entityKind = Symbol.for("drizzle:entityKind");
|
17271
17309
|
hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
17272
17310
|
}
|
17273
17311
|
});
|
17274
17312
|
|
17275
|
-
// ../
|
17276
|
-
var _a,
|
17313
|
+
// ../drizzle-orm/dist/column.js
|
17314
|
+
var _a, Column2;
|
17277
17315
|
var init_column = __esm({
|
17278
|
-
"../
|
17316
|
+
"../drizzle-orm/dist/column.js"() {
|
17279
17317
|
"use strict";
|
17280
17318
|
init_entity();
|
17281
17319
|
_a = entityKind;
|
17282
|
-
|
17320
|
+
Column2 = class {
|
17283
17321
|
constructor(table4, config) {
|
17284
17322
|
__publicField(this, "name");
|
17285
17323
|
__publicField(this, "primary");
|
@@ -17325,14 +17363,14 @@ var init_column = __esm({
|
|
17325
17363
|
return this.config.generated !== void 0 && this.config.generated.type !== "byDefault";
|
17326
17364
|
}
|
17327
17365
|
};
|
17328
|
-
__publicField(
|
17366
|
+
__publicField(Column2, _a, "Column");
|
17329
17367
|
}
|
17330
17368
|
});
|
17331
17369
|
|
17332
|
-
// ../
|
17370
|
+
// ../drizzle-orm/dist/column-builder.js
|
17333
17371
|
var _a2, ColumnBuilder;
|
17334
17372
|
var init_column_builder = __esm({
|
17335
|
-
"../
|
17373
|
+
"../drizzle-orm/dist/column-builder.js"() {
|
17336
17374
|
"use strict";
|
17337
17375
|
init_entity();
|
17338
17376
|
_a2 = entityKind;
|
@@ -17434,7 +17472,7 @@ var init_column_builder = __esm({
|
|
17434
17472
|
}
|
17435
17473
|
});
|
17436
17474
|
|
17437
|
-
// ../
|
17475
|
+
// ../drizzle-orm/dist/table.js
|
17438
17476
|
function isTable(table4) {
|
17439
17477
|
return typeof table4 === "object" && table4 !== null && IsDrizzleTable in table4;
|
17440
17478
|
}
|
@@ -17444,9 +17482,9 @@ function getTableName(table4) {
|
|
17444
17482
|
function getTableUniqueName(table4) {
|
17445
17483
|
return `${table4[Schema] ?? "public"}.${table4[TableName]}`;
|
17446
17484
|
}
|
17447
|
-
var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i,
|
17485
|
+
var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i, Table2;
|
17448
17486
|
var init_table = __esm({
|
17449
|
-
"../
|
17487
|
+
"../drizzle-orm/dist/table.js"() {
|
17450
17488
|
"use strict";
|
17451
17489
|
init_entity();
|
17452
17490
|
TableName = Symbol.for("drizzle:Name");
|
@@ -17459,7 +17497,7 @@ var init_table = __esm({
|
|
17459
17497
|
ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder");
|
17460
17498
|
IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable");
|
17461
17499
|
_i = entityKind, _h = TableName, _g = OriginalName, _f = Schema, _e = Columns, _d = ExtraConfigColumns, _c = BaseName, _b = IsAlias, _a3 = ExtraConfigBuilder;
|
17462
|
-
|
17500
|
+
Table2 = class {
|
17463
17501
|
constructor(name2, schema4, baseName) {
|
17464
17502
|
/**
|
17465
17503
|
* @internal
|
@@ -17491,9 +17529,9 @@ var init_table = __esm({
|
|
17491
17529
|
this[BaseName] = baseName;
|
17492
17530
|
}
|
17493
17531
|
};
|
17494
|
-
__publicField(
|
17532
|
+
__publicField(Table2, _i, "Table");
|
17495
17533
|
/** @internal */
|
17496
|
-
__publicField(
|
17534
|
+
__publicField(Table2, "Symbol", {
|
17497
17535
|
Name: TableName,
|
17498
17536
|
Schema,
|
17499
17537
|
OriginalName,
|
@@ -17506,7 +17544,7 @@ var init_table = __esm({
|
|
17506
17544
|
}
|
17507
17545
|
});
|
17508
17546
|
|
17509
|
-
// ../
|
17547
|
+
// ../drizzle-orm/dist/pg-core/table.js
|
17510
17548
|
function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name2) {
|
17511
17549
|
const rawTable = new PgTable(name2, schema4, baseName);
|
17512
17550
|
const builtColumns = Object.fromEntries(
|
@@ -17525,8 +17563,8 @@ function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name
|
|
17525
17563
|
})
|
17526
17564
|
);
|
17527
17565
|
const table4 = Object.assign(rawTable, builtColumns);
|
17528
|
-
table4[
|
17529
|
-
table4[
|
17566
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
17567
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig;
|
17530
17568
|
if (extraConfig) {
|
17531
17569
|
table4[PgTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
17532
17570
|
}
|
@@ -17534,12 +17572,12 @@ function pgTableWithSchema(name2, columns, extraConfig, schema4, baseName = name
|
|
17534
17572
|
}
|
17535
17573
|
var InlineForeignKeys, _a4, _b2, _c2, _d2, PgTable, pgTable;
|
17536
17574
|
var init_table2 = __esm({
|
17537
|
-
"../
|
17575
|
+
"../drizzle-orm/dist/pg-core/table.js"() {
|
17538
17576
|
"use strict";
|
17539
17577
|
init_entity();
|
17540
17578
|
init_table();
|
17541
17579
|
InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
17542
|
-
PgTable = class extends (_d2 =
|
17580
|
+
PgTable = class extends (_d2 = Table2, _c2 = entityKind, _b2 = InlineForeignKeys, _a4 = Table2.Symbol.ExtraConfigBuilder, _d2) {
|
17543
17581
|
constructor() {
|
17544
17582
|
super(...arguments);
|
17545
17583
|
/**@internal */
|
@@ -17550,7 +17588,7 @@ var init_table2 = __esm({
|
|
17550
17588
|
};
|
17551
17589
|
__publicField(PgTable, _c2, "PgTable");
|
17552
17590
|
/** @internal */
|
17553
|
-
__publicField(PgTable, "Symbol", Object.assign({},
|
17591
|
+
__publicField(PgTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
17554
17592
|
InlineForeignKeys
|
17555
17593
|
}));
|
17556
17594
|
pgTable = (name2, columns, extraConfig) => {
|
@@ -17559,10 +17597,10 @@ var init_table2 = __esm({
|
|
17559
17597
|
}
|
17560
17598
|
});
|
17561
17599
|
|
17562
|
-
// ../
|
17600
|
+
// ../drizzle-orm/dist/pg-core/foreign-keys.js
|
17563
17601
|
var _a5, ForeignKeyBuilder, _a6, ForeignKey;
|
17564
17602
|
var init_foreign_keys = __esm({
|
17565
|
-
"../
|
17603
|
+
"../drizzle-orm/dist/pg-core/foreign-keys.js"() {
|
17566
17604
|
"use strict";
|
17567
17605
|
init_entity();
|
17568
17606
|
init_table2();
|
@@ -17626,23 +17664,23 @@ var init_foreign_keys = __esm({
|
|
17626
17664
|
}
|
17627
17665
|
});
|
17628
17666
|
|
17629
|
-
// ../
|
17667
|
+
// ../drizzle-orm/dist/tracing-utils.js
|
17630
17668
|
function iife(fn, ...args) {
|
17631
17669
|
return fn(...args);
|
17632
17670
|
}
|
17633
17671
|
var init_tracing_utils = __esm({
|
17634
|
-
"../
|
17672
|
+
"../drizzle-orm/dist/tracing-utils.js"() {
|
17635
17673
|
"use strict";
|
17636
17674
|
}
|
17637
17675
|
});
|
17638
17676
|
|
17639
|
-
// ../
|
17677
|
+
// ../drizzle-orm/dist/pg-core/unique-constraint.js
|
17640
17678
|
function uniqueKeyName(table4, columns) {
|
17641
17679
|
return `${table4[PgTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
17642
17680
|
}
|
17643
17681
|
var _a7, UniqueConstraintBuilder, _a8, UniqueOnConstraintBuilder, _a9, UniqueConstraint;
|
17644
17682
|
var init_unique_constraint = __esm({
|
17645
|
-
"../
|
17683
|
+
"../drizzle-orm/dist/pg-core/unique-constraint.js"() {
|
17646
17684
|
"use strict";
|
17647
17685
|
init_entity();
|
17648
17686
|
init_table2();
|
@@ -17697,7 +17735,7 @@ var init_unique_constraint = __esm({
|
|
17697
17735
|
}
|
17698
17736
|
});
|
17699
17737
|
|
17700
|
-
// ../
|
17738
|
+
// ../drizzle-orm/dist/pg-core/utils/array.js
|
17701
17739
|
function parsePgArrayValue(arrayString, startFrom, inQuotes) {
|
17702
17740
|
for (let i = startFrom; i < arrayString.length; i++) {
|
17703
17741
|
const char = arrayString[i];
|
@@ -17773,15 +17811,15 @@ function makePgArray(array) {
|
|
17773
17811
|
}).join(",")}}`;
|
17774
17812
|
}
|
17775
17813
|
var init_array = __esm({
|
17776
|
-
"../
|
17814
|
+
"../drizzle-orm/dist/pg-core/utils/array.js"() {
|
17777
17815
|
"use strict";
|
17778
17816
|
}
|
17779
17817
|
});
|
17780
17818
|
|
17781
|
-
// ../
|
17819
|
+
// ../drizzle-orm/dist/pg-core/columns/common.js
|
17782
17820
|
var _a10, _b3, PgColumnBuilder, _a11, _b4, PgColumn, _a12, _b5, ExtraConfigColumn, _a13, IndexedColumn, _a14, _b6, PgArrayBuilder, _a15, _b7, _PgArray, PgArray;
|
17783
17821
|
var init_common2 = __esm({
|
17784
|
-
"../
|
17822
|
+
"../drizzle-orm/dist/pg-core/columns/common.js"() {
|
17785
17823
|
"use strict";
|
17786
17824
|
init_column_builder();
|
17787
17825
|
init_column();
|
@@ -17844,7 +17882,7 @@ var init_common2 = __esm({
|
|
17844
17882
|
}
|
17845
17883
|
};
|
17846
17884
|
__publicField(PgColumnBuilder, _a10, "PgColumnBuilder");
|
17847
|
-
PgColumn = class extends (_b4 =
|
17885
|
+
PgColumn = class extends (_b4 = Column2, _a11 = entityKind, _b4) {
|
17848
17886
|
constructor(table4, config) {
|
17849
17887
|
if (!config.uniqueName) {
|
17850
17888
|
config.uniqueName = uniqueKeyName(table4, [config.name]);
|
@@ -17982,7 +18020,7 @@ var init_common2 = __esm({
|
|
17982
18020
|
}
|
17983
18021
|
});
|
17984
18022
|
|
17985
|
-
// ../
|
18023
|
+
// ../drizzle-orm/dist/pg-core/columns/enum.js
|
17986
18024
|
function isPgEnum(obj) {
|
17987
18025
|
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
|
17988
18026
|
}
|
@@ -18000,7 +18038,7 @@ function pgEnumWithSchema(enumName, values, schema4) {
|
|
18000
18038
|
}
|
18001
18039
|
var isPgEnumSym, _a16, _b8, PgEnumColumnBuilder, _a17, _b9, PgEnumColumn;
|
18002
18040
|
var init_enum = __esm({
|
18003
|
-
"../
|
18041
|
+
"../drizzle-orm/dist/pg-core/columns/enum.js"() {
|
18004
18042
|
"use strict";
|
18005
18043
|
init_entity();
|
18006
18044
|
init_common2();
|
@@ -18034,10 +18072,10 @@ var init_enum = __esm({
|
|
18034
18072
|
}
|
18035
18073
|
});
|
18036
18074
|
|
18037
|
-
// ../
|
18075
|
+
// ../drizzle-orm/dist/subquery.js
|
18038
18076
|
var _a18, Subquery, _a19, _b10, WithSubquery;
|
18039
18077
|
var init_subquery = __esm({
|
18040
|
-
"../
|
18078
|
+
"../drizzle-orm/dist/subquery.js"() {
|
18041
18079
|
"use strict";
|
18042
18080
|
init_entity();
|
18043
18081
|
_a18 = entityKind;
|
@@ -18062,19 +18100,19 @@ var init_subquery = __esm({
|
|
18062
18100
|
}
|
18063
18101
|
});
|
18064
18102
|
|
18065
|
-
// ../
|
18103
|
+
// ../drizzle-orm/dist/version.js
|
18066
18104
|
var version;
|
18067
18105
|
var init_version = __esm({
|
18068
|
-
"../
|
18106
|
+
"../drizzle-orm/dist/version.js"() {
|
18069
18107
|
"use strict";
|
18070
|
-
version = "0.32.
|
18108
|
+
version = "0.32.2";
|
18071
18109
|
}
|
18072
18110
|
});
|
18073
18111
|
|
18074
|
-
// ../
|
18112
|
+
// ../drizzle-orm/dist/tracing.js
|
18075
18113
|
var otel, rawTracer, tracer;
|
18076
18114
|
var init_tracing = __esm({
|
18077
|
-
"../
|
18115
|
+
"../drizzle-orm/dist/tracing.js"() {
|
18078
18116
|
"use strict";
|
18079
18117
|
init_tracing_utils();
|
18080
18118
|
init_version();
|
@@ -18112,16 +18150,16 @@ var init_tracing = __esm({
|
|
18112
18150
|
}
|
18113
18151
|
});
|
18114
18152
|
|
18115
|
-
// ../
|
18153
|
+
// ../drizzle-orm/dist/view-common.js
|
18116
18154
|
var ViewBaseConfig;
|
18117
18155
|
var init_view_common = __esm({
|
18118
|
-
"../
|
18156
|
+
"../drizzle-orm/dist/view-common.js"() {
|
18119
18157
|
"use strict";
|
18120
18158
|
ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
18121
18159
|
}
|
18122
18160
|
});
|
18123
18161
|
|
18124
|
-
// ../
|
18162
|
+
// ../drizzle-orm/dist/sql/sql.js
|
18125
18163
|
function isSQLWrapper(value) {
|
18126
18164
|
return value !== null && value !== void 0 && typeof value.getSQL === "function";
|
18127
18165
|
}
|
@@ -18174,7 +18212,7 @@ function fillPlaceholders(params, values) {
|
|
18174
18212
|
}
|
18175
18213
|
var _a20, FakePrimitiveParam, _a21, StringChunk, _a22, _SQL, SQL, _a23, Name, noopDecoder, noopEncoder, noopMapper, _a24, Param, _a25, Placeholder, _a26, _b11, View;
|
18176
18214
|
var init_sql = __esm({
|
18177
|
-
"../
|
18215
|
+
"../drizzle-orm/dist/sql/sql.js"() {
|
18178
18216
|
"use strict";
|
18179
18217
|
init_entity();
|
18180
18218
|
init_enum();
|
@@ -18259,19 +18297,19 @@ var init_sql = __esm({
|
|
18259
18297
|
inlineParams: inlineParams || chunk.shouldInlineParams
|
18260
18298
|
});
|
18261
18299
|
}
|
18262
|
-
if (is(chunk,
|
18263
|
-
const schemaName = chunk[
|
18264
|
-
const tableName = chunk[
|
18300
|
+
if (is(chunk, Table2)) {
|
18301
|
+
const schemaName = chunk[Table2.Symbol.Schema];
|
18302
|
+
const tableName = chunk[Table2.Symbol.Name];
|
18265
18303
|
return {
|
18266
18304
|
sql: schemaName === void 0 ? escapeName(tableName) : escapeName(schemaName) + "." + escapeName(tableName),
|
18267
18305
|
params: []
|
18268
18306
|
};
|
18269
18307
|
}
|
18270
|
-
if (is(chunk,
|
18308
|
+
if (is(chunk, Column2)) {
|
18271
18309
|
if (_config.invokeSource === "indexes") {
|
18272
18310
|
return { sql: escapeName(chunk.name), params: [] };
|
18273
18311
|
}
|
18274
|
-
return { sql: escapeName(chunk.table[
|
18312
|
+
return { sql: escapeName(chunk.table[Table2.Symbol.Name]) + "." + escapeName(chunk.name), params: [] };
|
18275
18313
|
}
|
18276
18314
|
if (is(chunk, View)) {
|
18277
18315
|
const schemaName = chunk[ViewBaseConfig].schema;
|
@@ -18289,7 +18327,7 @@ var init_sql = __esm({
|
|
18289
18327
|
if (inlineParams) {
|
18290
18328
|
return { sql: this.mapInlineParam(mappedValue, config), params: [] };
|
18291
18329
|
}
|
18292
|
-
let typings;
|
18330
|
+
let typings = ["none"];
|
18293
18331
|
if (prepareTyping) {
|
18294
18332
|
typings = [prepareTyping(chunk.encoder)];
|
18295
18333
|
}
|
@@ -18331,7 +18369,7 @@ var init_sql = __esm({
|
|
18331
18369
|
if (inlineParams) {
|
18332
18370
|
return { sql: this.mapInlineParam(chunk, config), params: [] };
|
18333
18371
|
}
|
18334
|
-
return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk] };
|
18372
|
+
return { sql: escapeParam(paramStartIndex.value++, chunk), params: [chunk], typings: ["none"] };
|
18335
18373
|
}));
|
18336
18374
|
}
|
18337
18375
|
mapInlineParam(chunk, { escapeString }) {
|
@@ -18508,10 +18546,10 @@ var init_sql = __esm({
|
|
18508
18546
|
}
|
18509
18547
|
};
|
18510
18548
|
__publicField(View, _b11, "View");
|
18511
|
-
|
18549
|
+
Column2.prototype.getSQL = function() {
|
18512
18550
|
return new SQL([this]);
|
18513
18551
|
};
|
18514
|
-
|
18552
|
+
Table2.prototype.getSQL = function() {
|
18515
18553
|
return new SQL([this]);
|
18516
18554
|
};
|
18517
18555
|
Subquery.prototype.getSQL = function() {
|
@@ -18520,7 +18558,7 @@ var init_sql = __esm({
|
|
18520
18558
|
}
|
18521
18559
|
});
|
18522
18560
|
|
18523
|
-
// ../
|
18561
|
+
// ../drizzle-orm/dist/alias.js
|
18524
18562
|
function aliasedTable(table4, tableAlias) {
|
18525
18563
|
return new Proxy(table4, new TableAliasProxyHandler(tableAlias, false));
|
18526
18564
|
}
|
@@ -18538,7 +18576,7 @@ function mapColumnsInAliasedSQLToAlias(query, alias) {
|
|
18538
18576
|
}
|
18539
18577
|
function mapColumnsInSQLToAlias(query, alias) {
|
18540
18578
|
return sql.join(query.queryChunks.map((c) => {
|
18541
|
-
if (is(c,
|
18579
|
+
if (is(c, Column2)) {
|
18542
18580
|
return aliasedTableColumn(c, alias);
|
18543
18581
|
}
|
18544
18582
|
if (is(c, SQL)) {
|
@@ -18552,7 +18590,7 @@ function mapColumnsInSQLToAlias(query, alias) {
|
|
18552
18590
|
}
|
18553
18591
|
var _a27, ColumnAliasProxyHandler, _a28, TableAliasProxyHandler, _a29, RelationTableAliasProxyHandler;
|
18554
18592
|
var init_alias = __esm({
|
18555
|
-
"../
|
18593
|
+
"../drizzle-orm/dist/alias.js"() {
|
18556
18594
|
"use strict";
|
18557
18595
|
init_column();
|
18558
18596
|
init_entity();
|
@@ -18579,13 +18617,13 @@ var init_alias = __esm({
|
|
18579
18617
|
this.replaceOriginalName = replaceOriginalName;
|
18580
18618
|
}
|
18581
18619
|
get(target, prop) {
|
18582
|
-
if (prop ===
|
18620
|
+
if (prop === Table2.Symbol.IsAlias) {
|
18583
18621
|
return true;
|
18584
18622
|
}
|
18585
|
-
if (prop ===
|
18623
|
+
if (prop === Table2.Symbol.Name) {
|
18586
18624
|
return this.alias;
|
18587
18625
|
}
|
18588
|
-
if (this.replaceOriginalName && prop ===
|
18626
|
+
if (this.replaceOriginalName && prop === Table2.Symbol.OriginalName) {
|
18589
18627
|
return this.alias;
|
18590
18628
|
}
|
18591
18629
|
if (prop === ViewBaseConfig) {
|
@@ -18595,8 +18633,8 @@ var init_alias = __esm({
|
|
18595
18633
|
isAlias: true
|
18596
18634
|
};
|
18597
18635
|
}
|
18598
|
-
if (prop ===
|
18599
|
-
const columns = target[
|
18636
|
+
if (prop === Table2.Symbol.Columns) {
|
18637
|
+
const columns = target[Table2.Symbol.Columns];
|
18600
18638
|
if (!columns) {
|
18601
18639
|
return columns;
|
18602
18640
|
}
|
@@ -18610,7 +18648,7 @@ var init_alias = __esm({
|
|
18610
18648
|
return proxiedColumns;
|
18611
18649
|
}
|
18612
18650
|
const value = target[prop];
|
18613
|
-
if (is(value,
|
18651
|
+
if (is(value, Column2)) {
|
18614
18652
|
return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this)));
|
18615
18653
|
}
|
18616
18654
|
return value;
|
@@ -18633,10 +18671,10 @@ var init_alias = __esm({
|
|
18633
18671
|
}
|
18634
18672
|
});
|
18635
18673
|
|
18636
|
-
// ../
|
18674
|
+
// ../drizzle-orm/dist/errors.js
|
18637
18675
|
var _a30, _b12, DrizzleError, _a31, _b13, TransactionRollbackError;
|
18638
18676
|
var init_errors = __esm({
|
18639
|
-
"../
|
18677
|
+
"../drizzle-orm/dist/errors.js"() {
|
18640
18678
|
"use strict";
|
18641
18679
|
init_entity();
|
18642
18680
|
DrizzleError = class extends (_b12 = Error, _a30 = entityKind, _b12) {
|
@@ -18656,9 +18694,9 @@ var init_errors = __esm({
|
|
18656
18694
|
}
|
18657
18695
|
});
|
18658
18696
|
|
18659
|
-
// ../
|
18697
|
+
// ../drizzle-orm/dist/sql/expressions/conditions.js
|
18660
18698
|
function bindIfParam(value, column4) {
|
18661
|
-
if (isDriverValueEncoder(column4) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value,
|
18699
|
+
if (isDriverValueEncoder(column4) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column2) && !is(value, Table2) && !is(value, View)) {
|
18662
18700
|
return new Param(value, column4);
|
18663
18701
|
}
|
18664
18702
|
return value;
|
@@ -18784,7 +18822,7 @@ function arrayOverlaps(column4, values) {
|
|
18784
18822
|
}
|
18785
18823
|
var eq, ne, gt, gte, lt, lte;
|
18786
18824
|
var init_conditions = __esm({
|
18787
|
-
"../
|
18825
|
+
"../drizzle-orm/dist/sql/expressions/conditions.js"() {
|
18788
18826
|
"use strict";
|
18789
18827
|
init_column();
|
18790
18828
|
init_entity();
|
@@ -18811,7 +18849,7 @@ var init_conditions = __esm({
|
|
18811
18849
|
}
|
18812
18850
|
});
|
18813
18851
|
|
18814
|
-
// ../
|
18852
|
+
// ../drizzle-orm/dist/sql/expressions/select.js
|
18815
18853
|
function asc(column4) {
|
18816
18854
|
return sql`${column4} asc`;
|
18817
18855
|
}
|
@@ -18819,33 +18857,33 @@ function desc(column4) {
|
|
18819
18857
|
return sql`${column4} desc`;
|
18820
18858
|
}
|
18821
18859
|
var init_select = __esm({
|
18822
|
-
"../
|
18860
|
+
"../drizzle-orm/dist/sql/expressions/select.js"() {
|
18823
18861
|
"use strict";
|
18824
18862
|
init_sql();
|
18825
18863
|
}
|
18826
18864
|
});
|
18827
18865
|
|
18828
|
-
// ../
|
18866
|
+
// ../drizzle-orm/dist/sql/expressions/index.js
|
18829
18867
|
var init_expressions = __esm({
|
18830
|
-
"../
|
18868
|
+
"../drizzle-orm/dist/sql/expressions/index.js"() {
|
18831
18869
|
"use strict";
|
18832
18870
|
init_conditions();
|
18833
18871
|
init_select();
|
18834
18872
|
}
|
18835
18873
|
});
|
18836
18874
|
|
18837
|
-
// ../
|
18875
|
+
// ../drizzle-orm/dist/expressions.js
|
18838
18876
|
var init_expressions2 = __esm({
|
18839
|
-
"../
|
18877
|
+
"../drizzle-orm/dist/expressions.js"() {
|
18840
18878
|
"use strict";
|
18841
18879
|
init_expressions();
|
18842
18880
|
}
|
18843
18881
|
});
|
18844
18882
|
|
18845
|
-
// ../
|
18883
|
+
// ../drizzle-orm/dist/logger.js
|
18846
18884
|
var _a32, ConsoleLogWriter, _a33, DefaultLogger, _a34, NoopLogger;
|
18847
18885
|
var init_logger = __esm({
|
18848
|
-
"../
|
18886
|
+
"../drizzle-orm/dist/logger.js"() {
|
18849
18887
|
"use strict";
|
18850
18888
|
init_entity();
|
18851
18889
|
_a32 = entityKind;
|
@@ -18883,17 +18921,17 @@ var init_logger = __esm({
|
|
18883
18921
|
}
|
18884
18922
|
});
|
18885
18923
|
|
18886
|
-
// ../
|
18924
|
+
// ../drizzle-orm/dist/operations.js
|
18887
18925
|
var init_operations = __esm({
|
18888
|
-
"../
|
18926
|
+
"../drizzle-orm/dist/operations.js"() {
|
18889
18927
|
"use strict";
|
18890
18928
|
}
|
18891
18929
|
});
|
18892
18930
|
|
18893
|
-
// ../
|
18931
|
+
// ../drizzle-orm/dist/query-promise.js
|
18894
18932
|
var _a35, _b14, QueryPromise;
|
18895
18933
|
var init_query_promise = __esm({
|
18896
|
-
"../
|
18934
|
+
"../drizzle-orm/dist/query-promise.js"() {
|
18897
18935
|
"use strict";
|
18898
18936
|
init_entity();
|
18899
18937
|
_b14 = entityKind, _a35 = Symbol.toStringTag;
|
@@ -18924,10 +18962,10 @@ var init_query_promise = __esm({
|
|
18924
18962
|
}
|
18925
18963
|
});
|
18926
18964
|
|
18927
|
-
// ../
|
18965
|
+
// ../drizzle-orm/dist/pg-core/primary-keys.js
|
18928
18966
|
var _a36, PrimaryKeyBuilder, _a37, PrimaryKey;
|
18929
18967
|
var init_primary_keys = __esm({
|
18930
|
-
"../
|
18968
|
+
"../drizzle-orm/dist/pg-core/primary-keys.js"() {
|
18931
18969
|
"use strict";
|
18932
18970
|
init_entity();
|
18933
18971
|
init_table2();
|
@@ -18964,7 +19002,7 @@ var init_primary_keys = __esm({
|
|
18964
19002
|
}
|
18965
19003
|
});
|
18966
19004
|
|
18967
|
-
// ../
|
19005
|
+
// ../drizzle-orm/dist/relations.js
|
18968
19006
|
function getOperators() {
|
18969
19007
|
return {
|
18970
19008
|
and,
|
@@ -18999,33 +19037,33 @@ function getOrderByOperators() {
|
|
18999
19037
|
};
|
19000
19038
|
}
|
19001
19039
|
function extractTablesRelationalConfig(schema4, configHelpers) {
|
19002
|
-
if (Object.keys(schema4).length === 1 && "default" in schema4 && !is(schema4["default"],
|
19040
|
+
if (Object.keys(schema4).length === 1 && "default" in schema4 && !is(schema4["default"], Table2)) {
|
19003
19041
|
schema4 = schema4["default"];
|
19004
19042
|
}
|
19005
19043
|
const tableNamesMap = {};
|
19006
19044
|
const relationsBuffer = {};
|
19007
19045
|
const tablesConfig = {};
|
19008
19046
|
for (const [key, value] of Object.entries(schema4)) {
|
19009
|
-
if (is(value,
|
19047
|
+
if (is(value, Table2)) {
|
19010
19048
|
const dbName = getTableUniqueName(value);
|
19011
19049
|
const bufferedRelations = relationsBuffer[dbName];
|
19012
19050
|
tableNamesMap[dbName] = key;
|
19013
19051
|
tablesConfig[key] = {
|
19014
19052
|
tsName: key,
|
19015
|
-
dbName: value[
|
19016
|
-
schema: value[
|
19017
|
-
columns: value[
|
19053
|
+
dbName: value[Table2.Symbol.Name],
|
19054
|
+
schema: value[Table2.Symbol.Schema],
|
19055
|
+
columns: value[Table2.Symbol.Columns],
|
19018
19056
|
relations: bufferedRelations?.relations ?? {},
|
19019
19057
|
primaryKey: bufferedRelations?.primaryKey ?? []
|
19020
19058
|
};
|
19021
19059
|
for (const column4 of Object.values(
|
19022
|
-
value[
|
19060
|
+
value[Table2.Symbol.Columns]
|
19023
19061
|
)) {
|
19024
19062
|
if (column4.primary) {
|
19025
19063
|
tablesConfig[key].primaryKey.push(column4);
|
19026
19064
|
}
|
19027
19065
|
}
|
19028
|
-
const extraConfig = value[
|
19066
|
+
const extraConfig = value[Table2.Symbol.ExtraConfigBuilder]?.(value[Table2.Symbol.ExtraConfigColumns]);
|
19029
19067
|
if (extraConfig) {
|
19030
19068
|
for (const configEntry of Object.values(extraConfig)) {
|
19031
19069
|
if (is(configEntry, PrimaryKeyBuilder)) {
|
@@ -19097,7 +19135,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19097
19135
|
const referencedTableTsName = tableNamesMap[getTableUniqueName(relation.referencedTable)];
|
19098
19136
|
if (!referencedTableTsName) {
|
19099
19137
|
throw new Error(
|
19100
|
-
`Table "${relation.referencedTable[
|
19138
|
+
`Table "${relation.referencedTable[Table2.Symbol.Name]}" not found in schema`
|
19101
19139
|
);
|
19102
19140
|
}
|
19103
19141
|
const referencedTableConfig = schema4[referencedTableTsName];
|
@@ -19108,7 +19146,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19108
19146
|
const sourceTableTsName = tableNamesMap[getTableUniqueName(sourceTable)];
|
19109
19147
|
if (!sourceTableTsName) {
|
19110
19148
|
throw new Error(
|
19111
|
-
`Table "${sourceTable[
|
19149
|
+
`Table "${sourceTable[Table2.Symbol.Name]}" not found in schema`
|
19112
19150
|
);
|
19113
19151
|
}
|
19114
19152
|
const reverseRelations = [];
|
@@ -19123,7 +19161,7 @@ function normalizeRelation(schema4, tableNamesMap, relation) {
|
|
19123
19161
|
throw relation.relationName ? new Error(
|
19124
19162
|
`There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"`
|
19125
19163
|
) : new Error(
|
19126
|
-
`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[
|
19164
|
+
`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[Table2.Symbol.Name]}". Please specify relation name`
|
19127
19165
|
);
|
19128
19166
|
}
|
19129
19167
|
if (reverseRelations[0] && is(reverseRelations[0], One) && reverseRelations[0].config) {
|
@@ -19171,7 +19209,7 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
19171
19209
|
const value = mapColumnValue(row[selectionItemIndex]);
|
19172
19210
|
const field = selectionItem.field;
|
19173
19211
|
let decoder;
|
19174
|
-
if (is(field,
|
19212
|
+
if (is(field, Column2)) {
|
19175
19213
|
decoder = field;
|
19176
19214
|
} else if (is(field, SQL)) {
|
19177
19215
|
decoder = field.decoder;
|
@@ -19185,7 +19223,7 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
19185
19223
|
}
|
19186
19224
|
var _a38, Relation, _a39, Relations, _a40, _b15, _One, One, _a41, _b16, _Many, Many;
|
19187
19225
|
var init_relations = __esm({
|
19188
|
-
"../
|
19226
|
+
"../drizzle-orm/dist/relations.js"() {
|
19189
19227
|
"use strict";
|
19190
19228
|
init_table();
|
19191
19229
|
init_column();
|
@@ -19201,7 +19239,7 @@ var init_relations = __esm({
|
|
19201
19239
|
this.sourceTable = sourceTable;
|
19202
19240
|
this.referencedTable = referencedTable;
|
19203
19241
|
this.relationName = relationName;
|
19204
|
-
this.referencedTableName = referencedTable[
|
19242
|
+
this.referencedTableName = referencedTable[Table2.Symbol.Name];
|
19205
19243
|
}
|
19206
19244
|
};
|
19207
19245
|
__publicField(Relation, _a38, "Relation");
|
@@ -19252,7 +19290,7 @@ var init_relations = __esm({
|
|
19252
19290
|
}
|
19253
19291
|
});
|
19254
19292
|
|
19255
|
-
// ../
|
19293
|
+
// ../drizzle-orm/dist/sql/functions/aggregate.js
|
19256
19294
|
function count(expression) {
|
19257
19295
|
return sql`count(${expression || sql.raw("*")})`.mapWith(Number);
|
19258
19296
|
}
|
@@ -19272,13 +19310,13 @@ function sumDistinct(expression) {
|
|
19272
19310
|
return sql`sum(distinct ${expression})`.mapWith(String);
|
19273
19311
|
}
|
19274
19312
|
function max(expression) {
|
19275
|
-
return sql`max(${expression})`.mapWith(is(expression,
|
19313
|
+
return sql`max(${expression})`.mapWith(is(expression, Column2) ? expression : String);
|
19276
19314
|
}
|
19277
19315
|
function min(expression) {
|
19278
|
-
return sql`min(${expression})`.mapWith(is(expression,
|
19316
|
+
return sql`min(${expression})`.mapWith(is(expression, Column2) ? expression : String);
|
19279
19317
|
}
|
19280
19318
|
var init_aggregate = __esm({
|
19281
|
-
"../
|
19319
|
+
"../drizzle-orm/dist/sql/functions/aggregate.js"() {
|
19282
19320
|
"use strict";
|
19283
19321
|
init_column();
|
19284
19322
|
init_entity();
|
@@ -19286,7 +19324,7 @@ var init_aggregate = __esm({
|
|
19286
19324
|
}
|
19287
19325
|
});
|
19288
19326
|
|
19289
|
-
// ../
|
19327
|
+
// ../drizzle-orm/dist/sql/functions/vector.js
|
19290
19328
|
function toSql(value) {
|
19291
19329
|
return JSON.stringify(value);
|
19292
19330
|
}
|
@@ -19327,24 +19365,24 @@ function jaccardDistance(column4, value) {
|
|
19327
19365
|
return sql`${column4} <%> ${value}`;
|
19328
19366
|
}
|
19329
19367
|
var init_vector = __esm({
|
19330
|
-
"../
|
19368
|
+
"../drizzle-orm/dist/sql/functions/vector.js"() {
|
19331
19369
|
"use strict";
|
19332
19370
|
init_sql();
|
19333
19371
|
}
|
19334
19372
|
});
|
19335
19373
|
|
19336
|
-
// ../
|
19374
|
+
// ../drizzle-orm/dist/sql/functions/index.js
|
19337
19375
|
var init_functions = __esm({
|
19338
|
-
"../
|
19376
|
+
"../drizzle-orm/dist/sql/functions/index.js"() {
|
19339
19377
|
"use strict";
|
19340
19378
|
init_aggregate();
|
19341
19379
|
init_vector();
|
19342
19380
|
}
|
19343
19381
|
});
|
19344
19382
|
|
19345
|
-
// ../
|
19383
|
+
// ../drizzle-orm/dist/sql/index.js
|
19346
19384
|
var init_sql2 = __esm({
|
19347
|
-
"../
|
19385
|
+
"../drizzle-orm/dist/sql/index.js"() {
|
19348
19386
|
"use strict";
|
19349
19387
|
init_expressions();
|
19350
19388
|
init_functions();
|
@@ -19352,13 +19390,13 @@ var init_sql2 = __esm({
|
|
19352
19390
|
}
|
19353
19391
|
});
|
19354
19392
|
|
19355
|
-
// ../
|
19393
|
+
// ../drizzle-orm/dist/utils.js
|
19356
19394
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
19357
19395
|
const nullifyMap = {};
|
19358
19396
|
const result = columns.reduce(
|
19359
19397
|
(result2, { path: path2, field }, columnIndex) => {
|
19360
19398
|
let decoder;
|
19361
|
-
if (is(field,
|
19399
|
+
if (is(field, Column2)) {
|
19362
19400
|
decoder = field;
|
19363
19401
|
} else if (is(field, SQL)) {
|
19364
19402
|
decoder = field.decoder;
|
@@ -19375,7 +19413,7 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
19375
19413
|
} else {
|
19376
19414
|
const rawValue = row[columnIndex];
|
19377
19415
|
const value = node[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
|
19378
|
-
if (joinsNotNullableMap && is(field,
|
19416
|
+
if (joinsNotNullableMap && is(field, Column2) && path2.length === 2) {
|
19379
19417
|
const objectName = path2[0];
|
19380
19418
|
if (!(objectName in nullifyMap)) {
|
19381
19419
|
nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
|
@@ -19404,10 +19442,10 @@ function orderSelectedFields(fields, pathPrefix) {
|
|
19404
19442
|
return result;
|
19405
19443
|
}
|
19406
19444
|
const newPath = pathPrefix ? [...pathPrefix, name2] : [name2];
|
19407
|
-
if (is(field,
|
19445
|
+
if (is(field, Column2) || is(field, SQL) || is(field, SQL.Aliased)) {
|
19408
19446
|
result.push({ path: newPath, field });
|
19409
|
-
} else if (is(field,
|
19410
|
-
result.push(...orderSelectedFields(field[
|
19447
|
+
} else if (is(field, Table2)) {
|
19448
|
+
result.push(...orderSelectedFields(field[Table2.Symbol.Columns], newPath));
|
19411
19449
|
} else {
|
19412
19450
|
result.push(...orderSelectedFields(field, newPath));
|
19413
19451
|
}
|
@@ -19432,7 +19470,7 @@ function mapUpdateSet(table4, values) {
|
|
19432
19470
|
if (is(value, SQL)) {
|
19433
19471
|
return [key, value];
|
19434
19472
|
} else {
|
19435
|
-
return [key, new Param(value, table4[
|
19473
|
+
return [key, new Param(value, table4[Table2.Symbol.Columns][key])];
|
19436
19474
|
}
|
19437
19475
|
});
|
19438
19476
|
if (entries.length === 0) {
|
@@ -19454,13 +19492,13 @@ function applyMixins(baseClass, extendedClasses) {
|
|
19454
19492
|
}
|
19455
19493
|
}
|
19456
19494
|
function getTableColumns(table4) {
|
19457
|
-
return table4[
|
19495
|
+
return table4[Table2.Symbol.Columns];
|
19458
19496
|
}
|
19459
19497
|
function getTableLikeName(table4) {
|
19460
|
-
return is(table4, Subquery) ? table4._.alias : is(table4, View) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : table4[
|
19498
|
+
return is(table4, Subquery) ? table4._.alias : is(table4, View) ? table4[ViewBaseConfig].name : is(table4, SQL) ? void 0 : table4[Table2.Symbol.IsAlias] ? table4[Table2.Symbol.Name] : table4[Table2.Symbol.BaseName];
|
19461
19499
|
}
|
19462
19500
|
var init_utils2 = __esm({
|
19463
|
-
"../
|
19501
|
+
"../drizzle-orm/dist/utils.js"() {
|
19464
19502
|
"use strict";
|
19465
19503
|
init_column();
|
19466
19504
|
init_entity();
|
@@ -19471,11 +19509,11 @@ var init_utils2 = __esm({
|
|
19471
19509
|
}
|
19472
19510
|
});
|
19473
19511
|
|
19474
|
-
// ../
|
19475
|
-
var
|
19476
|
-
__export(
|
19512
|
+
// ../drizzle-orm/dist/index.js
|
19513
|
+
var dist_exports = {};
|
19514
|
+
__export(dist_exports, {
|
19477
19515
|
BaseName: () => BaseName,
|
19478
|
-
Column: () =>
|
19516
|
+
Column: () => Column2,
|
19479
19517
|
ColumnAliasProxyHandler: () => ColumnAliasProxyHandler,
|
19480
19518
|
ColumnBuilder: () => ColumnBuilder,
|
19481
19519
|
Columns: () => Columns,
|
@@ -19501,7 +19539,7 @@ __export(drizzle_orm_exports, {
|
|
19501
19539
|
Schema: () => Schema,
|
19502
19540
|
StringChunk: () => StringChunk,
|
19503
19541
|
Subquery: () => Subquery,
|
19504
|
-
Table: () =>
|
19542
|
+
Table: () => Table2,
|
19505
19543
|
TableAliasProxyHandler: () => TableAliasProxyHandler,
|
19506
19544
|
TableName: () => TableName,
|
19507
19545
|
TransactionRollbackError: () => TransactionRollbackError,
|
@@ -19587,8 +19625,8 @@ __export(drizzle_orm_exports, {
|
|
19587
19625
|
sum: () => sum,
|
19588
19626
|
sumDistinct: () => sumDistinct
|
19589
19627
|
});
|
19590
|
-
var
|
19591
|
-
"../
|
19628
|
+
var init_dist = __esm({
|
19629
|
+
"../drizzle-orm/dist/index.js"() {
|
19592
19630
|
"use strict";
|
19593
19631
|
init_alias();
|
19594
19632
|
init_column_builder();
|
@@ -19608,17 +19646,17 @@ var init_drizzle_orm = __esm({
|
|
19608
19646
|
}
|
19609
19647
|
});
|
19610
19648
|
|
19611
|
-
// ../
|
19649
|
+
// ../drizzle-orm/dist/pg-core/alias.js
|
19612
19650
|
var init_alias2 = __esm({
|
19613
|
-
"../
|
19651
|
+
"../drizzle-orm/dist/pg-core/alias.js"() {
|
19614
19652
|
"use strict";
|
19615
19653
|
}
|
19616
19654
|
});
|
19617
19655
|
|
19618
|
-
// ../
|
19656
|
+
// ../drizzle-orm/dist/pg-core/checks.js
|
19619
19657
|
var _a42, CheckBuilder, _a43, Check;
|
19620
19658
|
var init_checks = __esm({
|
19621
|
-
"../
|
19659
|
+
"../drizzle-orm/dist/pg-core/checks.js"() {
|
19622
19660
|
"use strict";
|
19623
19661
|
init_entity();
|
19624
19662
|
_a42 = entityKind;
|
@@ -19648,10 +19686,10 @@ var init_checks = __esm({
|
|
19648
19686
|
}
|
19649
19687
|
});
|
19650
19688
|
|
19651
|
-
// ../
|
19689
|
+
// ../drizzle-orm/dist/pg-core/columns/int.common.js
|
19652
19690
|
var _a44, _b17, PgIntColumnBaseBuilder;
|
19653
19691
|
var init_int_common = __esm({
|
19654
|
-
"../
|
19692
|
+
"../drizzle-orm/dist/pg-core/columns/int.common.js"() {
|
19655
19693
|
"use strict";
|
19656
19694
|
init_entity();
|
19657
19695
|
init_common2();
|
@@ -19695,10 +19733,10 @@ var init_int_common = __esm({
|
|
19695
19733
|
}
|
19696
19734
|
});
|
19697
19735
|
|
19698
|
-
// ../
|
19736
|
+
// ../drizzle-orm/dist/pg-core/columns/bigint.js
|
19699
19737
|
var _a45, _b18, PgBigInt53Builder, _a46, _b19, PgBigInt53, _a47, _b20, PgBigInt64Builder, _a48, _b21, PgBigInt64;
|
19700
19738
|
var init_bigint = __esm({
|
19701
|
-
"../
|
19739
|
+
"../drizzle-orm/dist/pg-core/columns/bigint.js"() {
|
19702
19740
|
"use strict";
|
19703
19741
|
init_entity();
|
19704
19742
|
init_common2();
|
@@ -19751,10 +19789,10 @@ var init_bigint = __esm({
|
|
19751
19789
|
}
|
19752
19790
|
});
|
19753
19791
|
|
19754
|
-
// ../
|
19792
|
+
// ../drizzle-orm/dist/pg-core/columns/bigserial.js
|
19755
19793
|
var _a49, _b22, PgBigSerial53Builder, _a50, _b23, PgBigSerial53, _a51, _b24, PgBigSerial64Builder, _a52, _b25, PgBigSerial64;
|
19756
19794
|
var init_bigserial = __esm({
|
19757
|
-
"../
|
19795
|
+
"../drizzle-orm/dist/pg-core/columns/bigserial.js"() {
|
19758
19796
|
"use strict";
|
19759
19797
|
init_entity();
|
19760
19798
|
init_common2();
|
@@ -19812,10 +19850,10 @@ var init_bigserial = __esm({
|
|
19812
19850
|
}
|
19813
19851
|
});
|
19814
19852
|
|
19815
|
-
// ../
|
19853
|
+
// ../drizzle-orm/dist/pg-core/columns/boolean.js
|
19816
19854
|
var _a53, _b26, PgBooleanBuilder, _a54, _b27, PgBoolean;
|
19817
19855
|
var init_boolean = __esm({
|
19818
|
-
"../
|
19856
|
+
"../drizzle-orm/dist/pg-core/columns/boolean.js"() {
|
19819
19857
|
"use strict";
|
19820
19858
|
init_entity();
|
19821
19859
|
init_common2();
|
@@ -19838,10 +19876,10 @@ var init_boolean = __esm({
|
|
19838
19876
|
}
|
19839
19877
|
});
|
19840
19878
|
|
19841
|
-
// ../
|
19879
|
+
// ../drizzle-orm/dist/pg-core/columns/char.js
|
19842
19880
|
var _a55, _b28, PgCharBuilder, _a56, _b29, PgChar;
|
19843
19881
|
var init_char = __esm({
|
19844
|
-
"../
|
19882
|
+
"../drizzle-orm/dist/pg-core/columns/char.js"() {
|
19845
19883
|
"use strict";
|
19846
19884
|
init_entity();
|
19847
19885
|
init_common2();
|
@@ -19871,10 +19909,10 @@ var init_char = __esm({
|
|
19871
19909
|
}
|
19872
19910
|
});
|
19873
19911
|
|
19874
|
-
// ../
|
19912
|
+
// ../drizzle-orm/dist/pg-core/columns/cidr.js
|
19875
19913
|
var _a57, _b30, PgCidrBuilder, _a58, _b31, PgCidr;
|
19876
19914
|
var init_cidr = __esm({
|
19877
|
-
"../
|
19915
|
+
"../drizzle-orm/dist/pg-core/columns/cidr.js"() {
|
19878
19916
|
"use strict";
|
19879
19917
|
init_entity();
|
19880
19918
|
init_common2();
|
@@ -19897,10 +19935,10 @@ var init_cidr = __esm({
|
|
19897
19935
|
}
|
19898
19936
|
});
|
19899
19937
|
|
19900
|
-
// ../
|
19938
|
+
// ../drizzle-orm/dist/pg-core/columns/custom.js
|
19901
19939
|
var _a59, _b32, PgCustomColumnBuilder, _a60, _b33, PgCustomColumn;
|
19902
19940
|
var init_custom = __esm({
|
19903
|
-
"../
|
19941
|
+
"../drizzle-orm/dist/pg-core/columns/custom.js"() {
|
19904
19942
|
"use strict";
|
19905
19943
|
init_entity();
|
19906
19944
|
init_common2();
|
@@ -19943,10 +19981,10 @@ var init_custom = __esm({
|
|
19943
19981
|
}
|
19944
19982
|
});
|
19945
19983
|
|
19946
|
-
// ../
|
19984
|
+
// ../drizzle-orm/dist/pg-core/columns/date.common.js
|
19947
19985
|
var _a61, _b34, PgDateColumnBaseBuilder;
|
19948
19986
|
var init_date_common = __esm({
|
19949
|
-
"../
|
19987
|
+
"../drizzle-orm/dist/pg-core/columns/date.common.js"() {
|
19950
19988
|
"use strict";
|
19951
19989
|
init_entity();
|
19952
19990
|
init_sql();
|
@@ -19960,10 +19998,10 @@ var init_date_common = __esm({
|
|
19960
19998
|
}
|
19961
19999
|
});
|
19962
20000
|
|
19963
|
-
// ../
|
20001
|
+
// ../drizzle-orm/dist/pg-core/columns/date.js
|
19964
20002
|
var _a62, _b35, PgDateBuilder, _a63, _b36, PgDate, _a64, _b37, PgDateStringBuilder, _a65, _b38, PgDateString;
|
19965
20003
|
var init_date = __esm({
|
19966
|
-
"../
|
20004
|
+
"../drizzle-orm/dist/pg-core/columns/date.js"() {
|
19967
20005
|
"use strict";
|
19968
20006
|
init_entity();
|
19969
20007
|
init_common2();
|
@@ -20012,10 +20050,10 @@ var init_date = __esm({
|
|
20012
20050
|
}
|
20013
20051
|
});
|
20014
20052
|
|
20015
|
-
// ../
|
20053
|
+
// ../drizzle-orm/dist/pg-core/columns/double-precision.js
|
20016
20054
|
var _a66, _b39, PgDoublePrecisionBuilder, _a67, _b40, PgDoublePrecision;
|
20017
20055
|
var init_double_precision = __esm({
|
20018
|
-
"../
|
20056
|
+
"../drizzle-orm/dist/pg-core/columns/double-precision.js"() {
|
20019
20057
|
"use strict";
|
20020
20058
|
init_entity();
|
20021
20059
|
init_common2();
|
@@ -20047,10 +20085,10 @@ var init_double_precision = __esm({
|
|
20047
20085
|
}
|
20048
20086
|
});
|
20049
20087
|
|
20050
|
-
// ../
|
20088
|
+
// ../drizzle-orm/dist/pg-core/columns/inet.js
|
20051
20089
|
var _a68, _b41, PgInetBuilder, _a69, _b42, PgInet;
|
20052
20090
|
var init_inet = __esm({
|
20053
|
-
"../
|
20091
|
+
"../drizzle-orm/dist/pg-core/columns/inet.js"() {
|
20054
20092
|
"use strict";
|
20055
20093
|
init_entity();
|
20056
20094
|
init_common2();
|
@@ -20073,10 +20111,10 @@ var init_inet = __esm({
|
|
20073
20111
|
}
|
20074
20112
|
});
|
20075
20113
|
|
20076
|
-
// ../
|
20114
|
+
// ../drizzle-orm/dist/pg-core/columns/integer.js
|
20077
20115
|
var _a70, _b43, PgIntegerBuilder, _a71, _b44, PgInteger;
|
20078
20116
|
var init_integer = __esm({
|
20079
|
-
"../
|
20117
|
+
"../drizzle-orm/dist/pg-core/columns/integer.js"() {
|
20080
20118
|
"use strict";
|
20081
20119
|
init_entity();
|
20082
20120
|
init_common2();
|
@@ -20106,10 +20144,10 @@ var init_integer = __esm({
|
|
20106
20144
|
}
|
20107
20145
|
});
|
20108
20146
|
|
20109
|
-
// ../
|
20147
|
+
// ../drizzle-orm/dist/pg-core/columns/interval.js
|
20110
20148
|
var _a72, _b45, PgIntervalBuilder, _a73, _b46, PgInterval;
|
20111
20149
|
var init_interval = __esm({
|
20112
|
-
"../
|
20150
|
+
"../drizzle-orm/dist/pg-core/columns/interval.js"() {
|
20113
20151
|
"use strict";
|
20114
20152
|
init_entity();
|
20115
20153
|
init_common2();
|
@@ -20140,10 +20178,10 @@ var init_interval = __esm({
|
|
20140
20178
|
}
|
20141
20179
|
});
|
20142
20180
|
|
20143
|
-
// ../
|
20181
|
+
// ../drizzle-orm/dist/pg-core/columns/json.js
|
20144
20182
|
var _a74, _b47, PgJsonBuilder, _a75, _b48, PgJson;
|
20145
20183
|
var init_json = __esm({
|
20146
|
-
"../
|
20184
|
+
"../drizzle-orm/dist/pg-core/columns/json.js"() {
|
20147
20185
|
"use strict";
|
20148
20186
|
init_entity();
|
20149
20187
|
init_common2();
|
@@ -20182,10 +20220,10 @@ var init_json = __esm({
|
|
20182
20220
|
}
|
20183
20221
|
});
|
20184
20222
|
|
20185
|
-
// ../
|
20223
|
+
// ../drizzle-orm/dist/pg-core/columns/jsonb.js
|
20186
20224
|
var _a76, _b49, PgJsonbBuilder, _a77, _b50, PgJsonb;
|
20187
20225
|
var init_jsonb = __esm({
|
20188
|
-
"../
|
20226
|
+
"../drizzle-orm/dist/pg-core/columns/jsonb.js"() {
|
20189
20227
|
"use strict";
|
20190
20228
|
init_entity();
|
20191
20229
|
init_common2();
|
@@ -20224,10 +20262,10 @@ var init_jsonb = __esm({
|
|
20224
20262
|
}
|
20225
20263
|
});
|
20226
20264
|
|
20227
|
-
// ../
|
20265
|
+
// ../drizzle-orm/dist/pg-core/columns/line.js
|
20228
20266
|
var _a78, _b51, PgLineBuilder, _a79, _b52, PgLineTuple, _a80, _b53, PgLineABCBuilder, _a81, _b54, PgLineABC;
|
20229
20267
|
var init_line = __esm({
|
20230
|
-
"../
|
20268
|
+
"../drizzle-orm/dist/pg-core/columns/line.js"() {
|
20231
20269
|
"use strict";
|
20232
20270
|
init_entity();
|
20233
20271
|
init_common2();
|
@@ -20286,10 +20324,10 @@ var init_line = __esm({
|
|
20286
20324
|
}
|
20287
20325
|
});
|
20288
20326
|
|
20289
|
-
// ../
|
20327
|
+
// ../drizzle-orm/dist/pg-core/columns/macaddr.js
|
20290
20328
|
var _a82, _b55, PgMacaddrBuilder, _a83, _b56, PgMacaddr;
|
20291
20329
|
var init_macaddr = __esm({
|
20292
|
-
"../
|
20330
|
+
"../drizzle-orm/dist/pg-core/columns/macaddr.js"() {
|
20293
20331
|
"use strict";
|
20294
20332
|
init_entity();
|
20295
20333
|
init_common2();
|
@@ -20312,10 +20350,10 @@ var init_macaddr = __esm({
|
|
20312
20350
|
}
|
20313
20351
|
});
|
20314
20352
|
|
20315
|
-
// ../
|
20353
|
+
// ../drizzle-orm/dist/pg-core/columns/macaddr8.js
|
20316
20354
|
var _a84, _b57, PgMacaddr8Builder, _a85, _b58, PgMacaddr8;
|
20317
20355
|
var init_macaddr8 = __esm({
|
20318
|
-
"../
|
20356
|
+
"../drizzle-orm/dist/pg-core/columns/macaddr8.js"() {
|
20319
20357
|
"use strict";
|
20320
20358
|
init_entity();
|
20321
20359
|
init_common2();
|
@@ -20338,10 +20376,10 @@ var init_macaddr8 = __esm({
|
|
20338
20376
|
}
|
20339
20377
|
});
|
20340
20378
|
|
20341
|
-
// ../
|
20379
|
+
// ../drizzle-orm/dist/pg-core/columns/numeric.js
|
20342
20380
|
var _a86, _b59, PgNumericBuilder, _a87, _b60, PgNumeric;
|
20343
20381
|
var init_numeric = __esm({
|
20344
|
-
"../
|
20382
|
+
"../drizzle-orm/dist/pg-core/columns/numeric.js"() {
|
20345
20383
|
"use strict";
|
20346
20384
|
init_entity();
|
20347
20385
|
init_common2();
|
@@ -20379,10 +20417,10 @@ var init_numeric = __esm({
|
|
20379
20417
|
}
|
20380
20418
|
});
|
20381
20419
|
|
20382
|
-
// ../
|
20420
|
+
// ../drizzle-orm/dist/pg-core/columns/point.js
|
20383
20421
|
var _a88, _b61, PgPointTupleBuilder, _a89, _b62, PgPointTuple, _a90, _b63, PgPointObjectBuilder, _a91, _b64, PgPointObject;
|
20384
20422
|
var init_point = __esm({
|
20385
|
-
"../
|
20423
|
+
"../drizzle-orm/dist/pg-core/columns/point.js"() {
|
20386
20424
|
"use strict";
|
20387
20425
|
init_entity();
|
20388
20426
|
init_common2();
|
@@ -20447,7 +20485,7 @@ var init_point = __esm({
|
|
20447
20485
|
}
|
20448
20486
|
});
|
20449
20487
|
|
20450
|
-
// ../
|
20488
|
+
// ../drizzle-orm/dist/pg-core/columns/postgis_extension/utils.js
|
20451
20489
|
function hexToBytes(hex) {
|
20452
20490
|
const bytes = [];
|
20453
20491
|
for (let c = 0; c < hex.length; c += 2) {
|
@@ -20486,15 +20524,15 @@ function parseEWKB(hex) {
|
|
20486
20524
|
throw new Error("Unsupported geometry type");
|
20487
20525
|
}
|
20488
20526
|
var init_utils3 = __esm({
|
20489
|
-
"../
|
20527
|
+
"../drizzle-orm/dist/pg-core/columns/postgis_extension/utils.js"() {
|
20490
20528
|
"use strict";
|
20491
20529
|
}
|
20492
20530
|
});
|
20493
20531
|
|
20494
|
-
// ../
|
20532
|
+
// ../drizzle-orm/dist/pg-core/columns/postgis_extension/geometry.js
|
20495
20533
|
var _a92, _b65, PgGeometryBuilder, _a93, _b66, PgGeometry, _a94, _b67, PgGeometryObjectBuilder, _a95, _b68, PgGeometryObject;
|
20496
20534
|
var init_geometry = __esm({
|
20497
|
-
"../
|
20535
|
+
"../drizzle-orm/dist/pg-core/columns/postgis_extension/geometry.js"() {
|
20498
20536
|
"use strict";
|
20499
20537
|
init_entity();
|
20500
20538
|
init_common2();
|
@@ -20553,10 +20591,10 @@ var init_geometry = __esm({
|
|
20553
20591
|
}
|
20554
20592
|
});
|
20555
20593
|
|
20556
|
-
// ../
|
20594
|
+
// ../drizzle-orm/dist/pg-core/columns/real.js
|
20557
20595
|
var _a96, _b69, PgRealBuilder, _a97, _b70, PgReal;
|
20558
20596
|
var init_real = __esm({
|
20559
|
-
"../
|
20597
|
+
"../drizzle-orm/dist/pg-core/columns/real.js"() {
|
20560
20598
|
"use strict";
|
20561
20599
|
init_entity();
|
20562
20600
|
init_common2();
|
@@ -20589,10 +20627,10 @@ var init_real = __esm({
|
|
20589
20627
|
}
|
20590
20628
|
});
|
20591
20629
|
|
20592
|
-
// ../
|
20630
|
+
// ../drizzle-orm/dist/pg-core/columns/serial.js
|
20593
20631
|
var _a98, _b71, PgSerialBuilder, _a99, _b72, PgSerial;
|
20594
20632
|
var init_serial = __esm({
|
20595
|
-
"../
|
20633
|
+
"../drizzle-orm/dist/pg-core/columns/serial.js"() {
|
20596
20634
|
"use strict";
|
20597
20635
|
init_entity();
|
20598
20636
|
init_common2();
|
@@ -20617,10 +20655,10 @@ var init_serial = __esm({
|
|
20617
20655
|
}
|
20618
20656
|
});
|
20619
20657
|
|
20620
|
-
// ../
|
20658
|
+
// ../drizzle-orm/dist/pg-core/columns/smallint.js
|
20621
20659
|
var _a100, _b73, PgSmallIntBuilder, _a101, _b74, PgSmallInt;
|
20622
20660
|
var init_smallint = __esm({
|
20623
|
-
"../
|
20661
|
+
"../drizzle-orm/dist/pg-core/columns/smallint.js"() {
|
20624
20662
|
"use strict";
|
20625
20663
|
init_entity();
|
20626
20664
|
init_common2();
|
@@ -20653,10 +20691,10 @@ var init_smallint = __esm({
|
|
20653
20691
|
}
|
20654
20692
|
});
|
20655
20693
|
|
20656
|
-
// ../
|
20694
|
+
// ../drizzle-orm/dist/pg-core/columns/smallserial.js
|
20657
20695
|
var _a102, _b75, PgSmallSerialBuilder, _a103, _b76, PgSmallSerial;
|
20658
20696
|
var init_smallserial = __esm({
|
20659
|
-
"../
|
20697
|
+
"../drizzle-orm/dist/pg-core/columns/smallserial.js"() {
|
20660
20698
|
"use strict";
|
20661
20699
|
init_entity();
|
20662
20700
|
init_common2();
|
@@ -20684,10 +20722,10 @@ var init_smallserial = __esm({
|
|
20684
20722
|
}
|
20685
20723
|
});
|
20686
20724
|
|
20687
|
-
// ../
|
20725
|
+
// ../drizzle-orm/dist/pg-core/columns/text.js
|
20688
20726
|
var _a104, _b77, PgTextBuilder, _a105, _b78, PgText;
|
20689
20727
|
var init_text = __esm({
|
20690
|
-
"../
|
20728
|
+
"../drizzle-orm/dist/pg-core/columns/text.js"() {
|
20691
20729
|
"use strict";
|
20692
20730
|
init_entity();
|
20693
20731
|
init_common2();
|
@@ -20715,10 +20753,10 @@ var init_text = __esm({
|
|
20715
20753
|
}
|
20716
20754
|
});
|
20717
20755
|
|
20718
|
-
// ../
|
20756
|
+
// ../drizzle-orm/dist/pg-core/columns/time.js
|
20719
20757
|
var _a106, _b79, PgTimeBuilder, _a107, _b80, PgTime;
|
20720
20758
|
var init_time = __esm({
|
20721
|
-
"../
|
20759
|
+
"../drizzle-orm/dist/pg-core/columns/time.js"() {
|
20722
20760
|
"use strict";
|
20723
20761
|
init_entity();
|
20724
20762
|
init_common2();
|
@@ -20754,10 +20792,10 @@ var init_time = __esm({
|
|
20754
20792
|
}
|
20755
20793
|
});
|
20756
20794
|
|
20757
|
-
// ../
|
20795
|
+
// ../drizzle-orm/dist/pg-core/columns/timestamp.js
|
20758
20796
|
var _a108, _b81, PgTimestampBuilder, _a109, _b82, PgTimestamp, _a110, _b83, PgTimestampStringBuilder, _a111, _b84, PgTimestampString;
|
20759
20797
|
var init_timestamp = __esm({
|
20760
|
-
"../
|
20798
|
+
"../drizzle-orm/dist/pg-core/columns/timestamp.js"() {
|
20761
20799
|
"use strict";
|
20762
20800
|
init_entity();
|
20763
20801
|
init_common2();
|
@@ -20826,10 +20864,10 @@ var init_timestamp = __esm({
|
|
20826
20864
|
}
|
20827
20865
|
});
|
20828
20866
|
|
20829
|
-
// ../
|
20867
|
+
// ../drizzle-orm/dist/pg-core/columns/uuid.js
|
20830
20868
|
var _a112, _b85, PgUUIDBuilder, _a113, _b86, PgUUID;
|
20831
20869
|
var init_uuid = __esm({
|
20832
|
-
"../
|
20870
|
+
"../drizzle-orm/dist/pg-core/columns/uuid.js"() {
|
20833
20871
|
"use strict";
|
20834
20872
|
init_entity();
|
20835
20873
|
init_sql();
|
@@ -20859,10 +20897,10 @@ var init_uuid = __esm({
|
|
20859
20897
|
}
|
20860
20898
|
});
|
20861
20899
|
|
20862
|
-
// ../
|
20900
|
+
// ../drizzle-orm/dist/pg-core/columns/varchar.js
|
20863
20901
|
var _a114, _b87, PgVarcharBuilder, _a115, _b88, PgVarchar;
|
20864
20902
|
var init_varchar = __esm({
|
20865
|
-
"../
|
20903
|
+
"../drizzle-orm/dist/pg-core/columns/varchar.js"() {
|
20866
20904
|
"use strict";
|
20867
20905
|
init_entity();
|
20868
20906
|
init_common2();
|
@@ -20892,10 +20930,10 @@ var init_varchar = __esm({
|
|
20892
20930
|
}
|
20893
20931
|
});
|
20894
20932
|
|
20895
|
-
// ../
|
20933
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/bit.js
|
20896
20934
|
var _a116, _b89, PgBinaryVectorBuilder, _a117, _b90, PgBinaryVector;
|
20897
20935
|
var init_bit = __esm({
|
20898
|
-
"../
|
20936
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/bit.js"() {
|
20899
20937
|
"use strict";
|
20900
20938
|
init_entity();
|
20901
20939
|
init_common2();
|
@@ -20926,10 +20964,10 @@ var init_bit = __esm({
|
|
20926
20964
|
}
|
20927
20965
|
});
|
20928
20966
|
|
20929
|
-
// ../
|
20967
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/halfvec.js
|
20930
20968
|
var _a118, _b91, PgHalfVectorBuilder, _a119, _b92, PgHalfVector;
|
20931
20969
|
var init_halfvec = __esm({
|
20932
|
-
"../
|
20970
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/halfvec.js"() {
|
20933
20971
|
"use strict";
|
20934
20972
|
init_entity();
|
20935
20973
|
init_common2();
|
@@ -20966,10 +21004,10 @@ var init_halfvec = __esm({
|
|
20966
21004
|
}
|
20967
21005
|
});
|
20968
21006
|
|
20969
|
-
// ../
|
21007
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/sparsevec.js
|
20970
21008
|
var _a120, _b93, PgSparseVectorBuilder, _a121, _b94, PgSparseVector;
|
20971
21009
|
var init_sparsevec = __esm({
|
20972
|
-
"../
|
21010
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/sparsevec.js"() {
|
20973
21011
|
"use strict";
|
20974
21012
|
init_entity();
|
20975
21013
|
init_common2();
|
@@ -21000,10 +21038,10 @@ var init_sparsevec = __esm({
|
|
21000
21038
|
}
|
21001
21039
|
});
|
21002
21040
|
|
21003
|
-
// ../
|
21041
|
+
// ../drizzle-orm/dist/pg-core/columns/vector_extension/vector.js
|
21004
21042
|
var _a122, _b95, PgVectorBuilder, _a123, _b96, PgVector;
|
21005
21043
|
var init_vector2 = __esm({
|
21006
|
-
"../
|
21044
|
+
"../drizzle-orm/dist/pg-core/columns/vector_extension/vector.js"() {
|
21007
21045
|
"use strict";
|
21008
21046
|
init_entity();
|
21009
21047
|
init_common2();
|
@@ -21037,9 +21075,9 @@ var init_vector2 = __esm({
|
|
21037
21075
|
}
|
21038
21076
|
});
|
21039
21077
|
|
21040
|
-
// ../
|
21078
|
+
// ../drizzle-orm/dist/pg-core/columns/index.js
|
21041
21079
|
var init_columns = __esm({
|
21042
|
-
"../
|
21080
|
+
"../drizzle-orm/dist/pg-core/columns/index.js"() {
|
21043
21081
|
"use strict";
|
21044
21082
|
init_bigint();
|
21045
21083
|
init_bigserial();
|
@@ -21078,10 +21116,10 @@ var init_columns = __esm({
|
|
21078
21116
|
}
|
21079
21117
|
});
|
21080
21118
|
|
21081
|
-
// ../
|
21119
|
+
// ../drizzle-orm/dist/pg-core/query-builders/delete.js
|
21082
21120
|
var _a124, _b97, PgDeleteBase;
|
21083
21121
|
var init_delete = __esm({
|
21084
|
-
"../
|
21122
|
+
"../drizzle-orm/dist/pg-core/query-builders/delete.js"() {
|
21085
21123
|
"use strict";
|
21086
21124
|
init_entity();
|
21087
21125
|
init_query_promise();
|
@@ -21134,7 +21172,7 @@ var init_delete = __esm({
|
|
21134
21172
|
this.config.where = where;
|
21135
21173
|
return this;
|
21136
21174
|
}
|
21137
|
-
returning(fields = this.config.table[
|
21175
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
21138
21176
|
this.config.returning = orderSelectedFields(fields);
|
21139
21177
|
return this;
|
21140
21178
|
}
|
@@ -21163,10 +21201,10 @@ var init_delete = __esm({
|
|
21163
21201
|
}
|
21164
21202
|
});
|
21165
21203
|
|
21166
|
-
// ../
|
21204
|
+
// ../drizzle-orm/dist/pg-core/query-builders/insert.js
|
21167
21205
|
var _a125, PgInsertBuilder, _a126, _b98, PgInsertBase;
|
21168
21206
|
var init_insert = __esm({
|
21169
|
-
"../
|
21207
|
+
"../drizzle-orm/dist/pg-core/query-builders/insert.js"() {
|
21170
21208
|
"use strict";
|
21171
21209
|
init_entity();
|
21172
21210
|
init_query_promise();
|
@@ -21189,7 +21227,7 @@ var init_insert = __esm({
|
|
21189
21227
|
}
|
21190
21228
|
const mappedValues = values.map((entry) => {
|
21191
21229
|
const result = {};
|
21192
|
-
const cols = this.table[
|
21230
|
+
const cols = this.table[Table2.Symbol.Columns];
|
21193
21231
|
for (const colKey of Object.keys(entry)) {
|
21194
21232
|
const colValue = entry[colKey];
|
21195
21233
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -21213,7 +21251,7 @@ var init_insert = __esm({
|
|
21213
21251
|
this.dialect = dialect7;
|
21214
21252
|
this.config = { table: table4, values, withList };
|
21215
21253
|
}
|
21216
|
-
returning(fields = this.config.table[
|
21254
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
21217
21255
|
this.config.returning = orderSelectedFields(fields);
|
21218
21256
|
return this;
|
21219
21257
|
}
|
@@ -21319,10 +21357,10 @@ var init_insert = __esm({
|
|
21319
21357
|
}
|
21320
21358
|
});
|
21321
21359
|
|
21322
|
-
// ../
|
21360
|
+
// ../drizzle-orm/dist/pg-core/view-base.js
|
21323
21361
|
var _a127, _b99, PgViewBase;
|
21324
21362
|
var init_view_base = __esm({
|
21325
|
-
"../
|
21363
|
+
"../drizzle-orm/dist/pg-core/view-base.js"() {
|
21326
21364
|
"use strict";
|
21327
21365
|
init_entity();
|
21328
21366
|
init_sql();
|
@@ -21332,10 +21370,10 @@ var init_view_base = __esm({
|
|
21332
21370
|
}
|
21333
21371
|
});
|
21334
21372
|
|
21335
|
-
// ../
|
21373
|
+
// ../drizzle-orm/dist/pg-core/dialect.js
|
21336
21374
|
var _a128, PgDialect;
|
21337
21375
|
var init_dialect = __esm({
|
21338
|
-
"../
|
21376
|
+
"../drizzle-orm/dist/pg-core/dialect.js"() {
|
21339
21377
|
"use strict";
|
21340
21378
|
init_alias();
|
21341
21379
|
init_column();
|
@@ -21411,7 +21449,7 @@ var init_dialect = __esm({
|
|
21411
21449
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
21412
21450
|
}
|
21413
21451
|
buildUpdateSet(table4, set) {
|
21414
|
-
const tableColumns = table4[
|
21452
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
21415
21453
|
const columnNames = Object.keys(tableColumns).filter(
|
21416
21454
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
21417
21455
|
);
|
@@ -21469,7 +21507,7 @@ var init_dialect = __esm({
|
|
21469
21507
|
if (is(field, SQL.Aliased)) {
|
21470
21508
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
21471
21509
|
}
|
21472
|
-
} else if (is(field,
|
21510
|
+
} else if (is(field, Column2)) {
|
21473
21511
|
if (isSingleTable) {
|
21474
21512
|
chunk.push(sql.identifier(field.name));
|
21475
21513
|
} else {
|
@@ -21501,8 +21539,8 @@ var init_dialect = __esm({
|
|
21501
21539
|
}) {
|
21502
21540
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
21503
21541
|
for (const f of fieldsList) {
|
21504
|
-
if (is(f.field,
|
21505
|
-
({ alias }) => alias === (table22[
|
21542
|
+
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(
|
21543
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
21506
21544
|
))(f.field.table)) {
|
21507
21545
|
const tableName = getTableName(f.field.table);
|
21508
21546
|
throw new Error(
|
@@ -21518,12 +21556,12 @@ var init_dialect = __esm({
|
|
21518
21556
|
}
|
21519
21557
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
21520
21558
|
const tableSql = (() => {
|
21521
|
-
if (is(table4,
|
21522
|
-
let fullName = sql`${sql.identifier(table4[
|
21523
|
-
if (table4[
|
21524
|
-
fullName = sql`${sql.identifier(table4[
|
21559
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
21560
|
+
let fullName = sql`${sql.identifier(table4[Table2.Symbol.OriginalName])}`;
|
21561
|
+
if (table4[Table2.Symbol.Schema]) {
|
21562
|
+
fullName = sql`${sql.identifier(table4[Table2.Symbol.Schema])}.${fullName}`;
|
21525
21563
|
}
|
21526
|
-
return sql`${fullName} ${sql.identifier(table4[
|
21564
|
+
return sql`${fullName} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
21527
21565
|
}
|
21528
21566
|
return table4;
|
21529
21567
|
})();
|
@@ -21644,7 +21682,7 @@ var init_dialect = __esm({
|
|
21644
21682
|
}
|
21645
21683
|
buildInsertQuery({ table: table4, values, onConflict, returning, withList }) {
|
21646
21684
|
const valuesSqlList = [];
|
21647
|
-
const columns = table4[
|
21685
|
+
const columns = table4[Table2.Symbol.Columns];
|
21648
21686
|
const colEntries = Object.entries(columns).filter(([_2, col]) => !col.shouldDisableInsert());
|
21649
21687
|
const insertOrder = colEntries.map(([, column4]) => sql.identifier(column4.name));
|
21650
21688
|
for (const [valueIndex, value] of values.entries()) {
|
@@ -22265,7 +22303,7 @@ var init_dialect = __esm({
|
|
22265
22303
|
selection.push({
|
22266
22304
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
22267
22305
|
tsKey,
|
22268
|
-
field: is(value,
|
22306
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
22269
22307
|
relationTableTsKey: void 0,
|
22270
22308
|
isJson: false,
|
22271
22309
|
selection: []
|
@@ -22276,7 +22314,7 @@ var init_dialect = __esm({
|
|
22276
22314
|
orderByOrig = [orderByOrig];
|
22277
22315
|
}
|
22278
22316
|
orderBy = orderByOrig.map((orderByValue) => {
|
22279
|
-
if (is(orderByValue,
|
22317
|
+
if (is(orderByValue, Column2)) {
|
22280
22318
|
return aliasedTableColumn(orderByValue, tableAlias);
|
22281
22319
|
}
|
22282
22320
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -22379,7 +22417,7 @@ var init_dialect = __esm({
|
|
22379
22417
|
fields: {},
|
22380
22418
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
22381
22419
|
path: [],
|
22382
|
-
field: is(field2,
|
22420
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
22383
22421
|
})),
|
22384
22422
|
joins,
|
22385
22423
|
where,
|
@@ -22394,7 +22432,7 @@ var init_dialect = __esm({
|
|
22394
22432
|
fields: {},
|
22395
22433
|
fieldsFlat: selection.map(({ field }) => ({
|
22396
22434
|
path: [],
|
22397
|
-
field: is(field,
|
22435
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
22398
22436
|
})),
|
22399
22437
|
joins,
|
22400
22438
|
where,
|
@@ -22415,10 +22453,10 @@ var init_dialect = __esm({
|
|
22415
22453
|
}
|
22416
22454
|
});
|
22417
22455
|
|
22418
|
-
// ../
|
22456
|
+
// ../drizzle-orm/dist/selection-proxy.js
|
22419
22457
|
var _a129, _SelectionProxyHandler, SelectionProxyHandler;
|
22420
22458
|
var init_selection_proxy = __esm({
|
22421
|
-
"../
|
22459
|
+
"../drizzle-orm/dist/selection-proxy.js"() {
|
22422
22460
|
"use strict";
|
22423
22461
|
init_alias();
|
22424
22462
|
init_column();
|
@@ -22472,7 +22510,7 @@ var init_selection_proxy = __esm({
|
|
22472
22510
|
`You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`
|
22473
22511
|
);
|
22474
22512
|
}
|
22475
|
-
if (is(value,
|
22513
|
+
if (is(value, Column2)) {
|
22476
22514
|
if (this.config.alias) {
|
22477
22515
|
return new Proxy(
|
22478
22516
|
value,
|
@@ -22497,10 +22535,10 @@ var init_selection_proxy = __esm({
|
|
22497
22535
|
}
|
22498
22536
|
});
|
22499
22537
|
|
22500
|
-
// ../
|
22538
|
+
// ../drizzle-orm/dist/query-builders/query-builder.js
|
22501
22539
|
var _a130, TypedQueryBuilder;
|
22502
22540
|
var init_query_builder = __esm({
|
22503
|
-
"../
|
22541
|
+
"../drizzle-orm/dist/query-builders/query-builder.js"() {
|
22504
22542
|
"use strict";
|
22505
22543
|
init_entity();
|
22506
22544
|
_a130 = entityKind;
|
@@ -22514,7 +22552,7 @@ var init_query_builder = __esm({
|
|
22514
22552
|
}
|
22515
22553
|
});
|
22516
22554
|
|
22517
|
-
// ../
|
22555
|
+
// ../drizzle-orm/dist/pg-core/query-builders/select.js
|
22518
22556
|
function createSetOperator(type, isAll) {
|
22519
22557
|
return (leftSelect, rightSelect, ...restSelects) => {
|
22520
22558
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -22534,7 +22572,7 @@ function createSetOperator(type, isAll) {
|
|
22534
22572
|
}
|
22535
22573
|
var _a131, PgSelectBuilder, _a132, _b100, PgSelectQueryBuilderBase, _a133, _b101, PgSelectBase, getPgSetOperators, union, unionAll, intersect, intersectAll, except, exceptAll;
|
22536
22574
|
var init_select2 = __esm({
|
22537
|
-
"../
|
22575
|
+
"../drizzle-orm/dist/pg-core/query-builders/select.js"() {
|
22538
22576
|
"use strict";
|
22539
22577
|
init_entity();
|
22540
22578
|
init_view_base();
|
@@ -22936,7 +22974,7 @@ var init_select2 = __esm({
|
|
22936
22974
|
};
|
22937
22975
|
}
|
22938
22976
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
22939
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
22977
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
22940
22978
|
this.config.fields[tableName] = selection;
|
22941
22979
|
}
|
22942
22980
|
}
|
@@ -23251,10 +23289,10 @@ var init_select2 = __esm({
|
|
23251
23289
|
}
|
23252
23290
|
});
|
23253
23291
|
|
23254
|
-
// ../
|
23292
|
+
// ../drizzle-orm/dist/pg-core/query-builders/query-builder.js
|
23255
23293
|
var _a134, QueryBuilder;
|
23256
23294
|
var init_query_builder2 = __esm({
|
23257
|
-
"../
|
23295
|
+
"../drizzle-orm/dist/pg-core/query-builders/query-builder.js"() {
|
23258
23296
|
"use strict";
|
23259
23297
|
init_entity();
|
23260
23298
|
init_dialect();
|
@@ -23343,10 +23381,10 @@ var init_query_builder2 = __esm({
|
|
23343
23381
|
}
|
23344
23382
|
});
|
23345
23383
|
|
23346
|
-
// ../
|
23384
|
+
// ../drizzle-orm/dist/pg-core/query-builders/refresh-materialized-view.js
|
23347
23385
|
var _a135, _b102, PgRefreshMaterializedView;
|
23348
23386
|
var init_refresh_materialized_view = __esm({
|
23349
|
-
"../
|
23387
|
+
"../drizzle-orm/dist/pg-core/query-builders/refresh-materialized-view.js"() {
|
23350
23388
|
"use strict";
|
23351
23389
|
init_entity();
|
23352
23390
|
init_query_promise();
|
@@ -23400,17 +23438,17 @@ var init_refresh_materialized_view = __esm({
|
|
23400
23438
|
}
|
23401
23439
|
});
|
23402
23440
|
|
23403
|
-
// ../
|
23441
|
+
// ../drizzle-orm/dist/pg-core/query-builders/select.types.js
|
23404
23442
|
var init_select_types = __esm({
|
23405
|
-
"../
|
23443
|
+
"../drizzle-orm/dist/pg-core/query-builders/select.types.js"() {
|
23406
23444
|
"use strict";
|
23407
23445
|
}
|
23408
23446
|
});
|
23409
23447
|
|
23410
|
-
// ../
|
23448
|
+
// ../drizzle-orm/dist/pg-core/query-builders/update.js
|
23411
23449
|
var _a136, PgUpdateBuilder, _a137, _b103, PgUpdateBase;
|
23412
23450
|
var init_update = __esm({
|
23413
|
-
"../
|
23451
|
+
"../drizzle-orm/dist/pg-core/query-builders/update.js"() {
|
23414
23452
|
"use strict";
|
23415
23453
|
init_entity();
|
23416
23454
|
init_query_promise();
|
@@ -23483,7 +23521,7 @@ var init_update = __esm({
|
|
23483
23521
|
this.config.where = where;
|
23484
23522
|
return this;
|
23485
23523
|
}
|
23486
|
-
returning(fields = this.config.table[
|
23524
|
+
returning(fields = this.config.table[Table2.Symbol.Columns]) {
|
23487
23525
|
this.config.returning = orderSelectedFields(fields);
|
23488
23526
|
return this;
|
23489
23527
|
}
|
@@ -23510,9 +23548,9 @@ var init_update = __esm({
|
|
23510
23548
|
}
|
23511
23549
|
});
|
23512
23550
|
|
23513
|
-
// ../
|
23551
|
+
// ../drizzle-orm/dist/pg-core/query-builders/index.js
|
23514
23552
|
var init_query_builders = __esm({
|
23515
|
-
"../
|
23553
|
+
"../drizzle-orm/dist/pg-core/query-builders/index.js"() {
|
23516
23554
|
"use strict";
|
23517
23555
|
init_delete();
|
23518
23556
|
init_insert();
|
@@ -23524,10 +23562,10 @@ var init_query_builders = __esm({
|
|
23524
23562
|
}
|
23525
23563
|
});
|
23526
23564
|
|
23527
|
-
// ../
|
23565
|
+
// ../drizzle-orm/dist/pg-core/query-builders/query.js
|
23528
23566
|
var _a138, RelationalQueryBuilder, _a139, _b104, PgRelationalQuery;
|
23529
23567
|
var init_query = __esm({
|
23530
|
-
"../
|
23568
|
+
"../drizzle-orm/dist/pg-core/query-builders/query.js"() {
|
23531
23569
|
"use strict";
|
23532
23570
|
init_entity();
|
23533
23571
|
init_query_promise();
|
@@ -23642,10 +23680,10 @@ var init_query = __esm({
|
|
23642
23680
|
}
|
23643
23681
|
});
|
23644
23682
|
|
23645
|
-
// ../
|
23683
|
+
// ../drizzle-orm/dist/pg-core/query-builders/raw.js
|
23646
23684
|
var _a140, _b105, PgRaw;
|
23647
23685
|
var init_raw = __esm({
|
23648
|
-
"../
|
23686
|
+
"../drizzle-orm/dist/pg-core/query-builders/raw.js"() {
|
23649
23687
|
"use strict";
|
23650
23688
|
init_entity();
|
23651
23689
|
init_query_promise();
|
@@ -23679,10 +23717,10 @@ var init_raw = __esm({
|
|
23679
23717
|
}
|
23680
23718
|
});
|
23681
23719
|
|
23682
|
-
// ../
|
23720
|
+
// ../drizzle-orm/dist/pg-core/db.js
|
23683
23721
|
var _a141, PgDatabase;
|
23684
23722
|
var init_db = __esm({
|
23685
|
-
"../
|
23723
|
+
"../drizzle-orm/dist/pg-core/db.js"() {
|
23686
23724
|
"use strict";
|
23687
23725
|
init_entity();
|
23688
23726
|
init_query_builders();
|
@@ -23960,10 +23998,10 @@ var init_db = __esm({
|
|
23960
23998
|
}
|
23961
23999
|
});
|
23962
24000
|
|
23963
|
-
// ../
|
24001
|
+
// ../drizzle-orm/dist/pg-core/indexes.js
|
23964
24002
|
var _a142, IndexBuilderOn, _a143, IndexBuilder, _a144, Index2;
|
23965
24003
|
var init_indexes = __esm({
|
23966
|
-
"../
|
24004
|
+
"../drizzle-orm/dist/pg-core/indexes.js"() {
|
23967
24005
|
"use strict";
|
23968
24006
|
init_sql();
|
23969
24007
|
init_entity();
|
@@ -24078,7 +24116,7 @@ var init_indexes = __esm({
|
|
24078
24116
|
}
|
24079
24117
|
});
|
24080
24118
|
|
24081
|
-
// ../
|
24119
|
+
// ../drizzle-orm/dist/pg-core/sequence.js
|
24082
24120
|
function pgSequenceWithSchema(name2, options, schema4) {
|
24083
24121
|
return new PgSequence(name2, options, schema4);
|
24084
24122
|
}
|
@@ -24087,7 +24125,7 @@ function isPgSequence(obj) {
|
|
24087
24125
|
}
|
24088
24126
|
var _a145, PgSequence;
|
24089
24127
|
var init_sequence = __esm({
|
24090
|
-
"../
|
24128
|
+
"../drizzle-orm/dist/pg-core/sequence.js"() {
|
24091
24129
|
"use strict";
|
24092
24130
|
init_entity();
|
24093
24131
|
_a145 = entityKind;
|
@@ -24102,16 +24140,16 @@ var init_sequence = __esm({
|
|
24102
24140
|
}
|
24103
24141
|
});
|
24104
24142
|
|
24105
|
-
// ../
|
24143
|
+
// ../drizzle-orm/dist/pg-core/view-common.js
|
24106
24144
|
var PgViewConfig;
|
24107
24145
|
var init_view_common2 = __esm({
|
24108
|
-
"../
|
24146
|
+
"../drizzle-orm/dist/pg-core/view-common.js"() {
|
24109
24147
|
"use strict";
|
24110
24148
|
PgViewConfig = Symbol.for("drizzle:PgViewConfig");
|
24111
24149
|
}
|
24112
24150
|
});
|
24113
24151
|
|
24114
|
-
// ../
|
24152
|
+
// ../drizzle-orm/dist/pg-core/view.js
|
24115
24153
|
function pgViewWithSchema(name2, selection, schema4) {
|
24116
24154
|
if (selection) {
|
24117
24155
|
return new ManualViewBuilder(name2, selection, schema4);
|
@@ -24126,7 +24164,7 @@ function pgMaterializedViewWithSchema(name2, selection, schema4) {
|
|
24126
24164
|
}
|
24127
24165
|
var _a146, DefaultViewBuilderCore, _a147, _b106, ViewBuilder, _a148, _b107, ManualViewBuilder, _a149, MaterializedViewBuilderCore, _a150, _b108, MaterializedViewBuilder, _a151, _b109, ManualMaterializedViewBuilder, _a152, _b110, _c3, PgView, PgMaterializedViewConfig, _a153, _b111, _c4, PgMaterializedView;
|
24128
24166
|
var init_view = __esm({
|
24129
|
-
"../
|
24167
|
+
"../drizzle-orm/dist/pg-core/view.js"() {
|
24130
24168
|
"use strict";
|
24131
24169
|
init_entity();
|
24132
24170
|
init_selection_proxy();
|
@@ -24353,10 +24391,10 @@ var init_view = __esm({
|
|
24353
24391
|
}
|
24354
24392
|
});
|
24355
24393
|
|
24356
|
-
// ../
|
24357
|
-
var _a154,
|
24394
|
+
// ../drizzle-orm/dist/pg-core/schema.js
|
24395
|
+
var _a154, PgSchema5;
|
24358
24396
|
var init_schema = __esm({
|
24359
|
-
"../
|
24397
|
+
"../drizzle-orm/dist/pg-core/schema.js"() {
|
24360
24398
|
"use strict";
|
24361
24399
|
init_entity();
|
24362
24400
|
init_sql();
|
@@ -24365,7 +24403,7 @@ var init_schema = __esm({
|
|
24365
24403
|
init_table2();
|
24366
24404
|
init_view();
|
24367
24405
|
_a154 = entityKind;
|
24368
|
-
|
24406
|
+
PgSchema5 = class {
|
24369
24407
|
constructor(schemaName) {
|
24370
24408
|
__publicField(this, "table", (name2, columns, extraConfig) => {
|
24371
24409
|
return pgTableWithSchema(name2, columns, extraConfig, this.schemaName);
|
@@ -24391,14 +24429,14 @@ var init_schema = __esm({
|
|
24391
24429
|
return true;
|
24392
24430
|
}
|
24393
24431
|
};
|
24394
|
-
__publicField(
|
24432
|
+
__publicField(PgSchema5, _a154, "PgSchema");
|
24395
24433
|
}
|
24396
24434
|
});
|
24397
24435
|
|
24398
|
-
// ../
|
24436
|
+
// ../drizzle-orm/dist/pg-core/session.js
|
24399
24437
|
var _a155, PgPreparedQuery, _a156, PgSession, _a157, _b112, PgTransaction;
|
24400
24438
|
var init_session = __esm({
|
24401
|
-
"../
|
24439
|
+
"../drizzle-orm/dist/pg-core/session.js"() {
|
24402
24440
|
"use strict";
|
24403
24441
|
init_entity();
|
24404
24442
|
init_errors();
|
@@ -24479,26 +24517,26 @@ var init_session = __esm({
|
|
24479
24517
|
}
|
24480
24518
|
});
|
24481
24519
|
|
24482
|
-
// ../
|
24520
|
+
// ../drizzle-orm/dist/pg-core/subquery.js
|
24483
24521
|
var init_subquery2 = __esm({
|
24484
|
-
"../
|
24522
|
+
"../drizzle-orm/dist/pg-core/subquery.js"() {
|
24485
24523
|
"use strict";
|
24486
24524
|
}
|
24487
24525
|
});
|
24488
24526
|
|
24489
|
-
// ../
|
24527
|
+
// ../drizzle-orm/dist/pg-core/utils.js
|
24490
24528
|
function getTableConfig(table4) {
|
24491
|
-
const columns = Object.values(table4[
|
24529
|
+
const columns = Object.values(table4[Table2.Symbol.Columns]);
|
24492
24530
|
const indexes = [];
|
24493
24531
|
const checks = [];
|
24494
24532
|
const primaryKeys = [];
|
24495
24533
|
const foreignKeys = Object.values(table4[PgTable.Symbol.InlineForeignKeys]);
|
24496
24534
|
const uniqueConstraints = [];
|
24497
|
-
const name2 = table4[
|
24498
|
-
const schema4 = table4[
|
24535
|
+
const name2 = table4[Table2.Symbol.Name];
|
24536
|
+
const schema4 = table4[Table2.Symbol.Schema];
|
24499
24537
|
const extraConfigBuilder = table4[PgTable.Symbol.ExtraConfigBuilder];
|
24500
24538
|
if (extraConfigBuilder !== void 0) {
|
24501
|
-
const extraConfig = extraConfigBuilder(table4[
|
24539
|
+
const extraConfig = extraConfigBuilder(table4[Table2.Symbol.ExtraConfigColumns]);
|
24502
24540
|
for (const builder of Object.values(extraConfig)) {
|
24503
24541
|
if (is(builder, IndexBuilder)) {
|
24504
24542
|
indexes.push(builder.build(table4));
|
@@ -24525,7 +24563,7 @@ function getTableConfig(table4) {
|
|
24525
24563
|
};
|
24526
24564
|
}
|
24527
24565
|
var init_utils4 = __esm({
|
24528
|
-
"../
|
24566
|
+
"../drizzle-orm/dist/pg-core/utils.js"() {
|
24529
24567
|
"use strict";
|
24530
24568
|
init_entity();
|
24531
24569
|
init_table2();
|
@@ -24538,17 +24576,17 @@ var init_utils4 = __esm({
|
|
24538
24576
|
}
|
24539
24577
|
});
|
24540
24578
|
|
24541
|
-
// ../
|
24579
|
+
// ../drizzle-orm/dist/pg-core/utils/index.js
|
24542
24580
|
var init_utils5 = __esm({
|
24543
|
-
"../
|
24581
|
+
"../drizzle-orm/dist/pg-core/utils/index.js"() {
|
24544
24582
|
"use strict";
|
24545
24583
|
init_array();
|
24546
24584
|
}
|
24547
24585
|
});
|
24548
24586
|
|
24549
|
-
// ../
|
24587
|
+
// ../drizzle-orm/dist/pg-core/index.js
|
24550
24588
|
var init_pg_core = __esm({
|
24551
|
-
"../
|
24589
|
+
"../drizzle-orm/dist/pg-core/index.js"() {
|
24552
24590
|
"use strict";
|
24553
24591
|
init_alias2();
|
24554
24592
|
init_checks();
|
@@ -24608,7 +24646,7 @@ var init_pgSerializer = __esm({
|
|
24608
24646
|
"src/serializer/pgSerializer.ts"() {
|
24609
24647
|
"use strict";
|
24610
24648
|
init_source();
|
24611
|
-
|
24649
|
+
init_dist();
|
24612
24650
|
init_pg_core();
|
24613
24651
|
init_pg_core();
|
24614
24652
|
init_vector3();
|
@@ -25517,17 +25555,17 @@ var init_selector_ui = __esm({
|
|
25517
25555
|
}
|
25518
25556
|
});
|
25519
25557
|
|
25520
|
-
// ../
|
25558
|
+
// ../drizzle-orm/dist/sqlite-core/alias.js
|
25521
25559
|
var init_alias3 = __esm({
|
25522
|
-
"../
|
25560
|
+
"../drizzle-orm/dist/sqlite-core/alias.js"() {
|
25523
25561
|
"use strict";
|
25524
25562
|
}
|
25525
25563
|
});
|
25526
25564
|
|
25527
|
-
// ../
|
25565
|
+
// ../drizzle-orm/dist/sqlite-core/checks.js
|
25528
25566
|
var _a158, CheckBuilder2, _a159, Check2;
|
25529
25567
|
var init_checks2 = __esm({
|
25530
|
-
"../
|
25568
|
+
"../drizzle-orm/dist/sqlite-core/checks.js"() {
|
25531
25569
|
"use strict";
|
25532
25570
|
init_entity();
|
25533
25571
|
_a158 = entityKind;
|
@@ -25556,7 +25594,7 @@ var init_checks2 = __esm({
|
|
25556
25594
|
}
|
25557
25595
|
});
|
25558
25596
|
|
25559
|
-
// ../
|
25597
|
+
// ../drizzle-orm/dist/sqlite-core/table.js
|
25560
25598
|
function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2) {
|
25561
25599
|
const rawTable = new SQLiteTable(name2, schema4, baseName);
|
25562
25600
|
const builtColumns = Object.fromEntries(
|
@@ -25568,8 +25606,8 @@ function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2)
|
|
25568
25606
|
})
|
25569
25607
|
);
|
25570
25608
|
const table4 = Object.assign(rawTable, builtColumns);
|
25571
|
-
table4[
|
25572
|
-
table4[
|
25609
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
25610
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumns;
|
25573
25611
|
if (extraConfig) {
|
25574
25612
|
table4[SQLiteTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
25575
25613
|
}
|
@@ -25577,12 +25615,12 @@ function sqliteTableBase(name2, columns, extraConfig, schema4, baseName = name2)
|
|
25577
25615
|
}
|
25578
25616
|
var InlineForeignKeys2, _a160, _b113, _c5, _d3, _e2, SQLiteTable, sqliteTable;
|
25579
25617
|
var init_table3 = __esm({
|
25580
|
-
"../
|
25618
|
+
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
25581
25619
|
"use strict";
|
25582
25620
|
init_entity();
|
25583
25621
|
init_table();
|
25584
25622
|
InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
25585
|
-
SQLiteTable = class extends (_e2 =
|
25623
|
+
SQLiteTable = class extends (_e2 = Table2, _d3 = entityKind, _c5 = Table2.Symbol.Columns, _b113 = InlineForeignKeys2, _a160 = Table2.Symbol.ExtraConfigBuilder, _e2) {
|
25586
25624
|
constructor() {
|
25587
25625
|
super(...arguments);
|
25588
25626
|
/** @internal */
|
@@ -25595,7 +25633,7 @@ var init_table3 = __esm({
|
|
25595
25633
|
};
|
25596
25634
|
__publicField(SQLiteTable, _d3, "SQLiteTable");
|
25597
25635
|
/** @internal */
|
25598
|
-
__publicField(SQLiteTable, "Symbol", Object.assign({},
|
25636
|
+
__publicField(SQLiteTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
25599
25637
|
InlineForeignKeys: InlineForeignKeys2
|
25600
25638
|
}));
|
25601
25639
|
sqliteTable = (name2, columns, extraConfig) => {
|
@@ -25604,10 +25642,10 @@ var init_table3 = __esm({
|
|
25604
25642
|
}
|
25605
25643
|
});
|
25606
25644
|
|
25607
|
-
// ../
|
25645
|
+
// ../drizzle-orm/dist/sqlite-core/foreign-keys.js
|
25608
25646
|
var _a161, ForeignKeyBuilder2, _a162, ForeignKey2;
|
25609
25647
|
var init_foreign_keys2 = __esm({
|
25610
|
-
"../
|
25648
|
+
"../drizzle-orm/dist/sqlite-core/foreign-keys.js"() {
|
25611
25649
|
"use strict";
|
25612
25650
|
init_entity();
|
25613
25651
|
init_table3();
|
@@ -25671,13 +25709,13 @@ var init_foreign_keys2 = __esm({
|
|
25671
25709
|
}
|
25672
25710
|
});
|
25673
25711
|
|
25674
|
-
// ../
|
25712
|
+
// ../drizzle-orm/dist/sqlite-core/unique-constraint.js
|
25675
25713
|
function uniqueKeyName2(table4, columns) {
|
25676
25714
|
return `${table4[SQLiteTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
25677
25715
|
}
|
25678
25716
|
var _a163, UniqueConstraintBuilder2, _a164, UniqueOnConstraintBuilder2, _a165, UniqueConstraint2;
|
25679
25717
|
var init_unique_constraint2 = __esm({
|
25680
|
-
"../
|
25718
|
+
"../drizzle-orm/dist/sqlite-core/unique-constraint.js"() {
|
25681
25719
|
"use strict";
|
25682
25720
|
init_entity();
|
25683
25721
|
init_table3();
|
@@ -25724,10 +25762,10 @@ var init_unique_constraint2 = __esm({
|
|
25724
25762
|
}
|
25725
25763
|
});
|
25726
25764
|
|
25727
|
-
// ../
|
25765
|
+
// ../drizzle-orm/dist/sqlite-core/columns/common.js
|
25728
25766
|
var _a166, _b114, SQLiteColumnBuilder, _a167, _b115, SQLiteColumn;
|
25729
25767
|
var init_common3 = __esm({
|
25730
|
-
"../
|
25768
|
+
"../drizzle-orm/dist/sqlite-core/columns/common.js"() {
|
25731
25769
|
"use strict";
|
25732
25770
|
init_column_builder();
|
25733
25771
|
init_column();
|
@@ -25776,7 +25814,7 @@ var init_common3 = __esm({
|
|
25776
25814
|
}
|
25777
25815
|
};
|
25778
25816
|
__publicField(SQLiteColumnBuilder, _a166, "SQLiteColumnBuilder");
|
25779
|
-
SQLiteColumn = class extends (_b115 =
|
25817
|
+
SQLiteColumn = class extends (_b115 = Column2, _a167 = entityKind, _b115) {
|
25780
25818
|
constructor(table4, config) {
|
25781
25819
|
if (!config.uniqueName) {
|
25782
25820
|
config.uniqueName = uniqueKeyName2(table4, [config.name]);
|
@@ -25789,10 +25827,10 @@ var init_common3 = __esm({
|
|
25789
25827
|
}
|
25790
25828
|
});
|
25791
25829
|
|
25792
|
-
// ../
|
25830
|
+
// ../drizzle-orm/dist/sqlite-core/columns/blob.js
|
25793
25831
|
var _a168, _b116, SQLiteBigIntBuilder, _a169, _b117, SQLiteBigInt, _a170, _b118, SQLiteBlobJsonBuilder, _a171, _b119, SQLiteBlobJson, _a172, _b120, SQLiteBlobBufferBuilder, _a173, _b121, SQLiteBlobBuffer;
|
25794
25832
|
var init_blob = __esm({
|
25795
|
-
"../
|
25833
|
+
"../drizzle-orm/dist/sqlite-core/columns/blob.js"() {
|
25796
25834
|
"use strict";
|
25797
25835
|
init_entity();
|
25798
25836
|
init_common3();
|
@@ -25862,10 +25900,10 @@ var init_blob = __esm({
|
|
25862
25900
|
}
|
25863
25901
|
});
|
25864
25902
|
|
25865
|
-
// ../
|
25903
|
+
// ../drizzle-orm/dist/sqlite-core/columns/custom.js
|
25866
25904
|
var _a174, _b122, SQLiteCustomColumnBuilder, _a175, _b123, SQLiteCustomColumn;
|
25867
25905
|
var init_custom2 = __esm({
|
25868
|
-
"../
|
25906
|
+
"../drizzle-orm/dist/sqlite-core/columns/custom.js"() {
|
25869
25907
|
"use strict";
|
25870
25908
|
init_entity();
|
25871
25909
|
init_common3();
|
@@ -25908,10 +25946,10 @@ var init_custom2 = __esm({
|
|
25908
25946
|
}
|
25909
25947
|
});
|
25910
25948
|
|
25911
|
-
// ../
|
25949
|
+
// ../drizzle-orm/dist/sqlite-core/columns/integer.js
|
25912
25950
|
var _a176, _b124, SQLiteBaseIntegerBuilder, _a177, _b125, SQLiteBaseInteger, _a178, _b126, SQLiteIntegerBuilder, _a179, _b127, SQLiteInteger, _a180, _b128, SQLiteTimestampBuilder, _a181, _b129, SQLiteTimestamp, _a182, _b130, SQLiteBooleanBuilder, _a183, _b131, SQLiteBoolean;
|
25913
25951
|
var init_integer2 = __esm({
|
25914
|
-
"../
|
25952
|
+
"../drizzle-orm/dist/sqlite-core/columns/integer.js"() {
|
25915
25953
|
"use strict";
|
25916
25954
|
init_entity();
|
25917
25955
|
init_sql();
|
@@ -26025,10 +26063,10 @@ var init_integer2 = __esm({
|
|
26025
26063
|
}
|
26026
26064
|
});
|
26027
26065
|
|
26028
|
-
// ../
|
26066
|
+
// ../drizzle-orm/dist/sqlite-core/columns/numeric.js
|
26029
26067
|
var _a184, _b132, SQLiteNumericBuilder, _a185, _b133, SQLiteNumeric;
|
26030
26068
|
var init_numeric2 = __esm({
|
26031
|
-
"../
|
26069
|
+
"../drizzle-orm/dist/sqlite-core/columns/numeric.js"() {
|
26032
26070
|
"use strict";
|
26033
26071
|
init_entity();
|
26034
26072
|
init_common3();
|
@@ -26054,10 +26092,10 @@ var init_numeric2 = __esm({
|
|
26054
26092
|
}
|
26055
26093
|
});
|
26056
26094
|
|
26057
|
-
// ../
|
26095
|
+
// ../drizzle-orm/dist/sqlite-core/columns/real.js
|
26058
26096
|
var _a186, _b134, SQLiteRealBuilder, _a187, _b135, SQLiteReal;
|
26059
26097
|
var init_real2 = __esm({
|
26060
|
-
"../
|
26098
|
+
"../drizzle-orm/dist/sqlite-core/columns/real.js"() {
|
26061
26099
|
"use strict";
|
26062
26100
|
init_entity();
|
26063
26101
|
init_common3();
|
@@ -26080,10 +26118,10 @@ var init_real2 = __esm({
|
|
26080
26118
|
}
|
26081
26119
|
});
|
26082
26120
|
|
26083
|
-
// ../
|
26121
|
+
// ../drizzle-orm/dist/sqlite-core/columns/text.js
|
26084
26122
|
var _a188, _b136, SQLiteTextBuilder, _a189, _b137, SQLiteText, _a190, _b138, SQLiteTextJsonBuilder, _a191, _b139, SQLiteTextJson;
|
26085
26123
|
var init_text2 = __esm({
|
26086
|
-
"../
|
26124
|
+
"../drizzle-orm/dist/sqlite-core/columns/text.js"() {
|
26087
26125
|
"use strict";
|
26088
26126
|
init_entity();
|
26089
26127
|
init_common3();
|
@@ -26138,9 +26176,9 @@ var init_text2 = __esm({
|
|
26138
26176
|
}
|
26139
26177
|
});
|
26140
26178
|
|
26141
|
-
// ../
|
26179
|
+
// ../drizzle-orm/dist/sqlite-core/columns/index.js
|
26142
26180
|
var init_columns2 = __esm({
|
26143
|
-
"../
|
26181
|
+
"../drizzle-orm/dist/sqlite-core/columns/index.js"() {
|
26144
26182
|
"use strict";
|
26145
26183
|
init_blob();
|
26146
26184
|
init_common3();
|
@@ -26152,10 +26190,10 @@ var init_columns2 = __esm({
|
|
26152
26190
|
}
|
26153
26191
|
});
|
26154
26192
|
|
26155
|
-
// ../
|
26193
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/delete.js
|
26156
26194
|
var _a192, _b140, SQLiteDeleteBase;
|
26157
26195
|
var init_delete2 = __esm({
|
26158
|
-
"../
|
26196
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/delete.js"() {
|
26159
26197
|
"use strict";
|
26160
26198
|
init_entity();
|
26161
26199
|
init_query_promise();
|
@@ -26251,10 +26289,10 @@ var init_delete2 = __esm({
|
|
26251
26289
|
}
|
26252
26290
|
});
|
26253
26291
|
|
26254
|
-
// ../
|
26292
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/insert.js
|
26255
26293
|
var _a193, SQLiteInsertBuilder, _a194, _b141, SQLiteInsertBase;
|
26256
26294
|
var init_insert2 = __esm({
|
26257
|
-
"../
|
26295
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/insert.js"() {
|
26258
26296
|
"use strict";
|
26259
26297
|
init_entity();
|
26260
26298
|
init_query_promise();
|
@@ -26277,7 +26315,7 @@ var init_insert2 = __esm({
|
|
26277
26315
|
}
|
26278
26316
|
const mappedValues = values.map((entry) => {
|
26279
26317
|
const result = {};
|
26280
|
-
const cols = this.table[
|
26318
|
+
const cols = this.table[Table2.Symbol.Columns];
|
26281
26319
|
for (const colKey of Object.keys(entry)) {
|
26282
26320
|
const colValue = entry[colKey];
|
26283
26321
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -26419,10 +26457,10 @@ var init_insert2 = __esm({
|
|
26419
26457
|
}
|
26420
26458
|
});
|
26421
26459
|
|
26422
|
-
// ../
|
26460
|
+
// ../drizzle-orm/dist/sqlite-core/view-base.js
|
26423
26461
|
var _a195, _b142, SQLiteViewBase;
|
26424
26462
|
var init_view_base2 = __esm({
|
26425
|
-
"../
|
26463
|
+
"../drizzle-orm/dist/sqlite-core/view-base.js"() {
|
26426
26464
|
"use strict";
|
26427
26465
|
init_entity();
|
26428
26466
|
init_sql();
|
@@ -26432,10 +26470,10 @@ var init_view_base2 = __esm({
|
|
26432
26470
|
}
|
26433
26471
|
});
|
26434
26472
|
|
26435
|
-
// ../
|
26473
|
+
// ../drizzle-orm/dist/sqlite-core/dialect.js
|
26436
26474
|
var _a196, SQLiteDialect, _a197, _b143, SQLiteSyncDialect, _a198, _b144, SQLiteAsyncDialect;
|
26437
26475
|
var init_dialect2 = __esm({
|
26438
|
-
"../
|
26476
|
+
"../drizzle-orm/dist/sqlite-core/dialect.js"() {
|
26439
26477
|
"use strict";
|
26440
26478
|
init_alias();
|
26441
26479
|
init_column();
|
@@ -26482,7 +26520,7 @@ var init_dialect2 = __esm({
|
|
26482
26520
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
26483
26521
|
}
|
26484
26522
|
buildUpdateSet(table4, set) {
|
26485
|
-
const tableColumns = table4[
|
26523
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
26486
26524
|
const columnNames = Object.keys(tableColumns).filter(
|
26487
26525
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
26488
26526
|
);
|
@@ -26527,7 +26565,7 @@ var init_dialect2 = __esm({
|
|
26527
26565
|
chunk.push(
|
26528
26566
|
new SQL(
|
26529
26567
|
query.queryChunks.map((c) => {
|
26530
|
-
if (is(c,
|
26568
|
+
if (is(c, Column2)) {
|
26531
26569
|
return sql.identifier(c.name);
|
26532
26570
|
}
|
26533
26571
|
return c;
|
@@ -26540,8 +26578,8 @@ var init_dialect2 = __esm({
|
|
26540
26578
|
if (is(field, SQL.Aliased)) {
|
26541
26579
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
26542
26580
|
}
|
26543
|
-
} else if (is(field,
|
26544
|
-
const tableName = field.table[
|
26581
|
+
} else if (is(field, Column2)) {
|
26582
|
+
const tableName = field.table[Table2.Symbol.Name];
|
26545
26583
|
const columnName = field.name;
|
26546
26584
|
if (isSingleTable) {
|
26547
26585
|
chunk.push(sql.identifier(columnName));
|
@@ -26573,8 +26611,8 @@ var init_dialect2 = __esm({
|
|
26573
26611
|
}) {
|
26574
26612
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
26575
26613
|
for (const f of fieldsList) {
|
26576
|
-
if (is(f.field,
|
26577
|
-
({ alias }) => alias === (table22[
|
26614
|
+
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(
|
26615
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
26578
26616
|
))(f.field.table)) {
|
26579
26617
|
const tableName = getTableName(f.field.table);
|
26580
26618
|
throw new Error(
|
@@ -26587,8 +26625,8 @@ var init_dialect2 = __esm({
|
|
26587
26625
|
const distinctSql = distinct ? sql` distinct` : void 0;
|
26588
26626
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
26589
26627
|
const tableSql = (() => {
|
26590
|
-
if (is(table4,
|
26591
|
-
return sql`${sql.identifier(table4[
|
26628
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
26629
|
+
return sql`${sql.identifier(table4[Table2.Symbol.OriginalName])} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
26592
26630
|
}
|
26593
26631
|
return table4;
|
26594
26632
|
})();
|
@@ -26694,7 +26732,7 @@ var init_dialect2 = __esm({
|
|
26694
26732
|
}
|
26695
26733
|
buildInsertQuery({ table: table4, values, onConflict, returning, withList }) {
|
26696
26734
|
const valuesSqlList = [];
|
26697
|
-
const columns = table4[
|
26735
|
+
const columns = table4[Table2.Symbol.Columns];
|
26698
26736
|
const colEntries = Object.entries(columns).filter(
|
26699
26737
|
([_2, col]) => !col.shouldDisableInsert()
|
26700
26738
|
);
|
@@ -26815,7 +26853,7 @@ var init_dialect2 = __esm({
|
|
26815
26853
|
selection.push({
|
26816
26854
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
26817
26855
|
tsKey,
|
26818
|
-
field: is(value,
|
26856
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
26819
26857
|
relationTableTsKey: void 0,
|
26820
26858
|
isJson: false,
|
26821
26859
|
selection: []
|
@@ -26826,7 +26864,7 @@ var init_dialect2 = __esm({
|
|
26826
26864
|
orderByOrig = [orderByOrig];
|
26827
26865
|
}
|
26828
26866
|
orderBy = orderByOrig.map((orderByValue) => {
|
26829
|
-
if (is(orderByValue,
|
26867
|
+
if (is(orderByValue, Column2)) {
|
26830
26868
|
return aliasedTableColumn(orderByValue, tableAlias);
|
26831
26869
|
}
|
26832
26870
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -26926,7 +26964,7 @@ var init_dialect2 = __esm({
|
|
26926
26964
|
fields: {},
|
26927
26965
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
26928
26966
|
path: [],
|
26929
|
-
field: is(field2,
|
26967
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
26930
26968
|
})),
|
26931
26969
|
joins,
|
26932
26970
|
where,
|
@@ -26941,7 +26979,7 @@ var init_dialect2 = __esm({
|
|
26941
26979
|
fields: {},
|
26942
26980
|
fieldsFlat: selection.map(({ field }) => ({
|
26943
26981
|
path: [],
|
26944
|
-
field: is(field,
|
26982
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
26945
26983
|
})),
|
26946
26984
|
joins,
|
26947
26985
|
where,
|
@@ -27027,7 +27065,7 @@ var init_dialect2 = __esm({
|
|
27027
27065
|
}
|
27028
27066
|
});
|
27029
27067
|
|
27030
|
-
// ../
|
27068
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/select.js
|
27031
27069
|
function createSetOperator2(type, isAll) {
|
27032
27070
|
return (leftSelect, rightSelect, ...restSelects) => {
|
27033
27071
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -27047,7 +27085,7 @@ function createSetOperator2(type, isAll) {
|
|
27047
27085
|
}
|
27048
27086
|
var _a199, SQLiteSelectBuilder, _a200, _b145, SQLiteSelectQueryBuilderBase, _a201, _b146, SQLiteSelectBase, getSQLiteSetOperators, union2, unionAll2, intersect2, except2;
|
27049
27087
|
var init_select3 = __esm({
|
27050
|
-
"../
|
27088
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/select.js"() {
|
27051
27089
|
"use strict";
|
27052
27090
|
init_entity();
|
27053
27091
|
init_query_builder();
|
@@ -27358,7 +27396,7 @@ var init_select3 = __esm({
|
|
27358
27396
|
};
|
27359
27397
|
}
|
27360
27398
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
27361
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
27399
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
27362
27400
|
this.config.fields[tableName] = selection;
|
27363
27401
|
}
|
27364
27402
|
}
|
@@ -27660,10 +27698,10 @@ var init_select3 = __esm({
|
|
27660
27698
|
}
|
27661
27699
|
});
|
27662
27700
|
|
27663
|
-
// ../
|
27701
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/query-builder.js
|
27664
27702
|
var _a202, QueryBuilder2;
|
27665
27703
|
var init_query_builder3 = __esm({
|
27666
|
-
"../
|
27704
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/query-builder.js"() {
|
27667
27705
|
"use strict";
|
27668
27706
|
init_entity();
|
27669
27707
|
init_selection_proxy();
|
@@ -27733,17 +27771,17 @@ var init_query_builder3 = __esm({
|
|
27733
27771
|
}
|
27734
27772
|
});
|
27735
27773
|
|
27736
|
-
// ../
|
27774
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/select.types.js
|
27737
27775
|
var init_select_types2 = __esm({
|
27738
|
-
"../
|
27776
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/select.types.js"() {
|
27739
27777
|
"use strict";
|
27740
27778
|
}
|
27741
27779
|
});
|
27742
27780
|
|
27743
|
-
// ../
|
27781
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/update.js
|
27744
27782
|
var _a203, SQLiteUpdateBuilder, _a204, _b147, SQLiteUpdateBase;
|
27745
27783
|
var init_update2 = __esm({
|
27746
|
-
"../
|
27784
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/update.js"() {
|
27747
27785
|
"use strict";
|
27748
27786
|
init_entity();
|
27749
27787
|
init_query_promise();
|
@@ -27861,9 +27899,9 @@ var init_update2 = __esm({
|
|
27861
27899
|
}
|
27862
27900
|
});
|
27863
27901
|
|
27864
|
-
// ../
|
27902
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/index.js
|
27865
27903
|
var init_query_builders2 = __esm({
|
27866
|
-
"../
|
27904
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/index.js"() {
|
27867
27905
|
"use strict";
|
27868
27906
|
init_delete2();
|
27869
27907
|
init_insert2();
|
@@ -27874,10 +27912,10 @@ var init_query_builders2 = __esm({
|
|
27874
27912
|
}
|
27875
27913
|
});
|
27876
27914
|
|
27877
|
-
// ../
|
27915
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/query.js
|
27878
27916
|
var _a205, RelationalQueryBuilder2, _a206, _b148, SQLiteRelationalQuery, _a207, _b149, SQLiteSyncRelationalQuery;
|
27879
27917
|
var init_query2 = __esm({
|
27880
|
-
"../
|
27918
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/query.js"() {
|
27881
27919
|
"use strict";
|
27882
27920
|
init_entity();
|
27883
27921
|
init_query_promise();
|
@@ -28028,10 +28066,10 @@ var init_query2 = __esm({
|
|
28028
28066
|
}
|
28029
28067
|
});
|
28030
28068
|
|
28031
|
-
// ../
|
28069
|
+
// ../drizzle-orm/dist/sqlite-core/query-builders/raw.js
|
28032
28070
|
var _a208, _b150, SQLiteRaw;
|
28033
28071
|
var init_raw2 = __esm({
|
28034
|
-
"../
|
28072
|
+
"../drizzle-orm/dist/sqlite-core/query-builders/raw.js"() {
|
28035
28073
|
"use strict";
|
28036
28074
|
init_entity();
|
28037
28075
|
init_query_promise();
|
@@ -28064,10 +28102,10 @@ var init_raw2 = __esm({
|
|
28064
28102
|
}
|
28065
28103
|
});
|
28066
28104
|
|
28067
|
-
// ../
|
28105
|
+
// ../drizzle-orm/dist/sqlite-core/db.js
|
28068
28106
|
var _a209, BaseSQLiteDatabase;
|
28069
28107
|
var init_db2 = __esm({
|
28070
|
-
"../
|
28108
|
+
"../drizzle-orm/dist/sqlite-core/db.js"() {
|
28071
28109
|
"use strict";
|
28072
28110
|
init_entity();
|
28073
28111
|
init_selection_proxy();
|
@@ -28357,10 +28395,10 @@ var init_db2 = __esm({
|
|
28357
28395
|
}
|
28358
28396
|
});
|
28359
28397
|
|
28360
|
-
// ../
|
28398
|
+
// ../drizzle-orm/dist/sqlite-core/indexes.js
|
28361
28399
|
var _a210, IndexBuilderOn2, _a211, IndexBuilder2, _a212, Index4;
|
28362
28400
|
var init_indexes2 = __esm({
|
28363
|
-
"../
|
28401
|
+
"../drizzle-orm/dist/sqlite-core/indexes.js"() {
|
28364
28402
|
"use strict";
|
28365
28403
|
init_entity();
|
28366
28404
|
_a210 = entityKind;
|
@@ -28410,10 +28448,10 @@ var init_indexes2 = __esm({
|
|
28410
28448
|
}
|
28411
28449
|
});
|
28412
28450
|
|
28413
|
-
// ../
|
28451
|
+
// ../drizzle-orm/dist/sqlite-core/primary-keys.js
|
28414
28452
|
var _a213, PrimaryKeyBuilder2, _a214, PrimaryKey2;
|
28415
28453
|
var init_primary_keys2 = __esm({
|
28416
|
-
"../
|
28454
|
+
"../drizzle-orm/dist/sqlite-core/primary-keys.js"() {
|
28417
28455
|
"use strict";
|
28418
28456
|
init_entity();
|
28419
28457
|
init_table3();
|
@@ -28450,10 +28488,10 @@ var init_primary_keys2 = __esm({
|
|
28450
28488
|
}
|
28451
28489
|
});
|
28452
28490
|
|
28453
|
-
// ../
|
28491
|
+
// ../drizzle-orm/dist/sqlite-core/session.js
|
28454
28492
|
var _a215, _b151, ExecuteResultSync, _a216, SQLitePreparedQuery, _a217, SQLiteSession, _a218, _b152, SQLiteTransaction;
|
28455
28493
|
var init_session2 = __esm({
|
28456
|
-
"../
|
28494
|
+
"../drizzle-orm/dist/sqlite-core/session.js"() {
|
28457
28495
|
"use strict";
|
28458
28496
|
init_entity();
|
28459
28497
|
init_errors();
|
@@ -28571,23 +28609,23 @@ var init_session2 = __esm({
|
|
28571
28609
|
}
|
28572
28610
|
});
|
28573
28611
|
|
28574
|
-
// ../
|
28612
|
+
// ../drizzle-orm/dist/sqlite-core/subquery.js
|
28575
28613
|
var init_subquery3 = __esm({
|
28576
|
-
"../
|
28614
|
+
"../drizzle-orm/dist/sqlite-core/subquery.js"() {
|
28577
28615
|
"use strict";
|
28578
28616
|
}
|
28579
28617
|
});
|
28580
28618
|
|
28581
|
-
// ../
|
28619
|
+
// ../drizzle-orm/dist/sqlite-core/view-common.js
|
28582
28620
|
var SQLiteViewConfig;
|
28583
28621
|
var init_view_common3 = __esm({
|
28584
|
-
"../
|
28622
|
+
"../drizzle-orm/dist/sqlite-core/view-common.js"() {
|
28585
28623
|
"use strict";
|
28586
28624
|
SQLiteViewConfig = Symbol.for("drizzle:SQLiteViewConfig");
|
28587
28625
|
}
|
28588
28626
|
});
|
28589
28627
|
|
28590
|
-
// ../
|
28628
|
+
// ../drizzle-orm/dist/sqlite-core/utils.js
|
28591
28629
|
function getTableConfig2(table4) {
|
28592
28630
|
const columns = Object.values(table4[SQLiteTable.Symbol.Columns]);
|
28593
28631
|
const indexes = [];
|
@@ -28595,7 +28633,7 @@ function getTableConfig2(table4) {
|
|
28595
28633
|
const primaryKeys = [];
|
28596
28634
|
const uniqueConstraints = [];
|
28597
28635
|
const foreignKeys = Object.values(table4[SQLiteTable.Symbol.InlineForeignKeys]);
|
28598
|
-
const name2 = table4[
|
28636
|
+
const name2 = table4[Table2.Symbol.Name];
|
28599
28637
|
const extraConfigBuilder = table4[SQLiteTable.Symbol.ExtraConfigBuilder];
|
28600
28638
|
if (extraConfigBuilder !== void 0) {
|
28601
28639
|
const extraConfig = extraConfigBuilder(table4[SQLiteTable.Symbol.Columns]);
|
@@ -28624,7 +28662,7 @@ function getTableConfig2(table4) {
|
|
28624
28662
|
};
|
28625
28663
|
}
|
28626
28664
|
var init_utils6 = __esm({
|
28627
|
-
"../
|
28665
|
+
"../drizzle-orm/dist/sqlite-core/utils.js"() {
|
28628
28666
|
"use strict";
|
28629
28667
|
init_entity();
|
28630
28668
|
init_table();
|
@@ -28637,10 +28675,10 @@ var init_utils6 = __esm({
|
|
28637
28675
|
}
|
28638
28676
|
});
|
28639
28677
|
|
28640
|
-
// ../
|
28678
|
+
// ../drizzle-orm/dist/sqlite-core/view.js
|
28641
28679
|
var _a219, ViewBuilderCore, _a220, _b153, ViewBuilder2, _a221, _b154, ManualViewBuilder2, _a222, _b155, _c6, SQLiteView;
|
28642
28680
|
var init_view2 = __esm({
|
28643
|
-
"../
|
28681
|
+
"../drizzle-orm/dist/sqlite-core/view.js"() {
|
28644
28682
|
"use strict";
|
28645
28683
|
init_entity();
|
28646
28684
|
init_selection_proxy();
|
@@ -28742,9 +28780,9 @@ var init_view2 = __esm({
|
|
28742
28780
|
}
|
28743
28781
|
});
|
28744
28782
|
|
28745
|
-
// ../
|
28783
|
+
// ../drizzle-orm/dist/sqlite-core/index.js
|
28746
28784
|
var init_sqlite_core = __esm({
|
28747
|
-
"../
|
28785
|
+
"../drizzle-orm/dist/sqlite-core/index.js"() {
|
28748
28786
|
"use strict";
|
28749
28787
|
init_alias3();
|
28750
28788
|
init_checks2();
|
@@ -28831,7 +28869,7 @@ var init_sqliteSerializer = __esm({
|
|
28831
28869
|
"src/serializer/sqliteSerializer.ts"() {
|
28832
28870
|
"use strict";
|
28833
28871
|
init_source();
|
28834
|
-
|
28872
|
+
init_dist();
|
28835
28873
|
init_sqlite_core();
|
28836
28874
|
init_outputs();
|
28837
28875
|
init_serializer();
|
@@ -29244,17 +29282,17 @@ WHERE
|
|
29244
29282
|
}
|
29245
29283
|
});
|
29246
29284
|
|
29247
|
-
// ../
|
29285
|
+
// ../drizzle-orm/dist/mysql-core/alias.js
|
29248
29286
|
var init_alias4 = __esm({
|
29249
|
-
"../
|
29287
|
+
"../drizzle-orm/dist/mysql-core/alias.js"() {
|
29250
29288
|
"use strict";
|
29251
29289
|
}
|
29252
29290
|
});
|
29253
29291
|
|
29254
|
-
// ../
|
29292
|
+
// ../drizzle-orm/dist/mysql-core/checks.js
|
29255
29293
|
var _a223, CheckBuilder3, _a224, Check3;
|
29256
29294
|
var init_checks3 = __esm({
|
29257
|
-
"../
|
29295
|
+
"../drizzle-orm/dist/mysql-core/checks.js"() {
|
29258
29296
|
"use strict";
|
29259
29297
|
init_entity();
|
29260
29298
|
_a223 = entityKind;
|
@@ -29284,7 +29322,7 @@ var init_checks3 = __esm({
|
|
29284
29322
|
}
|
29285
29323
|
});
|
29286
29324
|
|
29287
|
-
// ../
|
29325
|
+
// ../drizzle-orm/dist/mysql-core/table.js
|
29288
29326
|
function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = name2) {
|
29289
29327
|
const rawTable = new MySqlTable(name2, schema4, baseName);
|
29290
29328
|
const builtColumns = Object.fromEntries(
|
@@ -29296,8 +29334,8 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = n
|
|
29296
29334
|
})
|
29297
29335
|
);
|
29298
29336
|
const table4 = Object.assign(rawTable, builtColumns);
|
29299
|
-
table4[
|
29300
|
-
table4[
|
29337
|
+
table4[Table2.Symbol.Columns] = builtColumns;
|
29338
|
+
table4[Table2.Symbol.ExtraConfigColumns] = builtColumns;
|
29301
29339
|
if (extraConfig) {
|
29302
29340
|
table4[MySqlTable.Symbol.ExtraConfigBuilder] = extraConfig;
|
29303
29341
|
}
|
@@ -29305,12 +29343,12 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema4, baseName = n
|
|
29305
29343
|
}
|
29306
29344
|
var InlineForeignKeys3, _a225, _b156, _c7, _d4, _e3, MySqlTable, mysqlTable;
|
29307
29345
|
var init_table4 = __esm({
|
29308
|
-
"../
|
29346
|
+
"../drizzle-orm/dist/mysql-core/table.js"() {
|
29309
29347
|
"use strict";
|
29310
29348
|
init_entity();
|
29311
29349
|
init_table();
|
29312
29350
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
29313
|
-
MySqlTable = class extends (_e3 =
|
29351
|
+
MySqlTable = class extends (_e3 = Table2, _d4 = entityKind, _c7 = Table2.Symbol.Columns, _b156 = InlineForeignKeys3, _a225 = Table2.Symbol.ExtraConfigBuilder, _e3) {
|
29314
29352
|
constructor() {
|
29315
29353
|
super(...arguments);
|
29316
29354
|
/** @internal */
|
@@ -29323,7 +29361,7 @@ var init_table4 = __esm({
|
|
29323
29361
|
};
|
29324
29362
|
__publicField(MySqlTable, _d4, "MySqlTable");
|
29325
29363
|
/** @internal */
|
29326
|
-
__publicField(MySqlTable, "Symbol", Object.assign({},
|
29364
|
+
__publicField(MySqlTable, "Symbol", Object.assign({}, Table2.Symbol, {
|
29327
29365
|
InlineForeignKeys: InlineForeignKeys3
|
29328
29366
|
}));
|
29329
29367
|
mysqlTable = (name2, columns, extraConfig) => {
|
@@ -29332,10 +29370,10 @@ var init_table4 = __esm({
|
|
29332
29370
|
}
|
29333
29371
|
});
|
29334
29372
|
|
29335
|
-
// ../
|
29373
|
+
// ../drizzle-orm/dist/mysql-core/foreign-keys.js
|
29336
29374
|
var _a226, ForeignKeyBuilder3, _a227, ForeignKey3;
|
29337
29375
|
var init_foreign_keys3 = __esm({
|
29338
|
-
"../
|
29376
|
+
"../drizzle-orm/dist/mysql-core/foreign-keys.js"() {
|
29339
29377
|
"use strict";
|
29340
29378
|
init_entity();
|
29341
29379
|
init_table4();
|
@@ -29399,13 +29437,13 @@ var init_foreign_keys3 = __esm({
|
|
29399
29437
|
}
|
29400
29438
|
});
|
29401
29439
|
|
29402
|
-
// ../
|
29440
|
+
// ../drizzle-orm/dist/mysql-core/unique-constraint.js
|
29403
29441
|
function uniqueKeyName3(table4, columns) {
|
29404
29442
|
return `${table4[MySqlTable.Symbol.Name]}_${columns.join("_")}_unique`;
|
29405
29443
|
}
|
29406
29444
|
var _a228, UniqueConstraintBuilder3, _a229, UniqueOnConstraintBuilder3, _a230, UniqueConstraint3;
|
29407
29445
|
var init_unique_constraint3 = __esm({
|
29408
|
-
"../
|
29446
|
+
"../drizzle-orm/dist/mysql-core/unique-constraint.js"() {
|
29409
29447
|
"use strict";
|
29410
29448
|
init_entity();
|
29411
29449
|
init_table4();
|
@@ -29453,10 +29491,10 @@ var init_unique_constraint3 = __esm({
|
|
29453
29491
|
}
|
29454
29492
|
});
|
29455
29493
|
|
29456
|
-
// ../
|
29494
|
+
// ../drizzle-orm/dist/mysql-core/columns/common.js
|
29457
29495
|
var _a231, _b157, MySqlColumnBuilder, _a232, _b158, MySqlColumn, _a233, _b159, MySqlColumnBuilderWithAutoIncrement, _a234, _b160, MySqlColumnWithAutoIncrement;
|
29458
29496
|
var init_common4 = __esm({
|
29459
|
-
"../
|
29497
|
+
"../drizzle-orm/dist/mysql-core/columns/common.js"() {
|
29460
29498
|
"use strict";
|
29461
29499
|
init_column_builder();
|
29462
29500
|
init_column();
|
@@ -29505,7 +29543,7 @@ var init_common4 = __esm({
|
|
29505
29543
|
}
|
29506
29544
|
};
|
29507
29545
|
__publicField(MySqlColumnBuilder, _a231, "MySqlColumnBuilder");
|
29508
|
-
MySqlColumn = class extends (_b158 =
|
29546
|
+
MySqlColumn = class extends (_b158 = Column2, _a232 = entityKind, _b158) {
|
29509
29547
|
constructor(table4, config) {
|
29510
29548
|
if (!config.uniqueName) {
|
29511
29549
|
config.uniqueName = uniqueKeyName3(table4, [config.name]);
|
@@ -29537,10 +29575,10 @@ var init_common4 = __esm({
|
|
29537
29575
|
}
|
29538
29576
|
});
|
29539
29577
|
|
29540
|
-
// ../
|
29578
|
+
// ../drizzle-orm/dist/mysql-core/columns/bigint.js
|
29541
29579
|
var _a235, _b161, MySqlBigInt53Builder, _a236, _b162, MySqlBigInt53, _a237, _b163, MySqlBigInt64Builder, _a238, _b164, MySqlBigInt64;
|
29542
29580
|
var init_bigint2 = __esm({
|
29543
|
-
"../
|
29581
|
+
"../drizzle-orm/dist/mysql-core/columns/bigint.js"() {
|
29544
29582
|
"use strict";
|
29545
29583
|
init_entity();
|
29546
29584
|
init_common4();
|
@@ -29597,10 +29635,10 @@ var init_bigint2 = __esm({
|
|
29597
29635
|
}
|
29598
29636
|
});
|
29599
29637
|
|
29600
|
-
// ../
|
29638
|
+
// ../drizzle-orm/dist/mysql-core/columns/binary.js
|
29601
29639
|
var _a239, _b165, MySqlBinaryBuilder, _a240, _b166, MySqlBinary;
|
29602
29640
|
var init_binary = __esm({
|
29603
|
-
"../
|
29641
|
+
"../drizzle-orm/dist/mysql-core/columns/binary.js"() {
|
29604
29642
|
"use strict";
|
29605
29643
|
init_entity();
|
29606
29644
|
init_common4();
|
@@ -29628,10 +29666,10 @@ var init_binary = __esm({
|
|
29628
29666
|
}
|
29629
29667
|
});
|
29630
29668
|
|
29631
|
-
// ../
|
29669
|
+
// ../drizzle-orm/dist/mysql-core/columns/boolean.js
|
29632
29670
|
var _a241, _b167, MySqlBooleanBuilder, _a242, _b168, MySqlBoolean;
|
29633
29671
|
var init_boolean2 = __esm({
|
29634
|
-
"../
|
29672
|
+
"../drizzle-orm/dist/mysql-core/columns/boolean.js"() {
|
29635
29673
|
"use strict";
|
29636
29674
|
init_entity();
|
29637
29675
|
init_common4();
|
@@ -29663,10 +29701,10 @@ var init_boolean2 = __esm({
|
|
29663
29701
|
}
|
29664
29702
|
});
|
29665
29703
|
|
29666
|
-
// ../
|
29704
|
+
// ../drizzle-orm/dist/mysql-core/columns/char.js
|
29667
29705
|
var _a243, _b169, MySqlCharBuilder, _a244, _b170, MySqlChar;
|
29668
29706
|
var init_char2 = __esm({
|
29669
|
-
"../
|
29707
|
+
"../drizzle-orm/dist/mysql-core/columns/char.js"() {
|
29670
29708
|
"use strict";
|
29671
29709
|
init_entity();
|
29672
29710
|
init_common4();
|
@@ -29699,10 +29737,10 @@ var init_char2 = __esm({
|
|
29699
29737
|
}
|
29700
29738
|
});
|
29701
29739
|
|
29702
|
-
// ../
|
29740
|
+
// ../drizzle-orm/dist/mysql-core/columns/custom.js
|
29703
29741
|
var _a245, _b171, MySqlCustomColumnBuilder, _a246, _b172, MySqlCustomColumn;
|
29704
29742
|
var init_custom3 = __esm({
|
29705
|
-
"../
|
29743
|
+
"../drizzle-orm/dist/mysql-core/columns/custom.js"() {
|
29706
29744
|
"use strict";
|
29707
29745
|
init_entity();
|
29708
29746
|
init_common4();
|
@@ -29745,10 +29783,10 @@ var init_custom3 = __esm({
|
|
29745
29783
|
}
|
29746
29784
|
});
|
29747
29785
|
|
29748
|
-
// ../
|
29786
|
+
// ../drizzle-orm/dist/mysql-core/columns/date.js
|
29749
29787
|
var _a247, _b173, MySqlDateBuilder, _a248, _b174, MySqlDate, _a249, _b175, MySqlDateStringBuilder, _a250, _b176, MySqlDateString;
|
29750
29788
|
var init_date2 = __esm({
|
29751
|
-
"../
|
29789
|
+
"../drizzle-orm/dist/mysql-core/columns/date.js"() {
|
29752
29790
|
"use strict";
|
29753
29791
|
init_entity();
|
29754
29792
|
init_common4();
|
@@ -29799,10 +29837,10 @@ var init_date2 = __esm({
|
|
29799
29837
|
}
|
29800
29838
|
});
|
29801
29839
|
|
29802
|
-
// ../
|
29840
|
+
// ../drizzle-orm/dist/mysql-core/columns/datetime.js
|
29803
29841
|
var _a251, _b177, MySqlDateTimeBuilder, _a252, _b178, MySqlDateTime, _a253, _b179, MySqlDateTimeStringBuilder, _a254, _b180, MySqlDateTimeString;
|
29804
29842
|
var init_datetime = __esm({
|
29805
|
-
"../
|
29843
|
+
"../drizzle-orm/dist/mysql-core/columns/datetime.js"() {
|
29806
29844
|
"use strict";
|
29807
29845
|
init_entity();
|
29808
29846
|
init_common4();
|
@@ -29867,10 +29905,10 @@ var init_datetime = __esm({
|
|
29867
29905
|
}
|
29868
29906
|
});
|
29869
29907
|
|
29870
|
-
// ../
|
29908
|
+
// ../drizzle-orm/dist/mysql-core/columns/decimal.js
|
29871
29909
|
var _a255, _b181, MySqlDecimalBuilder, _a256, _b182, MySqlDecimal;
|
29872
29910
|
var init_decimal = __esm({
|
29873
|
-
"../
|
29911
|
+
"../drizzle-orm/dist/mysql-core/columns/decimal.js"() {
|
29874
29912
|
"use strict";
|
29875
29913
|
init_entity();
|
29876
29914
|
init_common4();
|
@@ -29909,10 +29947,10 @@ var init_decimal = __esm({
|
|
29909
29947
|
}
|
29910
29948
|
});
|
29911
29949
|
|
29912
|
-
// ../
|
29950
|
+
// ../drizzle-orm/dist/mysql-core/columns/double.js
|
29913
29951
|
var _a257, _b183, MySqlDoubleBuilder, _a258, _b184, MySqlDouble;
|
29914
29952
|
var init_double = __esm({
|
29915
|
-
"../
|
29953
|
+
"../drizzle-orm/dist/mysql-core/columns/double.js"() {
|
29916
29954
|
"use strict";
|
29917
29955
|
init_entity();
|
29918
29956
|
init_common4();
|
@@ -29948,10 +29986,10 @@ var init_double = __esm({
|
|
29948
29986
|
}
|
29949
29987
|
});
|
29950
29988
|
|
29951
|
-
// ../
|
29989
|
+
// ../drizzle-orm/dist/mysql-core/columns/enum.js
|
29952
29990
|
var _a259, _b185, MySqlEnumColumnBuilder, _a260, _b186, MySqlEnumColumn;
|
29953
29991
|
var init_enum2 = __esm({
|
29954
|
-
"../
|
29992
|
+
"../drizzle-orm/dist/mysql-core/columns/enum.js"() {
|
29955
29993
|
"use strict";
|
29956
29994
|
init_entity();
|
29957
29995
|
init_common4();
|
@@ -29982,10 +30020,10 @@ var init_enum2 = __esm({
|
|
29982
30020
|
}
|
29983
30021
|
});
|
29984
30022
|
|
29985
|
-
// ../
|
30023
|
+
// ../drizzle-orm/dist/mysql-core/columns/float.js
|
29986
30024
|
var _a261, _b187, MySqlFloatBuilder, _a262, _b188, MySqlFloat;
|
29987
30025
|
var init_float = __esm({
|
29988
|
-
"../
|
30026
|
+
"../drizzle-orm/dist/mysql-core/columns/float.js"() {
|
29989
30027
|
"use strict";
|
29990
30028
|
init_entity();
|
29991
30029
|
init_common4();
|
@@ -30008,10 +30046,10 @@ var init_float = __esm({
|
|
30008
30046
|
}
|
30009
30047
|
});
|
30010
30048
|
|
30011
|
-
// ../
|
30049
|
+
// ../drizzle-orm/dist/mysql-core/columns/int.js
|
30012
30050
|
var _a263, _b189, MySqlIntBuilder, _a264, _b190, MySqlInt;
|
30013
30051
|
var init_int = __esm({
|
30014
|
-
"../
|
30052
|
+
"../drizzle-orm/dist/mysql-core/columns/int.js"() {
|
30015
30053
|
"use strict";
|
30016
30054
|
init_entity();
|
30017
30055
|
init_common4();
|
@@ -30041,10 +30079,10 @@ var init_int = __esm({
|
|
30041
30079
|
}
|
30042
30080
|
});
|
30043
30081
|
|
30044
|
-
// ../
|
30082
|
+
// ../drizzle-orm/dist/mysql-core/columns/json.js
|
30045
30083
|
var _a265, _b191, MySqlJsonBuilder, _a266, _b192, MySqlJson;
|
30046
30084
|
var init_json2 = __esm({
|
30047
|
-
"../
|
30085
|
+
"../drizzle-orm/dist/mysql-core/columns/json.js"() {
|
30048
30086
|
"use strict";
|
30049
30087
|
init_entity();
|
30050
30088
|
init_common4();
|
@@ -30070,10 +30108,10 @@ var init_json2 = __esm({
|
|
30070
30108
|
}
|
30071
30109
|
});
|
30072
30110
|
|
30073
|
-
// ../
|
30111
|
+
// ../drizzle-orm/dist/mysql-core/columns/mediumint.js
|
30074
30112
|
var _a267, _b193, MySqlMediumIntBuilder, _a268, _b194, MySqlMediumInt;
|
30075
30113
|
var init_mediumint = __esm({
|
30076
|
-
"../
|
30114
|
+
"../drizzle-orm/dist/mysql-core/columns/mediumint.js"() {
|
30077
30115
|
"use strict";
|
30078
30116
|
init_entity();
|
30079
30117
|
init_common4();
|
@@ -30106,10 +30144,10 @@ var init_mediumint = __esm({
|
|
30106
30144
|
}
|
30107
30145
|
});
|
30108
30146
|
|
30109
|
-
// ../
|
30147
|
+
// ../drizzle-orm/dist/mysql-core/columns/real.js
|
30110
30148
|
var _a269, _b195, MySqlRealBuilder, _a270, _b196, MySqlReal;
|
30111
30149
|
var init_real3 = __esm({
|
30112
|
-
"../
|
30150
|
+
"../drizzle-orm/dist/mysql-core/columns/real.js"() {
|
30113
30151
|
"use strict";
|
30114
30152
|
init_entity();
|
30115
30153
|
init_common4();
|
@@ -30145,10 +30183,10 @@ var init_real3 = __esm({
|
|
30145
30183
|
}
|
30146
30184
|
});
|
30147
30185
|
|
30148
|
-
// ../
|
30186
|
+
// ../drizzle-orm/dist/mysql-core/columns/serial.js
|
30149
30187
|
var _a271, _b197, MySqlSerialBuilder, _a272, _b198, MySqlSerial;
|
30150
30188
|
var init_serial2 = __esm({
|
30151
|
-
"../
|
30189
|
+
"../drizzle-orm/dist/mysql-core/columns/serial.js"() {
|
30152
30190
|
"use strict";
|
30153
30191
|
init_entity();
|
30154
30192
|
init_common4();
|
@@ -30179,10 +30217,10 @@ var init_serial2 = __esm({
|
|
30179
30217
|
}
|
30180
30218
|
});
|
30181
30219
|
|
30182
|
-
// ../
|
30220
|
+
// ../drizzle-orm/dist/mysql-core/columns/smallint.js
|
30183
30221
|
var _a273, _b199, MySqlSmallIntBuilder, _a274, _b200, MySqlSmallInt;
|
30184
30222
|
var init_smallint2 = __esm({
|
30185
|
-
"../
|
30223
|
+
"../drizzle-orm/dist/mysql-core/columns/smallint.js"() {
|
30186
30224
|
"use strict";
|
30187
30225
|
init_entity();
|
30188
30226
|
init_common4();
|
@@ -30215,10 +30253,10 @@ var init_smallint2 = __esm({
|
|
30215
30253
|
}
|
30216
30254
|
});
|
30217
30255
|
|
30218
|
-
// ../
|
30256
|
+
// ../drizzle-orm/dist/mysql-core/columns/text.js
|
30219
30257
|
var _a275, _b201, MySqlTextBuilder, _a276, _b202, MySqlText;
|
30220
30258
|
var init_text3 = __esm({
|
30221
|
-
"../
|
30259
|
+
"../drizzle-orm/dist/mysql-core/columns/text.js"() {
|
30222
30260
|
"use strict";
|
30223
30261
|
init_entity();
|
30224
30262
|
init_common4();
|
@@ -30248,10 +30286,10 @@ var init_text3 = __esm({
|
|
30248
30286
|
}
|
30249
30287
|
});
|
30250
30288
|
|
30251
|
-
// ../
|
30289
|
+
// ../drizzle-orm/dist/mysql-core/columns/time.js
|
30252
30290
|
var _a277, _b203, MySqlTimeBuilder, _a278, _b204, MySqlTime;
|
30253
30291
|
var init_time2 = __esm({
|
30254
|
-
"../
|
30292
|
+
"../drizzle-orm/dist/mysql-core/columns/time.js"() {
|
30255
30293
|
"use strict";
|
30256
30294
|
init_entity();
|
30257
30295
|
init_common4();
|
@@ -30280,10 +30318,10 @@ var init_time2 = __esm({
|
|
30280
30318
|
}
|
30281
30319
|
});
|
30282
30320
|
|
30283
|
-
// ../
|
30321
|
+
// ../drizzle-orm/dist/mysql-core/columns/date.common.js
|
30284
30322
|
var _a279, _b205, MySqlDateColumnBaseBuilder, _a280, _b206, MySqlDateBaseColumn;
|
30285
30323
|
var init_date_common2 = __esm({
|
30286
|
-
"../
|
30324
|
+
"../drizzle-orm/dist/mysql-core/columns/date.common.js"() {
|
30287
30325
|
"use strict";
|
30288
30326
|
init_entity();
|
30289
30327
|
init_sql();
|
@@ -30310,10 +30348,10 @@ var init_date_common2 = __esm({
|
|
30310
30348
|
}
|
30311
30349
|
});
|
30312
30350
|
|
30313
|
-
// ../
|
30351
|
+
// ../drizzle-orm/dist/mysql-core/columns/timestamp.js
|
30314
30352
|
var _a281, _b207, MySqlTimestampBuilder, _a282, _b208, MySqlTimestamp, _a283, _b209, MySqlTimestampStringBuilder, _a284, _b210, MySqlTimestampString;
|
30315
30353
|
var init_timestamp2 = __esm({
|
30316
|
-
"../
|
30354
|
+
"../drizzle-orm/dist/mysql-core/columns/timestamp.js"() {
|
30317
30355
|
"use strict";
|
30318
30356
|
init_entity();
|
30319
30357
|
init_date_common2();
|
@@ -30376,10 +30414,10 @@ var init_timestamp2 = __esm({
|
|
30376
30414
|
}
|
30377
30415
|
});
|
30378
30416
|
|
30379
|
-
// ../
|
30417
|
+
// ../drizzle-orm/dist/mysql-core/columns/tinyint.js
|
30380
30418
|
var _a285, _b211, MySqlTinyIntBuilder, _a286, _b212, MySqlTinyInt;
|
30381
30419
|
var init_tinyint = __esm({
|
30382
|
-
"../
|
30420
|
+
"../drizzle-orm/dist/mysql-core/columns/tinyint.js"() {
|
30383
30421
|
"use strict";
|
30384
30422
|
init_entity();
|
30385
30423
|
init_common4();
|
@@ -30412,10 +30450,10 @@ var init_tinyint = __esm({
|
|
30412
30450
|
}
|
30413
30451
|
});
|
30414
30452
|
|
30415
|
-
// ../
|
30453
|
+
// ../drizzle-orm/dist/mysql-core/columns/varbinary.js
|
30416
30454
|
var _a287, _b213, MySqlVarBinaryBuilder, _a288, _b214, MySqlVarBinary;
|
30417
30455
|
var init_varbinary = __esm({
|
30418
|
-
"../
|
30456
|
+
"../drizzle-orm/dist/mysql-core/columns/varbinary.js"() {
|
30419
30457
|
"use strict";
|
30420
30458
|
init_entity();
|
30421
30459
|
init_common4();
|
@@ -30447,10 +30485,10 @@ var init_varbinary = __esm({
|
|
30447
30485
|
}
|
30448
30486
|
});
|
30449
30487
|
|
30450
|
-
// ../
|
30488
|
+
// ../drizzle-orm/dist/mysql-core/columns/varchar.js
|
30451
30489
|
var _a289, _b215, MySqlVarCharBuilder, _a290, _b216, MySqlVarChar;
|
30452
30490
|
var init_varchar2 = __esm({
|
30453
|
-
"../
|
30491
|
+
"../drizzle-orm/dist/mysql-core/columns/varchar.js"() {
|
30454
30492
|
"use strict";
|
30455
30493
|
init_entity();
|
30456
30494
|
init_common4();
|
@@ -30484,10 +30522,10 @@ var init_varchar2 = __esm({
|
|
30484
30522
|
}
|
30485
30523
|
});
|
30486
30524
|
|
30487
|
-
// ../
|
30525
|
+
// ../drizzle-orm/dist/mysql-core/columns/year.js
|
30488
30526
|
var _a291, _b217, MySqlYearBuilder, _a292, _b218, MySqlYear;
|
30489
30527
|
var init_year = __esm({
|
30490
|
-
"../
|
30528
|
+
"../drizzle-orm/dist/mysql-core/columns/year.js"() {
|
30491
30529
|
"use strict";
|
30492
30530
|
init_entity();
|
30493
30531
|
init_common4();
|
@@ -30510,9 +30548,9 @@ var init_year = __esm({
|
|
30510
30548
|
}
|
30511
30549
|
});
|
30512
30550
|
|
30513
|
-
// ../
|
30551
|
+
// ../drizzle-orm/dist/mysql-core/columns/index.js
|
30514
30552
|
var init_columns3 = __esm({
|
30515
|
-
"../
|
30553
|
+
"../drizzle-orm/dist/mysql-core/columns/index.js"() {
|
30516
30554
|
"use strict";
|
30517
30555
|
init_bigint2();
|
30518
30556
|
init_binary();
|
@@ -30542,10 +30580,10 @@ var init_columns3 = __esm({
|
|
30542
30580
|
}
|
30543
30581
|
});
|
30544
30582
|
|
30545
|
-
// ../
|
30583
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/delete.js
|
30546
30584
|
var _a293, _b219, MySqlDeleteBase;
|
30547
30585
|
var init_delete3 = __esm({
|
30548
|
-
"../
|
30586
|
+
"../drizzle-orm/dist/mysql-core/query-builders/delete.js"() {
|
30549
30587
|
"use strict";
|
30550
30588
|
init_entity();
|
30551
30589
|
init_query_promise();
|
@@ -30623,10 +30661,10 @@ var init_delete3 = __esm({
|
|
30623
30661
|
}
|
30624
30662
|
});
|
30625
30663
|
|
30626
|
-
// ../
|
30664
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/insert.js
|
30627
30665
|
var _a294, MySqlInsertBuilder, _a295, _b220, MySqlInsertBase;
|
30628
30666
|
var init_insert3 = __esm({
|
30629
|
-
"../
|
30667
|
+
"../drizzle-orm/dist/mysql-core/query-builders/insert.js"() {
|
30630
30668
|
"use strict";
|
30631
30669
|
init_entity();
|
30632
30670
|
init_query_promise();
|
@@ -30652,7 +30690,7 @@ var init_insert3 = __esm({
|
|
30652
30690
|
}
|
30653
30691
|
const mappedValues = values.map((entry) => {
|
30654
30692
|
const result = {};
|
30655
|
-
const cols = this.table[
|
30693
|
+
const cols = this.table[Table2.Symbol.Columns];
|
30656
30694
|
for (const colKey of Object.keys(entry)) {
|
30657
30695
|
const colValue = entry[colKey];
|
30658
30696
|
result[colKey] = is(colValue, SQL) ? colValue : new Param(colValue, cols[colKey]);
|
@@ -30714,12 +30752,12 @@ var init_insert3 = __esm({
|
|
30714
30752
|
}
|
30715
30753
|
$returningId() {
|
30716
30754
|
const returning = [];
|
30717
|
-
for (const [key, value] of Object.entries(this.config.table[
|
30755
|
+
for (const [key, value] of Object.entries(this.config.table[Table2.Symbol.Columns])) {
|
30718
30756
|
if (value.primary) {
|
30719
30757
|
returning.push({ field: value, path: [key] });
|
30720
30758
|
}
|
30721
30759
|
}
|
30722
|
-
this.config.returning = orderSelectedFields(this.config.table[
|
30760
|
+
this.config.returning = orderSelectedFields(this.config.table[Table2.Symbol.Columns]);
|
30723
30761
|
return this;
|
30724
30762
|
}
|
30725
30763
|
/** @internal */
|
@@ -30748,10 +30786,10 @@ var init_insert3 = __esm({
|
|
30748
30786
|
}
|
30749
30787
|
});
|
30750
30788
|
|
30751
|
-
// ../
|
30789
|
+
// ../drizzle-orm/dist/mysql-core/view-base.js
|
30752
30790
|
var _a296, _b221, MySqlViewBase;
|
30753
30791
|
var init_view_base3 = __esm({
|
30754
|
-
"../
|
30792
|
+
"../drizzle-orm/dist/mysql-core/view-base.js"() {
|
30755
30793
|
"use strict";
|
30756
30794
|
init_entity();
|
30757
30795
|
init_sql();
|
@@ -30761,10 +30799,10 @@ var init_view_base3 = __esm({
|
|
30761
30799
|
}
|
30762
30800
|
});
|
30763
30801
|
|
30764
|
-
// ../
|
30802
|
+
// ../drizzle-orm/dist/mysql-core/dialect.js
|
30765
30803
|
var _a297, MySqlDialect;
|
30766
30804
|
var init_dialect3 = __esm({
|
30767
|
-
"../
|
30805
|
+
"../drizzle-orm/dist/mysql-core/dialect.js"() {
|
30768
30806
|
"use strict";
|
30769
30807
|
init_alias();
|
30770
30808
|
init_column();
|
@@ -30838,7 +30876,7 @@ var init_dialect3 = __esm({
|
|
30838
30876
|
return sql`${withSql}delete from ${table4}${whereSql}${returningSql}`;
|
30839
30877
|
}
|
30840
30878
|
buildUpdateSet(table4, set) {
|
30841
|
-
const tableColumns = table4[
|
30879
|
+
const tableColumns = table4[Table2.Symbol.Columns];
|
30842
30880
|
const columnNames = Object.keys(tableColumns).filter(
|
30843
30881
|
(colName) => set[colName] !== void 0 || tableColumns[colName]?.onUpdateFn !== void 0
|
30844
30882
|
);
|
@@ -30896,7 +30934,7 @@ var init_dialect3 = __esm({
|
|
30896
30934
|
if (is(field, SQL.Aliased)) {
|
30897
30935
|
chunk.push(sql` as ${sql.identifier(field.fieldAlias)}`);
|
30898
30936
|
}
|
30899
|
-
} else if (is(field,
|
30937
|
+
} else if (is(field, Column2)) {
|
30900
30938
|
if (isSingleTable) {
|
30901
30939
|
chunk.push(sql.identifier(field.name));
|
30902
30940
|
} else {
|
@@ -30928,8 +30966,8 @@ var init_dialect3 = __esm({
|
|
30928
30966
|
}) {
|
30929
30967
|
const fieldsList = fieldsFlat ?? orderSelectedFields(fields);
|
30930
30968
|
for (const f of fieldsList) {
|
30931
|
-
if (is(f.field,
|
30932
|
-
({ alias }) => alias === (table22[
|
30969
|
+
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(
|
30970
|
+
({ alias }) => alias === (table22[Table2.Symbol.IsAlias] ? getTableName(table22) : table22[Table2.Symbol.BaseName])
|
30933
30971
|
))(f.field.table)) {
|
30934
30972
|
const tableName = getTableName(f.field.table);
|
30935
30973
|
throw new Error(
|
@@ -30942,8 +30980,8 @@ var init_dialect3 = __esm({
|
|
30942
30980
|
const distinctSql = distinct ? sql` distinct` : void 0;
|
30943
30981
|
const selection = this.buildSelection(fieldsList, { isSingleTable });
|
30944
30982
|
const tableSql = (() => {
|
30945
|
-
if (is(table4,
|
30946
|
-
return sql`${sql.identifier(table4[
|
30983
|
+
if (is(table4, Table2) && table4[Table2.Symbol.OriginalName] !== table4[Table2.Symbol.Name]) {
|
30984
|
+
return sql`${sql.identifier(table4[Table2.Symbol.OriginalName])} ${sql.identifier(table4[Table2.Symbol.Name])}`;
|
30947
30985
|
}
|
30948
30986
|
return table4;
|
30949
30987
|
})();
|
@@ -31056,7 +31094,7 @@ var init_dialect3 = __esm({
|
|
31056
31094
|
}
|
31057
31095
|
buildInsertQuery({ table: table4, values, ignore, onConflict }) {
|
31058
31096
|
const valuesSqlList = [];
|
31059
|
-
const columns = table4[
|
31097
|
+
const columns = table4[Table2.Symbol.Columns];
|
31060
31098
|
const colEntries = Object.entries(columns).filter(
|
31061
31099
|
([_2, col]) => !col.shouldDisableInsert()
|
31062
31100
|
);
|
@@ -31184,7 +31222,7 @@ var init_dialect3 = __esm({
|
|
31184
31222
|
selection.push({
|
31185
31223
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
31186
31224
|
tsKey,
|
31187
|
-
field: is(value,
|
31225
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
31188
31226
|
relationTableTsKey: void 0,
|
31189
31227
|
isJson: false,
|
31190
31228
|
selection: []
|
@@ -31195,7 +31233,7 @@ var init_dialect3 = __esm({
|
|
31195
31233
|
orderByOrig = [orderByOrig];
|
31196
31234
|
}
|
31197
31235
|
orderBy = orderByOrig.map((orderByValue) => {
|
31198
|
-
if (is(orderByValue,
|
31236
|
+
if (is(orderByValue, Column2)) {
|
31199
31237
|
return aliasedTableColumn(orderByValue, tableAlias);
|
31200
31238
|
}
|
31201
31239
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -31303,7 +31341,7 @@ var init_dialect3 = __esm({
|
|
31303
31341
|
fields: {},
|
31304
31342
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
31305
31343
|
path: [],
|
31306
|
-
field: is(field2,
|
31344
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
31307
31345
|
})),
|
31308
31346
|
joins,
|
31309
31347
|
where,
|
@@ -31318,7 +31356,7 @@ var init_dialect3 = __esm({
|
|
31318
31356
|
fields: {},
|
31319
31357
|
fieldsFlat: selection.map(({ field }) => ({
|
31320
31358
|
path: [],
|
31321
|
-
field: is(field,
|
31359
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
31322
31360
|
})),
|
31323
31361
|
joins,
|
31324
31362
|
where,
|
@@ -31408,7 +31446,7 @@ var init_dialect3 = __esm({
|
|
31408
31446
|
selection.push({
|
31409
31447
|
dbKey: is(value, SQL.Aliased) ? value.fieldAlias : tableConfig.columns[tsKey].name,
|
31410
31448
|
tsKey,
|
31411
|
-
field: is(value,
|
31449
|
+
field: is(value, Column2) ? aliasedTableColumn(value, tableAlias) : value,
|
31412
31450
|
relationTableTsKey: void 0,
|
31413
31451
|
isJson: false,
|
31414
31452
|
selection: []
|
@@ -31419,7 +31457,7 @@ var init_dialect3 = __esm({
|
|
31419
31457
|
orderByOrig = [orderByOrig];
|
31420
31458
|
}
|
31421
31459
|
orderBy = orderByOrig.map((orderByValue) => {
|
31422
|
-
if (is(orderByValue,
|
31460
|
+
if (is(orderByValue, Column2)) {
|
31423
31461
|
return aliasedTableColumn(orderByValue, tableAlias);
|
31424
31462
|
}
|
31425
31463
|
return mapColumnsInSQLToAlias(orderByValue, tableAlias);
|
@@ -31526,7 +31564,7 @@ var init_dialect3 = __esm({
|
|
31526
31564
|
fields: {},
|
31527
31565
|
fieldsFlat: nestedSelection.map(({ field: field2 }) => ({
|
31528
31566
|
path: [],
|
31529
|
-
field: is(field2,
|
31567
|
+
field: is(field2, Column2) ? aliasedTableColumn(field2, tableAlias) : field2
|
31530
31568
|
})),
|
31531
31569
|
where,
|
31532
31570
|
limit,
|
@@ -31540,7 +31578,7 @@ var init_dialect3 = __esm({
|
|
31540
31578
|
fields: {},
|
31541
31579
|
fieldsFlat: selection.map(({ field }) => ({
|
31542
31580
|
path: [],
|
31543
|
-
field: is(field,
|
31581
|
+
field: is(field, Column2) ? aliasedTableColumn(field, tableAlias) : field
|
31544
31582
|
})),
|
31545
31583
|
where,
|
31546
31584
|
limit,
|
@@ -31560,7 +31598,7 @@ var init_dialect3 = __esm({
|
|
31560
31598
|
}
|
31561
31599
|
});
|
31562
31600
|
|
31563
|
-
// ../
|
31601
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/select.js
|
31564
31602
|
function createSetOperator3(type, isAll) {
|
31565
31603
|
return (leftSelect, rightSelect, ...restSelects) => {
|
31566
31604
|
const setOperators = [rightSelect, ...restSelects].map((select) => ({
|
@@ -31580,7 +31618,7 @@ function createSetOperator3(type, isAll) {
|
|
31580
31618
|
}
|
31581
31619
|
var _a298, MySqlSelectBuilder, _a299, _b222, MySqlSelectQueryBuilderBase, _a300, _b223, MySqlSelectBase, getMySqlSetOperators, union3, unionAll3, intersect3, intersectAll2, except3, exceptAll2;
|
31582
31620
|
var init_select4 = __esm({
|
31583
|
-
"../
|
31621
|
+
"../drizzle-orm/dist/mysql-core/query-builders/select.js"() {
|
31584
31622
|
"use strict";
|
31585
31623
|
init_entity();
|
31586
31624
|
init_query_builder();
|
@@ -31978,7 +32016,7 @@ var init_select4 = __esm({
|
|
31978
32016
|
};
|
31979
32017
|
}
|
31980
32018
|
if (typeof tableName === "string" && !is(table4, SQL)) {
|
31981
|
-
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[
|
32019
|
+
const selection = is(table4, Subquery) ? table4._.selectedFields : is(table4, View) ? table4[ViewBaseConfig].selectedFields : table4[Table2.Symbol.Columns];
|
31982
32020
|
this.config.fields[tableName] = selection;
|
31983
32021
|
}
|
31984
32022
|
}
|
@@ -32284,10 +32322,10 @@ var init_select4 = __esm({
|
|
32284
32322
|
}
|
32285
32323
|
});
|
32286
32324
|
|
32287
|
-
// ../
|
32325
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/query-builder.js
|
32288
32326
|
var _a301, QueryBuilder3;
|
32289
32327
|
var init_query_builder4 = __esm({
|
32290
|
-
"../
|
32328
|
+
"../drizzle-orm/dist/mysql-core/query-builders/query-builder.js"() {
|
32291
32329
|
"use strict";
|
32292
32330
|
init_entity();
|
32293
32331
|
init_dialect3();
|
@@ -32357,17 +32395,17 @@ var init_query_builder4 = __esm({
|
|
32357
32395
|
}
|
32358
32396
|
});
|
32359
32397
|
|
32360
|
-
// ../
|
32398
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/select.types.js
|
32361
32399
|
var init_select_types3 = __esm({
|
32362
|
-
"../
|
32400
|
+
"../drizzle-orm/dist/mysql-core/query-builders/select.types.js"() {
|
32363
32401
|
"use strict";
|
32364
32402
|
}
|
32365
32403
|
});
|
32366
32404
|
|
32367
|
-
// ../
|
32405
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/update.js
|
32368
32406
|
var _a302, MySqlUpdateBuilder, _a303, _b224, MySqlUpdateBase;
|
32369
32407
|
var init_update3 = __esm({
|
32370
|
-
"../
|
32408
|
+
"../drizzle-orm/dist/mysql-core/query-builders/update.js"() {
|
32371
32409
|
"use strict";
|
32372
32410
|
init_entity();
|
32373
32411
|
init_query_promise();
|
@@ -32462,9 +32500,9 @@ var init_update3 = __esm({
|
|
32462
32500
|
}
|
32463
32501
|
});
|
32464
32502
|
|
32465
|
-
// ../
|
32503
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/index.js
|
32466
32504
|
var init_query_builders3 = __esm({
|
32467
|
-
"../
|
32505
|
+
"../drizzle-orm/dist/mysql-core/query-builders/index.js"() {
|
32468
32506
|
"use strict";
|
32469
32507
|
init_delete3();
|
32470
32508
|
init_insert3();
|
@@ -32475,10 +32513,10 @@ var init_query_builders3 = __esm({
|
|
32475
32513
|
}
|
32476
32514
|
});
|
32477
32515
|
|
32478
|
-
// ../
|
32516
|
+
// ../drizzle-orm/dist/mysql-core/query-builders/query.js
|
32479
32517
|
var _a304, RelationalQueryBuilder3, _a305, _b225, MySqlRelationalQuery;
|
32480
32518
|
var init_query3 = __esm({
|
32481
|
-
"../
|
32519
|
+
"../drizzle-orm/dist/mysql-core/query-builders/query.js"() {
|
32482
32520
|
"use strict";
|
32483
32521
|
init_entity();
|
32484
32522
|
init_query_promise();
|
@@ -32593,10 +32631,10 @@ var init_query3 = __esm({
|
|
32593
32631
|
}
|
32594
32632
|
});
|
32595
32633
|
|
32596
|
-
// ../
|
32634
|
+
// ../drizzle-orm/dist/mysql-core/db.js
|
32597
32635
|
var _a306, MySqlDatabase;
|
32598
32636
|
var init_db3 = __esm({
|
32599
|
-
"../
|
32637
|
+
"../drizzle-orm/dist/mysql-core/db.js"() {
|
32600
32638
|
"use strict";
|
32601
32639
|
init_entity();
|
32602
32640
|
init_selection_proxy();
|
@@ -32816,10 +32854,10 @@ var init_db3 = __esm({
|
|
32816
32854
|
}
|
32817
32855
|
});
|
32818
32856
|
|
32819
|
-
// ../
|
32857
|
+
// ../drizzle-orm/dist/mysql-core/indexes.js
|
32820
32858
|
var _a307, IndexBuilderOn3, _a308, IndexBuilder3, _a309, Index5;
|
32821
32859
|
var init_indexes3 = __esm({
|
32822
|
-
"../
|
32860
|
+
"../drizzle-orm/dist/mysql-core/indexes.js"() {
|
32823
32861
|
"use strict";
|
32824
32862
|
init_entity();
|
32825
32863
|
_a307 = entityKind;
|
@@ -32873,10 +32911,10 @@ var init_indexes3 = __esm({
|
|
32873
32911
|
}
|
32874
32912
|
});
|
32875
32913
|
|
32876
|
-
// ../
|
32914
|
+
// ../drizzle-orm/dist/mysql-core/primary-keys.js
|
32877
32915
|
var _a310, PrimaryKeyBuilder3, _a311, PrimaryKey3;
|
32878
32916
|
var init_primary_keys3 = __esm({
|
32879
|
-
"../
|
32917
|
+
"../drizzle-orm/dist/mysql-core/primary-keys.js"() {
|
32880
32918
|
"use strict";
|
32881
32919
|
init_entity();
|
32882
32920
|
init_table4();
|
@@ -32913,16 +32951,16 @@ var init_primary_keys3 = __esm({
|
|
32913
32951
|
}
|
32914
32952
|
});
|
32915
32953
|
|
32916
|
-
// ../
|
32954
|
+
// ../drizzle-orm/dist/mysql-core/view-common.js
|
32917
32955
|
var MySqlViewConfig;
|
32918
32956
|
var init_view_common4 = __esm({
|
32919
|
-
"../
|
32957
|
+
"../drizzle-orm/dist/mysql-core/view-common.js"() {
|
32920
32958
|
"use strict";
|
32921
32959
|
MySqlViewConfig = Symbol.for("drizzle:MySqlViewConfig");
|
32922
32960
|
}
|
32923
32961
|
});
|
32924
32962
|
|
32925
|
-
// ../
|
32963
|
+
// ../drizzle-orm/dist/mysql-core/view.js
|
32926
32964
|
function mysqlViewWithSchema(name2, selection, schema4) {
|
32927
32965
|
if (selection) {
|
32928
32966
|
return new ManualViewBuilder3(name2, selection, schema4);
|
@@ -32931,7 +32969,7 @@ function mysqlViewWithSchema(name2, selection, schema4) {
|
|
32931
32969
|
}
|
32932
32970
|
var _a312, ViewBuilderCore2, _a313, _b226, ViewBuilder3, _a314, _b227, ManualViewBuilder3, _a315, _b228, _c8, MySqlView;
|
32933
32971
|
var init_view3 = __esm({
|
32934
|
-
"../
|
32972
|
+
"../drizzle-orm/dist/mysql-core/view.js"() {
|
32935
32973
|
"use strict";
|
32936
32974
|
init_entity();
|
32937
32975
|
init_selection_proxy();
|
@@ -33049,16 +33087,16 @@ var init_view3 = __esm({
|
|
33049
33087
|
}
|
33050
33088
|
});
|
33051
33089
|
|
33052
|
-
// ../
|
33053
|
-
var _a316,
|
33090
|
+
// ../drizzle-orm/dist/mysql-core/schema.js
|
33091
|
+
var _a316, MySqlSchema5;
|
33054
33092
|
var init_schema2 = __esm({
|
33055
|
-
"../
|
33093
|
+
"../drizzle-orm/dist/mysql-core/schema.js"() {
|
33056
33094
|
"use strict";
|
33057
33095
|
init_entity();
|
33058
33096
|
init_table4();
|
33059
33097
|
init_view3();
|
33060
33098
|
_a316 = entityKind;
|
33061
|
-
|
33099
|
+
MySqlSchema5 = class {
|
33062
33100
|
constructor(schemaName) {
|
33063
33101
|
__publicField(this, "table", (name2, columns, extraConfig) => {
|
33064
33102
|
return mysqlTableWithSchema(name2, columns, extraConfig, this.schemaName);
|
@@ -33069,14 +33107,14 @@ var init_schema2 = __esm({
|
|
33069
33107
|
this.schemaName = schemaName;
|
33070
33108
|
}
|
33071
33109
|
};
|
33072
|
-
__publicField(
|
33110
|
+
__publicField(MySqlSchema5, _a316, "MySqlSchema");
|
33073
33111
|
}
|
33074
33112
|
});
|
33075
33113
|
|
33076
|
-
// ../
|
33114
|
+
// ../drizzle-orm/dist/mysql-core/session.js
|
33077
33115
|
var _a317, MySqlPreparedQuery, _a318, MySqlSession, _a319, _b229, MySqlTransaction;
|
33078
33116
|
var init_session3 = __esm({
|
33079
|
-
"../
|
33117
|
+
"../drizzle-orm/dist/mysql-core/session.js"() {
|
33080
33118
|
"use strict";
|
33081
33119
|
init_entity();
|
33082
33120
|
init_errors();
|
@@ -33106,7 +33144,7 @@ var init_session3 = __esm({
|
|
33106
33144
|
if (config.isolationLevel) {
|
33107
33145
|
parts.push(`isolation level ${config.isolationLevel}`);
|
33108
33146
|
}
|
33109
|
-
return parts.length ? sql
|
33147
|
+
return parts.length ? sql`set transaction ${sql.raw(parts.join(" "))}` : void 0;
|
33110
33148
|
}
|
33111
33149
|
getStartTransactionSQL(config) {
|
33112
33150
|
const parts = [];
|
@@ -33116,7 +33154,7 @@ var init_session3 = __esm({
|
|
33116
33154
|
if (config.accessMode) {
|
33117
33155
|
parts.push(config.accessMode);
|
33118
33156
|
}
|
33119
|
-
return parts.length ? sql
|
33157
|
+
return parts.length ? sql`start transaction ${sql.raw(parts.join(" "))}` : void 0;
|
33120
33158
|
}
|
33121
33159
|
};
|
33122
33160
|
__publicField(MySqlSession, _a318, "MySqlSession");
|
@@ -33134,14 +33172,14 @@ var init_session3 = __esm({
|
|
33134
33172
|
}
|
33135
33173
|
});
|
33136
33174
|
|
33137
|
-
// ../
|
33175
|
+
// ../drizzle-orm/dist/mysql-core/subquery.js
|
33138
33176
|
var init_subquery4 = __esm({
|
33139
|
-
"../
|
33177
|
+
"../drizzle-orm/dist/mysql-core/subquery.js"() {
|
33140
33178
|
"use strict";
|
33141
33179
|
}
|
33142
33180
|
});
|
33143
33181
|
|
33144
|
-
// ../
|
33182
|
+
// ../drizzle-orm/dist/mysql-core/utils.js
|
33145
33183
|
function getTableConfig3(table4) {
|
33146
33184
|
const columns = Object.values(table4[MySqlTable.Symbol.Columns]);
|
33147
33185
|
const indexes = [];
|
@@ -33149,9 +33187,9 @@ function getTableConfig3(table4) {
|
|
33149
33187
|
const primaryKeys = [];
|
33150
33188
|
const uniqueConstraints = [];
|
33151
33189
|
const foreignKeys = Object.values(table4[MySqlTable.Symbol.InlineForeignKeys]);
|
33152
|
-
const name2 = table4[
|
33153
|
-
const schema4 = table4[
|
33154
|
-
const baseName = table4[
|
33190
|
+
const name2 = table4[Table2.Symbol.Name];
|
33191
|
+
const schema4 = table4[Table2.Symbol.Schema];
|
33192
|
+
const baseName = table4[Table2.Symbol.BaseName];
|
33155
33193
|
const extraConfigBuilder = table4[MySqlTable.Symbol.ExtraConfigBuilder];
|
33156
33194
|
if (extraConfigBuilder !== void 0) {
|
33157
33195
|
const extraConfig = extraConfigBuilder(table4[MySqlTable.Symbol.Columns]);
|
@@ -33182,7 +33220,7 @@ function getTableConfig3(table4) {
|
|
33182
33220
|
};
|
33183
33221
|
}
|
33184
33222
|
var init_utils7 = __esm({
|
33185
|
-
"../
|
33223
|
+
"../drizzle-orm/dist/mysql-core/utils.js"() {
|
33186
33224
|
"use strict";
|
33187
33225
|
init_entity();
|
33188
33226
|
init_table();
|
@@ -33195,9 +33233,9 @@ var init_utils7 = __esm({
|
|
33195
33233
|
}
|
33196
33234
|
});
|
33197
33235
|
|
33198
|
-
// ../
|
33236
|
+
// ../drizzle-orm/dist/mysql-core/index.js
|
33199
33237
|
var init_mysql_core = __esm({
|
33200
|
-
"../
|
33238
|
+
"../drizzle-orm/dist/mysql-core/index.js"() {
|
33201
33239
|
"use strict";
|
33202
33240
|
init_alias4();
|
33203
33241
|
init_checks3();
|
@@ -33242,8 +33280,8 @@ var init_mysqlSerializer = __esm({
|
|
33242
33280
|
"src/serializer/mysqlSerializer.ts"() {
|
33243
33281
|
"use strict";
|
33244
33282
|
init_source();
|
33245
|
-
|
33246
|
-
|
33283
|
+
init_dist();
|
33284
|
+
init_dist();
|
33247
33285
|
init_mysql_core();
|
33248
33286
|
init_mysql_core();
|
33249
33287
|
init_outputs();
|
@@ -33770,6 +33808,200 @@ We have encountered a collision between the index name on columns ${source_defau
|
|
33770
33808
|
}
|
33771
33809
|
});
|
33772
33810
|
|
33811
|
+
// src/cli/validations/cli.ts
|
33812
|
+
var cliConfigGenerate, pushParams, pullParams, configCheck, cliConfigCheck;
|
33813
|
+
var init_cli = __esm({
|
33814
|
+
"src/cli/validations/cli.ts"() {
|
33815
|
+
"use strict";
|
33816
|
+
init_lib();
|
33817
|
+
init_schemaValidator();
|
33818
|
+
init_common();
|
33819
|
+
cliConfigGenerate = objectType({
|
33820
|
+
dialect: dialect3.optional(),
|
33821
|
+
schema: unionType([stringType(), stringType().array()]).optional(),
|
33822
|
+
out: stringType().optional().default("./drizzle"),
|
33823
|
+
config: stringType().optional(),
|
33824
|
+
name: stringType().optional(),
|
33825
|
+
prefix: prefix.optional(),
|
33826
|
+
breakpoints: booleanType().optional().default(true),
|
33827
|
+
custom: booleanType().optional().default(false)
|
33828
|
+
}).strict();
|
33829
|
+
pushParams = objectType({
|
33830
|
+
dialect: dialect3,
|
33831
|
+
schema: unionType([stringType(), stringType().array()]),
|
33832
|
+
tablesFilter: unionType([stringType(), stringType().array()]).optional(),
|
33833
|
+
schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
|
33834
|
+
extensionsFilters: literalType("postgis").array().optional(),
|
33835
|
+
verbose: booleanType().optional(),
|
33836
|
+
strict: booleanType().optional()
|
33837
|
+
}).passthrough();
|
33838
|
+
pullParams = objectType({
|
33839
|
+
config: stringType().optional(),
|
33840
|
+
dialect: dialect3,
|
33841
|
+
out: stringType().optional().default("drizzle"),
|
33842
|
+
tablesFilter: unionType([stringType(), stringType().array()]).optional(),
|
33843
|
+
schemaFilter: unionType([stringType(), stringType().array()]).optional().default(["public"]),
|
33844
|
+
extensionsFilters: literalType("postgis").array().optional(),
|
33845
|
+
introspectCasing: casing,
|
33846
|
+
breakpoints: booleanType().optional().default(true),
|
33847
|
+
database: objectType({
|
33848
|
+
prefix: prefix.optional().default("index")
|
33849
|
+
}).optional()
|
33850
|
+
}).passthrough();
|
33851
|
+
configCheck = objectType({
|
33852
|
+
dialect: dialect3.optional(),
|
33853
|
+
out: stringType().optional()
|
33854
|
+
});
|
33855
|
+
cliConfigCheck = intersectionType(
|
33856
|
+
objectType({
|
33857
|
+
config: stringType().optional()
|
33858
|
+
}),
|
33859
|
+
configCheck
|
33860
|
+
);
|
33861
|
+
}
|
33862
|
+
});
|
33863
|
+
|
33864
|
+
// src/cli/validations/mysql.ts
|
33865
|
+
var mysqlCredentials;
|
33866
|
+
var init_mysql = __esm({
|
33867
|
+
"src/cli/validations/mysql.ts"() {
|
33868
|
+
"use strict";
|
33869
|
+
init_lib();
|
33870
|
+
init_views();
|
33871
|
+
init_common();
|
33872
|
+
init_outputs();
|
33873
|
+
mysqlCredentials = unionType([
|
33874
|
+
objectType({
|
33875
|
+
host: stringType().min(1),
|
33876
|
+
port: coerce.number().min(1).optional(),
|
33877
|
+
user: stringType().min(1).optional(),
|
33878
|
+
password: stringType().min(1).optional(),
|
33879
|
+
database: stringType().min(1),
|
33880
|
+
ssl: unionType([
|
33881
|
+
stringType(),
|
33882
|
+
objectType({
|
33883
|
+
pfx: stringType().optional(),
|
33884
|
+
key: stringType().optional(),
|
33885
|
+
passphrase: stringType().optional(),
|
33886
|
+
cert: stringType().optional(),
|
33887
|
+
ca: unionType([stringType(), stringType().array()]).optional(),
|
33888
|
+
crl: unionType([stringType(), stringType().array()]).optional(),
|
33889
|
+
ciphers: stringType().optional(),
|
33890
|
+
rejectUnauthorized: booleanType().optional()
|
33891
|
+
})
|
33892
|
+
]).optional()
|
33893
|
+
}),
|
33894
|
+
objectType({
|
33895
|
+
url: stringType().min(1)
|
33896
|
+
})
|
33897
|
+
]);
|
33898
|
+
}
|
33899
|
+
});
|
33900
|
+
|
33901
|
+
// src/cli/validations/postgres.ts
|
33902
|
+
var postgresCredentials;
|
33903
|
+
var init_postgres = __esm({
|
33904
|
+
"src/cli/validations/postgres.ts"() {
|
33905
|
+
"use strict";
|
33906
|
+
init_lib();
|
33907
|
+
init_views();
|
33908
|
+
init_common();
|
33909
|
+
postgresCredentials = unionType([
|
33910
|
+
objectType({
|
33911
|
+
driver: undefinedType(),
|
33912
|
+
host: stringType().min(1),
|
33913
|
+
port: coerce.number().min(1).optional(),
|
33914
|
+
user: stringType().min(1).optional(),
|
33915
|
+
password: stringType().min(1).optional(),
|
33916
|
+
database: stringType().min(1),
|
33917
|
+
ssl: unionType([
|
33918
|
+
literalType("require"),
|
33919
|
+
literalType("allow"),
|
33920
|
+
literalType("prefer"),
|
33921
|
+
literalType("verify-full"),
|
33922
|
+
booleanType(),
|
33923
|
+
objectType({}).passthrough()
|
33924
|
+
]).optional()
|
33925
|
+
}).transform((o) => {
|
33926
|
+
delete o.driver;
|
33927
|
+
return o;
|
33928
|
+
}),
|
33929
|
+
objectType({
|
33930
|
+
driver: undefinedType(),
|
33931
|
+
url: stringType().min(1)
|
33932
|
+
}).transform((o) => {
|
33933
|
+
delete o.driver;
|
33934
|
+
return o;
|
33935
|
+
}),
|
33936
|
+
objectType({
|
33937
|
+
driver: literalType("aws-data-api"),
|
33938
|
+
database: stringType().min(1),
|
33939
|
+
secretArn: stringType().min(1),
|
33940
|
+
resourceArn: stringType().min(1)
|
33941
|
+
})
|
33942
|
+
]);
|
33943
|
+
}
|
33944
|
+
});
|
33945
|
+
|
33946
|
+
// src/cli/validations/sqlite.ts
|
33947
|
+
var sqliteCredentials;
|
33948
|
+
var init_sqlite = __esm({
|
33949
|
+
"src/cli/validations/sqlite.ts"() {
|
33950
|
+
"use strict";
|
33951
|
+
init_global();
|
33952
|
+
init_lib();
|
33953
|
+
init_views();
|
33954
|
+
init_common();
|
33955
|
+
sqliteCredentials = unionType([
|
33956
|
+
objectType({
|
33957
|
+
driver: literalType("turso"),
|
33958
|
+
url: stringType().min(1),
|
33959
|
+
authToken: stringType().min(1).optional()
|
33960
|
+
}),
|
33961
|
+
objectType({
|
33962
|
+
driver: literalType("d1-http"),
|
33963
|
+
accountId: stringType().min(1),
|
33964
|
+
databaseId: stringType().min(1),
|
33965
|
+
token: stringType().min(1)
|
33966
|
+
}),
|
33967
|
+
objectType({
|
33968
|
+
driver: undefinedType(),
|
33969
|
+
url: stringType().min(1)
|
33970
|
+
}).transform((o) => {
|
33971
|
+
delete o.driver;
|
33972
|
+
return o;
|
33973
|
+
})
|
33974
|
+
]);
|
33975
|
+
}
|
33976
|
+
});
|
33977
|
+
|
33978
|
+
// src/cli/validations/studio.ts
|
33979
|
+
var credentials, studioCliParams, studioConfig;
|
33980
|
+
var init_studio = __esm({
|
33981
|
+
"src/cli/validations/studio.ts"() {
|
33982
|
+
"use strict";
|
33983
|
+
init_lib();
|
33984
|
+
init_schemaValidator();
|
33985
|
+
init_mysql();
|
33986
|
+
init_postgres();
|
33987
|
+
init_sqlite();
|
33988
|
+
credentials = intersectionType(
|
33989
|
+
postgresCredentials,
|
33990
|
+
mysqlCredentials,
|
33991
|
+
sqliteCredentials
|
33992
|
+
);
|
33993
|
+
studioCliParams = objectType({
|
33994
|
+
port: coerce.number().optional().default(4983),
|
33995
|
+
host: stringType().optional().default("127.0.0.1"),
|
33996
|
+
config: stringType().optional()
|
33997
|
+
});
|
33998
|
+
studioConfig = objectType({
|
33999
|
+
dialect: dialect3,
|
34000
|
+
schema: unionType([stringType(), stringType().array()]).optional()
|
34001
|
+
});
|
34002
|
+
}
|
34003
|
+
});
|
34004
|
+
|
33773
34005
|
// src/cli/commands/_es5.ts
|
33774
34006
|
var es5_exports = {};
|
33775
34007
|
__export(es5_exports, {
|
@@ -33791,8 +34023,16 @@ var init_utils8 = __esm({
|
|
33791
34023
|
"use strict";
|
33792
34024
|
import_hanji7 = __toESM(require_hanji());
|
33793
34025
|
init_lib();
|
34026
|
+
init_global();
|
33794
34027
|
init_schemaValidator();
|
34028
|
+
init_serializer();
|
34029
|
+
init_cli();
|
33795
34030
|
init_common();
|
34031
|
+
init_mysql();
|
34032
|
+
init_outputs();
|
34033
|
+
init_postgres();
|
34034
|
+
init_sqlite();
|
34035
|
+
init_studio();
|
33796
34036
|
init_views();
|
33797
34037
|
assertES5 = async (unregister) => {
|
33798
34038
|
try {
|
@@ -33843,8 +34083,9 @@ var prepareFromExports;
|
|
33843
34083
|
var init_pgImports = __esm({
|
33844
34084
|
"src/serializer/pgImports.ts"() {
|
33845
34085
|
"use strict";
|
33846
|
-
|
34086
|
+
init_dist();
|
33847
34087
|
init_pg_core();
|
34088
|
+
init_utils8();
|
33848
34089
|
prepareFromExports = (exports) => {
|
33849
34090
|
const tables = [];
|
33850
34091
|
const enums = [];
|
@@ -33859,7 +34100,7 @@ var init_pgImports = __esm({
|
|
33859
34100
|
if (is(t, PgTable)) {
|
33860
34101
|
tables.push(t);
|
33861
34102
|
}
|
33862
|
-
if (is(t,
|
34103
|
+
if (is(t, PgSchema5)) {
|
33863
34104
|
schemas.push(t);
|
33864
34105
|
}
|
33865
34106
|
if (isPgSequence(t)) {
|
@@ -33881,7 +34122,7 @@ var prepareFromExports2, prepareFromSqliteImports;
|
|
33881
34122
|
var init_sqliteImports = __esm({
|
33882
34123
|
"src/serializer/sqliteImports.ts"() {
|
33883
34124
|
"use strict";
|
33884
|
-
|
34125
|
+
init_dist();
|
33885
34126
|
init_sqlite_core();
|
33886
34127
|
init_utils8();
|
33887
34128
|
prepareFromExports2 = (exports) => {
|
@@ -33919,7 +34160,7 @@ var prepareFromExports3, prepareFromMySqlImports;
|
|
33919
34160
|
var init_mysqlImports = __esm({
|
33920
34161
|
"src/serializer/mysqlImports.ts"() {
|
33921
34162
|
"use strict";
|
33922
|
-
|
34163
|
+
init_dist();
|
33923
34164
|
init_mysql_core();
|
33924
34165
|
init_utils8();
|
33925
34166
|
prepareFromExports3 = (exports) => {
|
@@ -34536,6 +34777,7 @@ var pgSuggestions = async (db, statements) => {
|
|
34536
34777
|
|
34537
34778
|
// src/cli/commands/pgUp.ts
|
34538
34779
|
init_pgSchema();
|
34780
|
+
init_utils();
|
34539
34781
|
var updateUpToV6 = (json) => {
|
34540
34782
|
const schema4 = pgSchemaV5.parse(json);
|
34541
34783
|
const tables = Object.fromEntries(
|
@@ -34571,6 +34813,114 @@ var updateUpToV6 = (json) => {
|
|
34571
34813
|
var import_hanji6 = __toESM(require_hanji());
|
34572
34814
|
init_mjs();
|
34573
34815
|
init_global();
|
34816
|
+
|
34817
|
+
// ../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
|
34818
|
+
var UPPERCASE = /[\p{Lu}]/u;
|
34819
|
+
var LOWERCASE = /[\p{Ll}]/u;
|
34820
|
+
var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
|
34821
|
+
var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
|
34822
|
+
var SEPARATORS = /[_.\- ]+/;
|
34823
|
+
var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
|
34824
|
+
var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
34825
|
+
var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
|
34826
|
+
var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
34827
|
+
let isLastCharLower = false;
|
34828
|
+
let isLastCharUpper = false;
|
34829
|
+
let isLastLastCharUpper = false;
|
34830
|
+
let isLastLastCharPreserved = false;
|
34831
|
+
for (let index4 = 0; index4 < string.length; index4++) {
|
34832
|
+
const character = string[index4];
|
34833
|
+
isLastLastCharPreserved = index4 > 2 ? string[index4 - 3] === "-" : true;
|
34834
|
+
if (isLastCharLower && UPPERCASE.test(character)) {
|
34835
|
+
string = string.slice(0, index4) + "-" + string.slice(index4);
|
34836
|
+
isLastCharLower = false;
|
34837
|
+
isLastLastCharUpper = isLastCharUpper;
|
34838
|
+
isLastCharUpper = true;
|
34839
|
+
index4++;
|
34840
|
+
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
|
34841
|
+
string = string.slice(0, index4 - 1) + "-" + string.slice(index4 - 1);
|
34842
|
+
isLastLastCharUpper = isLastCharUpper;
|
34843
|
+
isLastCharUpper = false;
|
34844
|
+
isLastCharLower = true;
|
34845
|
+
} else {
|
34846
|
+
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
34847
|
+
isLastLastCharUpper = isLastCharUpper;
|
34848
|
+
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
34849
|
+
}
|
34850
|
+
}
|
34851
|
+
return string;
|
34852
|
+
};
|
34853
|
+
var preserveConsecutiveUppercase = (input, toLowerCase) => {
|
34854
|
+
LEADING_CAPITAL.lastIndex = 0;
|
34855
|
+
return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
|
34856
|
+
};
|
34857
|
+
var postProcess = (input, toUpperCase) => {
|
34858
|
+
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
34859
|
+
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
34860
|
+
return input.replace(SEPARATORS_AND_IDENTIFIER, (_2, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
|
34861
|
+
};
|
34862
|
+
function camelCase(input, options) {
|
34863
|
+
if (!(typeof input === "string" || Array.isArray(input))) {
|
34864
|
+
throw new TypeError("Expected the input to be `string | string[]`");
|
34865
|
+
}
|
34866
|
+
options = {
|
34867
|
+
pascalCase: false,
|
34868
|
+
preserveConsecutiveUppercase: false,
|
34869
|
+
...options
|
34870
|
+
};
|
34871
|
+
if (Array.isArray(input)) {
|
34872
|
+
input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
|
34873
|
+
} else {
|
34874
|
+
input = input.trim();
|
34875
|
+
}
|
34876
|
+
if (input.length === 0) {
|
34877
|
+
return "";
|
34878
|
+
}
|
34879
|
+
const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
|
34880
|
+
const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
|
34881
|
+
if (input.length === 1) {
|
34882
|
+
if (SEPARATORS.test(input)) {
|
34883
|
+
return "";
|
34884
|
+
}
|
34885
|
+
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
34886
|
+
}
|
34887
|
+
const hasUpperCase = input !== toLowerCase(input);
|
34888
|
+
if (hasUpperCase) {
|
34889
|
+
input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
|
34890
|
+
}
|
34891
|
+
input = input.replace(LEADING_SEPARATORS, "");
|
34892
|
+
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
34893
|
+
if (options.pascalCase) {
|
34894
|
+
input = toUpperCase(input.charAt(0)) + input.slice(1);
|
34895
|
+
}
|
34896
|
+
return postProcess(input, toUpperCase);
|
34897
|
+
}
|
34898
|
+
|
34899
|
+
// src/@types/utils.ts
|
34900
|
+
String.prototype.trimChar = function(char) {
|
34901
|
+
let start = 0;
|
34902
|
+
let end = this.length;
|
34903
|
+
while (start < end && this[start] === char) ++start;
|
34904
|
+
while (end > start && this[end - 1] === char) --end;
|
34905
|
+
return start > 0 || end < this.length ? this.substring(start, end) : this.toString();
|
34906
|
+
};
|
34907
|
+
String.prototype.squashSpaces = function() {
|
34908
|
+
return this.replace(/ +/g, " ").trim();
|
34909
|
+
};
|
34910
|
+
String.prototype.camelCase = function() {
|
34911
|
+
return camelCase(String(this));
|
34912
|
+
};
|
34913
|
+
String.prototype.capitalise = function() {
|
34914
|
+
return this && this.length > 0 ? `${this[0].toUpperCase()}${this.slice(1)}` : String(this);
|
34915
|
+
};
|
34916
|
+
String.prototype.concatIf = function(it, condition) {
|
34917
|
+
return condition ? `${this}${it}` : String(this);
|
34918
|
+
};
|
34919
|
+
Array.prototype.random = function() {
|
34920
|
+
return this[~~(Math.random() * this.length)];
|
34921
|
+
};
|
34922
|
+
|
34923
|
+
// src/cli/commands/sqliteIntrospect.ts
|
34574
34924
|
init_sqliteSerializer();
|
34575
34925
|
init_views();
|
34576
34926
|
var sqlitePushIntrospect = async (db, filters) => {
|
@@ -34928,7 +35278,7 @@ var generateMigration = async (prev, cur) => {
|
|
34928
35278
|
};
|
34929
35279
|
var pushSchema = async (imports, drizzleInstance, schemaFilters) => {
|
34930
35280
|
const { applyPgSnapshotsDiff: applyPgSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
34931
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35281
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
34932
35282
|
const db = {
|
34933
35283
|
query: async (query, params) => {
|
34934
35284
|
const res = await drizzleInstance.execute(sql2.raw(query));
|
@@ -34998,7 +35348,7 @@ var generateSQLiteMigration = async (prev, cur) => {
|
|
34998
35348
|
};
|
34999
35349
|
var pushSQLiteSchema = async (imports, drizzleInstance) => {
|
35000
35350
|
const { applySqliteSnapshotsDiff: applySqliteSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
35001
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35351
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
35002
35352
|
const db = {
|
35003
35353
|
query: async (query, params) => {
|
35004
35354
|
const res = drizzleInstance.all(sql2.raw(query));
|
@@ -35075,7 +35425,7 @@ var pushMySQLSchema = async (imports, drizzleInstance, databaseName) => {
|
|
35075
35425
|
const { applyMysqlSnapshotsDiff: applyMysqlSnapshotsDiff2 } = await Promise.resolve().then(() => (init_snapshotsDiffer(), snapshotsDiffer_exports));
|
35076
35426
|
const { logSuggestionsAndReturn: logSuggestionsAndReturn3 } = await Promise.resolve().then(() => (init_mysqlPushUtils(), mysqlPushUtils_exports));
|
35077
35427
|
const { mysqlPushIntrospect: mysqlPushIntrospect2 } = await Promise.resolve().then(() => (init_mysqlIntrospect(), mysqlIntrospect_exports));
|
35078
|
-
const { sql: sql2 } = await Promise.resolve().then(() => (
|
35428
|
+
const { sql: sql2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
35079
35429
|
const db = {
|
35080
35430
|
query: async (query, params) => {
|
35081
35431
|
const res = await drizzleInstance.execute(sql2.raw(query));
|