php封装的mongodb操作类代码
| /*     --------------------------------------------------------------------------------    DELETE_ALL   --------------------------------------------------------------------------------      Delete all documents from the passed collection based upon certain criteria    @usage = $this->mongo_db->delete_all('foo',$data = array()); */ /*     --------------------------------------------------------------------------------    ADD_INDEX   --------------------------------------------------------------------------------      Ensure an index of the keys in a collection with optional parameters. To set values to descending order,else they will be   set to 1 (ASC).    @usage = $this->mongo_db->add_index($collection,array('first_name' => 'ASC','last_name' => -1),array('unique' => TRUE));  / /*     --------------------------------------------------------------------------------    REMOVE_INDEX    --------------------------------------------------------------------------------      Remove an index of the keys in a collection. To set values to descending order,else they will be   set to 1 (ASC).    @usage = $this->mongo_db->remove_index($collection,'last_name' => -1));  / /*     --------------------------------------------------------------------------------    REMOVE_ALL_INDEXES   --------------------------------------------------------------------------------      Remove all indexes from a collection.     @usage = $this->mongo_db->remove_all_index($collection);  */ /*     --------------------------------------------------------------------------------    LIST_INDEXES    --------------------------------------------------------------------------------      Lists all indexes in a collection.     @usage = $this->mongo_db->list_indexes($collection);  */ (编辑:南平站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! | 


