cannot pass INT as bind variable in CTE [with repro]
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 322
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
For some reason there is a type check that is failing if I try to pass an INT value into a CTE. It seems the type checking will only allow a STRING to be passed.
prepare sql: 'with test as ( select ? as some_string, ? as some_int from dummy) select * from test'
bind variables: ['testString', 1234]
error: 'Cannon set parameter at row: 1. Argument must be a string'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported CTE query with the two bind variables, using the prepared SQL and values shown in the issue. Trace the parameter handling for CTE queries and verify that an integer bind is accepted alongside the string; done means the reproduction no longer reports that the argument must be a string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100