MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / setdefault

Method setdefault

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

Source from the content-addressed store, hash-verified

163 attributes[(key, self.natural_path)] = value
164
165 def setdefault(
166 self, attributes: Dict[Any, Any], key: Any, value: Any
167 ) -> None:
168 log.debug("setdefault '%s' on path '%s' to '%s'", key, self, value)
169 attributes.setdefault((key, self.natural_path), value)
170
171 def get(
172 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