[sqlalchemy] Re: Overriding table columns with Python-property

2008-07-19 Thread Malthe Borch
Michael Bayer wrote: works for me: I tried adapting your example, which admittedly works :-), to a scenario that better resembles mine, but now the property is overriden simply, even when I use ``exclude_properties``. Note that the setup is overly complex, but this should be seen in the

[sqlalchemy] Boolean, Declerative, MySQL 5.2

2008-07-19 Thread Heston James - Cold Beans
Hello Guys, I'm looking to store a Boolean value in a MySQL 5.2 database. I'm then going to describe a class for the table using declarative and have a couple of questions on this: What Datatype should my table column be set to in MySQL? And likewise, when declaring the column using

[sqlalchemy] Custom Table

2008-07-19 Thread HellRaiser
Hello I like to implement a custom Table object, which automatically add some custome rows to the Table the User create. #!/usr/bin/env python #-*- coding: utf-8 -*- from addressmanager.model import DBSession from sqlalchemy import Table, Column, Integer, ForeignKey, and_ class

[sqlalchemy] threadlocal sessions and transactions

2008-07-19 Thread Contact 42
Hi, I am using sa 0.5b2 under python 2.5. Should the following code commit myobj. engine = create_engine(appconfig.dburi, strategy='threadlocal') Session = scoped_session(sessionmaker(bind=engine, autoflush=True, autocommit=True)) sess = Session() engine.begin() sess.add(myobj)

[sqlalchemy] Re: Custom Table

2008-07-19 Thread Michael Bayer
On Jul 19, 2008, at 5:54 AM, HellRaiser wrote: Hello I like to implement a custom Table object, which automatically add some custome rows to the Table the User create. #!/usr/bin/env python #-*- coding: utf-8 -*- from addressmanager.model import DBSession from sqlalchemy import

[sqlalchemy] Re: threadlocal sessions and transactions

2008-07-19 Thread huy do
On Jul 20, 12:13 am, Michael Bayer [EMAIL PROTECTED] wrote: On Jul 19, 2008, at 9:10 AM, Contact 42 wrote: Hi, I am using sa 0.5b2 under python 2.5. Should the following code commit myobj. engine = create_engine(appconfig.dburi, strategy='threadlocal') Session =

[sqlalchemy] Re: Boolean, Declerative, MySQL 5.2

2008-07-19 Thread Heston James - Cold Beans
I am using Column(Boolean) with declarative and MySQL and it is working fine. In MySQL itself the type is 'tinyint(1)' but they provide 'bool' and 'boolean' as synonyms if you prefer. Bobby, Thank you for this, I went with the tinyint(1) and it seems to be working great! Thanks, Heston

[sqlalchemy] integration of SQLAlchemy in a WSI environ

2008-07-19 Thread Manlio Perillo
I have completed my idea of integration of SQLALchemy in a WSGI environ, in my wsgix framework. wsgix (http://hg.mperillo.ath.cx/wsgix) is a WSGI framework whose main design goal it to provide a low level but flexible layer over WSGI. Since WSGI is mainly a functional API, wsgix is the same: a

[sqlalchemy] Re: threadlocal sessions and transactions

2008-07-19 Thread Michael Bayer
On Jul 19, 2008, at 10:32 AM, huy do wrote: If you continue to use the threadlocal engine strategy, then implicit executions (i.e. somestatement.execute()) should participate in the same transaction as the Session. Is there a warning in that If ? Is the threadlocal strategy not the