[sqlalchemy] Writing ORM from a complex sql statement

2019-06-09 Thread Desmond Lim
Hi there, I really have no idea how to do this via sqlalchemy. I have 2 tables: class NodesModel(db.Model): __tablename__ = 'nodes' id = db.Column(db.BigInteger, primary_key=True) topic = db.Column(db.String(20), nullable=False) pn = relationship("PNModel", backref="nodes")

Re: [sqlalchemy] How to get output from PostgreSQL's VERBOSE functions

2019-06-09 Thread Zsolt Ero
Thanks with logging.basicConfig() it indeed works. On Sun, 9 Jun 2019 at 16:19, Mike Bayer wrote: > > > On Sun, Jun 9, 2019, at 1:33 AM, Zsolt Ero wrote: > > I figured out the keyword is NOTICES. > > However this section of the docs doesn't work / didn't had any effect: >

Re: [sqlalchemy] How to get output from PostgreSQL's VERBOSE functions

2019-06-09 Thread Mike Bayer
On Sun, Jun 9, 2019, at 1:33 AM, Zsolt Ero wrote: > I figured out the keyword is NOTICES. > > However this section of the docs doesn't work / didn't had any effect: > https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#notice-logging that document assumes one is familiar with logging in