diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-09-02 20:46:00 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-09-02 20:46:00 +0000 |
| commit | ccbea84834a9f530c2019671787188599d2e148b (patch) | |
| tree | 106e0ff7418cdd1dbd8314bd8d0e2e86775dc09a /django/core/db/backends/sqlite3.py | |
| parent | 95e8688d7f8c9393d0e1112b52e22e713f5fa25f (diff) | |
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
Diffstat (limited to 'django/core/db/backends/sqlite3.py')
| -rw-r--r-- | django/core/db/backends/sqlite3.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/core/db/backends/sqlite3.py b/django/core/db/backends/sqlite3.py index eef596eff0..fd44341400 100644 --- a/django/core/db/backends/sqlite3.py +++ b/django/core/db/backends/sqlite3.py @@ -103,6 +103,9 @@ def get_limit_offset_sql(limit, offset=None): sql += " OFFSET %s" % offset return sql +def get_random_function_sql(): + return "RANDOM()" + def _sqlite_date_trunc(lookup_type, dt): try: dt = typecasts.typecast_timestamp(dt) |
