clickhouse-ts
Advanced tools
Comparing version 1.3.10 to 1.3.11
@@ -9,3 +9,3 @@ { | ||
"files": [ "dist", "src" ], | ||
"version": "1.3.10", | ||
"version": "1.3.11", | ||
"license": "ISC", | ||
@@ -12,0 +12,0 @@ "description": "Clickhouse client on TypeScript using redis caching queries", |
@@ -62,2 +62,3 @@ # clickhouse-ts | ||
) | ||
clickhouseInstance.useCaching('redis', new Redis()) | ||
@@ -68,20 +69,7 @@ | ||
}) | ||
``` | ||
clickhouseInstance | ||
.query('WITH now() as t SELECT t', { | ||
responseFormat: 'TSV', | ||
// ...another query options | ||
}) | ||
.then(result => result.data.data) | ||
.catch(e => serializeError(e)) | ||
## Cache | ||
clickhouseInstance.query(` | ||
CREATE TABLE strings ( | ||
date DateTime('UTC'), | ||
string String | ||
) Engine = ReplacingMergeTree() | ||
PARTITION BY toMonday(date) | ||
ORDER BY (date, string) | ||
`) | ||
```js | ||
const response = clickhouseInstance | ||
@@ -109,3 +97,7 @@ .cache( | ||
*/ | ||
``` | ||
## Insert | ||
```js | ||
const response = clickhouseInstance | ||
@@ -133,2 +125,23 @@ .insert( | ||
*/ | ||
``` | ||
## Query | ||
```js | ||
clickhouseInstance | ||
.query('WITH now() as t SELECT t', { | ||
responseFormat: 'TSV', | ||
// ...another query options | ||
}) | ||
.then(result => result.data.data) | ||
.catch(e => serializeError(e)) | ||
clickhouseInstance.query(` | ||
CREATE TABLE strings ( | ||
date DateTime('UTC'), | ||
string String | ||
) Engine = ReplacingMergeTree() | ||
PARTITION BY toMonday(date) | ||
ORDER BY (date, string) | ||
`) | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66402
143