You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/digital-twins/reference-query-functions.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,16 +45,16 @@ The following query returns the name of all digital twins who have an array prop
45
45
### Limitations
46
46
47
47
The ARRAY_CONTAINS() function has the following limitations:
48
-
* Array indexing is not supported.
48
+
* Array indexing isn't supported.
49
49
- For example, `array-name[index] = 'foo_bar'`
50
-
* Subqueries within the ARRAY_CONTAINS() property are not supported.
50
+
* Subqueries within the ARRAY_CONTAINS() property aren't supported.
51
51
- For example, `SELECT T.name FROM DIGITALTWINS T WHERE ARRAY_CONTAINS (SELECT S.floor_number FROM DIGITALTWINS S, 4)`
52
-
* ARRAY_CONTAINS() is not supported on properties of relationships.
53
-
- For example, say `Floor.Contains` is a relationship from Floor to Room and it has a `lift` property with a value of `["operating", "under maintenance", "under construction"]`. Queries like this are not supported: `SELECT Room FROM DIGITALTWINS Floor JOIN Room RELATED Floor.Contains WHERE Floor.$dtId = 'Floor-35' AND ARRAY_CONTAINS(Floor.Contains.lift, "operating")`.
54
-
* ARRAY_CONTAINS() does not search inside nested arrays.
55
-
- For example, say a twin has a `tags` property with a value of `[1, [2,3], 3, 4]`. A search for `2` using the query `SELECT * FROM DIGITALTWINS WHERE ARRAY_CONTAINS(tags, 2)`will return `False`. A search for a value in the top level array, like `1` using the query `SELECT * FROM DIGITALTWINS WHERE ARRAY_CONTAINS(tags, 1)`, will return`True`.
56
-
* ARRAY_CONTAINS() is not supported if the array contains objects.
57
-
- For example, say a twin has a `tags` property with a value of `[Room1, Room2]` where `Room1` and `Room2` are objects. Queries like this are not supported: `SELECT * FROM DIGITALTWINS WHERE ARRAY_CONTAINS(tags, Room2)`.
52
+
* ARRAY_CONTAINS() isn't supported on properties of relationships.
53
+
- For example, say `Floor.Contains` is a relationship from Floor to Room and it has a `lift` property with a value of `["operating", "under maintenance", "under construction"]`. Queries like this aren't supported: `SELECT Room FROM DIGITALTWINS Floor JOIN Room RELATED Floor.Contains WHERE Floor.$dtId = 'Floor-35' AND ARRAY_CONTAINS(Floor.Contains.lift, "operating")`.
- For example, say a twin has a `tags` property with a value of `[1, [2,3], 3, 4]`. A search for `2` using the query `SELECT * FROM DIGITALTWINS WHERE ARRAY_CONTAINS(tags, 2)`returns `False`. A search for a value in the top level array, like `1` using the query `SELECT * FROM DIGITALTWINS WHERE ARRAY_CONTAINS(tags, 1)`, returns`True`.
56
+
* ARRAY_CONTAINS() isn't supported if the array contains objects.
57
+
- For example, say a twin has a `tags` property with a value of `[Room1, Room2]` where `Room1` and `Room2` are objects. Queries like this aren't supported: `SELECT * FROM DIGITALTWINS WHERE ARRAY_CONTAINS(tags, Room2)`.
58
58
59
59
## CONTAINS
60
60
@@ -104,17 +104,17 @@ The following query returns all digital twins whose IDs end in `-small`. The str
104
104
105
105
## IS_BOOL
106
106
107
-
A type checking function for determining whether an property has a Boolean value.
107
+
A type checking function for determining whether a property has a Boolean value.
108
108
109
-
This function is often combined with other predicates if the program processing the query results requires a boolean value, and you want to filter out cases where the property is not a boolean.
109
+
This function is often combined with other predicates if the program processing the query results requires a boolean value, and you want to filter out cases where the property isn't a boolean.
The following query builds on the above example to select the digital twins that have a boolean `HasTemperature` property, and the value of that property is not`false`.
129
+
The following query builds on the above example to select the digital twins that have a boolean `HasTemperature` property, and the value of that property isn't`false`.
`<property>`, a property to check whether it is null.
165
+
`<property>`, a property to check whether it's null.
166
166
167
167
### Returns
168
168
@@ -178,47 +178,47 @@ The following query returns twins who do not have a null value for Temperature.
178
178
179
179
A type checking function for determining whether a property has a number value.
180
180
181
-
This function is often combined with other predicates if the program processing the query results requires a number value, and you want to filter out cases where the property is not a number.
181
+
This function is often combined with other predicates if the program processing the query results requires a number value, and you want to filter out cases where the property isn't a number.
A type checking function for determining whether a property's value is of a JSON object type.
204
204
205
-
This function is often combined with other predicates if the program processing the query results requires a JSON object, and you want to filter out cases where the value is not a JSON object.
205
+
This function is often combined with other predicates if the program processing the query results requires a JSON object, and you want to filter out cases where the value isn't a JSON object.
`<property>`, a property to check whether it is of an object type.
213
+
`<property>`, a property to check whether it's of an object type.
214
214
215
215
### Returns
216
216
217
217
A Boolean value indicating if the type of the specified property is a JSON object.
218
218
219
219
### Example
220
220
221
-
The following query selects all of the digital twins where this is an object called `MapObject`, and it does not have a child property `TemperatureReading`.
221
+
The following query selects all of the digital twins where this is an object called `MapObject`, and it doesn't have a child property `TemperatureReading`.
*`<twin-collection>`: Specify a twin collection to search when there is more than one (like when a `JOIN` is used).
240
-
*`exact`: Require an exact match. If this parameter is not set, the result set will include twins with models that inherit from the specified model.
239
+
*`<twin-collection>`: Specify a twin collection to search when there's more than one (like when a `JOIN` is used).
240
+
*`exact`: Require an exact match. If this parameter isn't set, the result set includes twins with models that inherit from the specified model.
241
241
242
242
### Returns
243
243
@@ -253,15 +253,15 @@ The following query returns twins from the DT collection that are exactly of the
253
253
254
254
A type checking function for determining whether a property's value is of a primitive type (string, Boolean, numeric, or `null`).
255
255
256
-
This function is often combined with other predicates if the program processing the query results requires a primitive-typed value, and you want to filter out cases where the property is not primitive.
256
+
This function is often combined with other predicates if the program processing the query results requires a primitive-typed value, and you want to filter out cases where the property isn't primitive.
`<property>`, a property to check whether it is of a primitive type.
264
+
`<property>`, a property to check whether it's of a primitive type.
265
265
266
266
### Returns
267
267
@@ -277,23 +277,23 @@ The following query returns the `area` property of the Factory with the ID of 'A
277
277
278
278
A type checking function for determining whether a property has a string value.
279
279
280
-
This function is often combined with other predicates if the program processing the query results requires a string value, and you want to filter out cases where the property is not a string.
280
+
This function is often combined with other predicates if the program processing the query results requires a string value, and you want to filter out cases where the property isn't a string.
0 commit comments