Coverage for sqlmodel/sql/_expression_select_gen.py: 100%
21 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 00:02 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 00:02 +0000
1# WARNING: do not modify this code, it is generated by _expression_select_gen.py.jinja2
3from datetime import datetime 1fabcde
4from typing import ( 1fabcde
5 Any,
6 Mapping,
7 Sequence,
8 Tuple,
9 Type,
10 TypeVar,
11 Union,
12 overload,
13)
14from uuid import UUID 1fabcde
16from sqlalchemy import ( 1fabcde
17 Column,
18)
19from sqlalchemy.sql.elements import ( 1fabcde
20 SQLCoreOperations,
21)
22from sqlalchemy.sql.roles import TypedColumnsClauseRole 1fabcde
24from ._expression_select_cls import Select, SelectOfScalar 1fabcde
26_T = TypeVar("_T") 1fabcde
29_TCCA = Union[ 1fabcde
30 TypedColumnsClauseRole[_T],
31 SQLCoreOperations[_T],
32 Type[_T],
33]
35# Generated TypeVars start
38_TScalar_0 = TypeVar( 1fabcde
39 "_TScalar_0",
40 Column, # type: ignore
41 Sequence, # type: ignore
42 Mapping, # type: ignore
43 UUID,
44 datetime,
45 float,
46 int,
47 bool,
48 bytes,
49 str,
50 None,
51)
53_T0 = TypeVar("_T0") 1fabcde
56_TScalar_1 = TypeVar( 1fabcde
57 "_TScalar_1",
58 Column, # type: ignore
59 Sequence, # type: ignore
60 Mapping, # type: ignore
61 UUID,
62 datetime,
63 float,
64 int,
65 bool,
66 bytes,
67 str,
68 None,
69)
71_T1 = TypeVar("_T1") 1fabcde
74_TScalar_2 = TypeVar( 1fabcde
75 "_TScalar_2",
76 Column, # type: ignore
77 Sequence, # type: ignore
78 Mapping, # type: ignore
79 UUID,
80 datetime,
81 float,
82 int,
83 bool,
84 bytes,
85 str,
86 None,
87)
89_T2 = TypeVar("_T2") 1fabcde
92_TScalar_3 = TypeVar( 1fabcde
93 "_TScalar_3",
94 Column, # type: ignore
95 Sequence, # type: ignore
96 Mapping, # type: ignore
97 UUID,
98 datetime,
99 float,
100 int,
101 bool,
102 bytes,
103 str,
104 None,
105)
107_T3 = TypeVar("_T3") 1fabcde
110# Generated TypeVars end
113@overload 1fabcde
114def select(__ent0: _TCCA[_T0]) -> SelectOfScalar[_T0]: ... 1fabcde
117@overload 1fabcde
118def select(__ent0: _TScalar_0) -> SelectOfScalar[_TScalar_0]: # type: ignore 1fabcde
119 ...
122# Generated overloads start
125@overload 1fabcde
126def select( # type: ignore 1abcde
127 __ent0: _TCCA[_T0], 1fabcde
128 __ent1: _TCCA[_T1], 1fabcde
129) -> Select[Tuple[_T0, _T1]]: ... 1fabcde
132@overload 1fabcde
133def select( # type: ignore 1abcde
134 __ent0: _TCCA[_T0], 1fabcde
135 entity_1: _TScalar_1, 1fabcde
136) -> Select[Tuple[_T0, _TScalar_1]]: ... 1fabcde
139@overload 1fabcde
140def select( # type: ignore 1abcde
141 entity_0: _TScalar_0, 1fabcde
142 __ent1: _TCCA[_T1], 1fabcde
143) -> Select[Tuple[_TScalar_0, _T1]]: ... 1fabcde
146@overload 1fabcde
147def select( # type: ignore 1abcde
148 entity_0: _TScalar_0, 1fabcde
149 entity_1: _TScalar_1, 1fabcde
150) -> Select[Tuple[_TScalar_0, _TScalar_1]]: ... 1fabcde
153@overload 1fabcde
154def select( # type: ignore 1abcde
155 __ent0: _TCCA[_T0], 1fabcde
156 __ent1: _TCCA[_T1], 1fabcde
157 __ent2: _TCCA[_T2], 1fabcde
158) -> Select[Tuple[_T0, _T1, _T2]]: ... 1fabcde
161@overload 1fabcde
162def select( # type: ignore 1abcde
163 __ent0: _TCCA[_T0], 1fabcde
164 __ent1: _TCCA[_T1], 1fabcde
165 entity_2: _TScalar_2, 1fabcde
166) -> Select[Tuple[_T0, _T1, _TScalar_2]]: ... 1fabcde
169@overload 1fabcde
170def select( # type: ignore 1abcde
171 __ent0: _TCCA[_T0], 1fabcde
172 entity_1: _TScalar_1, 1fabcde
173 __ent2: _TCCA[_T2], 1fabcde
174) -> Select[Tuple[_T0, _TScalar_1, _T2]]: ... 1fabcde
177@overload 1fabcde
178def select( # type: ignore 1abcde
179 __ent0: _TCCA[_T0], 1fabcde
180 entity_1: _TScalar_1, 1fabcde
181 entity_2: _TScalar_2, 1fabcde
182) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2]]: ... 1fabcde
185@overload 1fabcde
186def select( # type: ignore 1abcde
187 entity_0: _TScalar_0, 1fabcde
188 __ent1: _TCCA[_T1], 1fabcde
189 __ent2: _TCCA[_T2], 1fabcde
190) -> Select[Tuple[_TScalar_0, _T1, _T2]]: ... 1fabcde
193@overload 1fabcde
194def select( # type: ignore 1abcde
195 entity_0: _TScalar_0, 1fabcde
196 __ent1: _TCCA[_T1], 1fabcde
197 entity_2: _TScalar_2, 1fabcde
198) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2]]: ... 1fabcde
201@overload 1fabcde
202def select( # type: ignore 1abcde
203 entity_0: _TScalar_0, 1fabcde
204 entity_1: _TScalar_1, 1fabcde
205 __ent2: _TCCA[_T2], 1fabcde
206) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2]]: ... 1fabcde
209@overload 1fabcde
210def select( # type: ignore 1abcde
211 entity_0: _TScalar_0, 1fabcde
212 entity_1: _TScalar_1, 1fabcde
213 entity_2: _TScalar_2, 1fabcde
214) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2]]: ... 1fabcde
217@overload 1fabcde
218def select( # type: ignore 1abcde
219 __ent0: _TCCA[_T0], 1fabcde
220 __ent1: _TCCA[_T1], 1fabcde
221 __ent2: _TCCA[_T2], 1fabcde
222 __ent3: _TCCA[_T3], 1fabcde
223) -> Select[Tuple[_T0, _T1, _T2, _T3]]: ... 1fabcde
226@overload 1fabcde
227def select( # type: ignore 1abcde
228 __ent0: _TCCA[_T0], 1fabcde
229 __ent1: _TCCA[_T1], 1fabcde
230 __ent2: _TCCA[_T2], 1fabcde
231 entity_3: _TScalar_3, 1fabcde
232) -> Select[Tuple[_T0, _T1, _T2, _TScalar_3]]: ... 1fabcde
235@overload 1fabcde
236def select( # type: ignore 1abcde
237 __ent0: _TCCA[_T0], 1fabcde
238 __ent1: _TCCA[_T1], 1fabcde
239 entity_2: _TScalar_2, 1fabcde
240 __ent3: _TCCA[_T3], 1fabcde
241) -> Select[Tuple[_T0, _T1, _TScalar_2, _T3]]: ... 1fabcde
244@overload 1fabcde
245def select( # type: ignore 1abcde
246 __ent0: _TCCA[_T0], 1fabcde
247 __ent1: _TCCA[_T1], 1fabcde
248 entity_2: _TScalar_2, 1fabcde
249 entity_3: _TScalar_3, 1fabcde
250) -> Select[Tuple[_T0, _T1, _TScalar_2, _TScalar_3]]: ... 1fabcde
253@overload 1fabcde
254def select( # type: ignore 1abcde
255 __ent0: _TCCA[_T0], 1fabcde
256 entity_1: _TScalar_1, 1fabcde
257 __ent2: _TCCA[_T2], 1fabcde
258 __ent3: _TCCA[_T3], 1fabcde
259) -> Select[Tuple[_T0, _TScalar_1, _T2, _T3]]: ... 1fabcde
262@overload 1fabcde
263def select( # type: ignore 1abcde
264 __ent0: _TCCA[_T0], 1fabcde
265 entity_1: _TScalar_1, 1fabcde
266 __ent2: _TCCA[_T2], 1fabcde
267 entity_3: _TScalar_3, 1fabcde
268) -> Select[Tuple[_T0, _TScalar_1, _T2, _TScalar_3]]: ... 1fabcde
271@overload 1fabcde
272def select( # type: ignore 1abcde
273 __ent0: _TCCA[_T0], 1fabcde
274 entity_1: _TScalar_1, 1fabcde
275 entity_2: _TScalar_2, 1fabcde
276 __ent3: _TCCA[_T3], 1fabcde
277) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2, _T3]]: ... 1fabcde
280@overload 1fabcde
281def select( # type: ignore 1abcde
282 __ent0: _TCCA[_T0], 1fabcde
283 entity_1: _TScalar_1, 1fabcde
284 entity_2: _TScalar_2, 1fabcde
285 entity_3: _TScalar_3, 1fabcde
286) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2, _TScalar_3]]: ... 1fabcde
289@overload 1fabcde
290def select( # type: ignore 1abcde
291 entity_0: _TScalar_0, 1fabcde
292 __ent1: _TCCA[_T1], 1fabcde
293 __ent2: _TCCA[_T2], 1fabcde
294 __ent3: _TCCA[_T3], 1fabcde
295) -> Select[Tuple[_TScalar_0, _T1, _T2, _T3]]: ... 1fabcde
298@overload 1fabcde
299def select( # type: ignore 1abcde
300 entity_0: _TScalar_0, 1fabcde
301 __ent1: _TCCA[_T1], 1fabcde
302 __ent2: _TCCA[_T2], 1fabcde
303 entity_3: _TScalar_3, 1fabcde
304) -> Select[Tuple[_TScalar_0, _T1, _T2, _TScalar_3]]: ... 1fabcde
307@overload 1fabcde
308def select( # type: ignore 1abcde
309 entity_0: _TScalar_0, 1fabcde
310 __ent1: _TCCA[_T1], 1fabcde
311 entity_2: _TScalar_2, 1fabcde
312 __ent3: _TCCA[_T3], 1fabcde
313) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2, _T3]]: ... 1fabcde
316@overload 1fabcde
317def select( # type: ignore 1abcde
318 entity_0: _TScalar_0, 1fabcde
319 __ent1: _TCCA[_T1], 1fabcde
320 entity_2: _TScalar_2, 1fabcde
321 entity_3: _TScalar_3, 1fabcde
322) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2, _TScalar_3]]: ... 1fabcde
325@overload 1fabcde
326def select( # type: ignore 1abcde
327 entity_0: _TScalar_0, 1fabcde
328 entity_1: _TScalar_1, 1fabcde
329 __ent2: _TCCA[_T2], 1fabcde
330 __ent3: _TCCA[_T3], 1fabcde
331) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2, _T3]]: ... 1fabcde
334@overload 1fabcde
335def select( # type: ignore 1abcde
336 entity_0: _TScalar_0, 1fabcde
337 entity_1: _TScalar_1, 1fabcde
338 __ent2: _TCCA[_T2], 1fabcde
339 entity_3: _TScalar_3, 1fabcde
340) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2, _TScalar_3]]: ... 1fabcde
343@overload 1fabcde
344def select( # type: ignore 1abcde
345 entity_0: _TScalar_0, 1fabcde
346 entity_1: _TScalar_1, 1fabcde
347 entity_2: _TScalar_2, 1fabcde
348 __ent3: _TCCA[_T3], 1fabcde
349) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2, _T3]]: ... 1fabcde
352@overload 1fabcde
353def select( # type: ignore 1abcde
354 entity_0: _TScalar_0, 1fabcde
355 entity_1: _TScalar_1, 1fabcde
356 entity_2: _TScalar_2, 1fabcde
357 entity_3: _TScalar_3, 1fabcde
358) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2, _TScalar_3]]: ... 1fabcde
361# Generated overloads end
364def select(*entities: Any) -> Union[Select, SelectOfScalar]: # type: ignore 1fabcde
365 if len(entities) == 1: 2g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! # $ % ' ( ) * + , - . / : ; = ? @ [ ] ^ _ ` { | } ~ abbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzbAbBbCbDbEbFbGbHbIbJbKbLbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9b!b#b$b%b'b(b)b*b+b,b-b.b/b:b;b=b?b@b[b]b^b_b`b{b|b}b~bacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczcAcBcCcDcEcFcGcHcIcJcKcLcMcNcOcPcQcRcScTcUcVcWcXcYcZc0c1c2c3c4c5c6c7c8c9c!c#c$c%c'c(c)c*c+c,c-c.c/c:c;c=c?c@c[c]c^c_c`c{c|c}c~cadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzdAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd0d1d2d3d4d5d6d7d8d9d!d#d$d%d'd(d)d*d+d,d-d.d/d:d;d=d?d@d[d]d^d_d`d{d|d}d~daebecedeeefegeheiejekelemeneoepeqereseteuevewexeyezeAeBeCeDeEeFeGeHeIeJeKeLeMeNeOePeQeReSeTeUeVeWeXeYeZe0e1e2e3e4e5e6e7e8e9e!e#e$e%e'e(e)e*e+e,e-e.e/e:e;e=e?e@e[e]e^e_e`e{e|e}e~eafbfcfdfefffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxfyfzfAfBfCfDfEfFfGfHfIfJfKfLfMfNfOfPfQfRfSfTfUfVfWfXfYfZf0f1f2f3f4f5f6f7f8f9f!f#f$f%f'f(f)f*f+f,f-f.f/f:f;f=f?f@f[f]f^f_f`f{f|f}f~fagbgcgdgegfggghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzgAgBgCgDgEgFgGgHgIgJgKgLgMgNgOgPgQgRgSgTgUgVgWgXgYgZg0g1g2g3g4g5g6g7g8g9g!g#g$g%g'g(g)g*g+g,g-g.g/g:g;g=g?g@g[g]g^g_g`g{g|g}g~gahbhchdhehfhghhhihjhkhlhmhnhohphqhrhshthuhvhwhxhyhzhAhBhChDhEhFhGhHhIhJhKhLhMhNhOhPhQhRhShThUhVhWhXhYhZh0h1h2h3h4h5h6h7h8h9h!h#h$h%h'h(h)h*h+h,h-h.h/h:h;h=h?h@h[h]h^h_h`h{h|h}h~haibicidieifigihiiijikiliminioipiqirisitiuivi
366 return SelectOfScalar(*entities) 2g h i j k l m q s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 ! # $ % ' ( ) * + , - . / : ; = ? @ [ ] ^ _ ` ~ bbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzbAbBbCbDbEbFbGbHbIbJbKbLbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9b!b#b$b%b'b(b)b-b/b:b;b=b?b@b[b]b^b_b`b{b|b}b~bacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczcAcBcCcDcEcFcGcHcIcJcKcLcMcNcOcPcQcRcScTcUcVcWcXcYcZc0c1c2c3c4c5c6c7c8c9c!c#c$c%c'c(c)c*c+c,c-c.c/c:c;c=c`c{c~cadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzdAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd0d1d2d3d4d5d6d7d8d9d!d#d$d%d'd(d)d*d+d,d-d.d/d:d;d=d?d@d[d]d^d_d`d{d|d}d~daebecedeeefegeheiejekelemeneoepeqereseteuevewexeyezeAeBeCeDeEeFeGeHeIeJeKeLeMeNeOePeQeReSeTeUeVeWeXeYeZe0e1e2e3e4e5e6e7e8e9e!e*e+e.e/e:e;e=e?e@e[e]e^e_e`e{e|e}e~eafbfcfdfefffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxfyfzfAfBfCfDfEfFfGfHfIfJfKfLfMfNfOfPfQfRfSfTfUfVfWfXfYfZf0f1f2f3f4f5f6f7f8f9f!f#f$f%f'f(f)f*f+f,f-f.f/f:f;f=f?f@f[f]f^f_f`f{f|f}f~fagbgcgdgegfggghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzgAgBgCgDgEgFgGgHgIgJgKgLgMgNgOgPgQgRgSgTgUgVg2g3g6g7g8g9g!g#g$g%g'g(g)g*g+g,g-g.g/g:g;g=g?g@g[g]g^g_g`g{g|g}g~gahbhchdhehfhghhhihjhkhlhmhnhohphqhrhshthuhvhwhxhyhzhAhBhChDhEhFhGhHhIhJhKhLhMhNhOhPhQhRhShThUhVhWhXhYhZh0h1h2h3h4h5h6h7h8h9h!h#h$h%h'h(h)h*h+h,h-h.h/h:h;h=h?h@h[h]h^h_h`h{h|h}h~haibicidieifigihiiijikiliminioipiqirisitiuivi
367 return Select(*entities) 2n o p r { | } ab*b+b,b.b?c@c[c]c^c_c|c}c#e$e%e'e(e)e,e-eWgXgYgZg0g1g4g5g