Sha256: 561f7d7e80f5dc0daa0682097b73afcb0ac1ccaf75f218eeeab4cf857fbda386
Contents?: true
Size: 328 Bytes
Versions: 10
Compression:
Stored size: 328 Bytes
Contents
require 'mongo' class DataStore def initialize end def db @@db ||= Volt::DataStore.fetch end def query(collection, query) query = query.dup query.keys.each do |key| if key =~ /_id$/ # query[key] = BSON::ObjectId(query[key]) end end db[collection].find(query).to_a end end
Version data entries
10 entries across 10 versions & 1 rubygems