一致
Case Sensitive
BINARY field=値 field=BINARY 値 |
field=値 |
field__exact=値 |
Case Insensitive
field=値 |
field__iexact=値 |
大小比較
field>値 |
field__gt=値 |
field>=値 |
field__gte=値 |
field<値 |
field__lt=値 |
field<=値 |
field__lte=値 |
部分一致~LIKE
Case Sensitive
field LIKE BINARY 'text%' |
field__startswith='text' |
field LIKE BINARY '%text' |
field__endswith='text' |
field LIKE BINARY '%text%' |
field__contains='text' |
Case Insensitive
field LIKE 'text%' |
field__istartswith='text' |
field LIKE '%text' |
field__iendswith='text' |
field LIKE '%text%' |
field__icontains='text' |
何れかに一致~IN
field IN (...) |
field__in=[...] |
範囲~BETWEEN
field BETWEEN min AND max |
field__range=[min, max] |
日付の年・月・日の一致
DATE_FORMAT(date, '%Y') = 'year' |
date__year=year |
DATE_FORMAT(date, '%m') = 'month' |
date__month=month |
DATE_FORMAT(date, '%d') = 'day' |
date__day=day |
NULLとの比較
field IS NULL |
field__isnull=True |
field IS NOT NULL |
field__isnull=False |