summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/__init__.py')
-rw-r--r--lib/sqlalchemy/sql/__init__.py209
1 files changed, 98 insertions, 111 deletions
diff --git a/lib/sqlalchemy/sql/__init__.py b/lib/sqlalchemy/sql/__init__.py
index 9d66c8f61..b558f9bf5 100644
--- a/lib/sqlalchemy/sql/__init__.py
+++ b/lib/sqlalchemy/sql/__init__.py
@@ -5,121 +5,109 @@
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
-from .base import Executable
-from .compiler import COLLECT_CARTESIAN_PRODUCTS
-from .compiler import FROM_LINTING
-from .compiler import NO_LINTING
-from .compiler import WARN_LINTING
-from .expression import Alias
-from .expression import alias
-from .expression import all_
-from .expression import and_
-from .expression import any_
-from .expression import asc
-from .expression import between
-from .expression import bindparam
-from .expression import case
-from .expression import cast
-from .expression import ClauseElement
-from .expression import collate
-from .expression import column
-from .expression import ColumnCollection
-from .expression import ColumnElement
-from .expression import CompoundSelect
-from .expression import cte
-from .expression import Delete
-from .expression import delete
-from .expression import desc
-from .expression import distinct
-from .expression import except_
-from .expression import except_all
-from .expression import exists
-from .expression import extract
-from .expression import false
-from .expression import False_
-from .expression import FromClause
-from .expression import func
-from .expression import funcfilter
-from .expression import Insert
-from .expression import insert
-from .expression import intersect
-from .expression import intersect_all
-from .expression import Join
-from .expression import join
-from .expression import label
-from .expression import LABEL_STYLE_DEFAULT
-from .expression import LABEL_STYLE_DISAMBIGUATE_ONLY
-from .expression import LABEL_STYLE_NONE
-from .expression import LABEL_STYLE_TABLENAME_PLUS_COL
-from .expression import lambda_stmt
-from .expression import LambdaElement
-from .expression import lateral
-from .expression import literal
-from .expression import literal_column
-from .expression import modifier
-from .expression import not_
-from .expression import null
-from .expression import nulls_first
-from .expression import nulls_last
-from .expression import nullsfirst
-from .expression import nullslast
-from .expression import or_
-from .expression import outerjoin
-from .expression import outparam
-from .expression import over
-from .expression import quoted_name
-from .expression import Select
-from .expression import select
-from .expression import Selectable
-from .expression import StatementLambdaElement
-from .expression import Subquery
-from .expression import table
-from .expression import TableClause
-from .expression import TableSample
-from .expression import tablesample
-from .expression import text
-from .expression import true
-from .expression import True_
-from .expression import tuple_
-from .expression import type_coerce
-from .expression import union
-from .expression import union_all
-from .expression import Update
-from .expression import update
-from .expression import Values
-from .expression import values
-from .expression import within_group
-from .visitors import ClauseVisitor
+from .base import Executable as Executable
+from .compiler import COLLECT_CARTESIAN_PRODUCTS as COLLECT_CARTESIAN_PRODUCTS
+from .compiler import FROM_LINTING as FROM_LINTING
+from .compiler import NO_LINTING as NO_LINTING
+from .compiler import WARN_LINTING as WARN_LINTING
+from .expression import Alias as Alias
+from .expression import alias as alias
+from .expression import all_ as all_
+from .expression import and_ as and_
+from .expression import any_ as any_
+from .expression import asc as asc
+from .expression import between as between
+from .expression import bindparam as bindparam
+from .expression import case as case
+from .expression import cast as cast
+from .expression import ClauseElement as ClauseElement
+from .expression import collate as collate
+from .expression import column as column
+from .expression import ColumnCollection as ColumnCollection
+from .expression import ColumnElement as ColumnElement
+from .expression import CompoundSelect as CompoundSelect
+from .expression import cte as cte
+from .expression import Delete as Delete
+from .expression import delete as delete
+from .expression import desc as desc
+from .expression import distinct as distinct
+from .expression import except_ as except_
+from .expression import except_all as except_all
+from .expression import exists as exists
+from .expression import extract as extract
+from .expression import false as false
+from .expression import False_ as False_
+from .expression import FromClause as FromClause
+from .expression import func as func
+from .expression import funcfilter as funcfilter
+from .expression import Insert as Insert
+from .expression import insert as insert
+from .expression import intersect as intersect
+from .expression import intersect_all as intersect_all
+from .expression import Join as Join
+from .expression import join as join
+from .expression import label as label
+from .expression import LABEL_STYLE_DEFAULT as LABEL_STYLE_DEFAULT
+from .expression import lambda_stmt as lambda_stmt
+from .expression import LambdaElement as LambdaElement
+from .expression import lateral as lateral
+from .expression import literal as literal
+from .expression import literal_column as literal_column
+from .expression import modifier as modifier
+from .expression import not_ as not_
+from .expression import null as null
+from .expression import nulls_first as nulls_first
+from .expression import nulls_last as nulls_last
+from .expression import nullsfirst as nullsfirst
+from .expression import nullslast as nullslast
+from .expression import or_ as or_
+from .expression import outerjoin as outerjoin
+from .expression import outparam as outparam
+from .expression import over as over
+from .expression import quoted_name as quoted_name
+from .expression import Select as Select
+from .expression import select as select
+from .expression import Selectable as Selectable
+from .expression import StatementLambdaElement as StatementLambdaElement
+from .expression import Subquery as Subquery
+from .expression import table as table
+from .expression import TableClause as TableClause
+from .expression import TableSample as TableSample
+from .expression import tablesample as tablesample
+from .expression import text as text
+from .expression import true as true
+from .expression import True_ as True_
+from .expression import tuple_ as tuple_
+from .expression import type_coerce as type_coerce
+from .expression import union as union
+from .expression import union_all as union_all
+from .expression import Update as Update
+from .expression import update as update
+from .expression import Values as Values
+from .expression import values as values
+from .expression import within_group as within_group
+from .visitors import ClauseVisitor as ClauseVisitor
-
-def __go(lcls):
- global __all__
- from .. import util as _sa_util
-
- import inspect as _inspect
-
- __all__ = sorted(
- name
- for name, obj in lcls.items()
- if not (name.startswith("_") or _inspect.ismodule(obj))
+if True:
+ # work around zimports bug
+ from .expression import (
+ LABEL_STYLE_DISAMBIGUATE_ONLY as LABEL_STYLE_DISAMBIGUATE_ONLY,
+ )
+ from .expression import LABEL_STYLE_NONE as LABEL_STYLE_NONE
+ from .expression import (
+ LABEL_STYLE_TABLENAME_PLUS_COL as LABEL_STYLE_TABLENAME_PLUS_COL,
)
- from .annotation import _prepare_annotations
- from .annotation import Annotated
- from .elements import AnnotatedColumnElement
- from .elements import ClauseList
- from .selectable import AnnotatedFromClause
- # from .traversals import _preconfigure_traversals
+def __go(lcls):
+ from .. import util as _sa_util
from . import base
from . import coercions
from . import elements
- from . import events
from . import lambdas
from . import selectable
from . import schema
- from . import sqltypes
from . import traversals
from . import type_api
@@ -130,20 +118,19 @@ def __go(lcls):
coercions.lambdas = lambdas
coercions.schema = schema
coercions.selectable = selectable
- coercions.sqltypes = sqltypes
coercions.traversals = traversals
+ from .annotation import _prepare_annotations
+ from .annotation import Annotated
+ from .elements import AnnotatedColumnElement
+ from .elements import ClauseList
+ from .selectable import AnnotatedFromClause
+
_prepare_annotations(ColumnElement, AnnotatedColumnElement)
_prepare_annotations(FromClause, AnnotatedFromClause)
_prepare_annotations(ClauseList, Annotated)
- # this is expensive at import time; elements that are used can create
- # their traversals on demand
- # _preconfigure_traversals(ClauseElement)
-
_sa_util.preloaded.import_prefix("sqlalchemy.sql")
- from . import naming
-
__go(locals())