Skip to content

fix: infer execute row types from the requested row mode - #228

Open
peterolkhov wants to merge 1 commit into
planetscale:mainfrom
peterolkhov:codex/fix-execute-row-inference
Open

peterolkhov wants to merge 1 commit into
planetscale:mainfrom
peterolkhov:codex/fix-execute-row-inference

Conversation

@peterolkhov

Copy link
Copy Markdown

ExecuteOptions maps object mode to the array overload and array mode to the object overload. This flips the inferred rows on Client, Connection, and Transaction, including empty and cast-only options. This change corrects the shared mapping and adds a compiler check to npm test. Runtime behavior and explicit custom row types stay the same.

Tested locally on Node 22.16.0 and 24.22.1: npm run lint -- --fix, npm run build, and npm test passed. The compiler fixture checks 24 row types across all three APIs; it fails on the original mapping. All 42 runtime tests pass on both versions.

Prepared with OpenAI Codex assistance.

@peterolkhov
peterolkhov requested review from a team and mattrobenolt as code owners November 9, 2026 23:34
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.

1 participant