@mastra/pg 1.8.2 → 1.8.3-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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 1.8.3-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Added agent version support for experiments. When triggering an experiment, you can now pass an `agentVersion` parameter to pin which agent version to use. The agent version is stored with the experiment and returned in experiment responses. ([#14562](https://github.com/mastra-ai/mastra/pull/14562))
8
+
9
+ ```ts
10
+ const client = new MastraClient();
11
+
12
+ await client.triggerDatasetExperiment({
13
+ datasetId: 'my-dataset',
14
+ targetType: 'agent',
15
+ targetId: 'my-agent',
16
+ version: 3, // pin to dataset version 3
17
+ agentVersion: 'ver_abc123', // pin to a specific agent version
18
+ });
19
+ ```
20
+
21
+ - Updated dependencies [[`7dbd611`](https://github.com/mastra-ai/mastra/commit/7dbd611a85cb1e0c0a1581c57564268cb183d86e), [`41aee84`](https://github.com/mastra-ai/mastra/commit/41aee84561ceebe28bad1ecba8702d92838f67f0)]:
22
+ - @mastra/core@1.16.0-alpha.1
23
+
24
+ ## 1.8.3-alpha.0
25
+
26
+ ### Patch Changes
27
+
28
+ - Added storage support for dataset targeting and experiment status fields. ([#14470](https://github.com/mastra-ai/mastra/pull/14470))
29
+ - Added `targetType` (text) and `targetIds` (jsonb) columns to datasets table for entity association
30
+ - Added `tags` (jsonb) column to datasets table for tag vocabulary
31
+ - Added `status` column to experiment results for review workflow tracking
32
+ - Added migration logic to add new columns to existing tables
33
+
34
+ - Updated dependencies [[`68ed4e9`](https://github.com/mastra-ai/mastra/commit/68ed4e9f118e8646b60a6112dabe854d0ef53902), [`085c1da`](https://github.com/mastra-ai/mastra/commit/085c1daf71b55a97b8ebad26623089e40055021c), [`4a75e10`](https://github.com/mastra-ai/mastra/commit/4a75e106bd31c283a1b3fe74c923610dcc46415b), [`085c1da`](https://github.com/mastra-ai/mastra/commit/085c1daf71b55a97b8ebad26623089e40055021c)]:
35
+ - @mastra/core@1.16.0-alpha.0
36
+
3
37
  ## 1.8.2
4
38
 
5
39
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-pg
3
3
  description: Documentation for @mastra/pg. Use when working with @mastra/pg APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/pg"
6
- version: "1.8.2"
6
+ version: "1.8.3-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.2",
2
+ "version": "1.8.3-alpha.1",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -4352,7 +4352,11 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4352
4352
  });
4353
4353
  await this.#db.createTable({ tableName: storage.TABLE_DATASET_VERSIONS, schema: storage.DATASET_VERSIONS_SCHEMA });
4354
4354
  await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "requestContextSchema", "JSONB");
4355
+ await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "tags", "JSONB");
4356
+ await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "targetType", "TEXT");
4357
+ await this.#addColumnIfNotExists(storage.TABLE_DATASETS, "targetIds", "JSONB");
4355
4358
  await this.#addColumnIfNotExists(storage.TABLE_DATASET_ITEMS, "requestContext", "JSONB");
4359
+ await this.#addColumnIfNotExists(storage.TABLE_DATASET_ITEMS, "source", "JSONB");
4356
4360
  await this.createDefaultIndexes();
4357
4361
  await this.createCustomIndexes();
4358
4362
  }
@@ -4419,6 +4423,9 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4419
4423
  inputSchema: row.inputSchema ? storage.safelyParseJSON(row.inputSchema) : void 0,
4420
4424
  groundTruthSchema: row.groundTruthSchema ? storage.safelyParseJSON(row.groundTruthSchema) : void 0,
4421
4425
  requestContextSchema: row.requestContextSchema ? storage.safelyParseJSON(row.requestContextSchema) : void 0,
4426
+ tags: row.tags ? storage.safelyParseJSON(row.tags) : void 0,
4427
+ targetType: row.targetType || null,
4428
+ targetIds: row.targetIds || null,
4422
4429
  version: row.version,
4423
4430
  createdAt: storage.ensureDate(row.createdAtZ || row.createdAt),
4424
4431
  updatedAt: storage.ensureDate(row.updatedAtZ || row.updatedAt)
@@ -4433,6 +4440,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4433
4440
  groundTruth: row.groundTruth ? storage.safelyParseJSON(row.groundTruth) : void 0,
4434
4441
  requestContext: row.requestContext ? storage.safelyParseJSON(row.requestContext) : void 0,
4435
4442
  metadata: row.metadata ? storage.safelyParseJSON(row.metadata) : void 0,
4443
+ source: row.source ? storage.safelyParseJSON(row.source) : void 0,
4436
4444
  createdAt: storage.ensureDate(row.createdAtZ || row.createdAt),
4437
4445
  updatedAt: storage.ensureDate(row.updatedAtZ || row.updatedAt)
4438
4446
  };
@@ -4448,6 +4456,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4448
4456
  groundTruth: row.groundTruth ? storage.safelyParseJSON(row.groundTruth) : void 0,
4449
4457
  requestContext: row.requestContext ? storage.safelyParseJSON(row.requestContext) : void 0,
4450
4458
  metadata: row.metadata ? storage.safelyParseJSON(row.metadata) : void 0,
4459
+ source: row.source ? storage.safelyParseJSON(row.source) : void 0,
4451
4460
  createdAt: storage.ensureDate(row.createdAtZ || row.createdAt),
4452
4461
  updatedAt: storage.ensureDate(row.updatedAtZ || row.updatedAt)
4453
4462
  };
