summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-08-01 07:18:50 +0000
committerJason Kirtland <jek@discorporate.us>2007-08-01 07:18:50 +0000
commit18dab5baf0bed47eeeaab6ada389f7c71434ef78 (patch)
tree0044ef23b33f0014166c56d6842ea5d2d960b6e5 /lib/sqlalchemy/ext
parenta52e5a772bfc93f5b04206705789b0ac53f2b18f (diff)
downloadsqlalchemy-18dab5baf0bed47eeeaab6ada389f7c71434ef78.tar.gz
Added EXT_CONTINUE and EXT_STOP for MapperExtensions; EXT_PASS is a synonym for EXT_CONTINUE.
Repointed docs and examples to EXT_CONTINUE
Diffstat (limited to 'lib/sqlalchemy/ext')
-rw-r--r--lib/sqlalchemy/ext/selectresults.py2
-rw-r--r--lib/sqlalchemy/ext/sessioncontext.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/ext/selectresults.py b/lib/sqlalchemy/ext/selectresults.py
index 1920b6f92..446228254 100644
--- a/lib/sqlalchemy/ext/selectresults.py
+++ b/lib/sqlalchemy/ext/selectresults.py
@@ -15,7 +15,7 @@ class SelectResultsExt(orm.MapperExtension):
def select(self, query, arg=None, **kwargs):
if isinstance(arg, sql.FromClause) and arg.supports_execution():
- return orm.EXT_PASS
+ return orm.EXT_CONTINUE
else:
if arg is not None:
query = query.filter(arg)
diff --git a/lib/sqlalchemy/ext/sessioncontext.py b/lib/sqlalchemy/ext/sessioncontext.py
index fcbf29c3f..91c03d3c3 100644
--- a/lib/sqlalchemy/ext/sessioncontext.py
+++ b/lib/sqlalchemy/ext/sessioncontext.py
@@ -1,5 +1,5 @@
from sqlalchemy.util import ScopedRegistry
-from sqlalchemy.orm import create_session, object_session, MapperExtension, EXT_PASS
+from sqlalchemy.orm import create_session, object_session, MapperExtension, EXT_CONTINUE
__all__ = ['SessionContext', 'SessionContextExt']
@@ -66,11 +66,11 @@ class SessionContextExt(MapperExtension):
def init_instance(self, mapper, class_, instance, args, kwargs):
session = kwargs.pop('_sa_session', self.context.current)
session._save_impl(instance, entity_name=kwargs.pop('_sa_entity_name', None))
- return EXT_PASS
+ return EXT_CONTINUE
def init_failed(self, mapper, class_, instance, args, kwargs):
object_session(instance).expunge(instance)
- return EXT_PASS
+ return EXT_CONTINUE
def dispose_class(self, mapper, class_):
if hasattr(class_, '__init__') and hasattr(class_.__init__, '_oldinit'):