Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gdatastore/datastore.py
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2013-07-29 13:23:05 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2013-07-29 13:23:05 (GMT)
commit7752b80101762e1b4c80a28009a3b4ed268d9e69 (patch)
tree1c36503ab73d81a7bed83eb3bfbcd5ca379dfb77 /gdatastore/datastore.py
parent23164d7f0d0ce69556225315f1c2989780576f7b (diff)
Add support for uid in Xapian query for Sugar 0.84+ find() API
With the Sugar 0.84+ API (without version support), there are three ways to look up the metadata of a single entry: 1. get_properties(uid) 2. find({'uid': uid}, {}) 3. find({'query': 'uid:' + uid}, {}) The former two were already supported by explicit conversion inside the API adapter class. The last one matches the uid inside a Xapian query string. This is more tricky to support as the string gets parsed by Xapian, not ourselves. We're going the simple route for now and just add a 'uid' compatibility prefix for our custom Xapian query parser. This will leak some Sugar API details to other APIs. If any issue comes up because of that, we'll need to pass in different sets of prefixes to Index.find() for each query, based on which API was used.
Diffstat (limited to 'gdatastore/datastore.py')
0 files changed, 0 insertions, 0 deletions