[sqlalchemy] Re: __table_alias__ option
Thank you On Wednesday, April 20, 2016 at 10:25:43 AM UTC-4, SPetro wrote: > > Hi, is possible to have "default" alias for table > > class Cwle(Base): > __tablename__ = 'CardiacWaitListEntry' > __table_alias__ = 'CWLE' > > I know you can do this > Cwle = aliased(Cwle, name='CWLE') > > but this screw up any editor intellisense. Output of sqalchemy query would > be more readable and what we use as convention. > > > > > > > > > -- 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.
[sqlalchemy] Re: __table_alias__ option
Hi , but how would you write query with this, this is what I want class Cwle(Base): __tablename__ = 'CardiacWaitListEntry' wleid = Column('WaitlistEntryID',NUMERIC(18), primary_key=True) qr = session.query(Cwle.wleid) <--- when I type Cwle. it will bring intellisense with all columns (there are a lot of them :) ) select CWLE.wleid from CardiacWaitListEntry as CWLE On Wednesday, April 20, 2016 at 10:25:43 AM UTC-4, SPetro wrote: > > Hi, is possible to have "default" alias for table > > class Cwle(Base): > __tablename__ = 'CardiacWaitListEntry' > __table_alias__ = 'CWLE' > > I know you can do this > Cwle = aliased(Cwle, name='CWLE') > > but this screw up any editor intellisense. Output of sqalchemy query would > be more readable and what we use as convention. > > > > > > > > > -- 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.
[sqlalchemy] __table_alias__ option
Hi, is possible to have "default" alias for table class Cwle(Base): __tablename__ = 'CardiacWaitListEntry' __table_alias__ = 'CWLE' I know you can do this Cwle = aliased(Cwle, name='CWLE') but this screw up any editor intellisense. Output of sqalchemy query would be more readable and what we use as convention. -- 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.