mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#900 - Error - Can't fetch JsonDB field - org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type json
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package io.ebeaninternal.server.query;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
class DbOrderByTrim {
|
||||
|
||||
private static final Pattern orderByTrim = Pattern.compile("(?i)\\b asc\\b|\\b desc\\b");
|
||||
|
||||
/**
|
||||
* Convert the dbOrderBy clause to be safe for adding to select or distinct on.
|
||||
*/
|
||||
static String trim(String dbOrderBy) {
|
||||
// just remove the ASC and DESC keywords
|
||||
return orderByTrim.matcher(dbOrderBy).replaceAll("");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user