summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-05-23 14:26:22 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-05-23 14:26:22 -0400
commitbc91884a4125ebda230ae8ff20f2af1dbc7e63c6 (patch)
treea9743367eddfef6e9b7392e169b522422e9c039a /lib/sqlalchemy/sql/elements.py
parent9c394ec1ae6e571476e8628221d1383add8eb497 (diff)
downloadsqlalchemy-bc91884a4125ebda230ae8ff20f2af1dbc7e63c6.tar.gz
- document the compiler_kwargs accessor
- add new FAQ for rendering SQL as a string
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 9f08aea67..13cf9aa91 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -460,6 +460,26 @@ class ClauseElement(Visitable):
also refer to any server-side default generation function
associated with a primary key `Column`.
+ :param compile_kwargs: optional dictionary of additional parameters
+ that will be passed through to the compiler within all "visit"
+ methods. This allows any custom flag to be passed through to
+ a custom compilation construct, for example. It is also used
+ for the case of passing the ``literal_binds`` flag through::
+
+ from sqlalchemy.sql import table, column, select
+
+ t = table('t', column('x'))
+
+ s = select([t]).where(t.c.x == 5)
+
+ print s.compile(compile_kwargs={"literal_binds": True})
+
+ .. versionadded:: 0.9.0
+
+ .. seealso::
+
+ :ref:`faq_sql_expression_string`
+
"""
if not dialect: