smartclickhouse/ts/index.ts
2022-03-01 15:03:55 +01:00

22 lines
531 B
TypeScript

import * as plugins from './smartclickhouse.plugins';
export interface IClickhouseConstructorOptions {
url: string;
port?: number;
}
export class ClickhouseDb {
public options: IClickhouseConstructorOptions;
public clickhouseClient: plugins.clickhouse.ClickHouse;
constructor(optionsArg: IClickhouseConstructorOptions) {
this.options = optionsArg;
}
/**
* starts the connection to the Clickhouse db
*/
public start() {
this.clickhouseClient = new plugins.clickhouse.ClickHouse(this.options);
}
}