Symptons

The attribute and property operator can be used to narrow a selection based on the value stored in an attribute or property. For example the next piece of code selects only the object with a specific Global ID.

Select ?Var1
Where ?Var1.Attribute.GlobalId = “32UdM49pfAMxiX5WyXhCuy”

And the code below select all objects which are red.

Select ?Var1
Where ?Var1.Property.MainColor = “Red”

An average end-user is unaware of the differences between attributes and properties. That’s why we are allowing to leave out the attribute and the property operators. The next two pieces of code should return the same results as the previous code snippets.

Select ?Var1
Where ?Var1.GlobalId = “32UdM49pfAMxiX5WyXhCuy”

Select ?Var1
Where ?Var1.MainColor = “Red”

Unfortunately this feature is not yet functional and an error is returned.

Possible Cause

Although this feature has been described in the report which can be found in the download section, this feature has not been implemented yet.

Possible Solution

This feature was implemented in an earlier version of BimQL, later it was removed because it caused some problems. To implement this feature the BimQL grammar needs to be altered. The rule that needs to be altered is the relationleft rule. The relationleft rule currently looks like this.

relationleft ::= (
VARIABLE ‘.EntityType’
| VARIABLE ‘.Attribute.’ STRING
| VARIABLE ‘.Property.’ STRING
| VARIABLE (‘.*.EntityType’ | ‘.*(‘ INTEGER? TRUE? ‘).EntityType’)
| VARIABLE (‘.*.Attribute.’ | ‘.*(‘ INTEGER? TRUE? ‘).Attribute.’) STRING
| VARIABLE (‘.*.Property.’ | ‘.*(‘ INTEGER? TRUE? ‘).Property.’) STRING
)

To add the feature a new line needs to be added.

relationleft ::= (
VARIABLE ‘.EntityType’
| VARIABLE ‘.’ STRING
| VARIABLE ‘.Attribute.’ STRING
| VARIABLE ‘.Property.’ STRING
| VARIABLE (‘.*.EntityType’ | ‘.*(‘ INTEGER? TRUE? ‘).EntityType’)
| VARIABLE (‘.*.Attribute.’ | ‘.*(‘ INTEGER? TRUE? ‘).Attribute.’) STRING
| VARIABLE (‘.*.Property.’ | ‘.*(‘ INTEGER? TRUE? ‘).Property.’) STRING
)

Each line in the code above addresses different functionality. The new line should address the functionality currently addressed by the .Attribute.STRING line and the .Property.STRING line. In other words, it should combine those two lines into just one.