MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / drop_all

Method drop_all

lib/sqlalchemy/sql/schema.py:6324–6350  ·  view source on GitHub ↗

Drop all tables stored in this metadata. Conditional by default, will not attempt to drop tables not present in the target database. :param bind: A :class:`.Connection` or :class:`.Engine` used to access the database. :param tables: Op

(
        self,
        bind: _CreateDropBind,
        tables: Optional[_typing_Sequence[Table]] = None,
        checkfirst: Union[bool, CheckFirst] = CheckFirst.ALL,
    )

Source from the content-addressed store, hash-verified

6322 )
6323
6324 def drop_all(
6325 self,
6326 bind: _CreateDropBind,
6327 tables: Optional[_typing_Sequence[Table]] = None,
6328 checkfirst: Union[bool, CheckFirst] = CheckFirst.ALL,
6329 ) -> None:
6330 """Drop all tables stored in this metadata.
6331
6332 Conditional by default, will not attempt to drop tables not present in
6333 the target database.
6334
6335 :param bind:
6336 A :class:`.Connection` or :class:`.Engine` used to access the
6337 database.
6338
6339 :param tables:
6340 Optional list of ``Table`` objects, which is a subset of the
6341 total tables in the ``MetaData`` (others are ignored).
6342
6343 :param checkfirst: A boolean value or instance of :class:`.CheckFirst`.
6344 Indicates which objects should be checked for within a separate pass
6345 before dropping schema objects.
6346
6347 """
6348 bind._run_ddl_visitor(
6349 ddl.SchemaDropper, self, checkfirst=checkfirst, tables=tables
6350 )
6351
6352 @property
6353 def schemas(self) -> _typing_Sequence[str]:

Callers 15

test_cycle_named_fksMethod · 0.95
test_use_alterMethod · 0.95
metadata_fixtureMethod · 0.95
test_ddl_hastableMethod · 0.95
test_execute_eventsMethod · 0.95
test_basicMethod · 0.95
_make_tablesMethod · 0.95
test_sessionMethod · 0.95

Calls 1

_run_ddl_visitorMethod · 0.45

Tested by 15

test_cycle_named_fksMethod · 0.76
test_use_alterMethod · 0.76
metadata_fixtureMethod · 0.76
test_ddl_hastableMethod · 0.76
test_execute_eventsMethod · 0.76
test_basicMethod · 0.76
_make_tablesMethod · 0.76
test_sessionMethod · 0.76