Commit 168429d5 authored by Adrian Holovaty's avatar Adrian Holovaty
Browse files

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
parent 142e59b4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -125,6 +125,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql():
    return "RAND()"

def get_fulltext_search_sql(field_name):
    raise NotImplementedError

def get_drop_foreignkey_sql():
    return "DROP CONSTRAINT"

+1 −0
Original line number Diff line number Diff line
@@ -33,5 +33,6 @@ get_date_extract_sql = complain
get_date_trunc_sql = complain
get_limit_offset_sql = complain
get_random_function_sql = complain
get_fulltext_search_sql = complain
get_drop_foreignkey_sql = complain
OPERATOR_MAPPING = {}
+3 −0
Original line number Diff line number Diff line
@@ -152,6 +152,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql():
    return "RAND()"

def get_fulltext_search_sql(field_name):
    return 'MATCH (%s) AGAINST (%%s IN BOOLEAN MODE)' % field_name

def get_drop_foreignkey_sql():
    return "DROP FOREIGN KEY"

+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql():
    return "DBMS_RANDOM.RANDOM"

def get_fulltext_search_sql(field_name):
    raise NotImplementedError

def get_drop_foreignkey_sql():
    return "DROP FOREIGN KEY"

+3 −0
Original line number Diff line number Diff line
@@ -102,6 +102,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql():
    return "RANDOM()"

def get_fulltext_search_sql(field_name):
    raise NotImplementedError

def get_drop_foreignkey_sql():
    return "DROP CONSTRAINT"

Loading