TQL: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Line 21: Line 21:
! Example
! Example
|-
|-
| FLOORSIZE
| <code>FLOORSIZE</code>
| Floor size of buildings
| Floor size of buildings.
| CATEGORY_IS_OFFICES
| <code>SELECT_FLOORSIZE_WHERE_CATEGORY_IS_OFFICES</code>
|-
|-
| LOTSIZE
| <code>LOTSIZE</code>
| Ground surface size of buildings
| Lot size of buildings.
| CATEGORY_IS_OFFICES
| <code>SELECT_LOTSIZE_WHERE_CATEGORY_IS_OFFICES</code>
|-
|-
| UNITS
| <code>UNITS</code>
| Amount of housing units
| Amount of housing units.
| CATEGORY_IS_OFFICES
| <code>SELECT_UNITS_WHERE_CATEGORY_IS_SOCIAL</code>
|-
|-
| <code>FLOORSIZE</code>
| <code>DIKES</code>
| Equal to
| Surface space of constructed dikes or levees.
| <code>SELECT_FLOORSIZE_WHERE_CATEGORY_IS_SOCIAL</code>
| <code>SELECT_DIKES_WHERE_ZONE_IS_1</code>
|}
|}



Revision as of 13:30, 30 June 2015

Please note: This page is currently being updated!

Template:Learned

TQL

The Tygron Query Language is a special-purpose programming language designed for obtaining spacial area information from a specific game session on the Tygron Engine. The primary reason for its development was to make an easy to use bridge between the Tygron Engine and Microsoft Excel.

Queries

The operation used in TQL is the query, which is performed with the declarative SELECT statement. SELECT retrieves data from a running Tygron game session. The SELECT statements have no persistent effects on the game session itself.

Queries allow the user to describe desired data, leaving the Tygron Engine responsible for planning, optimizing, and performing the physical operations necessary to produce that result as it chooses.

A query includes a parameter to include in the final result, immediately following the SELECT keyword. Currently, one of the following result parameters can be chosen:

Result Parameter Description Example
FLOORSIZE Floor size of buildings. SELECT_FLOORSIZE_WHERE_CATEGORY_IS_OFFICES
LOTSIZE Lot size of buildings. SELECT_LOTSIZE_WHERE_CATEGORY_IS_OFFICES
UNITS Amount of housing units. SELECT_UNITS_WHERE_CATEGORY_IS_SOCIAL
DIKES Surface space of constructed dikes or levees. SELECT_DIKES_WHERE_ZONE_IS_1


SELECT is the most complex statement in SQL, with optional keywords and clauses that include:



Clauses

Operators

TQL clausses currently support the following Operators:

Operator Description Example
IS Equal to CATEGORY_IS_OFFICES