| 102 | |
| 103 | |
| 104 | class QueryContext: |
| 105 | __slots__ = ( |
| 106 | "top_level_context", |
| 107 | "compile_state", |
| 108 | "query", |
| 109 | "user_passed_query", |
| 110 | "params", |
| 111 | "load_options", |
| 112 | "bind_arguments", |
| 113 | "execution_options", |
| 114 | "session", |
| 115 | "autoflush", |
| 116 | "populate_existing", |
| 117 | "invoke_all_eagers", |
| 118 | "version_check", |
| 119 | "refresh_state", |
| 120 | "create_eager_joins", |
| 121 | "propagated_loader_options", |
| 122 | "attributes", |
| 123 | "runid", |
| 124 | "partials", |
| 125 | "post_load_paths", |
| 126 | "identity_token", |
| 127 | "yield_per", |
| 128 | "loaders_require_buffering", |
| 129 | "loaders_require_uniquing", |
| 130 | ) |
| 131 | |
| 132 | runid: int |
| 133 | post_load_paths: Dict[PathRegistry, _PostLoad] |
| 134 | compile_state: _ORMCompileState |
| 135 | |
| 136 | @property |
| 137 | def requires_uniquing(self) -> bool: |
| 138 | return bool(self.compile_state.multi_row_eager_loaders) |
| 139 | |
| 140 | class default_load_options(Options): |
| 141 | _only_return_tuples = False |
| 142 | _populate_existing = False |
| 143 | _version_check = False |
| 144 | _invoke_all_eagers = True |
| 145 | _autoflush = True |
| 146 | _identity_token = None |
| 147 | _yield_per = None |
| 148 | _refresh_state = None |
| 149 | _lazy_loaded_from = None |
| 150 | _legacy_uniquing = False |
| 151 | _sa_top_level_orm_context = None |
| 152 | _is_user_refresh = False |
| 153 | |
| 154 | def __init__( |
| 155 | self, |
| 156 | compile_state: CompileState, |
| 157 | statement: Union[ |
| 158 | Select[Unpack[TupleAny]], |
| 159 | FromStatement[Unpack[TupleAny]], |
| 160 | UpdateBase, |
| 161 | ], |
no outgoing calls
no test coverage detected