go-pg / pg

Golang ORM with focus on PostgreSQL features and performance
https://pg.uptrace.dev/
BSD 2-Clause "Simplified" License
5.67k stars 404 forks source link

Add WhereOrg and WhereOrgAndPK methods #1997

Closed bennichols closed 8 months ago

elliotcourant commented 8 months ago

I'm probably not going to merge this, these functions are very specific to (what I assume is) your use case regarding go-pg. It introduces a dependency for only a single function call, doesn't include tests, and is not safe with joins (if two tables have organization_id then this breaks the query).

Thank you for your contribution, but I think if this is something you need from go-pg, I would recommend forking the library and using the fork instead. This library does not receive frequent updates anymore and most of the changes are bug fixes at this point. So you will have little risk of falling behind on upstream functionality.

bennichols commented 8 months ago

My apologies, I didn't mean to make a PR for this to the main repo, just to the fork!