Commit 05343c8
Add Utopia Query support replacing raw filter arrays
Replace all raw $filters array parameters with Utopia\Database\Query objects
across the public API (queryEvents, sumEvents, countEvents, queryGauges,
getGauge) and high-level helpers (getMetrics, getMetricsTotals, getBreakdown).
The adapter now parses Query objects for filtering (equal, notEqual, greaterThan,
lessThan, etc.), pagination (limit, offset), ordering (orderAsc, orderDesc),
and virtual attributes (period, date) via a new parseQueries() helper. The
ClickHouse adapter translates these into parameterized SQL via buildQueryFilters().
Added utopia-php/database as a dependency for the Query class. All 105 tests
pass including new tests for Query-based filtering, pagination, and date ranges.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a33899d commit 05343c8
7 files changed
Lines changed: 2948 additions & 212 deletions
File tree
- src/Usage
- Adapter
- tests/Usage
- Adapter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments