Whilst this wouldn't have the client-side magic (eg backslash commands in
Postgres or `.` commands in sqlite), nor tab complete, it can still be a
lot more useful than nothing. An implementation of this shipped in Python
3.12 for SQLite
(https://github.com/python/cpython/blob/main/Lib/sqlite3/__main__.py),
which can easily be adapted and made generic for all database engines.
Doing this has a side benefit of also giving support for a `dbshell` for
in-memory SQLite connections, which are currently misleading through
`dbshell`, as it doesn't reuse the same connection that Django does,
meaning any database bootstrapping done during startup (best-practice
aside) is lost. An in-process connection reuses the same connnection, and
thus allows access to that in-memory database.
--
Ticket URL: <https://code.djangoproject.com/ticket/35094>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.