Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rdf/mixin/mutable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def delete_insert(deletes, inserts)
##
# Applies the given changeset
#
# If `#supports?(:transactions)` is `true`, this must apply the changeset
# If `#supports?(:atomic_write)` is `true`, this must apply the changeset
# atomically. Otherwise, it should offer an efficient implementation of a
# combined delete/insert of the changeset.
#
Expand Down
4 changes: 3 additions & 1 deletion lib/rdf/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def supports?(feature)
#
# @see RDF::Mutable#delete_insert
def delete_insert(deletes, inserts)
return super unless supports?(:atomic_write)

transaction(mutable: true) do
deletes.respond_to?(:each_statement) ? delete(deletes) : delete(*deletes)
inserts.respond_to?(:each_statement) ? insert(inserts) : insert(*inserts)
Expand Down Expand Up @@ -291,7 +293,7 @@ def each_statement(&block)
enum_statement
end
alias_method :each, :each_statement

##
# @see Mutable#apply_changeset
def apply_changeset(changeset)
Expand Down