• EhForumUser@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    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.