Autogenerate reflection sweeps now use the "bulk" inspector methods
introduced in SQLAlchemy 2.0, which for selected dialects including
PostgreSQL and Oracle use batched queries to reflect whole collections of
tables using O(1) queries rather than O(N).
This is the original proposed version that uses the Inspector
entirely with its public API, with the exception of reflect_table()
which makes a _ReflectionInfo on a per-table basis. Other than
that, no private API assumptions are made.
If SQLAlchemy needed to add new fields to _ReflectionInfo, it just
needs to make sure they have default functions (which all the current fields
should have anyway, since there is even a ReflectionDefaults
constant that already provides these!)
This version is the one that does not imply any particular
changes in SQLAlchemy and does not have any sqla_compat logic,
so that we may have alembic using the new performance enhancements
allowing for SQLAlchemy to potentially improve its API for a later
release.
Other than that, typing of reflection functions is improved.