[sqlalchemy] Support for native PostgreSQL "polygon" type?

2015-09-04 Thread Demitri Muna
Hi, Is there a way to use the native PostgreSQL (i.e. not postgis) "polygon" data type through SQLAlchemy? I'm guessing one might be able to define the model class via autoload as normal, then add some kind of custom column definition? Surely someone has done this before, but I haven't been abl

[sqlalchemy] 10 Reasons to love SQLAlchemy

2015-09-04 Thread Paul Johnston
Hi guys, I decided to express my love of SQLAlchemy through a blog post: http://pajhome.org.uk/blog/10_reasons_to_love_sqlalchemy.html Enjoy, Paul -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving

Re: [sqlalchemy] Inexplicable NoResultFound error

2015-09-04 Thread Demitri Muna
Hi, On Sunday, August 30, 2015 at 11:18:49 PM UTC-4, Michael Bayer wrote: > > if it happens every time with that exact same numeric identifier, that's a > clue. If it happens on more than just one particular Postgresql database > server with the same data, that's another clue. > > You'd want t

Re: [sqlalchemy] onupdate with ORM

2015-09-04 Thread Mike Bayer
On 9/4/15 10:19 AM, Pavel S wrote: Hi, I have declarative Model with couple of columns, one of them is lastAccess = Column('LastAccess', DateTime, nullable=False, onupdate=datetime.datetime.utcnow) I fetch the object from database like the following: obj = ScopedSession.query(Model).get(s

[sqlalchemy] onupdate with ORM

2015-09-04 Thread Pavel S
Hi, I have declarative Model with couple of columns, one of them is lastAccess = Column('LastAccess', DateTime, nullable=False, onupdate=datetime.datetime.utcnow) I fetch the object from database like the following: obj = ScopedSession.query(Model).get(something) Later in code I commit the s

Re: [sqlalchemy] PostgreSQL: problem with simple rowqcount query

2015-09-04 Thread Mike Bayer
On 9/4/15 9:38 AM, Massi wrote: HI everyone, I'm trying to use sqlalchemy (0.9.10) to retrieve the number of rows of table in PostgreSQL, here a stub of the code: I'd highly recommend using psycopg2 as this error is a pg8000-specific quirk. to work around otherwise, you'd need to say fu

[sqlalchemy] PostgreSQL: problem with simple rowqcount query

2015-09-04 Thread Massi
HI everyone, I'm trying to use sqlalchemy (0.9.10) to retrieve the number of rows of table in PostgreSQL, here a stub of the code: import sqlalchemy from sqlalchemy import select, create_engine, MetaData, Table, Column import datetime engine = create_engine('postgresql+pg8000://postgres:passwo