[sqlalchemy] How do I dispose of all engine resources?

2010-06-29 Thread Wyatt Lee Baldwin
Short version: How do I completely dispose of all resources belonging to an engine that uses a standard queue pool? I have a Web service that creates a bunch of engines on demand (that all use the default QueuePool). It needs to close inactive connections after X seconds. I monitor access to

[sqlalchemy] Re: How do I dispose of all engine resources?

2010-06-29 Thread Wyatt Lee Baldwin
On Jun 29, 12:21 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Jun 29, 2010, at 1:47 PM, Wyatt Lee Baldwin wrote: Short version: How do I completely dispose of all resources belonging to an engine that uses a standard queue pool? I'll reference the docs below just so they're here, I

[sqlalchemy] Re: Relation using = operator and literal values

2009-09-29 Thread Wyatt Lee Baldwin
On Sep 29, 7:55 am, Michael Bayer mike...@zzzcomputing.com wrote: Wyatt Lee Baldwin wrote: I have a relation defined like this in a declarative-style class:     route = relation(         RouteDef,         primaryjoin=(             (route_number == RouteDef.route_number

[sqlalchemy] Re: Relation using = operator and literal values

2009-09-29 Thread Wyatt Lee Baldwin
On Sep 29, 11:53 am, Michael Bayer mike...@zzzcomputing.com wrote: Wyatt Lee Baldwin wrote: In my view (which may be warped), a Trip has one Route (and many Trips follow the same Route). Here's more context: class Trip(Base):     __tablename__ = 'trip'     __table_args__ = dict

[sqlalchemy] Re: Relation using = operator and literal values

2009-09-29 Thread Wyatt Lee Baldwin
On Sep 29, 2:00 pm, Michael Bayer mike...@zzzcomputing.com wrote: Wyatt Lee Baldwin wrote: Anyway the primaryjoin here looks fine and does represent the same thing you're getting in your route() @property.   It's a simple many-to-one with an additional criterion.   Nothing needs

[sqlalchemy] Re: Relation using = operator and literal values

2009-09-29 Thread Wyatt Lee Baldwin
On Sep 29, 3:12 pm, Michael Bayer mike...@zzzcomputing.com wrote: Wyatt Lee Baldwin wrote: On Sep 29, 2:00 pm, Michael Bayer mike...@zzzcomputing.com wrote: Wyatt Lee Baldwin wrote: Anyway the primaryjoin here looks fine and does represent the same thing you're getting in your route

[sqlalchemy] Relation using = operator and literal values

2009-09-28 Thread Wyatt Lee Baldwin
I have a relation defined like this in a declarative-style class: route = relation( RouteDef, primaryjoin=( (route_number == RouteDef.route_number) (route_begin_date = RouteDef.route_begin_date) ), ) What I *really* want is for