【MonogoDB】The high update operation of MongoDB,monogodbmongodb

來源:互聯網
上載者:User

【MonogoDB】The high update operation of MongoDB,monogodbmongodb

In the last four blog, we talked about the high query operation of mongodb. Now in this blog let's know about the high update operation about monodb.

1. Saveas for save(), whose function is to update the existing record and to create the new record.
grammar: db.mycollection.save(x);
2. General Operation2.1 $inc grammar: { $inc : { field : value } }
function: add the value to the certain field. 
example: 

2.2 $Set and $unset{ $set : { field : value } }  /  { $unset : { field : 1 } } 
function: set the field value, if the field does not exist, then add the new field, and value will support all the type. 


2.3 $push, $pushAll,$addToSet{ $push : { field : value }  } 
function: if the field is a existing arry, this function will add the value to the end.  if filed doesnot exist, it will add the new field, and then set the field value.  if field do exists but not array, it will throw error. 
$pushAll:  { $pushAll : {field : value_array } } 
this function is the same as $push, but only the value_array is array.
$addToSet: { $addToSet : { field : value } }


2.4   $pop and $pull $pullAll

2.5 $rename{ $rename : { old_friend_name: new_field_name}}




they stood on the top of the high building,_____ you could see the whole city

本來就選A,樓主疑惑的是不是from the top of the high building?其實不是這裡的from, from where 的from是來源於see from,因為有定語從句所以提前到先行詞前面,變成現在見到的A選項,原來的順序是:
you could see the whole city from the top of the high building.
這個解釋可以不?
 
When compared with the size of the whole earth, the highest mountain does not seem high at all

當分句的主語和主句一樣時,就可以省略掉,所以when分句完整的應該是:

When it is compared with the size of the whole earth
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.