Method: AmazonRelease.query_for_release

Defined in:
lib/cluster/infrastructures/amazon_release.rb

.query_for_release(clause) ⇒ Object



52
53
54
55
56
57
58
59
60
61
# File 'lib/cluster/infrastructures/amazon_release.rb', line 52

def query_for_release(clause)
  amazon = Infrastructure.current
  res = amazon.sdb.select("SELECT * FROM #{amazon.domain} WHERE #{clause}")
  args = Amazon.from_sdb_results(res)
  if args.empty?
    nil
  else
    self.new(args.first)
  end
end