22 lines
531 B
TypeScript
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);
|
||
|
}
|
||
|
}
|