Django

Code

Changeset 5566

Show
Ignore:
Timestamp:
06/30/07 16:25:10 (1 year ago)
Author:
adrian
Message:

Edited docs/db-api.txt changes from [5555]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/db-api.txt

    r5556 r5566  
    11771177~~~~~ 
    11781178 
     1179**New in Django development version** 
     1180 
    11791181Case-sensitive regular expression match. 
    11801182 
    1181 The regular expression syntax is that of the database backend in use; for the 
    1182 ``sqlite`` backend, the syntax is that of Python's ``re`` module. 
     1183The regular expression syntax is that of the database backend in use. In the 
     1184case of SQLite, which doesn't natively support regular-expression lookups, the 
     1185syntax is that of Python's ``re`` module. 
    11831186 
    11841187Example:: 
     
    11941197    SELECT ... WHERE title ~ '^(An?|The) +'; -- PostgreSQL 
    11951198 
    1196     SELECT ... WHERE title REGEXP '^(An?|The) +'; -- sqlite 
    1197  
    1198 Using raw strings for passing in the regular expression syntax is recommended. 
    1199  
    1200 Regular expression matching is not supported on the ``ado_mssql`` backend; it 
    1201 will raise a ``NotImplementedError``. 
     1199    SELECT ... WHERE title REGEXP '^(An?|The) +'; -- SQLite 
     1200 
     1201Using raw strings (e.g., ``r'foo'`` instead of ``'foo'``) for passing in the 
     1202regular expression syntax is recommended. 
     1203 
     1204Regular expression matching is not supported on the ``ado_mssql`` backend. 
     1205It will raise a ``NotImplementedError`` at runtime. 
    12021206 
    12031207iregex 
    12041208~~~~~~ 
    12051209 
     1210**New in Django development version** 
     1211 
    12061212Case-insensitive regular expression match. 
    12071213 
     
    12181224    SELECT ... WHERE title ~* '^(an?|the) +'; -- PostgreSQL 
    12191225 
    1220     SELECT ... WHERE title REGEXP '(?i)^(an?|the) +'; -- sqlite 
     1226    SELECT ... WHERE title REGEXP '(?i)^(an?|the) +'; -- SQLite 
    12211227 
    12221228Default lookups are exact