Sha256: c9e786b42c4177714eb6d97f6d65556a3e8ae10dbe0e616559b3076a532ce0f1

Contents?: true

Size: 985 Bytes

Versions: 1

Compression:

Stored size: 985 Bytes

Contents

module SPARQL; module Algebra
  class Operator
    ##
    # The SPARQL GraphPattern `bgp` operator.
    #
    # Query with `graph_name` set to false.
    #
    # @example SPARQL Grammar
    #   PREFIX : <http://example/>
    #   SELECT * { :s :p :o }
    #
    # @example SSE
    #   (prefix ((: <http://example/>))
    #     (bgp (triple ?s ?p ?o)))
    #
    # @see https://www.w3.org/TR/sparql11-query/#sparqlAlgebra
    class BGP < Operator
      NAME = [:bgp]
      ##
      # A `graph` is an RDF::Query with a graph_name.
      #
      # @overload self.new(*patterns)
      #   @param [Array<RDF::Query::Pattern>] patterns
      # @yield  [solution]
      #   each matching solution
      # @yieldparam  [RDF::Query::Solution] solution
      # @yieldreturn [void] ignored
      # @return [RDF::Query]
      def self.new(*patterns, **options, &block)
        RDF::Query.new(*patterns, graph_name: false, &block)
      end
    end # BGP
  end # Operator
end; end # SPARQL::Algebra

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sparql-3.2.0 lib/sparql/algebra/operator/bgp.rb