Sha256: 7bf2ce8734ce83b11657a9589ac13847b4784f7f71b5bd0fa4373fc767d94c14
Contents?: true
Size: 493 Bytes
Versions: 56
Compression:
Stored size: 493 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/pathology" require "sql/indexed_case_stmt" module Renalware module Pathology class OrderedPatientQuery def initialize(patient_ids) @patient_ids = patient_ids end def call Pathology::Patient .where(id: @patient_ids) .order(ids_index) end private def ids_index ::SQL::IndexedCaseStmt.new(:id, @patient_ids).generate end end end end
Version data entries
56 entries across 56 versions & 1 rubygems