mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 17:18:24 +08:00
fixed 34c9ba3 from https://gitee.com/Suomm/mybatis-flex/pulls/105
test: 测试函数。
This commit is contained in:
parent
19fb3fb1ad
commit
22d2cd3ec7
@ -21,6 +21,7 @@ import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.core.query.StringQueryColumn;
|
||||
import org.junit.Test;
|
||||
|
||||
import static com.mybatisflex.core.query.QueryMethods.*;
|
||||
import static com.mybatisflex.coretest.table.AccountTableDef.ACCOUNT;
|
||||
|
||||
/**
|
||||
@ -40,4 +41,15 @@ public class FunctionSqlTest {
|
||||
System.out.println(sql);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test02() {
|
||||
String sql = QueryWrapper.create()
|
||||
.select(concatWs(string("abc"), ACCOUNT.USER_NAME, ACCOUNT.BIRTHDAY))
|
||||
.select(abs(number(-3)))
|
||||
.from(ACCOUNT)
|
||||
.where(not(ACCOUNT.ID.eq(1)))
|
||||
.toSQL();
|
||||
System.out.println(sql);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user