Sha256: 2ccd68a360663d29619cc0af7db042a4119e0969d15d916f81329099160d822b

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

require 'helper'

class EnrichmentDb::Datum < EnrichmentDb::DatumModel
  def self.by_id(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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enrichment_db-0.1.8 lib/enrichment_db/datum.rb
enrichment_db-0.1.7 lib/enrichment_db/datum.rb
enrichment_db-0.1.6 lib/enrichment_db/datum.rb