nodejs clickhouse client
npm install @watchdg/clickhouse-clientnodejs clickhouse client
``shell`
yarn add @watchdg/clickhouse-clientor
npm install @watchdg/clickhouse-client
`javascript
import {ClickhouseClient} from '@watchdg/clickhouse-client';
(async function () {
const clickhouseClient = new ClickhouseClient();
const {rows, data} = await clickhouseClient.query('select 1');
console.log(data);
})();
``
* TabSeparated (TSV)
* TabSeparatedRaw (TSVRaw)
* TabSeparatedWithNames (TSVWithNames)
* TabSeparatedWithNamesAndTypes (TSVWithNamesAndTypes)
| Clickhouse | NodeJS |
|------------|---------|
| Int8 | Number |
| Int16 | Number |
| Int32 | Number |
| UInt8 | Number |
| UInt16 | Number |
| UInt32 | Number |
| Float32 | Number |
| Float64 | Number |
| Int64 | BigInt |
| Int128 | BigInt |
| Int256 | BigInt |
| UInt64 | BigInt |
| UInt128 | BigInt |
| UInt256 | BigInt |
| Bool | Boolean |
| DateTime | Date |
| String | String |
| UUID | String |
| IPv4 | String |
| IPv6 | String |
* Nullable(T)
* Array(T)