class SPARQL::Algebra::Operator::Update
The SPARQL
GraphPattern `prefix` operator.
@example
(update (modify (bgp (triple ?s ?p ?o)) (insert ((triple ?s ?p "q")))))
Constants
- NAME
Public Instance Methods
execute(queryable, **options)
click to toggle source
Executes this upate on the given `queryable` graph or repository.
@param [RDF::Queryable] queryable
the graph or repository to write
@param [Hash{Symbol => Object}] options
any additional keyword options
@option options [Boolean] debug
Query execution debugging
@return [RDF::Queryable]
Returns the dataset.
@raise [NotImplementedError]
If an attempt is made to perform an unsupported operation
@raise [IOError]
If `queryable` is immutable
@see www.w3.org/TR/sparql11-update/
# File lib/sparql/algebra/operator/update.rb, line 34 def execute(queryable, **options) debug(options) {"Update"} raise IOError, "queryable is not mutable" unless queryable.mutable? operands.each do |op| op.execute(queryable, depth: options[:depth].to_i + 1, **options) end queryable end