TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
220 stars 122 forks source link

Is it possible to get `meta` and `statistics` when using `.stream()`? #114

Closed mike-luabase closed 2 years ago

mike-luabase commented 2 years ago

found it:

clickhouse.query(`SELECT number FROM system.numbers LIMIT 10`).stream()
            .on('data', function(d) {
                console.log('clickhouse: ', d)
            })
            .on('error', err => {
                console.error('stream error: ', err);
            })
            .on('meta', d => {
                console.log('stream meta: ', d);
            })