breeze-client / LocalQueryComparisonOptions
Class: LocalQueryComparisonOptions
Defined in: src/metadata/local-query-comparison-options.ts:26
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.
Constructors
Constructor
new LocalQueryComparisonOptions(
lqcoConfig):LocalQueryComparisonOptions
Defined in: src/metadata/local-query-comparison-options.ts:56
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
lqcoConfig
LocalQueryComparisonOptionsConfig
A configuration object.
Returns
LocalQueryComparisonOptions
Properties
isCaseSensitive
isCaseSensitive:
boolean
Defined in: src/metadata/local-query-comparison-options.ts:32
Whether predicates that involve strings will be interpreted in a "caseSensitive" manner. (default = false).
name
name:
string
Defined in: src/metadata/local-query-comparison-options.ts:30
The name for this instance.
usesSql92CompliantStringComparison
usesSql92CompliantStringComparison:
boolean
Defined in: src/metadata/local-query-comparison-options.ts:37
Whether == and != comparisons of strings ignore leading and trailing spaces, to match a SQL server's comparison of strings of unequal length. startsWith, endsWith and contains are unaffected. (default = true).
caseInsensitiveSQL
staticcaseInsensitiveSQL:LocalQueryComparisonOptions
Defined in: src/metadata/local-query-comparison-options.ts:71
Case insensitive SQL compliant options - this is also the default unless otherwise changed.
defaultInstance
staticdefaultInstance:LocalQueryComparisonOptions
Defined in: src/metadata/local-query-comparison-options.ts:80
The default value whenever LocalQueryComparisonOptions are not specified. By default this is 'caseInsensitiveSQL'.
Methods
setAsDefault()
setAsDefault():
any
Defined in: src/metadata/local-query-comparison-options.ts:93
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