C# Класс CSMongo.Commands.MongoDatabaseCommands

Collection of database related commands
Показать файл Открыть проект

Открытые методы

Метод Описание
Authenticate ( MongoDatabase database, string username, string password ) : MethodResult

Handles logging into the specified database

Clone ( MongoDatabase database, string host ) : MethodResult

Clones the current database from the provided host to this server

CollectionCount ( MongoDatabase database, string collection ) : CollectionCountResult

Returns the count of records from the specified collection

CollectionCount ( MongoDatabase database, string collection, BsonDocument query ) : CollectionCountResult

Returns the count of records from the specified collection that meet the criteria for the query

CollectionCount ( MongoDatabase database, string collection, object query ) : CollectionCountResult

Returns the count of records from the specified collection that meet the criteria for the query

CopyDatabase ( MongoDatabase database, string from, string to, string host, int port, string username, string password ) : MethodResult

Copies a database from one location to another

DeleteAllCollectionIndexes ( MongoDatabase database, string collection ) : DeleteCollectionIndexResult

Removes all indexes from the provided collection

DeleteCollectionIndex ( MongoDatabase database, string collection, string index ) : DeleteCollectionIndexResult

Removes the index for key in the provided collection

DropCollection ( MongoDatabase database, string collection ) : DropCollectionResult

Removes a collection entirely from the database

DropDatabase ( MongoDatabase database ) : MethodResult

Deletes a database from the server

FSync ( MongoDatabase database, bool async ) : FSyncResult

Performs the FSync command against the database

ForceError ( MongoDatabase database ) : ForceErrorResult

Forces an error message on the server

GetAssertInfo ( MongoDatabase database ) : MethodResult

Returns assert info for the database ??

GetBuildInfo ( MongoDatabase database ) : BuildInfoResult

Returns build info for the server

GetCollectionDistinct ( MongoDatabase database, string collection, string key ) : CollectionDistinctResult

Gets the distinct values for the collection and key provided

GetCollectionStats ( MongoDatabase database, string collection ) : CollectionStatsResult

Returns details about the provided collection

GetLastError ( MongoDatabase database ) : GetLastErrorResult

Gets the most recent error from the database

GetNonce ( MongoDatabase database ) : GetNonceResult

Loads the 'nonce' value for password hashing

GetOpLogging ( MongoDatabase database ) : MethodResult

Returns OpLogging information for the server

GetOpTime ( MongoDatabase database ) : GetOpTimeResult

Returns OpTime for the provided database

GetPreviousError ( MongoDatabase database ) : GetPreviousErrorResult

Returns information about previous errors on the server

GetServerStatus ( MongoDatabase database ) : MethodResult

Returns uptime, lock and memory info for the database

HashPassword ( string username, string password, string nonce ) : string

Handles preparing a password to send to the database

KillCursors ( MongoDatabase database, IEnumerable cursors ) : void

Sends the request to kill existing cursors

KillCursors ( MongoDatabase database, IEnumerable cursors ) : void

Sends the request to kill existing cursors

ListDatabases ( MongoDatabase database ) : ListDatabasesResult

Returns a list of all available databases

LogOut ( MongoDatabase database ) : void

Performs a manual log our for a connection

RepairDatabase ( MongoDatabase database, bool preserveClonedOnFailure, bool backupOriginal ) : MethodResult

Attempts to repair the current database

ResetErrors ( MongoDatabase database ) : MethodResult

Causes the Mongo server to shutdown - No response is expected

RunCommand ( MongoDatabase database, BsonObject parameters ) : CommandResponse

Executes a command against the database using the provided information

RunCommand ( MongoDatabase database, BsonObject parameters, bool expectResponse ) : CommandResponse

Executes a command against the database using the provided information

RunCommand ( MongoDatabase database, object parameters ) : CommandResponse

Executes a command against the database using the provided information

RunCommand ( MongoDatabase database, object parameters, bool expectResponse ) : CommandResponse

Executes a command against the database using the provided information

SetProfileLevel ( MongoDatabase database, int level ) : ProfileResult

Sets and returns the previous profiling level

SetQueryTraceLevel ( MongoDatabase database, int level ) : MethodResult

Sets the level for the Query Trace in the database

Shutdown ( MongoDatabase database ) : void

Causes the Mongo server to shutdown - No response is expected

Приватные методы

Метод Описание
_HashString ( string value ) : string

