@mastra/pg 1.28.1-alpha.0 → 1.28.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.
@@ -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.28.1-alpha.0"
6
+ version: "1.28.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.28.1-alpha.0",
2
+ "version": "1.28.1",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -1000,6 +1000,8 @@ var PgVector = class extends _mastra_core_vector.MastraVector {
1000
1000
  let client;
1001
1001
  try {
1002
1002
  await this.ensureNamespaceReady(indexName);
1003
+ const indexInfo = includeVector ? await this.getIndexMetadata({ indexName }) : void 0;
1004
+ const ops = indexInfo && this.getVectorOps(indexInfo.vectorType, indexInfo.metric ?? "cosine");
1003
1005
  client = await this.pool.connect();
1004
1006
  const { sql: filterQuery, values: filterValues } = buildDeleteFilterQuery(this.transformFilter(filter));
1005
1007
  const { tableName } = this.getTableName(indexName);
@@ -1023,7 +1025,7 @@ var PgVector = class extends _mastra_core_vector.MastraVector {
1023
1025
  id,
1024
1026
  score: 0,
1025
1027
  metadata,
1026
- ...includeVector && embedding && { vector: JSON.parse(embedding) }
1028
+ ...ops && embedding && { vector: ops.parseEmbedding(embedding) }
1027
1029
  }));
1028
1030
  } catch (error) {
1029
1031
  if (error instanceof _mastra_core_error.MastraError) {
@@ -22537,7 +22539,10 @@ var WorkflowDefinitionsPG = class WorkflowDefinitionsPG extends _mastra_core_sto
22537
22539
  return this.applyUpdate(input, now);
22538
22540
  }
22539
22541
  async applyUpdate(input, now) {
22540
- const data = { updatedAt: now };
22542
+ const data = {
22543
+ updatedAt: now,
22544
+ updatedAtZ: now
22545
+ };
22541
22546
  if ("description" in input && input.description !== void 0) data.description = input.description;
22542
22547
  if ("metadata" in input && input.metadata !== void 0) data.metadata = input.metadata;
22543
22548
  if ("inputSchema" in input && input.inputSchema !== void 0) data.inputSchema = input.inputSchema;