Re: [sqlalchemy] How to inspect filters

2019-06-27 Thread Andrew Martin
Oh that's really interesting. Thank you for that. I'll definitely tuck that away in my back pocket. My background is really heavy in raw SQL, and meta-programming raw SQL is *awful.* Debugging sql that writes sql and execs it is not fun. I'm not allowed to use sqlalchemy at work because no one

Re: [sqlalchemy] How to inspect filters

2019-06-27 Thread Jonathan Vanasco
On Wednesday, June 26, 2019 at 2:43:44 PM UTC-4, Andrew Martin wrote: > > That's very interesting, Jonathan. Could you show me a quick example of > that approach? I'm not sure I *need* to do that, but I think I would learn > about SQLAlchemy from such an example and trying to understand it. >

Re: [sqlalchemy] How to inspect filters

2019-06-26 Thread Andrew Martin
That's very interesting, Jonathan. Could you show me a quick example of that approach? I'm not sure I *need* to do that, but I think I would learn about SQLAlchemy from such an example and trying to understand it. On Wed, Jun 26, 2019 at 11:00 AM Jonathan Vanasco wrote: > FWIW, I found a better

Re: [sqlalchemy] How to inspect filters

2019-06-26 Thread Jonathan Vanasco
FWIW, I found a better approach to a similar problem was to create a dict/object I used to log metadata about the query I wanted... then build the query or analyze it based on that metadata. All the information is in the sqlalchemy query, but the execution performance a development time was

Re: [sqlalchemy] How to inspect filters

2019-06-25 Thread Andrew Martin
Thank you, as always, for both the specific answer and the general advice. Much appreciated! On Sunday, June 23, 2019 at 5:19:49 PM UTC-5, Mike Bayer wrote: > > > > On Sun, Jun 23, 2019, at 5:45 PM, Andrew Martin wrote: > > I have a generic CRUDService for my web app. It's a pattern that was >

Re: [sqlalchemy] How to inspect filters

2019-06-23 Thread Mike Bayer
On Sun, Jun 23, 2019, at 5:45 PM, Andrew Martin wrote: > I have a generic CRUDService for my web app. It's a pattern that was loosely > suggested to me by Mike a while back. I've probably not implemented it the > way he intended, but it works pretty well in a pretty small amount of code. > >