pushdown

package
v0.10.559 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pushdown computes, during the analysis/planning phase, the neutral query-option intent (projection / predicates / order-by / limit / offset / count) that an acquire can push to the upstream API. It is protocol-agnostic: stackql extracts the intent from the SELECT and any-sdk owns the dialect-specific translation and request application (via HTTPPreparator.WithPushdownIntent). Push-down is purely an optimisation - stackql's client-side WHERE / projection / LIMIT remain authoritative, so a partial or absent translation can never change results - and a no-op unless the method carries a queryParamPushdown config.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeIntent

ComputeIntent extracts the neutral PushdownIntent from a SELECT for the supplied method. It returns (nil, false) when the method carries no queryParamPushdown config, the node is not a simple resource-scoped scan, or nothing translatable is present. The caller hands the intent to the HTTP preparator, which performs the dialect translation and applies the resulting query params to the request inside any-sdk.

func RedactHeaderValue added in v0.10.557

func RedactHeaderValue(key string, val string, allowedInnocuous map[string]bool) string

RedactHeaderValue masks a header value for logging: alphanumerics become 'x' and the result is truncated to at most 5 characters. Keys present in allowedInnocuous (lower case) pass through unredacted.

func SelectLimit

func SelectLimit(node sqlparser.SQLNode) (int, bool)

SelectLimit returns the integer LIMIT of a SELECT when it can be pushed to the upstream fetch: only for a simple, resource-scoped scan (one table, no join / GROUP BY / DISTINCT / HAVING). For a grain-changing or multi-set query the LIMIT stays a client-side primitive. It is used by the GraphQL acquire path to bound the page size.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL