@mastra/libsql 1.22.5-alpha.0 → 1.22.5
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
|
@@ -4781,6 +4781,7 @@ var DatasetsLibSQL = class extends DatasetsStorage {
|
|
|
4781
4781
|
//#endregion
|
|
4782
4782
|
//#region src/storage/domains/experiments/index.ts
|
|
4783
4783
|
const DEFAULT_PRUNE_BATCH_SIZE = 1e3;
|
|
4784
|
+
const TAGS_IS_JSON = `CASE typeof(tags) WHEN 'blob' THEN 1 WHEN 'text' THEN json_valid(tags) ELSE 0 END`;
|
|
4784
4785
|
var ExperimentsLibSQL = class extends ExperimentsStorage {
|
|
4785
4786
|
/**
|
|
4786
4787
|
* An experiment is pruned as a whole unit: when `experiments.completedAt` is
|
|
@@ -5516,6 +5517,10 @@ var ExperimentsLibSQL = class extends ExperimentsStorage {
|
|
|
5516
5517
|
conditions.push("status = ?");
|
|
5517
5518
|
queryParams.push(args.status);
|
|
5518
5519
|
}
|
|
5520
|
+
for (const tag of args.tags ?? []) {
|
|
5521
|
+
conditions.push(`CASE WHEN ${TAGS_IS_JSON} THEN EXISTS (SELECT 1 FROM json_each(tags) WHERE value = ?) ELSE 0 END`);
|
|
5522
|
+
queryParams.push(tag);
|
|
5523
|
+
}
|
|
5519
5524
|
if (args.filters) {
|
|
5520
5525
|
const { organizationId, projectId } = args.filters;
|
|
5521
5526
|
if (organizationId !== void 0) {
|