@plyaz/db 0.2.0 → 0.3.0

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/dist/index.cjs CHANGED
@@ -7215,6 +7215,17 @@ var BaseRepository = class {
7215
7215
  __name(this, "BaseRepository");
7216
7216
  }
7217
7217
  defaultConfig;
7218
+ /**
7219
+ * Get the table name for this repository
7220
+ *
7221
+ * Useful for transaction operations where you need the table name
7222
+ * to execute raw queries within a transaction context.
7223
+ *
7224
+ * @returns The table name this repository operates on
7225
+ */
7226
+ getTableName() {
7227
+ return this.tableName;
7228
+ }
7218
7229
  /**
7219
7230
  * Merges default repository config with per-operation config
7220
7231
  * Per-operation config takes precedence over default config
@@ -10599,7 +10610,11 @@ var MigrationManager = class {
10599
10610
  const isEmptyOrComment = trimmedLine === "" || trimmedLine.startsWith("--");
10600
10611
  current += line + "\n";
10601
10612
  if (isEmptyOrComment) continue;
10602
- const dollarState = this.processDollarDelimiters(line, inDollarBlock, dollarTag);
10613
+ const dollarState = this.processDollarDelimiters(
10614
+ line,
10615
+ inDollarBlock,
10616
+ dollarTag
10617
+ );
10603
10618
  inDollarBlock = dollarState.inDollarBlock;
10604
10619
  dollarTag = dollarState.dollarTag;
10605
10620
  const isEndOfStatement = !inDollarBlock && trimmedLine.endsWith(";");
@@ -10650,7 +10665,9 @@ var MigrationManager = class {
10650
10665
  await adapter.query(statement);
10651
10666
  const isInterval = (i + 1) % PROGRESS_LOG_INTERVAL === 0;
10652
10667
  const isLast = i === total - 1;
10653
- const isSignificant = Boolean(description.match(/^(CREATE TABLE|CREATE FUNCTION|CREATE TRIGGER)/i));
10668
+ const isSignificant = Boolean(
10669
+ description.match(/^(CREATE TABLE|CREATE FUNCTION|CREATE TRIGGER)/i)
10670
+ );
10654
10671
  if (isInterval || isLast || isSignificant) {
10655
10672
  console.log(` ✓ [${i + 1}/${total}] ${description}`);
10656
10673
  }
@@ -11073,7 +11090,11 @@ var SeedManager = class {
11073
11090
  const isEmptyOrComment = trimmedLine === "" || trimmedLine.startsWith("--");
11074
11091
  current += line + "\n";
11075
11092
  if (isEmptyOrComment) continue;
11076
- const dollarState = this.processDollarDelimiters(line, inDollarBlock, dollarTag);
11093
+ const dollarState = this.processDollarDelimiters(
11094
+ line,
11095
+ inDollarBlock,
11096
+ dollarTag
11097
+ );
11077
11098
  inDollarBlock = dollarState.inDollarBlock;
11078
11099
  dollarTag = dollarState.dollarTag;
11079
11100
  if (!inDollarBlock && trimmedLine.endsWith(";") && current.trim()) {