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.16 to 1.3.17

1

dist/src/caching/RedisCacheManager.d.ts

@@ -8,2 +8,3 @@ /// <reference types="node" />

chunkTTLSeconds: number;
chunkExpireTimeSeconds: number;
chunkSizeLimit: number;

@@ -10,0 +11,0 @@ chunkResolverIntervalSeconds: number;

5

dist/src/caching/RedisCacheManager.js

@@ -48,3 +48,3 @@ "use strict";

if (chunkNamespaceTTL < 0) {
await __classPrivateFieldGet(this, _RedisCacheManager_instance, "f").expireat(chunkNamespace, now.add(6, 'h').unix());
await __classPrivateFieldGet(this, _RedisCacheManager_instance, "f").expireat(chunkNamespace, now.add(__classPrivateFieldGet(this, _RedisCacheManager_options, "f").chunkExpireTimeSeconds ?? 86400, 's').unix());
}

@@ -118,2 +118,5 @@ // const chunkFull = await this.#instance!.llen(chunkNamespace) >= this.#options.chunkSizeLimit

});
if (options.chunkExpireTimeSeconds <= options.chunkTTLSeconds) {
throw new Error('chunkExpireTimeSeconds must be greater then chunkTTLSeconds');
}
__classPrivateFieldSet(this, _RedisCacheManager_tableChunks, {}, "f");

@@ -120,0 +123,0 @@ __classPrivateFieldSet(this, _RedisCacheManager_options, options, "f");

@@ -39,2 +39,3 @@ "use strict";

chunkTTLSeconds: __classPrivateFieldGet(this, _Clickhouse_options, "f").cache.chunkTTLSeconds,
chunkExpireTimeSeconds: __classPrivateFieldGet(this, _Clickhouse_options, "f").cache.chunkExpireTimeSeconds,
chunkSizeLimit: __classPrivateFieldGet(this, _Clickhouse_options, "f").cache.chunkSizeLimit,

@@ -41,0 +42,0 @@ chunkResolverIntervalSeconds: __classPrivateFieldGet(this, _Clickhouse_options, "f").cache.chunkResolverIntervalSeconds,

@@ -19,2 +19,3 @@ /// <reference types="node" />

chunkTTLSeconds: number;
chunkExpireTimeSeconds: number;
chunkResolverIntervalSeconds: number;

@@ -21,0 +22,0 @@ chunkSizeLimit: number;

@@ -12,3 +12,3 @@ {

],
"version": "1.3.16",
"version": "1.3.17",
"license": "ISC",

@@ -15,0 +15,0 @@ "description": "Clickhouse client on TypeScript using redis caching queries",

@@ -14,2 +14,3 @@ import dayjs from "dayjs";

chunkTTLSeconds: number;
chunkExpireTimeSeconds: number;
chunkSizeLimit: number;

@@ -23,2 +24,3 @@ chunkResolverIntervalSeconds: number;

chunkTTLSeconds: number,
chunkExpireTimeSeconds: number,
chunkSizeLimit: number,

@@ -30,3 +32,7 @@ chunkResolverIntervalSeconds: number,

super()
if (options.chunkExpireTimeSeconds <= options.chunkTTLSeconds) {
throw new Error('chunkExpireTimeSeconds must be greater then chunkTTLSeconds')
}
this.#tableChunks = {}
this.#options = options

@@ -62,3 +68,6 @@ }

if (chunkNamespaceTTL < 0) {
await this.#instance!.expireat(chunkNamespace, now.add(6, 'h').unix())
await this.#instance!.expireat(
chunkNamespace,
now.add(this.#options.chunkExpireTimeSeconds ?? 86400, 's').unix()
)
}

@@ -65,0 +74,0 @@

@@ -31,2 +31,3 @@ import { ClickhouseHttpClient } from '../httpClient/ClickhouseHttpClient'

chunkTTLSeconds: this.#options.cache.chunkTTLSeconds,
chunkExpireTimeSeconds: this.#options.cache.chunkExpireTimeSeconds,
chunkSizeLimit: this.#options.cache.chunkSizeLimit,

@@ -33,0 +34,0 @@ chunkResolverIntervalSeconds: this.#options.cache.chunkResolverIntervalSeconds,

@@ -33,2 +33,3 @@ import { Redis } from 'ioredis'

chunkTTLSeconds: number,
chunkExpireTimeSeconds: number,
chunkResolverIntervalSeconds: number,

@@ -35,0 +36,0 @@ chunkSizeLimit: number,

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