新增数据库 联表查询支持
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:EasyDartModule/base/database/DataBase.dart';
|
||||
import 'package:mongo_dart/mongo_dart.dart';
|
||||
|
||||
@@ -52,7 +50,13 @@ class MongoDb implements DataBase {
|
||||
if (condition == null) {
|
||||
return await getCollection(table).find().toList();
|
||||
}
|
||||
return await getCollection(table).find(condition).toList();
|
||||
if (condition is AggregationPipelineBuilder) {
|
||||
return await getCollection(table)
|
||||
.aggregateToStream(condition.build())
|
||||
.toList();
|
||||
} else {
|
||||
return await getCollection(table).find(condition).toList();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user