wip event list

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-02-16 23:06:36 +01:00
parent a74acda707
commit 02d52d5da8
27 changed files with 1178 additions and 465 deletions

View File

@@ -14,7 +14,7 @@ interface ClickhouseJsonResponse<T> {
meta: { name: string; type: string }[];
}
export async function chQueryAll<T extends Record<string, any>>(
export async function chQueryWithMeta<T extends Record<string, any>>(
query: string
): Promise<ClickhouseJsonResponse<T>> {
const res = await ch.query({
@@ -42,7 +42,7 @@ export async function chQueryAll<T extends Record<string, any>>(
export async function chQuery<T extends Record<string, any>>(
query: string
): Promise<T[]> {
return (await chQueryAll<T>(query)).data;
return (await chQueryWithMeta<T>(query)).data;
}
export function formatClickhouseDate(_date: Date | string) {