On this page
dotConnect for SugarCRM can translate a subset of SQL-92 SELECT statements to the corresponding SugarCRM API calls for remote execution. As remote execution provides much higher performance than local one, it makes sense to use SELECT statements that are translatable to API Calls.
SELECT statements that correspond to the following pattern and conditions can be converted to API calls and executed remotely:
|
|---|
SELECT result_columns FROM table [WHERE where_condition] [ORDER BY orderByClause] |
- result_columns can be a list of the columns, separated with commas, or "*", which means all the result columns.
- table - the name of the SugarCRM object.
- where_condition - one or more conditions, united with 'AND'. Condition must be a comparison of a column of the selected object and a constant or a parameter. No arithmetic or other functions are allowed. The following comparison operators are supported: =, <=, >=, !=, <, >, IN, LIKE, BETWEEN, IS NULL, IS NOT NULL. Only the columns that allows filtering can be included in where_condition
- orderByClause - one or more column names optionally followed by "ASC" or "DESC", separated by commas.
If a SELECT statement contains any of the features, not explicitly mentioned above, it cannot be translated to SugarCRM API calls and by default, it is executed locally, which usually takes more time and resources than remote execution. (Local execution can be disabled completely if necessary - see Select Statement Execution).
Exceptions
If a statement contains any of the exceptions, listed below, it also cannot be translated to the SugarCRM API calls and is executed locally.
- WHERE clause for the Users object.
- WHERE clause with the email_addresses_non_primary or team_name column (several SugarCRM objects have such columns).
- WHERE clause with any Decimal column.
- ORDER BY clause with the the email_addresses_non_primary and team_name column.