@mastra/mysql 0.8.6-alpha.0 → 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.
@@ -3,7 +3,7 @@ name: mastra-mysql
3
3
  description: Documentation for @mastra/mysql. Use when working with @mastra/mysql APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mysql"
6
- version: "0.8.6-alpha.0"
6
+ version: "0.8.6-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.8.6-alpha.0",
2
+ "version": "0.8.6-alpha.1",
3
3
  "package": "@mastra/mysql",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -7297,6 +7297,10 @@ var MemoryMySQL = class MemoryMySQL extends _mastra_core_storage.MemoryStorage {
7297
7297
  const [currentRows] = await connection.execute(`SELECT ${omCol("bufferedObservationChunks")} FROM ${OM_TABLE_QUOTED} WHERE ${omCol("id")} = ? FOR UPDATE`, [input.id]);
7298
7298
  if (!currentRows || currentRows.length === 0) throwOMNotFound(input.id, "UPDATE_BUFFERED_OBSERVATIONS");
7299
7299
  const existingChunks = parseBufferedChunks(currentRows[0].bufferedObservationChunks);
7300
+ if (existingChunks.some((existing) => existing.cycleId === input.chunk.cycleId)) {
7301
+ await connection.commit();
7302
+ return;
7303
+ }
7300
7304
  const newChunk = {
7301
7305
  id: `ombuf-${(0, crypto$1.randomUUID)()}`,
7302
7306
  cycleId: input.chunk.cycleId,
@@ -8053,6 +8057,7 @@ var ObservabilityMySQL = class ObservabilityMySQL extends _mastra_core_storage.O
8053
8057
  }
8054
8058
  }
8055
8059
  async batchDeleteTraces(args) {
8060
+ this.assertUnscopedBatchDeleteTraces(args);
8056
8061
  try {
8057
8062
  if (!args.traceIds.length) return;
8058
8063
  const keys = args.traceIds.map((traceId) => ({ traceId }));