drizzle-kit 0.29.0 → 0.30.0-29eb63c
Sign up to get free protection for your applications and to get access to all the features.
- package/api.js +91 -59
- package/api.mjs +91 -59
- package/bin.cjs +70 -99
- package/package.json +1 -1
package/api.js
CHANGED
@@ -5695,8 +5695,8 @@ var init_lib = __esm({
|
|
5695
5695
|
unknownKeys: "strict",
|
5696
5696
|
...message !== void 0 ? {
|
5697
5697
|
errorMap: (issue, ctx) => {
|
5698
|
-
var _a413, _b303,
|
5699
|
-
const defaultError = (
|
5698
|
+
var _a413, _b303, _c14, _d6;
|
5699
|
+
const defaultError = (_c14 = (_b303 = (_a413 = this._def).errorMap) === null || _b303 === void 0 ? void 0 : _b303.call(_a413, issue, ctx).message) !== null && _c14 !== void 0 ? _c14 : ctx.defaultError;
|
5700
5700
|
if (issue.code === "unrecognized_keys")
|
5701
5701
|
return {
|
5702
5702
|
message: (_d6 = errorUtil.errToObj(message).message) !== null && _d6 !== void 0 ? _d6 : defaultError
|
@@ -12331,7 +12331,7 @@ var init_sqlgenerator = __esm({
|
|
12331
12331
|
const { tableName, schema: schema5, columns, compositePKs, uniqueConstraints, checkConstraints, policies, isRLSEnabled } = st;
|
12332
12332
|
let statement = "";
|
12333
12333
|
const name2 = schema5 ? `"${schema5}"."${tableName}"` : `"${tableName}"`;
|
12334
|
-
statement += `CREATE TABLE
|
12334
|
+
statement += `CREATE TABLE ${name2} (
|
12335
12335
|
`;
|
12336
12336
|
for (let i = 0; i < columns.length; i++) {
|
12337
12337
|
const column5 = columns[i];
|
@@ -13169,7 +13169,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
|
|
13169
13169
|
convert(statement) {
|
13170
13170
|
const { tableName, columnName, schema: schema5 } = statement;
|
13171
13171
|
const tableNameWithSchema = schema5 ? `"${schema5}"."${tableName}"` : `"${tableName}"`;
|
13172
|
-
return `ALTER TABLE ${tableNameWithSchema} DROP COLUMN
|
13172
|
+
return `ALTER TABLE ${tableNameWithSchema} DROP COLUMN "${columnName}";`;
|
13173
13173
|
}
|
13174
13174
|
};
|
13175
13175
|
MySqlAlterTableDropColumnConvertor = class extends Convertor {
|
@@ -13590,7 +13590,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
|
|
13590
13590
|
for (const table5 of Object.values(json22.tables)) {
|
13591
13591
|
for (const index5 of Object.values(table5.indexes)) {
|
13592
13592
|
const unsquashed = SQLiteSquasher.unsquashIdx(index5);
|
13593
|
-
sqlStatements.push(`DROP INDEX
|
13593
|
+
sqlStatements.push(`DROP INDEX "${unsquashed.name}";`);
|
13594
13594
|
indexes.push({ ...unsquashed, tableName: table5.name });
|
13595
13595
|
}
|
13596
13596
|
}
|
@@ -14104,13 +14104,8 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14104
14104
|
const toColumnsString = columnsTo.map((it) => `"${it}"`).join(",");
|
14105
14105
|
const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${tableFrom}"` : `"${tableFrom}"`;
|
14106
14106
|
const tableToNameWithSchema = schemaTo ? `"${schemaTo}"."${tableTo}"` : `"${tableTo}"`;
|
14107
|
-
const alterStatement = `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${name2}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement}
|
14108
|
-
|
14109
|
-
sql2 += " " + alterStatement + ";\n";
|
14110
|
-
sql2 += "EXCEPTION\n";
|
14111
|
-
sql2 += " WHEN duplicate_object THEN null;\n";
|
14112
|
-
sql2 += "END $$;\n";
|
14113
|
-
return sql2;
|
14107
|
+
const alterStatement = `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${name2}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement};`;
|
14108
|
+
return alterStatement;
|
14114
14109
|
}
|
14115
14110
|
};
|
14116
14111
|
LibSQLCreateForeignKeyConvertor = class extends Convertor {
|
@@ -14167,12 +14162,8 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14167
14162
|
const toColumnsString = newFk.columnsTo.map((it) => `"${it}"`).join(",");
|
14168
14163
|
const tableFromNameWithSchema = oldFk.schemaTo ? `"${oldFk.schemaTo}"."${oldFk.tableFrom}"` : `"${oldFk.tableFrom}"`;
|
14169
14164
|
const tableToNameWithSchema = newFk.schemaTo ? `"${newFk.schemaTo}"."${newFk.tableFrom}"` : `"${newFk.tableFrom}"`;
|
14170
|
-
const alterStatement = `ALTER TABLE ${tableFromNameWithSchema} ADD CONSTRAINT "${newFk.name}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement}
|
14171
|
-
sql2 +=
|
14172
|
-
sql2 += " " + alterStatement + ";\n";
|
14173
|
-
sql2 += "EXCEPTION\n";
|
14174
|
-
sql2 += " WHEN duplicate_object THEN null;\n";
|
14175
|
-
sql2 += "END $$;\n";
|
14165
|
+
const alterStatement = `ALTER TABLE ${tableFromNameWithSchema} ADD CONSTRAINT "${newFk.name}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement};`;
|
14166
|
+
sql2 += alterStatement;
|
14176
14167
|
return sql2;
|
14177
14168
|
}
|
14178
14169
|
};
|
@@ -14228,7 +14219,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14228
14219
|
reversedString = reversedString.slice(0, -1);
|
14229
14220
|
return reversedString;
|
14230
14221
|
}
|
14231
|
-
return `CREATE ${indexPart}${concurrently ? " CONCURRENTLY" : ""}
|
14222
|
+
return `CREATE ${indexPart}${concurrently ? " CONCURRENTLY" : ""} "${name2}" ON ${tableNameWithSchema} USING ${method} (${value})${Object.keys(withMap).length !== 0 ? ` WITH (${reverseLogic(withMap)})` : ""}${where ? ` WHERE ${where}` : ""};`;
|
14232
14223
|
}
|
14233
14224
|
};
|
14234
14225
|
CreateMySqlIndexConvertor = class extends Convertor {
|
@@ -14283,7 +14274,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14283
14274
|
}
|
14284
14275
|
convert(statement) {
|
14285
14276
|
const { name: name2 } = PgSquasher.unsquashIdx(statement.data);
|
14286
|
-
return `DROP INDEX
|
14277
|
+
return `DROP INDEX "${name2}";`;
|
14287
14278
|
}
|
14288
14279
|
};
|
14289
14280
|
PgCreateSchemaConvertor = class extends Convertor {
|
@@ -14354,7 +14345,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14354
14345
|
}
|
14355
14346
|
convert(statement) {
|
14356
14347
|
const { name: name2 } = PgSquasher.unsquashIdx(statement.data);
|
14357
|
-
return `DROP INDEX
|
14348
|
+
return `DROP INDEX \`${name2}\`;`;
|
14358
14349
|
}
|
14359
14350
|
};
|
14360
14351
|
MySqlDropIndexConvertor = class extends Convertor {
|
@@ -21983,7 +21974,7 @@ var version;
|
|
21983
21974
|
var init_version = __esm({
|
21984
21975
|
"../drizzle-orm/dist/version.js"() {
|
21985
21976
|
"use strict";
|
21986
|
-
version = "0.
|
21977
|
+
version = "0.38.0";
|
21987
21978
|
}
|
21988
21979
|
});
|
21989
21980
|
|
@@ -22168,7 +22159,10 @@ function fillPlaceholders(params, values) {
|
|
22168
22159
|
return p;
|
22169
22160
|
});
|
22170
22161
|
}
|
22171
|
-
|
22162
|
+
function isView(view4) {
|
22163
|
+
return typeof view4 === "object" && view4 !== null && IsDrizzleView in view4;
|
22164
|
+
}
|
22165
|
+
var _a19, FakePrimitiveParam, _a20, StringChunk, _a21, _SQL, SQL, _a22, Name, noopDecoder, noopEncoder, noopMapper, _a23, Param, _a24, Placeholder, IsDrizzleView, _a25, _b10, _c2, View3;
|
22172
22166
|
var init_sql = __esm({
|
22173
22167
|
"../drizzle-orm/dist/sql/sql.js"() {
|
22174
22168
|
"use strict";
|
@@ -22493,11 +22487,14 @@ var init_sql = __esm({
|
|
22493
22487
|
}
|
22494
22488
|
};
|
22495
22489
|
__publicField(Placeholder, _a24, "Placeholder");
|
22496
|
-
|
22490
|
+
IsDrizzleView = Symbol.for("drizzle:IsDrizzleView");
|
22491
|
+
_c2 = entityKind, _b10 = ViewBaseConfig, _a25 = IsDrizzleView;
|
22497
22492
|
View3 = class {
|
22498
22493
|
constructor({ name: name2, schema: schema5, selectedFields, query }) {
|
22499
22494
|
/** @internal */
|
22500
|
-
__publicField(this,
|
22495
|
+
__publicField(this, _b10);
|
22496
|
+
/** @internal */
|
22497
|
+
__publicField(this, _a25, true);
|
22501
22498
|
this[ViewBaseConfig] = {
|
22502
22499
|
name: name2,
|
22503
22500
|
originalName: name2,
|
@@ -22512,7 +22509,7 @@ var init_sql = __esm({
|
|
22512
22509
|
return new SQL([this]);
|
22513
22510
|
}
|
22514
22511
|
};
|
22515
|
-
__publicField(View3,
|
22512
|
+
__publicField(View3, _c2, "View");
|
22516
22513
|
Column2.prototype.getSQL = function() {
|
22517
22514
|
return new SQL([this]);
|
22518
22515
|
};
|
@@ -23033,6 +23030,9 @@ function applyMixins(baseClass, extendedClasses) {
|
|
23033
23030
|
function getTableColumns(table5) {
|
23034
23031
|
return table5[Table2.Symbol.Columns];
|
23035
23032
|
}
|
23033
|
+
function getViewSelectedFields(view4) {
|
23034
|
+
return view4[ViewBaseConfig].selectedFields;
|
23035
|
+
}
|
23036
23036
|
function getTableLikeName(table5) {
|
23037
23037
|
return is(table5, Subquery) ? table5._.alias : is(table5, View3) ? table5[ViewBaseConfig].name : is(table5, SQL) ? void 0 : table5[Table2.Symbol.IsAlias] ? table5[Table2.Symbol.Name] : table5[Table2.Symbol.BaseName];
|
23038
23038
|
}
|
@@ -23327,7 +23327,10 @@ var init_char = __esm({
|
|
23327
23327
|
}
|
23328
23328
|
/** @internal */
|
23329
23329
|
build(table5) {
|
23330
|
-
return new PgChar(
|
23330
|
+
return new PgChar(
|
23331
|
+
table5,
|
23332
|
+
this.config
|
23333
|
+
);
|
23331
23334
|
}
|
23332
23335
|
};
|
23333
23336
|
__publicField(PgCharBuilder, _a46, "PgCharBuilder");
|
@@ -24459,7 +24462,10 @@ var init_varchar = __esm({
|
|
24459
24462
|
}
|
24460
24463
|
/** @internal */
|
24461
24464
|
build(table5) {
|
24462
|
-
return new PgVarchar(
|
24465
|
+
return new PgVarchar(
|
24466
|
+
table5,
|
24467
|
+
this.config
|
24468
|
+
);
|
24463
24469
|
}
|
24464
24470
|
};
|
24465
24471
|
__publicField(PgVarcharBuilder, _a105, "PgVarcharBuilder");
|
@@ -24619,7 +24625,10 @@ var init_vector = __esm({
|
|
24619
24625
|
}
|
24620
24626
|
/** @internal */
|
24621
24627
|
build(table5) {
|
24622
|
-
return new PgVector(
|
24628
|
+
return new PgVector(
|
24629
|
+
table5,
|
24630
|
+
this.config
|
24631
|
+
);
|
24623
24632
|
}
|
24624
24633
|
};
|
24625
24634
|
__publicField(PgVectorBuilder, _a113, "PgVectorBuilder");
|
@@ -24751,7 +24760,7 @@ function pgTableWithSchema(name2, columns, extraConfig, schema5, baseName = name
|
|
24751
24760
|
}
|
24752
24761
|
});
|
24753
24762
|
}
|
24754
|
-
var InlineForeignKeys, EnableRLS, _a115, _b94,
|
24763
|
+
var InlineForeignKeys, EnableRLS, _a115, _b94, _c3, _d2, _e2, PgTable, pgTable;
|
24755
24764
|
var init_table2 = __esm({
|
24756
24765
|
"../drizzle-orm/dist/pg-core/table.js"() {
|
24757
24766
|
"use strict";
|
@@ -24760,11 +24769,11 @@ var init_table2 = __esm({
|
|
24760
24769
|
init_all();
|
24761
24770
|
InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
24762
24771
|
EnableRLS = Symbol.for("drizzle:EnableRLS");
|
24763
|
-
PgTable = class extends (_e2 = Table2, _d2 = entityKind,
|
24772
|
+
PgTable = class extends (_e2 = Table2, _d2 = entityKind, _c3 = InlineForeignKeys, _b94 = EnableRLS, _a115 = Table2.Symbol.ExtraConfigBuilder, _e2) {
|
24764
24773
|
constructor() {
|
24765
24774
|
super(...arguments);
|
24766
24775
|
/**@internal */
|
24767
|
-
__publicField(this,
|
24776
|
+
__publicField(this, _c3, []);
|
24768
24777
|
/** @internal */
|
24769
24778
|
__publicField(this, _b94, false);
|
24770
24779
|
/** @internal */
|
@@ -25279,6 +25288,7 @@ __export(dist_exports, {
|
|
25279
25288
|
getTableLikeName: () => getTableLikeName,
|
25280
25289
|
getTableName: () => getTableName,
|
25281
25290
|
getTableUniqueName: () => getTableUniqueName,
|
25291
|
+
getViewSelectedFields: () => getViewSelectedFields,
|
25282
25292
|
gt: () => gt,
|
25283
25293
|
gte: () => gte,
|
25284
25294
|
hammingDistance: () => hammingDistance,
|
@@ -25294,6 +25304,7 @@ __export(dist_exports, {
|
|
25294
25304
|
isNull: () => isNull,
|
25295
25305
|
isSQLWrapper: () => isSQLWrapper,
|
25296
25306
|
isTable: () => isTable,
|
25307
|
+
isView: () => isView,
|
25297
25308
|
jaccardDistance: () => jaccardDistance,
|
25298
25309
|
l1Distance: () => l1Distance,
|
25299
25310
|
l2Distance: () => l2Distance,
|
@@ -28143,13 +28154,13 @@ var init_query_builders = __esm({
|
|
28143
28154
|
});
|
28144
28155
|
|
28145
28156
|
// ../drizzle-orm/dist/pg-core/query-builders/count.js
|
28146
|
-
var _a139, _b104,
|
28157
|
+
var _a139, _b104, _c4, _PgCountBuilder, PgCountBuilder;
|
28147
28158
|
var init_count = __esm({
|
28148
28159
|
"../drizzle-orm/dist/pg-core/query-builders/count.js"() {
|
28149
28160
|
"use strict";
|
28150
28161
|
init_entity();
|
28151
28162
|
init_sql();
|
28152
|
-
_PgCountBuilder = class _PgCountBuilder extends (
|
28163
|
+
_PgCountBuilder = class _PgCountBuilder extends (_c4 = SQL, _b104 = entityKind, _a139 = Symbol.toStringTag, _c4) {
|
28153
28164
|
constructor(params) {
|
28154
28165
|
super(_PgCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
28155
28166
|
__publicField(this, "sql");
|
@@ -28888,7 +28899,7 @@ function isPgView(obj) {
|
|
28888
28899
|
function isPgMaterializedView(obj) {
|
28889
28900
|
return is(obj, PgMaterializedView);
|
28890
28901
|
}
|
28891
|
-
var _a150, DefaultViewBuilderCore, _a151, _b107, ViewBuilder, _a152, _b108, ManualViewBuilder, _a153, MaterializedViewBuilderCore, _a154, _b109, MaterializedViewBuilder, _a155, _b110, ManualMaterializedViewBuilder, _a156, _b111,
|
28902
|
+
var _a150, DefaultViewBuilderCore, _a151, _b107, ViewBuilder, _a152, _b108, ManualViewBuilder, _a153, MaterializedViewBuilderCore, _a154, _b109, MaterializedViewBuilder, _a155, _b110, ManualMaterializedViewBuilder, _a156, _b111, _c5, PgView2, PgMaterializedViewConfig, _a157, _b112, _c6, PgMaterializedView;
|
28892
28903
|
var init_view = __esm({
|
28893
28904
|
"../drizzle-orm/dist/pg-core/view.js"() {
|
28894
28905
|
"use strict";
|
@@ -29098,7 +29109,7 @@ var init_view = __esm({
|
|
29098
29109
|
}
|
29099
29110
|
};
|
29100
29111
|
__publicField(ManualMaterializedViewBuilder, _a155, "PgManualMaterializedViewBuilder");
|
29101
|
-
PgView2 = class extends (
|
29112
|
+
PgView2 = class extends (_c5 = PgViewBase, _b111 = entityKind, _a156 = PgViewConfig, _c5) {
|
29102
29113
|
constructor({ pgConfig, config }) {
|
29103
29114
|
super(config);
|
29104
29115
|
__publicField(this, _a156);
|
@@ -29111,7 +29122,7 @@ var init_view = __esm({
|
|
29111
29122
|
};
|
29112
29123
|
__publicField(PgView2, _b111, "PgView");
|
29113
29124
|
PgMaterializedViewConfig = Symbol.for("drizzle:PgMaterializedViewConfig");
|
29114
|
-
PgMaterializedView = class extends (
|
29125
|
+
PgMaterializedView = class extends (_c6 = PgViewBase, _b112 = entityKind, _a157 = PgMaterializedViewConfig, _c6) {
|
29115
29126
|
constructor({ pgConfig, config }) {
|
29116
29127
|
super(config);
|
29117
29128
|
__publicField(this, _a157);
|
@@ -31659,7 +31670,10 @@ var init_text2 = __esm({
|
|
31659
31670
|
}
|
31660
31671
|
/** @internal */
|
31661
31672
|
build(table5) {
|
31662
|
-
return new SQLiteText(
|
31673
|
+
return new SQLiteText(
|
31674
|
+
table5,
|
31675
|
+
this.config
|
31676
|
+
);
|
31663
31677
|
}
|
31664
31678
|
};
|
31665
31679
|
__publicField(SQLiteTextBuilder, _a191, "SQLiteTextBuilder");
|
@@ -31760,7 +31774,7 @@ function sqliteTableBase(name2, columns, extraConfig, schema5, baseName = name2)
|
|
31760
31774
|
}
|
31761
31775
|
return table5;
|
31762
31776
|
}
|
31763
|
-
var InlineForeignKeys2, _a195, _b140,
|
31777
|
+
var InlineForeignKeys2, _a195, _b140, _c7, _d3, _e3, SQLiteTable, sqliteTable;
|
31764
31778
|
var init_table3 = __esm({
|
31765
31779
|
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
31766
31780
|
"use strict";
|
@@ -31768,11 +31782,11 @@ var init_table3 = __esm({
|
|
31768
31782
|
init_table();
|
31769
31783
|
init_all2();
|
31770
31784
|
InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
31771
|
-
SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind,
|
31785
|
+
SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind, _c7 = Table2.Symbol.Columns, _b140 = InlineForeignKeys2, _a195 = Table2.Symbol.ExtraConfigBuilder, _e3) {
|
31772
31786
|
constructor() {
|
31773
31787
|
super(...arguments);
|
31774
31788
|
/** @internal */
|
31775
|
-
__publicField(this,
|
31789
|
+
__publicField(this, _c7);
|
31776
31790
|
/** @internal */
|
31777
31791
|
__publicField(this, _b140, []);
|
31778
31792
|
/** @internal */
|
@@ -33640,13 +33654,13 @@ var init_query_builders2 = __esm({
|
|
33640
33654
|
});
|
33641
33655
|
|
33642
33656
|
// ../drizzle-orm/dist/sqlite-core/query-builders/count.js
|
33643
|
-
var _a209, _b149,
|
33657
|
+
var _a209, _b149, _c8, _SQLiteCountBuilder, SQLiteCountBuilder;
|
33644
33658
|
var init_count2 = __esm({
|
33645
33659
|
"../drizzle-orm/dist/sqlite-core/query-builders/count.js"() {
|
33646
33660
|
"use strict";
|
33647
33661
|
init_entity();
|
33648
33662
|
init_sql();
|
33649
|
-
_SQLiteCountBuilder = class _SQLiteCountBuilder extends (
|
33663
|
+
_SQLiteCountBuilder = class _SQLiteCountBuilder extends (_c8 = SQL, _b149 = entityKind, _a209 = Symbol.toStringTag, _c8) {
|
33650
33664
|
constructor(params) {
|
33651
33665
|
super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
33652
33666
|
__publicField(this, "sql");
|
@@ -34418,7 +34432,8 @@ function getTableConfig2(table5) {
|
|
34418
34432
|
const extraConfigBuilder = table5[SQLiteTable.Symbol.ExtraConfigBuilder];
|
34419
34433
|
if (extraConfigBuilder !== void 0) {
|
34420
34434
|
const extraConfig = extraConfigBuilder(table5[SQLiteTable.Symbol.Columns]);
|
34421
|
-
|
34435
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
34436
|
+
for (const builder of Object.values(extraValues)) {
|
34422
34437
|
if (is(builder, IndexBuilder2)) {
|
34423
34438
|
indexes.push(builder.build(table5));
|
34424
34439
|
} else if (is(builder, CheckBuilder2)) {
|
@@ -36315,6 +36330,18 @@ function text3(a, b = {}) {
|
|
36315
36330
|
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36316
36331
|
return new MySqlTextBuilder(name2, "text", config);
|
36317
36332
|
}
|
36333
|
+
function tinytext(a, b = {}) {
|
36334
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36335
|
+
return new MySqlTextBuilder(name2, "tinytext", config);
|
36336
|
+
}
|
36337
|
+
function mediumtext(a, b = {}) {
|
36338
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36339
|
+
return new MySqlTextBuilder(name2, "mediumtext", config);
|
36340
|
+
}
|
36341
|
+
function longtext(a, b = {}) {
|
36342
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36343
|
+
return new MySqlTextBuilder(name2, "longtext", config);
|
36344
|
+
}
|
36318
36345
|
var _a279, _b202, MySqlTextBuilder, _a280, _b203, MySqlText;
|
36319
36346
|
var init_text3 = __esm({
|
36320
36347
|
"../drizzle-orm/dist/mysql-core/columns/text.js"() {
|
@@ -36674,13 +36701,13 @@ var init_columns3 = __esm({
|
|
36674
36701
|
});
|
36675
36702
|
|
36676
36703
|
// ../drizzle-orm/dist/mysql-core/query-builders/count.js
|
36677
|
-
var _a297, _b220,
|
36704
|
+
var _a297, _b220, _c9, _MySqlCountBuilder, MySqlCountBuilder;
|
36678
36705
|
var init_count3 = __esm({
|
36679
36706
|
"../drizzle-orm/dist/mysql-core/query-builders/count.js"() {
|
36680
36707
|
"use strict";
|
36681
36708
|
init_entity();
|
36682
36709
|
init_sql();
|
36683
|
-
_MySqlCountBuilder = class _MySqlCountBuilder extends (
|
36710
|
+
_MySqlCountBuilder = class _MySqlCountBuilder extends (_c9 = SQL, _b220 = entityKind, _a297 = Symbol.toStringTag, _c9) {
|
36684
36711
|
constructor(params) {
|
36685
36712
|
super(_MySqlCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
36686
36713
|
__publicField(this, "sql");
|
@@ -36856,7 +36883,10 @@ function getMySqlColumnBuilders() {
|
|
36856
36883
|
tinyint,
|
36857
36884
|
varbinary,
|
36858
36885
|
varchar: varchar2,
|
36859
|
-
year
|
36886
|
+
year,
|
36887
|
+
longtext,
|
36888
|
+
mediumtext,
|
36889
|
+
tinytext
|
36860
36890
|
};
|
36861
36891
|
}
|
36862
36892
|
var init_all3 = __esm({
|
@@ -36910,7 +36940,7 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema5, baseName = n
|
|
36910
36940
|
}
|
36911
36941
|
return table5;
|
36912
36942
|
}
|
36913
|
-
var InlineForeignKeys3, _a299, _b222,
|
36943
|
+
var InlineForeignKeys3, _a299, _b222, _c10, _d4, _e4, MySqlTable, mysqlTable;
|
36914
36944
|
var init_table4 = __esm({
|
36915
36945
|
"../drizzle-orm/dist/mysql-core/table.js"() {
|
36916
36946
|
"use strict";
|
@@ -36918,11 +36948,11 @@ var init_table4 = __esm({
|
|
36918
36948
|
init_table();
|
36919
36949
|
init_all3();
|
36920
36950
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
36921
|
-
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind,
|
36951
|
+
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind, _c10 = Table2.Symbol.Columns, _b222 = InlineForeignKeys3, _a299 = Table2.Symbol.ExtraConfigBuilder, _e4) {
|
36922
36952
|
constructor() {
|
36923
36953
|
super(...arguments);
|
36924
36954
|
/** @internal */
|
36925
|
-
__publicField(this,
|
36955
|
+
__publicField(this, _c10);
|
36926
36956
|
/** @internal */
|
36927
36957
|
__publicField(this, _b222, []);
|
36928
36958
|
/** @internal */
|
@@ -39309,7 +39339,7 @@ function mysqlViewWithSchema(name2, selection, schema5) {
|
|
39309
39339
|
}
|
39310
39340
|
return new ViewBuilder3(name2, schema5);
|
39311
39341
|
}
|
39312
|
-
var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231,
|
39342
|
+
var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231, _c11, MySqlView2;
|
39313
39343
|
var init_view3 = __esm({
|
39314
39344
|
"../drizzle-orm/dist/mysql-core/view.js"() {
|
39315
39345
|
"use strict";
|
@@ -39414,7 +39444,7 @@ var init_view3 = __esm({
|
|
39414
39444
|
}
|
39415
39445
|
};
|
39416
39446
|
__publicField(ManualViewBuilder3, _a320, "MySqlManualViewBuilder");
|
39417
|
-
MySqlView2 = class extends (
|
39447
|
+
MySqlView2 = class extends (_c11 = MySqlViewBase, _b231 = entityKind, _a321 = MySqlViewConfig, _c11) {
|
39418
39448
|
constructor({ mysqlConfig, config }) {
|
39419
39449
|
super(config);
|
39420
39450
|
__publicField(this, _a321);
|
@@ -39537,7 +39567,8 @@ function getTableConfig3(table5) {
|
|
39537
39567
|
const extraConfigBuilder = table5[MySqlTable.Symbol.ExtraConfigBuilder];
|
39538
39568
|
if (extraConfigBuilder !== void 0) {
|
39539
39569
|
const extraConfig = extraConfigBuilder(table5[MySqlTable.Symbol.Columns]);
|
39540
|
-
|
39570
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
39571
|
+
for (const builder of Object.values(extraValues)) {
|
39541
39572
|
if (is(builder, IndexBuilder3)) {
|
39542
39573
|
indexes.push(builder.build(table5));
|
39543
39574
|
} else if (is(builder, CheckBuilder3)) {
|
@@ -42069,13 +42100,13 @@ var init_columns4 = __esm({
|
|
42069
42100
|
});
|
42070
42101
|
|
42071
42102
|
// ../drizzle-orm/dist/singlestore-core/query-builders/count.js
|
42072
|
-
var _a391, _b295,
|
42103
|
+
var _a391, _b295, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder;
|
42073
42104
|
var init_count4 = __esm({
|
42074
42105
|
"../drizzle-orm/dist/singlestore-core/query-builders/count.js"() {
|
42075
42106
|
"use strict";
|
42076
42107
|
init_entity();
|
42077
42108
|
init_sql();
|
42078
|
-
_SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (
|
42109
|
+
_SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (_c12 = SQL, _b295 = entityKind, _a391 = Symbol.toStringTag, _c12) {
|
42079
42110
|
constructor(params) {
|
42080
42111
|
super(_SingleStoreCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
42081
42112
|
__publicField(this, "sql");
|
@@ -42429,14 +42460,14 @@ function singlestoreTableWithSchema(name2, columns, extraConfig, schema5, baseNa
|
|
42429
42460
|
}
|
42430
42461
|
return table5;
|
42431
42462
|
}
|
42432
|
-
var _a395, _b298,
|
42463
|
+
var _a395, _b298, _c13, _d5, SingleStoreTable;
|
42433
42464
|
var init_table5 = __esm({
|
42434
42465
|
"../drizzle-orm/dist/singlestore-core/table.js"() {
|
42435
42466
|
"use strict";
|
42436
42467
|
init_entity();
|
42437
42468
|
init_table();
|
42438
42469
|
init_all4();
|
42439
|
-
SingleStoreTable = class extends (_d5 = Table2,
|
42470
|
+
SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind, _b298 = Table2.Symbol.Columns, _a395 = Table2.Symbol.ExtraConfigBuilder, _d5) {
|
42440
42471
|
constructor() {
|
42441
42472
|
super(...arguments);
|
42442
42473
|
/** @internal */
|
@@ -42445,7 +42476,7 @@ var init_table5 = __esm({
|
|
42445
42476
|
__publicField(this, _a395);
|
42446
42477
|
}
|
42447
42478
|
};
|
42448
|
-
__publicField(SingleStoreTable,
|
42479
|
+
__publicField(SingleStoreTable, _c13, "SingleStoreTable");
|
42449
42480
|
/** @internal */
|
42450
42481
|
__publicField(SingleStoreTable, "Symbol", Object.assign({}, Table2.Symbol, {}));
|
42451
42482
|
}
|
@@ -44344,7 +44375,8 @@ function getTableConfig4(table5) {
|
|
44344
44375
|
const extraConfigBuilder = table5[SingleStoreTable.Symbol.ExtraConfigBuilder];
|
44345
44376
|
if (extraConfigBuilder !== void 0) {
|
44346
44377
|
const extraConfig = extraConfigBuilder(table5[SingleStoreTable.Symbol.Columns]);
|
44347
|
-
|
44378
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
44379
|
+
for (const builder of Object.values(extraValues)) {
|
44348
44380
|
if (is(builder, IndexBuilder4)) {
|
44349
44381
|
indexes.push(builder.build(table5));
|
44350
44382
|
} else if (is(builder, UniqueConstraintBuilder4)) {
|