diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-06-30 21:25:10 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-06-30 21:25:10 +0000 |
| commit | 64f20046f1d8c2c61f1c72eff99cc46c4dea3a43 (patch) | |
| tree | 121ec877c0ff6384808f238db459db2247b66f0b /docs/db-api.txt | |
| parent | 6e1385b86258076cb1417cac99869e25d2bd98b9 (diff) | |
Edited docs/db-api.txt changes from [5555]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/db-api.txt')
| -rw-r--r-- | docs/db-api.txt | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/docs/db-api.txt b/docs/db-api.txt index 51e1e65037..ab71e68774 100644 --- a/docs/db-api.txt +++ b/docs/db-api.txt @@ -1176,10 +1176,13 @@ database to add the full-text index. regex ~~~~~ +**New in Django development version** + Case-sensitive regular expression match. -The regular expression syntax is that of the database backend in use; for the -``sqlite`` backend, the syntax is that of Python's ``re`` module. +The regular expression syntax is that of the database backend in use. In the +case of SQLite, which doesn't natively support regular-expression lookups, the +syntax is that of Python's ``re`` module. Example:: @@ -1193,16 +1196,19 @@ SQL equivalents:: SELECT ... WHERE title ~ '^(An?|The) +'; -- PostgreSQL - SELECT ... WHERE title REGEXP '^(An?|The) +'; -- sqlite + SELECT ... WHERE title REGEXP '^(An?|The) +'; -- SQLite -Using raw strings for passing in the regular expression syntax is recommended. +Using raw strings (e.g., ``r'foo'`` instead of ``'foo'``) for passing in the +regular expression syntax is recommended. -Regular expression matching is not supported on the ``ado_mssql`` backend; it -will raise a ``NotImplementedError``. +Regular expression matching is not supported on the ``ado_mssql`` backend. +It will raise a ``NotImplementedError`` at runtime. iregex ~~~~~~ +**New in Django development version** + Case-insensitive regular expression match. Example:: @@ -1217,7 +1223,7 @@ SQL equivalents:: SELECT ... WHERE title ~* '^(an?|the) +'; -- PostgreSQL - SELECT ... WHERE title REGEXP '(?i)^(an?|the) +'; -- sqlite + SELECT ... WHERE title REGEXP '(?i)^(an?|the) +'; -- SQLite Default lookups are exact ------------------------- |
