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

Method _autoload

lib/sqlalchemy/sql/schema.py:882–901  ·  view source on GitHub ↗
(
        self,
        metadata: MetaData,
        autoload_with: Union[Engine, Connection],
        include_columns: Optional[Collection[str]],
        exclude_columns: Collection[str] = (),
        resolve_fks: bool = True,
        _extend_on: Optional[Set[Table]] = None,
        _reflect_info: _ReflectionInfo | None = None,
    )

Source from the content-addressed store, hash-verified

880 )
881
882 def _autoload(
883 self,
884 metadata: MetaData,
885 autoload_with: Union[Engine, Connection],
886 include_columns: Optional[Collection[str]],
887 exclude_columns: Collection[str] = (),
888 resolve_fks: bool = True,
889 _extend_on: Optional[Set[Table]] = None,
890 _reflect_info: _ReflectionInfo | None = None,
891 ) -> None:
892 insp = inspection.inspect(autoload_with)
893 with insp._inspection_context() as conn_insp:
894 conn_insp.reflect_table(
895 self,
896 include_columns,
897 exclude_columns,
898 resolve_fks,
899 _extend_on=_extend_on,
900 _reflect_info=_reflect_info,
901 )
902
903 @property
904 def _sorted_constraints(self) -> List[Constraint]:

Callers 2

__init__Method · 0.95
_init_existingMethod · 0.95

Calls 2

_inspection_contextMethod · 0.80
reflect_tableMethod · 0.80

Tested by

no test coverage detected