C# Class Mdbc.FileCollection

Inheritance: ICollectionHost
Datei anzeigen Open project: nightroman/Mdbc

Protected Properties

Property Type Description
FileFormat FileFormat
FilePath string

Public Methods

Method Description
Count ( ) : long
Count ( IMongoQuery query ) : long
Count ( IMongoQuery query, int skip, int first ) : long
Distinct ( string key, IMongoQuery query ) : IEnumerable
FindAndModifyAs ( Type documentType, IMongoQuery query, IMongoSortBy sortBy, IMongoUpdate update, IMongoFields fields, bool returnNew, bool upsert, UpdateResult &result ) : object
FindAndRemoveAs ( Type documentType, IMongoQuery query, IMongoSortBy sortBy ) : object
FindAs ( Type documentType, IMongoQuery query, QueryFlags modes, IMongoSortBy sortBy, int skip, int first, IMongoFields fields ) : IEnumerable
Insert ( BsonDocument document, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult
Remove ( IMongoQuery query, RemoveFlags flags, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult
Save ( BsonDocument document, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult
Update ( IMongoQuery query, IMongoUpdate update, UpdateFlags flags, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult

Protected Methods

Method Description
CloneExternalDocument ( BsonDocument externalDocument ) : BsonDocument
FileCollection ( string path, FileFormat format ) : System
InsertInternal ( BsonDocument document ) : void
NewResponse ( int documentsAffected, bool updatedExisting, string lastErrorMessage, string errorMessage ) : BsonDocument
RemoveDocument ( BsonDocument document ) : void
RemoveDocumentAt ( int index ) : void
UpdateDocument ( BsonDocument document, UpdateCompiler>.Func update ) : void

Private Methods

Method Description
InsertNewDocument ( IMongoQuery query, IMongoUpdate update ) : BsonDocument
QueryDocuments ( IMongoQuery query ) : IEnumerable
Read ( bool newCollection ) : void
ReadDocumentsAs ( Type documentType, string filePath, FileFormat format ) : IEnumerable
Save ( string saveAs, FileFormat format ) : void

Method Details

CloneExternalDocument() protected static method

protected static CloneExternalDocument ( BsonDocument externalDocument ) : BsonDocument
externalDocument BsonDocument
return BsonDocument

Count() public method

public Count ( ) : long
return long

Count() public method

public Count ( IMongoQuery query ) : long
query IMongoQuery
return long

Count() public method

public Count ( IMongoQuery query, int skip, int first ) : long
query IMongoQuery
skip int
first int
return long

Distinct() public method

public Distinct ( string key, IMongoQuery query ) : IEnumerable
key string
query IMongoQuery
return IEnumerable

FileCollection() protected method

protected FileCollection ( string path, FileFormat format ) : System
path string
format FileFormat
return System

FindAndModifyAs() public method

public FindAndModifyAs ( Type documentType, IMongoQuery query, IMongoSortBy sortBy, IMongoUpdate update, IMongoFields fields, bool returnNew, bool upsert, UpdateResult &result ) : object
documentType System.Type
query IMongoQuery
sortBy IMongoSortBy
update IMongoUpdate
fields IMongoFields
returnNew bool
upsert bool
result UpdateResult
return object

FindAndRemoveAs() public method

public FindAndRemoveAs ( Type documentType, IMongoQuery query, IMongoSortBy sortBy ) : object
documentType System.Type
query IMongoQuery
sortBy IMongoSortBy
return object

FindAs() public method

public FindAs ( Type documentType, IMongoQuery query, QueryFlags modes, IMongoSortBy sortBy, int skip, int first, IMongoFields fields ) : IEnumerable
documentType System.Type
query IMongoQuery
modes QueryFlags
sortBy IMongoSortBy
skip int
first int
fields IMongoFields
return IEnumerable

Insert() public method

public Insert ( BsonDocument document, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult
document BsonDocument
writeConcern WriteConcern
needResult bool
return MongoDB.Driver.WriteConcernResult

InsertInternal() protected abstract method

protected abstract InsertInternal ( BsonDocument document ) : void
document BsonDocument
return void

NewResponse() protected static method

protected static NewResponse ( int documentsAffected, bool updatedExisting, string lastErrorMessage, string errorMessage ) : BsonDocument
documentsAffected int
updatedExisting bool
lastErrorMessage string
errorMessage string
return BsonDocument

Remove() public method

public Remove ( IMongoQuery query, RemoveFlags flags, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult
query IMongoQuery
flags RemoveFlags
writeConcern WriteConcern
needResult bool
return MongoDB.Driver.WriteConcernResult

RemoveDocument() protected abstract method

protected abstract RemoveDocument ( BsonDocument document ) : void
document BsonDocument
return void

RemoveDocumentAt() protected abstract method

protected abstract RemoveDocumentAt ( int index ) : void
index int
return void

Save() public method

public Save ( BsonDocument document, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult
document BsonDocument
writeConcern WriteConcern
needResult bool
return MongoDB.Driver.WriteConcernResult

Update() public method

public Update ( IMongoQuery query, IMongoUpdate update, UpdateFlags flags, WriteConcern writeConcern, bool needResult ) : MongoDB.Driver.WriteConcernResult
query IMongoQuery
update IMongoUpdate
flags UpdateFlags
writeConcern WriteConcern
needResult bool
return MongoDB.Driver.WriteConcernResult

UpdateDocument() protected abstract method

protected abstract UpdateDocument ( BsonDocument document, UpdateCompiler>.Func update ) : void
document BsonDocument
update UpdateCompiler>.Func
return void

Property Details

FileFormat protected_oe property

protected FileFormat FileFormat
return FileFormat

FilePath protected_oe property

protected string FilePath
return string