how can I use active Record queries with salesforce as the data-store?
I am connecting to Salesforce.com as a data-store and accessing their REST API's.
Currently, to do a query, have to use SOQL, which is a query language.
How can 开发者_如何学PythonI use ActiveRecord type 'where' queries instead?
You don't have to use SOQL to retrieve records via the Salesforce.com REST API, if you are retrieving by the Id of the record. To do this, you can just use the following syntax:
/vXX.X/sobjects/SObjectName/id/
To retrieve records that meet a specific clause other than ID, I don't believe there is an alternative to SOQL at this point directly in the REST API.
However, if you are using Ruby, there is a Ruby Toolkit for salesforce that does support using active record style syntax. This is an open source project and you can find out more about it here:
http://quintonwall.com/wp-content/uploads/2011/02/RubyToolkit-gettingstarted.pdf
Here are a couple of examples from the above document:
There are toolkits for other languages, but I am not sure of their support for Active Record style record access.
精彩评论