mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 04:46:05 +00:00
added BaseIntrospector and reorganized connections
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
type Simplify,
|
||||
sql,
|
||||
} from "kysely";
|
||||
import type { BaseIntrospector } from "./BaseIntrospector";
|
||||
|
||||
export type QB = SelectQueryBuilder<any, any, any>;
|
||||
|
||||
@@ -23,10 +24,6 @@ export type IndexMetadata = {
|
||||
columns: { name: string; order: number }[];
|
||||
};
|
||||
|
||||
export interface ConnectionIntrospector extends DatabaseIntrospector {
|
||||
getIndices(tbl_name?: string): Promise<IndexMetadata[]>;
|
||||
}
|
||||
|
||||
export interface SelectQueryBuilderExpression<O> extends AliasableExpression<O> {
|
||||
get isSelectQueryBuilder(): true;
|
||||
toOperationNode(): SelectQueryNode;
|
||||
@@ -100,8 +97,8 @@ export abstract class Connection<DB = any> {
|
||||
return conn[CONN_SYMBOL] === true;
|
||||
}
|
||||
|
||||
getIntrospector(): ConnectionIntrospector {
|
||||
return this.kysely.introspection as ConnectionIntrospector;
|
||||
getIntrospector(): BaseIntrospector {
|
||||
return this.kysely.introspection as any;
|
||||
}
|
||||
|
||||
supportsBatching(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user