C# Class MongoDB.Driver.Database

Inheritance: IDatabase
Afficher le fichier Open project: sdether/mongodb-csharp Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
Hash ( string text ) : string

Method Details

Authenticate() public méthode

public Authenticate ( string username, string password ) : bool
username string
password string
Résultat bool

Database() public méthode

public Database ( Connection conn, String name ) : System
conn Connection
name String
Résultat System

Eval() public méthode

public Eval ( CodeWScope cw ) : Document
cw CodeWScope
Résultat Document

Eval() public méthode

public Eval ( string javascript ) : Document
javascript string
Résultat Document

Eval() public méthode

public Eval ( string javascript, Document scope ) : Document
javascript string
scope Document
Résultat Document

FollowReference() public méthode

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

GetCollection() public méthode

public GetCollection ( String name ) : IMongoCollection
name String
Résultat IMongoCollection

GetCollectionNames() public méthode

public GetCollectionNames ( ) : List
Résultat List

GetLastError() public méthode

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
Résultat Document

GetLastErrorAndFSync() public méthode

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

GetPreviousError() public méthode

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

Logout() public méthode

public Logout ( ) : void
Résultat void

ResetError() public méthode

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

SendCommand() public méthode

public SendCommand ( Document cmd ) : Document
cmd Document
Résultat Document

SendCommand() public méthode

public SendCommand ( string command ) : Document
command string
Résultat Document

this() public méthode

public this ( String name ) : IMongoCollection
name String
Résultat IMongoCollection