• 0 Posts
  • 1 Comment
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • EhForumUser@lemmy.catoGolang@programming.devWorking on sqlc full-time
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Think of it as a reverse ORM: you write SQL queries in a text file, run sqlc generate, and then continue writing your code.

    That’s not a reverse ORM, that’s just an ORM. Object relational mapping is independent of query building.

    The active record pattern attempts to combine ORM and query building together and does so by driving queries from the models rather than the models being derived from the queries. It might be fair to call this a reverse active record pattern.