Merge lp://qastaging/~3v1n0/u1db-qt/objects-subfields-list-all into lp://qastaging/u1db-qt

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Cris Dywan
Approved revision: 132
Merged at revision: 130
Proposed branch: lp://qastaging/~3v1n0/u1db-qt/objects-subfields-list-all
Merge into: lp://qastaging/u1db-qt
Prerequisite: lp://qastaging/~3v1n0/u1db-qt/uri-path-parsing
Diff against target: 157 lines (+120/-2)
3 files modified
examples/u1db-qt-example-7/u1db-qt-example-7.qml (+75/-0)
src/query.cpp (+4/-2)
tests/test-database.cpp (+41/-0)
To merge this branch: bzr merge lp://qastaging/~3v1n0/u1db-qt/objects-subfields-list-all
Reviewer Review Type Date Requested Status
Cris Dywan Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+252059@code.qastaging.launchpad.net

Commit message

Query: allow adding more than one result for each doc, allowing indexing subfields of objects in a list

This is to be conformant to what the u1db specs (implemented in python) say.

Description of the change

Indexing subfields of ojects in a list doesn't work as expected in u1db-qt, we only list the first element and not everyone as defined in docs [1].

The reason was that we didn't add a result if we already had one for that doc... And this seems wrong to me.

In a next MP we should probably also fix the "Name a list" case (see [1] again).
As test-case you can also try [2].

[1] https://pythonhosted.org/u1db/high-level-api.html#index-expressions
[2] http://bazaar.launchpad.net/~ahayzen/+junk/test-u1db-playlists/view/head:/test-u1db-playlists.qml

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

This turns out to be a surprising explanation to the related bug. This makes sense.

I might feel that a QML unit test is potentially simpler, but no strong feelings.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: