[sqlalchemy] Re: Understanding sqlalchemy memory usage and releasing unused memory

2012-02-07 Thread Gunnlaugur Briem
Hi Manav, the final question did touch SQLAlchemy: the one about expiring and expunging. 1. expiring an object creates a weak reference - this is inaccurate. All object references held by the the session (except for objects whose addition, deletion or attribute change is not yet flushed) are

[sqlalchemy] late-binding association proxy fixes error with ordered many-to-many list

2012-02-07 Thread Wichert Akkerman
I have been looking at making an ordered many-to-many list. The example from Jason Kirkland from 2008 (http://groups.google.com/group/sqlalchemy/browse_thread/thread/611c88ee27354246 ) worked, but our version of it did not. I have modified his version (see code at the end of the mail) to use

Re: [sqlalchemy] late-binding association proxy fixes error with ordered many-to-many list

2012-02-07 Thread Michael Bayer
On Feb 7, 2012, at 11:43 AM, Wichert Akkerman wrote: I have been looking at making an ordered many-to-many list. The example from Jason Kirkland from 2008 (http://groups.google.com/group/sqlalchemy/browse_thread/thread/611c88ee27354246 ) worked, but our version of it did not. I have

[sqlalchemy] String matching

2012-02-07 Thread yannack
Hello list, I have the following problem. I wish to query my database to look for columns with names included in, or including, a given string. is there a way to do the opposite of contains, ie, a contained method for string columns? Right now, I am doing the following:

[sqlalchemy] Association proxy: proxy to mapped class instance?

2012-02-07 Thread Dave
I've got a class Keyword that is many to many to itself through a mapped association table. The association table tracks which keyword is a parent of through the keywords ids (PK). Please see the pastebin. http://pastebin.com/774YmjKD I have been reading the a

RE: [sqlalchemy] String matching

2012-02-07 Thread Jackson, Cameron
I'm not sure how to do exactly what you're asking, but I have an alternative suggestion: You could just query everything and do the filter at the application level (i.e. in Python), rather than in the query. Because Python is awesome, this is now easy to write: custom_string = 'foobar'

RE: [sqlalchemy] String matching

2012-02-07 Thread Jackson, Cameron
Ah, I missed a closing ) in my code sample there. There should be a ) before the ], to close the if statement. -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Jackson, Cameron Sent: Wednesday, 8 February 2012 10:01 AM To:

Re: [sqlalchemy] String matching

2012-02-07 Thread Michael Bayer
On Feb 7, 2012, at 12:34 PM, yannack wrote: Hello list, I have the following problem. I wish to query my database to look for columns with names included in, or including, a given string. is there a way to do the opposite of contains, ie, a contained method for string columns? Right now, I

Re: [sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-07 Thread Michael Bayer
I have good news on this front, in that I've nailed down how this will work, including a patch that gets this basic thing working as a proof of concept. However, the issue of being able to distinguish remote and foreign in a binary expression where a column points to itself can benefit from

Re: [sqlalchemy] Disabling auto-conversion to Decimal in Oracle connections

2012-02-07 Thread Anthony Foglia
On Mon, Feb 6, 2012 at 10:59 AM, Michael Bayer mike...@zzzcomputing.com wrote: Attached is a patch that allows coerce_to_decimal to be passed to create_engine() and will disable the output handling if passed as False.   Do you want to give it a try, I can commit it for 0.7.6 if it does the

Re: [sqlalchemy] Association proxy: proxy to mapped class instance?

2012-02-07 Thread Michael Bayer
On Feb 7, 2012, at 3:31 PM, Dave wrote: I've got a class Keyword that is many to many to itself through a mapped association table. The association table tracks which keyword is a parent of through the keywords ids (PK). Please see the pastebin. http://pastebin.com/774YmjKD I have been