https://github.com/watchdg/node-clickhouse-client
nodejs clickhouse client
https://github.com/watchdg/node-clickhouse-client
Last synced: 8 months ago
JSON representation
nodejs clickhouse client
- Host: GitHub
- URL: https://github.com/watchdg/node-clickhouse-client
- Owner: WatchDG
- License: mit
- Created: 2022-05-07T11:55:54.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-23T13:31:37.000Z (about 3 years ago)
- Last Synced: 2025-02-12T17:06:17.581Z (over 1 year ago)
- Language: TypeScript
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clickhouse-client
nodejs clickhouse client
## Install
```shell
yarn add @watchdg/clickhouse-client
# or
npm install @watchdg/clickhouse-client
```
## How to use
```javascript
import {ClickhouseClient} from '@watchdg/clickhouse-client';
(async function () {
const clickhouseClient = new ClickhouseClient();
const {rows, data} = await clickhouseClient.query('select 1');
console.log(data);
})();
```
## Supported formats
* TabSeparated (TSV)
* TabSeparatedRaw (TSVRaw)
* TabSeparatedWithNames (TSVWithNames)
* TabSeparatedWithNamesAndTypes (TSVWithNamesAndTypes)
## Supported types
| 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)