sqlftw icon indicating copy to clipboard operation
sqlftw copied to clipboard

`SimpleName->getFullName()`

Open staabm opened this issue 2 years ago • 1 comments

when running the query SELECT COALESCE(null, gesperrt, freigabe1u1) from ada thru the ast, I get the following function call expression:

grafik

the SimpleName of the arguments atm only contain a local name, but not a full qualified name including the reference to the table like ada.gesperrt (or maybe even prefixed with the database name included).

I guess thats something SimpleName->getFullName() should return, but is not yet implemented, right?

https://github.com/SQLFTW/sqlftw/blob/1260391be0525d1a2912edaee2ccfb7e91bde888/sources/Sql/Expression/identifier/SimpleName.php#L33-L36

staabm avatar Feb 14 '23 16:02 staabm

hi. for now you have to resolve things like this manually. the nodes currently are not bi-directionally interlinked (parents, siblings etc.) so they cannot give you this information, but it is planned.

also e.g. in case of SELECT a, b FROM c, d external context (metadata for the tables) is needed to resolve from which table the columns originate

paranoiq avatar Feb 18 '23 20:02 paranoiq