Innov-AI
    Documentation | MentDB Weak Server
MongoDB: Basic usage

  • mongodb disconnect all;
    mongodb database_unload all;
    mongodb collection_unload all;
    mongodb connect "mongodb://localhost:27017" "client1";
    mongodb database_load "client1" "database1" "jim";
    mongodb collection_load "database1" "collection1" "collection_jim";
    mongodb collection_delete "collection1" "{\"name\": \"jim\"}";
    mongodb collection_delete "collection1" "{\"name\": \"toto\"}";
    mongodb collection_delete "collection1" "{\"name\": \"payet\"}";
    mongodb collection_insert "collection1" "{\"name\": \"payet\", \"age\": 10}";
    mongodb collection_insert "collection1" "{\"name\": \"jim\", \"age\": 20}";
    mongodb collection_insert "collection1" "{\"name\": \"toto\", \"age\": 40}";
    mongodb collection_select "collection1" null null null null null null null null null;
    mongodb collection_select "collection1" "{\"name\": \"jim\"}" null null null null null null null null;
    mongodb collection_select "collection1" null "{\"age\": 1}" null null null null null null null;
    mongodb collection_select "collection1" null "{\"age\": 1}" "{\"age\": 1}" null null null null null null;
    mongodb collection_select "collection1" "{\"name\": \"jim\"}" "{\"age\": 1}" "{\"age\": 1}" null null null null 1 1;
  • "[
      {
        \"_id\": {
          \"$oid\": \"5f81a9f2af9aad3b3a0b942b\"
        },
        \"age\": 1
      }
    ]";
Services     Supporters     Contact     About     Legal notice © 2024