Socket
Socket
Sign inDemoInstall

clickhouse-ts

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clickhouse-ts - npm Package Compare versions

Comparing version 1.3.10 to 1.3.11

2

package.json

@@ -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)
`)
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc