chore(server): add duckdb dependency and query-cache env getters

This commit is contained in:
Philipinho
2026-04-19 20:48:16 +01:00
parent eb0f37bfe5
commit abd42fd007
3 changed files with 100 additions and 0 deletions
+1
View File
@@ -37,6 +37,7 @@
"@aws-sdk/lib-storage": "3.1014.0",
"@aws-sdk/s3-request-presigner": "3.1014.0",
"@clickhouse/client": "^1.18.2",
"@duckdb/node-api": "1.5.2-r.1",
"@fastify/cookie": "^11.0.2",
"@fastify/multipart": "^9.4.0",
"@fastify/static": "^9.0.0",
@@ -304,4 +304,32 @@ export class EnvironmentService {
getClickHouseUrl(): string {
return this.configService.get<string>('CLICKHOUSE_URL');
}
getBaseQueryCacheEnabled(): boolean {
return (
this.configService.get<string>('BASE_QUERY_CACHE_ENABLED', 'false') ===
'true'
);
}
getBaseQueryCacheMinRows(): number {
return parseInt(
this.configService.get<string>('BASE_QUERY_CACHE_MIN_ROWS', '25000'),
10,
);
}
getBaseQueryCacheMaxCollections(): number {
return parseInt(
this.configService.get<string>('BASE_QUERY_CACHE_MAX_COLLECTIONS', '50'),
10,
);
}
getBaseQueryCacheWarmTopN(): number {
return parseInt(
this.configService.get<string>('BASE_QUERY_CACHE_WARM_TOP_N', '50'),
10,
);
}
}
+71
View File
@@ -496,6 +496,9 @@ importers:
'@clickhouse/client':
specifier: ^1.18.2
version: 1.18.2
'@duckdb/node-api':
specifier: 1.5.2-r.1
version: 1.5.2-r.1
'@fastify/cookie':
specifier: ^11.0.2
version: 11.0.2
@@ -1852,6 +1855,42 @@ packages:
peerDependencies:
react: '>=16.8.0'
'@duckdb/node-api@1.5.2-r.1':
resolution: {integrity: sha512-OzBBnS0JGXMoS5mzKNY/Ylr7SshcRQiLFIoxQ4AlePwJ2fNeDL/fbHu/knjxUrXwW1fJBTUgwWftmxDdnZZb3A==}
'@duckdb/node-bindings-darwin-arm64@1.5.2-r.1':
resolution: {integrity: sha512-v35FyKOb8EJCvaiPF7k0gvKiJTXR7PPQDNoWR0Gu+YSX5O9b+DIguzt1348Of3HebHy6ATSMzlUekaVA9YXu+g==}
cpu: [arm64]
os: [darwin]
'@duckdb/node-bindings-darwin-x64@1.5.2-r.1':
resolution: {integrity: sha512-SU9dIJ1BluKkkGxi4UsP4keqkkstB2YDySF9KcYu3EZKIVM3FTv2zc7XO38dXnHOq6+F3WqhWWZvD+XU945p7A==}
cpu: [x64]
os: [darwin]
'@duckdb/node-bindings-linux-arm64@1.5.2-r.1':
resolution: {integrity: sha512-3Tra9xM3aM3denaER4KhJ6//6PpmPbik9ECBQ+sh9PyKaEgHw/0kAcKnLm5EzWUnXF0qYmZlewvkCrse8KmOYw==}
cpu: [arm64]
os: [linux]
'@duckdb/node-bindings-linux-x64@1.5.2-r.1':
resolution: {integrity: sha512-pcQvZRHiIfJ9cq8parkSQczQHEml/IeGfnDCMAbEgD6+jaV9Y9Y5Ph1kP9aR+bm6him1S5ZIEr3kZbihjKnWbA==}
cpu: [x64]
os: [linux]
'@duckdb/node-bindings-win32-arm64@1.5.2-r.1':
resolution: {integrity: sha512-Ji8tym+N3LkrhVt0Up3bsacD/kpg4/JXFJQqxswiYvBaNCQOk+D+aiVS0GN5pcqvmnG7V7TpsDRzkLEFaWp1vw==}
cpu: [arm64]
os: [win32]
'@duckdb/node-bindings-win32-x64@1.5.2-r.1':
resolution: {integrity: sha512-5XqcqC+4R8ghBEEbnc2a0sqfz1zyPBRb9YcmIWfiuDoCYSYFbKhmHcEyNftZDHcwCoLOHXnUin45jraex4STqQ==}
cpu: [x64]
os: [win32]
'@duckdb/node-bindings@1.5.2-r.1':
resolution: {integrity: sha512-bUg3bLVj70YVku6fKyQJS8ASORl7kM7YFVFznsEB9pWbtazPj+ME2x2FUk0WiTzjJdutjzSSGXF066mB4bGGZA==}
'@emnapi/core@1.8.1':
resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==}
@@ -4040,6 +4079,7 @@ packages:
'@react-email/components@1.0.10':
resolution: {integrity: sha512-r/BnqfAjr3apcvn/NDx2DqNRD5BP5wZLRdjn2IVHXjt4KmQ5RHWSCAvFiXAzRHys1BWQ2zgIc7cpWePUcAl+nw==}
engines: {node: '>=20.0.0'}
deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
peerDependencies:
react: ^18.0 || ^19.0 || ^19.0.0-rc
@@ -12265,6 +12305,37 @@ snapshots:
react: 18.3.1
tslib: 2.8.1
'@duckdb/node-api@1.5.2-r.1':
dependencies:
'@duckdb/node-bindings': 1.5.2-r.1
'@duckdb/node-bindings-darwin-arm64@1.5.2-r.1':
optional: true
'@duckdb/node-bindings-darwin-x64@1.5.2-r.1':
optional: true
'@duckdb/node-bindings-linux-arm64@1.5.2-r.1':
optional: true
'@duckdb/node-bindings-linux-x64@1.5.2-r.1':
optional: true
'@duckdb/node-bindings-win32-arm64@1.5.2-r.1':
optional: true
'@duckdb/node-bindings-win32-x64@1.5.2-r.1':
optional: true
'@duckdb/node-bindings@1.5.2-r.1':
optionalDependencies:
'@duckdb/node-bindings-darwin-arm64': 1.5.2-r.1
'@duckdb/node-bindings-darwin-x64': 1.5.2-r.1
'@duckdb/node-bindings-linux-arm64': 1.5.2-r.1
'@duckdb/node-bindings-linux-x64': 1.5.2-r.1
'@duckdb/node-bindings-win32-arm64': 1.5.2-r.1
'@duckdb/node-bindings-win32-x64': 1.5.2-r.1
'@emnapi/core@1.8.1':
dependencies:
'@emnapi/wasi-threads': 1.1.0