@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.mjs CHANGED
@@ -7191,6 +7191,17 @@ var BaseRepository = class {
7191
7191
  __name(this, "BaseRepository");
7192
7192
  }
7193
7193
  defaultConfig;
7194
+ /**
7195
+ * Get the table name for this repository
7196
+ *
7197
+ * Useful for transaction operations where you need the table name
7198
+ * to execute raw queries within a transaction context.
7199
+ *
7200
+ * @returns The table name this repository operates on
7201
+ */
7202
+ getTableName() {
7203
+ return this.tableName;
7204
+ }
7194
7205
  /**
7195
7206
  * Merges default repository config with per-operation config
7196
7207
  * Per-operation config takes precedence over default config
@@ -10575,7 +10586,11 @@ var MigrationManager = class {
10575
10586
  const isEmptyOrComment = trimmedLine === "" || trimmedLine.startsWith("--");
10576
10587
  current += line + "\n";
10577
10588
  if (isEmptyOrComment) continue;
10578
- const dollarState = this.processDollarDelimiters(line, inDollarBlock, dollarTag);
10589
+ const dollarState = this.processDollarDelimiters(
10590
+ line,
10591
+ inDollarBlock,
10592
+ dollarTag
10593
+ );
10579
10594
  inDollarBlock = dollarState.inDollarBlock;
10580
10595
  dollarTag = dollarState.dollarTag;
10581
10596
  const isEndOfStatement = !inDollarBlock && trimmedLine.endsWith(";");
@@ -10626,7 +10641,9 @@ var MigrationManager = class {
10626
10641
  await adapter.query(statement);
10627
10642
  const isInterval = (i + 1) % PROGRESS_LOG_INTERVAL === 0;
10628
10643
  const isLast = i === total - 1;
10629
- const isSignificant = Boolean(description.match(/^(CREATE TABLE|CREATE FUNCTION|CREATE TRIGGER)/i));
10644
+ const isSignificant = Boolean(
10645
+ description.match(/^(CREATE TABLE|CREATE FUNCTION|CREATE TRIGGER)/i)
10646
+ );
10630
10647
  if (isInterval || isLast || isSignificant) {
10631
10648
  console.log(` ✓ [${i + 1}/${total}] ${description}`);
10632
10649
  }
@@ -11049,7 +11066,11 @@ var SeedManager = class {
11049
11066
  const isEmptyOrComment = trimmedLine === "" || trimmedLine.startsWith("--");
11050
11067
  current += line + "\n";
11051
11068
  if (isEmptyOrComment) continue;
11052
- const dollarState = this.processDollarDelimiters(line, inDollarBlock, dollarTag);
11069
+ const dollarState = this.processDollarDelimiters(
11070
+ line,
11071
+ inDollarBlock,
11072
+ dollarTag
11073
+ );
11053
11074
  inDollarBlock = dollarState.inDollarBlock;
11054
11075
  dollarTag = dollarState.dollarTag;
11055
11076
  if (!inDollarBlock && trimmedLine.endsWith(";") && current.trim()) {