mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
#417 - ENH: Add JSON expressions ... path exists and value at path equals value
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user