[sqlalchemy] Re: Generated slow JOIN sql statement/specifying a left JOIN

2007-04-26 Thread Andreas Jung
--On 25. April 2007 07:13:19 -0400 Michael Bayer [EMAIL PROTECTED] wrote: well i just noticed youre sticking an external table into your primaryjoinbut i see nothing there that implies the usage of a LEFT OUTER JOIN ? are you saying that you dont need the rows from AMH_View to be

[sqlalchemy] Re: MySQL schema and character_Set_results

2007-04-26 Thread Michael Bayer
On Apr 25, 2007, at 11:18 PM, Daniel Holth wrote: P.S. My application uses reflection. For MySQL it would make so much sense to combine table exists with show me the table, since they are the same request. We should cache the result. consider that table exists might be used for other

[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Michael Bayer
mssql:// supports pyodbc. On Apr 26, 2007, at 5:35 AM, durumdara wrote: Hi! I want to subst. my modpy webframework to Pylons. I want use ORM in DB handling. But we used DBISAM in our projects, and now we access tables via ODBC and pyodbc. I don't see any odbc database engine in

[sqlalchemy] Re: RESOLVED Re: Generated slow JOIN sql statement/specifying a left JOIN

2007-04-26 Thread Andreas Jung
I resolved this issue. Choosing a different mapper class as first arg of the relation() call solved this issue and everything is working perfectly. -aj --On 26. April 2007 08:44:22 +0200 Andreas Jung [EMAIL PROTECTED] wrote: --On 25. April 2007 07:13:19 -0400 Michael Bayer [EMAIL PROTECTED]

[sqlalchemy] Re: Generated slow JOIN sql statement/specifying a left JOIN

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 2:44 AM, Andreas Jung wrote: --On 25. April 2007 07:13:19 -0400 Michael Bayer [EMAIL PROTECTED] wrote: well i just noticed youre sticking an external table into your primaryjoinbut i see nothing there that implies the usage of a LEFT OUTER JOIN ? are you

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-26 Thread Gaetan de Menten
On 4/26/07, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 26, 2007, at 4:40 AM, Gaetan de Menten wrote: - you have an aggregate function there. wheres the GROUP BY ? not just of the main table's columns but any other columns named for eager loads. It's unneeded in my

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 4:40 AM, Gaetan de Menten wrote: - the biggest picture not here - its read only ! It's obviously meant to be that way... So I don't see a problem here. We might want to add an exception when people try to change it, but that shouldn't be too hard. Besides, I

[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Durumdara
Hi! 2007/4/26, Michael Bayer [EMAIL PROTECTED]: mssql:// supports pyodbc. And how to I open the engine? (XXX is the name of the ODBC DataSource what I want to open. It is DBISAM database). from sqlalchemy import * import pyodbc db = create_engine('mssql://zeusweb', module=pyodbc) The

[sqlalchemy] Re: Selectable/subquery for a (scalar) column?

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 9:46 AM, Gaetan de Menten wrote: But nevermind the patch I did. I realize now it's pretty much useless. But what about the approach I discussed in my previous mail? (using what is in the relation loaders but without creating the instances) well as ive said, id like it

[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 9:35 AM, Durumdara wrote: Hi! 2007/4/26, Michael Bayer [EMAIL PROTECTED]: mssql:// supports pyodbc. And how to I open the engine? (XXX is the name of the ODBC DataSource what I want to open. It is DBISAM database). from sqlalchemy import * import pyodbc db =

[sqlalchemy] Question about overriding properties

2007-04-26 Thread Barry Hart
In our application's Order table, we have foreign-key fields which reference the persons who placed the order, are responsible for fulfilling the order, etc. For reporting speed, the Order table holds denormalized copies of contact information for these people. Whenever one of the foreign keys

[sqlalchemy] Re: Problem with clear_mapper

2007-04-26 Thread Kevin Schmidt
The stack before is all my classes, so the last one before is the call to class_mapper in the code I send. I had a brief look at the code: def clear_mapper(m): del mapper_registry[m.class_key] attribute_manager.reset_class_managed(m.class_) if hasattr(m.class_, 'c'):

[sqlalchemy] Re: Problem with clear_mapper

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 11:42 AM, Kevin Schmidt wrote: The traceback comme form del m.class_.c. It looks to me as it tries to delete the columns from the class and fails. I didn't define a mapper without an entity_name, could that be the problem? i dont really know. id rather just remove

[sqlalchemy] Re: Question about overriding properties

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 11:37 AM, Barry Hart wrote: In our application's Order table, we have foreign-key fields which reference the persons who placed the order, are responsible for fulfilling the order, etc. For reporting speed, the Order table holds denormalized copies of contact

[sqlalchemy] Re: Problem with clear_mapper

2007-04-26 Thread Kevin Schmidt
I can use clear_mappers() because I use mod_python and my mappers are defined during init. Is there any other way I can get this select mapped to my object? non_primary=True (see the docs on mutliple mappers for a class) But that would mean I would define a new non_primary mapper

[sqlalchemy] Re: Proposal: Make pyodbc the preferred DB-API for MSSQL

2007-04-26 Thread Paul Johnston
Hi, we have all that. all create_engines accept a module argument, and ms-sql specifically adds a module_name argument i believe. engine_name seems to have got lost at some point. I'm about to go away for a few days; I'll do a patch on my return. BTW, Rick, when you get a chance can you

[sqlalchemy] Clause Visitor changes causing issues.

2007-04-26 Thread Dennis
While using 0.3.5, I created a ClauseVisitor to see if a particular table was included in a query that I dynamically build. I've been trying to upgrade to 0.3.6 (or trunk), but that particular section is not working the same way. The docs say that by default, all the visit methods are still

[sqlalchemy] Re: Proposal: Make pyodbc the preferred DB-API for MSSQL

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 12:52 PM, Paul Johnston wrote: Hi, we have all that. all create_engines accept a module argument, and ms-sql specifically adds a module_name argument i believe. engine_name seems to have got lost at some point. I'm about to go away for a few days; I'll do a patch

[sqlalchemy] Re: Arguments for SA over django ORM

2007-04-26 Thread sdobrev
I've got a meeting coming up with a small team from a commercial DB vendor that's interested in extending their support into the Python community (yea!). Unfortunately, their analysis up until this point has left them with the impression that supporting the django ORM is the first priority,

[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Rick Morrison
.3.6 was stable (at least for me). One of the issues to address is going to be the multi-DBAPI support. Keeping all three stable at the same time can be tough. So starting .3.7, making pyodbc the only supported configuration is OK with me, although I'll keep pymssql up and running for the next

[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 6:15 PM, Rick Morrison wrote: .3.6 was stable (at least for me). One of the issues to address is going to be the multi-DBAPI support. Keeping all three stable at the same time can be tough. So starting .3.7, making pyodbc the only supported configuration is OK

[sqlalchemy] Re: SQLAlch. + ODBC + DBISAM... :-(

2007-04-26 Thread Rick Morrison
Sounds like a great idea -- is there an existing buildbot master to tie into, or will the whole thing be new? On 4/26/07, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 26, 2007, at 6:15 PM, Rick Morrison wrote: .3.6 was stable (at least for me). One of the issues to address is going