summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-19 15:24:03 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-19 15:24:03 +0000
commit57970663831908e8f1e8bb787b04ac923d123e41 (patch)
treec9769c12cbfeb040e54946de52bd566861ee2c95 /django
parentb617884ced62482603603d8c1929c70051b44426 (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.py4
-rw-r--r--django/core/db/backends/postgresql.py4
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