drizzle-kit 0.29.1 → 0.30.0-21dab20
Sign up to get free protection for your applications and to get access to all the features.
- package/api.js +93 -60
- package/api.mjs +93 -60
- package/bin.cjs +280 -106
- 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 {
|
@@ -19728,7 +19719,8 @@ var init_common = __esm({
|
|
19728
19719
|
schemaFilter: unionType([stringType(), stringType().array()]).default(["public"]),
|
19729
19720
|
migrations: configMigrations,
|
19730
19721
|
dbCredentials: anyType().optional(),
|
19731
|
-
casing: casingType.optional()
|
19722
|
+
casing: casingType.optional(),
|
19723
|
+
sql: booleanType().default(true)
|
19732
19724
|
}).passthrough();
|
19733
19725
|
casing = unionType([literalType("camel"), literalType("preserve")]).default(
|
19734
19726
|
"camel"
|
@@ -21983,7 +21975,7 @@ var version;
|
|
21983
21975
|
var init_version = __esm({
|
21984
21976
|
"../drizzle-orm/dist/version.js"() {
|
21985
21977
|
"use strict";
|
21986
|
-
version = "0.
|
21978
|
+
version = "0.38.1";
|
21987
21979
|
}
|
21988
21980
|
});
|
21989
21981
|
|
@@ -22168,7 +22160,10 @@ function fillPlaceholders(params, values) {
|
|
22168
22160
|
return p;
|
22169
22161
|
});
|
22170
22162
|
}
|
22171
|
-
|
22163
|
+
function isView(view4) {
|
22164
|
+
return typeof view4 === "object" && view4 !== null && IsDrizzleView in view4;
|
22165
|
+
}
|
22166
|
+
var _a19, FakePrimitiveParam, _a20, StringChunk, _a21, _SQL, SQL, _a22, Name, noopDecoder, noopEncoder, noopMapper, _a23, Param, _a24, Placeholder, IsDrizzleView, _a25, _b10, _c2, View3;
|
22172
22167
|
var init_sql = __esm({
|
22173
22168
|
"../drizzle-orm/dist/sql/sql.js"() {
|
22174
22169
|
"use strict";
|
@@ -22493,11 +22488,14 @@ var init_sql = __esm({
|
|
22493
22488
|
}
|
22494
22489
|
};
|
22495
22490
|
__publicField(Placeholder, _a24, "Placeholder");
|
22496
|
-
|
22491
|
+
IsDrizzleView = Symbol.for("drizzle:IsDrizzleView");
|
22492
|
+
_c2 = entityKind, _b10 = ViewBaseConfig, _a25 = IsDrizzleView;
|
22497
22493
|
View3 = class {
|
22498
22494
|
constructor({ name: name2, schema: schema5, selectedFields, query }) {
|
22499
22495
|
/** @internal */
|
22500
|
-
__publicField(this,
|
22496
|
+
__publicField(this, _b10);
|
22497
|
+
/** @internal */
|
22498
|
+
__publicField(this, _a25, true);
|
22501
22499
|
this[ViewBaseConfig] = {
|
22502
22500
|
name: name2,
|
22503
22501
|
originalName: name2,
|
@@ -22512,7 +22510,7 @@ var init_sql = __esm({
|
|
22512
22510
|
return new SQL([this]);
|
22513
22511
|
}
|
22514
22512
|
};
|
22515
|
-
__publicField(View3,
|
22513
|
+
__publicField(View3, _c2, "View");
|
22516
22514
|
Column2.prototype.getSQL = function() {
|
22517
22515
|
return new SQL([this]);
|
22518
22516
|
};
|
@@ -23033,6 +23031,9 @@ function applyMixins(baseClass, extendedClasses) {
|
|
23033
23031
|
function getTableColumns(table5) {
|
23034
23032
|
return table5[Table2.Symbol.Columns];
|
23035
23033
|
}
|
23034
|
+
function getViewSelectedFields(view4) {
|
23035
|
+
return view4[ViewBaseConfig].selectedFields;
|
23036
|
+
}
|
23036
23037
|
function getTableLikeName(table5) {
|
23037
23038
|
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
23039
|
}
|
@@ -23327,7 +23328,10 @@ var init_char = __esm({
|
|
23327
23328
|
}
|
23328
23329
|
/** @internal */
|
23329
23330
|
build(table5) {
|
23330
|
-
return new PgChar(
|
23331
|
+
return new PgChar(
|
23332
|
+
table5,
|
23333
|
+
this.config
|
23334
|
+
);
|
23331
23335
|
}
|
23332
23336
|
};
|
23333
23337
|
__publicField(PgCharBuilder, _a46, "PgCharBuilder");
|
@@ -24459,7 +24463,10 @@ var init_varchar = __esm({
|
|
24459
24463
|
}
|
24460
24464
|
/** @internal */
|
24461
24465
|
build(table5) {
|
24462
|
-
return new PgVarchar(
|
24466
|
+
return new PgVarchar(
|
24467
|
+
table5,
|
24468
|
+
this.config
|
24469
|
+
);
|
24463
24470
|
}
|
24464
24471
|
};
|
24465
24472
|
__publicField(PgVarcharBuilder, _a105, "PgVarcharBuilder");
|
@@ -24619,7 +24626,10 @@ var init_vector = __esm({
|
|
24619
24626
|
}
|
24620
24627
|
/** @internal */
|
24621
24628
|
build(table5) {
|
24622
|
-
return new PgVector(
|
24629
|
+
return new PgVector(
|
24630
|
+
table5,
|
24631
|
+
this.config
|
24632
|
+
);
|
24623
24633
|
}
|
24624
24634
|
};
|
24625
24635
|
__publicField(PgVectorBuilder, _a113, "PgVectorBuilder");
|
@@ -24751,7 +24761,7 @@ function pgTableWithSchema(name2, columns, extraConfig, schema5, baseName = name
|
|
24751
24761
|
}
|
24752
24762
|
});
|
24753
24763
|
}
|
24754
|
-
var InlineForeignKeys, EnableRLS, _a115, _b94,
|
24764
|
+
var InlineForeignKeys, EnableRLS, _a115, _b94, _c3, _d2, _e2, PgTable, pgTable;
|
24755
24765
|
var init_table2 = __esm({
|
24756
24766
|
"../drizzle-orm/dist/pg-core/table.js"() {
|
24757
24767
|
"use strict";
|
@@ -24760,11 +24770,11 @@ var init_table2 = __esm({
|
|
24760
24770
|
init_all();
|
24761
24771
|
InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
24762
24772
|
EnableRLS = Symbol.for("drizzle:EnableRLS");
|
24763
|
-
PgTable = class extends (_e2 = Table2, _d2 = entityKind,
|
24773
|
+
PgTable = class extends (_e2 = Table2, _d2 = entityKind, _c3 = InlineForeignKeys, _b94 = EnableRLS, _a115 = Table2.Symbol.ExtraConfigBuilder, _e2) {
|
24764
24774
|
constructor() {
|
24765
24775
|
super(...arguments);
|
24766
24776
|
/**@internal */
|
24767
|
-
__publicField(this,
|
24777
|
+
__publicField(this, _c3, []);
|
24768
24778
|
/** @internal */
|
24769
24779
|
__publicField(this, _b94, false);
|
24770
24780
|
/** @internal */
|
@@ -25279,6 +25289,7 @@ __export(dist_exports, {
|
|
25279
25289
|
getTableLikeName: () => getTableLikeName,
|
25280
25290
|
getTableName: () => getTableName,
|
25281
25291
|
getTableUniqueName: () => getTableUniqueName,
|
25292
|
+
getViewSelectedFields: () => getViewSelectedFields,
|
25282
25293
|
gt: () => gt,
|
25283
25294
|
gte: () => gte,
|
25284
25295
|
hammingDistance: () => hammingDistance,
|
@@ -25294,6 +25305,7 @@ __export(dist_exports, {
|
|
25294
25305
|
isNull: () => isNull,
|
25295
25306
|
isSQLWrapper: () => isSQLWrapper,
|
25296
25307
|
isTable: () => isTable,
|
25308
|
+
isView: () => isView,
|
25297
25309
|
jaccardDistance: () => jaccardDistance,
|
25298
25310
|
l1Distance: () => l1Distance,
|
25299
25311
|
l2Distance: () => l2Distance,
|
@@ -28143,13 +28155,13 @@ var init_query_builders = __esm({
|
|
28143
28155
|
});
|
28144
28156
|
|
28145
28157
|
// ../drizzle-orm/dist/pg-core/query-builders/count.js
|
28146
|
-
var _a139, _b104,
|
28158
|
+
var _a139, _b104, _c4, _PgCountBuilder, PgCountBuilder;
|
28147
28159
|
var init_count = __esm({
|
28148
28160
|
"../drizzle-orm/dist/pg-core/query-builders/count.js"() {
|
28149
28161
|
"use strict";
|
28150
28162
|
init_entity();
|
28151
28163
|
init_sql();
|
28152
|
-
_PgCountBuilder = class _PgCountBuilder extends (
|
28164
|
+
_PgCountBuilder = class _PgCountBuilder extends (_c4 = SQL, _b104 = entityKind, _a139 = Symbol.toStringTag, _c4) {
|
28153
28165
|
constructor(params) {
|
28154
28166
|
super(_PgCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
28155
28167
|
__publicField(this, "sql");
|
@@ -28888,7 +28900,7 @@ function isPgView(obj) {
|
|
28888
28900
|
function isPgMaterializedView(obj) {
|
28889
28901
|
return is(obj, PgMaterializedView);
|
28890
28902
|
}
|
28891
|
-
var _a150, DefaultViewBuilderCore, _a151, _b107, ViewBuilder, _a152, _b108, ManualViewBuilder, _a153, MaterializedViewBuilderCore, _a154, _b109, MaterializedViewBuilder, _a155, _b110, ManualMaterializedViewBuilder, _a156, _b111,
|
28903
|
+
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
28904
|
var init_view = __esm({
|
28893
28905
|
"../drizzle-orm/dist/pg-core/view.js"() {
|
28894
28906
|
"use strict";
|
@@ -29098,7 +29110,7 @@ var init_view = __esm({
|
|
29098
29110
|
}
|
29099
29111
|
};
|
29100
29112
|
__publicField(ManualMaterializedViewBuilder, _a155, "PgManualMaterializedViewBuilder");
|
29101
|
-
PgView2 = class extends (
|
29113
|
+
PgView2 = class extends (_c5 = PgViewBase, _b111 = entityKind, _a156 = PgViewConfig, _c5) {
|
29102
29114
|
constructor({ pgConfig, config }) {
|
29103
29115
|
super(config);
|
29104
29116
|
__publicField(this, _a156);
|
@@ -29111,7 +29123,7 @@ var init_view = __esm({
|
|
29111
29123
|
};
|
29112
29124
|
__publicField(PgView2, _b111, "PgView");
|
29113
29125
|
PgMaterializedViewConfig = Symbol.for("drizzle:PgMaterializedViewConfig");
|
29114
|
-
PgMaterializedView = class extends (
|
29126
|
+
PgMaterializedView = class extends (_c6 = PgViewBase, _b112 = entityKind, _a157 = PgMaterializedViewConfig, _c6) {
|
29115
29127
|
constructor({ pgConfig, config }) {
|
29116
29128
|
super(config);
|
29117
29129
|
__publicField(this, _a157);
|
@@ -31659,7 +31671,10 @@ var init_text2 = __esm({
|
|
31659
31671
|
}
|
31660
31672
|
/** @internal */
|
31661
31673
|
build(table5) {
|
31662
|
-
return new SQLiteText(
|
31674
|
+
return new SQLiteText(
|
31675
|
+
table5,
|
31676
|
+
this.config
|
31677
|
+
);
|
31663
31678
|
}
|
31664
31679
|
};
|
31665
31680
|
__publicField(SQLiteTextBuilder, _a191, "SQLiteTextBuilder");
|
@@ -31760,7 +31775,7 @@ function sqliteTableBase(name2, columns, extraConfig, schema5, baseName = name2)
|
|
31760
31775
|
}
|
31761
31776
|
return table5;
|
31762
31777
|
}
|
31763
|
-
var InlineForeignKeys2, _a195, _b140,
|
31778
|
+
var InlineForeignKeys2, _a195, _b140, _c7, _d3, _e3, SQLiteTable, sqliteTable;
|
31764
31779
|
var init_table3 = __esm({
|
31765
31780
|
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
31766
31781
|
"use strict";
|
@@ -31768,11 +31783,11 @@ var init_table3 = __esm({
|
|
31768
31783
|
init_table();
|
31769
31784
|
init_all2();
|
31770
31785
|
InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
31771
|
-
SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind,
|
31786
|
+
SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind, _c7 = Table2.Symbol.Columns, _b140 = InlineForeignKeys2, _a195 = Table2.Symbol.ExtraConfigBuilder, _e3) {
|
31772
31787
|
constructor() {
|
31773
31788
|
super(...arguments);
|
31774
31789
|
/** @internal */
|
31775
|
-
__publicField(this,
|
31790
|
+
__publicField(this, _c7);
|
31776
31791
|
/** @internal */
|
31777
31792
|
__publicField(this, _b140, []);
|
31778
31793
|
/** @internal */
|
@@ -33640,13 +33655,13 @@ var init_query_builders2 = __esm({
|
|
33640
33655
|
});
|
33641
33656
|
|
33642
33657
|
// ../drizzle-orm/dist/sqlite-core/query-builders/count.js
|
33643
|
-
var _a209, _b149,
|
33658
|
+
var _a209, _b149, _c8, _SQLiteCountBuilder, SQLiteCountBuilder;
|
33644
33659
|
var init_count2 = __esm({
|
33645
33660
|
"../drizzle-orm/dist/sqlite-core/query-builders/count.js"() {
|
33646
33661
|
"use strict";
|
33647
33662
|
init_entity();
|
33648
33663
|
init_sql();
|
33649
|
-
_SQLiteCountBuilder = class _SQLiteCountBuilder extends (
|
33664
|
+
_SQLiteCountBuilder = class _SQLiteCountBuilder extends (_c8 = SQL, _b149 = entityKind, _a209 = Symbol.toStringTag, _c8) {
|
33650
33665
|
constructor(params) {
|
33651
33666
|
super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
33652
33667
|
__publicField(this, "sql");
|
@@ -34418,7 +34433,8 @@ function getTableConfig2(table5) {
|
|
34418
34433
|
const extraConfigBuilder = table5[SQLiteTable.Symbol.ExtraConfigBuilder];
|
34419
34434
|
if (extraConfigBuilder !== void 0) {
|
34420
34435
|
const extraConfig = extraConfigBuilder(table5[SQLiteTable.Symbol.Columns]);
|
34421
|
-
|
34436
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
34437
|
+
for (const builder of Object.values(extraValues)) {
|
34422
34438
|
if (is(builder, IndexBuilder2)) {
|
34423
34439
|
indexes.push(builder.build(table5));
|
34424
34440
|
} else if (is(builder, CheckBuilder2)) {
|
@@ -36315,6 +36331,18 @@ function text3(a, b = {}) {
|
|
36315
36331
|
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36316
36332
|
return new MySqlTextBuilder(name2, "text", config);
|
36317
36333
|
}
|
36334
|
+
function tinytext(a, b = {}) {
|
36335
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36336
|
+
return new MySqlTextBuilder(name2, "tinytext", config);
|
36337
|
+
}
|
36338
|
+
function mediumtext(a, b = {}) {
|
36339
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36340
|
+
return new MySqlTextBuilder(name2, "mediumtext", config);
|
36341
|
+
}
|
36342
|
+
function longtext(a, b = {}) {
|
36343
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36344
|
+
return new MySqlTextBuilder(name2, "longtext", config);
|
36345
|
+
}
|
36318
36346
|
var _a279, _b202, MySqlTextBuilder, _a280, _b203, MySqlText;
|
36319
36347
|
var init_text3 = __esm({
|
36320
36348
|
"../drizzle-orm/dist/mysql-core/columns/text.js"() {
|
@@ -36674,13 +36702,13 @@ var init_columns3 = __esm({
|
|
36674
36702
|
});
|
36675
36703
|
|
36676
36704
|
// ../drizzle-orm/dist/mysql-core/query-builders/count.js
|
36677
|
-
var _a297, _b220,
|
36705
|
+
var _a297, _b220, _c9, _MySqlCountBuilder, MySqlCountBuilder;
|
36678
36706
|
var init_count3 = __esm({
|
36679
36707
|
"../drizzle-orm/dist/mysql-core/query-builders/count.js"() {
|
36680
36708
|
"use strict";
|
36681
36709
|
init_entity();
|
36682
36710
|
init_sql();
|
36683
|
-
_MySqlCountBuilder = class _MySqlCountBuilder extends (
|
36711
|
+
_MySqlCountBuilder = class _MySqlCountBuilder extends (_c9 = SQL, _b220 = entityKind, _a297 = Symbol.toStringTag, _c9) {
|
36684
36712
|
constructor(params) {
|
36685
36713
|
super(_MySqlCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
36686
36714
|
__publicField(this, "sql");
|
@@ -36856,7 +36884,10 @@ function getMySqlColumnBuilders() {
|
|
36856
36884
|
tinyint,
|
36857
36885
|
varbinary,
|
36858
36886
|
varchar: varchar2,
|
36859
|
-
year
|
36887
|
+
year,
|
36888
|
+
longtext,
|
36889
|
+
mediumtext,
|
36890
|
+
tinytext
|
36860
36891
|
};
|
36861
36892
|
}
|
36862
36893
|
var init_all3 = __esm({
|
@@ -36910,7 +36941,7 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema5, baseName = n
|
|
36910
36941
|
}
|
36911
36942
|
return table5;
|
36912
36943
|
}
|
36913
|
-
var InlineForeignKeys3, _a299, _b222,
|
36944
|
+
var InlineForeignKeys3, _a299, _b222, _c10, _d4, _e4, MySqlTable, mysqlTable;
|
36914
36945
|
var init_table4 = __esm({
|
36915
36946
|
"../drizzle-orm/dist/mysql-core/table.js"() {
|
36916
36947
|
"use strict";
|
@@ -36918,11 +36949,11 @@ var init_table4 = __esm({
|
|
36918
36949
|
init_table();
|
36919
36950
|
init_all3();
|
36920
36951
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
36921
|
-
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind,
|
36952
|
+
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind, _c10 = Table2.Symbol.Columns, _b222 = InlineForeignKeys3, _a299 = Table2.Symbol.ExtraConfigBuilder, _e4) {
|
36922
36953
|
constructor() {
|
36923
36954
|
super(...arguments);
|
36924
36955
|
/** @internal */
|
36925
|
-
__publicField(this,
|
36956
|
+
__publicField(this, _c10);
|
36926
36957
|
/** @internal */
|
36927
36958
|
__publicField(this, _b222, []);
|
36928
36959
|
/** @internal */
|
@@ -39309,7 +39340,7 @@ function mysqlViewWithSchema(name2, selection, schema5) {
|
|
39309
39340
|
}
|
39310
39341
|
return new ViewBuilder3(name2, schema5);
|
39311
39342
|
}
|
39312
|
-
var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231,
|
39343
|
+
var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231, _c11, MySqlView2;
|
39313
39344
|
var init_view3 = __esm({
|
39314
39345
|
"../drizzle-orm/dist/mysql-core/view.js"() {
|
39315
39346
|
"use strict";
|
@@ -39414,7 +39445,7 @@ var init_view3 = __esm({
|
|
39414
39445
|
}
|
39415
39446
|
};
|
39416
39447
|
__publicField(ManualViewBuilder3, _a320, "MySqlManualViewBuilder");
|
39417
|
-
MySqlView2 = class extends (
|
39448
|
+
MySqlView2 = class extends (_c11 = MySqlViewBase, _b231 = entityKind, _a321 = MySqlViewConfig, _c11) {
|
39418
39449
|
constructor({ mysqlConfig, config }) {
|
39419
39450
|
super(config);
|
39420
39451
|
__publicField(this, _a321);
|
@@ -39537,7 +39568,8 @@ function getTableConfig3(table5) {
|
|
39537
39568
|
const extraConfigBuilder = table5[MySqlTable.Symbol.ExtraConfigBuilder];
|
39538
39569
|
if (extraConfigBuilder !== void 0) {
|
39539
39570
|
const extraConfig = extraConfigBuilder(table5[MySqlTable.Symbol.Columns]);
|
39540
|
-
|
39571
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
39572
|
+
for (const builder of Object.values(extraValues)) {
|
39541
39573
|
if (is(builder, IndexBuilder3)) {
|
39542
39574
|
indexes.push(builder.build(table5));
|
39543
39575
|
} else if (is(builder, CheckBuilder3)) {
|
@@ -42069,13 +42101,13 @@ var init_columns4 = __esm({
|
|
42069
42101
|
});
|
42070
42102
|
|
42071
42103
|
// ../drizzle-orm/dist/singlestore-core/query-builders/count.js
|
42072
|
-
var _a391, _b295,
|
42104
|
+
var _a391, _b295, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder;
|
42073
42105
|
var init_count4 = __esm({
|
42074
42106
|
"../drizzle-orm/dist/singlestore-core/query-builders/count.js"() {
|
42075
42107
|
"use strict";
|
42076
42108
|
init_entity();
|
42077
42109
|
init_sql();
|
42078
|
-
_SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (
|
42110
|
+
_SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (_c12 = SQL, _b295 = entityKind, _a391 = Symbol.toStringTag, _c12) {
|
42079
42111
|
constructor(params) {
|
42080
42112
|
super(_SingleStoreCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
42081
42113
|
__publicField(this, "sql");
|
@@ -42429,14 +42461,14 @@ function singlestoreTableWithSchema(name2, columns, extraConfig, schema5, baseNa
|
|
42429
42461
|
}
|
42430
42462
|
return table5;
|
42431
42463
|
}
|
42432
|
-
var _a395, _b298,
|
42464
|
+
var _a395, _b298, _c13, _d5, SingleStoreTable;
|
42433
42465
|
var init_table5 = __esm({
|
42434
42466
|
"../drizzle-orm/dist/singlestore-core/table.js"() {
|
42435
42467
|
"use strict";
|
42436
42468
|
init_entity();
|
42437
42469
|
init_table();
|
42438
42470
|
init_all4();
|
42439
|
-
SingleStoreTable = class extends (_d5 = Table2,
|
42471
|
+
SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind, _b298 = Table2.Symbol.Columns, _a395 = Table2.Symbol.ExtraConfigBuilder, _d5) {
|
42440
42472
|
constructor() {
|
42441
42473
|
super(...arguments);
|
42442
42474
|
/** @internal */
|
@@ -42445,7 +42477,7 @@ var init_table5 = __esm({
|
|
42445
42477
|
__publicField(this, _a395);
|
42446
42478
|
}
|
42447
42479
|
};
|
42448
|
-
__publicField(SingleStoreTable,
|
42480
|
+
__publicField(SingleStoreTable, _c13, "SingleStoreTable");
|
42449
42481
|
/** @internal */
|
42450
42482
|
__publicField(SingleStoreTable, "Symbol", Object.assign({}, Table2.Symbol, {}));
|
42451
42483
|
}
|
@@ -44344,7 +44376,8 @@ function getTableConfig4(table5) {
|
|
44344
44376
|
const extraConfigBuilder = table5[SingleStoreTable.Symbol.ExtraConfigBuilder];
|
44345
44377
|
if (extraConfigBuilder !== void 0) {
|
44346
44378
|
const extraConfig = extraConfigBuilder(table5[SingleStoreTable.Symbol.Columns]);
|
44347
|
-
|
44379
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
44380
|
+
for (const builder of Object.values(extraValues)) {
|
44348
44381
|
if (is(builder, IndexBuilder4)) {
|
44349
44382
|
indexes.push(builder.build(table5));
|
44350
44383
|
} else if (is(builder, UniqueConstraintBuilder4)) {
|