[sqlalchemy] Postgresql 9.4 JSONB support

2014-06-24 Thread Damian Dimmich
Hello, I've started putting together support for JSONB - a new type introduced with the postgres 9.4 beta here: https://github.com/ddimmich/sqlalchemy As this shares a lot with the JSON datatype I've kept the code in the json.py file. Please let me know if you think it should have its own

Re: [sqlalchemy] Postgresql 9.4 JSONB support

2014-06-24 Thread Mike Bayer
On 6/24/14, 3:32 AM, Damian Dimmich wrote: Hello, I've started putting together support for JSONB - a new type introduced with the postgres 9.4 beta here: https://github.com/ddimmich/sqlalchemy As this shares a lot with the JSON datatype I've kept the code in the json.py file. Please

[sqlalchemy] Re: Postgresql 9.4 JSONB support

2014-06-24 Thread Jonathan Vanasco
On Tuesday, June 24, 2014 3:32:41 AM UTC-4, Damian Dimmich wrote: I intend to develop further syntax/query support for this type on an as needed basis for now - suggestions and comments are much appreciated. 1. Nice work! Now I'm more likely to use jsonb! 2. I ran into some sqlalchemy

Re: [sqlalchemy] inheriting from mapped classes

2014-06-24 Thread Victor Olex
So, what is the right idiom for building SQLAlchemy persistence into classes that need to do more than just that i.e. have run-time state. I was hoping that deriving from SQLAlchemy model classes, but that does not seem to be it. Another option would be to encapsulate a model class within the

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-24 Thread Ken Lareau
Anyone? This has me dead in the water and nothing in the documentation has been helping. - Ken On Mon, Jun 23, 2014 at 5:09 PM, Ken Lareau klar...@tagged.com wrote: On Fri, Jun 20, 2014 at 3:46 PM, Ken Lareau klar...@tagged.com wrote: On Fri, Jun 20, 2014 at 1:23 PM, Mike Bayer

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-24 Thread Mike Bayer
On 6/23/14, 8:09 PM, Ken Lareau wrote: if apptier: subq = ( Session.query( Package.pkg_name, Package.version, Package.revision, AppDefinition.app_type, AppDeployment.environment

Re: [sqlalchemy] inheriting from mapped classes

2014-06-24 Thread Mike Bayer
On 6/24/14, 5:44 PM, Victor Olex wrote: So, what is the right idiom for building SQLAlchemy persistence into classes that need to do more than just that i.e. have run-time state. I was hoping that deriving from SQLAlchemy model classes, but that does not seem to be it. Another option would be

Re: [sqlalchemy] inheriting from mapped classes

2014-06-24 Thread Victor Olex
What I aiming for is to provide users a library of base class(es), which are mapped using SQLAlchemy. The classes are then meant to be extended by users with business logic. I am not hell bent on using inheritance for this, but for now I went with your __abstract__ = True solution only in a