summaryrefslogtreecommitdiff
path: root/django/db/models/functions/math.py
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2019-03-20 08:27:34 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-03-22 12:52:39 +0100
commitd26b2424437dabeeca94d7900b37d2df4410da0c (patch)
treecb08383bf787f14b91e82664ebedf84c92748e51 /django/db/models/functions/math.py
parent5935a9aeade517aebdceea989467d2b46c44d96f (diff)
downloaddjango-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.py5
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'