mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #593 -- Added 'search' DB-API lookup type, which does full-text index searches in MySQL
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
142e59b462
commit
168429d597
10 changed files with 31 additions and 1 deletions
|
@ -615,6 +615,8 @@ def get_where_clause(lookup_type, table_prefix, field_name, value):
|
|||
return "%s = %%s" % backend.get_date_extract_sql(lookup_type, table_prefix + field_name)
|
||||
elif lookup_type == 'isnull':
|
||||
return "%s%s IS %sNULL" % (table_prefix, field_name, (not value and 'NOT ' or ''))
|
||||
elif lookup_type == 'search':
|
||||
return backend.get_fulltext_search_sql(table_prefix + field_name)
|
||||
raise TypeError, "Got invalid lookup_type: %s" % repr(lookup_type)
|
||||
|
||||
def get_cached_row(klass, row, index_start):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue