Special Bind VariablesSpecial Bind Variables
There are a number of "special" bind variables that are available for use within the statement. In general they are there to allow functions to get access to the current "execution state" of the query.

The special bind variables are:
  • :_query
    This specifies that the Query object should be used wherever :_query is used.
  • :_allobjs
    This specifies that all the current objects should be used wherever :_allobjs is used. It should be noted that the objects associated with the :_allobjs bind variable changes depending upon where the execution of the statement currently is. See: Query Execution for more details.
  • :_currobj
    This specifies that the current object should be used wherever :_currobj is used. See: Current Object Scope for more details. It should be noted that in nearly all cases the use of a "normal" accessor can be used instead of the :_currobj bind variable.
  • :_grpby
    Coming Soon!
  • :_parent
    This is used within sub-queries to allow access to the "parent" query. This then allows you to access the current object (in scope) for the parent query by then appending a accessor on the end of the variable. Such as: :_parent.getCurrentObject().
It should be noted that "normal" named bind variables cannot start with "_" so this provides a reversed "namespace" for future development of JoSQL.

SELECT :_query,
FROM   java.lang.Object
The SQL above will return a List of Lists (one List per object in the input List) will be returned with each List having a reference to the Query object, a reference to the List that holds all the current objects and a reference to the current object.
See Also