TQL name: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
| (16 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
A [[TQL]] name is a name which fits a specific set of restrictions, allowing it to be used unambiguously in [[TQL|TQL queries]]. [[Attribute]]s and [[Global]]s must always have a name conforming to those restrictions, because queries use those names verbatim. | A [[TQL]] name is a name which fits a specific set of restrictions, allowing it to be used unambiguously in [[TQL|TQL queries]]. [[Attribute]]s and [[Global]]s must always have a name conforming to those restrictions, because queries use those names verbatim. | ||
| Line 6: | Line 4: | ||
The following restrictions apply: | The following restrictions apply: | ||
* Must be entirely capitalized, to avoid ambiguity. | * Must be entirely capitalized, to avoid ambiguity. | ||
* May only consist of letters, numbers, and underscores, to avoid issues with special characters | * May only consist of letters, numbers, and underscores, to avoid issues with special characters. | ||
* May not contain the | * Must begin with a letter. Explicitly not a number or underscore. | ||
** _AND | * Must be at least 1 and at most 100 characters long. | ||
** AND_ | * May not equal <code>AND</code>. | ||
** | * May not contain any of the following <code>_AND</code>, <code>_WHERE</code> | ||
** | * May not start with any of the following <code>XML</code>, <code>AND_</code>, <code>WHERE_</code> | ||
** | * May not end with an underscore. | ||
==Forbidden Examples== | |||
The following examples are not allowed: | |||
* <code>AND</code> | |||
* <code>_AND</code> | |||
* <code>_ANDERSON</code> | |||
* <code>AND_</code> | |||
* <code>FOO_ANDS</code> | |||
* <code>WHERE_</code> | |||
* <code>WHERE_FOO</code> | |||
==Valid Examples== | |||
*<code>ANDERSON</code> | |||
*<code>ANDERSON_XML</code> | |||
==Invalid Examples== | |||
Updating an Area attribute named <code>WHEREVER</code> is invalid: | |||
<syntaxhighlight copy>UPDATE_AREA_WHEREVER_WHERE_AREA_IS_0</syntaxhighlight> | |||
while selecting it is valid: | |||
<syntaxhighlight copy>SELECT_ATTRIBUTE_WHERE_AREA_IS_0_AND_NAME_IS_WHEREVER</syntaxhighlight> | |||
{{article end | |||
|api= | |||
* [[Update global value (TQL)]] | |||
* [[Select global (TQL)]] | |||
}} | |||
Latest revision as of 08:59, 26 November 2026
A TQL name is a name which fits a specific set of restrictions, allowing it to be used unambiguously in TQL queries. Attributes and Globals must always have a name conforming to those restrictions, because queries use those names verbatim.
Restrictions
The following restrictions apply:
- Must be entirely capitalized, to avoid ambiguity.
- May only consist of letters, numbers, and underscores, to avoid issues with special characters.
- Must begin with a letter. Explicitly not a number or underscore.
- Must be at least 1 and at most 100 characters long.
- May not equal
AND. - May not contain any of the following
_AND,_WHERE - May not start with any of the following
XML,AND_,WHERE_ - May not end with an underscore.
Forbidden Examples
The following examples are not allowed:
AND_AND_ANDERSONAND_FOO_ANDSWHERE_WHERE_FOO
Valid Examples
ANDERSONANDERSON_XML
Invalid Examples
Updating an Area attribute named WHEREVER is invalid:
UPDATE_AREA_WHEREVER_WHERE_AREA_IS_0while selecting it is valid:
SELECT_ATTRIBUTE_WHERE_AREA_IS_0_AND_NAME_IS_WHEREVER