mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1426 - ENH: Add bitwiseNot expression ... e.g. bitwiseNot("flags", BwFlags.HAS_COLOUR)
This commit is contained in:
@@ -14,11 +14,24 @@ public class TestBitwiseExpressions extends BaseTestCase {
|
||||
public void where() {
|
||||
|
||||
setup();
|
||||
bitwiseNot();
|
||||
bitwiseAnd();
|
||||
bitwiseAny();
|
||||
bitwiseAll();
|
||||
}
|
||||
|
||||
private void bitwiseNot() {
|
||||
|
||||
List<BwBean> notColour = Ebean.find(BwBean.class)
|
||||
// HAS_COLOUR not set ...
|
||||
.where().bitwiseNot("flags", BwFlags.HAS_COLOUR)
|
||||
.findList();
|
||||
|
||||
assertThat(notColour).hasSize(2);
|
||||
assertThat(notColour.get(0).getName()).isEqualTo("Nothing");
|
||||
assertThat(notColour.get(1).getName()).isEqualTo("SizeOnly");
|
||||
}
|
||||
|
||||
private void bitwiseAnd() {
|
||||
|
||||
List<BwBean> list = Ebean.find(BwBean.class)
|
||||
|
||||
Reference in New Issue
Block a user