dmaClass_QueryOperatorDescription

The Query Operator Description class is the metadata class that defines the signatures of operators used in a Query Expression.

Class ID: dmaClass_QueryOperatorDescription
Superclass: Metadata

Interfaces

IUnknown
IdmaObject
IdmaProperties

Properties

Name

Impl. Required

System Gen'ed

Read-Only

Value Required

Type

Cardinality

Required Class

OIID

-

Yes

Yes

-

String

Scalar

Class Description

Yes

Yes

Yes

Yes

Object

Scalar

Class Description

This

-

Yes

Yes

Yes

Object

Scalar

Query Operator Description

Create Pending

-

Yes

Yes

Yes

Boolean

Scalar

Update Pending

-

Yes

Yes

Yes

Boolean

Scalar

Delete Pending

-

Yes

Yes

Yes

Boolean

Scalar

Display Name

Yes

-

-

Yes

String

Scalar

Descriptive Text

Yes

-

-

Yes

String

Scalar

Ids

Yes

-

-

Yes

ID

List

Result Type

Yes

Yes

Yes

Yes

Integer32

Scalar

Is List

Yes

Yes

Yes

Yes

Boolean

Scalar

Minimum Operands

Yes

Yes

Yes

Yes

Integer32

Scalar

Maximum Operands

Yes

Yes

Yes

Yes

Integer32

Scalar

Is Safe to Eliminate

Yes

Yes

Yes

Yes

Boolean

Scalar

Operand Descriptions

Yes

Yes

Yes

-

Object

List

Query Operand Description

Join Participation

Yes

Yes

Yes

Yes

Integer32

Scalar

Detailed Description

Since operators are identified by DmaIds, new query operators can be introduced without any collisions on operator ID’s. The operator Id is found in dmaProp_Ids.

Property Descriptions

• OIID {dmaProp_OIID}
Property Inherited from DMA

• Class Description {dmaProp_ClassDescription}
Property Inherited from DMA

• This {dmaProp_This}
Property Inherited from DMA

• Create Pending {dmaProp_CreatePending}
Property Inherited from DMA

• Update Pending {dmaProp_UpdatePending}
Property Inherited from DMA

• Delete Pending {dmaProp_DeletePending}
Property Inherited from DMA

• Display Name {dmaProp_DisplayName}
Property Inherited from Metadata

• Descriptive Text {dmaProp_DescriptiveText}
Property Inherited from Metadata

• Ids {dmaProp_Ids}
Property Inherited from Metadata

• Result Type {dmaProp_ResultType}

Specifies the data type of the constant value. The permitted values are DMA_DATATYPE_BINARY, DMA_DATATYPE_BOOLEAN, DMA_DATATYPE_DATETIME, DMA_DATATYPE_FLOAT64, DMA_DATATYPE_ID, DMA_DATATYPE_INTEGER32, DMA_DATATYPE_OBJECT, DMA_DATATYPE_STRING and DMA_DATATYPE_CLASS.

Defined Datatypes

• Is List {dmaProp_IsList}

If TRUE, the output result of the operator is a list. If FALSE, the output result of the operator is a scalar.

• Minimum Operands {dmaProp_MinimumOperands}

This is the minimum number of operands required for the operator. The value must be non-negative.

• Maximum Operands {dmaProp_MaximumOperands}

This is the maximum number of operands allowed for the operator.

If Minimum Operands and Maximum Operands are both zero, then the operator takes no operands. An example of an operator with no operands would be TODAY in SQL: The value is today’s date and time at the instant the query is executed.

If the value of Maximum Operands is -1 (DMA_NO_MAXIMUM), the operator can take an unlimited number of operands.

• Is Safe to Eliminate {dmaProp_IsSafeToEliminate}

This boolean property indicates to a merged scope whether this operator and its subtree of operands can safely be pruned from a query parse tree delivered to a component scope using the rules of three valued logic, in the case that one or more of its operands is undefined relative to that component scope.

An operator is safe to eliminate (implying a value of TRUE for this property) if it always yields the "unknown" result if any of its operands is undefined. This allows the merged scope to replace the operator node and its subtree of operands the "unknown" value of the appropriate datatype. An operator is not safe to eliminate (implying a value of FALSE for this property) if its outcome depends on the values of the other (defined) operands. In this case, the operator node and subtree cannot usually be eliminated by the merged scope; it must be delivered to the component scope in order for the expression to be properly evaluated. Most relational operators (e.g.: EqualString) fall into the former category, while the logical operators And and Or fall into the latter.

Note that the issue of elimination of operators can only arise when a merged scope is created using union rules.

DMA defines a number of "well known" query operators and specifies the required setting for this property for them. A conformant DMA scope implementation must deliver the specified value for any of the well known operators that it implements.

If a scope supports a non-eliminable operator, the operator must allow any operand to be a constant query node for which the value of the property is not set. It must treat such a constant operand node as supplying the "undefined" value for the constant.

• Operand Descriptions {dmaProp_OperandDescriptions}

A list of Query Operand Description objects describing the operands of the operator. If the operator has no operands, the list will be empty. Otherwise, element 0 of this list describes the first operand of the operator. Element 1 describes the second operand of the operator, etc. The last element in the list describes the operand at that list index and all subsequent operands, if any.

For example, the "And" and "AddInteger32" operators are associative and commutative, so they are N-ary operators, N >= 2. Thus, Minimum Operands is 2, and Maximum Operands is -1, and there is only one element in the Operand Descriptions list, since all the operands have the same description.

• Join Participation {dmaProp_JoinParticipation}

Specifies the extent to which this operator can participate in a join expression (in the From clause of a query) and determines how to construct instances of the operator.

The following are the permitted values for this property:

0 - DMA_JOIN_PARTICIPATION_NONE - The operator, which is a normal operator, cannot appear in a From expression. Instances of this operator are of class dmaClass_QueryOperator.

1 - DMA_JOIN_PARTICIPATION_OPERAND - The operator, which is a normal operator, can appear as the third operand (the "on" condition) of a join operator. Instances of this operator are of class dmaClass_QueryOperator. For an operator of this type the Result Type property of the QueryOperatorDescription object must specify Boolean and the Is List property must be FALSE.

2 - DMA_JOIN_PARTICIPATION_OPERATOR - The operator is a join operator which joins classes within a single document space scope. (All of the well known join operators in DMA 1.0 are of this type). It may appear as the root of a From expression or as the first operand argument of another join operator. Instances of this operator are of class dmaClass_QueryJoinOperator. For an operator of this type the Result Type property of the QueryOperatorDescription object must specify Class and the Is List property must be FALSE