Описание методов

Authenticate() публичный статический Метод

Handles logging into the specified database
public static Authenticate ( MongoDatabase database, string username, string password ) : MethodResult
database MongoDatabase
username string
password string
Результат CSMongo.Results.MethodResult

Clone() публичный статический Метод

Clones the current database from the provided host to this server
public static Clone ( MongoDatabase database, string host ) : MethodResult
database MongoDatabase
host string
Результат CSMongo.Results.MethodResult

CollectionCount() публичный статический Метод

Returns the count of records from the specified collection
public static CollectionCount ( MongoDatabase database, string collection ) : CollectionCountResult
database MongoDatabase
collection string
Результат CSMongo.Results.CollectionCountResult

CollectionCount() публичный статический Метод

Returns the count of records from the specified collection that meet the criteria for the query
public static CollectionCount ( MongoDatabase database, string collection, BsonDocument query ) : CollectionCountResult
database MongoDatabase
collection string
query CSMongo.Bson.BsonDocument
Результат CSMongo.Results.CollectionCountResult

CollectionCount() публичный статический Метод

Returns the count of records from the specified collection that meet the criteria for the query
public static CollectionCount ( MongoDatabase database, string collection, object query ) : CollectionCountResult
database MongoDatabase
collection string
query object
Результат CSMongo.Results.CollectionCountResult

CopyDatabase() публичный статический Метод

Copies a database from one location to another
public static CopyDatabase ( MongoDatabase database, string from, string to, string host, int port, string username, string password ) : MethodResult
database MongoDatabase
from string
to string
host string
port int
username string
password string
Результат CSMongo.Results.MethodResult

DeleteAllCollectionIndexes() публичный статический Метод

Removes all indexes from the provided collection
public static DeleteAllCollectionIndexes ( MongoDatabase database, string collection ) : DeleteCollectionIndexResult
database MongoDatabase
collection string
Результат CSMongo.Results.DeleteCollectionIndexResult

DeleteCollectionIndex() публичный статический Метод

Removes the index for key in the provided collection
public static DeleteCollectionIndex ( MongoDatabase database, string collection, string index ) : DeleteCollectionIndexResult
database MongoDatabase
collection string
index string
Результат CSMongo.Results.DeleteCollectionIndexResult

DropCollection() публичный статический Метод

Removes a collection entirely from the database
public static DropCollection ( MongoDatabase database, string collection ) : DropCollectionResult
database MongoDatabase
collection string
Результат CSMongo.Results.DropCollectionResult

DropDatabase() публичный статический Метод

Deletes a database from the server
public static DropDatabase ( MongoDatabase database ) : MethodResult
database MongoDatabase
Результат CSMongo.Results.MethodResult

FSync() публичный статический Метод

Performs the FSync command against the database
public static FSync ( MongoDatabase database, bool async ) : FSyncResult
database MongoDatabase
async bool
Результат CSMongo.Results.FSyncResult

ForceError() публичный статический Метод

Forces an error message on the server
public static ForceError ( MongoDatabase database ) : ForceErrorResult
database MongoDatabase
Результат CSMongo.Results.ForceErrorResult

GetAssertInfo() публичный статический Метод

Returns assert info for the database ??
public static GetAssertInfo ( MongoDatabase database ) : MethodResult
database MongoDatabase
Результат CSMongo.Results.MethodResult

GetBuildInfo() публичный статический Метод

Returns build info for the server
public static GetBuildInfo ( MongoDatabase database ) : BuildInfoResult
database MongoDatabase
Результат CSMongo.Results.BuildInfoResult

GetCollectionDistinct() публичный статический Метод

Gets the distinct values for the collection and key provided
public static GetCollectionDistinct ( MongoDatabase database, string collection, string key ) : CollectionDistinctResult
database MongoDatabase
collection string
key string
Результат CSMongo.Results.CollectionDistinctResult

GetCollectionStats() публичный статический Метод

Returns details about the provided collection
public static GetCollectionStats ( MongoDatabase database, string collection ) : CollectionStatsResult
database MongoDatabase
collection string
Результат CSMongo.Results.CollectionStatsResult

GetLastError() публичный статический Метод

Gets the most recent error from the database
public static GetLastError ( MongoDatabase database ) : GetLastErrorResult
database MongoDatabase
Результат GetLastErrorResult

GetNonce() публичный статический Метод

