Y (TQL)

From Tygron Support wiki
Jump to navigation Jump to search

Instead of specifying a clause parameter with a particular Item ID, it is possible to use the 'Y' character for its value. The result of using 'Y' for the clause value, is the automatic creation of multiple TQL statements, one with each Item ID for that Clause Parameter that can be found in the project data. Internally, the resulting TQL statements are placed in an array of arrays; Similarly the result will be an array of TQL result arrays.

Example

Consider the following (simplified) Neighborhood data of a project:

[ 
 { "attributes" : { "AANTAL_HUISHOUDENS" : [ 830.0 ] }, "id" : 0, "name" : "De Manege" },
 { "attributes" : { "AANTAL_HUISHOUDENS" : [ 435.0 ] }, "id" : 1, "name" : "De Lancaster"}, 
 { "attributes" : { "AANTAL_HUISHOUDENS" : [ 570.0 ] }, "id" : 2, "name" : "De Landstreken"}, 
 { "attributes" : { "AANTAL_HUISHOUDENS" : [ 830.0 ] }, "id" : 3, "name" : "De Kruidentuin"},
 { "attributes" : { "AANTAL_HUISHOUDENS" : [ 455.0 ] }, "id" : 4, "name" : "Golfresidentie"} 
]

The TQL statement

SELECT_NAME_WHERE_NEIGHBORHOOD_IS_Y

is internally replaced with a list of TQL statement arrays, separated by comma's,

 [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_0 ], [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_2 ], [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_3 ] , [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_5 ]

Its result will be a list of names, separated by comma's, for example:

["Mayfair"], ["Soho"], ["Marylebone"], ["Hyde Park"]

Clause Parameters

The Y value can be used in the following TQL Clause parameters: