Re: [sqlalchemy] Using SQLAlchemy Core as Query Builder, not ORM, in CRUD applications

2021-04-23 Thread mkmo...@gmail.com
Hi Warwick, Thank you for the detailed response. My main application is read only. I only use SQLAlchemy Core, and I have some helper functions that wrap boiler plate, similar to those you mentioned. I'm starting a new write heavy application and am considering following the approach you

Re: [sqlalchemy] Using SQLAlchemy Core as Query Builder, not ORM, in CRUD applications

2021-04-22 Thread Warwick Prince
Hi Matthew It’s not an unusual approach from my standpoint. I use a combination of both ORM and Core. For my core uses, I wrote a couple of generic getter and setter methods, wrapping up a lot of boilerplate operations. In my case, it looks like this; result = DBGetColumns(‘tableName’,

[sqlalchemy] Using SQLAlchemy Core as Query Builder, not ORM, in CRUD applications

2021-04-22 Thread mkmo...@gmail.com
Hi All, Some people don't like ORMs and instead use query builders like SQLAlchemy Core (or even raw SQL text) even for something like a CRUD application. For sake of argument, let's put aside whether or not this is a good idea. I'm just curious how one would go about this without copy and