Loads the 'nonce' value for password hashing
public static GetNonce ( MongoDatabase database ) : GetNonceResult
database MongoDatabase
Результат CSMongo.Results.GetNonceResult

GetOpLogging() публичный статический Метод

Returns OpLogging information for the server
public static GetOpLogging ( MongoDatabase database ) : MethodResult
database MongoDatabase
Результат CSMongo.Results.MethodResult

GetOpTime() публичный статический Метод

Returns OpTime for the provided database
public static GetOpTime ( MongoDatabase database ) : GetOpTimeResult
database MongoDatabase
Результат CSMongo.Results.GetOpTimeResult

GetPreviousError() публичный статический Метод

Returns information about previous errors on the server
public static GetPreviousError ( MongoDatabase database ) : GetPreviousErrorResult
database MongoDatabase
Результат CSMongo.Results.GetPreviousErrorResult

GetServerStatus() публичный статический Метод

Returns uptime, lock and memory info for the database
public static GetServerStatus ( MongoDatabase database ) : MethodResult
database MongoDatabase
Результат CSMongo.Results.MethodResult

HashPassword() публичный статический Метод

Handles preparing a password to send to the database
public static HashPassword ( string username, string password, string nonce ) : string
username string
password string
nonce string
Результат string

KillCursors() публичный статический Метод

Sends the request to kill existing cursors
public static KillCursors ( MongoDatabase database, IEnumerable cursors ) : void
database MongoDatabase
cursors IEnumerable
Результат void

KillCursors() публичный статический Метод

Sends the request to kill existing cursors
public static KillCursors ( MongoDatabase database, IEnumerable cursors ) : void
database MongoDatabase
cursors IEnumerable
Результат void

ListDatabases() публичный статический Метод

Returns a list of all available databases
public static ListDatabases ( MongoDatabase database ) : ListDatabasesResult
database MongoDatabase
Результат ListDatabasesResult

LogOut() публичный статический Метод

Performs a manual log our for a connection
public static LogOut ( MongoDatabase database ) : void
database MongoDatabase
Результат void

RepairDatabase() публичный статический Метод

Attempts to repair the current database
public static RepairDatabase ( MongoDatabase database, bool preserveClonedOnFailure, bool backupOriginal ) : MethodResult
database MongoDatabase
preserveClonedOnFailure bool
backupOriginal bool
Результат CSMongo.Results.MethodResult

ResetErrors() публичный статический Метод

Causes the Mongo server to shutdown - No response is expected
public static ResetErrors ( MongoDatabase database ) : MethodResult
database MongoDatabase
Результат CSMongo.Results.MethodResult

RunCommand() публичный статический Метод

Executes a command against the database using the provided information
public static RunCommand ( MongoDatabase database, BsonObject parameters ) : CommandResponse
database MongoDatabase
parameters BsonObject
Результат CSMongo.Responses.CommandResponse

RunCommand() публичный статический Метод

Executes a command against the database using the provided information
public static RunCommand ( MongoDatabase database, BsonObject parameters, bool expectResponse ) : CommandResponse
database MongoDatabase
parameters BsonObject
expectResponse bool
Результат CSMongo.Responses.CommandResponse

RunCommand() публичный статический Метод

Executes a command against the database using the provided information
public static RunCommand ( MongoDatabase database, object parameters ) : CommandResponse
database MongoDatabase
parameters object
Результат CSMongo.Responses.CommandResponse

RunCommand() публичный статический Метод

Executes a command against the database using the provided information
public static RunCommand ( MongoDatabase database, object parameters, bool expectResponse ) : CommandResponse
database MongoDatabase
parameters object
expectResponse bool
Результат CSMongo.Responses.CommandResponse

SetProfileLevel() публичный статический Метод

Sets and returns the previous profiling level
public static SetProfileLevel ( MongoDatabase database, int level ) : ProfileResult
database MongoDatabase
level int
Результат CSMongo.Results.ProfileResult

SetQueryTraceLevel() публичный статический Метод

Sets the level for the Query Trace in the database
public static SetQueryTraceLevel ( MongoDatabase database, int level ) : MethodResult
database MongoDatabase
level int
Результат CSMongo.Results.MethodResult

Shutdown() публичный статический Метод

Causes the Mongo server to shutdown - No response is expected
public static Shutdown ( MongoDatabase database ) : void
database MongoDatabase
Результат void