Provide some way to do "SELECT ... FOR UPDATE"
Bug #499363 reported by
James Henstridge
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
New
|
Undecided
|
Unassigned |
Bug Description
It would be nice if Storm provided a way to issue "SELECT ... FOR UPDATE" queries as a way to acquire write locks on particular rows in a table.
I'd imagine the primary entry points where a user might want to do this is in Store.get() and a similar ResultSet API. I am not quite sure what the API should look like though.
Related branches
lp:~edoardo-serra/storm/select-for-update-support
Ready for review
for merging
into
lp:storm
- Storm Developers: Pending requested
- Storm Developers: Pending requested
-
Diff: 510 lines (+188/-18)6 files modifiedstorm/databases/sqlite.py (+4/-0)
storm/expr.py (+7/-3)
storm/store.py (+51/-14)
storm/zope/interfaces.py (+3/-0)
tests/expr.py (+13/-1)
tests/store/base.py (+110/-0)
To post a comment you must log in.
I started implementing this feature in the linked branch.
I've been using Storm for a while but I started looking at its code a few days ago, so feel free to criticise my design and implementation!
I implemented the feature as a method of the ResultSet which seemed to me to be the correct place.
I'm also considering to implement the feature in Store.get(), will follow in the next days.
Since I have some issues on running tests on my machine I did not commit them yet.
My 2 cents