@mastra/pg 1.28.1-alpha.0 → 1.28.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.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -976,6 +976,8 @@ var PgVector = class extends MastraVector {
|
|
|
976
976
|
let client;
|
|
977
977
|
try {
|
|
978
978
|
await this.ensureNamespaceReady(indexName);
|
|
979
|
+
const indexInfo = includeVector ? await this.getIndexMetadata({ indexName }) : void 0;
|
|
980
|
+
const ops = indexInfo && this.getVectorOps(indexInfo.vectorType, indexInfo.metric ?? "cosine");
|
|
979
981
|
client = await this.pool.connect();
|
|
980
982
|
const { sql: filterQuery, values: filterValues } = buildDeleteFilterQuery(this.transformFilter(filter));
|
|
981
983
|
const { tableName } = this.getTableName(indexName);
|
|
@@ -999,7 +1001,7 @@ var PgVector = class extends MastraVector {
|
|
|
999
1001
|
id,
|
|
1000
1002
|
score: 0,
|
|
1001
1003
|
metadata,
|
|
1002
|
-
...
|
|
1004
|
+
...ops && embedding && { vector: ops.parseEmbedding(embedding) }
|
|
1003
1005
|
}));
|
|
1004
1006
|
} catch (error) {
|
|
1005
1007
|
if (error instanceof MastraError) {
|
|
@@ -22513,7 +22515,10 @@ var WorkflowDefinitionsPG = class WorkflowDefinitionsPG extends WorkflowDefiniti
|
|
|
22513
22515
|
return this.applyUpdate(input, now);
|
|
22514
22516
|
}
|
|
22515
22517
|
async applyUpdate(input, now) {
|
|
22516
|
-
const data = {
|
|
22518
|
+
const data = {
|
|
22519
|
+
updatedAt: now,
|
|
22520
|
+
updatedAtZ: now
|
|
22521
|
+
};
|
|
22517
22522
|
if ("description" in input && input.description !== void 0) data.description = input.description;
|
|
22518
22523
|
if ("metadata" in input && input.metadata !== void 0) data.metadata = input.metadata;
|
|
22519
22524
|
if ("inputSchema" in input && input.inputSchema !== void 0) data.inputSchema = input.inputSchema;
|