mirror of
https://github.com/django/django.git
synced 2025-09-11 04:56:51 +00:00
Refactored get_random_function_sql() to DatabaseOperations.random_function_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5962 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
aaf8760227
commit
c44fb66551
10 changed files with 21 additions and 25 deletions
|
@ -84,6 +84,9 @@ class DatabaseOperations(BaseDatabaseOperations):
|
|||
sql += "%s," % offset
|
||||
return sql + str(limit)
|
||||
|
||||
def random_function_sql(self):
|
||||
return 'RAND()'
|
||||
|
||||
class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
ops = DatabaseOperations()
|
||||
|
||||
|
@ -162,9 +165,6 @@ dictfetchone = util.dictfetchone
|
|||
dictfetchmany = util.dictfetchmany
|
||||
dictfetchall = util.dictfetchall
|
||||
|
||||
def get_random_function_sql():
|
||||
return "RAND()"
|
||||
|
||||
def get_start_transaction_sql():
|
||||
return "BEGIN;"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue