lib/sparql/algebra/operator/clear.rb in sparql-3.1.8 vs lib/sparql/algebra/operator/clear.rb in sparql-3.2.0

- old
+ new

@@ -4,13 +4,18 @@ ## # The SPARQL UPDATE `clear` operator. # # The CLEAR operation removes all the triples in the specified graph(s) in the Graph Store. # - # @example - # (clear silent default) + # [32] Clear ::= 'CLEAR' 'SILENT'? GraphRefAll # + # @example SPARQL Grammar + # CLEAR SILENT DEFAULT + # + # @example SSE + # (update (clear silent default)) + # # @see https://www.w3.org/TR/sparql11-update/#clear class Clear < Operator include SPARQL::Algebra::Update NAME = [:clear] @@ -55,9 +60,18 @@ else raise ArgumentError, "clear expected operand to be 'default', 'named', 'all', or an IRI" end queryable + end + + ## + # + # Returns a partial SPARQL grammar for this operator. + # + # @return [String] + def to_sparql(**options) + "CLEAR " + operands.to_sparql(**options) end end # Clear end # Operator end; end # SPARQL::Algebra