import { Knex } from "knex" ; import { Entity , EntityConstructor , EntityManager , EntityMetadata } from "../EntityManager" ; import { FilterAndSettings } from "../QueryBuilder" ; import { JoinRow , ManyToManyCollection } from "../relations/ManyToManyCollection" ; import { OneToManyCollection } from "../relations/OneToManyCollection" ; import { OneToOneReferenceImpl } from "../relations/OneToOneReference" ; import { JoinRowTodo , Todo } from "../Todo" ; /** Isolates all SQL calls that joist needs to make to fetch/save data. */ export interface Driver { load < T extends Entity > ( em , meta , untaggedIds ) : Promise < unknown [ ] > ; loadManyToMany < T extends Entity , U extends Entity > ( em , collection , keys ) : Promise < JoinRow [ ] > ; loadOneToMany < T extends Entity , U extends Entity > ( em , collection , untaggedIds ) : Promise < unknown [ ] > ; loadOneToOne < T extends Entity , U extends Entity > ( em , reference , untaggedIds ) : Promise < unknown [ ] > ; find < T extends Entity > ( em , type , queries ) : Promise < unknown [ ] [ ] > ; transaction < T > ( em , fn , isolationLevel ? ) : Promise < T > ; flushEntities ( em , todos ) : Promise < void > ; flushJoinTables ( em , joinRows ) : Promise < void > ; }