mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08:24 +08:00
optimize RawValue.java
This commit is contained in:
parent
f08e380784
commit
2abebe2d61
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.mybatisflex.core.update;
|
||||
|
||||
import com.mybatisflex.core.constant.SqlConsts;
|
||||
import com.mybatisflex.core.dialect.IDialect;
|
||||
import com.mybatisflex.core.query.CPI;
|
||||
import com.mybatisflex.core.query.QueryColumn;
|
||||
@ -38,16 +39,15 @@ public class RawValue implements Serializable {
|
||||
}
|
||||
|
||||
if (object instanceof QueryWrapper) {
|
||||
return dialect.buildSelectSql((QueryWrapper) object);
|
||||
return SqlConsts.BRACKET_LEFT + dialect.buildSelectSql((QueryWrapper) object) + SqlConsts.BRACKET_RIGHT;
|
||||
}
|
||||
|
||||
if (object instanceof QueryCondition) {
|
||||
return ((QueryCondition) object).toSql(null, dialect);
|
||||
}
|
||||
|
||||
if (object instanceof QueryColumn){
|
||||
String s = CPI.toSelectSql((QueryColumn) object, null, dialect);
|
||||
return s;
|
||||
if (object instanceof QueryColumn) {
|
||||
return CPI.toSelectSql((QueryColumn) object, null, dialect);
|
||||
}
|
||||
|
||||
return object.toString();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user