Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/expression.py: 99%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

154 statements  

1# sql/expression.py 

2# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors 

3# <see AUTHORS file> 

4# 

5# This module is part of SQLAlchemy and is released under 

6# the MIT License: https://www.opensource.org/licenses/mit-license.php 

7 

8"""Defines the public namespace for SQL expression constructs.""" 

9 

10 

11from __future__ import annotations 

12 

13from ._dml_constructors import delete as delete 

14from ._dml_constructors import insert as insert 

15from ._dml_constructors import update as update 

16from ._elements_constructors import aggregate_order_by as aggregate_order_by 

17from ._elements_constructors import all_ as all_ 

18from ._elements_constructors import and_ as and_ 

19from ._elements_constructors import any_ as any_ 

20from ._elements_constructors import asc as asc 

21from ._elements_constructors import between as between 

22from ._elements_constructors import bindparam as bindparam 

23from ._elements_constructors import bitwise_not as bitwise_not 

24from ._elements_constructors import case as case 

25from ._elements_constructors import cast as cast 

26from ._elements_constructors import collate as collate 

27from ._elements_constructors import column as column 

28from ._elements_constructors import desc as desc 

29from ._elements_constructors import distinct as distinct 

30from ._elements_constructors import extract as extract 

31from ._elements_constructors import false as false 

32from ._elements_constructors import from_dml_column as from_dml_column 

33from ._elements_constructors import funcfilter as funcfilter 

34from ._elements_constructors import label as label 

35from ._elements_constructors import not_ as not_ 

36from ._elements_constructors import null as null 

37from ._elements_constructors import nulls_first as nulls_first 

38from ._elements_constructors import nulls_last as nulls_last 

39from ._elements_constructors import or_ as or_ 

40from ._elements_constructors import outparam as outparam 

41from ._elements_constructors import over as over 

42from ._elements_constructors import text as text 

43from ._elements_constructors import true as true 

44from ._elements_constructors import try_cast as try_cast 

45from ._elements_constructors import tstring as tstring 

46from ._elements_constructors import tuple_ as tuple_ 

47from ._elements_constructors import type_coerce as type_coerce 

48from ._elements_constructors import within_group as within_group 

49from ._selectable_constructors import alias as alias 

50from ._selectable_constructors import cte as cte 

51from ._selectable_constructors import except_ as except_ 

52from ._selectable_constructors import except_all as except_all 

53from ._selectable_constructors import exists as exists 

54from ._selectable_constructors import intersect as intersect 

55from ._selectable_constructors import intersect_all as intersect_all 

56from ._selectable_constructors import join as join 

57from ._selectable_constructors import lateral as lateral 

58from ._selectable_constructors import outerjoin as outerjoin 

59from ._selectable_constructors import select as select 

60from ._selectable_constructors import table as table 

61from ._selectable_constructors import tablesample as tablesample 

62from ._selectable_constructors import union as union 

63from ._selectable_constructors import union_all as union_all 

64from ._selectable_constructors import values as values 

65from ._typing import ColumnExpressionArgument as ColumnExpressionArgument 

66from .base import _from_objects as _from_objects 

67from .base import _select_iterables as _select_iterables 

68from .base import ColumnCollection as ColumnCollection 

69from .base import Executable as Executable 

70from .base import ExecutableStatement as ExecutableStatement 

71from .cache_key import CacheKey as CacheKey 

72from .dml import Delete as Delete 

73from .dml import Insert as Insert 

74from .dml import Update as Update 

75from .dml import UpdateBase as UpdateBase 

76from .dml import ValuesBase as ValuesBase 

77from .elements import _truncated_label as _truncated_label 

78from .elements import AggregateOrderBy as AggregateOrderBy 

79from .elements import BinaryExpression as BinaryExpression 

80from .elements import BindParameter as BindParameter 

81from .elements import BooleanClauseList as BooleanClauseList 

82from .elements import Case as Case 

83from .elements import Cast as Cast 

84from .elements import ClauseElement as ClauseElement 

85from .elements import ClauseList as ClauseList 

86from .elements import CollectionAggregate as CollectionAggregate 

87from .elements import ColumnClause as ColumnClause 

