MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / setdefault

Method setdefault

lib/sqlalchemy/orm/path_registry.py:199–203  ·  view source on GitHub ↗
(
        self, attributes: Dict[Any, Any], key: Any, value: Any
    )

Source from the content-addressed store, hash-verified

197 attributes[(key, self.natural_path)] = value
198
199 def setdefault(
200 self, attributes: Dict[Any, Any], key: Any, value: Any
201 ) -> None:
202 log.debug("setdefault '%s' on path '%s' to '%s'", key, self, value)
203 attributes.setdefault((key, self.natural_path), value)
204
205 def get(
206 self, attributes: Dict[Any, Any], key: Any, value: Optional[Any] = None

Callers 12

_generate_backrefMethod · 0.45
_sorted_tablesMethod · 0.45
get_global_criteriaMethod · 0.45
_execute_internalMethod · 0.45
__call__Method · 0.45
_all_sqla_attributesMethod · 0.45
install_memberMethod · 0.45
create_sessionFunction · 0.45
_setup_canned_rolesFunction · 0.45
_collect_insert_commandsFunction · 0.45
_create_eager_joinMethod · 0.45

Calls 1

debugMethod · 0.80

Tested by

no test coverage detected