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,
);
}
}