Query¶
Specialized has_any and has_all query lookups for flag enumerations.
- class django_enum.query.HasAllFlagsLookup(lhs, rhs)[source]¶
Bases:
Exact
Extend Exact lookup to support lookup on has all flags. This lookup bitwise ANDs the column with the lookup value and checks that the result is equal to the lookup value.
- lookup_name = 'has_all'¶
- class django_enum.query.HasAnyFlagsLookup(lhs, rhs)[source]¶
Bases:
HasAllFlagsLookup
Extend Exact lookup to support lookup on has any flags. This bitwise ANDs the column with the lookup value and checks that the result is greater than zero.
- lookup_name = 'has_any'¶