[sqlalchemy] Re: RLIKE, REGEXP

2007-10-10 Thread Eric Lemoine
On 10/11/07, jason kirtland <[EMAIL PROTECTED]> wrote: > > Jim Musil wrote: > > I don't see support for RLIKE, NOT RLIKE, or REGEXP anywhere. > > > > Is there support for this? > > Yes, you can use these operators and any others via the .op() method: > >table.c.col1.op('rlike')('re') >not_

[sqlalchemy] Re: RLIKE, REGEXP

2007-10-10 Thread jason kirtland
Jim Musil wrote: > I don't see support for RLIKE, NOT RLIKE, or REGEXP anywhere. > > Is there support for this? Yes, you can use these operators and any others via the .op() method: table.c.col1.op('rlike')('re') not_(table.c.col1.op('rlike')('re')) table.c.col1.op('regexp')('re') -j

[sqlalchemy] RLIKE, REGEXP

2007-10-10 Thread Jim Musil
I don't see support for RLIKE, NOT RLIKE, or REGEXP anywhere. Is there support for this? Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@goog

[sqlalchemy] Re: RuntimeWarning with overriden reflected table

2007-10-10 Thread Michael Bayer
On Oct 10, 2007, at 2:45 PM, Eric Lemoine wrote: > > Thanks for your answer. So basically you're saying that this > RuntimeWarning is harmless, aren't you? yeah, its a warning and not an error since its not necessarily anything "wrong". > > Are you suggesting that I should add Geometry to po

[sqlalchemy] Re: RuntimeWarning with overriden reflected table

2007-10-10 Thread Eric Lemoine
On 10/10/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > On Oct 10, 2007, at 10:01 AM, Eric Lemoine wrote: > > > > > Hi > > > > I use a reflected table with an overriden column: > > > > summits_table = Table('sommets_out', > > MetaData(config['pylons.g'].sa_search_engine), > >

[sqlalchemy] Basic Level 1 sqlalchemist

2007-10-10 Thread Wes Duff
Hello gentelmen and ladies, I am very new to sqlalchemy and put in a position where I had to jump out of and airplane and land on my head and walk on my hands to the end of this project. I wanted to know how one_to_man and many_to_many are carried out. Here is an example class Document(ActiveMa

[sqlalchemy] Re: simple question on select_by with datetime object end mysql

2007-10-10 Thread Michael Bayer
On Oct 10, 2007, at 1:07 PM, jean-marc pouchoulon wrote: > > helo SQLAlchemylist, > > I want to purge my mysql database and delete record selected by date > with a select_by > > In [56]: query_etats.selectfirst().create_date > Out[56]: datetime.datetime(2007, 7, 31, 17, 24, 32) > > In [57]: mad

[sqlalchemy] simple question on select_by with datetime object end mysql

2007-10-10 Thread jean-marc pouchoulon
helo SQLAlchemylist, I want to purge my mysql database and delete record selected by date with a select_by In [56]: query_etats.selectfirst().create_date Out[56]: datetime.datetime(2007, 7, 31, 17, 24, 32) In [57]: madate Out[57]: datetime.datetime(2007, 8, 21, 18, 33, 9, 542421) In [58]: pr

[sqlalchemy] Re: RuntimeWarning with overriden reflected table

2007-10-10 Thread Michael Bayer
On Oct 10, 2007, at 10:01 AM, Eric Lemoine wrote: > > Hi > > I use a reflected table with an overriden column: > > summits_table = Table('sommets_out', > MetaData(config['pylons.g'].sa_search_engine), > Column('geom', Geometry), > autoload=True) > > an

[sqlalchemy] FYI: AutoCode moved to a new repository

2007-10-10 Thread Simon Pamies
Hi, although I said I would start on Friday if there are no objections, I couldn't longer resist to revamp autocode and so I moved it to google code. Please have a look at http://code.google.com/p/sqlautocode/ for the changes and the current structure. I also removed some contents from http://

[sqlalchemy] Re: engine.execute

2007-10-10 Thread Michael Bayer
On Oct 10, 2007, at 5:56 AM, Werner F. Bruhin wrote: > > Looking at the doc for 0.4 I see that I should be able to do this: > > result = engine.execute("select username from users") > ... do something with the result > result.close() > > But I am getting the following exception. Note that I am

[sqlalchemy] RuntimeWarning with overriden reflected table

2007-10-10 Thread Eric Lemoine
Hi I use a reflected table with an overriden column: summits_table = Table('sommets_out', MetaData(config['pylons.g'].sa_search_engine), Column('geom', Geometry), autoload=True) and I get RuntimeWarning when accessing the table: /home/elemoine/virtua

[sqlalchemy] Re: TurboGears: best practices for SELECTing

2007-10-10 Thread Lukasz Szybalski
On 10/10/07, James Brady <[EMAIL PROTECTED]> wrote: > > Hello all, > I'm a newcomer to SA, using it as the ORM for TurboGears at the > moment. > > Is there documentation/tutorials/recipes somewhere about how to > properly use SA from TurboGears? > > The problem I'm hitting at the moment is how to

[sqlalchemy] Re: TurboGears: best practices for SELECTing

2007-10-10 Thread Marco Mariani
James Brady ha scritto: > The problem I'm hitting at the moment is how to properly select simple > objects... There seems to be two main approaches, for example: > session.query(Ownership).select() or > ownership_table.select().execute() > > With the first approach, I get > InvalidRequestError: P

[sqlalchemy] Re: Number of opened connections with mod_python

2007-10-10 Thread Karl Pflästerer
On 09.10.2007 03:09 Graham Dumpleton wrote: [...] > their problems with consumption of resources may be getting > exacerbated by mod_python's module reloading mechanism. In short, the > engine object will be recreated every time the code file is changed > and reloaded. If this doesn't automaticall

[sqlalchemy] TurboGears: best practices for SELECTing

2007-10-10 Thread James Brady
Hello all, I'm a newcomer to SA, using it as the ORM for TurboGears at the moment. Is there documentation/tutorials/recipes somewhere about how to properly use SA from TurboGears? The problem I'm hitting at the moment is how to properly select simple objects... There seems to be two main approac

[sqlalchemy] engine.execute

2007-10-10 Thread Werner F. Bruhin
Looking at the doc for 0.4 I see that I should be able to do this: result = engine.execute("select username from users") ... do something with the result result.close() But I am getting the following exception. Note that I am using Firebird SQL and the firebird.py is the one patched by Roger.