How do the various comparison operators work with the various property types?

    • Type: Bug
    • Resolution: Applied
    • Priority: Critical
    • None
    • Affects Version/s: None
    • Component/s: Domain Model
    • None
    • Hide

      Property Type
      Operator(s)
      Literal
      Notes

      String
      =, <>
      string

      String
      [NOT] IN
      list of strings

      String
      [NOT] LIKE
      string

      Decimal, Integer
      =, <>
      number

      Decimal, Integer
      [NOT] IN
      list of numbers

      Decimal, Integer
      <, <=, >, >=
      number

      Boolean
      =
      boolean

      DateTime
      =, <>
      datetime

      DateTime
      [NOT] IN
      datetime

      DateTime
      <, <=, >, >=
      datetime
      compare as before/after

      ID
      =, <>
      string

      ID
      [NOT] IN
      string
      should be allowed (currently disallowed by section 2.9.2.3.1)

      URI
      =, <>
      string

      URI
      [NOT] IN
      string

      URI
      [NOT] LIKE
      string
      compare as string

      Operations on the SCORE() output MUST be treated the same as decimal operations. Any additional operators not specified are repository-specific.

      When using properties in a join statement, comparison MUST be allowed on properties of the same types as defined by the table above. Repositories MAY extend this behavior.

      The ANY operation argument MUST be one of the properties found in the table above which supports equality operations

      Show
      Property Type Operator(s) Literal Notes String =, <> string String [NOT] IN list of strings String [NOT] LIKE string Decimal, Integer =, <> number Decimal, Integer [NOT] IN list of numbers Decimal, Integer <, <=, >, >= number Boolean = boolean DateTime =, <> datetime DateTime [NOT] IN datetime DateTime <, <=, >, >= datetime compare as before/after ID =, <> string ID [NOT] IN string should be allowed (currently disallowed by section 2.9.2.3.1) URI =, <> string URI [NOT] IN string URI [NOT] LIKE string compare as string Operations on the SCORE() output MUST be treated the same as decimal operations. Any additional operators not specified are repository-specific. When using properties in a join statement, comparison MUST be allowed on properties of the same types as defined by the table above. Repositories MAY extend this behavior. The ANY operation argument MUST be one of the properties found in the table above which supports equality operations

      The spec needs to provide guidance about how the various comparison operators work with the various property types. Here's a list of the types, operators, literal type and possible result.

      This is our interpretation and ?'s are areas we are looking for guidance on.

      Possible values for ? might be: invalidArgumentException, always evaluate false, always evaluate true, do something else....

      We should include this type of information in the spec.

      String =, <>, IN, NOT IN string string equality test
      String <, <=, >, >= string collation? what locale? ?
      String LIKE, NOT LIKE string string wildcard match
      String =, <>, IN, NOT IN numeric ?
      String <, <=, >, >= numeric ?
      Decimal, Integer =, <>, IN, NOT IN string ?
      Decimal, Integer <, <=, >, >= string ?
      Decimal, Integer =, <>, IN, NOT IN numeric numeric equality
      Decimal, Integer <, <=, >, >= numeric numeric comparison
      Boolean =, <>, IN, NOT IN string ? (what valid string values?)
      Boolean <, <=, >, >= string ?
      Boolean LIKE, NOT LIKE string ?
      Boolean =, <>, IN, NOT IN numeric ?
      Boolean <, <=, >, >= numeric ?
      DateTime =, <>, IN, NOT IN string equality match if string matches xsd:dateTime? - if not: ?
      DateTime <, <=, >, >= string before/after match if string matches xsd:dateTime? ?
      DateTime LIKE, NOT LIKE string ?
      DateTime =, <>, IN, NOT IN numeric ?
      DateTime <, <=, >, >= numeric ?
      ID =, <> string string match
      ID IN, NOT IN string Not allowed (line 877) (? is this intended?)
      ID <, <=, >, >= string Not allowed (line 877)
      ID LIKE, NOT LIKE string Not allowed (line 877)
      ID =, <> numeric ?
      ID IN, NOT IN numeric Not allowed (line 877)
      ID <, <=, >, >= numeric Not allowed (line 877)
      URI, XML, HTML =, <>, IN, NOT IN string ? (string match?)
      URI, XML, HTML <, <=, >, >= string ?
      URI, XML, HTML LIKE, NOT LIKE string ?
      URI, XML, HTML =, <>, IN, NOT IN numeric ?
      URI, XML, HTML <, <=, >, >= numeric ?

            Assignee:
            Ethan Gur-esh (Inactive)
            Reporter:
            Ryan McVeigh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: