Commit 75a3878e by zhanghou

实现dbColumnNames方法

parent 0f10fd40
......@@ -225,6 +225,16 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
}
@Override
public List<String> dbColumnNames() {
if (resultLocal.get().hasNext()){
Map<String, Object> map = resultLocal.get().next();
List<String> columnNames = new ArrayList<>(map.keySet());
return columnNames;
}
return null;
}
@Override
public <T extends IModule> int dbReadset(IModuleList<T> list, String whereSql, Object[] objects) {
String moduleDB = MdaUtils.getModuleListDB(list);
DynamicDataSourceContextHolder.setDataSourceType(moduleDB);
......
......@@ -3,6 +3,7 @@ package com.brilliance.mda.runtime.mda;
import com.brilliance.mda.runtime.mda.impl.EnvConfig;
import java.io.Serializable;
import java.util.List;
import java.util.Locale;
import java.util.Map;
......
package com.brilliance.mda.runtime.mda;
import com.brilliance.mda.runtime.mda.impl.Argument;
import java.util.List;
public interface IDaoSession {
void dbBegin();
......@@ -51,4 +54,6 @@ public interface IDaoSession {
void dbReadset(IModuleList list, int maxSize, String sql);
String dbName();
List<String> dbColumnNames();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment