mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
reworked html serving, added new permissions for api/auth, updated adapters
This commit is contained in:
@@ -42,6 +42,7 @@ export type DbFunctions = {
|
||||
};
|
||||
|
||||
export abstract class Connection {
|
||||
cls = "bknd:connection";
|
||||
kysely: Kysely<any>;
|
||||
|
||||
constructor(
|
||||
@@ -52,6 +53,15 @@ export abstract class Connection {
|
||||
this.kysely = kysely;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a helper function to manage Connection classes
|
||||
* coming from different places
|
||||
* @param conn
|
||||
*/
|
||||
static isConnection(conn: any): conn is Connection {
|
||||
return conn?.cls === "bknd:connection";
|
||||
}
|
||||
|
||||
getIntrospector(): ConnectionIntrospector {
|
||||
return this.kysely.introspection as ConnectionIntrospector;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user