sql >> データベース >  >> NoSQL >> MongoDB

MongoDBバッチ挿入がJavaドライバーで機能しない

    This code is working with mongoDB Version 2.2.3
    
    So Pleae install this version and check your db
    
    First Perform following command
    
    show dbs
    use mydb
    show collections
    
    when you perform these three command then you will see list of collection for mydb
    
    then perform 
    
    db.emails.find() which will give you will get Record
    
    Here below i have paste command that i have fire it and check it dear 
    
    
    C:\dhananjay\mongoDB\mongodb\bin>mongo.exe
    
    MongoDB shell version: 2.2.3
    connecting to: test
    
    > show dbs
    blog    0.203125GB
    course  0.203125GB
    local   (empty)
    m101    0.203125GB
    mydb    0.203125GB
    school  0.203125GB
    students        0.203125GB
    test    0.203125GB
    
    > use mydb
    switched to db mydb
    
    > show collections
    emails
    system.indexes
    
    > db.emails.find()
    
    { "_id" : ObjectId("51a83f22fdb3f79d6a713e71"), "email" : "[email protected]" }
    { "_id" : ObjectId("51a83f22fdb3f79d6a713e72"), "email" : "[email protected]" }
    { "_id" : ObjectId("51a83f22fdb3f79d6a713e73"), "email" : "[email protected]" }
    { "_id" : ObjectId("51a83f22fdb3f79d6a713e74"), "email" : "[email protected]" }
    { "_id" : ObjectId("51a83f22fdb3f79d6a713e75"), "email" : "[email protected]" }
    


    1. サブフィールドでのMongoクエリ

    2. mongodbで更新するドキュメントの数を制限する方法

    3. KubernetesのMongodbポッドに接続できません(接続が拒否されました)

    4. rails + docker + sidekiq + 127.0.0.1:6379でのRedisへの接続エラー(Errno ::ECONNREFUSED)