Description
Assigns an Attribute Value that must be related to one of those in the McDBNode.Attributes of McDBNode instances returned by this McDBQuery.
-
Return Type
-
None
-
Syntax
-
object.SetAttribute AtbName, AtbVal, [ValueCompOp], [DateScope], [CompCount], [CountCompOp]
The SetAttribute Method syntax has these parts: |
| object | An expression evaluating to an object of type McDBQuery. | | AtbName | Required. A String value. The string name of the attribute to place in the specification.
| | AtbVal | Required. A Variant value. The value to compare the named attribute against, as a VARIANT. The value Empty is a special wildcard case, meaning match any value; and it is the only value allowed for AtbVal that will process a
| | ValueCompOp | Optional. A mcDBCompOp enumeration, as described in settings. How one or more Attributes on the result McDBNode instances with AtbName will compare to AtbVal.
| | DateScope | Optional. A mcDBDateQueryType enumeration, as described in settings. How much of the date value specified by AtbVal should be used in the query specification. Since all DATE values specify both a date and time, this parameter allows queries based on just a date or time specification. This parameter is ignored unless the attribute named by AtbName has an McDBAttributeType.Type of mcdbDate.
| | CompCount | Optional. A Long value. A numeric [long] value specifying the number of attributes (used with the CountCompOp argument) to filter the result McDBNodes by. This parameter is used for specification of queries on mcdbArray-type attributes only.
| | CountCompOp | Optional. A mcDBCompOp enumeration, as described in settings. How to compare the CompCount argument. For example: if this value is mcdbGTE, CompCount is 4, AtbVal is 7, and ValueCompOp is mcdbEQ; then the McDBNodes result set will contain McDBNode instances that have 4 or more [array element] attributes with a value of 7.
| Settings The settings for ValueCompOp are:
 | mcdbEQ | 1 |
Equality (default)
|
 | mcdbLT | 2 |
Less than
|
 | mcdbGT | 4 |
Greater than
|
 | mcdbGTE | 5 |
Greater than or Equal
|
 | mcdbLTE | 3 |
Less than or Equal
|
 | mcdbNEQ | 6 |
Not Equal
|
 | mcdbIgnoreWildCards | 16 |
Wildcards in strings (* and ?) are interpreted as literals
|
 | mcdbIgnoreCase | 32 |
Case of characters in strings is ignored
|
 | mcdbIgnoreDiacritics | 64 |
Diacritics on characters in strings is ignored
|
 | mcdbIgnoreWhiteSpace | 128 |
White space in strings is ignored
|
 | mcdbIgnoreSymbols | 512 |
Symbols in strings are ignored
|
 | mcdbMatchSubstring | 1024 |
The query string matches if it is a substring of the target property/attribute
|
 | mcdbNoAttribute | 2048 |
The Named Attribute does not exist, only valid when using Empty wildcard
|
The settings for DateScope are:
 | mcdbDateOnly | 1 |
Use Date specification of argument for Query only
|
 | mcdbTimeOnly | 2 |
Use Time specification of argument for Query only
|
 | mcdbDateAndTime | 3 |
Use entire argument (Date and Time) for Query
|
The settings for CountCompOp are:
 | mcdbEQ | 1 |
Equality (default)
|
 | mcdbLT | 2 |
Less than
|
 | mcdbGT | 4 |
Greater than
|
 | mcdbGTE | 5 |
Greater than or Equal
|
 | mcdbLTE | 3 |
Less than or Equal
|
 | mcdbNEQ | 6 |
Not Equal
|
 | mcdbIgnoreWildCards | 16 |
Wildcards in strings (* and ?) are interpreted as literals
|
 | mcdbIgnoreCase | 32 |
Case of characters in strings is ignored
|
 | mcdbIgnoreDiacritics | 64 |
Diacritics on characters in strings is ignored
|
 | mcdbIgnoreWhiteSpace | 128 |
White space in strings is ignored
|
 | mcdbIgnoreSymbols | 512 |
Symbols in strings are ignored
|
 | mcdbMatchSubstring | 1024 |
The query string matches if it is a substring of the target property/attribute
|
 | mcdbNoAttribute | 2048 |
The Named Attribute does not exist, only valid when using Empty wildcard
|
Remarks
Passing an McDBQuery for AtbVal is the method for recursively querying mcdbNodeAtb attributes.
Exceptions
Notes
This method may be used to sort the values of a named attribute by passing the AtbName and Empty for AtbVal.
|