Skip to content

refactor(sdk)!: restructure query builder + command naming to match new API routes #199

Description

@EricAndrechek

Restructure the structured builder and rename commands/functions to match the newly changed API routes and simplify the surface.

Breaking — coordinate a CHANGELOG entry + migration note.

Acceptance

  • Builder maps cleanly onto the new API routes
  • Renames documented with a migration note
  • CHANGELOG breaking-change entry

Part of #194

Activity

  1. self-assigned this
    on Jun 2, 2026
  2. added
    enhancementNew feature or request
    area/queryStructured query AST, SQL builder
    area/sdkTypeScript SDK (clients/ts/)
    breaking-changeBreaking change to public API, CLI, or config
    on Jun 2, 2026
  3. moved this from Backlog to Ready in WaveHouse Task Boardon Jun 2, 2026
  4. EricAndrechek commented on Jun 4, 2026

    @EricAndrechek
    MemberAuthor

    SDK ergonomics input from nas-observability dogfooding (jfwoods, 2026-05-05) — two friction points worth folding into the query-builder restructure:

    1. liveQuery discoverability — it lives on QueryBuilder (.select().liveQuery(...)), not on TableRef, but live-streaming is the most common reason users reach for .from(table). Consider a TableRef.liveQuery(...) shorthand, or at least document the chain in the TableRef docstring.
    2. Database constraint friendliness — DB extends Record<string, Record<string, unknown>> rejects the natural interface MyDB { table: MyRow } (no index signature), forcing a manual [t: string]: Record<string, unknown>. Either relax to a structural shape explicit-key interfaces satisfy, or document the workaround prominently.
  5. moved this from Ready to Backlog in WaveHouse Task Boardon Jun 9, 2026
  6. EricAndrechek commented on Aug 25, 2026

    @EricAndrechek
    MemberAuthor

    Triage note — one constraint to carry into this restructure: #483 is an open, present-tense contract defect in the current builder. selectAll() preserves previously selected columns and select() preserves the selectAll state, so select('page').selectAll() silently changes the projection and selectAll().count() reaches the server and 400s. The docs already claim these are mutually exclusive.

    #483 was considered for folding into this issue and kept discrete — it's live today, and this restructure has no timeline. But whichever lands first, the other has to agree: if this restructure ships before #483 is fixed, the new builder needs to enforce (or explicitly document) that exclusivity rather than inherit the current ambiguity.

    Related: #483.


    Triage note from the pm-triage routine, 2026-08-25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/apiHTTP handlers, routing, middlewarearea/queryStructured query AST, SQL builderarea/sdkTypeScript SDK (clients/ts/)breaking-changeBreaking change to public API, CLI, or configenhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions