impossible to use boolean indexes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
U1DB |
Fix Released
|
Undecided
|
Samuele Pedroni |
Bug Description
Hello, I am using u1db for my Ubuntu app and I wanted to use an index with Boolean value, like in the tutorial (cosas), but it seems not to be passable to get documents by boolean index.
So i define the indexes
LAST_INDEX = 'last'
...
INDEXES = {
LAST_INDEX: ['bool(last)']
...
}
And create them in for loop just like in tutorial:
for name, expression in INDEXES.items():
self.db.
So far so good
but when I try to get something from boolean index, like this:
db.get_
I get an error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
statement, args = self._format_
File "/usr/lib/
if value.endswith(
AttributeError: 'bool' object has no attribute 'endswith'
but if I take all elements from index like in tutorial:
db.get_
it returns all just fine
Related branches
- Stuart Langridge (community): Approve
-
Diff: 51 lines (+27/-2)1 file modifiedhtml-docs/high-level-api.rst (+27/-2)
Changed in u1db: | |
assignee: | nobody → Samuele Pedroni (pedronis) |
summary: |
- impassable to use boolean indexes + impossible to use boolean indexes |
tags: | added: u1-notrack |
Thanks for your report. We will be looking into it next week.