After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745917 - Support fn:replace()
Support fn:replace()
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks: 742531
 
 
Reported: 2015-03-09 20:01 UTC by Carlos Garnacho
Modified: 2015-03-12 13:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-data: Support fn:replace() (1.32 KB, patch)
2015-03-09 20:02 UTC, Carlos Garnacho
accepted-commit_now Details | Review

Description Carlos Garnacho 2015-03-09 20:01:24 UTC
fn:replace() sounds like something useful to have, I'm attaching a patch that implements this partially (no regex support) by using the sqlite replace() function underneath
Comment 1 Carlos Garnacho 2015-03-09 20:02:52 UTC
Created attachment 298912 [details] [review]
libtracker-data: Support fn:replace()

In a limited form, no regex support.
Comment 2 Carlos Garnacho 2015-03-09 20:06:00 UTC
With the patch:

[carlos@anacleto ~]$ tracker sparql -q "select fn:replace('abcdc', 'c', 'FOO') {}"
Results:
  abFOOdFOO
Comment 3 Martyn Russell 2015-03-11 21:03:41 UTC
Review of attachment 298912 [details] [review]:

You rock Carlos ;)
Wanted this feature for a while and never got around to it!

We need to commit this soon if we're to get it in before the hard code freeze.
I feel a 1.3.6 release coming on :)
Comment 4 Carlos Garnacho 2015-03-12 13:51:29 UTC
Cheers! This is kind of a "new feature", but OTOH better sparql1.1 compliance isn't much of a feature once we got our toes in.

Attachment 298912 [details] pushed as 5d777e6 - libtracker-data: Support fn:replace()