!391 Db.selectFirstAndSecondColumnsAsMap(QueryWrapper) 支持(查询结果的第一列作为key,第二列作为value)

Merge pull request !391 from tangxin/main
This commit is contained in:
Michael Yang 2023-12-20 10:45:11 +00:00 committed by Gitee
commit c2be249a82
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -291,7 +291,7 @@ public class FlexDefaultResultSetHandler extends DefaultResultSetHandler {
if (parentMapping != null) {
handleRowValues(rsw, resultMap, null, RowBounds.DEFAULT, parentMapping);
} else if (resultHandler == null) {
if (resultMap.getId().equals("com.mybatisflex.core.row.RowMapper.selectFirstAndSecondColumnsAsMap")) {
if (resultMap.getId().startsWith("com.mybatisflex.core.row.RowMapper.selectFirstAndSecondColumnsAsMap")) {
ResultSet resultSet = rsw.getResultSet();
skipRows(resultSet, rowBounds);
Map<Object, Object> row = new HashMap<>();