Code

#18569 closed New feature (wontfix)

Enable L expressions in `queryset.extra`

Reported by: jbzdak@… Owned by: nobody
Component: Database layer (models, ORM) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Here is my problem: in a django queryset I need to call a stored procedure that does some spatial lookup. This procedure takes three parameters: two constants, and one SQL expression. This expression is equivalent to django queryset lookup: path, but as far as I know there is no way to pass L expression to queryset.extra (well, at least I tried).

It would be great if I could pass L expressions to queryset extra (somehow), could you enable it?

If it is indeed possible (well StackOverflow says it is not) please treat this ticked as a documentation update request.

Attachments (0)

Change History (2)

comment:1 Changed 22 months ago by jbzdak@…

  • Component changed from Uncategorized to Database layer (models, ORM)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Type changed from Uncategorized to New feature

Oh well forgot to set bug properties.

comment:2 Changed 22 months ago by aaugustin

  • Resolution set to wontfix
  • Status changed from new to closed

extra often creates more problem than it solves. The current trend is to deprecate it rather than extend it.

The recommended way to achieve your goal is to use raw SQL.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.