From 7ca2c78be20b108cb9648c1e07def3767233a30f Mon Sep 17 00:00:00 2001 From: Font_C <1020331126@qq.com> Date: Wed, 10 Jan 2024 16:43:54 +0800 Subject: [PATCH] =?UTF-8?q?=20Fixed=EF=BC=9A=E4=BF=AE=E5=A4=8Dexists?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=94=9F=E6=88=90=E8=AF=AD=E5=8F=A5selectOne?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=B2=A1=E5=88=AB=E5=90=8D=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=E3=80=82=20=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E5=86=85=E5=AE=B9=E8=A7=81issure=20#255?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mybatisflex/core/query/QueryMethods.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryMethods.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryMethods.java index 190b74e7..e398a94d 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryMethods.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryMethods.java @@ -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")); } /**