summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/test/requires.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-03-29 17:56:02 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-03-29 17:56:02 -0400
commit75e14f855ee64a01bb79e66f8a868911f6c9e583 (patch)
tree57e0fe600809b12db44040beed4b2e19cde22d6c /lib/sqlalchemy/test/requires.py
parentf35132267e2245f44f44d94c25a3d2015c224ac2 (diff)
downloadsqlalchemy-75e14f855ee64a01bb79e66f8a868911f6c9e583.tar.gz
- Session.refresh() now does an equivalent expire()
on the given instance first, so that the "refresh-expire" cascade is propagated. Previously, refresh() was not affected in any way by the presence of "refresh-expire" cascade. This is a change in behavior versus that of 0.6beta2, where the "lockmode" flag passed to refresh() would cause a version check to occur. Since the instance is first expired, refresh() always upgrades the object to the most recent version. - The 'refresh-expire' cascade, when reaching a pending object, will expunge the object if the cascade also includes "delete-orphan", or will simply detach it otherwise. [ticket:1754]
Diffstat (limited to 'lib/sqlalchemy/test/requires.py')
-rw-r--r--lib/sqlalchemy/test/requires.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sqlalchemy/test/requires.py b/lib/sqlalchemy/test/requires.py
index 73b212095..bf911c2c2 100644
--- a/lib/sqlalchemy/test/requires.py
+++ b/lib/sqlalchemy/test/requires.py
@@ -149,6 +149,18 @@ def sequences(fn):
no_support('sybase', 'no SEQUENCE support'),
)
+def update_nowait(fn):
+ """Target database must support SELECT...FOR UPDATE NOWAIT"""
+ return _chain_decorators_on(
+ fn,
+ no_support('access', 'no FOR UPDATE NOWAIT support'),
+ no_support('firebird', 'no FOR UPDATE NOWAIT support'),
+ no_support('mssql', 'no FOR UPDATE NOWAIT support'),
+ no_support('mysql', 'no FOR UPDATE NOWAIT support'),
+ no_support('sqlite', 'no FOR UPDATE NOWAIT support'),
+ no_support('sybase', 'no FOR UPDATE NOWAIT support'),
+ )
+
def subqueries(fn):
"""Target database must support subqueries."""
return _chain_decorators_on(