frostyfan109 / tranql

A Translator Query Language
https://researchsoftwareinstitute.github.io/data-translator/apps/tranql
MIT License
0 stars 1 forks source link

Support $vars in where clause functions #119

Open frostyfan109 opened 4 years ago

frostyfan109 commented 4 years ago

Should support statements of the following structure:

set disease_var= "asthma"
select chemical_substance->gene->disease from '/graph/gamma/quick' where disease=descendants($disease_var)

Currently, function values are directly resolved during the parsing of select statements and their subsequent where clauses within the parse_select method of TranQL_ast. However, the values of variables, such as $disease_var, are only resolved upon execution of the query within the expand_nodes method invoked by generate_questions. Accordingly, the resolution of functions needs to be moved until after TranQL variables have been resolved.