From d4d11ce8955bb2469b4f1c2bc09c4aacbc991bf4 Mon Sep 17 00:00:00 2001 From: mxd <838425805@qq.com> Date: Sun, 26 Jul 2020 10:02:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=AF=BC=E5=85=A5=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/ssssssss/magicapi/functions/DatabaseQuery.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/ssssssss/magicapi/functions/DatabaseQuery.java b/src/main/java/org/ssssssss/magicapi/functions/DatabaseQuery.java index 6edbb7d5..9107ecec 100644 --- a/src/main/java/org/ssssssss/magicapi/functions/DatabaseQuery.java +++ b/src/main/java/org/ssssssss/magicapi/functions/DatabaseQuery.java @@ -5,6 +5,7 @@ import org.ssssssss.magicapi.cache.SqlCache; import org.ssssssss.magicapi.config.DynamicDataSource; import org.ssssssss.magicapi.config.DynamicDataSource.DataSourceNode; +import org.ssssssss.magicapi.config.MagicModule; import org.ssssssss.magicapi.dialect.Dialect; import org.ssssssss.magicapi.dialect.DialectUtils; import org.ssssssss.magicapi.exception.MagicAPIException; @@ -24,7 +25,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Function; -public class DatabaseQuery extends HashMap { +public class DatabaseQuery extends HashMap implements MagicModule { @UnableCall private DynamicDataSource dynamicDataSource; @@ -287,6 +288,12 @@ public Object selectValue(String sql) { private static GenericTokenParser ifParamTokenParser = new GenericTokenParser("?{", ",", true); + @UnableCall + @Override + public String getModuleName() { + return "db"; + } + public static class BoundSql { private String sql; private List parameters = new ArrayList<>();