import BasicColumn from "./column/basic-column"; import GenericsHelper from "./helpers/generics-helper"; import JoinedTablesChain from "./join/joined-tables-chain"; abstract class QueryTable { constructor(protected _$name: string) {} protected _$type: GenericsHelper; protected _$idType: GenericsHelper; // abstract readonly $id; // FIXME I got a dozen incomprehensible type errors $all = new BasicColumn(this, '*'); innerJoin>(table: JoinTable): JoinedTablesChain { return new JoinedTablesChain(table, 'inner', this); } leftJoin>(table: JoinTable): JoinedTablesChain { return new JoinedTablesChain(table, 'left', this); } rightJoin>(table: JoinTable): JoinedTablesChain { return new JoinedTablesChain(table, 'right', this); } fullJoin>(table: JoinTable): JoinedTablesChain { return new JoinedTablesChain(table, 'full', this); } } export default QueryTable;