Giter VIP home page Giter VIP logo

mongo-java-demo's Introduction

mongo-java-demo

此工程用于显示如何使用MongoDB Java Driver进行基本的MongoDB操作。

准备工作

此工程需要先安装Maven。请参考Installing Apache Maven查看如何安装。

使用

执行

每个类都具有Main方法,执行这个方法即可执行当前演示内容。

演示主题

  1. 清理集合并构造10000条文档到Person集合:InsertDemo.java
  2. 更新操作演示:UpdateDemo.java
    1. 如何更新第一个匹配的数组元素;
    2. (未完成)如何更新全部需要的数组元素(需要MongoDB 3.6);
    3. 如何执行批量更新;
    4. 如何替换文档;
  3. 如何在集合上执行聚合查询:Aggregate.java
  4. 如何查询指定条件的数组元素,要求只返回匹配的数组元素:FindDemo.java
    1. 如何使用数组元素;
  5. 如何按指定条件批量删除数据:DeleteDemo.java
  6. (未完成)Spark基本操作演示:Spark.java

mongo-java-demo's People

Contributors

zhangyaoxing avatar

Stargazers

晟林 avatar  avatar 殷勇 avatar  avatar Hbn avatar  avatar Panda avatar

Watchers

James Cloos avatar  avatar 殷勇 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.