[sqlalchemy] Re: SQLAlchemy 0.6.6 Released

2011-01-14 Thread dusans
So the C extensions would be good for someone that would use it for an ETL with a lot of data? :) On 9 jan., 17:25, Michael Bayer mike...@zzzcomputing.com wrote: I remain a little nervous about the C extensions, not as much because the current code is unreliable, but because I'd like there to

Re: [sqlalchemy] Insert record error

2011-01-14 Thread Eric Lemoine
On Thursday, January 13, 2011, William Hudspeth bhudsp...@edac.unm.edu wrote: Thanks for responding, I tried changing the geometry object definition, as well as the model definition and I get the same result... dream_geom=MULTIPOLYGON((-120.000 43.833,-96.833 43.833,-96.833 26.000,-120.000

Re: [sqlalchemy] unittest assertRaises does not catch NoResultFound

2011-01-14 Thread Chris Withers
On 11/01/2011 15:26, Michael Bayer wrote: On Jan 11, 2011, at 4:56 AM, pr64 wrote: self.assertEqual(self.session.query(User).filter(User.firstname == user1_fn).count(), 1) self.assertRaises(NoResultFound, self.session.query(User).filter(User.firstname == other_fn).one())

Re: [sqlalchemy] Re: guard all session.query with try except?

2011-01-14 Thread Chris Withers
On 14/01/2011 06:59, can xiang wrote: Thanks for your advise. My application is a tornadoweb app. So I'm going to create Session() for each request. Tornado is an async framework, right? If so, you may be in for a bumpy ride unless you get all SQLAlchemy stuff happening in threads...

Re: [sqlalchemy] Re: SQLAlchemy 0.6.6 Released

2011-01-14 Thread Michael Bayer
An ETL (an acronym I keep forgetting, then I look it up, then I say, oh right I write three of those per week) is heavy on the flush side, assuming the E part is from spreadsheets or something like that.I made a few fairly vast improvements to flush() efficiency in 0.7, they're fun to watch

Re: [sqlalchemy] Insert record error

2011-01-14 Thread William Hudspeth
Eric, I have posted to the GeoAlchemy list after trying your suggestion... http://groups.google.com/group/geoalchemy/browse_thread/thread/5a0c2a2ddce2cfc9# Thanks On Fri, 2011-01-14 at 13:38 +0100, Eric Lemoine wrote: On Thursday, January 13, 2011, William Hudspeth bhudsp...@edac.unm.edu

[sqlalchemy] Re: Best way to reduce boilerplate?

2011-01-14 Thread Randall Nortman
I'm having trouble getting mixins to play nicely with __table_args__. Using the example I gave earlier in this thread: On Jan 13, 1:00 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Jan 13, 2011, at 12:11 PM, Randall Nortman wrote: [...]    namespace_id = Column(Integer,

Re: [sqlalchemy] Implementing a specific commit/refresh strategy for one table only

2011-01-14 Thread Franck
Thanks Michael. I'll also study carefully the other thread (can expire_on_commit be made...) it has interesting insights ! Franck On Thu, Jan 13, 2011 at 4:26 PM, Michael Bayer mike...@zzzcomputing.comwrote: You'd implement the expire yourself using SessionExtension.after_commit(). On

Re: [sqlalchemy] Re: Best way to reduce boilerplate?

2011-01-14 Thread Michael Bayer
On Jan 14, 2011, at 12:40 PM, Randall Nortman wrote: I'm having trouble getting mixins to play nicely with __table_args__. Using the example I gave earlier in this thread: On Jan 13, 1:00 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Jan 13, 2011, at 12:11 PM, Randall Nortman wrote:

[sqlalchemy] Re: Best way to reduce boilerplate?

2011-01-14 Thread Randall Nortman
On Jan 14, 1:07 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Jan 14, 2011, at 12:40 PM, Randall Nortman wrote: I'm having trouble getting mixins to play nicely with __table_args__. Using the example I gave earlier in this thread: On Jan 13, 1:00 pm, Michael Bayer

Re: [sqlalchemy] dirtying attributes of a user-defined type

2011-01-14 Thread A . M .
On Jan 13, 2011, at 3:29 PM, Michael Bayer wrote: There's mistakes in how this is structured. UserDefinedType represents a type object applied to a Column. The actual data handled by such a type is not meant to be an instance of the type itself. ACLItem() here would be its own class,

Re: [sqlalchemy] Re: Best way to reduce boilerplate?

2011-01-14 Thread Michael Bayer
On Jan 14, 2011, at 3:01 PM, Randall Nortman wrote: On Jan 14, 1:07 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Jan 14, 2011, at 12:40 PM, Randall Nortman wrote: The testing of tuple/dict as well as combining several is left up to users at this point. I'd suggest putting that

Re: [sqlalchemy] dirtying attributes of a user-defined type

2011-01-14 Thread A.M.
On Jan 14, 2011, at 3:26 PM, A.M. wrote: I suspect I have to implement special converter methods with psycopg2 register_adapter/new_type. That is what I am experimenting with now. It looks like SQLAlchemy's array type support doesn't support anything beyond basic built-in types that accept

[sqlalchemy] Re: SQLAlchemy 0.6.6 Released

2011-01-14 Thread dusans
for me its from Oracle to Netezza :) tables with 200 milion rows :) a feature im waiting for a long time is being able to drop any pyodbc connection and use it to query (orm) a db (using standard sql). Would love to see that in 0.8 :P On 14 jan., 16:19, Michael Bayer mike...@zzzcomputing.com

[sqlalchemy] Re: guard all session.query with try except?

2011-01-14 Thread can xiang
Thanks, but I don't need aysnc database access anyway. On Jan 14, 11:02 pm, Chris Withers ch...@simplistix.co.uk wrote: On 14/01/2011 06:59, can xiang wrote: Thanks for your advise. My application is a tornadoweb app. So I'm going to create Session() for each request. Tornado is an

Re: [sqlalchemy] Re: Best way to reduce boilerplate?

2011-01-14 Thread Randall Nortman
On Fri, Jan 14, 2011 at 01:07:06PM -0500, Michael Bayer wrote: It's currently an unsolved problem how conflicting tuples/dicts would be reconciled automatically by declarative, and doing so would also make it impossible for implementations to override its behavior, since declarative would