Merge lp://qastaging/~kalikiana/u1db-qt/entireContentsInQuery into lp://qastaging/u1db-qt

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 110
Merged at revision: 113
Proposed branch: lp://qastaging/~kalikiana/u1db-qt/entireContentsInQuery
Merge into: lp://qastaging/u1db-qt
Diff against target: 25 lines (+3/-1)
2 files modified
src/query.cpp (+1/-1)
tests/tst_query.qml (+2/-0)
To merge this branch: bzr merge lp://qastaging/~kalikiana/u1db-qt/entireContentsInQuery
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Benjamin Zeller Approve
Review via email: mp+203058@code.qastaging.launchpad.net

Commit message

Store whole document contents in the results and unit test that

Description of the change

The original reason to avoid yielding all contents was in order to conserve memory. I pondered different approaches such as lazily loading the data in the model implementation. Ultimately this would make it more complicated and harder to test, so given the number of bugs I'm focussing on the easy, reliable solution. It can be optimized later.

Caveat: The results don't always have the same structure as the complete documents.
a) Bite the bullet (and maybe swallow it with Synchronizer goodness)
b) Find a heuristic to avoid the difference
c) Introduce a bool entireContents
d) Introduce Query.fields which can be * or desirable fields
e) Accept an extra * as desire for full contents
f) Bump import version to enable the changed behavior

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Stuart Langridge (sil) wrote :

Seems to fix the bug https://bugs.launchpad.net/u1db-qt/+bug/1271973. Have tested with code from http://kryogenix.org/days/2014/01/23/using-u1db-in-listviews-in-ubuntu-sdk-apps and the whole document content is returned.

Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

I can confirm this seems to fix bug #1271973, the full doc now is returned for the lefthand listview.
Ready to merge

review: Approve
110. By Cris Dywan

Merge lp:u1db-qt

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

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: