Skip to content

CRUD methods #192

Closed
Closed

Description

@rubenv

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?

Activity

  1. kyleconroy commented on Dec 17, 2019

    @kyleconroy
    Collaborator

    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

  2. rubenv commented on Dec 17, 2019

    @rubenv
    Author

    Cool, thanks for the clarification.

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

  3. kyleconroy commented on Dec 17, 2019

    @kyleconroy
    Collaborator

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

  4. fr3fou commented on Jun 27, 2020

    @fr3fou

    Any news?

  5. neverlink commented on Dec 29, 2020

    @neverlink

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions