feat(formulation): expose queryParamPushdown + pushdown apply helper; make pagination fully drivable#106
Merged
Merged
Conversation
general-kroll-4-life
approved these changes
Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
GetQueryParamPushdown() (QueryParamPushdown, bool)to the publicOperationStore.QueryParamPushdown,SelectPushdown,FilterPushdown,OrderByPushdown,TopPushdown,SkipPushdown,CountPushdown(internalJSONLookupomitted).wrappedOperationStore/wrappedStandardOperationStore+wrapped*Pushdowndelegates.B. Dialect-aware translation/apply helper
ApplyPushdown(PushdownConfigSource, PushdownIntent) PushdownResult: neutral input struct, interface-typed result (no mutable carrier leaked).ResidualPredicates; projection/order-by are all-or-nothing.$filter(eq/ne/gt/ge/lt/le/startswith/endswith/contains joined byand),$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:SkipPushdowninterface +standardSkipPushdown(dialect/paramName/maxValue),$skipdefault,GetSkip(), struct field,JSONLookupcase. SQLOFFSET 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, mirroringpage_number(no engine code in any-sdk).E. Pagination drivability
GetAlgorithm()andGetArgs() map[string]interface{}to publicTokenSemantic(args as a plain map). page_number (request key + start value + total_pages terminator),@odata.nextLink, and$skipoffset are all drivable through the public surface.F. GraphQL LIMIT push-down
NewStandardGQLReaderFullsubstitutesconstInput(paramMap) into the query template viatext/template, so stackql can inject a SQLLIMITas a query variable.Tests
odata_next_linkconstant pin.Notes
result_info.page >= result_info.total_pages(responseToken vs responseTerminator).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 addedcache: falseto 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. Themacos-latestmigration notice is an informational GitHub runner-image message unrelated to these changes (resolvable only by pinning a specific macOS runner label).Closes #105.