commit or rollback transaction with errors
on engine.begin().
-- postgresql
- - [bug] Fixed the "render literal bind" function,
- used by Alembic, to escape % signs with %%.
-
- mysql
- [feature] Added support for the "isolation_level"
parameter to all MySQL dialects. Thanks
# TODO: need to inspect "standard_conforming_strings"
if self.dialect._backslash_escapes:
value = value.replace('\\', '\\\\')
- value = value.replace("%", "%%")
return value
def visit_sequence(self, seq):
'RETURNING length(mytable.name) AS length_1'
, dialect=dialect)
- def test_render_literal(self):
- dialect = postgresql.dialect()
- compiler = dialect.statement_compiler(dialect, None)
- for value, exp in [
- ('hi', "'hi'"),
- ("with 'quotes'", "'with ''quotes'''"),
- ('%.%', "'%%.%%'")
- ]:
- eq_(
- compiler.render_literal_value(value, None),
- exp
- )
def test_insert_returning(self):
dialect = postgresql.dialect()