Class: SPARQL::Client::Update::Drop

Inherits:
Clear show all
Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/sparql-client-464d3f76cfd5/lib/sparql/client/update.rb

Overview

Instance Attribute Summary

Attributes inherited from Clear

#uri

Attributes inherited from Operation

#options

Instance Method Summary collapse

Methods inherited from Clear

#all, #default, #expects_statements?, #graph, #named

Methods inherited from Operation

#expects_statements?, #initialize, #silent

Constructor Details

This class inherits a constructor from SPARQL::Client::Update::Operation

Instance Method Details

#to_sObject



438
439
440
441
442
443
444
445
446
447
448
449
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-client-464d3f76cfd5/lib/sparql/client/update.rb', line 438

def to_s
  query_text = 'DROP '
  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 DROP operation: #{@what.inspect}"
  end
  query_text
end