Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. db.coll.update(
  2. { item: "ZZZ135" },
  3. { item: "ZZZ135", stock: 5, tags: [ "database" ] },
  4. {upsert: true}
  5. )
  6.  
  7. WriteResult({
  8. "nMatched" : 0,
  9. "nUpserted" : 1,
  10. "nModified" : 0,
  11. "_id" : ObjectId("54455f33b247e073d7161b32")
  12. })
  13.  
  14. bool
  15. mongoc_collection_command_simple (mongoc_collection_t *collection,
  16. const bson_t *command,
  17. const mongoc_read_prefs_t *read_prefs,
  18. bson_t *reply,
  19. bson_error_t *error);
  20.  
  21. bool mongo::DBClientWithCommands::simpleCommand ( const std::string & dbname,
  22. BSONObj * info,
  23. const std::string & command
  24. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement