You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: server-side :limit clause for Datalog queries #310
From temporal_reasoning (a client project embedding minigraf for bi-temporal graph memory). Its memory-retrieval design (issue #118 and a follow-up bi-temporal index redesign) needs to bound query result sets to avoid materializing large result sets in the calling process on every read.
Problem
minigraf's Datalog query surface has no way to bound results server-side. This was investigated during temporal_reasoning's own #117 fix and re-confirmed during the #118 follow-up: the only query surface is MiniGrafDbProtocol.execute(datalog: str) -> str, and the grammar (per .wiki/Datalog-Reference.md) has no :limit keyword anywhere in find-spec/query-spec. Every caller that wants a bounded result set has to fetch the full matching set and truncate client-side in the embedding language.
For temporal_reasoning's use case specifically, this means a full-text-relevance-ranked query (SQLite FTS5, layered on top of facts sourced from minigraf) has to fetch every matching row before it can rank-and-truncate — the exact shape a native :limit would let the query engine handle directly instead.
Request
A native :limit N clause (and ideally :offset N for pagination) in the query grammar, so embedding applications can bound work at the query-engine level rather than over-fetching and truncating after the fact.
Activity
adityamukho commentedon Oct 14, 2026
Duplicate of #306, which now tracks
:limit/:offset. This issue's points are copied there.Merge pull request #586 from project-minigraf/docs/310-duplicate-refs