diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2017-04-04 14:28:39 -0400 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@awstats.zzzcomputing.com> | 2017-04-04 14:28:39 -0400 |
| commit | 1e7b730ce8385baaa7a9d281b40695a7b9cc586a (patch) | |
| tree | 5574c6fa8d671f394b16054c619e456d795ea670 /lib/sqlalchemy/sql | |
| parent | 87b1404eda0f6d2e99b3b2a01ae1c641fbe91311 (diff) | |
| parent | 9f82afea25958910038ec768d81b157d9d2fdc7c (diff) | |
| download | sqlalchemy-1e7b730ce8385baaa7a9d281b40695a7b9cc586a.tar.gz | |
Merge "Recognize brackets, quoted_name in SQL Server schema"
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/__init__.py | 1 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/elements.py | 8 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/__init__.py b/lib/sqlalchemy/sql/__init__.py index 5eebd7d1c..13042ed7a 100644 --- a/lib/sqlalchemy/sql/__init__.py +++ b/lib/sqlalchemy/sql/__init__.py @@ -57,6 +57,7 @@ from .expression import ( outerjoin, outparam, over, + quoted_name, select, subquery, table, diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 1f8129382..001c3d042 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -3905,8 +3905,8 @@ class quoted_name(util.MemoizedSlots, util.text_type): can be quoted. Such as to use the :meth:`.Engine.has_table` method with an unconditionally quoted name:: - from sqlaclchemy import create_engine - from sqlalchemy.sql.elements import quoted_name + from sqlalchemy import create_engine + from sqlalchemy.sql import quoted_name engine = create_engine("oracle+cx_oracle://some_dsn") engine.has_table(quoted_name("some_table", True)) @@ -3917,6 +3917,10 @@ class quoted_name(util.MemoizedSlots, util.text_type): .. versionadded:: 0.9.0 + .. versionchanged:: 1.2 The :class:`.quoted_name` construct is now + importable from ``sqlalchemy.sql``, in addition to the previous + location of ``sqlalchemy.sql.elements``. + """ __slots__ = 'quote', 'lower', 'upper' diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 172bf4b05..193dbaa96 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -26,7 +26,8 @@ __all__ = [ 'nullslast', 'or_', 'outparam', 'outerjoin', 'over', 'select', 'subquery', 'table', 'text', - 'tuple_', 'type_coerce', 'union', 'union_all', 'update', 'within_group', + 'tuple_', 'type_coerce', 'quoted_name', 'union', 'union_all', 'update', + 'within_group', 'TableSample', 'tablesample'] @@ -37,7 +38,7 @@ from .elements import ClauseElement, ColumnElement,\ BindParameter, CollectionAggregate, UnaryExpression, BooleanClauseList, \ Label, Cast, Case, ColumnClause, TextClause, Over, Null, \ True_, False_, BinaryExpression, Tuple, TypeClause, Extract, \ - Grouping, WithinGroup, not_, \ + Grouping, WithinGroup, not_, quoted_name, \ collate, literal_column, between,\ literal, outparam, TypeCoerce, ClauseList, FunctionFilter |
