Files
supabase/apps/studio/data/table-rows/keys.ts
Alaister Young 6c592dec99 chore: remove useExecuteSqlQuery() part 2 (#30467)
* foreign-key-constraints

* update entity-types stale time

* schemas query

* deprecate useExecuteSqlQuery

* users count query

* database size query

* indexes query

* keywords query

* migrations query

* table columns

* database functions

* database roles query

* fdws query

* replication lag query

* ongoing queries query

* vault secrets query

* remove unneeded staleTime: 0

* max connections query

* fix entity types key in tests

* Some fixes

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-11-18 05:15:37 +00:00

13 lines
626 B
TypeScript

import type { GetTableRowsArgs } from './table-rows-query'
type TableRowKeyArgs = Omit<GetTableRowsArgs, 'table'> & { table?: { id?: number } }
export const tableRowKeys = {
tableRows: (projectRef?: string, { table, ...args }: TableRowKeyArgs = {}) =>
['projects', projectRef, 'table-rows', table?.id, 'rows', args] as const,
tableRowsCount: (projectRef?: string, { table, ...args }: TableRowKeyArgs = {}) =>
['projects', projectRef, 'table-rows', table?.id, 'count', args] as const,
tableRowsAndCount: (projectRef?: string, tableId?: number) =>
['projects', projectRef, 'table-rows', tableId] as const,
}