@mastra/pg 0.13.1 → 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 +10 -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/dist/index.js
CHANGED
|
@@ -2148,8 +2148,6 @@ var StoreOperationsPG = class extends StoreOperations {
|
|
|
2148
2148
|
` : ""}
|
|
2149
2149
|
`;
|
|
2150
2150
|
await this.client.none(sql);
|
|
2151
|
-
console.log("Alter Table SQL", tableName);
|
|
2152
|
-
console.log("timeZColumnNames", timeZColumnNames);
|
|
2153
2151
|
await this.alterTable({
|
|
2154
2152
|
tableName,
|
|
2155
2153
|
schema,
|
|
@@ -2383,17 +2381,19 @@ var ScoresPG = class extends ScoresStorage {
|
|
|
2383
2381
|
}
|
|
2384
2382
|
async saveScore(score) {
|
|
2385
2383
|
try {
|
|
2384
|
+
const scoreId = crypto.randomUUID();
|
|
2386
2385
|
const { input, ...rest } = score;
|
|
2387
2386
|
await this.operations.insert({
|
|
2388
2387
|
tableName: TABLE_SCORERS,
|
|
2389
2388
|
record: {
|
|
2389
|
+
id: scoreId,
|
|
2390
2390
|
...rest,
|
|
2391
2391
|
input: JSON.stringify(input),
|
|
2392
2392
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2393
2393
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
2394
2394
|
}
|
|
2395
2395
|
});
|
|
2396
|
-
const scoreFromDb = await this.getScoreById({ id:
|
|
2396
|
+
const scoreFromDb = await this.getScoreById({ id: scoreId });
|
|
2397
2397
|
return { score: scoreFromDb };
|
|
2398
2398
|
} catch (error) {
|
|
2399
2399
|
throw new MastraError(
|
|
@@ -2415,8 +2415,6 @@ var ScoresPG = class extends ScoresStorage {
|
|
|
2415
2415
|
`SELECT COUNT(*) FROM ${getTableName({ indexName: TABLE_SCORERS, schemaName: this.schema })} WHERE "runId" = $1`,
|
|
2416
2416
|
[runId]
|
|
2417
2417
|
);
|
|
2418
|
-
console.log(`total: ${total?.count}`);
|
|
2419
|
-
console.log(`typeof total: ${typeof total?.count}`);
|
|
2420
2418
|
if (total?.count === "0" || !total?.count) {
|
|
2421
2419
|
return {
|
|
2422
2420
|
pagination: {
|