mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 07:39:07 +03:00
* add selected logs to url * Add mocks for nuqs package. * fix layout issues n remove magic numbers for height * fix chart height issue * fix bug where logs not in first page wouldnt load correctly * fix spacing between charts and header * fix postgtres_logs issues, improve size in log detail * fix borders * fix default renderer * fix detail width * rm maxheight references * fix tests * fix typeerrs * fix stories typerr * improve colelctions empty state * move state UP for logs and warehouse tables * cleanup * rm params * rm params * rm params * fix log explorer selection * fix tests types * cleanup divs * fix selected log delay * use isEq for comparison in rows * fix selection stuck open * fix btnlink combo --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
20 lines
502 B
TypeScript
20 lines
502 B
TypeScript
import { useWarehouseQueryQuery } from './warehouse-query'
|
|
|
|
export function useWarehouseLogDetailQuery({
|
|
ref,
|
|
collectionName,
|
|
logId,
|
|
columns = ['id', 'timestamp'],
|
|
}: {
|
|
ref: string
|
|
collectionName?: string
|
|
logId?: string
|
|
columns?: string[]
|
|
}) {
|
|
const enabled = !!logId && !!collectionName
|
|
const sql = `select ${columns.join(',')} from \`${collectionName}\`
|
|
where id = '${logId}' and timestamp > '2024-01-01' limit 1`
|
|
|
|
return useWarehouseQueryQuery({ ref, sql }, { enabled })
|
|
}
|