Ticket #4676: sql.diff

File sql.diff, 728 bytes (added by djangoproject.com@…, 17 years ago)

Patch againt svn revision 5526

  • base.py

     
    8787        return name # Quoting once is enough.
    8888    return '"%s"' % name
    8989
     90def unquote_name(name):
     91    return name.strip('"')
     92
    9093dictfetchone = util.dictfetchone
    9194dictfetchmany = util.dictfetchmany
    9295dictfetchall = util.dictfetchall
     
    121124    return " DEFERRABLE INITIALLY DEFERRED"
    122125
    123126def get_fulltext_search_sql(field_name):
    124     raise NotImplementedError
     127    requoted_field_name = quote_name("%s_tsv" %(unquote_name(field_name)))
     128    return "%s @@ to_tsquery(%%s)" % requoted_field_name
    125129
    126130def get_drop_foreignkey_sql():
    127131    return "DROP CONSTRAINT"
Back to Top