Query.ts18 lines · main
1import { IQueryAction, QueryAction } from './QueryAction'
2
3interface IQuery {
4 from: (table: string, schema?: string) => IQueryAction
5}
6
7export class Query implements IQuery {
8 /**
9 * @param name the table name.
10 * @param schema the table schema, by default set to 'public'.
11 */
12 from(name: string, schema?: string) {
13 return new QueryAction({
14 name,
15 schema: schema ?? 'public',
16 })
17 }
18}