diff --git a/libs/questdb-client/src/influx-writer.ts b/libs/questdb-client/src/influx-writer.ts index fe66a5f..62b0a71 100644 --- a/libs/questdb-client/src/influx-writer.ts +++ b/libs/questdb-client/src/influx-writer.ts @@ -1,5 +1,5 @@ import { getLogger } from '@stock-bot/logger'; -import type { BaseTimeSeriesData, InfluxLineData, InfluxWriteOptions } from './types'; +import type { InfluxLineData, InfluxWriteOptions } from './types'; // Interface to avoid circular dependency interface QuestDBClientInterface { @@ -185,11 +185,11 @@ export class QuestDBInfluxWriter { }; if (execution.orderId) { - tags.order_id = execution.orderId; + tags['order_id'] = execution.orderId; } if (execution.strategy) { - tags.strategy = execution.strategy; + tags['strategy'] = execution.strategy; } await this.writePoint( @@ -224,7 +224,7 @@ export class QuestDBInfluxWriter { }; if (metrics.errorCode) { - tags.error_code = metrics.errorCode; + tags['error_code'] = metrics.errorCode; } await this.writePoint( diff --git a/libs/questdb-client/src/query-builder.ts b/libs/questdb-client/src/query-builder.ts index 7d8e368..2dc1a19 100644 --- a/libs/questdb-client/src/query-builder.ts +++ b/libs/questdb-client/src/query-builder.ts @@ -1,10 +1,8 @@ import { getLogger } from '@stock-bot/logger'; import type { - AggregationQuery, QueryResult, TableNames, TimeRange, - TimeSeriesQuery, } from './types'; // Interface to avoid circular dependency diff --git a/libs/questdb-client/src/schema.ts b/libs/questdb-client/src/schema.ts index a873e12..b5e3c77 100644 --- a/libs/questdb-client/src/schema.ts +++ b/libs/questdb-client/src/schema.ts @@ -1,5 +1,5 @@ import { getLogger } from '@stock-bot/logger'; -import type { IndexDefinition, QueryResult, TableNames, TableSchema } from './types'; +import type { QueryResult, TableSchema } from './types'; // Interface to avoid circular dependency interface QuestDBClientInterface { @@ -299,7 +299,7 @@ export class QuestDBSchemaManager { /** * Create table partitions for future dates */ - public async createPartitions(tableName: string, days: number = 30): Promise { + public async createPartitions(tableName: string, _days: number = 30): Promise { // QuestDB handles partitioning automatically based on the PARTITION BY clause // This method is for future extensibility this.logger.info(`Partitioning is automatic for table ${tableName}`); @@ -337,16 +337,6 @@ export class QuestDBSchemaManager { return sql; } - /** - * Build index creation SQL (for future use) - */ - private buildCreateIndexSQL(tableName: string, index: IndexDefinition): string { - const indexName = `idx_${tableName}_${index.columns.join('_')}`; - const columns = index.columns.join(', '); - - // QuestDB uses different index syntax, this is for future compatibility - return `CREATE INDEX ${indexName} ON ${tableName} (${columns})`; - } /** * Validate schema definition