commit 2 refactor

This commit is contained in:
Boki 2026-10-20 14:35:45 -04:00
parent 588f666943
commit 32e43c9243
310 changed files with 33318 additions and 31189 deletions

View file

@ -1,9 +1,10 @@
import type { QueryResultRow } from 'pg';
import { getLogger } from '@stock-bot/logger';
import type { QueryResult, TableNames, TimeRange } from './types';
// Interface to avoid circular dependency
interface QuestDBClientInterface {
query<T = any>(sql: string, params?: any[]): Promise<QueryResult<T>>;
query<T = QueryResultRow>(sql: string, params?: unknown[]): Promise<QueryResult<T>>;
}
/**
@ -190,7 +191,7 @@ export class QuestDBQueryBuilder {
/**
* Build and execute the query
*/
public async execute<T = any>(): Promise<QueryResult<T>> {
public async execute<T = QueryResultRow>(): Promise<QueryResult<T>> {
const sql = this.build();
this.logger.debug('Executing query', { sql });