@@ -4476,6 +4485,8 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4476
4485
  inputSchema: input.inputSchema ?? null,
4477
4486
  groundTruthSchema: input.groundTruthSchema ?? null,
4478
4487
  requestContextSchema: input.requestContextSchema ?? null,
4488
+ targetType: input.targetType ?? null,
4489
+ targetIds: input.targetIds !== void 0 ? JSON.stringify(input.targetIds) : null,
4479
4490
  version: 0,
4480
4491
  createdAt: nowIso,
4481
4492
  updatedAt: nowIso
@@ -4489,6 +4500,8 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4489
4500
  inputSchema: input.inputSchema ?? void 0,
4490
4501
  groundTruthSchema: input.groundTruthSchema ?? void 0,
4491
4502
  requestContextSchema: input.requestContextSchema ?? void 0,
4503
+ targetType: input.targetType ?? null,
4504
+ targetIds: input.targetIds ?? null,
4492
4505
  version: 0,
4493
4506
  createdAt: now,
4494
4507
  updatedAt: now
@@ -4560,6 +4573,18 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4560
4573
  setClauses.push(`"requestContextSchema" = $${paramIndex++}`);
4561
4574
  values.push(args.requestContextSchema === null ? null : JSON.stringify(args.requestContextSchema));
4562
4575
  }
4576
+ if (args.tags !== void 0) {
4577
+ setClauses.push(`"tags" = $${paramIndex++}`);
4578
+ values.push(args.tags === null ? null : JSON.stringify(args.tags));
4579
+ }
4580
+ if (args.targetType !== void 0) {
4581
+ setClauses.push(`"targetType" = $${paramIndex++}`);
4582
+ values.push(args.targetType);
4583
+ }
4584
+ if (args.targetIds !== void 0) {
4585
+ setClauses.push(`"targetIds" = $${paramIndex++}`);
4586
+ values.push(args.targetIds === null ? null : JSON.stringify(args.targetIds));
4587
+ }
4563
4588
  values.push(args.id);
4564
4589
  await this.#db.client.none(
4565
4590
  `UPDATE ${tableName} SET ${setClauses.join(", ")} WHERE "id" = $${paramIndex}`,
@@ -4573,6 +4598,9 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4573
4598
  inputSchema: (args.inputSchema !== void 0 ? args.inputSchema : existing.inputSchema) ?? void 0,
4574
4599
  groundTruthSchema: (args.groundTruthSchema !== void 0 ? args.groundTruthSchema : existing.groundTruthSchema) ?? void 0,
4575
4600
  requestContextSchema: (args.requestContextSchema !== void 0 ? args.requestContextSchema : existing.requestContextSchema) ?? void 0,
