Fred Hays

Results 7 issues of Fred Hays

Greetings, For some reason, in Firefox and IE (but not Chrome), the address change event is firing twice when one of the parameters is a url (starts with "http://"). Here's...

Issue #23 ## Bind variables ```java List listOfNames = new List {'Acme', 'Acme 2'}; Q query = new Q(Account.SObjectType) .add(Q.condition('Name').isIn(Q.bindVar(':listOfNames'))) System.debug(query.build()); // SELECT Id FROM Account WHERE Name IN :listOfNames...

## Inner Joins (IN sub query) ```java Q query = new Q(Account.SObjectType) .addSubquery(new Q('Contacts').selectFields(new Set {'Name'})) .add(Q.condition('Id').isIn(new Q(Contact.SObjectType).selectFields(new Set {'AccountId'}))); System.debug(query.build()); //SELECT (SELECT Name FROM Contacts) FROM Account WHERE Id...

## Location-Based Queries Reference: [Location-Based SOQL Queries](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_geolocate.htm) Using a custom field as the destiation ```java Q query = new Q(Account.SObjectType) .add(Q.distanceFrom('BillingAddress').to('CustomLocationField__c').isLessThan(20)); System.debug(query.build()); //SELECT Id FROM Account WHERE DISTANCE(BillingAddress, CustomLocationField__c, 'mi')...

Reference: [TYPEOF SOQL Reference](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_typeof.htm) ## Polymorphic Relationships (TYPEOF) ```java String query = new Q(Event.SObjectType) .selectFields(Q.typeOf('What') .when('Account').then(new Set {'Phone', 'NumberOfEmployees'}) .when('Opportunity').then(new Set {'Amount', 'CloseDate'}) .otherwise(new Set {'Name', 'Email'}) ); System.debug(query.build()); /*...

When viewing source on Github, the tabs are displayed as 8 spaces. I think it would be helpful to update all the code to indent with 4 spaces instead of...