[sqlalchemy] Re: extra where on orm updates with error checking

2009-11-29 Thread kindly
Perfect. I really thought I had read all the documentation. Thanks again. On 28 Nov, 18:45, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 28, 2009, at 10:25 AM, kindly wrote: Is there a way of, with every orm update to add extra conditions to the where clause and to check (and

[sqlalchemy] [sqlamp] released version 0.5.1

2009-11-29 Thread Anton Gritsay
Hi all, The sqlamp project gets a new release -- 0.5.1. The most important highlight is that it now supports polymorphic inheritance of nodes. It means that your trees can now contain objects of different types, provided that they all have one base class. sqlamp is an implementation of

[sqlalchemy] Re: pass any field as a keyword param to the constructor?

2009-11-29 Thread Lukasz Szybalski
I guess the proper solution is to setup your python class mapper like this, and use the update method of the __dict__ instead of setattr. class Recall(object): def __init__(self, **kw): self.__dict__.update(kw) pass Lucas On Thu, Nov 26, 2009 at 3:24 PM, Lukasz Szybalski

[sqlalchemy] Re: SQLAlchemy 0.5.5 MySQL Issue

2009-11-29 Thread gizli
Thank you. That was exactly the problem. MyISAM engine was selected as default, changed to InnoDB and now the autoflush behavior is as expected. On Nov 28, 4:36 am, Alexandre Conrad alexandre.con...@gmail.com wrote: You may be using MyISAM storage engine which doesn't support transactions and

Re: [sqlalchemy] SQL IF in sqlalchemy?

2009-11-29 Thread Diego Woitasen
2009/11/28 Michael Bayer mike...@zzzcomputing.com: we support CASE via case() which will get you there just as well. On Nov 28, 2009, at 1:54 PM, Diego Woitasen wrote: Does sqlalchemy support SQL IF? For example: select date, if(proxy_user_id 1, count(distinct address_id), 0) from table

Re: [sqlalchemy] Re: pass any field as a keyword param to the constructor?

2009-11-29 Thread Michael Bayer
On Nov 29, 2009, at 2:17 PM, Lukasz Szybalski wrote: I guess the proper solution is to setup your python class mapper like this, and use the update method of the __dict__ instead of setattr. class Recall(object): def __init__(self, **kw): self.__dict__.update(kw) pass if

Re: [sqlalchemy] Re: pass any field as a keyword param to the constructor?

2009-11-29 Thread Lukasz Szybalski
On Sun, Nov 29, 2009 at 3:58 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 29, 2009, at 2:17 PM, Lukasz Szybalski wrote: I guess the proper solution is to setup your python class mapper like this, and use the update method of the __dict__ instead of setattr. class Recall(object):

Re: [sqlalchemy] Re: pass any field as a keyword param to the constructor?

2009-11-29 Thread Michael Bayer
On Nov 29, 2009, at 7:24 PM, Lukasz Szybalski wrote: On Sun, Nov 29, 2009 at 3:58 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Nov 29, 2009, at 2:17 PM, Lukasz Szybalski wrote: I guess the proper solution is to setup your python class mapper like this, and use the update method