Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LocalQueryComparisonOptions

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.

Hierarchy

  • LocalQueryComparisonOptions

Index

Constructors

constructor

  • LocalQueryComparisonOptions constructor

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

    Parameters

    Returns LocalQueryComparisonOptions

Properties

isCaseSensitive

isCaseSensitive: boolean

Whether predicates that involve strings will be interpreted in a "caseSensitive" manner. (default = false).

name

name: string

The name for this instance.

usesSql92CompliantStringComparison

usesSql92CompliantStringComparison: boolean

Static caseInsensitiveSQL

caseInsensitiveSQL: LocalQueryComparisonOptions = new LocalQueryComparisonOptions({name: "caseInsensitiveSQL",isCaseSensitive: false,usesSql92CompliantStringComparison: true})

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

Static defaultInstance

defaultInstance: LocalQueryComparisonOptions = new LocalQueryComparisonOptions(LocalQueryComparisonOptions.caseInsensitiveSQL)

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

Methods

setAsDefault

  • setAsDefault(): any
  • 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;
    });
    lqco.setAsDefault();
    

    Returns any

Generated using TypeDoc