mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
split db files
This commit is contained in:
parent
46b4b98d40
commit
bb50753704
36 changed files with 496 additions and 454 deletions
|
|
@ -1,11 +1,7 @@
|
|||
import { CLICKHOUSE, RELATIONAL } from 'lib/constants';
|
||||
import {
|
||||
rawQueryClickhouse,
|
||||
getDateFormatClickhouse,
|
||||
prisma,
|
||||
runAnalyticsQuery,
|
||||
runQuery,
|
||||
} from 'lib/db';
|
||||
import { prisma, runQuery } from 'lib/db/relational';
|
||||
import clickhouse from 'lib/clickhouse';
|
||||
import { runAnalyticsQuery } from 'lib/db/db';
|
||||
|
||||
export function getEvents(...args) {
|
||||
return runAnalyticsQuery({
|
||||
|
|
@ -32,7 +28,7 @@ function relationalQuery(websites, start_at) {
|
|||
}
|
||||
|
||||
function clickhouseQuery(websites, start_at) {
|
||||
return rawQueryClickhouse(
|
||||
return clickhouse.rawQuery(
|
||||
`
|
||||
select
|
||||
event_id,
|
||||
|
|
@ -43,7 +39,7 @@ function clickhouseQuery(websites, start_at) {
|
|||
event_name
|
||||
from event
|
||||
where website_id in (${websites.join[',']}
|
||||
and created_at >= ${getDateFormatClickhouse(start_at)})
|
||||
and created_at >= ${clickhouse.getDateFormat(start_at)})
|
||||
`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue