mirror of
https://github.com/django/django.git
synced 2025-10-05 16:20:26 +00:00
Fixed #404 -- Fixed random ordering in MySQL by abstracting random function into db backend modules. Thanks, mattycakes@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
95e8688d7f
commit
ccbea84834
5 changed files with 12 additions and 2 deletions
|
@ -77,6 +77,9 @@ def get_limit_offset_sql(limit, offset=None):
|
|||
sql += " OFFSET %s" % offset
|
||||
return sql
|
||||
|
||||
def get_random_function_sql():
|
||||
return "RANDOM()"
|
||||
|
||||
def get_table_list(cursor):
|
||||
"Returns a list of table names in the current database."
|
||||
cursor.execute("""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue