executes inline as normal but will not trigger a "postfetch" condition
for the column, for those DB's who provide it via cursor.lastrowid
+ - func. objects can be pickled/unpickled [ticket:844]
+
- orm
- eager loading with LIMIT/OFFSET applied no longer adds the primary
table joined to a limited subquery of itself; the eager loads now
def __getattr__(self, attr):
return getattr(self.elem, attr)
+ def __getstate__(self):
+ return {'elem':self.elem, 'type':self.type, 'orig_set':self.orig_set}
+
+ def __setstate__(self, state):
+ self.elem = state['elem']
+ self.type = state['type']
+ self.orig_set = state['orig_set']
+
class _Grouping(_ColumnElementAdapter):
"""Represent a grouping within a column expression"""
pass
# test None becomes NULL
self.assert_compile(func.my_func(1,2,None,3), "my_func(:my_func, :my_func_1, NULL, :my_func_2)")
+ # test pickling
+ self.assert_compile(util.pickle.loads(util.pickle.dumps(func.my_func(1, 2, None, 3))), "my_func(:my_func, :my_func_1, NULL, :my_func_2)")
+
# assert func raises AttributeError for __bases__ attribute, since its not a class
# fixes pydoc
try: