lib/ld/patch/algebra/patch.rb
##
# Executes this upate on the given `transactable` graph or repository.
#
# @param  [RDF::Transactable] graph
#   the graph to update.
# @param  [Hash{Symbol => Object}] options
#   any additional options
# @return [RDF::Transactable]
#   Returns graph.
# @raise [Error]
#   If any error is caught along the way, and rolls back the transaction
Executes this upate on the given `transactable` graph or repository.
Executes this upate on the given ` transactable ` graph or repository .
def execute(graph, options = {})
      debug(options) {"Delete"}
      if graph.respond_to?(:transaction)
        graph.transaction(mutable: true) do |tx|
          operands.inject(RDF::Query::Solutions.new([RDF::Query::Solution.new])) do |bindings, op|
            op.execute(tx, options.merge(bindings: bindings))
          end
        end
      else
        operands.inject(RDF::Query::Solutions.new([RDF::Query::Solution.new])) do |bindings, op|
          op.execute(graph, options.merge(bindings: bindings))
        end
      end
    end
def execute ( graph , options = { } ) debug ( options ) { "Delete" } if graph . respond_to? ( :transaction ) graph . transaction ( mutable : true ) do | tx | operands . inject ( RDF :: Query :: Solutions . new ( [ RDF :: Query :: Solution . new ] ) ) do | bindings , op | op . execute ( tx , options . merge ( bindings : bindings ) ) end end else operands . inject ( RDF :: Query :: Solutions . new ( [ RDF :: Query :: Solution . new ] ) ) do | bindings , op | op . execute ( graph , options . merge ( bindings : bindings ) ) end end end
Executes this upate on the given `transactable` graph or repository.
Executes this upate on the given ` transactable ` graph or repository .
# Invoke operand using bindings from prvious operation # Invoke operand using bindings from prvious operation
None
RDF::Transactable
[Error] If any error is caught along the way, and rolls back the transaction
[ Error ] If any error is caught along the way and rolls back the transaction
graph
<not_specific>
options
<not_specific>
<not_specific>
options any additional options
options any additional options