Merge lp://staging/~allenap/launchpad/storm-bulk-reload-bug-572211 into lp://staging/launchpad

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 10892
Proposed branch: lp://staging/~allenap/launchpad/storm-bulk-reload-bug-572211
Merge into: lp://staging/launchpad
Diff against target: 227 lines (+218/-0)
2 files modified
lib/lp/services/database/bulk.py (+66/-0)
lib/lp/services/database/tests/test_bulk.py (+152/-0)
To merge this branch: bzr merge lp://staging/~allenap/launchpad/storm-bulk-reload-bug-572211
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+24492@code.staging.launchpad.net

Commit message

New function, lp.services.database.bulk.reload(), to efficiently reload database objects.

Description of the change

Adds a new module, lp.services.database.bulk, that contains a single public function, reload(). Given an arbitrary list of Storm model objects, this attempts to reload them from the database in the most efficient way it can. The model objects can be a mix of types, and loaded from any number of different stores, but they must not have compound primary keys. See the linked bug for the rationale behind this new function.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) wrote :

I really like this branch. Thanks!

review: Approve (code)

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.