Fixed:修复exists方法生成语句selectOne字段没别名导致报错问题。 详细内容见issure #255

This commit is contained in:
Font_C 2024-01-10 16:43:54 +08:00
parent 6e797fb33c
commit 7ca2c78be2

View File

@ -2609,24 +2609,24 @@ public class QueryMethods {
} }
/** /**
* SELECT 1 FROM table * SELECT 1 as temp_one FROM table
*/ */
public static QueryWrapper selectOne() { 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() { 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() { public static QueryWrapper selectCountOne() {
return select(count("1")); return select(count("1").as("temp_count_one"));
} }
/** /**