@mastra/pg 0.13.1-alpha.0 → 0.13.2-alpha.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +22 -0
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/operations/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts +1 -1
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/storage/domains/operations/index.ts +0 -2
- package/src/storage/domains/scores/index.ts +6 -4
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @mastra/pg
|
|
2
2
|
|
|
3
|
+
## 0.13.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a780fcd: ensure score id is generated for postgres store
|
|
8
|
+
- Updated dependencies [94f4812]
|
|
9
|
+
- Updated dependencies [e202b82]
|
|
10
|
+
- Updated dependencies [e00f6a0]
|
|
11
|
+
- @mastra/core@0.12.2-alpha.0
|
|
12
|
+
|
|
13
|
+
## 0.13.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- bf6c955: fix: Fix schema support to PostgreSQL scores and workflows storage
|
|
18
|
+
- Updated dependencies [33dcb07]
|
|
19
|
+
- Updated dependencies [d0d9500]
|
|
20
|
+
- Updated dependencies [d30b1a0]
|
|
21
|
+
- Updated dependencies [bff87f7]
|
|
22
|
+
- Updated dependencies [b4a8df0]
|
|
23
|
+
- @mastra/core@0.12.1
|
|
24
|
+
|
|
3
25
|
## 0.13.1-alpha.0
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -2156,8 +2156,6 @@ var StoreOperationsPG = class extends storage.StoreOperations {
|
|
|
2156
2156
|
` : ""}
|
|
2157
2157
|
`;
|
|
2158
2158
|
await this.client.none(sql);
|
|
2159
|
-
console.log("Alter Table SQL", tableName);
|
|
2160
|
-
console.log("timeZColumnNames", timeZColumnNames);
|
|
2161
2159
|
await this.alterTable({
|
|
2162
2160
|
tableName,
|
|
2163
2161
|
schema,
|
|
@@ -2391,17 +2389,19 @@ var ScoresPG = class extends storage.ScoresStorage {
|
|
|
2391
2389
|
}
|
|
2392
2390
|
async saveScore(score) {
|
|
2393
2391
|
try {
|
|
2392
|
+
const scoreId = crypto.randomUUID();
|
|
2394
2393
|
const { input, ...rest } = score;
|
|
2395
2394
|
await this.operations.insert({
|
|
2396
2395
|
tableName: storage.TABLE_SCORERS,
|
|
2397
2396
|
record: {
|
|
2397
|
+
id: scoreId,
|
|
2398
2398
|
...rest,
|
|
2399
2399
|
input: JSON.stringify(input),
|
|
2400
2400
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2401
2401
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
2402
2402
|
}
|
|
2403
2403
|
});
|
|
2404
|
-
const scoreFromDb = await this.getScoreById({ id:
|
|
2404
|
+
const scoreFromDb = await this.getScoreById({ id: scoreId });
|
|
2405
2405
|
return { score: scoreFromDb };
|
|
2406
2406
|
} catch (error$1) {
|
|
2407
2407
|
throw new error.MastraError(
|
|
@@ -2423,8 +2423,6 @@ var ScoresPG = class extends storage.ScoresStorage {
|
|
|
2423
2423
|
`SELECT COUNT(*) FROM ${getTableName({ indexName: storage.TABLE_SCORERS, schemaName: this.schema })} WHERE "runId" = $1`,
|
|
2424
2424
|
[runId]
|
|
2425
2425
|
);
|
|
2426
|
-
console.log(`total: ${total?.count}`);
|
|
2427
|
-
console.log(`typeof total: ${typeof total?.count}`);
|
|
2428
2426
|
if (total?.count === "0" || !total?.count) {
|
|
2429
2427
|
return {
|
|
2430
2428
|
pagination: {
|