Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@latitude-data/clickhouse-connector

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@latitude-data/clickhouse-connector - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

11

CHANGELOG.md
# @latitude-data/clickhouse-connector
## 1.1.0
### Minor Changes
- 43179d6: Now query behaviour can be configured either in the source config file or the query themselves by adding a custom keyword. The first available option is `ttl`, that defines the cached lifetime of the query results in the server, before having to be refetched again.
### Patch Changes
- Updated dependencies [43179d6]
- @latitude-data/base-connector@1.1.0
## 1.0.0

@@ -4,0 +15,0 @@

2

dist/index.d.ts

@@ -25,3 +25,3 @@ import { BaseConnector, CompiledQuery, ResolvedParam } from '@latitude-data/base-connector';

resolve(value: unknown, id: number): ResolvedParam;
runQuery(query: CompiledQuery): Promise<QueryResult>;
runQuery(compiledQuery: CompiledQuery): Promise<QueryResult>;
private buildConnectionParams;

@@ -28,0 +28,0 @@ private buildTLSConfig;

@@ -26,8 +26,8 @@ import { BaseConnector, ConnectionError, QueryError } from '@latitude-data/base-connector';

}
runQuery(query) {
runQuery(compiledQuery) {
return new Promise((resolve, reject) => {
this.client
.query({
query: query.sql,
query_params: this.buildQueryParams(query.params),
query: compiledQuery.sql,
query_params: this.buildQueryParams(compiledQuery.resolvedParams),
format: 'JSONCompact', // https://clickhouse.com/docs/en/interfaces/formats#jsoncompact

@@ -34,0 +34,0 @@ })

{
"name": "@latitude-data/clickhouse-connector",
"version": "1.0.0",
"version": "1.1.0",
"license": "LGPL",

@@ -21,3 +21,3 @@ "description": "ClickHouse connector for Latitude",

"@clickhouse/client": "^1.0.1",
"@latitude-data/base-connector": "^1.0.3",
"@latitude-data/base-connector": "^1.1.0",
"@latitude-data/query_result": "^0.2.0"

@@ -24,0 +24,0 @@ },

@@ -72,3 +72,5 @@ import { vi, describe, it, expect, beforeEach } from 'vitest'

sql: 'SELECT * FROM table',
params: [],
resolvedParams: [],
accessedParams: {},
config: {},
})

@@ -96,5 +98,10 @@

await expect(
connector.runQuery({ sql: 'SELECT * FROM table', params: [] }),
connector.runQuery({
sql: 'SELECT * FROM table',
resolvedParams: [],
accessedParams: {},
config: {},
}),
).rejects.toThrow('query error')
})
})

@@ -56,8 +56,8 @@ import {

runQuery(query: CompiledQuery): Promise<QueryResult> {
runQuery(compiledQuery: CompiledQuery): Promise<QueryResult> {
return new Promise((resolve, reject) => {
this.client
.query({
query: query.sql,
query_params: this.buildQueryParams(query.params),
query: compiledQuery.sql,
query_params: this.buildQueryParams(compiledQuery.resolvedParams),
format: 'JSONCompact', // https://clickhouse.com/docs/en/interfaces/formats#jsoncompact

@@ -64,0 +64,0 @@ })

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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