diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-04-01 18:31:16 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-04-01 19:25:23 -0400 |
commit | 49b6c50016c8a038a6df7104560bb3945debe064 (patch) | |
tree | 9b5b6b9ad6a6aba5374768afd52783fd8c2170f3 /lib/sqlalchemy/sql/compiler.py | |
parent | a9b62055bfa61c11e9fe0b2984437e2c3e32bf0e (diff) | |
download | sqlalchemy-49b6c50016c8a038a6df7104560bb3945debe064.tar.gz |
Repair caching / traversals for values
The test suite wasn't running the copy_internals most fixtures,
enable that and try to get all cases working.
Set up selectable.values to do tuple conversion within compilation
step. at the same time, disable caching for selectable.values
for the moment and make it equivalent to dml_multi_values.
fix cache / compare / copy cases for dml_values and dml_multi_values
which weren't fully tested or covered.
Change-Id: I484ca6e9cb2b66c2e6a321698f2abc0838db1460
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 799fca2f5..b93ed8890 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2324,9 +2324,14 @@ class SQLCompiler(Compiled): return text def visit_values(self, element, asfrom=False, from_linter=None, **kw): + v = "VALUES %s" % ", ".join( - self.process(elem, literal_binds=element.literal_binds) - for elem in element._data + self.process( + elements.Tuple(*elem).self_group(), + literal_binds=element.literal_binds, + ) + for chunk in element._data + for elem in chunk ) if isinstance(element.name, elements._truncated_label): |