summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-01-25 16:55:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-01-25 16:55:17 -0500
commit505ce796900150e09fc6087a8381f1dca062b324 (patch)
tree4d3e3dd0b1439f2654f1d8cac073db7db22c893b /lib/sqlalchemy/sql/elements.py
parent38519e31b93391c22044e84d35e128031c18ef7b (diff)
downloadsqlalchemy-505ce796900150e09fc6087a8381f1dca062b324.tar.gz
tweak text
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 04165a083..536058a50 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -1064,7 +1064,20 @@ class TypeClause(ClauseElement):
class TextClause(Executable, ClauseElement):
"""Represent a literal SQL text fragment.
- Public constructor is the :func:`text()` function.
+ E.g.::
+
+ from sqlalchemy import text
+
+ t = text("SELECT * FROM users")
+ result = connection.execute(t)
+
+
+ The :class:`.Text` construct is produced using the :func:`.text`
+ function; see that function for full documentation.
+
+ .. seealso::
+
+ :func:`.text`
"""
@@ -1162,7 +1175,8 @@ class TextClause(Executable, ClauseElement):
to it as an :class:`.Executable` object, and it supports
the :meth:`Executable.execution_options` method. For example,
a :func:`.text` construct that should be subject to "autocommit"
- can be set explicitly so using the ``autocommit`` option::
+ can be set explicitly so using the :paramref:`.Connection.execution_options.autocommit`
+ option::
t = text("EXEC my_procedural_thing()").\\
execution_options(autocommit=True)