Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1693

Initial support for bitwise operators in Expression and SelectQuery - MySQL

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1M3
    • 3.1B1
    • Core Library
    • None

    Description

      I need to use some bitmasks as query criteria. It appears that most DBs support bitwise operations:

      http://en.wikipedia.org/wiki/Bitwise_operation
      http://dev.mysql.com/doc/refman/5.1/en/bit-functions.html
      http://www.postgresql.org/docs/8.4/static/functions-math.html
      http://hsqldb.org/doc/guide/builtinfunctions-chapt.html#builtin_functions_numeric_sect

      I am going to add support in Expressions, SelectQueries and the underlying stack for &, ~, |, ^... For now a very basic implementation with no parser support, no ExpressionFactory support, and probably just MySQL adapter support. It will stay under the radar, hopefully useful to people who need them until we have the time to expand it to cover all DBs and all use cases.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: