Skip to content

CRUD methods #192

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

Closed
rubenv opened this issue Dec 17, 2019 · 5 comments
Closed

CRUD methods #192

rubenv opened this issue Dec 17, 2019 · 5 comments

Comments

@rubenv
Copy link

rubenv commented Dec 17, 2019

I'm currently a gorp user, mainly to map queries to structs. Replacing that with sqlc would be a nobrainer.

However, for some use cases you don't need specific queries, just standard CRUD operations are fine.

Am I understanding it correctly that I'd need to write create/select/update/delete queries for all types manually? Or is there a way to generate these convenience methods for a table?

@kyleconroy
Copy link
Collaborator

kyleconroy commented Dec 17, 2019

Am I understanding it correctly that I'd need to write create/select/update/delete queries for all types manually?

Yes, that it correct. While it may change in the future, sqlc does not generate SQL queries for you. It compiles existing SQL queries into type-safe Go.

Or is there a way to generate these convenience methods for a table?

Convenience methods are not currently generated for tables

@rubenv
Copy link
Author

rubenv commented Dec 17, 2019

Cool, thanks for the clarification.

Brilliant project by the way, really interesting approach. Keep it up 👍

@kyleconroy
Copy link
Collaborator

Thanks! I'll ping this issue once progress is made on the CRUD front.

@fr3fou
Copy link

fr3fou commented Jun 27, 2020

Any news?

@neverlink
Copy link

I've been dealing with the same thing, it's been a year, has there been any progress since?

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

4 participants