mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Refactored get_date_extract_sql() to DatabaseOperations.date_extract_sql(). Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
38b5d7f23d
commit
aab04a4c2f
10 changed files with 30 additions and 43 deletions
|
@ -808,7 +808,7 @@ def get_where_clause(lookup_type, table_prefix, field_name, value, db_type):
|
|||
elif lookup_type in ('range', 'year'):
|
||||
return '%s BETWEEN %%s AND %%s' % field_sql
|
||||
elif lookup_type in ('month', 'day'):
|
||||
return "%s = %%s" % backend.get_date_extract_sql(lookup_type, field_sql)
|
||||
return "%s = %%s" % connection.ops.date_extract_sql(lookup_type, field_sql)
|
||||
elif lookup_type == 'isnull':
|
||||
return "%s IS %sNULL" % (field_sql, (not value and 'NOT ' or ''))
|
||||
elif lookup_type == 'search':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue