[sqlalchemy] Re: How to query an optional column on a self referential adjacency list table?

2016-10-14 Thread Jinghui Niu
I'm thinking of JOIN with the parents, but failed. Because joining indefinite levels seems to be very hard to implement. You don't know how many levels you need to look up until you find a parent with a non Null value for that optional column. How to approach this problem? On Friday, October

[sqlalchemy] How to query an optional column on a self referential adjacency list table?

2016-10-14 Thread Jinghui Niu
I have the following Table model representing a timeline. class TimeRange(Base): __tablename__ = "time_line" record_id = Column(Integer, primary_key=True) level = Column(String, nullable=False) # e.g. "Point", "Range" content = Column(String, nullable=False)

[sqlalchemy] Sequence schema

2016-10-14 Thread Seth P
I have a mixin of the following form class MyMixin(object): idx = sa.Column(sa.Integer, sa.Sequence('idx_seq', schema=???, optional=True), primary_key=True) ... I would like the sequence to have the same schema as the table into which MyMixin will be mixed. I realize I could make idx

Re: [sqlalchemy] sqlalchemy import issue in powa web

2016-10-14 Thread Simon King
On Fri, Oct 14, 2016 at 4:56 AM, Ulhas Kanaskar wrote: > [root@test01 powa-web-3.0.1]# ./powa-web > > Traceback (most recent call last): > > File "./powa-web", line 2, in > > from powa import make_app > > File