You need to sign in to do that
Don't have an account?
markusBv
#<AggregateResult: using datbasedotcom gem - How to use?
I am using the databasedotcom gem and Ruby 1.9.2 I execute this query: quer = "SELECT SUM(MRR__c) FROM Account WHERE Type = 'Customer'" mrr = client.query quer it returns this object: => [#0x000001035dfa80>] How do I work with this object? 0x000001035dfa80>
try doing object.to_s
Query is a method of Client instance. It returns a collection of object, in your case a collection of Account. You can basically see your collection of objects as an array (Collection class inherit fromArray class in Ruby) and consequently use all Array and Enumerable methods on it. => http://www.ruby-doc.org/core-1.9.3/Array.html
For example:
results.each do |r|
puts r.inspect
end
This will iterate through the result array and display EACH object.
Enjoy
----Vzmind