diff options
author | James Moger <james.moger@gitblit.com> | 2017-01-30 16:38:24 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2017-01-30 16:46:03 -0500 |
commit | 0a8fd25fd85b28c804e4c81c90bd35fdb2e57a66 (patch) | |
tree | 44a0ba94fc3ae9199dd1feb44413b0b9947c3451 /src/main/java/com/iciql/SQLDialectH2.java | |
parent | cf7ea9600595749065129d48fbdff6f781db87b3 (diff) | |
download | iciql-0a8fd25fd85b28c804e4c81c90bd35fdb2e57a66.tar.gz iciql-0a8fd25fd85b28c804e4c81c90bd35fdb2e57a66.zip |
Added bitwise AND and XOR DSL for where clauses
Diffstat (limited to 'src/main/java/com/iciql/SQLDialectH2.java')
-rw-r--r-- | src/main/java/com/iciql/SQLDialectH2.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/com/iciql/SQLDialectH2.java b/src/main/java/com/iciql/SQLDialectH2.java index 12cc161..71c11a5 100644 --- a/src/main/java/com/iciql/SQLDialectH2.java +++ b/src/main/java/com/iciql/SQLDialectH2.java @@ -133,4 +133,23 @@ public class SQLDialectH2 extends SQLDialectDefault { buff.append(')');
stat.setSQL(buff.toString());
}
+
+ @Override
+ public <T, A> void prepareBitwiseAnd(SQLStatement stat, Query<T> query, A x, A y) {
+ stat.appendSQL("BITAND(");
+ query.appendSQL(stat, null, x);
+ stat.appendSQL(",");
+ query.appendSQL(stat, x, y);
+ stat.appendSQL(")");
+ }
+
+ @Override
+ public <T, A> void prepareBitwiseXor(SQLStatement stat, Query<T> query, A x, A y) {
+ stat.appendSQL("BITXOR(");
+ query.appendSQL(stat, null, x);
+ stat.appendSQL(",");
+ query.appendSQL(stat, x, y);
+ stat.appendSQL(")");
+ }
+
}
\ No newline at end of file |