diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2022-12-17 02:02:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-12-17 02:02:33 +0000 |
commit | e7e51af5b61c49d5198e31dfd0ef04e8941551eb (patch) | |
tree | a47665bbcda2a450aec8c3a8ff30a5d7873f5988 /lib/sqlalchemy/dialects/mysql/base.py | |
parent | e84cc158c469f17c90f2e058ed72595bc3be5cdb (diff) | |
parent | f8fd9ce23350c1f8fad13ff78506b100670a5896 (diff) | |
download | sqlalchemy-e7e51af5b61c49d5198e31dfd0ef04e8941551eb.tar.gz |
Merge "ensure all visit methods accept **kw" into main
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 2525c6c32..f965eac15 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1663,7 +1663,7 @@ class MySQLCompiler(compiler.SQLCompiler): for t in [from_table] + extra_froms ) - def visit_empty_set_expr(self, element_types): + def visit_empty_set_expr(self, element_types, **kw): return ( "SELECT %(outer)s FROM (SELECT %(inner)s) " "as _empty_set WHERE 1!=1" @@ -1962,14 +1962,14 @@ class MySQLDDLCompiler(compiler.DDLCompiler): return text - def visit_primary_key_constraint(self, constraint): + def visit_primary_key_constraint(self, constraint, **kw): text = super().visit_primary_key_constraint(constraint) using = constraint.dialect_options["mysql"]["using"] if using: text += " USING %s" % (self.preparer.quote(using)) return text - def visit_drop_index(self, drop): + def visit_drop_index(self, drop, **kw): index = drop.element text = "\nDROP INDEX " if drop.if_exists: @@ -1980,7 +1980,7 @@ class MySQLDDLCompiler(compiler.DDLCompiler): self.preparer.format_table(index.table), ) - def visit_drop_constraint(self, drop): + def visit_drop_constraint(self, drop, **kw): constraint = drop.element if isinstance(constraint, sa_schema.ForeignKeyConstraint): qual = "FOREIGN KEY " @@ -2014,7 +2014,7 @@ class MySQLDDLCompiler(compiler.DDLCompiler): ) return "" - def visit_set_table_comment(self, create): + def visit_set_table_comment(self, create, **kw): return "ALTER TABLE %s COMMENT %s" % ( self.preparer.format_table(create.element), self.sql_compiler.render_literal_value( @@ -2022,12 +2022,12 @@ class MySQLDDLCompiler(compiler.DDLCompiler): ), ) - def visit_drop_table_comment(self, create): + def visit_drop_table_comment(self, create, **kw): return "ALTER TABLE %s COMMENT ''" % ( self.preparer.format_table(create.element) ) - def visit_set_column_comment(self, create): + def visit_set_column_comment(self, create, **kw): return "ALTER TABLE %s CHANGE %s %s" % ( self.preparer.format_table(create.element.table), self.preparer.format_column(create.element), |