MCPcopy
hub / github.com/umami-software/umami / getDateQuery

Function getDateQuery

src/lib/prisma.ts:225–237  ·  view source on GitHub ↗
(filters: Record<string, any>)

Source from the content-addressed store, hash-verified

223}
224
225function getDateQuery(filters: Record<string, any>) {
226 const { startDate, endDate } = filters;
227
228 if (startDate) {
229 if (endDate) {
230 return `and website_event.created_at between {{startDate}} and {{endDate}}`;
231 } else {
232 return `and website_event.created_at >= {{startDate}}`;
233 }
234 }
235
236 return '';
237}
238
239function getQueryParams(filters: Record<string, any>) {
240 return {

Callers 1

parseFiltersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected