diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2005-12-04 18:54:44 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-12-04 18:54:44 +0000 |
| commit | c464e57da93ffd62261317abfb7a36ec23ddab64 (patch) | |
| tree | 8832d8976a336057a9d5f28b051527bcd0309688 /django | |
| parent | e19edfbea0801e5217e2b1c97317008975b0f3b2 (diff) | |
reverted changes from [1534] and [1536] regarding ticket #966
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/db/backends/ado_mssql.py | 6 | ||||
| -rw-r--r-- | django/core/db/backends/mysql.py | 6 | ||||
| -rw-r--r-- | django/core/db/backends/postgresql.py | 6 | ||||
| -rw-r--r-- | django/core/db/backends/sqlite3.py | 6 | ||||
| -rw-r--r-- | django/core/meta/fields.py | 6 |
5 files changed, 3 insertions, 27 deletions
diff --git a/django/core/db/backends/ado_mssql.py b/django/core/db/backends/ado_mssql.py index b6b61d4129..bb5b628aca 100644 --- a/django/core/db/backends/ado_mssql.py +++ b/django/core/db/backends/ado_mssql.py @@ -132,12 +132,6 @@ OPERATOR_MAPPING = { 'endswith': 'LIKE %s', 'istartswith': 'LIKE %s', 'iendswith': 'LIKE %s', - 'notcontains': 'NOT LIKE %s', - 'notstartswith': 'NOT LIKE %s', - 'notendswith': 'NOT LIKE %s', - 'inotcontains': 'NOT LIKE %s', - 'inotstartswith': 'NOT LIKE %s', - 'inotendswith': 'NOT LIKE %s', } DATA_TYPES = { diff --git a/django/core/db/backends/mysql.py b/django/core/db/backends/mysql.py index 8f9bfd26b3..0e31af13fc 100644 --- a/django/core/db/backends/mysql.py +++ b/django/core/db/backends/mysql.py @@ -146,12 +146,6 @@ OPERATOR_MAPPING = { 'endswith': 'LIKE BINARY %s', 'istartswith': 'LIKE %s', 'iendswith': 'LIKE %s', - 'notcontains': 'NOT LIKE BINARY %s', - 'notstartswith': 'NOT LIKE BINARY %s', - 'notendswith': 'NOT LIKE BINARY %s', - 'inotcontains': 'NOT LIKE %s', - 'inotstartswith': 'NOT LIKE %s', - 'inotendswith': 'NOT LIKE %s', } # 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 f62f7b3585..c650660ad8 100644 --- a/django/core/db/backends/postgresql.py +++ b/django/core/db/backends/postgresql.py @@ -151,12 +151,6 @@ OPERATOR_MAPPING = { 'endswith': 'LIKE %s', 'istartswith': 'ILIKE %s', 'iendswith': 'ILIKE %s', - 'notcontains': 'NOT LIKE %s', - 'notstartswith': 'NOT LIKE %s', - 'notendswith': 'NOT LIKE %s', - 'inotcontains': 'NOT ILIKE %s', - 'inotstartswith': 'NOT ILIKE %s', - 'inotendswith': 'NOT ILIKE %s', } # This dictionary maps Field objects to their associated PostgreSQL column diff --git a/django/core/db/backends/sqlite3.py b/django/core/db/backends/sqlite3.py index 1ff74ea0e8..1a4a80d632 100644 --- a/django/core/db/backends/sqlite3.py +++ b/django/core/db/backends/sqlite3.py @@ -153,12 +153,6 @@ OPERATOR_MAPPING = { 'endswith': "LIKE %s ESCAPE '\\'", 'istartswith': "LIKE %s ESCAPE '\\'", 'iendswith': "LIKE %s ESCAPE '\\'", - 'notcontains': "NOT LIKE %s ESCAPE '\\'", - 'notstartswith': "NOT LIKE %s ESCAPE '\\'", - 'notendswith': "NOT LIKE %s ESCAPE '\\'", - 'inotcontains': "NOT LIKE %s ESCAPE '\\'", - 'inotstartswith': "NOT LIKE %s ESCAPE '\\'", - 'inotendswith': "NOT LIKE %s ESCAPE '\\'", } # SQLite doesn't actually support most of these types, but it "does the right diff --git a/django/core/meta/fields.py b/django/core/meta/fields.py index 19f827c800..c45c7b6e02 100644 --- a/django/core/meta/fields.py +++ b/django/core/meta/fields.py @@ -181,13 +181,13 @@ class Field(object): return value elif lookup_type == 'year': return ['%s-01-01' % value, '%s-12-31' % value] - elif lookup_type in ('contains', 'icontains', 'notcontains', 'inotcontains'): + elif lookup_type in ('contains', 'icontains'): return ["%%%s%%" % prep_for_like_query(value)] elif lookup_type == 'iexact': return [prep_for_like_query(value)] - elif lookup_type in ('startswith', 'istartswith', 'notstartswith', 'inotstartswith'): + elif lookup_type in ('startswith', 'istartswith'): return ["%s%%" % prep_for_like_query(value)] - elif lookup_type in ('endswith', 'iendswith', 'notendswith', 'inotendswith'): + elif lookup_type in ('endswith', 'iendswith'): return ["%%%s" % prep_for_like_query(value)] elif lookup_type == 'isnull': return [] |
