@mastra/libsql 0.13.2 → 0.13.3

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/dist/index.js CHANGED
@@ -2406,7 +2406,7 @@ var WorkflowsLibSQL = class extends WorkflowsStorage {
2406
2406
  const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
2407
2407
  try {
2408
2408
  const result = await this.client.execute({
2409
- sql: `SELECT * FROM ${TABLE_WORKFLOW_SNAPSHOT} ${whereClause}`,
2409
+ sql: `SELECT * FROM ${TABLE_WORKFLOW_SNAPSHOT} ${whereClause} ORDER BY createdAt DESC LIMIT 1`,
2410
2410
  args
2411
2411
  });
2412
2412
  if (!result.rows?.[0]) {