DBAdapterDefaultMixin()
function DBAdapterDefaultMixin<TBase>(Base): (...args) => {
close: () => void | Promise<void>;
name: string;
readLock: <T>(fn, options?) => Promise<T>;
refreshSchema: () => Promise<void>;
writeLock: <T>(fn, options?) => Promise<T>;
execute: Promise<QueryResult>;
executeBatch: Promise<QueryResult>;
executeRaw: Promise<any[][]>;
get: Promise<T>;
getAll: Promise<T[]>;
getOptional: Promise<null | T>;
readTransaction: Promise<T>;
registerListener: () => void;
writeTransaction: Promise<T>;
} & TBase
A mixin to implement DBAdapter by delegating to ConnectionPool.readLock and ConnectionPool.writeLock.
Type Parameters
| Type Parameter |
|---|
TBase extends (...args) => ConnectionPool |
Parameters
| Parameter | Type |
|---|---|
Base | TBase |
Returns
(...args) => {
close: () => void | Promise<void>;
name: string;
readLock: <T>(fn, options?) => Promise<T>;
refreshSchema: () => Promise<void>;
writeLock: <T>(fn, options?) => Promise<T>;
execute: Promise<QueryResult>;
executeBatch: Promise<QueryResult>;
executeRaw: Promise<any[][]>;
get: Promise<T>;
getAll: Promise<T[]>;
getOptional: Promise<null | T>;
readTransaction: Promise<T>;
registerListener: () => void;
writeTransaction: Promise<T>;
} & TBase