#29049: Add slicing notation to F expressions
-------------------------------------+-------------------------------------
     Reporter:  Matthew Pava         |                    Owner:  Abhinav
                                     |  Yadav
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  slice F              |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Abhinav Yadav):

 I have been reading up about this issue to continue and finish it off from
 where David left it, and I have some doubts. The SQL query left by Felix
 [https://github.com/django/django/pull/14731#discussion_r745505740 in this
 comment] also doesn't generate any QuerySet or objects. I tried to run
 that query using `Manager.raw()`, which generated no results.

 Further I investigated the `resolve_expression` method of `SliceableF`
 class in `django/db/models/expressions.py`, and compared it to other
 implementations of resovle_expression method in other classes but couldn't
 find anything concrete which might point to where the error might be.

 Does a special method for handling slicing and indexing for OuterRef query
 need to be written so it is properly resolved? That is what I'm thinking
 because I can't find anything else that is properly handling slicing for
 OuterRef Queries, unless I'm missing something.

 Also should `None` be used instead of `''` in slice_expression for end if
 length is not provided?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018456b711ef-3214265c-7f38-4d76-8b77-f64838ee4bdc-000000%40eu-central-1.amazonses.com.

Reply via email to