import { DbConfig , GetResultType } from './config' ; import { ResultSet } from './result-set' ; import { Token } from './tokens' ; export type SpecificQuery < Config extends DbConfig , DataType , Q extends Query < any > , Result = ResultSet < Config , Q , false > > = Result extends { [ K in keyof Result ] : GetResultType < Config , DataType > | GetResultType < Config , 'Null' > ; } ? Q : never ; export type BooleanQuery < Config extends DbConfig , Q extends Query < any > > = SpecificQuery < Config , boolean , Q > ; export type AnyQuery = Query < any > ; export abstract class Query < Returning > { private _queryBrand ! : [ 'query' , Returning ] ; internal abstract toTokens ( includeAlias ? ) ; internal abstract getReturningKeys ( ) ; }