ClickHouse / clickhouse-js

Official JS client for ClickHouse DB
https://clickhouse.com
Apache License 2.0
205 stars 25 forks source link

There is no way to get number of inserted rows #210

Closed gorshkov-leonid closed 8 months ago

gorshkov-leonid commented 10 months ago

Describe the bug

When I insert rows in some client

INSERT INTO device_values(*)
   WITH
    (
        ....
    ) AS device_id
    SELECT ....
    WHERE device_id != 0

I can see result like

1 row(s) modified.

As the result value can be inserted or vice versa - not inserted. I did not found any way how to handle it in clickhouse-js. "1 row" is what I want to get after execution. I could check before insert and did not make insert but it would be not so atomic operation.