mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
Fixed:修复exists方法生成语句selectOne字段没别名导致报错问题。 详细内容见issure #255
This commit is contained in:
parent
6e797fb33c
commit
7ca2c78be2
@ -2609,24 +2609,24 @@ public class QueryMethods {
|
||||
}
|
||||
|
||||
/**
|
||||
* SELECT 1 FROM table
|
||||
* SELECT 1 as temp_one FROM table
|
||||
*/
|
||||
public static QueryWrapper selectOne() {
|
||||
return select(column("1"));
|
||||
return select(column("1").as("temp_one"));
|
||||
}
|
||||
|
||||
/**
|
||||
* SELECT COUNT(*) FROM table
|
||||
* SELECT COUNT(*) as temp_count FROM table
|
||||
*/
|
||||
public static QueryWrapper selectCount() {
|
||||
return select(count());
|
||||
return select(count().as("temp_count"));
|
||||
}
|
||||
|
||||
/**
|
||||
* SELECT COUNT(1) FROM table
|
||||
* SELECT COUNT(1) as temp_count_one FROM table
|
||||
*/
|
||||
public static QueryWrapper selectCountOne() {
|
||||
return select(count("1"));
|
||||
return select(count("1").as("temp_count_one"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user