Create API for service requests list

This commit is contained in:
Eli Ribble 2026-04-14 23:06:50 +00:00
parent 4a440e3022
commit b09725726c
No known key found for this signature in database
5 changed files with 120 additions and 29 deletions

View file

@ -0,0 +1,26 @@
package fieldseeker
import (
"context"
"fmt"
//"github.com/Gleipnir-Technology/bob"
"github.com/Gleipnir-Technology/bob/dialect/psql"
"github.com/Gleipnir-Technology/bob/dialect/psql/sm"
"github.com/Gleipnir-Technology/nidus-sync/db"
"github.com/Gleipnir-Technology/nidus-sync/db/models"
//"github.com/Gleipnir-Technology/nidus-sync/db/sql"
"github.com/google/uuid"
)
func PointLocationList(ctx context.Context, point_location_ids []uuid.UUID) (models.FieldseekerPointlocationSlice, error) {
rows, err := models.FieldseekerPointlocations.Query(
sm.Where(
models.FieldseekerPointlocations.Columns.Globalid.EQ(psql.Any(point_location_ids)),
),
).All(ctx, db.PGInstance.BobDB)
if err != nil {
return nil, fmt.Errorf("query point locations: %w", err)
}
return rows, nil
}