SAP / SAP/node-hdb

cannot pass INT as bind variable in CTE [with repro]

Open
#110 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.