diff options
| author | Junyi Jiao <jiaojunyi90@gmail.com> | 2018-07-05 11:02:12 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-07-05 11:02:12 -0400 |
| commit | a0b19a0f5b1731cf575546175034da53f5af5367 (patch) | |
| tree | 912f6367180636e4c9e1aecc4045830046a70ea6 /django/db/backends/sqlite3/operations.py | |
| parent | 48aeca44d885929106e71fe78379fe50850af001 (diff) | |
Refs #28643 -- Added math database functions.
Thanks Nick Pope for much review.
Diffstat (limited to 'django/db/backends/sqlite3/operations.py')
| -rw-r--r-- | django/db/backends/sqlite3/operations.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py index ee197d34b4..0ad95eb479 100644 --- a/django/db/backends/sqlite3/operations.py +++ b/django/db/backends/sqlite3/operations.py @@ -273,10 +273,10 @@ class DatabaseOperations(BaseDatabaseOperations): ) def combine_expression(self, connector, sub_expressions): - # SQLite doesn't have a power function, so we fake it with a - # user-defined function django_power that's registered in connect(). + # SQLite doesn't have a ^ operator, so use the user-defined POWER + # function that's registered in connect(). if connector == '^': - return 'django_power(%s)' % ','.join(sub_expressions) + return 'POWER(%s)' % ','.join(sub_expressions) return super().combine_expression(connector, sub_expressions) def combine_duration_expression(self, connector, sub_expressions): |
