greenlion/PHP-SQL-Parser

After update 4.1.2 -> 4.2.0 arithmetic operations in brackets are comma separated

Opened this issue · 3 comments

Good day, after recent updated from 4.1.2 -> 4.2.0 queries like
SELECT ( table1.value1 + COALESCE(table1.value2, 0) ) AS total_value

are being parsed with comma(,) delimiter , which means that after recreation it looks like:
SELECT ( table1.value1,+,COALESCE(table1.value2, 0) ) AS total_value

so arithmetic operations are comma separated.

Hi @f1r3starter,

I haven't checked yet but it's probably due to the merging of this PR : #295

(if you need to revert those changes temporarily)

I'll try to see if I can understand the code better and fix it.

@nicoder , thanks for reply!
I reverted version, but I think it is a bug, after short debugging I found out that comma is concatenated on this line, I guess it is somehow related to SignBuilder

I opened a PR : #306 to try and fix this.

Hopefully someone with a better understanding of that code can have a look.