0
votes

How do I use the AggregateResult I receive from a query using the databasedotcom gem?

quer = "SELECT SUM(MRR__c) FROM Account WHERE Type = 'Customer' AND Go_Live_Date__c > 2012-01-01 GROUP BY Producer__c"
ff = client.query quer
[#<SalesforceCont::AggregateResult:0x00000102e707b8 @Id=nil>, #   
<SalesforceCont::AggregateResult:0x00000102e70380 @Id=nil>, #
<SalesforceCont::AggregateResult:0x00000102e6ff48 @Id=nil>, #
<SalesforceCont::AggregateResult:0x00000102e6fb10 @Id=nil>] 

I can not figure out how to use them. The in the documentation mentioned "get" or anything similar does not exist.

1
Also when I use the examples from Salesforce I only get those @Id=nil objects. salesforce.com/us/developer/docs/api/Content/… - mmlac
Could you enable debugging in the client, then send the output from when you call client.query? - user414192

1 Answers

2
votes

The databasedotcom gem does not currently support AggregateResult. However, I encountered this same issue a while ago and made a quick-and-dirty fix that lets it return AggregateResults properly. It is available here: https://github.com/JackSullivan/databasedotcom