You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement GetLogs queries without grouping and filter columns (#44)
### TL;DR
Updated API response structure, improved query filtering, and added aggregation support for logs.
### What changed?
- Modified `QueryResponse` structure in `api.go` to use `interface{}` for `Data` field and `map[string]string` for `Aggregations`.
- Updated `ParseQueryParams` function to handle `event_name` filter.
- Changed `GroupBy` parameter in `QueryFilter` to accept an array of strings.
- Refactored `GetLogs` function in `clickhouse.go` to support advanced filtering, sorting, and aggregations.
- Updated `IMainStorage` interface to return `QueryResult` instead of `[]common.Log` for `GetLogs`.
- Added debug binary files to `.gitignore`.
### How to test?
1. Run the API and make requests to the logs endpoint with various query parameters.
2. Test filtering using `filter_event_name` and other filter parameters.
3. Verify that grouping, sorting, and pagination work as expected.
4. Check if aggregations are correctly calculated and returned in the response.
### Why make this change?
These changes improve the flexibility and functionality of the API, allowing for more complex queries and data analysis. The updated structure supports better filtering, aggregation, and response formatting, which enhances the overall usability of the API for clients.
0 commit comments