module SPARQL::Client::Update

SPARQL 1.1 Update operation builders.

Public Class Methods

clear(*arguments, **options) click to toggle source

Clear the graph

@example CLEAR GRAPH <example.org/data.rdf>

clear.graph(RDF::URI(http://example.org/data.rdf))
clear(:graph, RDF::URI(http://example.org/data.rdf))

@example CLEAR DEFAULT

clear.default
clear(:default)

@example CLEAR NAMED

clear.named
clear(:named)

@example CLEAR ALL

clear.all
clear(:all)

@example CLEAR SILENT ALL

clear.all.silent
clear(:all, silent: true)

@param (see Clear#initialize)

# File lib/sparql/client/update.rb, line 84
def self.clear(*arguments, **options)
  Clear.new(*arguments, **options)
end
create(*arguments, **options) click to toggle source

Create a graph

@example CREATE GRAPH <example.org/data.rdf>

create(RDF::URI(http://example.org/data.rdf))

@example CREATE SILENT GRAPH <example.org/data.rdf>

create(RDF::URI(http://example.org/data.rdf)).silent
create(RDF::URI(http://example.org/data.rdf), silent: true)

@param (see Create#initialize)

# File lib/sparql/client/update.rb, line 99
def self.create(*arguments, **options)
  Create.new(*arguments, **options)
end
delete_data(*arguments, **options) click to toggle source

Delete statements from the graph

@example DELETE DATA { <example.org/jhacker> <xmlns.com/foaf/0.1/name> "J. Random Hacker" .}

data = RDF::Graph.new do |graph|
  graph << [RDF::URI('http://example.org/jhacker'), RDF::Vocab::FOAF.name, "J. Random Hacker"]
end
delete_data(data)

@example DELETE DATA { GRAPH <example.org/> {}}

delete_data(RDF::Graph.new, graph: 'http://example.org/')
delete_data(RDF::Graph.new).graph('http://example.org/')

@param (see DeleteData#initialize)

# File lib/sparql/client/update.rb, line 37
def self.delete_data(*arguments, **options)
  DeleteData.new(*arguments, **options)
end
drop(*arguments, **options) click to toggle source

Drop a graph

@example DROP GRAPH <example.org/data.rdf>

drop.graph(RDF::URI(http://example.org/data.rdf))
drop(:graph, RDF::URI(http://example.org/data.rdf))

@example DROP DEFAULT

drop.default
drop(:default)

@example DROP NAMED

drop.named
drop(:named)

@example DROP ALL

drop.all
drop(:all)

@example DROP ALL SILENT

drop.all.silent
drop(:all, silent: true)

@param (see Drop#initialize)

# File lib/sparql/client/update.rb, line 127
def self.drop(*arguments, **options)
  Drop.new(*arguments, **options)
end
insert_data(*arguments, **options) click to toggle source

Insert statements into the graph

@example INSERT DATA { <example.org/jhacker> <xmlns.com/foaf/0.1/name> "J. Random Hacker" .}

data = RDF::Graph.new do |graph|
  graph << [RDF::URI('http://example.org/jhacker'), RDF::Vocab::FOAF.name, "J. Random Hacker"]
end
insert_data(data)

@example INSERT DATA { GRAPH <example.org/> {}}

insert_data(RDF::Graph.new, graph: 'http://example.org/')
insert_data(RDF::Graph.new).graph('http://example.org/')

@param (see InsertData#initialize)

# File lib/sparql/client/update.rb, line 19
def self.insert_data(*arguments, **options)
  InsertData.new(*arguments, **options)
end
load(*arguments, **options) click to toggle source

Load statements into the graph

@example LOAD <example.org/data.rdf>

load(RDF::URI(http://example.org/data.rdf))

@example LOAD SILENT <example.org/data.rdf>

load(RDF::URI(http://example.org/data.rdf)).silent
load(RDF::URI(http://example.org/data.rdf), silent: true)

@example LOAD <example.org/data.rdf> INTO <example.org/data.rdf>

load(RDF::URI(http://example.org/data.rdf)).into(RDF::URI(http://example.org/data.rdf))
load(RDF::URI(http://example.org/data.rdf), into: RDF::URI(http://example.org/data.rdf))

@param (see Load#initialize)

# File lib/sparql/client/update.rb, line 56
def self.load(*arguments, **options)
  Load.new(*arguments, **options)
end