| Qore SalesforceRestDataProvider Module Reference 2.0

Loading...
Searching...
No Matches
Functions
SOQL Operator Functions

## Functions
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_make_op (string op, auto arg)
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_eq (auto arg)
| returns an SoqlOperatorInfo hash for the `"="` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_ge (auto arg)
| returns an SoqlOperatorInfo hash for the `">="` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_gt (auto arg)
| returns an SoqlOperatorInfo hash for the `">"` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_in ()
| returns an SoqlOperatorInfo hash for the `"in"` operator with all arguments passed to the function; for use in salesforce where clauses
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_in (list< auto > args)
| returns an SoqlOperatorInfo hash for the `"in"` operator with the given argument list as the first argument; for use in salesforce where clauses
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_le (auto arg)
| returns an SoqlOperatorInfo hash for the `"<="` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_like (string str)
| returns an SoqlOperatorInfo hash for the `"like"` operator with the given argument for use in salesforce where clauses
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_lt (auto arg)
| returns an SoqlOperatorInfo hash for the `"<"` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_ne (auto arg)
| returns an SoqlOperatorInfo hash for the `"!="` or `"<>"` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_not (hash arg)
| returns an SoqlOperatorInfo hash for the `"not"` operator; for use in salesforce where clauses
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_not_in ()
| returns an SoqlOperatorInfo hash for the `"not in"` operator with all arguments passed to the function; for use in salesforce where clauses
hash< SoqlOperatorInfo > | SalesforceRestDataProvider::soql_op_not_in (list< auto > args)
| returns an SoqlOperatorInfo hash for the `"not in"` operator with the given argument list as the first argument; for use in salesforce where clauses
hash< string, hash< SoqlOperatorInfo > > | SalesforceRestDataProvider::soql_wop_or (hash< auto > h1, hash< auto > h2)
| returns an SoqlOperatorInfo hash with a fake `"_OR_"` column name; the list of arguments to the function is combined such that each hash in the list generates SQL expressions combined with "and" logic, and each of those clauses is combined with "or" logic; this is for use in salesforce where clauses

## Detailed Description

These are the operators that can be used in Salesforce where clauses

- soql_op_in(): for the `"in"` operator
- soql_op_not_in(): for the `"not in"` operator
- soql_op_like(): for the `"like"` operator
- soql_op_ge(): for the `">="` operator when comparing column values to immediate values
- soql_op_gt(): for the `">"` operator when comparing column values to immediate values
- soql_op_le(): for the `"<="` operator when comparing column values to immediate values
- soql_op_lt(): for the `"<"` operator when comparing column values to immediate values
- soql_op_ne(): for the `"!="` or `"<>"` operator when comparing column values to immediate values
- soql_op_eq(): for the `"="` operator when comparing column values to immediate values
- soql_op_not(): for negating other operators
- soql_wop_or(): for combining SOQL expressions with `"or"`

## Function Documentation

## ◆ soql_make_op()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_make_op | ( | string | op,
|  | auto | arg )

returns an SoqlOperatorInfo hash

## ◆ soql_op_eq()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_eq | ( | auto | arg | ) |

returns an SoqlOperatorInfo hash for the `"="` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_eq("Smith")});

Parameters

  arg | the argument for the operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

## ◆ soql_op_ge()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_ge | ( | auto | arg | ) |

returns an SoqlOperatorInfo hash for the `">="` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_ge("Apple")});

Parameters

  arg | the argument for the operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

## ◆ soql_op_gt()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_gt | ( | auto | arg | ) |

returns an SoqlOperatorInfo hash for the `">"` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_gt("Apple")});

Parameters

  arg | the argument for the operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

## ◆ soql_op_in() [1/2]

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_in | ( |  | ) |

returns an SoqlOperatorInfo hash for the `"in"` operator with all arguments passed to the function; for use in salesforce where clauses

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_in(200, 300, 500, 9)});

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

Note
  The argument list size may be constrained depending on the database server / driver used; passing a large number of arguments to this function may be a sign of an improper application or query design

