File tree Expand file tree Collapse file tree
packages/foundation/types/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 */
88
99import { ObjectConfig } from "./object" ;
10- import { Driver } from "./driver" ;
1110import { MetadataRegistry } from "./registry" ;
1211import { HookName , HookHandler , HookContext } from "./hook" ;
1312import { ActionHandler , ActionContext } from "./action" ;
1413import { LoaderPlugin } from "./loader" ;
14+ // Import DriverInterface from @objectstack /spec
15+ import type { DriverInterface } from "@objectstack/spec" ;
1516
1617export interface IObjectQL {
1718 getObject ( name : string ) : ObjectConfig | undefined ;
1819 getConfigs ( ) : Record < string , ObjectConfig > ;
19- datasource ( name : string ) : Driver ;
20+ datasource ( name : string ) : DriverInterface ;
2021 init ( ) : Promise < void > ;
2122 close ?( ) : Promise < void > ;
2223 removePackage ( name : string ) : void ;
Original file line number Diff line number Diff line change 99import { MetadataRegistry } from "./registry" ;
1010import { ObjectConfig } from "./object" ;
1111import { ObjectQLPlugin } from "./plugin" ;
12- // Import Driver from local types package
13- import type { Driver } from "./driver " ;
12+ // Import DriverInterface from @objectstack /spec
13+ import type { DriverInterface } from "@objectstack/spec " ;
1414
1515export interface ObjectQLConfig {
1616 registry ?: MetadataRegistry ;
17- datasources ?: Record < string , Driver > ;
17+ datasources ?: Record < string , DriverInterface > ;
1818 /**
1919 * Optional connection string for auto-configuration.
2020 * e.g. "sqlite://dev.db", "postgres://localhost/db", "mongodb://localhost/db"
You can’t perform that action at this time.
0 commit comments