mirror of
https://github.com/supabase/supabase.git
synced 2026-05-30 09:23:00 +08:00
* 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>
13 lines
626 B
TypeScript
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,
|
|
}
|