<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ~~~ <dependency> <groupId>org.mongodb</groupId> <artifactId>mongodb‐driver</artifactId> </dependency> ~~~ ### 查詢 ~~~ public void query(){ // 創建連接 MongoClient client = new MongoClient("ip"); // 打開數據庫 MongoDatabase db = client.getDatabase("dbname"); // 獲取集合 MongoCollection<Document> cname = db.getCollection("cname"); // 構建查詢條件 id = 11 //BasicDBObject bson = new BasicDBObject("id", "11"); // id > 100 BasicDBObject bson = new BasicDBObject("id", new BasicDBObject("$gt", 100)); // 查詢 FindIterable<Document> documents = cname.find(bson); for (Document document:documents){ System.out.println(document.getString("content")); } // 關閉連接 client.close(); } ~~~ ### 插入 ~~~ public void add(){ MongoClient client = new MongoClient("ip"); MongoDatabase db = client.getDatabase("dbname"); MongoCollection<Document> cname = db.getCollection("cname"); //插入 Map<String, Object> map = new HashMap<>(); map.put("id", "1"); map.put("name", "test"); Document document = new Document(map); cname.insertOne(document); client.close(); } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看