gost / server

GOST - Go implementation of OGC SensorThings API
MIT License
61 stars 19 forks source link

$filter sub property divider should use / instead of . #72

Closed tebben closed 7 years ago

tebben commented 7 years ago

Filtering on property is currently implemented using a dot: $filter=Properties.myproperty eq 'test' the dot should be replaced by a / according to the ODATA documentation.

Alystrasz commented 4 years ago

Hey, Are custom properties supported by $filter queries ?

I'm trying to get Locations matching a given time period ; my objects look like this :

{
         "@iot.id": 454714,
         "@iot.selfLink": "http://localhost:8080/v1.0/Locations(454714)",
         "name": "location name",
         "description": "location description",
         "encodingType": "application/vnd.geo+json",
         "location": {
                  "coordinates": [ 42, 42 ],
                  "properties": {
                           "coordinates": [],
                           "receptionTime": "2019-11-28T09:24:22.801Z"
                  },
                  "type": "Point"
         },
         "Things@iot.navigationLink": "http://localhost:8080/v1.0/Locations(454714)/Things",
         "HistoricalLocations@iot.navigationLink": "http://localhost:8080/v1.0/Locations(454714)/HistoricalLocations"
      }

and I'd like to match them using a request like http://localhost:8080/v1.0/Locations?$filter=location/properties/receptionTime gt 2019-11-24T14:37:01.000Z.

Maybe this would work using GeoJSON Features, where the properties field is mandatory according to the RFC ?