From a8e5942e1e1f11709c2dc6b1ffcbfe15f3c143eb Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 28 Jul 2015 20:30:19 +0200 Subject: libtracker-data: Add support for the ABS() builtin function This function is defined in Sparql 1.1 query language recommendation, http://www.w3.org/TR/sparql11-query/#func-abs --- src/libtracker-data/tracker-sparql-expression.vala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libtracker-data/tracker-sparql-expression.vala') diff --git a/src/libtracker-data/tracker-sparql-expression.vala b/src/libtracker-data/tracker-sparql-expression.vala index 5b36d19eb..fc69bde4c 100644 --- a/src/libtracker-data/tracker-sparql-expression.vala +++ b/src/libtracker-data/tracker-sparql-expression.vala @@ -1286,6 +1286,12 @@ class Tracker.Sparql.Expression : Object { type = translate_aggregate_expression (sql); sql.append (")"); return type; + case SparqlTokenType.ABS: + next (); + sql.append ("ABS("); + type = translate_aggregate_expression (sql); + sql.append (")"); + return type; case SparqlTokenType.GROUP_CONCAT: next (); sql.append ("GROUP_CONCAT("); -- cgit v1.2.1