Filters should work

This commit is contained in:
Cyber MacGeddon 2025-09-03 22:39:57 +01:00
parent 00032ad7bf
commit dfab3e14e0

View file

@ -271,12 +271,22 @@ class Processor(FlowProcessor):
info: Info,
collection: str,
limit: Optional[int] = 100,
**filters
where: Optional[str] = None # JSON string containing filter conditions
) -> List[g_type]:
# Get the processor instance from context
processor = info.context["processor"]
user = info.context["user"]
# Parse filters from where clause if provided
filters = {}
if where:
try:
import json
filters = json.loads(where)
except json.JSONDecodeError as e:
# Invalid JSON, ignore filters
filters = {}
# Query Cassandra
results = await processor.query_cassandra(
user, collection, s_name, r_schema,