diff options
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r-- | lib/sqlalchemy/sql/expression.py | 184 |
1 files changed, 91 insertions, 93 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index aab9f46d4..d8e5f170a 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -81,80 +81,98 @@ __all__ = [ ] -from .visitors import Visitable -from .functions import func, modifier, FunctionElement, Function -from ..util.langhelpers import public_factory -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_, - quoted_name, - collate, - literal_column, - between, - literal, - outparam, - TypeCoerce, - ClauseList, - FunctionFilter, -) - -from .elements import ( - SavepointClause, - RollbackToSavepointClause, - ReleaseSavepointClause, -) - -from .base import ColumnCollection, Generative, Executable, PARSE_AUTOCOMMIT - -from .selectable import ( - Alias, - Join, - Select, - Selectable, - TableClause, - CompoundSelect, - CTE, - FromClause, - FromGrouping, - Lateral, - SelectBase, - alias, - GenerativeSelect, - subquery, - HasCTE, - HasPrefixes, - HasSuffixes, - lateral, - Exists, - ScalarSelect, - TextAsFrom, - TableSample, - tablesample, -) +from .base import _from_objects # noqa +from .base import ColumnCollection # noqa +from .base import Executable # noqa +from .base import Generative # noqa +from .base import PARSE_AUTOCOMMIT # noqa +from .dml import Delete # noqa +from .dml import Insert # noqa +from .dml import Update # noqa +from .dml import UpdateBase # noqa +from .dml import ValuesBase # noqa +from .elements import _clause_element_as_expr # noqa +from .elements import _clone # noqa +from .elements import _cloned_difference # noqa +from .elements import _cloned_intersection # noqa +from .elements import _column_as_key # noqa +from .elements import _corresponding_column_or_error # noqa +from .elements import _expression_literal_as_text # noqa +from .elements import _is_column # noqa +from .elements import _labeled # noqa +from .elements import _literal_as_binds # noqa +from .elements import _literal_as_label_reference # noqa +from .elements import _literal_as_text # noqa +from .elements import _only_column_elements # noqa +from .elements import _select_iterables # noqa +from .elements import _string_or_unprintable # noqa +from .elements import _truncated_label # noqa +from .elements import between # noqa +from .elements import BinaryExpression # noqa +from .elements import BindParameter # noqa +from .elements import BooleanClauseList # noqa +from .elements import Case # noqa +from .elements import Cast # noqa +from .elements import ClauseElement # noqa +from .elements import ClauseList # noqa +from .elements import collate # noqa +from .elements import CollectionAggregate # noqa +from .elements import ColumnClause # noqa +from .elements import ColumnElement # noqa +from .elements import Extract # noqa +from .elements import False_ # noqa +from .elements import FunctionFilter # noqa +from .elements import Grouping # noqa +from .elements import Label # noqa +from .elements import literal # noqa +from .elements import literal_column # noqa +from .elements import not_ # noqa +from .elements import Null # noqa +from .elements import outparam # noqa +from .elements import Over # noqa +from .elements import quoted_name # noqa +from .elements import ReleaseSavepointClause # noqa +from .elements import RollbackToSavepointClause # noqa +from .elements import SavepointClause # noqa +from .elements import TextClause # noqa +from .elements import True_ # noqa +from .elements import Tuple # noqa +from .elements import TypeClause # noqa +from .elements import TypeCoerce # noqa +from .elements import UnaryExpression # noqa +from .elements import WithinGroup # noqa +from .functions import func # noqa +from .functions import Function # noqa +from .functions import FunctionElement # noqa +from .functions import modifier # noqa +from .selectable import _interpret_as_from # noqa +from .selectable import Alias # noqa +from .selectable import alias # noqa +from .selectable import CompoundSelect # noqa +from .selectable import CTE # noqa +from .selectable import Exists # noqa +from .selectable import FromClause # noqa +from .selectable import FromGrouping # noqa +from .selectable import GenerativeSelect # noqa +from .selectable import HasCTE # noqa +from .selectable import HasPrefixes # noqa +from .selectable import HasSuffixes # noqa +from .selectable import Join # noqa +from .selectable import Lateral # noqa +from .selectable import lateral # noqa +from .selectable import ScalarSelect # noqa +from .selectable import Select # noqa +from .selectable import Selectable # noqa +from .selectable import SelectBase # noqa +from .selectable import subquery # noqa +from .selectable import TableClause # noqa +from .selectable import TableSample # noqa +from .selectable import tablesample # noqa +from .selectable import TextAsFrom # noqa +from .visitors import Visitable # noqa +from ..util.langhelpers import public_factory # noqa -from .dml import Insert, Update, Delete, UpdateBase, ValuesBase - # factory functions - these pull class-bound constructors and classmethods # from SQL elements and selectables into public functions. This allows # the functions to be available in the sqlalchemy.sql.* namespace and @@ -174,7 +192,7 @@ within_group = public_factory(WithinGroup, ".expression.within_group") label = public_factory(Label, ".expression.label") case = public_factory(Case, ".expression.case") cast = public_factory(Cast, ".expression.cast") -extract = public_factory(Extract, ".expression.extract") +extract = public_factory(Extract, ".exp # noqaression.extract") tuple_ = public_factory(Tuple, ".expression.tuple_") except_ = public_factory(CompoundSelect._create_except, ".expression.except_") except_all = public_factory( @@ -216,26 +234,6 @@ funcfilter = public_factory(FunctionFilter, ".expression.funcfilter") # internal functions still being called from tests and the ORM, # these might be better off in some other namespace -from .base import _from_objects -from .elements import ( - _literal_as_text, - _clause_element_as_expr, - _is_column, - _labeled, - _only_column_elements, - _string_or_unprintable, - _truncated_label, - _clone, - _cloned_difference, - _cloned_intersection, - _column_as_key, - _literal_as_binds, - _select_iterables, - _corresponding_column_or_error, - _literal_as_label_reference, - _expression_literal_as_text, -) -from .selectable import _interpret_as_from # old names for compatibility |