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

Mariadb INSERT...RETURNING Support #693

Closed
ghost opened this issue Aug 29, 2020 · 3 comments
Closed

Mariadb INSERT...RETURNING Support #693

ghost opened this issue Aug 29, 2020 · 3 comments
Labels
📚 mariadb upstream Issue is caused by a dependency

Comments

@ghost
Copy link

ghost commented Aug 29, 2020

Hi.

Okay, so I am not one to make issues, usually.

sqlc as a tool has really helped me enjoy writing database related code for quite a while now. I personally use postgres and that is great. However, for my work, we use mariadb, and every time I write an insert or update query without the RETURNING clause, it feels very wrong and inefficient.

Since mariadb 10.5, it has supported INSERT...RETURNING.

Anyway, I also want to thank everyone who contributed to this tool. There are not many tools I get excited for each new release.

@kyleconroy
Copy link
Collaborator

Thanks for the feature request. I have never used MariaDB and was under the assumption it was the exact same as MySQL. It sounds like that used to be the case, but recent releases have added new features that MySQL doesn't have. The parser we use for MySQL (https://github.com/pingcap/parser) doesn't support RETURNING. I'll have to take a look at some of the other parsers out there to see what we can use.

@ghost
Copy link
Author

ghost commented Aug 29, 2020

The pingcap/parse project does seem to support mariadb specific features.

For example: pingcap/parser#337
Not RETURNING though.

@kyleconroy
Copy link
Collaborator

It doesn't seem like the pingcap parser is going to support RETURNING, so I'm going to close this as won't fix. Happy to support it once it's added there.

@kyleconroy kyleconroy closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 mariadb upstream Issue is caused by a dependency
Projects
None yet
Development

No branches or pull requests

1 participant