mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
fix CH return.
This commit is contained in:
parent
af7c6f73b0
commit
f189035a73
16 changed files with 40 additions and 34 deletions
|
|
@ -11,8 +11,8 @@ import {
|
|||
|
||||
export async function getEventMetrics(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
|
||||
export function getEvents(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
|
||||
export async function saveEvent(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
|
||||
export async function getPageviewMetrics(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { MYSQL, POSTGRESQL, CLICKHOUSE, RELATIONAL } from 'lib/constants';
|
|||
|
||||
export async function getPageviewParams(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import {
|
|||
|
||||
export async function getPageviewStats(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
|
||||
export async function getPageviews(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
|
||||
export async function savePageView(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import { getSessionByUuid } from 'queries';
|
|||
|
||||
export async function createSession(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { CLICKHOUSE, RELATIONAL } from 'lib/constants';
|
||||
import { rawQueryClickhouse, prisma, runAnalyticsQuery, runQuery } from 'lib/db';
|
||||
import { rawQueryClickhouse, findUnique, prisma, runAnalyticsQuery, runQuery } from 'lib/db';
|
||||
|
||||
export async function getSessionByUuid(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -38,5 +38,5 @@ async function clickhouseQuery(session_uuid) {
|
|||
where session_uuid = $1
|
||||
`,
|
||||
params,
|
||||
);
|
||||
).then(data => findUnique(data));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
|
||||
export async function getSessionMetrics(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
|
||||
export async function getSessions(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { getDateFormatClickhouse, rawQuery, rawQueryClickhouse, runAnalyticsQuer
|
|||
|
||||
export async function getActiveVisitors(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import {
|
|||
|
||||
export async function getWebsiteStats(...args) {
|
||||
return runAnalyticsQuery({
|
||||
[`${RELATIONAL}`]: () => relationalQuery(...args),
|
||||
[`${CLICKHOUSE}`]: () => clickhouseQuery(...args),
|
||||
[RELATIONAL]: () => relationalQuery(...args),
|
||||
[CLICKHOUSE]: () => clickhouseQuery(...args),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue