Re: [Sqlalchemy-users] intro to the 0.2 series

2006-04-20 Thread Robert Leftwich
Michael Bayer wrote: to me, the method means, "this is an object I loaded from some other Session and now I want it to be in this Session", thats why I like "import"...it implies youre "taking it from somewhere else and putting it here". adopt? Robert -

Re: [Sqlalchemy-users] intro to the 0.2 series

2006-04-20 Thread Michael Bayer
i would think you didnt like add() but liked import(). what does the name "update()" mean ? to me that means you want to issue an UPDATE statement. but SA will not issue any UPDATE statements unless the object is modified in some way. then you might say delete() on it and then its not g

Re: [Sqlalchemy-users] intro to the 0.2 series

2006-04-20 Thread Kevin Dangoor
On 4/20/06, Daniel Miller <[EMAIL PROTECTED]> wrote: > Yeah, I wasn't really suggesting that they be changed (although I don't like > "import_"). I agree with you on this particular bikeshed. PEP8, I believe, does mention that format, but it still seems ugly. Kevin

Re: [Sqlalchemy-users] intro to the 0.2 series

2006-04-20 Thread Daniel Miller
Michael Bayer wrote: hey Dan - just FYI, the current 0.2 Session implementation regarding this is looking like the following (hibernate's "save" is "add", hibernate's "update" is "import_". both of which at the moment seem to be clearer names to me, but maybe you see it differently...possib

Re: [Sqlalchemy-users] Threading pattern

2006-04-20 Thread Ed Suominen
Here's how I've addressed the same problem on a per-transaction basis, based on some ideas of Valentino Volonghi (aka Dialtone): http://foss.eepatents.com/pNetworkX/browser/trunk/pnetworkx/database.py Note particularly the "transact" function, which is used as a decorator. Here's a usage example

[Sqlalchemy-users] Threading pattern

2006-04-20 Thread Dimi Shahbaz
All, Here is the pattern I have adopted for putting long-running queries into a thread, to avoid blocking the entire application. I'm using twisted's deferToThread(). def runInThread(fun, *args, **kwargs): opts = schema.default_engine.engine.opts dbname = schema.default_engine.engine.n

[Sqlalchemy-users] Re: Trouble with many-to-many relationship from one table to itself

2006-04-20 Thread Raul Garcia
Michael Bayer zzzcomputing.com> writes: > raul - > > nice catch ! luckily, the natural dependency operations already > support what you are trying to do, i just had to make some slight > rearrangements in the properties module. added a distilled and > asserted version of your test to the

Re: [Sqlalchemy-users] update to ActiveMapper, and a call for help

2006-04-20 Thread Michael Bayer
looks like youre defining the same Table object twice. looking at the activemapper unit test i dont see the Person class being created twice so perhaps something in activemapper itself is calling Table ('person') a second time...id say throw some print statements in. On Apr 20, 2006, at 5

[Sqlalchemy-users] update to ActiveMapper, and a call for help

2006-04-20 Thread Jonathan LaCour
All, I have made an update to the ActiveMapper code based on changes by Gabriel Jacobo (thanks Gabriel!). I have been able to verify the changes in many cases, but I can't seem to get the ActiveMapper unit tests running again. I have already committed the changes that Gabriel sent me be

Re: Re[4]: [Sqlalchemy-users] question about convert_unicode

2006-04-20 Thread Michael Bayer
On Apr 20, 2006, at 2:18 PM, Vasily Sulatskov wrote: - may I suggest, that since this issue is decided completely within the source code for types.String, that various implementations of String, corresponding to different user preferences with regards to Unicode treatment, be provided as mods w

Re: [Sqlalchemy-users] intro to the 0.2 series

2006-04-20 Thread Michael Bayer
hey Dan - just FYI, the current 0.2 Session implementation regarding this is looking like the following (hibernate's "save" is "add", hibernate's "update" is "import_". both of which at the moment seem to be clearer names to me, but maybe you see it differently...possibly not consistent

Re: Re[2]: [Sqlalchemy-users] question about convert_unicode

2006-04-20 Thread Michael Bayer
a couple of things: - where's the patch ? I thought i had put it in but it seems not. lets put in a Trac ticket for it. - may I suggest, that since this issue is decided completely within the source code for types.String, that various implementations of String, corresponding to differen

Re[2]: [Sqlalchemy-users] question about convert_unicode

2006-04-20 Thread Vasily Sulatskov
Hello Qvx, > As for the autoload I'm not sure what to do. If *I* had to do it I would > return Unicode columns everywhere. More flexible solution would, I guess, > alow developer to intervene in some way (via kw param). I did some testing on sqlalchemy autoload feature and it seems that sqlalchem

[Sqlalchemy-users] Summer of Code

2006-04-20 Thread Kevin Dangoor
The PSF is a sponsoring organization for Google's Summer of Code. I personally am interested in seeing some kind of schema migration tool support and SQLObject compatibility for SQLAlchemy (probably built on ActiveMapper). Anyone else interested in those? Anyone want to mentor? Kevin -- Kevin Dan