## ◆ soql_op_in() [2/2]

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_in | ( | list< auto > | args | ) |

returns an SoqlOperatorInfo hash for the `"in"` operator with the given argument list as the first argument; for use in salesforce where clauses

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"name": soql_op_in(idlist)});

Parameters

  args | a list of values for the `"in"` operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

Note
  The argument list size may be constrained depending on the database server / driver used; passing a large number of arguments to this function may be a sign of an improper application or query design

## ◆ soql_op_le()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_le | ( | auto | arg | ) |

returns an SoqlOperatorInfo hash for the `"<="` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_le("Zebra")});

Parameters

  arg | the argument for the operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

## ◆ soql_op_like()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_like | ( | string | str | ) |

returns an SoqlOperatorInfo hash for the `"like"` operator with the given argument for use in salesforce where clauses

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_like("%smith%")});

Parameters

  str | the argument for the operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

## ◆ soql_op_lt()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_lt | ( | auto | arg | ) |

returns an SoqlOperatorInfo hash for the `"<"` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_lt("Zebra")});

Parameters

  arg | the argument for the operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

## ◆ soql_op_ne()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_ne | ( | auto | arg | ) |

returns an SoqlOperatorInfo hash for the `"!="` or `"<>"` operator with the given argument for use in salesforce where clauses when comparing column values to immediate values

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_ne("Smith")});

Parameters

  arg | the argument for the operator

## ◆ soql_op_not()

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_not | ( | hash | arg | ) |

returns an SoqlOperatorInfo hash for the `"not"` operator; for use in salesforce where clauses

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"name": soql_op_not(soql_op_in(200, 300, 500, 9))))_;

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

## ◆ soql_op_not_in() [1/2]

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_not_in | ( |  | ) |

returns an SoqlOperatorInfo hash for the `"not in"` operator with all arguments passed to the function; for use in salesforce where clauses

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Name": soql_op_not_in(200, 300, 500, 9)});

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

Note
  The argument list size may be constrained depending on the database server / driver used; passing a large number of arguments to this function may be a sign of an improper application or query design

## ◆ soql_op_not_in() [2/2]

hash< SoqlOperatorInfo > SalesforceRestDataProvider::soql_op_not_in | ( | list< auto > | args | ) |

returns an SoqlOperatorInfo hash for the `"not in"` operator with the given argument list as the first argument; for use in salesforce where clauses

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"name": soql_op_not_in(idlist)});

Parameters

  args | a list of values for the `"not in"` operator

Returns
  an SoqlOperatorInfo hash for use in salesforce where clauses

Note
  The argument list size may be constrained depending on the database server / driver used; passing a large number of arguments to this function may be a sign of an improper application or query design

## ◆ soql_wop_or()

hash< string, hash< SoqlOperatorInfo > > SalesforceRestDataProvider::soql_wop_or | ( | hash< auto > | h1,
|  | hash< auto > | h2 )

returns an SoqlOperatorInfo hash with a fake `"_OR_"` column name; the list of arguments to the function is combined such that each hash in the list generates SQL expressions combined with "and" logic, and each of those clauses is combined with "or" logic; this is for use in salesforce where clauses

Example:
  AbstractDataProviderRecordIterator i = provider.searchRecords({"Id": id} + soql_wop_or({"Type": "C", "ValidationFlag": soql_op_ne("Y")}, {"ExpirationFlag": 'Y'}));
  Generates:

      select ... from Account where Id = '0012A000022K3zxQAC' and ((type = 'C' and ValidationFlag != 'Y') or (ExpirationFlag = 'Y'))

Parameters

  h1 | the first hash of expressions to combine with `"or"` logic
  h2 | the second hash of expressions to combine with `"or"` logic
  ... | remaining expressions to combine with `"or"` logic

Returns
  a hash with an SoqlOperatorInfo hash value keyed by a fake column name (`"_OR_"` with a numeric prefix for uniqueness) for use in a where operation description hash for use in salesforce where clauses

Note
  a random prefix is used so that multiple uses of the function can be used to generate a single where clause hash