smartclickhouse/ts/index.ts

22 lines
531 B
TypeScript
Raw Normal View History

2022-03-01 14:03:55 +00:00
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);
}
}