refactoring to remove a lot of junk

This commit is contained in:
Boki 2025-06-22 16:57:08 -04:00
parent 5318158e59
commit d858222af7
33 changed files with 505 additions and 367 deletions

View file

@ -1,26 +0,0 @@
import { QuestDBClient } from './client';
import type { QuestDBClientConfig, QuestDBConnectionOptions } from './types';
/**
* Factory function to create a QuestDB client instance
*/
export function createQuestDBClient(
config: QuestDBClientConfig,
logger?: any,
options?: QuestDBConnectionOptions
): QuestDBClient {
return new QuestDBClient(config, logger, options);
}
/**
* Create and connect a QuestDB client
*/
export async function createAndConnectQuestDBClient(
config: QuestDBClientConfig,
logger?: any,
options?: QuestDBConnectionOptions
): Promise<QuestDBClient> {
const client = createQuestDBClient(config, logger, options);
await client.connect();
return client;
}

View file

@ -28,5 +28,5 @@ export type {
InsertResult,
} from './types';
// Utils
export { createQuestDBClient, createAndConnectQuestDBClient } from './factory';
// Note: Factory functions removed - instantiate directly with new QuestDBClient()
// or use the Awilix DI container (recommended)