Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Aug 5, 2024

Support hex conversion and binary operators in aggregation framework

The aggregation framework lacks function for HEX <-> Number conversion and binary operations. Such functions are common in almost every programming language. Typically and most required operations would be: - convert Int/Long to Hex - convert Hex to Int/Long - Create BinData from Hex string - Get Hex string of BinData - Binary AND - Binary OR - Binary XOR - Binary NOT (i.e. complement) Some of these functions are available in mongo shell or in [Bitwise Query Operators](https://www.mongodb.com/docs/manual/reference/operator/query-bitwise/) but they do not exist in aggregation framework. For details see https://jira.mongodb.org/browse/SERVER-55386 This request becomes more urgent, because starting in MongoDB 8.0, server-side JavaScript functions ($accumulator, $function, $where) are deprecated.
  • Attach files