@elizaos/plugin-sql 1.7.0 → 1.7.1-alpha.1

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.
@@ -634,7 +634,7 @@ var init_subquery = __esm(() => {
634
634
  });
635
635
 
636
636
  // ../../node_modules/drizzle-orm/version.js
637
- var version = "0.45.0";
637
+ var version = "0.45.1";
638
638
  var init_version = () => {};
639
639
 
640
640
  // ../../node_modules/drizzle-orm/tracing.js
@@ -11738,7 +11738,6 @@ init_sql();
11738
11738
  init_tracing();
11739
11739
  init_utils();
11740
11740
  var { Pool, types: types3 } = pg;
11741
- var NativePool = pg.native ? pg.native.Pool : undefined;
11742
11741
 
11743
11742
  class NodePgPreparedQuery extends PgPreparedQuery {
11744
11743
  constructor(client, queryString, params, logger12, cache, queryMetadata, cacheConfig, fields, name, _isResponseInArrayMode, customResultMapper) {
@@ -11896,7 +11895,8 @@ class NodePgSession extends PgSession {
11896
11895
  return new NodePgPreparedQuery(this.client, query.sql, query.params, this.logger, this.cache, queryMetadata, cacheConfig, fields, name, isResponseInArrayMode, customResultMapper);
11897
11896
  }
11898
11897
  async transaction(transaction, config) {
11899
- const session2 = this.client instanceof Pool || NativePool && this.client instanceof NativePool ? new NodePgSession(await this.client.connect(), this.dialect, this.schema, this.options) : this;
11898
+ const isPool = this.client instanceof Pool || Object.getPrototypeOf(this.client).constructor.name.includes("Pool");
11899
+ const session2 = isPool ? new NodePgSession(await this.client.connect(), this.dialect, this.schema, this.options) : this;
11900
11900
  const tx = new NodePgTransaction(this.dialect, session2, this.schema);
11901
11901
  await tx.execute(sql`begin${config ? sql` ${tx.getTransactionConfigSQL(config)}` : undefined}`);
11902
11902
  try {
@@ -11907,9 +11907,8 @@ class NodePgSession extends PgSession {
11907
11907
  await tx.execute(sql`rollback`);
11908
11908
  throw error;
11909
11909
  } finally {
11910
- if (this.client instanceof Pool || NativePool && this.client instanceof NativePool) {
11910
+ if (isPool)
11911
11911
  session2.client.release();
11912
- }
11913
11912
  }
11914
11913
  }
11915
11914
  async count(sql22) {
@@ -12324,5 +12323,5 @@ export {
12324
12323
  DatabaseMigrationService
12325
12324
  };
12326
12325
 
12327
- //# debugId=D2C87E4D9A59EC5564756E2164756E21
12326
+ //# debugId=CF7B44CEC1496D8664756E2164756E21
12328
12327
  //# sourceMappingURL=index.node.js.map