Files
supabase/studio/components/grid/query/Query.ts
T
2022-05-25 16:50:33 -02:30

19 lines
422 B
TypeScript

import { IQueryAction, QueryAction } from './QueryAction';
interface IQuery {
from: (table: string, schema?: string) => IQueryAction;
}
export class Query implements IQuery {
/**
* @param name the table name.
* @param schema the table schema, by default set to 'public'.
*/
from(name: string, schema?: string) {
return new QueryAction({
name,
schema: schema ?? 'public',
});
}
}