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<>();