summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/exc.py7
-rw-r--r--lib/sqlalchemy/sql/compiler.py16
2 files changed, 20 insertions, 3 deletions
diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py
index 5ce2d5df2..1e575626a 100644
--- a/lib/sqlalchemy/exc.py
+++ b/lib/sqlalchemy/exc.py
@@ -154,8 +154,15 @@ class CompileError(SQLAlchemyError):
class UnsupportedCompilationError(CompileError):
"""Raised when an operation is not supported by the given compiler.
+ .. seealso::
+
+ :ref:`faq_sql_expression_string`
+
+ :ref:`error_l7de`
"""
+ code = "l7de"
+
def __init__(self, compiler, element_type):
super(UnsupportedCompilationError, self).__init__(
"Compiler %r can't render element of type %s"
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 15ddd7d6f..c7fe3dc50 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -2717,10 +2717,20 @@ class SQLCompiler(Compiled):
class StrSQLCompiler(SQLCompiler):
- """"a compiler subclass with a few non-standard SQL features allowed.
+ """A :class:`.SQLCompiler` subclass which allows a small selection
+ of non-standard SQL features to render into a string value.
- Used for stringification of SQL statements when a real dialect is not
- available.
+ The :class:`.StrSQLCompiler` is invoked whenever a Core expression
+ element is directly stringified without calling upon the
+ :meth:`.ClauseElement.compile` method. It can render a limited set
+ of non-standard SQL constructs to assist in basic stringification,
+ however for more substantial custom or dialect-specific SQL constructs,
+ it will be necessary to make use of :meth:`.ClauseElement.compile`
+ directly.
+
+ .. seealso::
+
+ :ref:`faq_sql_expression_string`
"""