C# Class MongoDB.Driver.Database

Inheritance: IDatabase
Mostrar archivo Open project: sdether/mongodb-csharp Class Usage Examples

Public Methods

Method Description
Authenticate ( string username, string password ) : bool
Database ( Connection conn, String name ) : System
Eval ( CodeWScope cw ) : Document
Eval ( string javascript ) : Document
Eval ( string javascript, Document scope ) : Document
FollowReference ( DBRef reference ) : Document

Gets the document that a reference is pointing to.

GetCollection ( String name ) : IMongoCollection
GetCollectionNames ( ) : List
GetLastError ( ) : Document

Most operations do not have a return code in order to save the client from having to wait for results. GetLastError can be called to retrieve the return code if clients want one.

GetLastErrorAndFSync ( ) : Document

Retrieves the last error and forces the database to fsync all files before returning.

Server version 1.3+

GetPreviousError ( ) : Document

Call after sending a bulk operation to the database.

Logout ( ) : void
ResetError ( ) : void

Resets last error. This is good to call before a bulk operation.

SendCommand ( Document cmd ) : Document
SendCommand ( string command ) : Document
this ( String name ) : IMongoCollection

Private Methods

Method Description
Hash ( string text ) : string

Method Details

Authenticate() public method

public Authenticate ( string username, string password ) : bool
username string
password string
return bool

Database() public method

public Database ( Connection conn, String name ) : System
conn Connection
name String
return System

Eval() public method

public Eval ( CodeWScope cw ) : Document
cw CodeWScope
return Document

Eval() public method

public Eval ( string javascript ) : Document
javascript string
return Document

Eval() public method

public Eval ( string javascript, Document scope ) : Document
javascript string
scope Document
return Document

FollowReference() public method

Gets the document that a reference is pointing to.
public FollowReference ( DBRef reference ) : Document
reference DBRef
return Document

GetCollection() public method

public GetCollection ( String name ) : IMongoCollection
name String
return IMongoCollection

GetCollectionNames() public method

public GetCollectionNames ( ) : List
return List

GetLastError() public method

Most operations do not have a return code in order to save the client from having to wait for results. GetLastError can be called to retrieve the return code if clients want one.
public GetLastError ( ) : Document
return Document

GetLastErrorAndFSync() public method

Retrieves the last error and forces the database to fsync all files before returning.
Server version 1.3+
public GetLastErrorAndFSync ( ) : Document
return Document

GetPreviousError() public method

Call after sending a bulk operation to the database.
public GetPreviousError ( ) : Document
return Document

Logout() public method

public Logout ( ) : void
return void

ResetError() public method

Resets last error. This is good to call before a bulk operation.
public ResetError ( ) : void
return void

SendCommand() public method

public SendCommand ( Document cmd ) : Document
cmd Document
return Document

SendCommand() public method

public SendCommand ( string command ) : Document
command string
return Document

this() public method

public this ( String name ) : IMongoCollection
name String
return IMongoCollection