Django

Code

Ticket #800 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

startswith lookup type does not work with underscore

Reported by: django-form@swapoff.org Assigned to: adrian
Milestone: Component: Database wrapper
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Quite strange. Using SQLite 3.2.7, django r1238.

>>> for i in attributes.get_iterator(key__startswith = 'threaded'): print i
... 
threaded_collector.count
>>> for i in attributes.get_iterator(key__startswith = 'threaded_'): print i
... 
>>> 

I also tested with foo_ and foo and it exhibited the same behaviour.

Attachments

Change History

11/20/05 19:59:57 changed by adrian

  • status changed from new to assigned.

This is a SQLite problem...I've reproduced it in upcoming unit tests.

11/20/05 20:33:47 changed by adrian

(In [1324]) Added unit tests to verify #800. Refs #800

11/20/05 20:46:16 changed by adrian

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [1326]) Fixed #800 -- Fixed bug in treatement of underscores and percent signs in SQLite backend. In order to do this, changed OPERATOR_MAPPING in DB backends to include a format string of the field value, because ESCAPE comes after the field value.


Add/Change #800 (startswith lookup type does not work with underscore)




Change Properties
Action