Created on Feb. 23, 2013, 11:05 a.m. by Hevok & updated by Hevok on May 2, 2013, 5:18 p.m.

Operators are operations which differ in the calling of syntax and/or the argument passing mode from Language's functions. SPARQL features a wealth of Operators that can be used.

For instance there are logical connectives and (&&) and or (||) for boolean values, comparison Operators (equal, unequal, great than...) for numeric Datatypes, Comparison Operators (equal and not equal) for other Datatypes as well as Arithmetic Operators (plus, minus, multiplication, and division) for numeric Datatypes.

In addition one can use Regular Expressions (RegEx), e.g. one can put filter expressions that are based on Regular Expressions. Further one can compare two Terms with the sameTERM Operator and one can compare of two Language Literals Match.

  • Logical connectives && and || for xsd:boolean
  • Comparison Operators =, !=, <, >, <=, and >= for numeric Datatypes, xsd:dateTime, xds:string, and xsd:boolean
  • Comparison Operators = and != for other Datatypes
  • Arithmetic Operators +, -, *, and / for numeric Datatypes
  • Additionally:
    • REGEX(String,Pattern) or REGEX(String,Pattern,Flags)
    • sameTERM(A,B)
    • langMATCHES(A,B)

Tags: coding, programming, math, data
Categories: Tutorial
Parent: SPARQL

Update entry (Admin) | See changes

Comment on This Data Unit