Re: [sqlalchemy] views & declarative?

2013-04-19 Thread Michael Bayer
On Apr 19, 2013, at 11:01 AM, James Hartley wrote: > On Wed, Apr 17, 2013 at 2:59 PM, Michael Bayer > wrote: >> James Hartley writes: >> > Is it possible to map Table instances back to classes defined through >> > declarative_base()? > > the typical form is: > > Base = declarative_base() >

Re: [sqlalchemy] creating transaction

2013-04-19 Thread Michael Bayer
On Apr 19, 2013, at 11:13 AM, Philipp Kraus wrote: > Thanks for your great explanation, I think I would help, but I must describe > some additional information in my using: > I try to create a proof-of-concept for a database builder eg > http://www.liquibase.org/ > I use for my project SCons (

Re: [sqlalchemy] creating transaction

2013-04-19 Thread Philipp Kraus
Thanks for your great explanation, I think I would help, but I must describe some additional information in my using: I try to create a proof-of-concept for a database builder eg http://www.liquibase.org/ I use for my project SCons ( http://www.scons.org ) like a build toolkit and would like to

Re: [sqlalchemy] views & declarative?

2013-04-19 Thread James Hartley
On Wed, Apr 17, 2013 at 2:59 PM, Michael Bayer wrote: > James Hartley writes: >> > Is it possible to map Table instances back to classes defined through >> > declarative_base()? >> > the typical form is: > > Base = declarative_base() > > some_table = Table('some_table', Base.metadata, Column('id'

Re: [sqlalchemy] Which is the best way for saving or updating json data?

2013-04-19 Thread Richard Gerd Kuesters
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/JSONColumn :) On 04/19/2013 04:50 AM, garcheck wrote: I have some requirements like this. One table model is: class Demo(Base): jsondata = Column(Text) This column "jsondata" is used for saving json data. And this Model would be used a

Re: [sqlalchemy] sqlalchemy and firebird; quotes around table/column names

2013-04-19 Thread Holger Schramm
Hi, i changed the names to lower case and now it works perfect. thanks. Kind regards, Holger Am Freitag, 19. April 2013 01:55:47 UTC+2 schrieb Michael Bayer: > > specify __tablename__ as an all lower case name, which indicates that it's > case insensitive. It will not be quoted, provided it co

[sqlalchemy] Which is the best way for saving or updating json data?

2013-04-19 Thread garcheck
I have some requirements like this. One table model is: class Demo(Base): jsondata = Column(Text) This column "jsondata" is used for saving json data. And this Model would be used anywhere by many developers. I want to load it to a Python object when I query and dump it to string when I i

Re: [sqlalchemy] SA 0.8.0 UnicodeDecodeError with Postgres 9.1.9

2013-04-19 Thread Wichert Akkerman
On Apr 19, 2013, at 08:54 , Andreas Jung wrote: > > Problem seems to be related how I moved the database (pg_dump + pg_restore). > After moving the database files directory I can no longer reproduce this > error. I would guess you loaded your database dump into a database with a different en