8000 Feature request: server-side :limit clause for Datalog queries · Issue #310 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

Feature request: server-side :limit clause for Datalog queries #310

Closed as not planned

Description

@adityamukho

Context

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

  1. added this to the milestone on Aug 24, 2026
  2. modified the milestones: , v3.1.0 on Sep 26, 2026
  3. modified the milestones: v3.1.0, v3.0.0 on Oct 9, 2026
  4. adityamukho commented on Oct 14, 2026

    @adityamukho
    CollaboratorAuthor

    Duplicate of #306, which now tracks :limit/:offset. This issue's points are copied there.

  5. added a commit that references this issue on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0