[tracker] libtracker-data: Support fn:replace()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Support fn:replace()
- Date: Thu, 12 Mar 2015 13:47:45 +0000 (UTC)
commit 5d777e6ede90ec9e63546ea0ad988a809ca24798
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 9 20:50:22 2015 +0100
libtracker-data: Support fn:replace()
In a limited form, no regex support.
https://bugzilla.gnome.org/show_bug.cgi?id=745917
src/libtracker-data/tracker-sparql-expression.vala | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-expression.vala
b/src/libtracker-data/tracker-sparql-expression.vala
index e11930f..8633b20 100644
--- a/src/libtracker-data/tracker-sparql-expression.vala
+++ b/src/libtracker-data/tracker-sparql-expression.vala
@@ -678,6 +678,22 @@ class Tracker.Sparql.Expression : Object {
sql.append (")");
return PropertyType.INTEGER;
+ } else if (uri == FN_NS + "replace") {
+ sql.append ("replace(");
+ translate_expression_as_string (sql);
+ sql.append (", ");
+
+ expect (SparqlTokenType.COMMA);
+ translate_expression_as_string (sql);
+ sql.append (", ");
+
+ expect (SparqlTokenType.COMMA);
+ translate_expression_as_string (sql);
+
+ // FIXME: No regex (nor its modifier flags) support
+ sql.append (")");
+
+ return PropertyType.STRING;
} else if (uri == FTS_NS + "rank") {
bool is_var;
string v = pattern.parse_var_or_term (null, out is_var);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]