Django

Code

Ticket #3461 (new)

Opened 1 year ago

Last modified 3 weeks ago

DatabaseWrapper should pass through args and kwargs to underlying database adapter

Reported by: Jack Moffitt <metajack@gmail.com> Assigned to: nobody
Milestone: Component: Database wrapper
Version: SVN Keywords:
Cc: metajack@gmai.com Triage Stage: Accepted
Has patch: 1 Needs documentation: 1
Needs tests: 1 Patch needs improvement: 1

Description

Currently the DatabaseWrapper? (at least for the postgresql_psycopg2end) does not pass args and kwargs for cursor() calls to the underlying database adapter. This makes it impossible to use the adapter fully at the low level. For example, to use dict cursors in psycopg2 you have to pass a different cursor factory via the cursor_factory keyword argument to cursor(). The attached patch passes through args and kwargs for cursor() calls.

Attachments

psycopg2.diff (1.0 kB) - added by Jack Moffitt <metajack@gmail.com> on 02/08/07 14:39:14.
pass through args and kwargs for calls to cursor()
3461-cursor-options.patch (2.7 kB) - added by cgrady on 06/12/08 01:24:45.

Change History

02/08/07 14:39:14 changed by Jack Moffitt <metajack@gmail.com>

  • attachment psycopg2.diff added.

pass through args and kwargs for calls to cursor()

02/08/07 17:39:42 changed by Marc Fargas <telenieko@telenieko.com>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Design decision needed.
  • needs_tests changed.
  • needs_docs changed.

07/14/07 13:20:22 changed by eliott@cactuswax.net

Any update on this? Would be very nice to not have to patch my working copy of the django libs, and so I can be more sure it will work on other installs.

12/01/07 08:28:25 changed by jacob

  • needs_better_patch set to 1.
  • stage changed from Design decision needed to Accepted.
  • needs_tests set to 1.
  • needs_docs set to 1.

A good idea -- orthogonal to DATABASE_OPTIONS added some time back -- but this needs to be done in a cross-database way, not just for one backend.

06/11/08 07:53:16 changed by Jack Moffitt <metajack@gmail.com>

  • cc set to metajack@gmai.com.

Sure, a cross database way would just be to apply the same style patch to other backends, no? Why not file a seperate bug for that project to replicate this patch on the other backends, instead of holding this one up until a perfect solution arrives.

06/12/08 01:24:45 changed by cgrady

  • attachment 3461-cursor-options.patch added.

Add/Change #3461 (DatabaseWrapper should pass through args and kwargs to underlying database adapter)




Change Properties
Action