Skip to content

Push GetRoots limit/offset pagination into SurrealStore::get_children #1167

Closed

Description

@malibio

Context

PR #1165 added GetRoots RPC wired to SurrealStore::get_children(None). The proto exposes limit and offset fields on GetRootsRequest, but the daemon handler currently applies them in application memory (skip/truncate on a fully-fetched Vec).

This was noted in the PR review and documented in the proto with a comment referencing this issue.

Work Required

Extend SurrealStore::get_children to accept an optional NodeQuery (or limit/offset directly) and push LIMIT $limit START AT $offset into the SurrealDB query. The existing SELECT * statement makes this straightforward.

Impact

Low priority — no current caller passes non-zero limit/offset to GetRoots. The full-scan behaviour is harmless at dev-database scale but should be fixed before any production use with large node counts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions