typhon-project / typhonql

Typhon Query Language
Eclipse Public License 2.0
4 stars 1 forks source link

[BUG] Repeated variables that are dynamic get distinct interpolation parameters #93

Closed tvdstorm closed 4 years ago

tvdstorm commented 4 years ago

Example:

from #dynamic(Product p1), #dynamic(Product p2), Concordance c select #done(p1.@id), c.@id where c.source == p1, #done(p1.@id == #312f9128-5e04-3e09-bb4a-efef23627994), p1-[c]-> p2

Becomes:

match (v0 :Product)-[c:Concordance]-\>(__n2 )\nwhere (v0.`Product.@id`) = ($p1_1) and ($p1_2)-[:Concordance*]-\> ($p2_3)\nreturn c.`Concordance.@id` as `c.Concordance.@id`"

(Three distinct params instead of two)