This commit is contained in:
Scott R. Parish 2010-02-06 16:10:52 -06:00
parent 53fe82d117
commit b3581b5209
2 changed files with 7 additions and 4 deletions

View file

@ -36,7 +36,7 @@ module Database.MongoDB
ColCreateOpt(..),
collectionNames, createCollection, dropCollection,
renameCollection, runCommand, validateCollection,
authenticate, login, addUser,
auth, addUser, login, logout,
-- * Collection
Collection, FieldSelector, FullCollection,
NumToSkip, NumToReturn, Selector,
@ -564,8 +564,12 @@ login c db user pass = do
("key", toBson digest)]
in runCommand c db request
authenticate :: Connection -> Database -> Username -> Password -> IO BsonDoc
authenticate = login
auth :: Connection -> Database -> Username -> Password -> IO BsonDoc
auth = login
logout :: Connection -> Database -> IO ()
logout c db =
runCommand c db (toBsonDoc [(s2L "logout", BsonInt32 1)]) >> return ()
-- | create a new user in the current /Database/
addUser :: Connection -> Database -> Username -> Password -> IO BsonDoc

1
TODO
View file

@ -29,7 +29,6 @@ MongoDB
* last_status
* logout
* reset_error_history
* eval
- database admin
* getAdmin
* getProfilingLevel