go-goracle / goracle

Go database/sql driver for connecting to Oracle Database, using the ODPI-C library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Factored Subquery

mlh758 opened this issue · comments

Is your feature request related to a problem? Please describe.
Unable to run queries that use with syntax.

Describe the solution you'd like
I would like to be able to use that syntax.

Describe alternatives you've considered
Nested selects, unions, whatever other thing works.

Additional context
https://oracle-base.com/articles/misc/with-clause

I am unable to run these using goracle. I noticed that I also can't run them with the Ruby adapter though, so I'm guessing this has something to do with ODPI-C? If so I'll just close this and move the issue over there.

  • WITH works fine in node-oracledb and cx_Oracle (which both use ODPI-C)
  • ruby-oci8 doesn't use ODPI-C

Wow, I've been using that a long time and apparently didn't know what C libraries it was using.

In any case, it looks like the with thing was actually a red herring, the error was being triggered for a LISTAGG clause and it's probably our fault.

Just for context, we've got a query that runs fine in sql developer and then dies when it goes through the sql adapter. But since it's broken on two different libraries that apparently don't even share the same underlying C code there's probably something else going wrong.