【发布时间】:2015-08-13 06:48:47
【问题描述】:
我想知道mongoClient和mongoConnection有什么区别,这两个代码有什么区别
serverAddress=new ServerAddress("Localhost",27017)
client= MongoClient(serverAddress)
testDB = client("testdb")//get database Name
collection = testDB("mycol")//get collection Name
和
serverAddress=new ServerAddress("Localhost",27017)
con= MongoClient(serverAddress)
testDB = con("testdb")//get database Name
myCollection = testDB("mycol")//get collection Name
请解释一下有什么区别
【问题讨论】:
-
没有区别。只有“client”变量变为“con”变量。
标签: mongodb scala casbah scala-2.11