有人用Qt连接过mongodb吗
答案:2 悬赏:0
解决时间 2021-03-13 08:10
- 提问者网友:醉人眸
- 2021-03-12 14:20
有人用Qt连接过mongodb吗
最佳答案
- 二级知识专家网友:為→妳鎖鈊
- 2021-03-12 14:27
使用node-mongodb-native驱动,在配置选项中就可以设置连接池选项
var publicdbtoptions = {db: {},
server: { poolSize: 5 , auto_reconnect:true } ,
replSet: {},
mongos: {}
} ;
// Initialize connection once
MongoClient.connect(dbUrl,publicdbtoptions ,function(err, database) {
if(err) throw err;
dbs.publicdb = database ;
console.info(dbUrl + " open OK publicdb");
//
});
var publicdbtoptions = {db: {},
server: { poolSize: 5 , auto_reconnect:true } ,
replSet: {},
mongos: {}
} ;
// Initialize connection once
MongoClient.connect(dbUrl,publicdbtoptions ,function(err, database) {
if(err) throw err;
dbs.publicdb = database ;
console.info(dbUrl + " open OK publicdb");
//
});
全部回答
- 1楼网友:时光挺欠揍
- 2021-03-12 14:39
需要吧
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯
• 手机登qq时,显示手机磁盘不足,清理后重新登 |
• 刺客的套装怎么选啊? |