]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Render table hints in generic SQL
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 27 May 2020 14:18:33 +0000 (10:18 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 27 May 2020 14:22:33 +0000 (10:22 -0400)
commit1e42b3562198889b58634ca28080eef8914b8eb6
treefffa4d5311e2f06db1370ac10f97b73dddba24e8
parent8c96ae6765aa708a3569f96cfaf19c751e0855e5
Render table hints in generic SQL

Added :meth:`.Select.with_hint` output to the generic SQL string that is
produced when calling ``str()`` on a statement.  Previously, this clause
would be omitted under the assumption that it was dialect specific.
The hint text is presented within brackets to indicate the rendering
of such hints varies among backends.

Fixes: #5353
References: #4667
Change-Id: I01d97d6baa993e495519036ec7ecd5ae62856c16
(cherry picked from commit 7dc411dc63faf59b4e28fa0dea805887821d0d99)
doc/build/changelog/unreleased_13/5353.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/sql/test_compiler.py