mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Add HasAnyKeys lookup for HStoreField.
This commit is contained in:
parent
38eacbde62
commit
74fe4428e5
4 changed files with 41 additions and 12 deletions
|
@ -79,6 +79,12 @@ class TestQuerying(PostgresSQLTestCase):
|
|||
self.objs[1:2]
|
||||
)
|
||||
|
||||
def test_has_any_keys(self):
|
||||
self.assertSequenceEqual(
|
||||
HStoreModel.objects.filter(field__has_any_keys=['a', 'c']),
|
||||
self.objs[:3]
|
||||
)
|
||||
|
||||
def test_key_transform(self):
|
||||
self.assertSequenceEqual(
|
||||
HStoreModel.objects.filter(field__a='b'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue