self.isupdate = compiled.isupdate
self.isdelete = compiled.isdelete
self.should_autocommit = compiled.statement._autocommit
- if isinstance(compiled.statement, expression._TextClause):
- self.should_autocommit = self.should_autocommit or self.should_autocommit_text(self.statement)
+ if self.should_autocommit is expression.PARSE_AUTOCOMMIT:
+ self.should_autocommit = self.should_autocommit_text(self.statement)
if not parameters:
self.compiled_parameters = [compiled.construct_params()]
'literal_column', 'not_', 'null', 'or_', 'outparam', 'outerjoin', 'select',
'subquery', 'table', 'text', 'union', 'union_all', 'update', ]
-
+PARSE_AUTOCOMMIT = util._symbol('PARSE_AUTOCOMMIT')
def desc(column):
"""Return a descending ``ORDER BY`` clause element.
_hide_froms = []
def __init__(self, text = "", bind=None,
- bindparams=None, typemap=None, autocommit=False):
+ bindparams=None, typemap=None, autocommit=PARSE_AUTOCOMMIT):
self._bind = bind
self.bindparams = {}
self.typemap = typemap