Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteRun ¶
func ExecuteRun(ctx context.Context, drv driver.Connection, sql string, limitFlag int, write bool, expand string, full bool, compact bool, formatFlag string) error
ExecuteRun runs a SQL query on an already-resolved connection and writes results. Uses streaming (QueryStream) when the driver supports it, falling back to buffered Query.
User SQL is sent verbatim — we never modify it to inject LIMIT/TOP. Pagination is enforced client-side: we read up to `effectiveLimit+1` rows from the iterator and close the cursor early if we hit the cap. The "+1" is the probe for hasMore=true. Trade-off: the database planner doesn't know we'll stop, so huge ORDER BY queries lose LIMIT-aware optimization. Users who care put LIMIT/TOP in their own SQL — the hint on the @pagination payload nudges them in that direction.
Types ¶
This section is empty.