88from .elements import ColumnElement as ColumnElement 

89from .elements import DMLTargetCopy as DMLTargetCopy 

90from .elements import ExpressionClauseList as ExpressionClauseList 

91from .elements import Extract as Extract 

92from .elements import False_ as False_ 

93from .elements import FrameClause as FrameClause 

94from .elements import FrameClauseType as FrameClauseType 

95from .elements import FunctionFilter as FunctionFilter 

96from .elements import Grouping as Grouping 

97from .elements import Label as Label 

98from .elements import literal as literal 

99from .elements import literal_column as literal_column 

100from .elements import Null as Null 

101from .elements import OrderByList as OrderByList 

102from .elements import Over as Over 

103from .elements import quoted_name as quoted_name 

104from .elements import ReleaseSavepointClause as ReleaseSavepointClause 

105from .elements import RollbackToSavepointClause as RollbackToSavepointClause 

106from .elements import SavepointClause as SavepointClause 

107from .elements import SQLColumnExpression as SQLColumnExpression 

108from .elements import TextClause as TextClause 

109from .elements import True_ as True_ 

110from .elements import TryCast as TryCast 

111from .elements import TString as TString 

112from .elements import Tuple as Tuple 

113from .elements import TypeClause as TypeClause 

114from .elements import TypeCoerce as TypeCoerce 

115from .elements import UnaryExpression as UnaryExpression 

116from .elements import WithinGroup as WithinGroup 

117from .functions import func as func 

118from .functions import Function as Function 

119from .functions import FunctionElement as FunctionElement 

120from .functions import modifier as modifier 

121from .lambdas import lambda_stmt as lambda_stmt 

122from .lambdas import LambdaElement as LambdaElement 

123from .lambdas import StatementLambdaElement as StatementLambdaElement 

124from .operators import ColumnOperators as ColumnOperators 

125from .operators import custom_op as custom_op 

126from .operators import OperatorClass as OperatorClass 

127from .operators import Operators as Operators 

128from .selectable import Alias as Alias 

129from .selectable import AliasedReturnsRows as AliasedReturnsRows 

130from .selectable import CompoundSelect as CompoundSelect 

131from .selectable import CTE as CTE 

132from .selectable import Exists as Exists 

133from .selectable import FromClause as FromClause 

134from .selectable import FromGrouping as FromGrouping 

135from .selectable import GenerativeSelect as GenerativeSelect 

136from .selectable import HasCTE as HasCTE 

137from .selectable import HasPrefixes as HasPrefixes 

138from .selectable import HasSuffixes as HasSuffixes 

139from .selectable import Join as Join 

140from .selectable import LABEL_STYLE_DEFAULT as LABEL_STYLE_DEFAULT 

141from .selectable import ( 

142 LABEL_STYLE_DISAMBIGUATE_ONLY as LABEL_STYLE_DISAMBIGUATE_ONLY, 

143) 

144from .selectable import LABEL_STYLE_NONE as LABEL_STYLE_NONE 

145from .selectable import ( 

146 LABEL_STYLE_TABLENAME_PLUS_COL as LABEL_STYLE_TABLENAME_PLUS_COL, 

147) 

148from .selectable import Lateral as Lateral 

149from .selectable import ReturnsRows as ReturnsRows 

150from .selectable import ScalarSelect as ScalarSelect 

151from .selectable import ScalarValues as ScalarValues 

152from .selectable import Select as Select 

153from .selectable import Selectable as Selectable 

154from .selectable import SelectBase as SelectBase 

155from .selectable import SelectLabelStyle as SelectLabelStyle 

156from .selectable import Subquery as Subquery 

157from .selectable import TableClause as TableClause 

158from .selectable import TableSample as TableSample 

159from .selectable import TableValuedAlias as TableValuedAlias 

160from .selectable import TextAsFrom as TextAsFrom 

161from .selectable import TextualSelect as TextualSelect 

162from .selectable import Values as Values 

163from .visitors import Visitable as Visitable 

164 

165nullsfirst = nulls_first 

166"""Synonym for the :func:`.nulls_first` function.""" 

167 

168 

169nullslast = nulls_last 

170"""Synonym for the :func:`.nulls_last` function."""