kin: auto-commit after pipeline

This commit is contained in:
Gros Frumos 2026-03-18 22:20:05 +02:00
parent 710b284e3f
commit f1c868e335
3 changed files with 490 additions and 2 deletions

View file

@ -484,11 +484,15 @@ def get_decisions(
if category:
query += " AND d.category = ?"
params.append(category)
if types:
if types is not None:
if not types:
return []
placeholders = ", ".join("?" for _ in types)
query += f" AND d.type IN ({placeholders})"
params.extend(types)
if tags:
if tags is not None:
if not tags:
return []
query += """ AND d.id IN (
SELECT d2.id FROM decisions d2, json_each(d2.tags) AS t
WHERE t.value IN ({})