sorted(self.tables.values(), key=lambda t: t.key) # type: ignore
)
+ @overload
+ def reflect(
+ self,
+ bind: Engine,
+ schema: Optional[str] = ...,
+ views: bool = ...,
+ only: Union[
+ _typing_Sequence[str], Callable[[str, MetaData], bool], None
+ ] = ...,
+ extend_existing: bool = ...,
+ autoload_replace: bool = ...,
+ resolve_fks: bool = ...,
+ **dialect_kwargs: Any,
+ ) -> None: ...
+
+ @overload
+ def reflect(
+ self,
+ bind: Connection,
+ schema: Optional[str] = ...,
+ views: bool = ...,
+ only: Union[
+ _typing_Sequence[str], Callable[[str, MetaData], bool], None
+ ] = ...,
+ extend_existing: bool = ...,
+ autoload_replace: bool = ...,
+ resolve_fks: bool = ...,
+ **dialect_kwargs: Any,
+ ) -> None: ...
+
@util.preload_module("sqlalchemy.engine.reflection")
def reflect(
self,
from typing import Any
from sqlalchemy import Connection
+from sqlalchemy import MetaData
from sqlalchemy import select
from sqlalchemy import text
from sqlalchemy.ext.asyncio import create_async_engine
ce.statement
cc = select(1).compile(conn)
cc.statement
+
+ async with e.connect() as conn:
+ metadata = MetaData()
+
+ await conn.run_sync(metadata.reflect)