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*
class Client(CommonBase):
    __tablename__ = 'clients'

    id              = Column(BigInteger, primary_key=True)
    cid             = Column(String(50), nullable=False, index=True, unique=
True, info='Client ID')
    mdate           = Column(DateTime, server_default='1970-01-01 00:00:00', 
info='Mod Date')
    serialno        = Column(String(100), server_default='NA', info='Serial 
No' )
    hostname        = Column(String(255), server_default='NA', index=True, 
info='Host Name')
    ipaddr          = Column(String(64), server_default='NA', index=True, 
info='IP Address')
    macaddr         = Column(String(64), server_default='NA', info='MAC 
Address')


*Query*
clients = Client.query.all()


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to