File: dml.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 (111 lines) | stat: -rw-r--r-- 3,275 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
from typing import Any

from . import roles
from .base import CompileState, DialectKWArgs, Executable, HasCompileState
from .elements import ClauseElement
from .selectable import HasCTE, HasPrefixes, ReturnsRows

class DMLState(CompileState):
    isupdate: bool
    isdelete: bool
    isinsert: bool
    def __init__(self, statement, compiler, **kw) -> None: ...
    @property
    def dml_table(self): ...

class InsertDMLState(DMLState):
    isinsert: bool
    include_table_with_column_exprs: bool
    statement: Any
    def __init__(self, statement, compiler, **kw) -> None: ...

class UpdateDMLState(DMLState):
    isupdate: bool
    include_table_with_column_exprs: bool
    statement: Any
    is_multitable: Any
    def __init__(self, statement, compiler, **kw) -> None: ...

class DeleteDMLState(DMLState):
    isdelete: bool
    statement: Any
    def __init__(self, statement, compiler, **kw) -> None: ...

class UpdateBase(roles.DMLRole, HasCTE, HasCompileState, DialectKWArgs, HasPrefixes, ReturnsRows, Executable, ClauseElement):
    __visit_name__: str
    named_with_column: bool
    is_dml: bool
    def params(self, *arg, **kw) -> None: ...
    def with_dialect_options(self, **opt) -> None: ...
    bind: Any
    def returning(self, *cols) -> None: ...
    @property
    def exported_columns(self): ...
    def with_hint(self, text, selectable: Any | None = ..., dialect_name: str = ...) -> None: ...

class ValuesBase(UpdateBase):
    __visit_name__: str
    select: Any
    table: Any
    def __init__(self, table, values, prefixes) -> None: ...
    def values(self, *args, **kwargs) -> None: ...
    def return_defaults(self, *cols) -> None: ...

class Insert(ValuesBase):
    __visit_name__: str
    select: Any
    include_insert_from_select_defaults: bool
    is_insert: bool
    def __init__(
        self,
        table,
        values: Any | None = ...,
        inline: bool = ...,
        bind: Any | None = ...,
        prefixes: Any | None = ...,
        returning: Any | None = ...,
        return_defaults: bool = ...,
        **dialect_kw,
    ) -> None: ...
    def inline(self) -> None: ...
    def from_select(self, names, select, include_defaults: bool = ...) -> None: ...

class DMLWhereBase:
    def where(self, *whereclause) -> None: ...
    def filter(self, *criteria): ...
    def filter_by(self, **kwargs): ...
    @property
    def whereclause(self): ...

class Update(DMLWhereBase, ValuesBase):
    __visit_name__: str
    is_update: bool
    def __init__(
        self,
        table,
        whereclause: Any | None = ...,
        values: Any | None = ...,
        inline: bool = ...,
        bind: Any | None = ...,
        prefixes: Any | None = ...,
        returning: Any | None = ...,
        return_defaults: bool = ...,
        preserve_parameter_order: bool = ...,
        **dialect_kw,
    ) -> None: ...
    def ordered_values(self, *args) -> None: ...
    def inline(self) -> None: ...

class Delete(DMLWhereBase, UpdateBase):
    __visit_name__: str
    is_delete: bool
    table: Any
    def __init__(
        self,
        table,
        whereclause: Any | None = ...,
        bind: Any | None = ...,
        returning: Any | None = ...,
        prefixes: Any | None = ...,
        **dialect_kw,
    ) -> None: ...