mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 10:55:06 +03:00
* fix: move table create update delete to query route * chore: implement query to fetch a single table * fix: retrieve table after update * chore: assign type to update table payload * chore: use updated table columns for edit * chore: make executeSql castable with generic (#35685) * Chore/refactor derivate more types from queries (#35687) * chore: make executeSql castable with generic * chore: derivate types from performed queries - It allows to decouple more the frontend logic and the pg-meta/sql-query logic allowing to reduce the number of cast and get closer types between what we do fetch and what we expect in our components * fix: remove existing check * chore: handle null comment and check * fix: format check name as identifier --------- Co-authored-by: avallete <andrew.valleteau@supabase.io> Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
13 lines
508 B
TypeScript
13 lines
508 B
TypeScript
export const tableKeys = {
|
|
list: (projectRef: string | undefined, schema?: string, includeColumns?: boolean) =>
|
|
['projects', projectRef, 'tables', schema, includeColumns].filter(Boolean),
|
|
retrieve: (projectRef: string | undefined, name: string, schema: string) =>
|
|
['projects', projectRef, 'tables', schema, name].filter(Boolean),
|
|
rolesAccess: (projectRef: string | undefined, schema: string, table: string) => [
|
|
'projects',
|
|
projectRef,
|
|
'roles-access',
|
|
{ schema, table },
|
|
],
|
|
}
|