heroku/databasedotcom — pull request #71 by campbell (2012-03-20 14:46:33+00:00)
Title: Blacklist SObjects and SObject fields

Sometimes you either don't want some SObjects or specific fields. One vexing situation was an SObject with a huge number of fields. Accessing the SObject with a query produced a 500 error because the URL string (with the query parameters) was larger than the 8192 character limit that Salesforce has (this is a default HTTP path limit).

To get around this issue, we implemented a blacklist to exclude specific fields and get the overall query length below 8192 characters (though this can be exceeded if a long SOQL query param is used).

The blacklist is a hash that includes SObject names and/or specific SObject fields. The blacklist is implemented by intercepting the DESCRIBE_SOBJECT and DESCRIBE_SOBJECTS responses from Salesforce. The blacklisted fields/sobjects are removed from the responses, so the gem never sees them and thus they are effectively excluded.