diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2019-03-20 08:27:34 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-03-22 12:52:39 +0100 |
| commit | d26b2424437dabeeca94d7900b37d2df4410da0c (patch) | |
| tree | cb08383bf787f14b91e82664ebedf84c92748e51 /django/db/models/functions/math.py | |
| parent | 5935a9aeade517aebdceea989467d2b46c44d96f (diff) | |
| download | django-d26b2424437dabeeca94d7900b37d2df4410da0c.tar.gz | |
Fixed #30271 -- Added the Sign database function.
Diffstat (limited to 'django/db/models/functions/math.py')
| -rw-r--r-- | django/db/models/functions/math.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/models/functions/math.py b/django/db/models/functions/math.py index 1a574eb9ab..909a3088bb 100644 --- a/django/db/models/functions/math.py +++ b/django/db/models/functions/math.py @@ -146,6 +146,11 @@ class Round(Transform): lookup_name = 'round' +class Sign(Transform): + function = 'SIGN' + lookup_name = 'sign' + + class Sin(NumericOutputFieldMixin, Transform): function = 'SIN' lookup_name = 'sin' |
