LocalQueryComparisonOptions Class

A LocalQueryComparisonOptions instance is used to specify the "comparison rules" used when performing "local queries" in order to match the semantics of these same queries when executed against a remote service. These options should be set based on the manner in which your remote service interprets certain comparison operations.

The default LocalQueryComparisonOptions stipulates 'caseInsensitive" queries with ANSI SQL rules regarding comparisons of unequal length strings.


<ctor> LocalQueryComparisonOptions

  • config

LocalQueryComparisonOptions constructor


  • config Object
    • [name] String optional
    • [isCaseSensitive] Boolean optional

      Whether predicates that involve strings will be interpreted in a "caseSensitive" manner. Default is 'false'

    • [usesSql92CompliantStringComparison] Boolean optional

      Whether of not to enforce the ANSI SQL standard of padding strings of unequal lengths before comparison with spaces. Note that per the standard, padding only occurs with equality and inequality predicates, and not with operations like 'startsWith', 'endsWith' or 'contains'. Default is true.


// create a 'caseSensitive - non SQL' instance.
var lqco = new LocalQueryComparisonOptions({
        name: "caseSensitive-nonSQL"
        isCaseSensitive: true;
        usesSql92CompliantStringComparison: false;
// either apply it globally
// or to a specific MetadataStore
var ms = new MetadataStore({ localQueryComparisonOptions: lqco });
var em = new EntityManager( { metadataStore: ms });


() chainable

Sets the 'defaultInstance' by creating a copy of the current 'defaultInstance' and then applying all of the properties of the current instance. The current instance is returned unchanged.


var lqco = new LocalQueryComparisonOptions({
    isCaseSensitive: false;
    usesSql92CompliantStringComparison: true;




LocalQueryComparisonOptions static

Case insensitive SQL compliant options - this is also the default unless otherwise changed.


LocalQueryComparisonOptions static

The default value whenever LocalQueryComparisonOptions are not specified. By default this is 'caseInsensitiveSQL'.