加入 连接状态判断 控制台日志输出
This commit is contained in:
@@ -9,6 +9,8 @@ abstract class DataBase {
|
||||
_dataBase = database;
|
||||
}
|
||||
|
||||
bool isConnected();
|
||||
|
||||
// 执行查询操作
|
||||
Future<List<Map<String, dynamic>>> query(String table, {dynamic condition});
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ class MongoDb implements DataBase {
|
||||
connect(false);
|
||||
}
|
||||
|
||||
bool isConnected() {
|
||||
return db.isConnected;
|
||||
}
|
||||
|
||||
void connect(reconnect) {
|
||||
if (reconnect) {
|
||||
print("尝试重连MongoDb");
|
||||
|
||||
Reference in New Issue
Block a user