Slide 60
Slide 60 text
class Brain
include Ripple::Document
property :owner_key, String, presence: true, index: true
property :zombie_key, String, index: true
property :hideout_id, Integer
property :eaten_at, Time
one :owner, using: :stored_key
one :zombie, using: :stored_key
index :zombie_hideout, String do
"#{zombie_key}-#{hideout_id}"
end
index :zombie_eaten, String do
"#{zombie_key}-#{eaten_at}"
end
index :hideout_eaten, String do
owner_id
zombie_id
hideout_id
eaten_at
size
Brains
Query Design
Thursday, June 14, 12
For the sake of discussion, Hideouts are stored with ActiveRecord