Re: [Django] #35094: Add pure Python dbshell fallback (was: Add pure Python `dbshell` fallback)

6 views
Skip to first unread message

Django

unread,
Jan 8, 2024, 7:33:27 AM1/8/24
to django-...@googlegroups.com
#35094: Add pure Python dbshell fallback
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: nobody
Type: New feature | Status: closed
Component: Core (Management | Version: 5.0
commands) |
Severity: Normal | Resolution: wontfix
Keywords: sqlite dbshell in- | Triage Stage:
memory | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix
* component: Database layer (models, ORM) => Core (Management commands)


Comment:

Thanks for this ticket, however I don't see much burnout in installing
database clients if users want to use database in a shell. It's also not
something that needs to be shipped by Django itself. It sounds like a
third-party package is the best way to proceed so that people can try it
out and then approaching the DevelopersMailingList to reach a wider
audience and see what other think.

> which can easily be adapted and made generic for all database engines.

I don't think it is, but you may prove that I'm wrong. The devil is in the
details.

> 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.

I'm not sure how would you like to achieve this, `dbshell` is a management
command. How would you like to share the same in-memory database as e.g.
`runserver`?

--
Ticket URL: <https://code.djangoproject.com/ticket/35094#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages