Opened 9 years ago
Closed 9 years ago
#26574 closed New feature (needsinfo)
Need to do bitwise operations in where clause
Reported by: | awol | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.9 |
Severity: | Normal | Keywords: | QuerySet.extra |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We receive a bitmask in a field from an external source and we need to do bitwise comparisons (of some complexity) with this field when selecting from the table in question. The bitwise operators are supported by the postgres backend. Deprecating the QuerySet.extra would make that hard/impossible I think.
Change History (2)
comment:2 by , 9 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
Type: | Uncategorized → New feature |
Note:
See TracTickets
for help on using tickets.
From the docs:
If this isn't sufficient, could you give an example usage of
QuerySet.extra()
that you aren't able to replace?See also #25912 for discussion about adding some other bit-wise operators.