TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
221 stars 87 forks source link

Passing an apostrophe to values causes error #124

Open B3none opened 2 years ago

B3none commented 2 years ago

For an Array(String) column type passing an apostrophe within the string value causes an error

TimonKK commented 2 years ago

Could you please to show code example with this bug?

B3none commented 2 years ago

Steps to re-create:

  1. Create a table with a metaKey column with type Array(String)
  2. Perform an insert and pass an array value [“doesn’t work”] to the column metaKey
  3. See clickhouse error as the apostrophe isn’t correctly escaped
SEA99 commented 2 years ago

this can fix: https://github.com/TimonKK/clickhouse/commit/a60cbc0972e00d1c1db4dbc8a32f1d9e72801dc3

SEA99 commented 2 years ago

https://github.com/TimonKK/clickhouse/pull/134 will solve

SEA99 commented 2 years ago

merged (and included into tests), try on latest version