Reference·JavaScript · @bimworks/jssdkJavaScript QueryHelper
Class in @bimworks/jssdk.
API catalogue · @bimworks/jssdk · Class
Builders and transformations for parsed BQL queries (the JSON form): the conditions the BIM.works UI
creates when a feature is clicked, and helpers to adapt a query before it runs.
Members#
constructor#
addFeatureIfNotExists#
Parameters#
and#
Parameters#
| Name |
Type |
Description |
left |
QueryNode | null |
|
right |
QueryNode | null |
|
attributeExpression#
static attributeExpression(name: string, value: unknown, caseSensitive?: boolean): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
value |
unknown |
|
caseSensitive |
boolean |
|
augmentQueryForVisualization#
Adds what the viewers need to show the result (qids) to a query
Parameters#
buildingQidEqual#
Objects located in the building with this qid
Parameters#
| Name |
Type |
Description |
qid |
string | Qid |
|
buildingStoreyQidEqual#
Objects located on the building storey with this qid
Parameters#
| Name |
Type |
Description |
qid |
string | Qid |
|
calculatedEqual#
static calculatedEqual(path: string, key: string, value: unknown): QueryNode
Parameters#
| Name |
Type |
Description |
path |
string |
|
key |
string |
|
value |
unknown |
|
classificationEqualIdentification#
static classificationEqualIdentification(identification: string): QueryNode
Parameters#
| Name |
Type |
Description |
identification |
string |
|
classificationEqualItemReference#
static classificationEqualItemReference(itemReference: string): QueryNode
Parameters#
| Name |
Type |
Description |
itemReference |
string |
|
classificationEqualLocation#
static classificationEqualLocation(location: string): QueryNode
Parameters#
| Name |
Type |
Description |
location |
string |
|
classificationEqualName#
static classificationEqualName(name: string): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
classificationSystemFieldEqual#
static classificationSystemFieldEqual(field: string, value: string): QueryNode
Objects whose classification belongs to a classification system whose field (name, edition, source) equals the value
Parameters#
| Name |
Type |
Description |
field |
string |
|
value |
string |
|
collectParameters#
static collectParameters(ast: QueryNode): ({ fromName?: string; kind: string; name?: string; toName?: string })[]
The $name parameters of a parsed, unbound query, each once: kind is one of qids | in | types | range |
range-from | range-to | number | scalar | string | length; a BETWEEN with both bounds parameterized is one
"range" entry with fromName and toName instead of name
Parameters#
createCollectQid#
createCountQid#
createExpressionFromObject#
static createExpressionFromObject(object: object): QueryNode
Parameters#
| Name |
Type |
Description |
object |
object |
|
createNameFeature#
createQidFeature#
expressionToBql#
A whole query with this expression as its WHERE
Parameters#
fromQids#
static fromQids(qids: (string | Qid)[]): string
The BQL condition qid IN (...)
Parameters#
| Name |
Type |
Description |
qids |
(string | Qid)[] |
|
hasPropertySet#
static hasPropertySet(name: string): QueryNode
Objects that have a property set with this name, whatever is in it
Parameters#
| Name |
Type |
Description |
name |
string |
|
hasQuantitySet#
static hasQuantitySet(name: string): QueryNode
Objects that have a quantity set with this name, whatever is in it
Parameters#
| Name |
Type |
Description |
name |
string |
|
isQuantityKey#
static isQuantityKey(name: string): boolean
Whether a quantity figure name is a calculated quantity key
Parameters#
| Name |
Type |
Description |
name |
string |
|
layerEqual#
Parameters#
| Name |
Type |
Description |
name |
string |
|
mapParameters#
Substitutes parameters in a parsed query; prefer sending query text with parameters
Parameters#
| Name |
Type |
Description |
ast |
QueryNode |
|
map |
Record<string, unknown> |
|
materialEqual#
static materialEqual(name: string): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
modelEquals#
Parameters#
| Name |
Type |
Description |
name |
string |
|
static modelHeaderFeatureEquals(name: string, value: unknown): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
value |
unknown |
|
not#
Parameters#
projectQidEqual#
Objects located in the project with this qid
Parameters#
| Name |
Type |
Description |
qid |
string | Qid |
|
propertyEqual#
static propertyEqual(name: string, value: unknown, setName?: string): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
value |
unknown |
|
setName |
string |
The property set, any set by default |
qidExpression#
Parameters#
| Name |
Type |
Description |
qid |
string | Qid |
|
quantityEqual#
static quantityEqual(name: string, value: unknown, setName?: string): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
value |
unknown |
|
setName |
string |
The quantity set, any set by default |
static quantityFigureQuery(qid: string | Qid, name: string): string
The BQL query that fetches one quantity figure of one object
Parameters#
| Name |
Type |
Description |
qid |
string | Qid |
|
name |
string |
|
removeAllAggregateFeatures#
static removeAllAggregateFeatures(ast: QueryNode): void
Removes COUNT/COLLECT and other aggregates from a parsed query
Parameters#
representationItemEqual#
static representationItemEqual(entity: string): QueryNode
Parameters#
| Name |
Type |
Description |
entity |
string |
|
representationTypeEqual#
static representationTypeEqual(type: string): QueryNode
Parameters#
| Name |
Type |
Description |
type |
string |
|
siteQidEqual#
Objects located on the site with this qid
Parameters#
| Name |
Type |
Description |
qid |
string | Qid |
|
systemNameEqual#
static systemNameEqual(name: string): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
toParameterValues#
static toParameterValues(map: Record<string, unknown>): Record<string, unknown>
A {name -> QidSet | array | scalar} map in the plain-JSON shape the server binds as parameters
Parameters#
| Name |
Type |
Description |
map |
Record<string, unknown> |
|
typeAttributeExpression#
static typeAttributeExpression(name: string, value: unknown, caseSensitive?: boolean): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|
value |
unknown |
|
caseSensitive |
boolean |
|
typeCondition#
static typeCondition(type: string): QueryNode
Parameters#
| Name |
Type |
Description |
type |
string |
|
typeObjectQidEqual#
Objects whose type object (IfcTypeObject) is the one with this qid
Parameters#
| Name |
Type |
Description |
qid |
string | Qid |
|
typePropertyEqual#
static typePropertyEqual(name: string, value: unknown): QueryNode
Objects whose type object has this property value
Parameters#
| Name |
Type |
Description |
name |
string |
|
value |
unknown |
|
typeQuantityEqual#
static typeQuantityEqual(name: string, value: unknown): QueryNode
Objects whose type object has this quantity value
Parameters#
| Name |
Type |
Description |
name |
string |
|
value |
unknown |
|
zoneNameEqual#
static zoneNameEqual(name: string): QueryNode
Parameters#
| Name |
Type |
Description |
name |
string |
|