Sha256: d62e55a8f9c21a72ff5c1530a8964c7a249a9fe81816c03ea06eb2240f16b3d1
Contents?: true
Size: 726 Bytes
Versions: 8
Compression:
Stored size: 726 Bytes
Contents
require_relative 'node' module ConceptQL module Nodes # Represents a node that will grab all person rows that match the given races # # Race parameters are passed in as a set of strings. Each string represents # a single race. The race string must match one of the values in the # concept_name column of the concept table. If you misspell the race name # you won't get any matches class Race < Node def type :person end def query(db) db.from(:person___p) .join(:vocabulary__concept___vc, { vc__concept_id: :p__race_concept_id }) .where(Sequel.function(:lower, :vc__concept_name) => arguments.map(&:downcase)) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems