mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-10-15 22:30:24 +00:00
递增值的增量字段同步
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.dromara.dbswitch.product.mongodb;
|
||||
|
||||
import org.dromara.dbswitch.common.consts.Constants;
|
||||
import org.dromara.dbswitch.common.entity.IncrementPoint;
|
||||
import org.dromara.dbswitch.common.entity.ResultSetWrapper;
|
||||
import org.dromara.dbswitch.common.type.ProductTypeEnum;
|
||||
import org.dromara.dbswitch.core.provider.ProductFactoryProvider;
|
||||
@@ -42,7 +43,7 @@ public class MongodbTableDataQueryProvider implements TableDataQueryProvider {
|
||||
|
||||
@Override
|
||||
public ResultSetWrapper queryTableData(String schemaName, String tableName, List<String> fields,
|
||||
List<String> orders) {
|
||||
IncrementPoint point, List<String> orders) {
|
||||
String sql = String.format("%s.getCollection('%s').find().sort({ %s })",
|
||||
schemaName, tableName, orders.stream().map(s -> String.format("'%s' : 1", s))
|
||||
.collect(Collectors.joining(",")));
|
||||
|
Reference in New Issue
Block a user