diff --git a/trunk/sqltoy-orm-core/pom.xml b/trunk/sqltoy-orm-core/pom.xml index f9636cea5..6299f9bd4 100644 --- a/trunk/sqltoy-orm-core/pom.xml +++ b/trunk/sqltoy-orm-core/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.sagframe - 5.6.20 + 5.6.21 sagacity-sqltoy sqltoy core code sagacity-sqltoy @@ -17,8 +17,8 @@ 8.15.0 2.0.52 3.12.14 - 5.10.3 - 1.10.3 + 5.11.0 + 1.11.0 2.0.16 2.3.232 1.18.34 diff --git a/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/plugins/function/impl/Nvl.java b/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/plugins/function/impl/Nvl.java index 37309fe9a..daca9fc92 100644 --- a/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/plugins/function/impl/Nvl.java +++ b/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/plugins/function/impl/Nvl.java @@ -17,7 +17,7 @@ */ public class Nvl extends IFunction { - private static Pattern regex = Pattern.compile("(?i)\\W(nvl|isnull|ifnull|coalesce)\\("); + private static Pattern regex = Pattern.compile("(?i)\\W(nvl|isnull|ifnull)\\("); /* * (non-Javadoc) @@ -50,7 +50,7 @@ public String wrap(int dialect, String functionName, boolean hasArgs, String... if (args == null || args.length == 0) { return super.IGNORE; } - String funLow = functionName.toLowerCase(); + //String funLow = functionName.toLowerCase(); if (dialect == DBType.SQLSERVER) { return wrapArgs("isnull", args); } @@ -72,10 +72,7 @@ public String wrap(int dialect, String functionName, boolean hasArgs, String... return wrapArgs("nvl", args); } if (dialect == DBType.H2) { - if ("coalesce".equals(funLow)) { - return wrapArgs("coalesce", args); - } - return wrapArgs("ifnull", args); + return wrapArgs("coalesce", args); } return super.IGNORE; } diff --git a/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/utils/BeanUtil.java b/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/utils/BeanUtil.java index 4468c9ff3..e8baa72fb 100644 --- a/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/utils/BeanUtil.java +++ b/trunk/sqltoy-orm-core/src/main/java/org/sagacity/sqltoy/utils/BeanUtil.java @@ -83,7 +83,7 @@ public class BeanUtil { private static ConcurrentHashMap enumGetKeyExists = new ConcurrentHashMap(); private static ConcurrentHashMap enumClassMap = new ConcurrentHashMap(); - // 枚举类型取key值的常用方法名称 + // 枚举类型取key值的常用方法名称,枚举类中用getValue、getKey、getId等作为取值的都可自动完成映射 private static String[] enumKeys = { "value", "key", "code", "id", "status", "level", "type" }; // 静态方法避免实例化和继承 @@ -103,6 +103,7 @@ public static Object getEnumValue(Object enumValue) { Object result = null; Class enumClass = enumValue.getClass(); Method getKeyMethod; + //Map缓存,不会每次都循环 if (enumGetKeyExists.containsKey(enumClass)) { getKeyMethod = enumGetKeyMethods.get(enumClass); if (getKeyMethod != null) { diff --git a/trunk/sqltoy-orm-solon-plugin/.classpath b/trunk/sqltoy-orm-solon-plugin/.classpath new file mode 100644 index 000000000..7a9a1057f --- /dev/null +++ b/trunk/sqltoy-orm-solon-plugin/.classpath @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/sqltoy-orm-solon-plugin/.gitignore b/trunk/sqltoy-orm-solon-plugin/.gitignore index 9fe2db99a..9f3d50127 100644 --- a/trunk/sqltoy-orm-solon-plugin/.gitignore +++ b/trunk/sqltoy-orm-solon-plugin/.gitignore @@ -1,8 +1,6 @@ /target/ /bin/ /.settings/ -/.classpath -.classpath /.idea/ *.iml sagacity-sqltoy.iml diff --git a/trunk/sqltoy-orm-solon-plugin/pom.xml b/trunk/sqltoy-orm-solon-plugin/pom.xml index ce426d922..ba5f1647c 100644 --- a/trunk/sqltoy-orm-solon-plugin/pom.xml +++ b/trunk/sqltoy-orm-solon-plugin/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.sagframe - 5.6.20 + 5.6.21 sagacity-sqltoy-solon-plugin sagacity-sqltoy-solon-plugin @@ -16,7 +16,7 @@ UTF-8 - 2.8.6 + 2.9.1 1.6.5 3.12.14 2.0.16 diff --git a/trunk/sqltoy-orm-spring-starter/pom.xml b/trunk/sqltoy-orm-spring-starter/pom.xml index 43f113466..cccb1274f 100644 --- a/trunk/sqltoy-orm-spring-starter/pom.xml +++ b/trunk/sqltoy-orm-spring-starter/pom.xml @@ -4,17 +4,17 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.sagframe - 5.6.20 + 5.6.21 sagacity-sqltoy-spring-starter sagacity-sqltoy-spring-starter sqltoy springboot starter https://github.com/sagframe/sagacity-sqltoy UTF-8 - 3.3.2 - 3.3.2 - 3.3.2 - 4.3.2 + 3.3.3 + 3.3.3 + 3.3.3 + 4.3.3 3.12.14 3.1.8 diff --git a/trunk/sqltoy-orm-spring/pom.xml b/trunk/sqltoy-orm-spring/pom.xml index acabcbadd..ab8ba336b 100644 --- a/trunk/sqltoy-orm-spring/pom.xml +++ b/trunk/sqltoy-orm-spring/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.sagframe - 5.6.20 + 5.6.21 sagacity-sqltoy-spring sagacity-sqltoy-spring sagacity-sqltoy-spring @@ -11,9 +11,9 @@ UTF-8 6.1.12 - 3.3.2 - 3.3.2 - 4.3.2 + 3.3.3 + 3.3.3 + 4.3.3 3.12.14 2.0.16 3.1.8