[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 25, 2007, at 3:52 PM, Gaetan de Menten wrote: > > > It's better with the attachments (the actual patch and a small > > demonstration/test file)... > > > > On 4/25/07, Gaetan de Menten <[EMAIL PROTECTED]> wrote: > >> Ok, I'm quite a

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

2007-04-26 Thread durumdara
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 SQLAlch.'s webpage. So I want to ask that there is no way to use ODBC connection? It is

[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 othe

[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: >> - 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 example, and for cases where this would be needed, >

[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

[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 PROTECTE

[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 ?

[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 u

[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

[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 r

[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

[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 pyod

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

2007-04-26 Thread Rick Morrison
I'm not sure this is going to work: Just because you can access a database via ODBC doesn't mean it's magically going to speak a particular dialect of SQL. ODBC abstracts database connection mechanisms, preparing and executing statements, binding parameters and other "middleware"-oriented tasks, b

[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 i

[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

[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 inf

[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_prim

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

2007-04-26 Thread Paul Johnston
Hi, I'm not familiar with DBISAM, I take it this is another database engine? (i.e. a "sister" to MySQL, PostgreSQL, etc.) As it stands, SQLAlchemy needs to have support specifically coded for each database. The MS-SQL support does use PyODBC, but as Rick pointed out, that doesn't help with ot

[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

[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 call

[sqlalchemy] Re: Problem with clear_mapper

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 12:44 PM, Kevin Schmidt wrote: > >>> 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 c

[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

[sqlalchemy] Re: Clause Visitor changes causing issues.

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 12:59 PM, Dennis wrote: > > 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

[sqlalchemy] Re: Question about overriding properties

2007-04-26 Thread Barry Hart
Ok, I'll give that a try. I was concerned the synonym would interfere with the Python property. Thanks, Barry - Original Message From: Michael Bayer <[EMAIL PROTECTED]> To: sqlalchemy@googlegroups.com Sent: Thursday, April 26, 2007 12:39:09 PM Subject: [sqlalchemy] Re: Question about ov

[sqlalchemy] Re: Question about overriding properties

2007-04-26 Thread Barry Hart
Yes, it worked perfectly. Sometimes I out-think myself; I should just try things. :-) Barry - Original Message From: Barry Hart <[EMAIL PROTECTED]> To: sqlalchemy@googlegroups.com Sent: Thursday, April 26, 2007 2:26:42 PM Subject: [sqlalchemy] Re: Question about overriding properties O

[sqlalchemy] Arguments for SA over django ORM

2007-04-26 Thread Ken Kuhlman
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, and

[sqlalchemy] Re: Clause Visitor changes causing issues.

2007-04-26 Thread Dennis
> > assuming you are now calling `visitor.traverse(object)`, instead of > `object.accept_visitor(visitor)`. its in the preceding paragraph. Thanks, I missed that detail, that I needed to explicitly call traverse. It's all good now. -Dennis --~--~-~--~~~---~--~---

[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 prior

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

2007-04-26 Thread Rick Morrison
Hey Mike, I think it may also be time to lift the "experimental" label from the MS-SQL module, waddyasay?. It may not be a 100% first-class SA citizen yet, but I think it's damn close. If it will help with support, I'll donate a configured VM with an installed version of MSSQL 2005 along with a re

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

2007-04-26 Thread Rick Morrison
Sure thing Paul, sorry about the wait, I've been swamped for like three weeks now. Should have some time on Sunday maybe. On 4/26/07, Paul Johnston <[EMAIL PROTECTED]> wrote: > > > Hi, > > >we have all that. all create_engines accept a "module" argument, and > >ms-sql specifically adds a "module

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

2007-04-26 Thread Michael Bayer
On Apr 26, 2007, at 5:53 PM, Rick Morrison wrote: > Hey Mike, I think it may also be time to lift the "experimental" > label from the MS-SQL module, waddyasay?. yeah thats no prob, seems like only the current trunk has a stable version tho ? > > It may not be a 100% first-class SA citizen

[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 cou

[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 addres

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

2007-04-26 Thread Durumdara
Hi! 2007/4/26, Paul Johnston <[EMAIL PROTECTED]>: > > > Hi, > > I'm not familiar with DBISAM, I take it this is another database engine? > (i.e. a "sister" to MySQL, PostgreSQL, etc.) DBISAM is completely another db engine, but it have ODBC driver to use it in out-of-Delphi applications. As it