[sqlalchemy] Re: Sqlalchemy beaker cache and memcached

2011-06-08 Thread BenH
Hi, I use Beaker in production to help speed up the delivery of game content. We've seen enormous (seconds to milliseconds) speed ups for caching large queries that don't change. We don't use it at the query level but as a way to cache whole results from sqlalchemy. As long as you remember to

[sqlalchemy] DetachedInstanceError when calling __repr__

2011-04-07 Thread BenH
Hi, I have an objects that when I convert to a string using __repr__ throws a DetachedInstanceError. If I access any of their members or test the session (using 'user in Session') everything is fine but if I check 'self in Session' in __repr__ the result is False. I can reattach it to the Session

[sqlalchemy] Re: PostgreSQL, cascading and non-nullable ForeignKeys

2010-09-16 Thread BenH
On Sep 15, 3:20 pm, Conor conor.edward.da...@gmail.com wrote: On 09/15/2010 05:04 PM, BenH wrote: Hi, I'm using SqlAlchemy 0.6.3 and PostgreSQL 8.4 and I'm trying to setup a cascading delete between several levels of tables. The problem seems to be that I can't have a relationship

[sqlalchemy] PostgreSQL, cascading and non-nullable ForeignKeys

2010-09-15 Thread BenH
Hi, I'm using SqlAlchemy 0.6.3 and PostgreSQL 8.4 and I'm trying to setup a cascading delete between several levels of tables. The problem seems to be that I can't have a relationship with cascade=all and a column with ForeignKey that has nullable=False. Here is my example: from sqlalchemy

[sqlalchemy] Comparing a DateTime column to now() in a query filter

2010-06-09 Thread BenH
Hi, Sorry if this is an obvious question but I can't find the answer, perhaps my Google-fu is weak. I have a table 'Item' with an 'expires' DateTime column, I want to test it against now() and check whether the item in the table is out of date. I've tried:

[sqlalchemy] Re: Comparing a DateTime column to now() in a query filter

2010-06-09 Thread BenH
Ok, I'm an idiot. This query works perfectly. My problem was with the table definition and setting the default. Sorry for the noise. BEN On Jun 9, 2:52 pm, BenH ben.hesk...@gmail.com wrote: Hi, Sorry if this is an obvious question but I can't find the answer, perhaps my Google-fu is weak