mongdb???????????????
???????????? ???????[ 2013/8/7 10:30:48 ] ????????
???????????
????????????????????????????MongoDB???????顣
????10.1 help – All available commands.
????10.1 ???? -???п???????
> help
db.help() help on db methods
db.mycoll.help() help on collection methods
rs.help() help on replica set methods
help admin administrative help
help connect connecting to a db help
help keys key shortcuts
//...
????> ????
????db.help???? ????DB???? db.mycoll.help???? ??????????? rs.help????
??????????????
????????????admin??????????
????????????????????????
??????????????
/ /...
10.2 db.help???? -???help ??db???
> db.help()
DB methods:
db.addUser(username?? password[?? readOnly=false])
db.auth(username?? password)
db.cloneDatabase(fromhost)
db.commandHelp(name) returns the help for the command
db.copyDatabase(fromdb?? todb?? fromhost)
//...
????10.3 ??????????????????
> db.users.help()
DBCollection help
db.users.find().help() - show DBCursor help
db.users.count()
db.users.dataSize()
db.users.distinct( key ) - eg. db.users.distinct( 'x' )
db.users.drop() drop the collection
db.users.dropIndex(name)
//...
>db.users.help????
DBCollection??????
db.users.find????????????-??DBCursor?????
db.users.count????
db.users.dataSize????
db.users.distinct??????-???硣db.users.distinct?? 'X' ??
db.users.drop??????????? db.users.dropIndex???????
/ /...
????10.4 -?????????????
> db.users.find().help()
find() modifiers
.sort( {...} )
.limit( n )
.skip( n )
.count() - total # of objects matching query?? ignores skip??limit
.size() - total # of objects cursor would return?? honors skip??limit
.explain([verbose])
//...
>db.users.find????????
???????????????η? ???? {...} ????n????
???????? ????????n????
??????????????-???????????????????????????
??????С????-?????????????????????????????
?????????[???]??
????/ /...
??????ɡ????????MongoDB?????????????????
??????

???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11