MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / Session

Class Session

sqlmodel/orm/session.py:25–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25class Session(_Session):
26 @overload
27 def exec(
28 self,
29 statement: Select[_TSelectParam],
30 *,
31 params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None,
32 execution_options: Mapping[str, Any] = util.EMPTY_DICT,
33 bind_arguments: dict[str, Any] | None = None,
34 _parent_execute_state: Any | None = None,
35 _add_event: Any | None = None,
36 ) -> TupleResult[_TSelectParam]: ...
37
38 @overload
39 def exec(
40 self,
41 statement: SelectOfScalar[_TSelectParam],
42 *,
43 params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None,
44 execution_options: Mapping[str, Any] = util.EMPTY_DICT,
45 bind_arguments: dict[str, Any] | None = None,
46 _parent_execute_state: Any | None = None,
47 _add_event: Any | None = None,
48 ) -> ScalarResult[_TSelectParam]: ...
49
50 @overload
51 def exec(
52 self,
53 statement: UpdateBase,
54 *,
55 params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None,
56 execution_options: Mapping[str, Any] = util.EMPTY_DICT,
57 bind_arguments: dict[str, Any] | None = None,
58 _parent_execute_state: Any | None = None,
59 _add_event: Any | None = None,
60 ) -> CursorResult[Any]: ...
61
62 def exec(
63 self,
64 statement: Select[_TSelectParam]
65 | SelectOfScalar[_TSelectParam]
66 | Executable[_TSelectParam]
67 | UpdateBase,
68 *,
69 params: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None,
70 execution_options: Mapping[str, Any] = util.EMPTY_DICT,
71 bind_arguments: dict[str, Any] | None = None,
72 _parent_execute_state: Any | None = None,
73 _add_event: Any | None = None,
74 ) -> TupleResult[_TSelectParam] | ScalarResult[_TSelectParam] | CursorResult[Any]:
75 results = super().execute(
76 statement,
77 params=params,
78 execution_options=execution_options,
79 bind_arguments=bind_arguments,
80 _parent_execute_state=_parent_execute_state,
81 _add_event=_add_event,
82 )

Callers 15

create_heroesFunction · 0.90
select_heroesFunction · 0.90
create_heroesFunction · 0.90
select_heroesFunction · 0.90
create_heroesFunction · 0.90
select_heroesFunction · 0.90
create_heroesFunction · 0.90
select_heroesFunction · 0.90
create_heroesFunction · 0.90
select_heroesFunction · 0.90
create_heroesFunction · 0.90
select_heroesFunction · 0.90

Calls

no outgoing calls

Tested by 15

session_fixtureFunction · 0.72
session_fixtureFunction · 0.72
session_fixtureFunction · 0.72
test_create_heroFunction · 0.72
test_create_heroFunction · 0.72
test_create_heroFunction · 0.72
test_create_heroFunction · 0.72
test_queryFunction · 0.72
test_fieldsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…