...
A new object can be created by calling a constructor. It is also possible to assign values to attributes in this context. This makes it easier to configure operators when building a query with QDL because it is not necessary to create a new statement for each parameter.
Code Block | ||
---|---|---|
| ||
// Constructor Call Point p1 = new Point(2, 5); Point p2(2,5); // Assigning values attributeto valuesattributes Point p3 = new Point{x = 2, y = 5}; Point p4{x = 2, y = 5}; Select sel{predicate="bid.price <=200"}; Project proj(sel){attributes=[bid.PRICE]}; |
Expressions
An expression is used as part of other expressions or statements and produces a value as result.
...
If a data type has a getter- or setter-method there will always be a corresponding attribute to access. So it is often possible to use assignment expressions instead of method calls.
Code Block | ||
---|---|---|
| ||
Tuple tuple = createTuple(); ITimeInterval time = tuple.metadata; tuple.metadata = time; //is equivalent to ITimeInterval time1 = tuple.getMetadata(); tuple.setMetadata(time1); |
Metadata
Code Block | ||
---|---|---|
| ||
Metadata ::= ID "=" MetadataValue. MetadataValue ::= MetadataValueSingle | MetadataValueList | MetadataValueMap. MetadataValueSingle ::= INTEGER | Double | CHAR | STRING | BOOLEAN | QName. MetadataValueList ::= "[" (MetadataValue ("," MetadataValue)*)? "]". MetadataValueMap ::= "[" (MetadataValueMapEntry ("," MetadataValueMapEntry)*)? "]". MetadataValueMapEntry ::= MetadataValue ":" MetadataValue. |
...