drizzle-kit 0.24.2-540bab9 → 0.24.2-5b27b32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. package/api.js +7 -43
  2. package/api.mjs +7 -43
  3. package/bin.cjs +2 -3
  4. package/package.json +1 -1
package/api.js CHANGED
@@ -28910,7 +28910,9 @@ var init_count = __esm({
28910
28910
  return sql`select count(*) as count from ${source}${sql.raw(" where ").if(filters)}${filters};`;
28911
28911
  }
28912
28912
  then(onfulfilled, onrejected) {
28913
- return Promise.resolve(this.session.count(this.sql)).then(
28913
+ return Promise.resolve(this.session.execute(this.sql)).then((it) => {
28914
+ return Number(it[0]["count"]);
28915
+ }).then(
28914
28916
  onfulfilled,
28915
28917
  onrejected
28916
28918
  );
@@ -29902,12 +29904,6 @@ var init_session = __esm({
29902
29904
  false
29903
29905
  ).all();
29904
29906
  }
29905
- async count(sql22) {
29906
- const res = await this.execute(sql22);
29907
- return Number(
29908
- res[0]["count"]
29909
- );
29910
- }
29911
29907
  };
29912
29908
  __publicField(PgSession, _a157, "PgSession");
29913
29909
  PgTransaction = class extends (_b113 = PgDatabase, _a158 = entityKind, _b113) {
@@ -30155,12 +30151,6 @@ var init_session2 = __esm({
30155
30151
  }
30156
30152
  }
30157
30153
  }
30158
- async count(sql22) {
30159
- const res = await this.execute(sql22);
30160
- return Number(
30161
- res["rows"][0]["count"]
30162
- );
30163
- }
30164
30154
  };
30165
30155
  __publicField(_NodePgSession, _a160, "NodePgSession");
30166
30156
  NodePgSession = _NodePgSession;
@@ -51886,7 +51876,7 @@ var init_count2 = __esm({
51886
51876
  return sql`select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters}`;
51887
51877
  }
51888
51878
  then(onfulfilled, onrejected) {
51889
- return Promise.resolve(this.session.count(this.sql)).then(
51879
+ return Promise.resolve(this.session.values(this.sql)).then((it) => it[0][0]).then(
51890
51880
  onfulfilled,
51891
51881
  onrejected
51892
51882
  );
@@ -52632,10 +52622,6 @@ var init_session4 = __esm({
52632
52622
  values(query) {
52633
52623
  return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).values();
52634
52624
  }
52635
- async count(sql3) {
52636
- const result = await this.values(sql3);
52637
- return result[0][0];
52638
- }
52639
52625
  /** @internal */
52640
52626
  extractRawValuesValueFromBatchResult(_result) {
52641
52627
  throw new Error("Not implemented");
@@ -82968,7 +82954,9 @@ var init_count3 = __esm({
82968
82954
  return sql`select count(*) as count from ${source}${sql.raw(" where ").if(filters)}${filters}`;
82969
82955
  }
82970
82956
  then(onfulfilled, onrejected) {
82971
- return Promise.resolve(this.session.count(this.sql)).then(
82957
+ return Promise.resolve(this.session.execute(this.sql)).then((it) => {
82958
+ return Number(it[0][0]["count"]);
82959
+ }).then(
82972
82960
  onfulfilled,
82973
82961
  onrejected
82974
82962
  );
@@ -85553,12 +85541,6 @@ var init_session9 = __esm({
85553
85541
  void 0
85554
85542
  ).execute();
85555
85543
  }
85556
- async count(sql22) {
85557
- const res = await this.execute(sql22);
85558
- return Number(
85559
- res[0][0]["count"]
85560
- );
85561
- }
85562
85544
  getSetTransactionSQL(config) {
85563
85545
  const parts = [];
85564
85546
  if (config.isolationLevel) {
@@ -91390,12 +91372,6 @@ var init_session11 = __esm({
91390
91372
  async queryObjects(query, params) {
91391
91373
  return this.client(query, params, { arrayMode: false, fullResults: true });
91392
91374
  }
91393
- async count(sql3) {
91394
- const res = await this.execute(sql3);
91395
- return Number(
91396
- res["rows"][0]["count"]
91397
- );
91398
- }
91399
91375
  async transaction(_transaction, _config = {}) {
91400
91376
  throw new Error("No transactions support in neon-http driver");
91401
91377
  }
@@ -92194,12 +92170,6 @@ var init_session13 = __esm({
92194
92170
  this.logger.logQuery(querySql.sql, querySql.params);
92195
92171
  return this.client.execute(querySql.sql, querySql.params, { as: "object" }).then((eQuery) => eQuery.rows);
92196
92172
  }
92197
- async count(sql22) {
92198
- const res = await this.execute(sql22);
92199
- return Number(
92200
- res["rows"][0]["count"]
92201
- );
92202
- }
92203
92173
  transaction(transaction) {
92204
92174
  return this.baseClient.transaction((pstx) => {
92205
92175
  const session = new _PlanetscaleSession(this.baseClient, this.dialect, pstx, this.schema, this.options);
@@ -95149,12 +95119,6 @@ var init_session15 = __esm({
95149
95119
  this.logger.logQuery(querySql.sql, querySql.params);
95150
95120
  return this.client.execute(querySql.sql, querySql.params);
95151
95121
  }
95152
- async count(sql22) {
95153
- const res = await this.execute(sql22);
95154
- return Number(
95155
- res["rows"][0]["count"]
95156
- );
95157
- }
95158
95122
  async transaction(transaction) {
95159
95123
  const nativeTx = await this.baseClient.begin();
95160
95124
  try {
package/api.mjs CHANGED
@@ -28915,7 +28915,9 @@ var init_count = __esm({
28915
28915
  return sql`select count(*) as count from ${source}${sql.raw(" where ").if(filters)}${filters};`;
28916
28916
  }
28917
28917
  then(onfulfilled, onrejected) {
28918
- return Promise.resolve(this.session.count(this.sql)).then(
28918
+ return Promise.resolve(this.session.execute(this.sql)).then((it) => {
28919
+ return Number(it[0]["count"]);
28920
+ }).then(
28919
28921
  onfulfilled,
28920
28922
  onrejected
28921
28923
  );
@@ -29907,12 +29909,6 @@ var init_session = __esm({
29907
29909
  false
29908
29910
  ).all();
29909
29911
  }
29910
- async count(sql22) {
29911
- const res = await this.execute(sql22);
29912
- return Number(
29913
- res[0]["count"]
29914
- );
29915
- }
29916
29912
  };
29917
29913
  __publicField(PgSession, _a157, "PgSession");
29918
29914
  PgTransaction = class extends (_b113 = PgDatabase, _a158 = entityKind, _b113) {
@@ -30160,12 +30156,6 @@ var init_session2 = __esm({
30160
30156
  }
30161
30157
  }
30162
30158
  }
30163
- async count(sql22) {
30164
- const res = await this.execute(sql22);
30165
- return Number(
30166
- res["rows"][0]["count"]
30167
- );
30168
- }
30169
30159
  };
30170
30160
  __publicField(_NodePgSession, _a160, "NodePgSession");
30171
30161
  NodePgSession = _NodePgSession;
@@ -51890,7 +51880,7 @@ var init_count2 = __esm({
51890
51880
  return sql`select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters}`;
51891
51881
  }
51892
51882
  then(onfulfilled, onrejected) {
51893
- return Promise.resolve(this.session.count(this.sql)).then(
51883
+ return Promise.resolve(this.session.values(this.sql)).then((it) => it[0][0]).then(
51894
51884
  onfulfilled,
51895
51885
  onrejected
51896
51886
  );
@@ -52636,10 +52626,6 @@ var init_session4 = __esm({
52636
52626
  values(query) {
52637
52627
  return this.prepareOneTimeQuery(this.dialect.sqlToQuery(query), void 0, "run", false).values();
52638
52628
  }
52639
- async count(sql3) {
52640
- const result = await this.values(sql3);
52641
- return result[0][0];
52642
- }
52643
52629
  /** @internal */
52644
52630
  extractRawValuesValueFromBatchResult(_result) {
52645
52631
  throw new Error("Not implemented");
@@ -82972,7 +82958,9 @@ var init_count3 = __esm({
82972
82958
  return sql`select count(*) as count from ${source}${sql.raw(" where ").if(filters)}${filters}`;
82973
82959
  }
82974
82960
  then(onfulfilled, onrejected) {
82975
- return Promise.resolve(this.session.count(this.sql)).then(
82961
+ return Promise.resolve(this.session.execute(this.sql)).then((it) => {
82962
+ return Number(it[0][0]["count"]);
82963
+ }).then(
82976
82964
  onfulfilled,
82977
82965
  onrejected
82978
82966
  );
@@ -85557,12 +85545,6 @@ var init_session9 = __esm({
85557
85545
  void 0
85558
85546
  ).execute();
85559
85547
  }
85560
- async count(sql22) {
85561
- const res = await this.execute(sql22);
85562
- return Number(
85563
- res[0][0]["count"]
85564
- );
85565
- }
85566
85548
  getSetTransactionSQL(config) {
85567
85549
  const parts = [];
85568
85550
  if (config.isolationLevel) {
@@ -91394,12 +91376,6 @@ var init_session11 = __esm({
91394
91376
  async queryObjects(query, params) {
91395
91377
  return this.client(query, params, { arrayMode: false, fullResults: true });
91396
91378
  }
91397
- async count(sql3) {
91398
- const res = await this.execute(sql3);
91399
- return Number(
91400
- res["rows"][0]["count"]
91401
- );
91402
- }
91403
91379
  async transaction(_transaction, _config = {}) {
91404
91380
  throw new Error("No transactions support in neon-http driver");
91405
91381
  }
@@ -92198,12 +92174,6 @@ var init_session13 = __esm({
92198
92174
  this.logger.logQuery(querySql.sql, querySql.params);
92199
92175
  return this.client.execute(querySql.sql, querySql.params, { as: "object" }).then((eQuery) => eQuery.rows);
92200
92176
  }
92201
- async count(sql22) {
92202
- const res = await this.execute(sql22);
92203
- return Number(
92204
- res["rows"][0]["count"]
92205
- );
92206
- }
92207
92177
  transaction(transaction) {
92208
92178
  return this.baseClient.transaction((pstx) => {
92209
92179
  const session = new _PlanetscaleSession(this.baseClient, this.dialect, pstx, this.schema, this.options);
@@ -95152,12 +95122,6 @@ var init_session15 = __esm({
95152
95122
  this.logger.logQuery(querySql.sql, querySql.params);
95153
95123
  return this.client.execute(querySql.sql, querySql.params);
95154
95124
  }
95155
- async count(sql22) {
95156
- const res = await this.execute(sql22);
95157
- return Number(
95158
- res["rows"][0]["count"]
95159
- );
95160
- }
95161
95125
  async transaction(transaction) {
95162
95126
  const nativeTx = await this.baseClient.begin();
95163
95127
  try {
package/bin.cjs CHANGED
@@ -62210,7 +62210,7 @@ var init_connections = __esm({
62210
62210
  return { ...db, ...proxy, migrate: migrateFn };
62211
62211
  }
62212
62212
  console.log(
62213
- "Please install either 'better-sqlite3' or '@libsql/client' for Drizzle Kit to connect to SQLite databases"
62213
+ "Please install 'better-sqlite3' for Drizzle Kit to connect to SQLite databases"
62214
62214
  );
62215
62215
  process.exit(1);
62216
62216
  };
@@ -79411,7 +79411,6 @@ var init_push = __esm({
79411
79411
  }
79412
79412
  });
79413
79413
  if (verbose) {
79414
- console.log();
79415
79414
  console.log(
79416
79415
  withStyle.warning("You are about to execute current statements:")
79417
79416
  );
@@ -85222,7 +85221,7 @@ init_utils2();
85222
85221
  var version2 = async () => {
85223
85222
  const { npmVersion } = await ormCoreVersions();
85224
85223
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
85225
- const envVersion = "0.24.2-540bab9";
85224
+ const envVersion = "0.24.2-5b27b32";
85226
85225
  const kitVersion = envVersion ? `v${envVersion}` : "--";
85227
85226
  const versions = `drizzle-kit: ${kitVersion}
85228
85227
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.24.2-540bab9",
3
+ "version": "0.24.2-5b27b32",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",