|
@@ -211,8 +211,8 @@ public class PaginationInterceptor extends AbstractSqlParserHandler implements I
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- DbType dbType = Optional.ofNullable(this.dbType).orElse(JdbcUtils.getDbType(connection.getMetaData().getURL()));
|
|
|
|
- IDialect dialect = Optional.ofNullable(this.dialect).orElse(DialectFactory.getDialect(dbType));
|
|
|
|
|
|
+ DbType dbType = this.dbType == null ? JdbcUtils.getDbType(connection.getMetaData().getURL()) : this.dbType;
|
|
|
|
+ IDialect dialect = Optional.ofNullable(this.dialect).orElseGet(() -> DialectFactory.getDialect(dbType));
|
|
String buildSql = concatOrderBy(originalSql, page);
|
|
String buildSql = concatOrderBy(originalSql, page);
|
|
DialectModel model = dialect.buildPaginationSql(buildSql, page.offset(), page.getSize());
|
|
DialectModel model = dialect.buildPaginationSql(buildSql, page.offset(), page.getSize());
|
|
Configuration configuration = mappedStatement.getConfiguration();
|
|
Configuration configuration = mappedStatement.getConfiguration();
|