opengeospatial / sensorthings

The official web site of the OGC SensorThings API standard specification.
136 stars 29 forks source link

substr with 3 parameters #1

Closed hylkevds closed 2 years ago

hylkevds commented 8 years ago

OData specifies that the substring function can have 2 or 3 parameters.

5.1.1.4.6 substring The substring function has consists of two overloads, with the following signatures: Edm.String substring(Edm.String,Edm.Int32) Edm.String substring(Edm.String,Edm.Int32,Edm.Int32) The two argument substring function returns a substring of the first parameter string value, starting at the Nth character and finishing at the last character (where N is the second parameter integer value). The three argument substring function returns a substring of the first parameter string value identified by selecting M characters starting at the Nth character (where N is the second parameter integer value and M is the third parameter integer value).

The SensorThingsAPI specification currently explicitly list only the 2 parameter version:

string substring(string p0, int p1) : substring(description,1) eq 'ensor Things'

I suspect both the 2 and 3 parameter version should be supported, since having only the 2 parameter version would be very limiting. It might be good to explicitly add the 3 parameter version to avoid confusion.

hylkevds commented 8 years ago

Here is a diff to the current document with the suggested change: https://github.com/hylkevds/SensorThingsAPI/commit/dc948c4ab0666ca7cff523293156cda6689d6aec

hylkevds commented 7 years ago

I've reworked my changeRequest repository, new diff available here: https://github.com/hylkevds/SensorThingsAPI/commit/d47f9a4f51e1dee859bd547fd6d26db95e2e7e2d?diff=unified

hylkevds commented 2 years ago

Fixed with the publication of Sensing v1.1.