Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support With Clause #48

Open
tlightsky opened this issue Apr 14, 2019 · 3 comments
Open

Support With Clause #48

tlightsky opened this issue Apr 14, 2019 · 3 comments

Comments

@tlightsky
Copy link

https://dev.mysql.com/doc/refman/8.0/en/with.html#common-table-expressions-syntax

@quattad
Copy link

quattad commented Nov 8, 2023

Hi, could I check if there are any recent plans for WITH statements to be supported?

@samjewell
Copy link

samjewell commented Nov 12, 2024

I think an alternative workaround here is to use the parser in the Vitess project directly. Since PR vitessio/vitess#8918 it "Add parsing for common table expressions using WITH clause"

I think the SQL Parser can be imported with import "vitess.io/vitess/go/vt/sqlparser" - but I think the API is different - it doesn't seem to have a sqlparser.Parse('[string of SQL]') method any more.

EDIT I got this working. You can see how I used it here: grafana/grafana@3d952d0

It works fine on CTEs 🎉

@samjewell
Copy link

There's a second alternative workaround too - use DoltHub's hard-fork of the Vitess project, which is this one:
github.com/dolthub/[email protected]

I got this working too, here: grafana/grafana@45f9adf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants