Ticket #3254: fts-pstgres-oracle-mssql-corrected.patch

File fts-pstgres-oracle-mssql-corrected.patch, 1.8 KB (added by djangoproject.com@…, 8 years ago)

Corrected patch

  • django/db/backends/ado_mssql/base.py

     
    126126    return "RAND()"
    127127
    128128def get_fulltext_search_sql(field_name):
    129     raise NotImplementedError
     129    return "CONTAINS(%s, %ss)" % field_name
    130130
    131131def get_drop_foreignkey_sql():
    132132    return "DROP CONSTRAINT"
  • django/db/backends/sqlite3/base.py

     
    140140    return "RANDOM()"
    141141
    142142def get_fulltext_search_sql(field_name):
    143     raise NotImplementedError
    144 
     143    return "%s match %s" % field_name
    145144def get_drop_foreignkey_sql():
    146145    return ""
    147146
  • django/db/backends/oracle/base.py

     
    109109    return "DBMS_RANDOM.RANDOM"
    110110
    111111def get_fulltext_search_sql(field_name):
    112     raise NotImplementedError
     112    return "CONTAINS(%s, %ss)" % field_name
    113113
    114114def get_drop_foreignkey_sql():
    115115    return "DROP FOREIGN KEY"
  • django/db/backends/postgresql_psycopg2/base.py

     
    9797    return "RANDOM()"
    9898
    9999def get_fulltext_search_sql(field_name):
    100     raise NotImplementedError
     100    return "%s_tsv @@ to_tsquery(%%s)"%field_name
    101101
    102102def get_drop_foreignkey_sql():
    103103    return "DROP CONSTRAINT"
Back to Top