Re: [sqlalchemy] Query a query in SQLAlchemy

2018-02-09 Thread Charles Heizer
. For example you may have a very large query, which you can then cache. Then you can run additional queries on that cache query to filter the results. Thanks, Charles On Friday, February 9, 2018 at 3:41:26 AM UTC-8, Simon King wrote: > > On Fri, Feb 9, 2018 at 6:06 AM, Charles Heizer <ceh...@

[sqlalchemy] Query a query in SQLAlchemy

2018-02-08 Thread Charles Heizer
Hello, does anyone know if it's possible to query a query result in SQLAlchemy? Thanks! -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See

Re: [sqlalchemy] Change the logical column order

2016-10-11 Thread Charles Heizer
Cols = sorted(cols, key=getDoc) def getDoc(col_obj): return col_obj.doc This seems to work really well. I now can also allow users to change column order in my app and save their settings as well. Thanks, Charlie On Monday, October 10, 2016 at 7:25:04 PM UTC-7, Mike Bayer wrote: > >

[sqlalchemy] Change the logical column order

2016-10-10 Thread Charles Heizer
Hello, I'm not sure if I'm asking this correctly. I'm fairly new to using SQLAlchemy so I'm sorry if I'm not using the correct terminology. How do I change the returning column order on a query? Is there an easy way? I would like to make 'mdate' be the last column. Thanks! Example: *Model*

Re: [sqlalchemy] Extend Column Class

2016-06-07 Thread Charles Heizer
ata.html?highlight=column.info#sqlalchemy.schema.Column.info > > > > subclassing Column is not that easy to do. I wouldn't recommend it. > > > > On 06/07/2016 11:50 AM, Charles Heizer wrote: > > Hello, > > I'm using sqlalchemy with flask and I want to extend the

[sqlalchemy] Extend Column Class

2016-06-07 Thread Charles Heizer
Hello, I'm using sqlalchemy with flask and I want to extend the Column class to include another attribute called "FriendlyName". This way I can display a friendly name as the column header when displaying a table. So, am I trying to re-invent the wheel? Any help on how to get started doing