Commit 42b67bb
Tom Johnson
Make
Executing a transaction individually called `#delete` or `#insert` for
each statement in the changeset. This prevents using the features of
`Repositories` with a more efficient implementation of
`#insert/delete_statements`.
The patch fixes this (partially) by calling `#delete` and `#insert` only
once each for each execution, making executions faster for some
repositories and closer to being properly atomic.
A caveat, of course, is that there are still two upstream requests
required for each "transaction". We may regard that as okay, with
@bendiken's planned 2.0 changes to transaction, and seeing this
interface as a changeset.
Another option is to implement `#delete_insert(deletes, inserts)` in
`RDF::Mutable`; the base implementation could simply be to call
`#delete` and `#insert` in turn, but `Repository` specializations could
handle them as a single request. Thoughts?Transaction#execute more atomic1 parent 6fefc1e commit 42b67bb
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
| 140 | + | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| |||
0 commit comments