Two variables may have the same name. For example when they appear in different subqueries or different clauses.
This PR adds a getUniqueName() to each variable that allows for distinguishing the variables names from one another.
The unique name is based on the offset of the variable in the original query text (e.g. in case of SELECT 123 AS var FROM ..., variable var will have unique name var_(14, 17) since character v has (0-based) index 14 and the space after r has index 17.
Two variables may have the same name. For example when they appear in different subqueries or different clauses.
This PR adds a getUniqueName() to each variable that allows for distinguishing the variables names from one another.
The unique name is based on the offset of the variable in the original query text (e.g. in case of
SELECT 123 AS var FROM ...
, variablevar
will have unique namevar_(14, 17)
since characterv
has (0-based) index 14 and the space afterr
has index 17.