hey list -
we've identified an issue with the connection pool released in 0.3.9
whereby threads can immediately throw a TimeoutError without waiting
for the pool_timeout number of seconds to have elapsed. This can
occur if many threads, greater than the number of total connections
allowed,
Hi all for my first post
I'm using the new one() method like this:
query(Table).filter_by(and_(Table.c.field1 == val1, Table.c.field2 ==
val2)).one()
filed1 + field2 has a unique constraint in Table, so there won't never
be more than one row returned, but there may be none.
When there's none I
i think there was .one() to return one and only one and die otherwise
i.e. match {1},
and first() or similar that allows match {0,1}.
On Friday 20 July 2007 18:42:56 Marco De Felice wrote:
Hi all for my first post
I'm using the new one() method like this:
I am creating a persistent job scheduler utility in my TG application
and have run into a minor issue regarding SqlAlchemy.
When a scheduled job is run, its specified module is loaded using
__import__ . This works fine unless the loaded module has an 'import
model' in it. If so, I get this:
Mike wrote:
sounds good. Looking forward to see it in 3.10dev
The case-check cache in the trunk and will be in the forthcoming
0.3.10.
Since it's a connection-scoped cache, you'll want to re-use the
same connection for all of the table autoloads you're doing. If
you're autoloading at the
Hello, I am trying to do something odd, but I was wondering if this
could be done with SQLAlchemy. See the script for details:
from sqlalchemy import *
metadata = BoundMetaData('sqlite://')
class Item(object):
def __init__(self, name):
self.name = name
def
yup, just spell it out
item_mapper = mapper(Item, item_table, properties=dict(
collections=relation(Item, secondary=collection_table ,lazy=True,
primaryjoin=item_table.c.id==collection_table.c.id_coll,
secondaryjoin=item_table.c.id==collection_table.c.id_item,
this is a minor release that is primarily to fix a connection pool
issue revealed earlier today. The pool issue was introduced in 0.3.9
and did not exist in prior versions, and only affects the behavior of
timeout, nothing to do with the state integrity of the pool or its
connections. The
Thanks Michael, thats just too cool!
On Jul 20, 10:35 pm, Michael Bayer [EMAIL PROTECTED] wrote:
yup, just spell it out
item_mapper = mapper(Item, item_table, properties=dict(
collections=relation(Item, secondary=collection_table ,lazy=True,
this ain't SA issue, but if u want a solution, u have to provide more
data, and do some prints here-there.
When a scheduled job is run, its specified module is loaded using
__import__ . This works fine unless the loaded module has an
'import model' in it. If so, I get this:
Traceback (most
I have a table that has two columns that reference the same table in a
foreign-key relationship. What do I need to specify and where to
avoid the error below?
class 'sqlalchemy.exceptions.ArgumentError': Error determining
primary and/or secondary join for relationship 'FeatureLoc.feature
On Jul 20, 11:57 pm, Sean Davis [EMAIL PROTECTED] wrote:
I have a table that has two columns that reference the same table in a
foreign-key relationship. What do I need to specify and where to
avoid the error below?
class 'sqlalchemy.exceptions.ArgumentError': Error determining
primary
12 matches
Mail list logo