node-jdbc-driver
Version:
This package is help to use jdbc connection
33 lines (32 loc) • 1.44 kB
TypeScript
import IConnectionConfig from "./IConfig";
import IDrivers from "./IDrivers";
import Drivers from './drivers';
export declare enum ConnectionType {
hive = "hive",// using hive driver
postgreSql = "postgresql",// using postgre sql driver
sqlite = "sqlite",// using sqlite driver
tibero = "tibero",// using tibero driver
custom = "custom"
}
export default class JdbcDriver<T extends ConnectionType> extends Drivers<T> implements IDrivers {
protected static connection: any;
protected type: T;
constructor(type: T, config: IConnectionConfig<T>);
get_version: () => string;
findAll: (tableName: string) => Promise<unknown>;
count: (tableName: any) => Promise<unknown>;
find: (tableName: string, where?: number | string) => Promise<unknown>;
connection_count: () => any;
connection_details: () => any;
get_columns: (tableName: string) => Promise<unknown>;
get_table_properties: (tableName: string) => Promise<unknown>;
sql: (sql: string) => Promise<unknown>;
ddl: (sql: string) => Promise<unknown>;
protected close: (connObj: any) => Promise<void>;
protected executeQuery: (sql: any) => Promise<unknown>;
protected executeUpdate: (sql: any) => Promise<unknown>;
protected createStatement: () => Promise<unknown>;
protected open: () => Promise<unknown>;
protected is_init: (conn: any) => any;
protected init: (connection: any) => Promise<unknown>;
}