Skip to content

Commit

Permalink
Remove reference to DatabaseMiddleware in the documentation (#1845)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex authored and aminalaee committed Feb 13, 2023
1 parent 299b5e4 commit e5fb7e9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions docs/config.md
Expand Up @@ -224,9 +224,6 @@ def client():
"""
# Our fixture is created within a context manager. This ensures that
# application startup and shutdown run for every test case.
#
# Because we've configured the DatabaseMiddleware with `rollback_on_shutdown`
# we'll get a complete rollback to the initial state after each test case runs.
with TestClient(app) as test_client:
yield test_client
```
Expand Down
4 changes: 0 additions & 4 deletions docs/database.md
Expand Up @@ -6,10 +6,6 @@ or use regular non-async endpoints, and integrate with [SQLAlchemy](https://www.
In this documentation we'll demonstrate how to integrate against [the `databases` package](https://github.com/encode/databases),
which provides SQLAlchemy core support against a range of different database drivers.

**Note**: Previous versions of Starlette included a built-in `DatabaseMiddleware`.
This option is currently still available but should be considered as pending deprecation.
It will be removed in a future release. The legacy documentation [is available here](https://github.com/encode/starlette/blob/0.10.2/docs/database.md).

Here's a complete example, that includes table definitions, configuring a `database.Database`
instance, and a couple of endpoints that interact with the database.

Expand Down

0 comments on commit e5fb7e9

Please sign in to comment.