class SPARQL::Client::Update::Clear
Attributes
uri[R]
Public Instance Methods
all()
click to toggle source
Cause data to be cleared from all graphs
@return [self]
# File lib/sparql/client/update.rb, line 389 def all @what = :all self end
default()
click to toggle source
Cause data to be cleared from the default graph
@return [self]
# File lib/sparql/client/update.rb, line 371 def default @what = :default self end
expects_statements?()
click to toggle source
Clear
always returns statements
@return [false]
# File lib/sparql/client/update.rb, line 398 def expects_statements? false end
graph(uri)
click to toggle source
Cause data to be cleared from graph specified by `uri`
@param [RDF::URI] uri @return [self]
# File lib/sparql/client/update.rb, line 362 def graph(uri) @what, @uri = :graph, uri self end
named()
click to toggle source
Cause data to be cleared from named graphs
@return [self]
# File lib/sparql/client/update.rb, line 380 def named @what = :named self end
to_s()
click to toggle source
# File lib/sparql/client/update.rb, line 402 def to_s query_text = 'CLEAR ' query_text += 'SILENT ' if self.options[:silent] case @what.to_sym when :graph then query_text += 'GRAPH ' + SPARQL::Client.serialize_uri(@uri) when :default then query_text += 'DEFAULT' when :named then query_text += 'NAMED' when :all then query_text += 'ALL' else raise ArgumentError, "invalid CLEAR operation: #{@what.inspect}" end query_text end