fix(core): update
This commit is contained in:
22
ts/index.ts
Normal file
22
ts/index.ts
Normal file
@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
}
|
5
ts/smartclickhouse.plugins.ts
Normal file
5
ts/smartclickhouse.plugins.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import * as clickhouse from 'clickhouse';
|
||||
|
||||
export {
|
||||
clickhouse
|
||||
}
|
Reference in New Issue
Block a user