Skip to content

feat(formulation): expose queryParamPushdown + pushdown apply helper; make pagination fully drivable#106

Merged
general-kroll-4-life merged 4 commits into
mainfrom
feature/any-sdk-updates
Jun 28, 2026
Merged

feat(formulation): expose queryParamPushdown + pushdown apply helper; make pagination fully drivable#106
general-kroll-4-life merged 4 commits into
mainfrom
feature/any-sdk-updates

Conversation

@jeffreyaven

@jeffreyaven jeffreyaven commented Jun 28, 2026

Copy link
Copy Markdown
Member

What

Additive, backward-compatible OData query-option push-down + pagination scaffolding for downstream stackql (stackql #659, #677, #591). Closes #105.

A. Expose QueryParamPushdown on the public surface

  • Add GetQueryParamPushdown() (QueryParamPushdown, bool) to the public OperationStore.
  • Add public interfaces QueryParamPushdown, SelectPushdown, FilterPushdown, OrderByPushdown, TopPushdown, SkipPushdown, CountPushdown (internal JSONLookup omitted).
  • Wrapper accessors on wrappedOperationStore/wrappedStandardOperationStore + wrapped*Pushdown delegates.
  • Honours the existing Method -> Resource -> Service -> ProviderService -> Provider inheritance.

B. Dialect-aware translation/apply helper

  • ApplyPushdown(PushdownConfigSource, PushdownIntent) PushdownResult: neutral input struct, interface-typed result (no mutable carrier leaked).
  • Partial-pushdown contract: unsupported columns/operators/dialects fall to ResidualPredicates; projection/order-by are all-or-nothing.
  • OData: $filter (eq/ne/gt/ge/lt/le/startswith/endswith/contains joined by and), $select, $orderby, $top (clamped to maxValue), $skip (clamped to maxValue), $count=true (+ response key). Custom dialect uses configured param names only. Absent config = no-op, all predicates residual.

C. SkipPushdown (closes #105 part 1)

  • internal/anysdk/query_param_pushdown.go: SkipPushdown interface + standardSkipPushdown (dialect/paramName/maxValue), $skip default, GetSkip(), struct field, JSONLookup case. SQL OFFSET N -> OData $skip=N.

D. odata_next_link pagination algorithm (closes #105 part 2)

  • internal/anysdk/pagination.go: PaginationAlgorithmODataNextLink = "odata_next_link" registered constant. Caller drives the follow/strip/terminate loop using the public Pagination / TokenSemantic accessors, mirroring page_number (no engine code in any-sdk).

E. Pagination drivability

  • Add GetAlgorithm() and GetArgs() map[string]interface{} to public TokenSemantic (args as a plain map). page_number (request key + start value + total_pages terminator), @odata.nextLink, and $skip offset are all drivable through the public surface.

F. GraphQL LIMIT push-down

  • Verified only, no change: NewStandardGQLReaderFull substitutes constInput (paramMap) into the query template via text/template, so stackql can inject a SQL LIMIT as a query variable.

Tests

  • Internal: SkipPushdown (OData defaults / custom / absent) + odata_next_link constant pin.
  • Public: pushdown apply (full OData, partial/residual, custom dialect, count, top clamp, skip full/clamp/custom/absent, absent-config no-op) + page_number / @odata.nextLink / $skip drivability.

Notes

  • page_number stop condition: result_info.page >= result_info.total_pages (responseToken vs responseTerminator).
  • Suggested release tag after merge: v0.5.3-alpha07 (keeps v0.5.3-alpha06 pagination accessors intact).

additional changes

Bumped all actions/* GitHub Actions to their latest major floating tags to clear the Node 20 deprecation warnings (now all run on Node 24): checkout v7, setup-go v6, setup-python v6, upload-artifact v7, download-artifact v8 (build.yml, provider-analysis.yml, mock-experiment.yml). setup-go v6 enables module caching by default, and these jobs run setup-go before checkout (no go.mod yet), so added cache: false to the setup-go steps to restore prior no-cache behaviour and avoid a "Dependencies file is not found" warning. Left google-github-actions/*, snok/install-poetry, and the app-managed claude.yml untouched. The macos-latest migration notice is an informational GitHub runner-image message unrelated to these changes (resolvable only by pinning a specific macOS runner label).

Closes #105.

@general-kroll-4-life general-kroll-4-life merged commit 2ae35f1 into main Jun 28, 2026
10 checks passed
@general-kroll-4-life general-kroll-4-life deleted the feature/any-sdk-updates branch June 28, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Complete the OData scaffolding: add SkipPushdown + named odata_next_link pagination algorithm

2 participants