Class Database
Represents an instance of MongoDB database
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Data.Access.MongoDb.Connector
Assembly: Azos.MongoDb.dll
Syntax
public sealed class Database : DisposableObject, IDisposable, INamed
Properties
Collections
Returns mounted collections
Declaration
public IRegistry<Collection> Collections { get; }
Property Value
Type | Description |
---|---|
IRegistry<Collection> |
Item[String]
Returns an existing collection or creates a new one
Declaration
public Collection this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type | Description |
---|---|
Collection |
Name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Server
Declaration
public ServerNode Server { get; }
Property Value
Type | Description |
---|---|
ServerNode |
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
GetCollectionNames()
Returns the names of collections in this database
Declaration
public string[] GetCollectionNames()
Returns
Type | Description |
---|---|
System.String[] |
Ping()
Executes a NOP command that round-trips from the server
Declaration
public void Ping()
RunCommand(BSONDocument)
Runs database-level command. Does not perform any error checks beyond network traffic req/resp passing
Declaration
public BSONDocument RunCommand(BSONDocument command)
Parameters
Type | Name | Description |
---|---|---|
BSONDocument | command |
Returns
Type | Description |
---|---|
BSONDocument |
Implements
System.IDisposable