Changes between Initial Version and Version 1 of Ticket #34160, comment 9


Ignore:
Timestamp:
Nov 16, 2022, 11:43:38 AM (18 months ago)
Author:
Martin Lehoux

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34160, comment 9

    initial v1  
    55@deconstructible(path="django.db.models.Case")
    66class Case(SQLiteNumericMixin, Expression):
    7     """
    8     An SQL searched CASE expression:
    9 
    10         CASE
    11             WHEN n > 0
    12                 THEN 'positive'
    13             WHEN n < 0
    14                 THEN 'negative'
    15             ELSE 'zero'
    16         END
    17     """
    18 
    197    template = "CASE %(cases)s ELSE %(default)s END"
    208    case_joiner = " "
Back to Top