Hi. I see that query method of ClickHouse class have reqParams?. How to use it?
I tried like mysql: const r = await clickhouse.query('select * from table where id=? and name=?', [1, 'jane']).toPromise()
And in result i expect to list of all rows from table 'table', where id is equal to 1 and name is 'jane'
But i get error of parameter tag:
e.displayText() = DB::Exception: Syntax error: failed at position 84 ('?') (line 3, col 18): ? and name=? FORMAT JSON;\n. Expected one of: EXTRACT, TIMESTAMPADD, TIMESTAMPDIFF, TIMESTAMP_DIFF, TRIM............
I know that it was happened because i used incorrect symbol for parameter. Which symbol i should use for set parameters in query?
Hi. I see that
query
method ofClickHouse
class havereqParams?
. How to use it? I tried like mysql:const r = await clickhouse.query('select * from table where id=? and name=?', [1, 'jane']).toPromise()
And in result i expect to list of all rows from table 'table', whereid
is equal to 1 and name is 'jane' But i get error of parameter tag:I know that it was happened because i used incorrect symbol for parameter. Which symbol i should use for set parameters in query?