[sqlalchemy] Re: SQL echoing?

2007-02-09 Thread svilen
set metadata.engine.echo=False ? which revision are u using? eventuly check for remaining print's somewhere: grep -R ^ *print /sqlalchemy or grep -R ^[^#]*print /sqlalchemy One of my scripts keeps printing out a bunch of LAZY CLAUSE statements and I'd like to know how to turn that

[sqlalchemy] Re: Object-oriented engine?

2007-02-09 Thread svilen
how much OO u want? There is SA, which has ORM layer over sql, so can become a somewhat object persistency. There are turboentity/activemapper, currently joining together, which are simple declarative layer on top of SA. Then here is this 'sawrapper' of mine, which is also declarative and

[sqlalchemy] Re: Object-oriented engine?

2007-02-09 Thread Marco Mariani
svilen wrote: how much OO u want? He's not using a DBMS. He has more OO-ness than SA could give him :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Re: improving connection resiliency

2007-02-09 Thread Sébastien LELONG
I am wondering if there isn't a better way to handle connection issues than how I am doing it (see the sample below)? You should give a try with SA 0.3.3 (at least), since several connection problems have been solved. See thread MySQL has gone way. Although it talks about MySQL, the bugfix

[sqlalchemy] Dynamically adding MapperExtension

2007-02-09 Thread percious
question. Lets say I have a series of table definitions, and a series of objects linked to the tables with a bunch of mappers. First question: Is there a way to get from the table definitions in the metadata to the Mapper? Second question: If I create a MapperExtension, can I then link it to

[sqlalchemy] Re: FlushError: Can't change the identity of instance

2007-02-09 Thread Michael Bayer
svilen wrote: somehow u've managed to have 2 copies of same persistent-object - which should not happen; how did u get it? one has unicode-string '6', another one has int 6 instead - some conversion failing? ughno!! stop answering all these questions with the wrong answersit means

[sqlalchemy] Re: Adding with (nolock) to all queries (mssql)

2007-02-09 Thread Michael Bayer
before I read the next 10 replies in this thread, this seems like an issue of too high of a transaction isolation level going on (something that plagued my SQL server apps when i was writing them, though that was years ago). cant the connection itself have a more lenient isolation level set ?

[sqlalchemy] Re: new setuptools vs local SA copy

2007-02-09 Thread Michael Bayer
I have a directory on my laptop which looks like this: ./sa026 ./sa027 ./sa028 ./sa030 ./sa031 ... I set PYTHONPATH to ./lib. I change into each directory and run a script that id like to compare between versions. No setup.py develop is required...i dont want to install anything anywhere. I

[sqlalchemy] Re: Dynamically adding MapperExtension

2007-02-09 Thread Michael Bayer
percious wrote: question. Lets say I have a series of table definitions, and a series of objects linked to the tables with a bunch of mappers. First question: Is there a way to get from the table definitions in the metadata to the Mapper? not conveniently. you could loop through the

[sqlalchemy] Re: new setuptools vs local SA copy

2007-02-09 Thread Kumar McMillan
python setup.py develop [1] doesn't install anything. It makes a link to a directory of source code, just like you are doing w/ the pythonpath, and you only have to run it once. either method is accomplishing the same thing. I just find workingenv very easy to use and wanted to share since

[sqlalchemy] Re: Dynamically adding MapperExtension

2007-02-09 Thread svilen
question. Lets say I have a series of table definitions, and a series of objects linked to the tables with a bunch of mappers. First question: Is there a way to get from the table definitions in the metadata to the Mapper? For simple table==class, the link is 1:1. For

[sqlalchemy] Re: Dynamically adding MapperExtension

2007-02-09 Thread Michael Bayer
I should add that you *can* be more creative, and construct each mapper with a MapperExtension at the beginning which later can be enabled with a hello world callable. i.e. class MyExt(MapperExtension): def __init__(self): self.func = None def after_insert(self, ...):

[sqlalchemy] Re: Object-oriented engine?

2007-02-09 Thread chmod
Thanks for the tips, however I mean this DB we have is pure objects, there are no tables. So there isn't much of a logical leap to strap python on top of it, however you can't use and SQL. I guess I was wondering how tied to SQL SA is? If it's fundamental to the core, then I'm out of luck. But it

[sqlalchemy] Re: Object-oriented engine?

2007-02-09 Thread svilen
Thanks for the tips, however I mean this DB we have is pure objects, there are no tables. so u have to define the O-to-R mapping of your objects into tables, then ... So there isn't much of a logical leap to strap python on top of it, however you can't use and SQL. I guess I was wondering

[sqlalchemy] Never-saved orphans are an error?

2007-02-09 Thread SteveTether
The following code raises a FlushError because the child object named Cheshire is an orphan and the delete-orphan cascade rule is in effect. It seems to me that an orphan which has no database identity should be detached from its session, just as it was attached when appended to a parent's list

[sqlalchemy] Re: Never-saved orphans are an error?

2007-02-09 Thread SteveTether
Forgot to say I'm using SA 0.3.4. On Feb 9, 5:05 pm, SteveTether [EMAIL PROTECTED] wrote: The following code raises a FlushError because the child object named Cheshire is an orphan and the delete-orphan cascade rule is in effect. It seems to me that an orphan which has no database identity