MCPcopy
hub / github.com/drizzle-team/drizzle-orm / func

Function func

integration-tests/tests/gel/gel.test.ts:2587–2605  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2585 );
2586
2587 const func = () =>
2588 db
2589 .with(intervals)
2590 .select({
2591 startTime: intervals.startTime,
2592 endTime: intervals.endTime,
2593 count: sql<number>`count(${metricEntry})`,
2594 })
2595 .from(metricEntry)
2596 .rightJoin(
2597 intervals,
2598 and(
2599 eq(metricEntry.id1, metricId),
2600 gte(metricEntry.createdAt, intervals.startTime),
2601 lt(metricEntry.createdAt, intervals.endTime),
2602 ),
2603 )
2604 .groupBy(intervals.startTime, intervals.endTime)
2605 .orderBy(asc(intervals.startTime));
2606
2607 await expect(
2608 (async () => {

Callers 1

gel.test.tsFile · 0.70

Calls 9

andFunction · 0.90
eqFunction · 0.90
gteFunction · 0.90
ltFunction · 0.90
ascFunction · 0.90
orderByMethod · 0.45
fromMethod · 0.45
selectMethod · 0.45
withMethod · 0.45

Tested by

no test coverage detected