Class: DataMapper::Adapters::DhApiAdapter

Inherits:
AbstractAdapter
  • Object
show all
Defined in:
lib/dm-dh_api-adapter.rb

Instance Method Summary collapse

Instance Method Details

#read(query) ⇒ Array

Looks up one record or a collection of records from the data-store: “SELECT” in SQL.

Parameters:

  • query (Query)

    The query to be used to seach for the resources

Returns:

  • (Array)

    An Array of Hashes containing the key-value pairs for each record



63
64
65
# File 'lib/dm-dh_api-adapter.rb', line 63

def read(query)
  query.filter_records(records_for(query.model).dup)
end