Sha256: 7afa936cb64dc96f12739769450f7746d2b01bec8cf37ce3d71161444a9009fe

Contents?: true

Size: 374 Bytes

Versions: 1

Compression:

Stored size: 374 Bytes

Contents

require_relative 'binary_operator_operator'

module ConceptQL
  module Operators
    class PersonFilter < BinaryOperatorOperator
      desc 'Only passes through a result from the LHR if the person appears in the RHR.'
      def query(db)
        db.from(left.evaluate(db))
          .where(person_id: right.evaluate(db).select_group(:person_id))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conceptql-0.2.0 lib/conceptql/operators/person_filter.rb