Hi Ivan,

there is currently no bitwise operation built in, but you can easily create it 
yourself.
Just define this function somewhere in your code:

private DBColumnExpr getBitwiseAndExpr(DBColumnExpr column, int bitmask)
{
    return new DBFuncExpr(column, "? & {0}", new Object[] { new 
Integer(bitmask) }, null, false, DataType.INTEGER);
}

Then you can easily create your constraint like this:

cmd.where(getBitwiseAndExpr(MY_COLUMN,  5).is( 5 ));

This will give you your desired statement.

Regards,
Rainer


from: Ivan Nemeth [mailto:[email protected]]
to: user
re: Bitwise support

Hi,

is there any bitwise operation support implemented in Empire?

SELECT *  FROM table WHERE state_col & 5 = 5

Ivan

Reply via email to