mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 21:59:16 +03:00
* chore(studio): move Query to pgMeta add tests - Move the Query builder from studio to pgMeta - Add e2e tests over the generated sql to ensure syntax and runtime result over pg database - fix bug with orde by for table with undefined column * chore: fix query import path * chore: set ES target for lint * chore: add github action for pg-meta test package * chore: add tsconfig to sparse checkout
19 lines
419 B
TypeScript
19 lines
419 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',
|
|
})
|
|
}
|
|
}
|