4601
+ tags: (args.tags !== void 0 ? args.tags : existing.tags) ?? void 0,
4602
+ targetType: (args.targetType !== void 0 ? args.targetType : existing.targetType) ?? null,
4603
+ targetIds: (args.targetIds !== void 0 ? args.targetIds : existing.targetIds) ?? null,
4576
4604
  updatedAt: new Date(now)
4577
4605
  };
4578
4606
  } catch (error$1) {
@@ -4688,7 +4716,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4688
4716
  );
4689
4717
  newVersion = row.version;
4690
4718
  await t.none(
4691
- `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,false,$4,$5,$6,$7,$8,$9,$10,$11)`,
4719
+ `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","source","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,false,$4,$5,$6,$7,$8,$9,$10,$11,$12)`,
4692
4720
  [
4693
4721
  id,
4694
4722
  args.datasetId,
@@ -4697,6 +4725,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4697
4725
  jsonbArg(args.groundTruth),
4698
4726
  jsonbArg(args.requestContext),
4699
4727
  jsonbArg(args.metadata),
4728
+ jsonbArg(args.source),
4700
4729
  nowIso,
4701
4730
  nowIso,
4702
4731
  nowIso,
@@ -4716,6 +4745,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4716
4745
  groundTruth: args.groundTruth,
4717
4746
  requestContext: args.requestContext,
4718
4747
  metadata: args.metadata,
4748
+ source: args.source,
4719
4749
  createdAt: now,
4720
4750
  updatedAt: now
4721
4751
  };
@@ -4763,6 +4793,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4763
4793
  const mergedGroundTruth = args.groundTruth ?? existing.groundTruth;
4764
4794
  const mergedRequestContext = args.requestContext ?? existing.requestContext;
4765
4795
  const mergedMetadata = args.metadata ?? existing.metadata;
4796
+ const mergedSource = args.source ?? existing.source;
4766
4797
  let newVersion;
4767
4798
  await this.#db.client.tx(async (t) => {
4768
4799
  const row = await t.one(
@@ -4775,7 +4806,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4775
4806
  [newVersion, args.id]
4776
4807
  );
4777
4808
  await t.none(
4778
- `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,false,$4,$5,$6,$7,$8,$9,$10,$11)`,
4809
+ `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","source","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,false,$4,$5,$6,$7,$8,$9,$10,$11,$12)`,
4779
4810
  [
4780
4811
  args.id,
4781
4812
  args.datasetId,
@@ -4784,6 +4815,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4784
4815
  jsonbArg(mergedGroundTruth),
4785
4816
  jsonbArg(mergedRequestContext),
4786
4817
  jsonbArg(mergedMetadata),
4818
+ jsonbArg(mergedSource),
4787
4819
  existing.createdAt.toISOString(),
4788
4820
  existing.createdAt.toISOString(),
4789
4821
  nowIso,
@@ -4802,6 +4834,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4802
4834
  groundTruth: mergedGroundTruth,
4803
4835
  requestContext: mergedRequestContext,
4804
4836
  metadata: mergedMetadata,
4837
+ source: mergedSource,
4805
4838
  updatedAt: now
4806
4839
  };
4807
4840
  } catch (error$1) {
@@ -4847,7 +4880,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4847
4880
  [newVersion, id]
4848
4881
  );
4849
4882
  await t.none(
4850
- `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,true,$4,$5,$6,$7,$8,$9,$10,$11)`,
4883
+ `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","source","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,true,$4,$5,$6,$7,$8,$9,$10,$11,$12)`,
4851
4884
  [
4852
4885
  id,
4853
4886
  datasetId,
@@ -4856,6 +4889,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4856
4889
  jsonbArg(existing.groundTruth),
4857
4890
  jsonbArg(existing.requestContext),
4858
4891
  jsonbArg(existing.metadata),
4892
+ jsonbArg(existing.source),
4859
4893
  existing.createdAt.toISOString(),
4860
4894
  existing.createdAt.toISOString(),
4861
4895
  nowIso,
@@ -4909,7 +4943,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4909
4943
  newVersion = row.version;
4910
4944
  for (const { id, input: itemInput } of itemsWithIds) {
4911
4945
  await t.none(
4912
- `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,false,$4,$5,$6,$7,$8,$9,$10,$11)`,
4946
+ `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","source","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,false,$4,$5,$6,$7,$8,$9,$10,$11,$12)`,
4913
4947
  [
4914
4948
  id,
4915
4949
  input.datasetId,
@@ -4918,6 +4952,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4918
4952
  jsonbArg(itemInput.groundTruth),
4919
4953
  jsonbArg(itemInput.requestContext),
4920
4954
  jsonbArg(itemInput.metadata),
4955
+ jsonbArg(itemInput.source),
4921
4956
  nowIso,
4922
4957
  nowIso,
4923
4958
  nowIso,
@@ -4938,6 +4973,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4938
4973
  groundTruth: itemInput.groundTruth,
4939
4974
  requestContext: itemInput.requestContext,
4940
4975
  metadata: itemInput.metadata,
4976
+ source: itemInput.source,
4941
4977
  createdAt: now,
4942
4978
  updatedAt: now
4943
4979
  }));
@@ -4992,7 +5028,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
4992
5028
  [newVersion, item.id]
4993
5029
  );
4994
5030
  await t.none(
4995
- `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,true,$4,$5,$6,$7,$8,$9,$10,$11)`,
5031
+ `INSERT INTO ${itemsTable} ("id","datasetId","datasetVersion","validTo","isDeleted","input","groundTruth","requestContext","metadata","source","createdAt","createdAtZ","updatedAt","updatedAtZ") VALUES ($1,$2,$3,NULL,true,$4,$5,$6,$7,$8,$9,$10,$11,$12)`,
4996
5032
  [
4997
5033
  item.id,
4998
5034
  input.datasetId,
@@ -5001,6 +5037,7 @@ var DatasetsPG = class _DatasetsPG extends storage.DatasetsStorage {
5001
5037
  jsonbArg(item.groundTruth),
5002
5038
  jsonbArg(item.requestContext),
5003
5039
  jsonbArg(item.metadata),
5040
+ jsonbArg(item.source),
5004
5041
  item.createdAt.toISOString(),
5005
5042
  item.createdAt.toISOString(),
5006
5043
  nowIso,
@@ -5294,6 +5331,7 @@ var ExperimentsPG = class _ExperimentsPG extends storage.ExperimentsStorage {
5294
5331
  metadata: row.metadata ? storage.safelyParseJSON(row.metadata) : void 0,
5295
5332
  datasetId: row.datasetId ?? null,
5296
5333
  datasetVersion: row.datasetVersion != null ? row.datasetVersion : null,
5334
+ agentVersion: row.agentVersion ?? null,
5297
5335
  targetType: row.targetType,
5298
5336
  targetId: row.targetId,
5299
5337
  status: row.status,
@@ -5321,6 +5359,8 @@ var ExperimentsPG = class _ExperimentsPG extends storage.ExperimentsStorage {
5321
5359
  completedAt: storage.ensureDate(row.completedAtZ || row.completedAt),
5322
5360
  retryCount: row.retryCount,
5323
5361
  traceId: row.traceId ?? null,
5362
+ status: row.status ?? null,
5363
+ tags: row.tags ? storage.safelyParseJSON(row.tags) : null,
5324
5364
  createdAt: storage.ensureDate(row.createdAtZ || row.createdAt)
5325
5365
  };
5326
5366
  }
@@ -5339,6 +5379,7 @@ var ExperimentsPG = class _ExperimentsPG extends storage.ExperimentsStorage {
5339
5379
  metadata: input.metadata ?? null,
5340
5380
  datasetId: input.datasetId ?? null,
5341
5381
  datasetVersion: input.datasetVersion ?? null,
5382
+ agentVersion: input.agentVersion ?? null,
5342
5383
  targetType: input.targetType,
5343
5384
  targetId: input.targetId,
5344
5385
  status: "pending",
@@ -5359,6 +5400,7 @@ var ExperimentsPG = class _ExperimentsPG extends storage.ExperimentsStorage {
5359
5400
  metadata: input.metadata,
5360
5401
  datasetId: input.datasetId ?? null,
5361
5402
  datasetVersion: input.datasetVersion ?? null,
5403
+ agentVersion: input.agentVersion ?? null,
5362
5404
  targetType: input.targetType,
5363
5405
  targetId: input.targetId,
5364
5406
  status: "pending",
@@ -5561,6 +5603,8 @@ var ExperimentsPG = class _ExperimentsPG extends storage.ExperimentsStorage {
5561
5603
  completedAt: input.completedAt.toISOString(),
5562
5604
  retryCount: input.retryCount,
5563
5605
  traceId: input.traceId ?? null,
5606
+ status: input.status ?? null,
5607
+ tags: input.tags ?? null,
5564
5608
  createdAt: nowIso
5565
5609
  }
5566
5610
  });
@@ -5577,6 +5621,8 @@ var ExperimentsPG = class _ExperimentsPG extends storage.ExperimentsStorage {
5577
5621
  completedAt: input.completedAt,
5578
5622
  retryCount: input.retryCount,
5579
5623
  traceId: input.traceId ?? null,
5624
+ status: input.status ?? null,
5625
+ tags: input.tags ?? null,
5580
5626
  createdAt: now
5581
5627
  };
5582
5628
  } catch (error$1) {
@@ -5590,6 +5636,64 @@ var ExperimentsPG = class _ExperimentsPG extends storage.ExperimentsStorage {
5590
5636
  );
5591
5637
  }
5592
5638
  }
5639
+ async updateExperimentResult(input) {
5640
+ try {
5641
+ const tableName = getTableName2({ indexName: storage.TABLE_EXPERIMENT_RESULTS, schemaName: getSchemaName2(this.#schema) });
5642
+ const setClauses = [];
5643
+ const values = [];
5644
+ let paramIndex = 1;
5645
+ if (input.status !== void 0) {
5646
+ setClauses.push(`"status" = $${paramIndex++}`);
5647
+ values.push(input.status);
5648
+ }
5649
+ if (input.tags !== void 0) {
5650
+ setClauses.push(`"tags" = $${paramIndex++}`);
5651
+ values.push(JSON.stringify(input.tags));
5652
+ }
5653
+ if (setClauses.length === 0) {
5654
+ const existing = await this.getExperimentResultById({ id: input.id });
5655
+ if (!existing) {
5656
+ throw new error.MastraError({
5657
+ id: storage.createStorageErrorId("PG", "UPDATE_EXPERIMENT_RESULT", "NOT_FOUND"),
5658
+ domain: error.ErrorDomain.STORAGE,
5659
+ category: error.ErrorCategory.USER,
5660
+ details: { resultId: input.id }
5661
+ });
5662
+ }
5663
+ return existing;
5664
+ }
5665
+ values.push(input.id);
5666
+ let whereClause = `"id" = $${paramIndex}`;
5667
+ if (input.experimentId) {
5668
+ paramIndex++;
5669
+ values.push(input.experimentId);
5670
+ whereClause += ` AND "experimentId" = $${paramIndex}`;
5671
+ }
5672
+ const row = await this.#db.client.oneOrNone(
5673
+ `UPDATE ${tableName} SET ${setClauses.join(", ")} WHERE ${whereClause} RETURNING *`,
5674
+ values
5675
+ );
5676
+ if (!row) {
5677
+ throw new error.MastraError({
5678
+ id: storage.createStorageErrorId("PG", "UPDATE_EXPERIMENT_RESULT", "NOT_FOUND"),
5679
+ domain: error.ErrorDomain.STORAGE,
5680
+ category: error.ErrorCategory.USER,
5681
+ details: { resultId: input.id }
5682
+ });
5683
+ }
5684
+ return this.transformExperimentResultRow(row);
5685
+ } catch (error$1) {
5686
+ if (error$1 instanceof error.MastraError) throw error$1;
5687
+ throw new error.MastraError(
5688
+ {
5689
+ id: storage.createStorageErrorId("PG", "UPDATE_EXPERIMENT_RESULT", "FAILED"),
5690
+ domain: error.ErrorDomain.STORAGE,
5691
+ category: error.ErrorCategory.THIRD_PARTY
5692
+ },
5693
+ error$1
5694
+ );
5695
+ }
5696
+ }
5593
5697
  async getExperimentResultById({ id }) {
5594
5698
  try {
5595
5699
  const tableName = getTableName2({ indexName: storage.TABLE_EXPERIMENT_RESULTS, schemaName: getSchemaName2(this.#schema) });