MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _key_not_found

Method _key_not_found

lib/sqlalchemy/engine/result.py:190–202  ·  view source on GitHub ↗
(self, key: Any, attr_error: bool)

Source from the content-addressed store, hash-verified

188 }
189
190 def _key_not_found(self, key: Any, attr_error: bool) -> NoReturn:
191 if key in self._keymap:
192 # the index must be none in this case
193 self._raise_for_ambiguous_column_name(self._keymap[key])
194 else:
195 # unknown key
196 if attr_error:
197 try:
198 self._key_fallback(key, None)
199 except KeyError as ke:
200 raise AttributeError(ke.args[0]) from ke
201 else:
202 self._key_fallback(key, None)
203
204 @property
205 def _effective_processors(self) -> Optional[_ProcessorsType]:

Callers 1

_get_by_key_implMethod · 0.80

Calls 2

_key_fallbackMethod · 0.95

Tested by

no test coverage detected