@mastra/cloudflare 1.7.0 → 1.7.1-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.
@@ -2112,8 +2112,8 @@ var WorkflowsStorageDO = class extends _mastra_core_storage.WorkflowsStorage {
2112
2112
  countBuilder.whereAnd("workflow_name = ?", workflowName);
2113
2113
  }
2114
2114
  if (status) {
2115
- builder.whereAnd("json_extract(snapshot, '$.status') = ?", status);
2116
- countBuilder.whereAnd("json_extract(snapshot, '$.status') = ?", status);
2115
+ builder.whereAnd("CASE WHEN json_valid(snapshot) THEN json_extract(snapshot, '$.status') END = ?", status);
2116
+ countBuilder.whereAnd("CASE WHEN json_valid(snapshot) THEN json_extract(snapshot, '$.status') END = ?", status);
2117
2117
  }
2118
2118
  if (resourceId) if (await this.#db.hasColumn(fullTableName, "resourceId")) {
2119
2119
  builder.whereAnd("resourceId = ?", resourceId);
@@ -2346,4 +2346,4 @@ Object.defineProperty(exports, "WorkflowsStorageDO", {
2346
2346
  }
2347
2347
  });
2348
2348
 
2349
- //# sourceMappingURL=do-B5F-OeVJ.cjs.map
2349
+ //# sourceMappingURL=do-zOdIsGy9.cjs.map