3 ms·
> Do you write out 120 "INSERT" statements, 120 "UPDATE" statements, 120 "DELETE" statements as raw strings Yes. For example: https://github.com/jschaf/pggen/b
by sa46 5y ago
> Do you write out 120 "INSERT" statements, 120 "UPDATE" statements, 120 "DELETE" statements as raw strings
Yes. For example: https://github.com/jschaf/pggen/blob/main/example/erp/order/customer.sql https://github.com/jschaf/pggen/blob/main/example/erp/order/....
> that is also using an ORM
ORM as a term covers a wide swathe of usage. In the smallest definition, an ORM converts DB tuples to Go structs. In common usage, most folks use ORM to mean a generic query builder plus the type conversion from tuples to structs. For other usages, I prefer the Patterns of Enterprise Application Architecture terms [1] like data-mapper, active record, and table-data gateway.
[1]: https://martinfowler.com/eaaCatalog/ https://martinfowler.com/eaaCatalog/
- zzzeek 5y agoyes, I do also: https://techspot.zzzeek.org/2012/02/07/patterns-implemented-by-sqlalchemy/ https://techspot.zzzeek.org/2012/02/07/patterns-implemented-...