update datasource to "dataSource"

This commit is contained in:
开源海哥 2023-04-28 16:29:43 +08:00
parent f636bb53d1
commit a86551633c
6 changed files with 13 additions and 13 deletions

View File

@ -22,7 +22,7 @@ public class BaseQueryWrapper<T> implements Serializable {
protected List<QueryTable> queryTables; protected List<QueryTable> queryTables;
protected String datasource; protected String dataSource;
protected List<QueryColumn> selectColumns; protected List<QueryColumn> selectColumns;
protected List<Join> joins; protected List<Join> joins;
@ -126,12 +126,12 @@ public class BaseQueryWrapper<T> implements Serializable {
this.queryTables = queryTables; this.queryTables = queryTables;
} }
protected String getDatasource() { protected String getDataSource() {
return datasource; return dataSource;
} }
protected void setDatasource(String datasource) { protected void setDataSource(String dataSource) {
this.datasource = datasource; this.dataSource = dataSource;
} }
protected List<QueryColumn> getSelectColumns() { protected List<QueryColumn> getSelectColumns() {

View File

@ -47,12 +47,12 @@ public class CPI {
queryWrapper.setQueryTables(queryTables); queryWrapper.setQueryTables(queryTables);
} }
public static String getDatasource(QueryWrapper queryWrapper) { public static String getDataSource(QueryWrapper queryWrapper) {
return queryWrapper.getDatasource(); return queryWrapper.getDataSource();
} }
public static void setDatasource(QueryWrapper queryWrapper, String datasource) { public static void setDataSource(QueryWrapper queryWrapper, String datasource) {
queryWrapper.setDatasource(datasource); queryWrapper.setDataSource(datasource);
} }
public static List<QueryColumn> getSelectColumns(QueryWrapper queryWrapper) { public static List<QueryColumn> getSelectColumns(QueryWrapper queryWrapper) {

View File

@ -339,7 +339,7 @@ public class QueryWrapper extends BaseQueryWrapper<QueryWrapper> {
} }
public QueryWrapper datasource(String datasource) { public QueryWrapper datasource(String datasource) {
setDatasource(datasource); setDataSource(datasource);
return this; return this;
} }

View File

@ -129,7 +129,7 @@ public class TransactionalManager {
boolean rollbacked = false; boolean rollbacked = false;
try { try {
success = supplier.get(); success = supplier.get();
} catch (Exception e) { } catch (Throwable e) {
rollbacked = true; rollbacked = true;
rollback(xid); rollback(xid);
throw new TransactionException(e.getMessage(), e); throw new TransactionException(e.getMessage(), e);

View File

@ -53,7 +53,7 @@ class HelloWorld {
dataSource.setPassword("password"); dataSource.setPassword("password");
MybatisFlexBootstrap.getInstance() MybatisFlexBootstrap.getInstance()
.setDatasource(dataSource) .setDataSource(dataSource)
.addMapper(AccountMapper.class) .addMapper(AccountMapper.class)
.start(); .start();

View File

@ -66,7 +66,7 @@ class HelloWorld {
dataSource.setPassword("password"); dataSource.setPassword("password");
MybatisFlexBootstrap.getInstance() MybatisFlexBootstrap.getInstance()
.setDatasource(dataSource) .setDataSource(dataSource)
.addMapper(AccountMapper.class) .addMapper(AccountMapper.class)
.start(); .start();