Created
October 15, 2011 11:45
-
-
Save yamakk/1289455 to your computer and use it in GitHub Desktop.
MongoDBにScalaで接続
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.novus.casbah.mongodb | |
val con = mongodb.MongoConnection() // localhost に接続 | |
val db = con("test") | |
val col = db("scala") | |
val item = mongodb.MongoDBObject("name"->"testtest", "age"->23) | |
col += item | |
println(col.find().toList) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment