File: functions.pyi

package info (click to toggle)
typeshed 0.0~git20221107.4f381af-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 18,036 kB
  • sloc: python: 3,216; sh: 62; makefile: 13
file content (223 lines) | stat: -rw-r--r-- 5,551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
from typing import Any

from ..util import HasMemoized
from .base import Executable, Generative
from .elements import BinaryExpression, ColumnElement, NamedColumn
from .selectable import FromClause, TableValuedAlias
from .visitors import TraversibleType

def register_function(identifier, fn, package: str = ...) -> None: ...

class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative):  # type: ignore[misc]
    packagenames: Any
    clause_expr: Any
    def __init__(self, *clauses, **kwargs) -> None: ...
    def scalar_table_valued(self, name, type_: Any | None = ...): ...
    def table_valued(self, *expr, **kw): ...
    def column_valued(self, name: Any | None = ...): ...
    @property
    def columns(self): ...
    @property
    def exported_columns(self): ...
    @HasMemoized.memoized_attribute
    def clauses(self): ...
    def over(
        self, partition_by: Any | None = ..., order_by: Any | None = ..., rows: Any | None = ..., range_: Any | None = ...
    ): ...
    def within_group(self, *order_by): ...
    def filter(self, *criterion): ...
    def as_comparison(self, left_index, right_index): ...
    def within_group_type(self, within_group) -> None: ...
    def alias(self, name: str | None = ..., joins_implicitly: bool = ...) -> TableValuedAlias: ...  # type: ignore[override]
    def select(self): ...
    def scalar(self): ...
    def execute(self): ...
    def self_group(self, against: Any | None = ...): ...
    @property
    def entity_namespace(self): ...

class FunctionAsBinary(BinaryExpression):
    sql_function: Any
    left_index: Any
    right_index: Any
    operator: Any
    type: Any
    negate: Any
    modifiers: Any
    def __init__(self, fn, left_index, right_index) -> None: ...
    @property
    def left(self): ...
    @left.setter
    def left(self, value) -> None: ...
    @property
    def right(self): ...
    @right.setter
    def right(self, value) -> None: ...

class ScalarFunctionColumn(NamedColumn):
    __visit_name__: str
    is_literal: bool
    table: Any
    fn: Any
    name: Any
    type: Any
    def __init__(self, fn, name, type_: Any | None = ...) -> None: ...

class _FunctionGenerator:
    opts: Any
    def __init__(self, **opts) -> None: ...
    def __getattr__(self, name): ...
    def __call__(self, *c, **kwargs): ...

func: Any
modifier: Any

class Function(FunctionElement):
    __visit_name__: str
    type: Any
    packagenames: Any
    name: Any
    def __init__(self, name, *clauses, **kw) -> None: ...

class _GenericMeta(TraversibleType):
    def __init__(cls, clsname, bases, clsdict) -> None: ...

class GenericFunction:
    name: Any
    identifier: Any
    coerce_arguments: bool
    inherit_cache: bool
    packagenames: Any
    clause_expr: Any
    type: Any
    def __init__(self, *args, **kwargs) -> None: ...

class next_value(GenericFunction):
    type: Any
    name: str
    sequence: Any
    def __init__(self, seq, **kw) -> None: ...
    def compare(self, other, **kw): ...

class AnsiFunction(GenericFunction):
    inherit_cache: bool
    def __init__(self, *args, **kwargs) -> None: ...

class ReturnTypeFromArgs(GenericFunction):
    inherit_cache: bool
    def __init__(self, *args, **kwargs) -> None: ...

class coalesce(ReturnTypeFromArgs):
    inherit_cache: bool

class max(ReturnTypeFromArgs):
    inherit_cache: bool

class min(ReturnTypeFromArgs):
    inherit_cache: bool

class sum(ReturnTypeFromArgs):
    inherit_cache: bool

class now(GenericFunction):
    type: Any
    inherit_cache: bool

class concat(GenericFunction):
    type: Any
    inherit_cache: bool

class char_length(GenericFunction):
    type: Any
    inherit_cache: bool
    def __init__(self, arg, **kwargs) -> None: ...

class random(GenericFunction):
    inherit_cache: bool

class count(GenericFunction):
    type: Any
    inherit_cache: bool
    def __init__(self, expression: Any | None = ..., **kwargs) -> None: ...

class current_date(AnsiFunction):
    type: Any
    inherit_cache: bool

class current_time(AnsiFunction):
    type: Any
    inherit_cache: bool

class current_timestamp(AnsiFunction):
    type: Any
    inherit_cache: bool

class current_user(AnsiFunction):
    type: Any
    inherit_cache: bool

class localtime(AnsiFunction):
    type: Any
    inherit_cache: bool

class localtimestamp(AnsiFunction):
    type: Any
    inherit_cache: bool

class session_user(AnsiFunction):
    type: Any
    inherit_cache: bool

class sysdate(AnsiFunction):
    type: Any
    inherit_cache: bool

class user(AnsiFunction):
    type: Any
    inherit_cache: bool

class array_agg(GenericFunction):
    type: Any
    inherit_cache: bool
    def __init__(self, *args, **kwargs) -> None: ...

class OrderedSetAgg(GenericFunction):
    array_for_multi_clause: bool
    inherit_cache: bool
    def within_group_type(self, within_group): ...

class mode(OrderedSetAgg):
    inherit_cache: bool

class percentile_cont(OrderedSetAgg):
    array_for_multi_clause: bool
    inherit_cache: bool

class percentile_disc(OrderedSetAgg):
    array_for_multi_clause: bool
    inherit_cache: bool

class rank(GenericFunction):
    type: Any
    inherit_cache: bool

class dense_rank(GenericFunction):
    type: Any
    inherit_cache: bool

class percent_rank(GenericFunction):
    type: Any
    inherit_cache: bool

class cume_dist(GenericFunction):
    type: Any
    inherit_cache: bool

class cube(GenericFunction):
    inherit_cache: bool

class rollup(GenericFunction):
    inherit_cache: bool

class grouping_sets(GenericFunction):
    inherit_cache: bool