require 'helper' class EnrichmentDb::Datum < EnrichmentDb::DatumModel def self.by_lambda(schema_name, table_name, condition) puts "Finding object from #{table_name} with condition #{condition}." query = "SELECT * FROM #{schema_name}.#{table_name} where #{condition}" result = EnrichmentDb.request(schema_name, query).collect do |record| record end format_result(result) end end