Changes between Initial Version and Version 3 of Ticket #8063


Ignore:
Timestamp:
Aug 8, 2008, 6:16:36 PM (16 years ago)
Author:
Malcolm Tredinnick
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8063

    • Property Component UncategorizedDatabase wrapper
    • Property Milestone1.0
    • Property Triage Stage UnreviewedAccepted
  • Ticket #8063 – Description

    initial v3  
    11If you do a qs as the following:
     2{{{
     3#!python
     4>>> foo = MyObjects.objects.all().extra(select={'relevance': match_expr}, where=[match_expr], params=[query])
     5>>> print foo
     6>>> bar = MyObjects.objects.all().extra(select={'relevance': match_expr}, where=[match_expr], params=[query])
    27
    3 foo = MyObjects.objects.all().extra(select={'relevance': match_expr},
    4                           where=[match_expr],
    5                           params=[query])
    6 
    7 print foo
    8 
    9 
    10 bar = MyObjects.objects.all().extra(select={'relevance': match_expr},
    11                           where=[match_expr],
    12                           params=[query])
    13 
    14 print bar[:10]
     8>>> print bar[:10]
     9}}}
    1510
    1611The first 10 elements of foo may not match bar, bar will simply be the first 10 objects and it discards the extra where clause.
Back to Top