[sqlalchemy] Re: Polymorphic collections / ticket #500

2007-03-06 Thread King Simon-NFHD78
I wanted to do something like this in the past, and in the end, rather than using polymorphic mappers it made more sense to create a MapperExtension which overrides create_instance. In create_instance you can examine your 'typ' column to decide what class to create, selecting one of your

[sqlalchemy] Explicit column in a SelectResults qry.

2007-03-06 Thread Glauco
Hi all, i've builded a mapper based on over 10 tables and it's optimized well for use of *_by function. Obviously some clausoleWhere must be formatted for select so my mapper has this profile: class MyClass(DomainObject, SferaDomainObject): def search( self, **kw ): by_where_clause

[sqlalchemy] Is it possible to know the size of a deferred PickleType?

2007-03-06 Thread Sanjay
Hi All, Wondering if it is possible to know the size of a file stored in a deferred column (PickleType), without retrieving the file itself. Thanks in advance. Sanjay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: Is it possible to know the size of a deferred PickleType?

2007-03-06 Thread Sean Davis
On Tuesday 06 March 2007 05:32, Sanjay wrote: Hi All, Wondering if it is possible to know the size of a file stored in a deferred column (PickleType), without retrieving the file itself. I usually try to save the filesize as a separate column. Sean

[sqlalchemy] Table being removed from nested query

2007-03-06 Thread King Simon-NFHD78
Hi, I have a problem in which a table is being removed from the FROM clause of a nested query. The attached file should show the problem, which I've tested on 0.3.5 and rev 2383. In the example, there are two tables, department and employee, such that one department has many employees. The inner

[sqlalchemy] Re: Table being removed from nested query

2007-03-06 Thread Michael Bayer
try putting correlate=False in the nested select. On Mar 6, 2007, at 6:29 AM, King Simon-NFHD78 wrote: Hi, I have a problem in which a table is being removed from the FROM clause of a nested query. The attached file should show the problem, which I've tested on 0.3.5 and rev 2383.

[sqlalchemy] Re: Ping

2007-03-06 Thread percious
Problem is, using turbogears I don't really have access to the pool_recycle without some horrible monkey patch. FYI, my ping seems to work, so I'm going with that for now. cheers. -percious On Mar 5, 1:00 pm, Sébastien LELONG [EMAIL PROTECTED] securities.fr wrote: I need to ping the Mysql

[sqlalchemy] Re: Ping

2007-03-06 Thread Paul Johnston
Hi, Problem is, using turbogears I don't really have access to the pool_recycle without some horrible monkey patch. Actually, it's easy to specify parameters to create_engine, just include a line like this in your config file sqlalchemy.pool_recycle = 3600 Paul

[sqlalchemy] pyodbc and tables with triggers

2007-03-06 Thread polaar
Hi, I recently tried out sqlalchemy with mssql via pyodbc (after being bitten by the adodbapi bug with the truncated parameters), and noticed the following problem: On inserting records into tables with triggers, pyodbc fails on the 'select @@identity as lastrowid' statement with an 'invalid

[sqlalchemy] Re: sa newbie

2007-03-06 Thread Jonathan Ellis
try db.books.select(db.books.c.book_skus.like('abcd%')) On 3/5/07, dan [EMAIL PROTECTED] wrote: I'm trying to track down the syntax for using a 'like' clause with sql soup. I'm trying to do something like select book_sku from books where book_sku like 'abcd%'; best i can tell, my

[sqlalchemy] Re: Cannot connect to Oracle DB: AttributeError: 'module' object has no attribute 'NCLOB'

2007-03-06 Thread Michael Bayer
old bug, upgrade to sqlalchemy 0.3.5 On Mar 6, 2007, at 5:51 PM, vinjvinj wrote: I get the following error: File build\bdist.win32\egg\sqlalchemy\engine\base.py, line 266, in execute File build\bdist.win32\egg\sqlalchemy\engine\base.py, line 271, in execute_t ext File

[sqlalchemy] Re: Is it possible to know the size of a deferred PickleType?

2007-03-06 Thread Sanjay
I usually try to save the filesize as a separate column. Hi Sean, Thanks for the suggestion. I think that might be the only way to know a filesize without retrieving a file. Sanjay --~--~-~--~~~---~--~~ You received this message because you are subscribed to