serverInfo
This commit is contained in:
parent
e8f6141529
commit
6bf32ab9eb
2 changed files with 7 additions and 4 deletions
|
@ -27,8 +27,8 @@ module Database.MongoDB
|
|||
(
|
||||
-- * Connection
|
||||
Connection,
|
||||
connect, connectOnPort, conClose, disconnect,
|
||||
dropDatabase,
|
||||
connect, connectOnPort, conClose, disconnect, dropDatabase,
|
||||
serverInfo,
|
||||
-- * Database
|
||||
Database, MongoDBCollectionInvalid,
|
||||
ColCreateOpt(..),
|
||||
|
@ -106,6 +106,11 @@ dropDatabase c db = do
|
|||
_ <- runCommand c db $ toBsonDoc [("dropDatabase", toBson (1::Int))]
|
||||
return ()
|
||||
|
||||
-- | Get information about the MongoDB server we're connected to.
|
||||
serverInfo :: Connection -> IO BsonDoc
|
||||
serverInfo c = do
|
||||
runCommand c (s2L "admin") $ toBsonDoc [("buildinfo", toBson (1::Int))]
|
||||
|
||||
-- | Return a list of collections in /Database/.
|
||||
collectionNames :: Connection -> Database -> IO [FullCollection]
|
||||
collectionNames c db = do
|
||||
|
|
2
TODO
2
TODO
|
@ -20,8 +20,6 @@ MongoDB
|
|||
- hint, explain, $where
|
||||
- database profiling: set/get profiling level, get profiling info
|
||||
- pair mode connection
|
||||
- connection operations
|
||||
* server info
|
||||
- operations on database objects
|
||||
* getName
|
||||
* getCollection
|
||||
|
|
Loading…
Reference in a new issue