Sha256: 8f92304f748e1c7007b10e4dcb93da38c10d266ce3922c9bcc2735838446fce1

Contents?: true

Size: 287 Bytes

Versions: 10

Compression:

Stored size: 287 Bytes

Contents

require_relative 'pass_thru'

module ConceptQL
  module Nodes
    class Union < PassThru
      def query(db)
        values.map do |expression|
          expression.evaluate(db)
        end.inject do |q, query|
          q.union(query, all: true)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
conceptql-0.1.1 lib/conceptql/nodes/union.rb
conceptql-0.1.0 lib/conceptql/nodes/union.rb
conceptql-0.0.9 lib/conceptql/nodes/union.rb
conceptql-0.0.8 lib/conceptql/nodes/union.rb
conceptql-0.0.7 lib/conceptql/nodes/union.rb
conceptql-0.0.6 lib/conceptql/nodes/union.rb
conceptql-0.0.5 lib/conceptql/nodes/union.rb
conceptql-0.0.4 lib/conceptql/nodes/union.rb
conceptql-0.0.3 lib/conceptql/nodes/union.rb
conceptql-0.0.1 lib/conceptql/nodes/union.rb