djangonauts/django-hstore — pull request #78 by DavidMuller (2014-10-15 22:21:13+00:00)
Title: Add `valuelike` custom lookup

This PR adds a new lookup: `valuelike`

## Motivation:
Currently, the `contains` lookup, only retrieves database rows that have key/value pairs that *exactly* match your inputted dictionary. For example, running a `__contains={'my_key': 'my_value'}` only returns database rows that have an *exact* match on the key/value pair `'my_key': 'my_value'`

## Changes:
The `valuelike` lookup, e.g. `__valuelike={'my_key': 'my_value'}`, will retrieve a QuerySet containing rows where `'my_key'` has a value LIKE %my_value%.
- If `'my_key'` is not in any of the database rows, returned QuerySet will be empty
- If `'my_key'` is in one or more database rows, checks value of `'my_key'` for a match with LIKE %my_value%.

## Usage Example:
```python
MyModel.objects.filter(hstore_attribute__kvlike={'my_key': 'string I am looking for'})
```

## Case Sensitivity
This PR also adds the `ivaluelike` lookup which is identical to `valuelike` except that it uses the case insensitive version of the LIKE clause (ILIKE).