On Fri, Jul 3, 2015 at 2:26 AM, Peter Rabbitson via RT wrote:
Show quoted text> While this (of course) could be implemented, it is not a high priority for me
> personally, as the reassembly of the *incorrect* tree till yields something
> rather close to the original.
For my use case, the unparsed output isn't equivalent to the original.
For instance,
$sqlat->unparse($sqlat->parse(q[ SELECT example(`field`, ",") ]));
produces
q[ SELECT example( `field`, ", " ) ]
which, with the additional space following the comma inside of the quotation, is
not equivalent.
Show quoted text> Or is your use case something else? Please elaborate
I'm using SQLA::Tree to construct new queries using prewritten sql in
subqueries. I don't need full support for quotations, I'm not even sure that
it's possible to parse quotations in a sql dialect independent manner, I just
need to unparse parsed sql and receive something equivalent.
I can workaround the problem by passing the prewritten queries to unparse
wrapped in a -LITERAL node, but I lose the ability to make additions to the
prewritten query, such as adding columns to select or additional where clauses.
Thanks