#417 - ENH: Add JSON expressions ... path exists and value at path equals value

This commit is contained in:
Robin Bygrave committed 2015-09-21 16:20:14 +12:00
1 parent 054f7dc86f
commit 5726410f6f
18 files changed
+584 -33

No files matched your search

@@ -0,0 +1,62 @@
package com.avaje.ebeaninternal.server.expression;
/**
* Simple operators - equals, greater than, less than etc.
*/
public enum Op {
/**
* Exists (JSON).
*/
EXISTS(" is not null "),
/**
* Not Exists (JSON).
*/
NOT_EXISTS(" is null "),
/**
* Equal to
*/
EQ(" = ? "),
/**
* Not equal to.
*/
NOT_EQ(" <> ? "),
/**
*
* Less than.
*/
LT(" < ? "),
/**
* Less than or equal to.
*/
LT_EQ(" <= ? "),
/**
* Greater than.
*/
GT(" > ? "),
/**
* Greater than or equal to.
*/
GT_EQ(" >= ? ");
final String exp;
Op(String exp) {
this.exp = exp;
}
/**
* Return the bind expression include JDBC ? bind placeholder.
*/
public String bind() {
return exp;
}
}