drizzle-kit 0.30.1-f6eaa62 → 0.30.2-0350a59

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.
Files changed (4) hide show
  1. package/api.js +156 -85
  2. package/api.mjs +156 -85
  3. package/bin.cjs +29688 -44961
  4. package/package.json +1 -1
package/api.mjs CHANGED
@@ -3474,17 +3474,17 @@ function processCreateParams(params) {
3474
3474
  if (errorMap2)
3475
3475
  return { errorMap: errorMap2, description };
3476
3476
  const customMap = (iss, ctx) => {
3477
- var _a413, _b303;
3477
+ var _a415, _b305;
3478
3478
  const { message } = params;
3479
3479
  if (iss.code === "invalid_enum_value") {
3480
3480
  return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
3481
3481
  }
3482
3482
  if (typeof ctx.data === "undefined") {
3483
- return { message: (_a413 = message !== null && message !== void 0 ? message : required_error) !== null && _a413 !== void 0 ? _a413 : ctx.defaultError };
3483
+ return { message: (_a415 = message !== null && message !== void 0 ? message : required_error) !== null && _a415 !== void 0 ? _a415 : ctx.defaultError };
3484
3484
  }
3485
3485
  if (iss.code !== "invalid_type")
3486
3486
  return { message: ctx.defaultError };
3487
- return { message: (_b303 = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b303 !== void 0 ? _b303 : ctx.defaultError };
3487
+ return { message: (_b305 = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b305 !== void 0 ? _b305 : ctx.defaultError };
3488
3488
  };
3489
3489
  return { errorMap: customMap, description };
3490
3490
  }
@@ -4146,11 +4146,11 @@ var init_lib = __esm({
4146
4146
  throw result.error;
4147
4147
  }
4148
4148
  safeParse(data, params) {
4149
- var _a413;
4149
+ var _a415;
4150
4150
  const ctx = {
4151
4151
  common: {
4152
4152
  issues: [],
4153
- async: (_a413 = params === null || params === void 0 ? void 0 : params.async) !== null && _a413 !== void 0 ? _a413 : false,
4153
+ async: (_a415 = params === null || params === void 0 ? void 0 : params.async) !== null && _a415 !== void 0 ? _a415 : false,
4154
4154
  contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
4155
4155
  },
4156
4156
  path: (params === null || params === void 0 ? void 0 : params.path) || [],
@@ -4472,7 +4472,7 @@ var init_lib = __esm({
4472
4472
  } else if (check.kind === "url") {
4473
4473
  try {
4474
4474
  new URL(input.data);
4475
- } catch (_a413) {
4475
+ } catch (_a415) {
4476
4476
  ctx = this._getOrReturnCtx(input, ctx);
4477
4477
  addIssueToContext(ctx, {
4478
4478
  validation: "url",
@@ -4642,7 +4642,7 @@ var init_lib = __esm({
4642
4642
  return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
4643
4643
  }
4644
4644
  datetime(options) {
4645
- var _a413, _b303;
4645
+ var _a415, _b305;
4646
4646
  if (typeof options === "string") {
4647
4647
  return this._addCheck({
4648
4648
  kind: "datetime",
@@ -4655,8 +4655,8 @@ var init_lib = __esm({
4655
4655
  return this._addCheck({
4656
4656
  kind: "datetime",
4657
4657
  precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
4658
- offset: (_a413 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a413 !== void 0 ? _a413 : false,
4659
- local: (_b303 = options === null || options === void 0 ? void 0 : options.local) !== null && _b303 !== void 0 ? _b303 : false,
4658
+ offset: (_a415 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a415 !== void 0 ? _a415 : false,
4659
+ local: (_b305 = options === null || options === void 0 ? void 0 : options.local) !== null && _b305 !== void 0 ? _b305 : false,
4660
4660
  ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
4661
4661
  });
4662
4662
  }
@@ -4819,11 +4819,11 @@ var init_lib = __esm({
4819
4819
  }
4820
4820
  };
4821
4821
  ZodString.create = (params) => {
4822
- var _a413;
4822
+ var _a415;
4823
4823
  return new ZodString({
4824
4824
  checks: [],
4825
4825
  typeName: ZodFirstPartyTypeKind.ZodString,
4826
- coerce: (_a413 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a413 !== void 0 ? _a413 : false,
4826
+ coerce: (_a415 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a415 !== void 0 ? _a415 : false,
4827
4827
  ...processCreateParams(params)
4828
4828
  });
4829
4829
  };
@@ -5216,11 +5216,11 @@ var init_lib = __esm({
5216
5216
  }
5217
5217
  };
5218
5218
  ZodBigInt.create = (params) => {
5219
- var _a413;
5219
+ var _a415;
5220
5220
  return new ZodBigInt({
5221
5221
  checks: [],
5222
5222
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
5223
- coerce: (_a413 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a413 !== void 0 ? _a413 : false,
5223
+ coerce: (_a415 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a415 !== void 0 ? _a415 : false,
5224
5224
  ...processCreateParams(params)
5225
5225
  });
5226
5226
  };
@@ -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, _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;
5703
+ var _a415, _b305, _c14, _d6;
5704
+ const defaultError = (_c14 = (_b305 = (_a415 = this._def).errorMap) === null || _b305 === void 0 ? void 0 : _b305.call(_a415, 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
@@ -14278,8 +14278,10 @@ ${BREAKPOINT}ALTER TABLE ${tableNameWithSchema} ADD CONSTRAINT "${statement.newC
14278
14278
  return statement.type === "drop_index" && dialect6 === "postgresql";
14279
14279
  }
14280
14280
  convert(statement) {
14281
+ const { schema: schema5 } = statement;
14281
14282
  const { name: name2 } = PgSquasher.unsquashIdx(statement.data);
14282
- return `DROP INDEX "${name2}";`;
14283
+ const indexNameWithSchema = schema5 ? `"${schema5}"."${name2}"` : `"${name2}"`;
14284
+ return `DROP INDEX ${indexNameWithSchema};`;
14283
14285
  }
14284
14286
  };
14285
14287
  PgCreateSchemaConvertor = class extends Convertor {
@@ -21980,7 +21982,7 @@ var version;
21980
21982
  var init_version = __esm({
21981
21983
  "../drizzle-orm/dist/version.js"() {
21982
21984
  "use strict";
21983
- version = "0.38.2";
21985
+ version = "0.38.4";
21984
21986
  }
21985
21987
  });
21986
21988
 
@@ -22462,8 +22464,8 @@ var init_sql = __esm({
22462
22464
  sql2.param = param2;
22463
22465
  })(sql || (sql = {}));
22464
22466
  ((SQL2) => {
22465
- var _a413;
22466
- _a413 = entityKind;
22467
+ var _a415;
22468
+ _a415 = entityKind;
22467
22469
  const _Aliased = class _Aliased {
22468
22470
  constructor(sql2, fieldAlias) {
22469
22471
  /** @internal */
@@ -22479,7 +22481,7 @@ var init_sql = __esm({
22479
22481
  return new _Aliased(this.sql, this.fieldAlias);
22480
22482
  }
22481
22483
  };
22482
- __publicField(_Aliased, _a413, "SQL.Aliased");
22484
+ __publicField(_Aliased, _a415, "SQL.Aliased");
22483
22485
  let Aliased = _Aliased;
22484
22486
  SQL2.Aliased = Aliased;
22485
22487
  })(SQL || (SQL = {}));
@@ -41850,6 +41852,18 @@ function text4(a, b = {}) {
41850
41852
  const { name: name2, config } = getColumnNameAndConfig(a, b);
41851
41853
  return new SingleStoreTextBuilder(name2, "text", config);
41852
41854
  }
41855
+ function tinytext2(a, b = {}) {
41856
+ const { name: name2, config } = getColumnNameAndConfig(a, b);
41857
+ return new SingleStoreTextBuilder(name2, "tinytext", config);
41858
+ }
41859
+ function mediumtext2(a, b = {}) {
41860
+ const { name: name2, config } = getColumnNameAndConfig(a, b);
41861
+ return new SingleStoreTextBuilder(name2, "mediumtext", config);
41862
+ }
41863
+ function longtext2(a, b = {}) {
41864
+ const { name: name2, config } = getColumnNameAndConfig(a, b);
41865
+ return new SingleStoreTextBuilder(name2, "longtext", config);
41866
+ }
41853
41867
  var _a373, _b277, SingleStoreTextBuilder, _a374, _b278, SingleStoreText;
41854
41868
  var init_text4 = __esm({
41855
41869
  "../drizzle-orm/dist/singlestore-core/columns/text.js"() {
@@ -42139,17 +42153,68 @@ var init_varchar3 = __esm({
42139
42153
  }
42140
42154
  });
42141
42155
 
42156
+ // ../drizzle-orm/dist/singlestore-core/columns/vector.js
42157
+ function vector2(a, b) {
42158
+ const { name: name2, config } = getColumnNameAndConfig(a, b);
42159
+ return new SingleStoreVectorBuilder(name2, config);
42160
+ }
42161
+ var _a389, _b293, SingleStoreVectorBuilder, _a390, _b294, SingleStoreVector;
42162
+ var init_vector4 = __esm({
42163
+ "../drizzle-orm/dist/singlestore-core/columns/vector.js"() {
42164
+ "use strict";
42165
+ init_entity();
42166
+ init_utils2();
42167
+ init_common5();
42168
+ SingleStoreVectorBuilder = class extends (_b293 = SingleStoreColumnBuilder, _a389 = entityKind, _b293) {
42169
+ constructor(name2, config) {
42170
+ super(name2, "array", "SingleStoreVector");
42171
+ this.config.dimensions = config.dimensions;
42172
+ this.config.elementType = config.elementType;
42173
+ }
42174
+ /** @internal */
42175
+ build(table5) {
42176
+ return new SingleStoreVector(
42177
+ table5,
42178
+ this.config
42179
+ );
42180
+ }
42181
+ /** @internal */
42182
+ generatedAlwaysAs(as, config) {
42183
+ throw new Error("not implemented");
42184
+ }
42185
+ };
42186
+ __publicField(SingleStoreVectorBuilder, _a389, "SingleStoreVectorBuilder");
42187
+ SingleStoreVector = class extends (_b294 = SingleStoreColumn, _a390 = entityKind, _b294) {
42188
+ constructor() {
42189
+ super(...arguments);
42190
+ __publicField(this, "dimensions", this.config.dimensions);
42191
+ __publicField(this, "elementType", this.config.elementType);
42192
+ }
42193
+ getSQLType() {
42194
+ return `vector(${this.dimensions}, ${this.elementType || "F32"})`;
42195
+ }
42196
+ mapToDriverValue(value) {
42197
+ return JSON.stringify(value);
42198
+ }
42199
+ mapFromDriverValue(value) {
42200
+ return JSON.parse(value);
42201
+ }
42202
+ };
42203
+ __publicField(SingleStoreVector, _a390, "SingleStoreVector");
42204
+ }
42205
+ });
42206
+
42142
42207
  // ../drizzle-orm/dist/singlestore-core/columns/year.js
42143
42208
  function year2(name2) {
42144
42209
  return new SingleStoreYearBuilder(name2 ?? "");
42145
42210
  }
42146
- var _a389, _b293, SingleStoreYearBuilder, _a390, _b294, SingleStoreYear;
42211
+ var _a391, _b295, SingleStoreYearBuilder, _a392, _b296, SingleStoreYear;
42147
42212
  var init_year2 = __esm({
42148
42213
  "../drizzle-orm/dist/singlestore-core/columns/year.js"() {
42149
42214
  "use strict";
42150
42215
  init_entity();
42151
42216
  init_common5();
42152
- SingleStoreYearBuilder = class extends (_b293 = SingleStoreColumnBuilder, _a389 = entityKind, _b293) {
42217
+ SingleStoreYearBuilder = class extends (_b295 = SingleStoreColumnBuilder, _a391 = entityKind, _b295) {
42153
42218
  constructor(name2) {
42154
42219
  super(name2, "number", "SingleStoreYear");
42155
42220
  }
@@ -42161,13 +42226,13 @@ var init_year2 = __esm({
42161
42226
  );
42162
42227
  }
42163
42228
  };
42164
- __publicField(SingleStoreYearBuilder, _a389, "SingleStoreYearBuilder");
42165
- SingleStoreYear = class extends (_b294 = SingleStoreColumn, _a390 = entityKind, _b294) {
42229
+ __publicField(SingleStoreYearBuilder, _a391, "SingleStoreYearBuilder");
42230
+ SingleStoreYear = class extends (_b296 = SingleStoreColumn, _a392 = entityKind, _b296) {
42166
42231
  getSQLType() {
42167
42232
  return `year`;
42168
42233
  }
42169
42234
  };
42170
- __publicField(SingleStoreYear, _a390, "SingleStoreYear");
42235
+ __publicField(SingleStoreYear, _a392, "SingleStoreYear");
42171
42236
  }
42172
42237
  });
42173
42238
 
@@ -42199,22 +42264,23 @@ var init_columns4 = __esm({
42199
42264
  init_tinyint2();
42200
42265
  init_varbinary2();
42201
42266
  init_varchar3();
42267
+ init_vector4();
42202
42268
  init_year2();
42203
42269
  }
42204
42270
  });
42205
42271
 
42206
42272
  // ../drizzle-orm/dist/singlestore-core/query-builders/count.js
42207
- var _a391, _b295, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder;
42273
+ var _a393, _b297, _c12, _SingleStoreCountBuilder, SingleStoreCountBuilder;
42208
42274
  var init_count4 = __esm({
42209
42275
  "../drizzle-orm/dist/singlestore-core/query-builders/count.js"() {
42210
42276
  "use strict";
42211
42277
  init_entity();
42212
42278
  init_sql();
42213
- _SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (_c12 = SQL, _b295 = entityKind, _a391 = Symbol.toStringTag, _c12) {
42279
+ _SingleStoreCountBuilder = class _SingleStoreCountBuilder extends (_c12 = SQL, _b297 = entityKind, _a393 = Symbol.toStringTag, _c12) {
42214
42280
  constructor(params) {
42215
42281
  super(_SingleStoreCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
42216
42282
  __publicField(this, "sql");
42217
- __publicField(this, _a391, "SingleStoreCountBuilder");
42283
+ __publicField(this, _a393, "SingleStoreCountBuilder");
42218
42284
  __publicField(this, "session");
42219
42285
  this.params = params;
42220
42286
  this.mapWith(Number);
@@ -42252,13 +42318,13 @@ var init_count4 = __esm({
42252
42318
  );
42253
42319
  }
42254
42320
  };
42255
- __publicField(_SingleStoreCountBuilder, _b295, "SingleStoreCountBuilder");
42321
+ __publicField(_SingleStoreCountBuilder, _b297, "SingleStoreCountBuilder");
42256
42322
  SingleStoreCountBuilder = _SingleStoreCountBuilder;
42257
42323
  }
42258
42324
  });
42259
42325
 
42260
42326
  // ../drizzle-orm/dist/singlestore-core/query-builders/delete.js
42261
- var _a392, _b296, SingleStoreDeleteBase;
42327
+ var _a394, _b298, SingleStoreDeleteBase;
42262
42328
  var init_delete4 = __esm({
42263
42329
  "../drizzle-orm/dist/singlestore-core/query-builders/delete.js"() {
42264
42330
  "use strict";
@@ -42266,7 +42332,7 @@ var init_delete4 = __esm({
42266
42332
  init_query_promise();
42267
42333
  init_selection_proxy();
42268
42334
  init_table();
42269
- SingleStoreDeleteBase = class extends (_b296 = QueryPromise, _a392 = entityKind, _b296) {
42335
+ SingleStoreDeleteBase = class extends (_b298 = QueryPromise, _a394 = entityKind, _b298) {
42270
42336
  constructor(table5, session, dialect6, withList) {
42271
42337
  super();
42272
42338
  __publicField(this, "config");
@@ -42356,12 +42422,12 @@ var init_delete4 = __esm({
42356
42422
  return this;
42357
42423
  }
42358
42424
  };
42359
- __publicField(SingleStoreDeleteBase, _a392, "SingleStoreDelete");
42425
+ __publicField(SingleStoreDeleteBase, _a394, "SingleStoreDelete");
42360
42426
  }
42361
42427
  });
42362
42428
 
42363
42429
  // ../drizzle-orm/dist/singlestore-core/query-builders/insert.js
42364
- var _a393, SingleStoreInsertBuilder, _a394, _b297, SingleStoreInsertBase;
42430
+ var _a395, SingleStoreInsertBuilder, _a396, _b299, SingleStoreInsertBase;
42365
42431
  var init_insert4 = __esm({
42366
42432
  "../drizzle-orm/dist/singlestore-core/query-builders/insert.js"() {
42367
42433
  "use strict";
@@ -42370,7 +42436,7 @@ var init_insert4 = __esm({
42370
42436
  init_sql();
42371
42437
  init_table();
42372
42438
  init_utils2();
42373
- _a393 = entityKind;
42439
+ _a395 = entityKind;
42374
42440
  SingleStoreInsertBuilder = class {
42375
42441
  constructor(table5, session, dialect6) {
42376
42442
  __publicField(this, "shouldIgnore", false);
@@ -42399,8 +42465,8 @@ var init_insert4 = __esm({
42399
42465
  return new SingleStoreInsertBase(this.table, mappedValues, this.shouldIgnore, this.session, this.dialect);
42400
42466
  }
42401
42467
  };
42402
- __publicField(SingleStoreInsertBuilder, _a393, "SingleStoreInsertBuilder");
42403
- SingleStoreInsertBase = class extends (_b297 = QueryPromise, _a394 = entityKind, _b297) {
42468
+ __publicField(SingleStoreInsertBuilder, _a395, "SingleStoreInsertBuilder");
42469
+ SingleStoreInsertBase = class extends (_b299 = QueryPromise, _a396 = entityKind, _b299) {
42404
42470
  constructor(table5, values, ignore, session, dialect6) {
42405
42471
  super();
42406
42472
  __publicField(this, "config");
@@ -42481,7 +42547,7 @@ var init_insert4 = __esm({
42481
42547
  return this;
42482
42548
  }
42483
42549
  };
42484
- __publicField(SingleStoreInsertBase, _a394, "SingleStoreInsert");
42550
+ __publicField(SingleStoreInsertBase, _a396, "SingleStoreInsert");
42485
42551
  }
42486
42552
  });
42487
42553
 
@@ -42505,12 +42571,16 @@ function getSingleStoreColumnBuilders() {
42505
42571
  real: real4,
42506
42572
  serial: serial3,
42507
42573
  smallint: smallint3,
42574
+ longtext: longtext2,
42575
+ mediumtext: mediumtext2,
42508
42576
  text: text4,
42577
+ tinytext: tinytext2,
42509
42578
  time: time3,
42510
42579
  timestamp: timestamp3,
42511
42580
  tinyint: tinyint2,
42512
42581
  varbinary: varbinary2,
42513
42582
  varchar: varchar3,
42583
+ vector: vector2,
42514
42584
  year: year2
42515
42585
  };
42516
42586
  }
@@ -42540,6 +42610,7 @@ var init_all4 = __esm({
42540
42610
  init_tinyint2();
42541
42611
  init_varbinary2();
42542
42612
  init_varchar3();
42613
+ init_vector4();
42543
42614
  init_year2();
42544
42615
  }
42545
42616
  });
@@ -42564,20 +42635,20 @@ function singlestoreTableWithSchema(name2, columns, extraConfig, schema5, baseNa
42564
42635
  }
42565
42636
  return table5;
42566
42637
  }
42567
- var _a395, _b298, _c13, _d5, SingleStoreTable;
42638
+ var _a397, _b300, _c13, _d5, SingleStoreTable;
42568
42639
  var init_table5 = __esm({
42569
42640
  "../drizzle-orm/dist/singlestore-core/table.js"() {
42570
42641
  "use strict";
42571
42642
  init_entity();
42572
42643
  init_table();
42573
42644
  init_all4();
42574
- SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind, _b298 = Table2.Symbol.Columns, _a395 = Table2.Symbol.ExtraConfigBuilder, _d5) {
42645
+ SingleStoreTable = class extends (_d5 = Table2, _c13 = entityKind, _b300 = Table2.Symbol.Columns, _a397 = Table2.Symbol.ExtraConfigBuilder, _d5) {
42575
42646
  constructor() {
42576
42647
  super(...arguments);
42577
42648
  /** @internal */
42578
- __publicField(this, _b298);
42649
+ __publicField(this, _b300);
42579
42650
  /** @internal */
42580
- __publicField(this, _a395);
42651
+ __publicField(this, _a397);
42581
42652
  }
42582
42653
  };
42583
42654
  __publicField(SingleStoreTable, _c13, "SingleStoreTable");
@@ -42587,7 +42658,7 @@ var init_table5 = __esm({
42587
42658
  });
42588
42659
 
42589
42660
  // ../drizzle-orm/dist/singlestore-core/dialect.js
42590
- var _a396, SingleStoreDialect;
42661
+ var _a398, SingleStoreDialect;
42591
42662
  var init_dialect4 = __esm({
42592
42663
  "../drizzle-orm/dist/singlestore-core/dialect.js"() {
42593
42664
  "use strict";
@@ -42605,7 +42676,7 @@ var init_dialect4 = __esm({
42605
42676
  init_view_common();
42606
42677
  init_common5();
42607
42678
  init_table5();
42608
- _a396 = entityKind;
42679
+ _a398 = entityKind;
42609
42680
  SingleStoreDialect = class {
42610
42681
  constructor(config) {
42611
42682
  /** @internal */
@@ -43170,7 +43241,7 @@ var init_dialect4 = __esm({
43170
43241
  };
43171
43242
  }
43172
43243
  };
43173
- __publicField(SingleStoreDialect, _a396, "SingleStoreDialect");
43244
+ __publicField(SingleStoreDialect, _a398, "SingleStoreDialect");
43174
43245
  }
43175
43246
  });
43176
43247
 
@@ -43192,7 +43263,7 @@ function createSetOperator4(type, isAll) {
43192
43263
  return leftSelect.addSetOperators(setOperators);
43193
43264
  };
43194
43265
  }
43195
- var _a397, SingleStoreSelectBuilder, _a398, _b299, SingleStoreSelectQueryBuilderBase, _a399, _b300, SingleStoreSelectBase, getSingleStoreSetOperators, union4, unionAll4, intersect4, except4, minus;
43266
+ var _a399, SingleStoreSelectBuilder, _a400, _b301, SingleStoreSelectQueryBuilderBase, _a401, _b302, SingleStoreSelectBase, getSingleStoreSetOperators, union4, unionAll4, intersect4, except4, minus;
43196
43267
  var init_select5 = __esm({
43197
43268
  "../drizzle-orm/dist/singlestore-core/query-builders/select.js"() {
43198
43269
  "use strict";
@@ -43204,7 +43275,7 @@ var init_select5 = __esm({
43204
43275
  init_subquery();
43205
43276
  init_table();
43206
43277
  init_utils2();
43207
- _a397 = entityKind;
43278
+ _a399 = entityKind;
43208
43279
  SingleStoreSelectBuilder = class {
43209
43280
  constructor(config) {
43210
43281
  __publicField(this, "fields");
@@ -43247,8 +43318,8 @@ var init_select5 = __esm({
43247
43318
  );
43248
43319
  }
43249
43320
  };
43250
- __publicField(SingleStoreSelectBuilder, _a397, "SingleStoreSelectBuilder");
43251
- SingleStoreSelectQueryBuilderBase = class extends (_b299 = TypedQueryBuilder, _a398 = entityKind, _b299) {
43321
+ __publicField(SingleStoreSelectBuilder, _a399, "SingleStoreSelectBuilder");
43322
+ SingleStoreSelectQueryBuilderBase = class extends (_b301 = TypedQueryBuilder, _a400 = entityKind, _b301) {
43252
43323
  constructor({ table: table5, fields, isPartialSelect, session, dialect: dialect6, withList, distinct }) {
43253
43324
  super();
43254
43325
  __publicField(this, "_");
@@ -43789,8 +43860,8 @@ var init_select5 = __esm({
43789
43860
  return this;
43790
43861
  }
43791
43862
  };
43792
- __publicField(SingleStoreSelectQueryBuilderBase, _a398, "SingleStoreSelectQueryBuilder");
43793
- SingleStoreSelectBase = class extends (_b300 = SingleStoreSelectQueryBuilderBase, _a399 = entityKind, _b300) {
43863
+ __publicField(SingleStoreSelectQueryBuilderBase, _a400, "SingleStoreSelectQueryBuilder");
43864
+ SingleStoreSelectBase = class extends (_b302 = SingleStoreSelectQueryBuilderBase, _a401 = entityKind, _b302) {
43794
43865
  constructor() {
43795
43866
  super(...arguments);
43796
43867
  __publicField(this, "execute", (placeholderValues) => {
@@ -43814,7 +43885,7 @@ var init_select5 = __esm({
43814
43885
  return query;
43815
43886
  }
43816
43887
  };
43817
- __publicField(SingleStoreSelectBase, _a399, "SingleStoreSelect");
43888
+ __publicField(SingleStoreSelectBase, _a401, "SingleStoreSelect");
43818
43889
  applyMixins(SingleStoreSelectBase, [QueryPromise]);
43819
43890
  getSingleStoreSetOperators = () => ({
43820
43891
  union: union4,
@@ -43832,7 +43903,7 @@ var init_select5 = __esm({
43832
43903
  });
43833
43904
 
43834
43905
  // ../drizzle-orm/dist/singlestore-core/query-builders/query-builder.js
43835
- var _a400, QueryBuilder4;
43906
+ var _a402, QueryBuilder4;
43836
43907
  var init_query_builder5 = __esm({
43837
43908
  "../drizzle-orm/dist/singlestore-core/query-builders/query-builder.js"() {
43838
43909
  "use strict";
@@ -43841,7 +43912,7 @@ var init_query_builder5 = __esm({
43841
43912
  init_dialect4();
43842
43913
  init_subquery();
43843
43914
  init_select5();
43844
- _a400 = entityKind;
43915
+ _a402 = entityKind;
43845
43916
  QueryBuilder4 = class {
43846
43917
  constructor(dialect6) {
43847
43918
  __publicField(this, "dialect");
@@ -43907,7 +43978,7 @@ var init_query_builder5 = __esm({
43907
43978
  return this.dialect;
43908
43979
  }
43909
43980
  };
43910
- __publicField(QueryBuilder4, _a400, "SingleStoreQueryBuilder");
43981
+ __publicField(QueryBuilder4, _a402, "SingleStoreQueryBuilder");
43911
43982
  }
43912
43983
  });
43913
43984
 
@@ -43919,7 +43990,7 @@ var init_select_types4 = __esm({
43919
43990
  });
43920
43991
 
43921
43992
  // ../drizzle-orm/dist/singlestore-core/query-builders/update.js
43922
- var _a401, SingleStoreUpdateBuilder, _a402, _b301, SingleStoreUpdateBase;
43993
+ var _a403, SingleStoreUpdateBuilder, _a404, _b303, SingleStoreUpdateBase;
43923
43994
  var init_update4 = __esm({
43924
43995
  "../drizzle-orm/dist/singlestore-core/query-builders/update.js"() {
43925
43996
  "use strict";
@@ -43928,7 +43999,7 @@ var init_update4 = __esm({
43928
43999
  init_selection_proxy();
43929
44000
  init_table();
43930
44001
  init_utils2();
43931
- _a401 = entityKind;
44002
+ _a403 = entityKind;
43932
44003
  SingleStoreUpdateBuilder = class {
43933
44004
  constructor(table5, session, dialect6, withList) {
43934
44005
  this.table = table5;
@@ -43946,8 +44017,8 @@ var init_update4 = __esm({
43946
44017
  );
43947
44018
  }
43948
44019
  };
43949
- __publicField(SingleStoreUpdateBuilder, _a401, "SingleStoreUpdateBuilder");
43950
- SingleStoreUpdateBase = class extends (_b301 = QueryPromise, _a402 = entityKind, _b301) {
44020
+ __publicField(SingleStoreUpdateBuilder, _a403, "SingleStoreUpdateBuilder");
44021
+ SingleStoreUpdateBase = class extends (_b303 = QueryPromise, _a404 = entityKind, _b303) {
43951
44022
  constructor(table5, set, session, dialect6, withList) {
43952
44023
  super();
43953
44024
  __publicField(this, "config");
@@ -44040,7 +44111,7 @@ var init_update4 = __esm({
44040
44111
  return this;
44041
44112
  }
44042
44113
  };
44043
- __publicField(SingleStoreUpdateBase, _a402, "SingleStoreUpdate");
44114
+ __publicField(SingleStoreUpdateBase, _a404, "SingleStoreUpdate");
44044
44115
  }
44045
44116
  });
44046
44117
 
@@ -44058,7 +44129,7 @@ var init_query_builders4 = __esm({
44058
44129
  });
44059
44130
 
44060
44131
  // ../drizzle-orm/dist/singlestore-core/db.js
44061
- var _a403, SingleStoreDatabase;
44132
+ var _a405, SingleStoreDatabase;
44062
44133
  var init_db4 = __esm({
44063
44134
  "../drizzle-orm/dist/singlestore-core/db.js"() {
44064
44135
  "use strict";
@@ -44068,7 +44139,7 @@ var init_db4 = __esm({
44068
44139
  init_subquery();
44069
44140
  init_count4();
44070
44141
  init_query_builders4();
44071
- _a403 = entityKind;
44142
+ _a405 = entityKind;
44072
44143
  SingleStoreDatabase = class {
44073
44144
  constructor(dialect6, session, schema5) {
44074
44145
  // We are waiting for SingleStore support for `json_array` function
@@ -44268,17 +44339,17 @@ var init_db4 = __esm({
44268
44339
  return this.session.transaction(transaction, config);
44269
44340
  }
44270
44341
  };
44271
- __publicField(SingleStoreDatabase, _a403, "SingleStoreDatabase");
44342
+ __publicField(SingleStoreDatabase, _a405, "SingleStoreDatabase");
44272
44343
  }
44273
44344
  });
44274
44345
 
44275
44346
  // ../drizzle-orm/dist/singlestore-core/indexes.js
44276
- var _a404, IndexBuilderOn4, _a405, IndexBuilder4, _a406, Index6;
44347
+ var _a406, IndexBuilderOn4, _a407, IndexBuilder4, _a408, Index6;
44277
44348
  var init_indexes4 = __esm({
44278
44349
  "../drizzle-orm/dist/singlestore-core/indexes.js"() {
44279
44350
  "use strict";
44280
44351
  init_entity();
44281
- _a404 = entityKind;
44352
+ _a406 = entityKind;
44282
44353
  IndexBuilderOn4 = class {
44283
44354
  constructor(name2, unique) {
44284
44355
  this.name = name2;
@@ -44288,8 +44359,8 @@ var init_indexes4 = __esm({
44288
44359
  return new IndexBuilder4(this.name, columns, this.unique);
44289
44360
  }
44290
44361
  };
44291
- __publicField(IndexBuilderOn4, _a404, "SingleStoreIndexBuilderOn");
44292
- _a405 = entityKind;
44362
+ __publicField(IndexBuilderOn4, _a406, "SingleStoreIndexBuilderOn");
44363
+ _a407 = entityKind;
44293
44364
  IndexBuilder4 = class {
44294
44365
  constructor(name2, columns, unique) {
44295
44366
  /** @internal */
@@ -44317,26 +44388,26 @@ var init_indexes4 = __esm({
44317
44388
  return new Index6(this.config, table5);
44318
44389
  }
44319
44390
  };
44320
- __publicField(IndexBuilder4, _a405, "SingleStoreIndexBuilder");
44321
- _a406 = entityKind;
44391
+ __publicField(IndexBuilder4, _a407, "SingleStoreIndexBuilder");
44392
+ _a408 = entityKind;
44322
44393
  Index6 = class {
44323
44394
  constructor(config, table5) {
44324
44395
  __publicField(this, "config");
44325
44396
  this.config = { ...config, table: table5 };
44326
44397
  }
44327
44398
  };
44328
- __publicField(Index6, _a406, "SingleStoreIndex");
44399
+ __publicField(Index6, _a408, "SingleStoreIndex");
44329
44400
  }
44330
44401
  });
44331
44402
 
44332
44403
  // ../drizzle-orm/dist/singlestore-core/primary-keys.js
44333
- var _a407, PrimaryKeyBuilder4, _a408, PrimaryKey4;
44404
+ var _a409, PrimaryKeyBuilder4, _a410, PrimaryKey4;
44334
44405
  var init_primary_keys4 = __esm({
44335
44406
  "../drizzle-orm/dist/singlestore-core/primary-keys.js"() {
44336
44407
  "use strict";
44337
44408
  init_entity();
44338
44409
  init_table5();
44339
- _a407 = entityKind;
44410
+ _a409 = entityKind;
44340
44411
  PrimaryKeyBuilder4 = class {
44341
44412
  constructor(columns, name2) {
44342
44413
  /** @internal */
@@ -44351,8 +44422,8 @@ var init_primary_keys4 = __esm({
44351
44422
  return new PrimaryKey4(table5, this.columns, this.name);
44352
44423
  }
44353
44424
  };
44354
- __publicField(PrimaryKeyBuilder4, _a407, "SingleStorePrimaryKeyBuilder");
44355
- _a408 = entityKind;
44425
+ __publicField(PrimaryKeyBuilder4, _a409, "SingleStorePrimaryKeyBuilder");
44426
+ _a410 = entityKind;
44356
44427
  PrimaryKey4 = class {
44357
44428
  constructor(table5, columns, name2) {
44358
44429
  __publicField(this, "columns");
@@ -44365,18 +44436,18 @@ var init_primary_keys4 = __esm({
44365
44436
  return this.name ?? `${this.table[SingleStoreTable.Symbol.Name]}_${this.columns.map((column5) => column5.name).join("_")}_pk`;
44366
44437
  }
44367
44438
  };
44368
- __publicField(PrimaryKey4, _a408, "SingleStorePrimaryKey");
44439
+ __publicField(PrimaryKey4, _a410, "SingleStorePrimaryKey");
44369
44440
  }
44370
44441
  });
44371
44442
 
44372
44443
  // ../drizzle-orm/dist/singlestore-core/schema.js
44373
- var _a409, SingleStoreSchema5;
44444
+ var _a411, SingleStoreSchema5;
44374
44445
  var init_schema3 = __esm({
44375
44446
  "../drizzle-orm/dist/singlestore-core/schema.js"() {
44376
44447
  "use strict";
44377
44448
  init_entity();
44378
44449
  init_table5();
44379
- _a409 = entityKind;
44450
+ _a411 = entityKind;
44380
44451
  SingleStoreSchema5 = class {
44381
44452
  constructor(schemaName) {
44382
44453
  __publicField(this, "table", (name2, columns, extraConfig) => {
@@ -44389,12 +44460,12 @@ var init_schema3 = __esm({
44389
44460
  return singlestoreViewWithSchema(name, columns, this.schemaName);
44390
44461
  }) as typeof singlestoreView; */
44391
44462
  };
44392
- __publicField(SingleStoreSchema5, _a409, "SingleStoreSchema");
44463
+ __publicField(SingleStoreSchema5, _a411, "SingleStoreSchema");
44393
44464
  }
44394
44465
  });
44395
44466
 
44396
44467
  // ../drizzle-orm/dist/singlestore-core/session.js
44397
- var _a410, SingleStorePreparedQuery, _a411, SingleStoreSession, _a412, _b302, SingleStoreTransaction;
44468
+ var _a412, SingleStorePreparedQuery, _a413, SingleStoreSession, _a414, _b304, SingleStoreTransaction;
44398
44469
  var init_session4 = __esm({
44399
44470
  "../drizzle-orm/dist/singlestore-core/session.js"() {
44400
44471
  "use strict";
@@ -44402,15 +44473,15 @@ var init_session4 = __esm({
44402
44473
  init_errors();
44403
44474
  init_sql();
44404
44475
  init_db4();
44405
- _a410 = entityKind;
44476
+ _a412 = entityKind;
44406
44477
  SingleStorePreparedQuery = class {
44407
44478
  constructor() {
44408
44479
  /** @internal */
44409
44480
  __publicField(this, "joinsNotNullableMap");
44410
44481
  }
44411
44482
  };
44412
- __publicField(SingleStorePreparedQuery, _a410, "SingleStorePreparedQuery");
44413
- _a411 = entityKind;
44483
+ __publicField(SingleStorePreparedQuery, _a412, "SingleStorePreparedQuery");
44484
+ _a413 = entityKind;
44414
44485
  SingleStoreSession = class {
44415
44486
  constructor(dialect6) {
44416
44487
  this.dialect = dialect6;
@@ -44445,8 +44516,8 @@ var init_session4 = __esm({
44445
44516
  return parts.length ? sql`start transaction ${sql.raw(parts.join(" "))}` : void 0;
44446
44517
  }
44447
44518
  };
44448
- __publicField(SingleStoreSession, _a411, "SingleStoreSession");
44449
- SingleStoreTransaction = class extends (_b302 = SingleStoreDatabase, _a412 = entityKind, _b302) {
44519
+ __publicField(SingleStoreSession, _a413, "SingleStoreSession");
44520
+ SingleStoreTransaction = class extends (_b304 = SingleStoreDatabase, _a414 = entityKind, _b304) {
44450
44521
  constructor(dialect6, session, schema5, nestedIndex) {
44451
44522
  super(dialect6, session, schema5);
44452
44523
  this.schema = schema5;
@@ -44456,7 +44527,7 @@ var init_session4 = __esm({
44456
44527
  throw new TransactionRollbackError();
44457
44528
  }
44458
44529
  };
44459
- __publicField(SingleStoreTransaction, _a412, "SingleStoreTransaction");
44530
+ __publicField(SingleStoreTransaction, _a414, "SingleStoreTransaction");
44460
44531
  }
44461
44532
  });
44462
44533
 
@@ -44633,7 +44704,7 @@ ${withStyle.errorWarning(`We've found duplicated unique constraint names in ${so
44633
44704
  if (typeof column5.default === "string") {
44634
44705
  columnToSet.default = `'${column5.default}'`;
44635
44706
  } else {
44636
- if (sqlTypeLowered === "json") {
44707
+ if (sqlTypeLowered === "json" || Array.isArray(column5.default)) {
44637
44708
  columnToSet.default = `'${JSON.stringify(column5.default)}'`;
44638
44709
  } else if (column5.default instanceof Date) {
44639
44710
  if (sqlTypeLowered === "date") {