@mastra/mysql 0.8.5 → 0.8.6-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/README.md +2 -1
- package/dist/docs/SKILL.md +22 -0
- package/dist/docs/assets/SOURCE_MAP.json +6 -0
- package/dist/docs/references/integrations-databases-mysql.md +147 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7296,6 +7296,10 @@ var MemoryMySQL = class MemoryMySQL extends MemoryStorage {
|
|
|
7296
7296
|
const [currentRows] = await connection.execute(`SELECT ${omCol("bufferedObservationChunks")} FROM ${OM_TABLE_QUOTED} WHERE ${omCol("id")} = ? FOR UPDATE`, [input.id]);
|
|
7297
7297
|
if (!currentRows || currentRows.length === 0) throwOMNotFound(input.id, "UPDATE_BUFFERED_OBSERVATIONS");
|
|
7298
7298
|
const existingChunks = parseBufferedChunks(currentRows[0].bufferedObservationChunks);
|
|
7299
|
+
if (existingChunks.some((existing) => existing.cycleId === input.chunk.cycleId)) {
|
|
7300
|
+
await connection.commit();
|
|
7301
|
+
return;
|
|
7302
|
+
}
|
|
7299
7303
|
const newChunk = {
|
|
7300
7304
|
id: `ombuf-${randomUUID()}`,
|
|
7301
7305
|
cycleId: input.chunk.cycleId,
|
|
@@ -8052,6 +8056,7 @@ var ObservabilityMySQL = class ObservabilityMySQL extends ObservabilityStorage {
|
|
|
8052
8056
|
}
|
|
8053
8057
|
}
|
|
8054
8058
|
async batchDeleteTraces(args) {
|
|
8059
|
+
this.assertUnscopedBatchDeleteTraces(args);
|
|
8055
8060
|
try {
|
|
8056
8061
|
if (!args.traceIds.length) return;
|
|
8057
8062
|
const keys = args.traceIds.map((traceId) => ({ traceId }));
|