2010-04-19から1日間の記事一覧

first() one()

Page not found — SQLAlchemy 1.3 Documentation first() Return the first result of this Query or None if the result doesn’t contain any row. This results in an execution of the underlying query.one() Return exactly one result or raise an exc…

lazy はキャッシュしない方が

The issue I ran into with the above code dealt with related tables. The default behavior for SQLAlchemy is for related table attributes to be lazy-loaded. Once the orm object has been detached from session, the related attribute no longer …

sqlalchemy

("param:").params(param=arg) はプレースホルダ "%s" % (arg) は置換 なので前者はエスケープあり、後者はなし → 確認params()を使った場合のsubquery()の動作http://www.braindonor.net/coding-blog/sqlalchemy-and-memcached/151/