feat(datasets): periods (start_date/end_date), dg_id column, date filters; rename observation dates
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -9,14 +9,14 @@ import (
|
||||
)
|
||||
|
||||
// ListAllObservations returns every observation for a dataset ordered by
|
||||
// (kato_code, date). Unlike ListObservations it is unpaginated: it backs GeoJSON
|
||||
// (kato_code, start_date). Unlike ListObservations it is unpaginated: it backs GeoJSON
|
||||
// assembly, where all of a dataset's observations are needed at once.
|
||||
func (r *DatasetRepository) ListAllObservations(ctx context.Context, datasetID uuid.UUID) ([]domain.Observation, error) {
|
||||
rows, err := r.pool.Query(ctx,
|
||||
`SELECT `+observationColumns+`
|
||||
FROM dataset_observations
|
||||
WHERE dataset_id = $1
|
||||
ORDER BY kato_code, date`,
|
||||
ORDER BY kato_code, start_date`,
|
||||
datasetID)
|
||||
if err != nil {
|
||||
return nil, mapError(err)
|
||||
|
||||
Reference in New Issue
Block a user