drizzle-kit 0.29.1 → 0.30.0-21dab20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +93 -60
- package/api.mjs +93 -60
- package/bin.cjs +280 -106
- package/package.json +1 -1
package/api.mjs
CHANGED
@@ -5700,8 +5700,8 @@ var init_lib = __esm({
|
|
5700
5700
|
unknownKeys: "strict",
|
5701
5701
|
...message !== void 0 ? {
|
5702
5702
|
errorMap: (issue, ctx) => {
|
5703
|
-
var _a413, _b303,
|
5704
|
-
const defaultError = (
|
5703
|
+
var _a413, _b303, _c14, _d6;
|
5704
|
+
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;
|
5705
5705
|
if (issue.code === "unrecognized_keys")
|
5706
5706
|
return {
|
5707
5707
|
message: (_d6 = errorUtil.errToObj(message).message) !== null && _d6 !== void 0 ? _d6 : defaultError
|
@@ -12336,7 +12336,7 @@ var init_sqlgenerator = __esm({
|
|
12336
12336
|
const { tableName, schema: schema5, columns, compositePKs, uniqueConstraints, checkConstraints, policies, isRLSEnabled } = st;
|
12337
12337
|
let statement = "";
|
12338
12338
|
const name2 = schema5 ? `"${schema5}"."${tableName}"` : `"${tableName}"`;
|
12339
|
-
statement += `CREATE TABLE
|
12339
|
+
statement += `CREATE TABLE ${name2} (
|
12340
12340
|
`;
|
12341
12341
|
for (let i = 0; i < columns.length; i++) {
|
12342
12342
|
const column5 = columns[i];
|
@@ -13174,7 +13174,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
|
|
13174
13174
|
convert(statement) {
|
13175
13175
|
const { tableName, columnName, schema: schema5 } = statement;
|
13176
13176
|
const tableNameWithSchema = schema5 ? `"${schema5}"."${tableName}"` : `"${tableName}"`;
|
13177
|
-
return `ALTER TABLE ${tableNameWithSchema} DROP COLUMN
|
13177
|
+
return `ALTER TABLE ${tableNameWithSchema} DROP COLUMN "${columnName}";`;
|
13178
13178
|
}
|
13179
13179
|
};
|
13180
13180
|
MySqlAlterTableDropColumnConvertor = class extends Convertor {
|
@@ -13595,7 +13595,7 @@ WITH ${withCheckOption} CHECK OPTION` : "";
|
|
13595
13595
|
for (const table5 of Object.values(json22.tables)) {
|
13596
13596
|
for (const index5 of Object.values(table5.indexes)) {
|
13597
13597
|
const unsquashed = SQLiteSquasher.unsquashIdx(index5);
|
13598
|
-
sqlStatements.push(`DROP INDEX
|
13598
|
+
sqlStatements.push(`DROP INDEX "${unsquashed.name}";`);
|
13599
13599
|
indexes.push({ ...unsquashed, tableName: table5.name });
|
13600
13600
|
}
|
13601
13601
|
}
|
@@ -14109,13 +14109,8 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14109
14109
|
const toColumnsString = columnsTo.map((it) => `"${it}"`).join(",");
|
14110
14110
|
const tableNameWithSchema = statement.schema ? `"${statement.schema}"."${tableFrom}"` : `"${tableFrom}"`;
|
14111
14111
|
const tableToNameWithSchema = schemaTo ? `"${schemaTo}"."${tableTo}"` : `"${tableTo}"`;
|
14112
|
-
const alterStatement = `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${name2}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement}
|
14113
|
-
|
14114
|
-
sql2 += " " + alterStatement + ";\n";
|
14115
|
-
sql2 += "EXCEPTION\n";
|
14116
|
-
sql2 += " WHEN duplicate_object THEN null;\n";
|
14117
|
-
sql2 += "END $$;\n";
|
14118
|
-
return sql2;
|
14112
|
+
const alterStatement = `ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${name2}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement};`;
|
14113
|
+
return alterStatement;
|
14119
14114
|
}
|
14120
14115
|
};
|
14121
14116
|
LibSQLCreateForeignKeyConvertor = class extends Convertor {
|
@@ -14172,12 +14167,8 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14172
14167
|
const toColumnsString = newFk.columnsTo.map((it) => `"${it}"`).join(",");
|
14173
14168
|
const tableFromNameWithSchema = oldFk.schemaTo ? `"${oldFk.schemaTo}"."${oldFk.tableFrom}"` : `"${oldFk.tableFrom}"`;
|
14174
14169
|
const tableToNameWithSchema = newFk.schemaTo ? `"${newFk.schemaTo}"."${newFk.tableFrom}"` : `"${newFk.tableFrom}"`;
|
14175
|
-
const alterStatement = `ALTER TABLE ${tableFromNameWithSchema} ADD CONSTRAINT "${newFk.name}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement}
|
14176
|
-
sql2 +=
|
14177
|
-
sql2 += " " + alterStatement + ";\n";
|
14178
|
-
sql2 += "EXCEPTION\n";
|
14179
|
-
sql2 += " WHEN duplicate_object THEN null;\n";
|
14180
|
-
sql2 += "END $$;\n";
|
14170
|
+
const alterStatement = `ALTER TABLE ${tableFromNameWithSchema} ADD CONSTRAINT "${newFk.name}" FOREIGN KEY (${fromColumnsString}) REFERENCES ${tableToNameWithSchema}(${toColumnsString})${onDeleteStatement}${onUpdateStatement};`;
|
14171
|
+
sql2 += alterStatement;
|
14181
14172
|
return sql2;
|
14182
14173
|
}
|
14183
14174
|
};
|
@@ -14233,7 +14224,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14233
14224
|
reversedString = reversedString.slice(0, -1);
|
14234
14225
|
return reversedString;
|
14235
14226
|
}
|
14236
|
-
return `CREATE ${indexPart}${concurrently ? " CONCURRENTLY" : ""}
|
14227
|
+
return `CREATE ${indexPart}${concurrently ? " CONCURRENTLY" : ""} "${name2}" ON ${tableNameWithSchema} USING ${method} (${value})${Object.keys(withMap).length !== 0 ? ` WITH (${reverseLogic(withMap)})` : ""}${where ? ` WHERE ${where}` : ""};`;
|
14237
14228
|
}
|
14238
14229
|
};
|
14239
14230
|
CreateMySqlIndexConvertor = class extends Convertor {
|
@@ -14288,7 +14279,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14288
14279
|
}
|
14289
14280
|
convert(statement) {
|
14290
14281
|
const { name: name2 } = PgSquasher.unsquashIdx(statement.data);
|
14291
|
-
return `DROP INDEX
|
14282
|
+
return `DROP INDEX "${name2}";`;
|
14292
14283
|
}
|
14293
14284
|
};
|
14294
14285
|
PgCreateSchemaConvertor = class extends Convertor {
|
@@ -14359,7 +14350,7 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
|
|
14359
14350
|
}
|
14360
14351
|
convert(statement) {
|
14361
14352
|
const { name: name2 } = PgSquasher.unsquashIdx(statement.data);
|
14362
|
-
return `DROP INDEX
|
14353
|
+
return `DROP INDEX \`${name2}\`;`;
|
14363
14354
|
}
|
14364
14355
|
};
|
14365
14356
|
MySqlDropIndexConvertor = class extends Convertor {
|
@@ -19733,7 +19724,8 @@ var init_common = __esm({
|
|
19733
19724
|
schemaFilter: unionType([stringType(), stringType().array()]).default(["public"]),
|
19734
19725
|
migrations: configMigrations,
|
19735
19726
|
dbCredentials: anyType().optional(),
|
19736
|
-
casing: casingType.optional()
|
19727
|
+
casing: casingType.optional(),
|
19728
|
+
sql: booleanType().default(true)
|
19737
19729
|
}).passthrough();
|
19738
19730
|
casing = unionType([literalType("camel"), literalType("preserve")]).default(
|
19739
19731
|
"camel"
|
@@ -21988,7 +21980,7 @@ var version;
|
|
21988
21980
|
var init_version = __esm({
|
21989
21981
|
"../drizzle-orm/dist/version.js"() {
|
21990
21982
|
"use strict";
|
21991
|
-
version = "0.
|
21983
|
+
version = "0.38.1";
|
21992
21984
|
}
|
21993
21985
|
});
|
21994
21986
|
|
@@ -22173,7 +22165,10 @@ function fillPlaceholders(params, values) {
|
|
22173
22165
|
return p;
|
22174
22166
|
});
|
22175
22167
|
}
|
22176
|
-
|
22168
|
+
function isView(view4) {
|
22169
|
+
return typeof view4 === "object" && view4 !== null && IsDrizzleView in view4;
|
22170
|
+
}
|
22171
|
+
var _a19, FakePrimitiveParam, _a20, StringChunk, _a21, _SQL, SQL, _a22, Name, noopDecoder, noopEncoder, noopMapper, _a23, Param, _a24, Placeholder, IsDrizzleView, _a25, _b10, _c2, View3;
|
22177
22172
|
var init_sql = __esm({
|
22178
22173
|
"../drizzle-orm/dist/sql/sql.js"() {
|
22179
22174
|
"use strict";
|
@@ -22498,11 +22493,14 @@ var init_sql = __esm({
|
|
22498
22493
|
}
|
22499
22494
|
};
|
22500
22495
|
__publicField(Placeholder, _a24, "Placeholder");
|
22501
|
-
|
22496
|
+
IsDrizzleView = Symbol.for("drizzle:IsDrizzleView");
|
22497
|
+
_c2 = entityKind, _b10 = ViewBaseConfig, _a25 = IsDrizzleView;
|
22502
22498
|
View3 = class {
|
22503
22499
|
constructor({ name: name2, schema: schema5, selectedFields, query }) {
|
22504
22500
|
/** @internal */
|
22505
|
-
__publicField(this,
|
22501
|
+
__publicField(this, _b10);
|
22502
|
+
/** @internal */
|
22503
|
+
__publicField(this, _a25, true);
|
22506
22504
|
this[ViewBaseConfig] = {
|
22507
22505
|
name: name2,
|
22508
22506
|
originalName: name2,
|
@@ -22517,7 +22515,7 @@ var init_sql = __esm({
|
|
22517
22515
|
return new SQL([this]);
|
22518
22516
|
}
|
22519
22517
|
};
|
22520
|
-
__publicField(View3,
|
22518
|
+
__publicField(View3, _c2, "View");
|
22521
22519
|
Column2.prototype.getSQL = function() {
|
22522
22520
|
return new SQL([this]);
|
22523
22521
|
};
|
@@ -23038,6 +23036,9 @@ function applyMixins(baseClass, extendedClasses) {
|
|
23038
23036
|
function getTableColumns(table5) {
|
23039
23037
|
return table5[Table2.Symbol.Columns];
|
23040
23038
|
}
|
23039
|
+
function getViewSelectedFields(view4) {
|
23040
|
+
return view4[ViewBaseConfig].selectedFields;
|
23041
|
+
}
|
23041
23042
|
function getTableLikeName(table5) {
|
23042
23043
|
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];
|
23043
23044
|
}
|
@@ -23332,7 +23333,10 @@ var init_char = __esm({
|
|
23332
23333
|
}
|
23333
23334
|
/** @internal */
|
23334
23335
|
build(table5) {
|
23335
|
-
return new PgChar(
|
23336
|
+
return new PgChar(
|
23337
|
+
table5,
|
23338
|
+
this.config
|
23339
|
+
);
|
23336
23340
|
}
|
23337
23341
|
};
|
23338
23342
|
__publicField(PgCharBuilder, _a46, "PgCharBuilder");
|
@@ -24464,7 +24468,10 @@ var init_varchar = __esm({
|
|
24464
24468
|
}
|
24465
24469
|
/** @internal */
|
24466
24470
|
build(table5) {
|
24467
|
-
return new PgVarchar(
|
24471
|
+
return new PgVarchar(
|
24472
|
+
table5,
|
24473
|
+
this.config
|
24474
|
+
);
|
24468
24475
|
}
|
24469
24476
|
};
|
24470
24477
|
__publicField(PgVarcharBuilder, _a105, "PgVarcharBuilder");
|
@@ -24624,7 +24631,10 @@ var init_vector = __esm({
|
|
24624
24631
|
}
|
24625
24632
|
/** @internal */
|
24626
24633
|
build(table5) {
|
24627
|
-
return new PgVector(
|
24634
|
+
return new PgVector(
|
24635
|
+
table5,
|
24636
|
+
this.config
|
24637
|
+
);
|
24628
24638
|
}
|
24629
24639
|
};
|
24630
24640
|
__publicField(PgVectorBuilder, _a113, "PgVectorBuilder");
|
@@ -24756,7 +24766,7 @@ function pgTableWithSchema(name2, columns, extraConfig, schema5, baseName = name
|
|
24756
24766
|
}
|
24757
24767
|
});
|
24758
24768
|
}
|
24759
|
-
var InlineForeignKeys, EnableRLS, _a115, _b94,
|
24769
|
+
var InlineForeignKeys, EnableRLS, _a115, _b94, _c3, _d2, _e2, PgTable, pgTable;
|
24760
24770
|
var init_table2 = __esm({
|
24761
24771
|
"../drizzle-orm/dist/pg-core/table.js"() {
|
24762
24772
|
"use strict";
|
@@ -24765,11 +24775,11 @@ var init_table2 = __esm({
|
|
24765
24775
|
init_all();
|
24766
24776
|
InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
24767
24777
|
EnableRLS = Symbol.for("drizzle:EnableRLS");
|
24768
|
-
PgTable = class extends (_e2 = Table2, _d2 = entityKind,
|
24778
|
+
PgTable = class extends (_e2 = Table2, _d2 = entityKind, _c3 = InlineForeignKeys, _b94 = EnableRLS, _a115 = Table2.Symbol.ExtraConfigBuilder, _e2) {
|
24769
24779
|
constructor() {
|
24770
24780
|
super(...arguments);
|
24771
24781
|
/**@internal */
|
24772
|
-
__publicField(this,
|
24782
|
+
__publicField(this, _c3, []);
|
24773
24783
|
/** @internal */
|
24774
24784
|
__publicField(this, _b94, false);
|
24775
24785
|
/** @internal */
|
@@ -25284,6 +25294,7 @@ __export(dist_exports, {
|
|
25284
25294
|
getTableLikeName: () => getTableLikeName,
|
25285
25295
|
getTableName: () => getTableName,
|
25286
25296
|
getTableUniqueName: () => getTableUniqueName,
|
25297
|
+
getViewSelectedFields: () => getViewSelectedFields,
|
25287
25298
|
gt: () => gt,
|
25288
25299
|
gte: () => gte,
|
25289
25300
|
hammingDistance: () => hammingDistance,
|
@@ -25299,6 +25310,7 @@ __export(dist_exports, {
|
|
25299
25310
|
isNull: () => isNull,
|
25300
25311
|
isSQLWrapper: () => isSQLWrapper,
|
25301
25312
|
isTable: () => isTable,
|
25313
|
+
isView: () => isView,
|
25302
25314
|
jaccardDistance: () => jaccardDistance,
|
25303
25315
|
l1Distance: () => l1Distance,
|
25304
25316
|
l2Distance: () => l2Distance,
|
@@ -28148,13 +28160,13 @@ var init_query_builders = __esm({
|
|
28148
28160
|
});
|
28149
28161
|
|
28150
28162
|
// ../drizzle-orm/dist/pg-core/query-builders/count.js
|
28151
|
-
var _a139, _b104,
|
28163
|
+
var _a139, _b104, _c4, _PgCountBuilder, PgCountBuilder;
|
28152
28164
|
var init_count = __esm({
|
28153
28165
|
"../drizzle-orm/dist/pg-core/query-builders/count.js"() {
|
28154
28166
|
"use strict";
|
28155
28167
|
init_entity();
|
28156
28168
|
init_sql();
|
28157
|
-
_PgCountBuilder = class _PgCountBuilder extends (
|
28169
|
+
_PgCountBuilder = class _PgCountBuilder extends (_c4 = SQL, _b104 = entityKind, _a139 = Symbol.toStringTag, _c4) {
|
28158
28170
|
constructor(params) {
|
28159
28171
|
super(_PgCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
28160
28172
|
__publicField(this, "sql");
|
@@ -28893,7 +28905,7 @@ function isPgView(obj) {
|
|
28893
28905
|
function isPgMaterializedView(obj) {
|
28894
28906
|
return is(obj, PgMaterializedView);
|
28895
28907
|
}
|
28896
|
-
var _a150, DefaultViewBuilderCore, _a151, _b107, ViewBuilder, _a152, _b108, ManualViewBuilder, _a153, MaterializedViewBuilderCore, _a154, _b109, MaterializedViewBuilder, _a155, _b110, ManualMaterializedViewBuilder, _a156, _b111,
|
28908
|
+
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;
|
28897
28909
|
var init_view = __esm({
|
28898
28910
|
"../drizzle-orm/dist/pg-core/view.js"() {
|
28899
28911
|
"use strict";
|
@@ -29103,7 +29115,7 @@ var init_view = __esm({
|
|
29103
29115
|
}
|
29104
29116
|
};
|
29105
29117
|
__publicField(ManualMaterializedViewBuilder, _a155, "PgManualMaterializedViewBuilder");
|
29106
|
-
PgView2 = class extends (
|
29118
|
+
PgView2 = class extends (_c5 = PgViewBase, _b111 = entityKind, _a156 = PgViewConfig, _c5) {
|
29107
29119
|
constructor({ pgConfig, config }) {
|
29108
29120
|
super(config);
|
29109
29121
|
__publicField(this, _a156);
|
@@ -29116,7 +29128,7 @@ var init_view = __esm({
|
|
29116
29128
|
};
|
29117
29129
|
__publicField(PgView2, _b111, "PgView");
|
29118
29130
|
PgMaterializedViewConfig = Symbol.for("drizzle:PgMaterializedViewConfig");
|
29119
|
-
PgMaterializedView = class extends (
|
29131
|
+
PgMaterializedView = class extends (_c6 = PgViewBase, _b112 = entityKind, _a157 = PgMaterializedViewConfig, _c6) {
|
29120
29132
|
constructor({ pgConfig, config }) {
|
29121
29133
|
super(config);
|
29122
29134
|
__publicField(this, _a157);
|
@@ -31664,7 +31676,10 @@ var init_text2 = __esm({
|
|
31664
31676
|
}
|
31665
31677
|
/** @internal */
|
31666
31678
|
build(table5) {
|
31667
|
-
return new SQLiteText(
|
31679
|
+
return new SQLiteText(
|
31680
|
+
table5,
|
31681
|
+
this.config
|
31682
|
+
);
|
31668
31683
|
}
|
31669
31684
|
};
|
31670
31685
|
__publicField(SQLiteTextBuilder, _a191, "SQLiteTextBuilder");
|
@@ -31765,7 +31780,7 @@ function sqliteTableBase(name2, columns, extraConfig, schema5, baseName = name2)
|
|
31765
31780
|
}
|
31766
31781
|
return table5;
|
31767
31782
|
}
|
31768
|
-
var InlineForeignKeys2, _a195, _b140,
|
31783
|
+
var InlineForeignKeys2, _a195, _b140, _c7, _d3, _e3, SQLiteTable, sqliteTable;
|
31769
31784
|
var init_table3 = __esm({
|
31770
31785
|
"../drizzle-orm/dist/sqlite-core/table.js"() {
|
31771
31786
|
"use strict";
|
@@ -31773,11 +31788,11 @@ var init_table3 = __esm({
|
|
31773
31788
|
init_table();
|
31774
31789
|
init_all2();
|
31775
31790
|
InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
31776
|
-
SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind,
|
31791
|
+
SQLiteTable = class extends (_e3 = Table2, _d3 = entityKind, _c7 = Table2.Symbol.Columns, _b140 = InlineForeignKeys2, _a195 = Table2.Symbol.ExtraConfigBuilder, _e3) {
|
31777
31792
|
constructor() {
|
31778
31793
|
super(...arguments);
|
31779
31794
|
/** @internal */
|
31780
|
-
__publicField(this,
|
31795
|
+
__publicField(this, _c7);
|
31781
31796
|
/** @internal */
|
31782
31797
|
__publicField(this, _b140, []);
|
31783
31798
|
/** @internal */
|
@@ -33645,13 +33660,13 @@ var init_query_builders2 = __esm({
|
|
33645
33660
|
});
|
33646
33661
|
|
33647
33662
|
// ../drizzle-orm/dist/sqlite-core/query-builders/count.js
|
33648
|
-
var _a209, _b149,
|
33663
|
+
var _a209, _b149, _c8, _SQLiteCountBuilder, SQLiteCountBuilder;
|
33649
33664
|
var init_count2 = __esm({
|
33650
33665
|
"../drizzle-orm/dist/sqlite-core/query-builders/count.js"() {
|
33651
33666
|
"use strict";
|
33652
33667
|
init_entity();
|
33653
33668
|
init_sql();
|
33654
|
-
_SQLiteCountBuilder = class _SQLiteCountBuilder extends (
|
33669
|
+
_SQLiteCountBuilder = class _SQLiteCountBuilder extends (_c8 = SQL, _b149 = entityKind, _a209 = Symbol.toStringTag, _c8) {
|
33655
33670
|
constructor(params) {
|
33656
33671
|
super(_SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
33657
33672
|
__publicField(this, "sql");
|
@@ -34423,7 +34438,8 @@ function getTableConfig2(table5) {
|
|
34423
34438
|
const extraConfigBuilder = table5[SQLiteTable.Symbol.ExtraConfigBuilder];
|
34424
34439
|
if (extraConfigBuilder !== void 0) {
|
34425
34440
|
const extraConfig = extraConfigBuilder(table5[SQLiteTable.Symbol.Columns]);
|
34426
|
-
|
34441
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
34442
|
+
for (const builder of Object.values(extraValues)) {
|
34427
34443
|
if (is(builder, IndexBuilder2)) {
|
34428
34444
|
indexes.push(builder.build(table5));
|
34429
34445
|
} else if (is(builder, CheckBuilder2)) {
|
@@ -36320,6 +36336,18 @@ function text3(a, b = {}) {
|
|
36320
36336
|
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36321
36337
|
return new MySqlTextBuilder(name2, "text", config);
|
36322
36338
|
}
|
36339
|
+
function tinytext(a, b = {}) {
|
36340
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36341
|
+
return new MySqlTextBuilder(name2, "tinytext", config);
|
36342
|
+
}
|
36343
|
+
function mediumtext(a, b = {}) {
|
36344
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36345
|
+
return new MySqlTextBuilder(name2, "mediumtext", config);
|
36346
|
+
}
|
36347
|
+
function longtext(a, b = {}) {
|
36348
|
+
const { name: name2, config } = getColumnNameAndConfig(a, b);
|
36349
|
+
return new MySqlTextBuilder(name2, "longtext", config);
|
36350
|
+
}
|
36323
36351
|
var _a279, _b202, MySqlTextBuilder, _a280, _b203, MySqlText;
|
36324
36352
|
var init_text3 = __esm({
|
36325
36353
|
"../drizzle-orm/dist/mysql-core/columns/text.js"() {
|
@@ -36679,13 +36707,13 @@ var init_columns3 = __esm({
|
|
36679
36707
|
});
|
36680
36708
|
|
36681
36709
|
// ../drizzle-orm/dist/mysql-core/query-builders/count.js
|
36682
|
-
var _a297, _b220,
|
36710
|
+
var _a297, _b220, _c9, _MySqlCountBuilder, MySqlCountBuilder;
|
36683
36711
|
var init_count3 = __esm({
|
36684
36712
|
"../drizzle-orm/dist/mysql-core/query-builders/count.js"() {
|
36685
36713
|
"use strict";
|
36686
36714
|
init_entity();
|
36687
36715
|
init_sql();
|
36688
|
-
_MySqlCountBuilder = class _MySqlCountBuilder extends (
|
36716
|
+
_MySqlCountBuilder = class _MySqlCountBuilder extends (_c9 = SQL, _b220 = entityKind, _a297 = Symbol.toStringTag, _c9) {
|
36689
36717
|
constructor(params) {
|
36690
36718
|
super(_MySqlCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
36691
36719
|
__publicField(this, "sql");
|
@@ -36861,7 +36889,10 @@ function getMySqlColumnBuilders() {
|
|
36861
36889
|
tinyint,
|
36862
36890
|
varbinary,
|
36863
36891
|
varchar: varchar2,
|
36864
|
-
year
|
36892
|
+
year,
|
36893
|
+
longtext,
|
36894
|
+
mediumtext,
|
36895
|
+
tinytext
|
36865
36896
|
};
|
36866
36897
|
}
|
36867
36898
|
var init_all3 = __esm({
|
@@ -36915,7 +36946,7 @@ function mysqlTableWithSchema(name2, columns, extraConfig, schema5, baseName = n
|
|
36915
36946
|
}
|
36916
36947
|
return table5;
|
36917
36948
|
}
|
36918
|
-
var InlineForeignKeys3, _a299, _b222,
|
36949
|
+
var InlineForeignKeys3, _a299, _b222, _c10, _d4, _e4, MySqlTable, mysqlTable;
|
36919
36950
|
var init_table4 = __esm({
|
36920
36951
|
"../drizzle-orm/dist/mysql-core/table.js"() {
|
36921
36952
|
"use strict";
|
@@ -36923,11 +36954,11 @@ var init_table4 = __esm({
|
|
36923
36954
|
init_table();
|
36924
36955
|
init_all3();
|
36925
36956
|
InlineForeignKeys3 = Symbol.for("drizzle:MySqlInlineForeignKeys");
|
36926
|
-
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind,
|
36957
|
+
MySqlTable = class extends (_e4 = Table2, _d4 = entityKind, _c10 = Table2.Symbol.Columns, _b222 = InlineForeignKeys3, _a299 = Table2.Symbol.ExtraConfigBuilder, _e4) {
|
36927
36958
|
constructor() {
|
36928
36959
|
super(...arguments);
|
36929
36960
|
/** @internal */
|
36930
|
-
__publicField(this,
|
36961
|
+
__publicField(this, _c10);
|
36931
36962
|
/** @internal */
|
36932
36963
|
__publicField(this, _b222, []);
|
36933
36964
|
/** @internal */
|
@@ -39314,7 +39345,7 @@ function mysqlViewWithSchema(name2, selection, schema5) {
|
|
39314
39345
|
}
|
39315
39346
|
return new ViewBuilder3(name2, schema5);
|
39316
39347
|
}
|
39317
|
-
var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231,
|
39348
|
+
var _a318, ViewBuilderCore2, _a319, _b229, ViewBuilder3, _a320, _b230, ManualViewBuilder3, _a321, _b231, _c11, MySqlView2;
|
39318
39349
|
var init_view3 = __esm({
|
39319
39350
|
"../drizzle-orm/dist/mysql-core/view.js"() {
|
39320
39351
|
"use strict";
|
@@ -39419,7 +39450,7 @@ var init_view3 = __esm({
|
|
39419
39450
|
}
|
39420
39451
|
};
|
39421
39452
|
__publicField(ManualViewBuilder3, _a320, "MySqlManualViewBuilder");
|
39422
|
-
MySqlView2 = class extends (
|
39453
|
+
MySqlView2 = class extends (_c11 = MySqlViewBase, _b231 = entityKind, _a321 = MySqlViewConfig, _c11) {
|
39423
39454
|
constructor({ mysqlConfig, config }) {
|
39424
39455
|
super(config);
|
39425
39456
|
__publicField(this, _a321);
|
@@ -39542,7 +39573,8 @@ function getTableConfig3(table5) {
|
|
39542
39573
|
const extraConfigBuilder = table5[MySqlTable.Symbol.ExtraConfigBuilder];
|
39543
39574
|
if (extraConfigBuilder !== void 0) {
|
39544
39575
|
const extraConfig = extraConfigBuilder(table5[MySqlTable.Symbol.Columns]);
|
39545
|
-
|
39576
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
39577
|
+
for (const builder of Object.values(extraValues)) {
|
39546
39578
|
if (is(builder, IndexBuilder3)) {
|
39547
39579
|
indexes.push(builder.build(table5));
|
39548
39580
|
} else if (is(builder, CheckBuilder3)) {
|
@@ -42074,13 +42106,13 @@ var init_columns4 = __esm({
|
|
42074
42106
|
});
|
42075
42107
|
|
42076
42108
|
// ../drizzle-orm/dist/singlestore-core/query-builders/count.js
|
42077
|
-
var _a391, _b295,
|
42109
|
+
var _a391, _b295, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder;
|
42078
42110
|
var init_count4 = __esm({
|
42079
42111
|
"../drizzle-orm/dist/singlestore-core/query-builders/count.js"() {
|
42080
42112
|
"use strict";
|
42081
42113
|
init_entity();
|
42082
42114
|
init_sql();
|
42083
|
-
_SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (
|
42115
|
+
_SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (_c12 = SQL, _b295 = entityKind, _a391 = Symbol.toStringTag, _c12) {
|
42084
42116
|
constructor(params) {
|
42085
42117
|
super(_SingleStoreCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
42086
42118
|
__publicField(this, "sql");
|
@@ -42434,14 +42466,14 @@ function singlestoreTableWithSchema(name2, columns, extraConfig, schema5, baseNa
|
|
42434
42466
|
}
|
42435
42467
|
return table5;
|
42436
42468
|
}
|
42437
|
-
var _a395, _b298,
|
42469
|
+
var _a395, _b298, _c13, _d5, SingleStoreTable;
|
42438
42470
|
var init_table5 = __esm({
|
42439
42471
|
"../drizzle-orm/dist/singlestore-core/table.js"() {
|
42440
42472
|
"use strict";
|
42441
42473
|
init_entity();
|
42442
42474
|
init_table();
|
42443
42475
|
init_all4();
|
42444
|
-
SingleStoreTable = class extends (_d5 = Table2,
|
42476
|
+
SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind, _b298 = Table2.Symbol.Columns, _a395 = Table2.Symbol.ExtraConfigBuilder, _d5) {
|
42445
42477
|
constructor() {
|
42446
42478
|
super(...arguments);
|
42447
42479
|
/** @internal */
|
@@ -42450,7 +42482,7 @@ var init_table5 = __esm({
|
|
42450
42482
|
__publicField(this, _a395);
|
42451
42483
|
}
|
42452
42484
|
};
|
42453
|
-
__publicField(SingleStoreTable,
|
42485
|
+
__publicField(SingleStoreTable, _c13, "SingleStoreTable");
|
42454
42486
|
/** @internal */
|
42455
42487
|
__publicField(SingleStoreTable, "Symbol", Object.assign({}, Table2.Symbol, {}));
|
42456
42488
|
}
|
@@ -44349,7 +44381,8 @@ function getTableConfig4(table5) {
|
|
44349
44381
|
const extraConfigBuilder = table5[SingleStoreTable.Symbol.ExtraConfigBuilder];
|
44350
44382
|
if (extraConfigBuilder !== void 0) {
|
44351
44383
|
const extraConfig = extraConfigBuilder(table5[SingleStoreTable.Symbol.Columns]);
|
44352
|
-
|
44384
|
+
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
|
44385
|
+
for (const builder of Object.values(extraValues)) {
|
44353
44386
|
if (is(builder, IndexBuilder4)) {
|
44354
44387
|
indexes.push(builder.build(table5));
|
44355
44388
|
} else if (is(builder, UniqueConstraintBuilder4)) {
|