mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
add sqlocal connection including example
This commit is contained in:
@@ -75,6 +75,7 @@ export type DbFunctions = {
|
||||
const CONN_SYMBOL = Symbol.for("bknd:connection");
|
||||
|
||||
export abstract class Connection<DB = any> {
|
||||
protected initialized = false;
|
||||
kysely: Kysely<DB>;
|
||||
protected readonly supported = {
|
||||
batching: false,
|
||||
@@ -89,6 +90,11 @@ export abstract class Connection<DB = any> {
|
||||
this[CONN_SYMBOL] = true;
|
||||
}
|
||||
|
||||
// @todo: consider moving constructor logic here, required by sqlocal
|
||||
async init(): Promise<void> {
|
||||
this.initialized = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a helper function to manage Connection classes
|
||||
* coming from different places
|
||||
|
||||
Reference in New Issue
Block a user