refactoring to remove a lot of junk
This commit is contained in:
parent
5318158e59
commit
d858222af7
33 changed files with 505 additions and 367 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue