Useful Language-Specific Features
- Accessing Object Properties - When a column is of a composite type, you can use the query syntax
ColumnName.SomePropertyto obtain the value ofSomePropertyfrom theColumnNameobject. The type ofColumnNamemust include theSomeProperty. If it has the appropriate property, the column becomes the type thatSomePropertyis. You can use the chaining call syntax likeColumnName.SomeProperty.DifferentProperty. It is also permissible to obtain values from arrays using the syntaxColumnName.Prop[0]as well as obtaining values from dictionaries withColumnName.Prop['test']. - Like / not like Operators - These operators can be used to search for specific patterns in a query. Both the
%and_syntax are supported to find values matching the pattern. - Rlike / not rlike Operators - This is the same operator as
like, but instead of using a wildcard symbol, here we specify a regular expression. - Contains Operator - this operator checks whether the column contains a given string of characters.
- In Operator - this operator is useful when you need to access a column, and multiple values are considered valid. The expression looks like this:
ColumnName in ('abc', 'cda') - Is null / is not null Operators - This operator is used to check whether a column is empty. You can use it for both values and columns expressed by reference. It should be noted that using it for values does not make sense and in fact, the evaluator will discard such a check. Usage looks like
ColumnName is nullorColumnName is not null