depyronick / clickhouse-client

ClickHouse Client for NodeJS
https://clickhouse.js.org
MIT License
50 stars 11 forks source link

Unexpected end of JSON input on ALTER TABLE x UPDATE fields query #31

Closed timkuilman closed 11 months ago

timkuilman commented 1 year ago

Hi there!

I am currently implementing the clickhouse-client in a project and I run into a problem executing the following promise:

await this.clickhouseClient.queryPromise<SomeInterface>( `ALTER TABLE application UPDATE status = '${newV}' WHERE status = '${current}'` )

The problem is that the underlying Axios client receives an empty string '' on the data response. This empty string cannot be parsed and throws the error.

The database update is actually executed.