Skip to content

Commit b1e2da4

Browse files
committed
Fix Now function to return the statement time rather than transaction time
1 parent 2773ac5 commit b1e2da4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_cockroachdb/functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from django.db.models.expressions import When
77
from django.db.models.functions import (
88
ACos, ASin, ATan, ATan2, Cast, Ceil, Coalesce, Collate, Cos, Cot, Degrees,
9-
Exp, Floor, JSONArray, JSONObject, Ln, Log, Radians, Round, Sin, Sqrt,
9+
Exp, Floor, JSONArray, JSONObject, Ln, Log, Now, Radians, Round, Sin, Sqrt,
1010
StrIndex, Tan,
1111
)
1212

@@ -79,6 +79,7 @@ def register_functions():
7979
Collate.as_cockroachdb = collate
8080
JSONArray.as_cockroachdb = JSONArray.as_postgresql
8181
JSONObject.as_cockroachdb = JSONObject.as_postgresql
82+
Now.as_cockroachdb = Now.as_postgresql
8283
Round.as_cockroachdb = round_cast
8384
StrIndex.as_cockroachdb = StrIndex.as_postgresql
8485
When.as_cockroachdb = when

0 commit comments

Comments
 (0)