Files
SponsorBlockServer/src/databases/IDatabase.ts
Dainius Daukševičius 08d27265fc migrate to typescript
2020-10-26 19:13:30 +02:00

14 lines
355 B
TypeScript

export interface IDatabase {
init(): void;
prepare(type: QueryType, query: string, params: any[]): any;
get<TModel>(query: string, params: any[]): TModel;
getAll<TModel>(query: string, params: any[]): TModel[];
run(query: string, params: any[]): void;
exec(query: string): any;
}
export type QueryType = 'get' | 'all' | 'run';