diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-07-19 15:24:03 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-07-19 15:24:03 +0000 |
| commit | 57970663831908e8f1e8bb787b04ac923d123e41 (patch) | |
| tree | c9769c12cbfeb040e54946de52bd566861ee2c95 /django | |
| parent | b617884ced62482603603d8c1929c70051b44426 (diff) | |
Added support for istartswith and iendswith in database API
git-svn-id: http://code.djangoproject.com/svn/django/trunk@207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/db/backends/mysql.py | 4 | ||||
| -rw-r--r-- | django/core/db/backends/postgresql.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/django/core/db/backends/mysql.py b/django/core/db/backends/mysql.py index 817be0c19a..9e96ed692e 100644 --- a/django/core/db/backends/mysql.py +++ b/django/core/db/backends/mysql.py @@ -99,7 +99,9 @@ OPERATOR_MAPPING = { 'lt': '<', 'lte': '<=', 'startswith': 'LIKE', - 'endswith': 'LIKE' + 'endswith': 'LIKE', + 'istartswith': 'ILIKE', + 'iendswith': 'ILIKE', } # This dictionary maps Field objects to their associated MySQL column diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py index 8a629453b3..8f82e1b23f 100644 --- a/django/core/db/backends/postgresql.py +++ b/django/core/db/backends/postgresql.py @@ -93,7 +93,9 @@ OPERATOR_MAPPING = { 'lt': '<', 'lte': '<=', 'startswith': 'LIKE', - 'endswith': 'LIKE' + 'endswith': 'LIKE', + 'istartswith': 'ILIKE', + 'iendswith': 'ILIKE', } # This dictionary maps Field objects to their associated PostgreSQL column |
