C# 클래스 MongoDB.Driver.Collection

상속: IMongoCollection
파일 보기 프로젝트 열기: sdether/mongodb-csharp 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CheckError void
CheckPreviousError void

공개 메소드들

메소드 설명
Collection ( string name, Connection conn, string dbName ) : System
Count ( ) : long

Count all items in the collection.

Count ( Document spec ) : long

Count all items in a collection that match the query spec.

It will return 0 if the collection doesn't exist yet.

Delete ( Document selector ) : void

Deletes documents from the collection according to the spec.

An empty document will match all documents in the collection and effectively truncate it.

Delete ( Document selector, bool safemode ) : void

Deletes documents from the collection according to the spec.

An empty document will match all documents in the collection and effectively truncate it.

Find ( Document spec ) : ICursor
Find ( Document spec, int limit, int skip ) : ICursor
Find ( Document spec, int limit, int skip, Document fields ) : ICursor
Find ( String where ) : ICursor
FindAll ( ) : ICursor
FindOne ( Document spec ) : Document

Finds and returns the first document in a query.

Insert ( Document doc ) : void
Insert ( Document doc, bool safemode ) : void

Inserts the Document into the collection.

Insert ( IEnumerable docs ) : void
Insert ( IEnumerable docs, bool safemode ) : void
MapReduce ( ) : MapReduce

Entrypoint into executing a map/reduce query against the collection.

MapReduceBuilder ( ) : MapReduceBuilder
Save ( Document doc ) : void

Saves a document to the database using an upsert.

The document will contain the _id that is saved to the database. This is really just an alias to Update(Document) to maintain consistency between drivers.

Update ( Document doc ) : void

Updates a document with the data in doc as found by the selector.

_id will be used in the document to create a selector. If it isn't in the document then it is assumed that the document is new and an upsert is sent to the database instead.

Update ( Document doc, Document selector ) : void

Updates a document with the data in doc as found by the selector.

Update ( Document doc, Document selector, UpdateFlags flags ) : void

Updates a document with the data in doc as found by the selector.

Update ( Document doc, Document selector, UpdateFlags flags, bool safemode ) : void
Update ( Document doc, Document selector, bool safemode ) : void
Update ( Document doc, Document selector, int flags ) : void
Update ( Document doc, Document selector, int flags, bool safemode ) : void
Update ( Document doc, bool safemode ) : void
UpdateAll ( Document doc, Document selector ) : void

Runs a multiple update query against the database. It will wrap any doc with $set if the passed in doc doesn't contain any '$' ops.

UpdateAll ( Document doc, Document selector, bool safemode ) : void

비공개 메소드들

메소드 설명
CheckError ( bool safemode ) : void
CheckPreviousError ( bool safemode ) : void

메소드 상세

Collection() 공개 메소드

public Collection ( string name, Connection conn, string dbName ) : System
name string
conn Connection
dbName string
리턴 System

Count() 공개 메소드

Count all items in the collection.
public Count ( ) : long
리턴 long

Count() 공개 메소드

Count all items in a collection that match the query spec.
It will return 0 if the collection doesn't exist yet.
public Count ( Document spec ) : long
spec Document
리턴 long

Delete() 공개 메소드

Deletes documents from the collection according to the spec.
An empty document will match all documents in the collection and effectively truncate it.
public Delete ( Document selector ) : void
selector Document
리턴 void

Delete() 공개 메소드

Deletes documents from the collection according to the spec.
An empty document will match all documents in the collection and effectively truncate it.
public Delete ( Document selector, bool safemode ) : void
selector Document
safemode bool
리턴 void

Find() 공개 메소드

public Find ( Document spec ) : ICursor
spec Document
리턴 ICursor

Find() 공개 메소드

public Find ( Document spec, int limit, int skip ) : ICursor
spec Document
limit int
skip int
리턴 ICursor

Find() 공개 메소드

public Find ( Document spec, int limit, int skip, Document fields ) : ICursor
spec Document
limit int
skip int
fields Document
리턴 ICursor

Find() 공개 메소드

public Find ( String where ) : ICursor
where String
리턴 ICursor

FindAll() 공개 메소드

public FindAll ( ) : ICursor
리턴 ICursor

FindOne() 공개 메소드

Finds and returns the first document in a query.
public FindOne ( Document spec ) : Document
spec Document /// A representing the query. ///
리턴 Document

Insert() 공개 메소드

public Insert ( Document doc ) : void
doc Document
리턴 void

Insert() 공개 메소드

Inserts the Document into the collection.
public Insert ( Document doc, bool safemode ) : void
doc Document
safemode bool
리턴 void

Insert() 공개 메소드

public Insert ( IEnumerable docs ) : void
docs IEnumerable
리턴 void

Insert() 공개 메소드

public Insert ( IEnumerable docs, bool safemode ) : void
docs IEnumerable
safemode bool
리턴 void

MapReduce() 공개 메소드

Entrypoint into executing a map/reduce query against the collection.
public MapReduce ( ) : MapReduce
리턴 MapReduce

MapReduceBuilder() 공개 메소드

public MapReduceBuilder ( ) : MapReduceBuilder
리턴 MapReduceBuilder

Save() 공개 메소드

Saves a document to the database using an upsert.
The document will contain the _id that is saved to the database. This is really just an alias to Update(Document) to maintain consistency between drivers.
public Save ( Document doc ) : void
doc Document
리턴 void

Update() 공개 메소드

Updates a document with the data in doc as found by the selector.
_id will be used in the document to create a selector. If it isn't in the document then it is assumed that the document is new and an upsert is sent to the database instead.
public Update ( Document doc ) : void
doc Document
리턴 void

Update() 공개 메소드

Updates a document with the data in doc as found by the selector.
public Update ( Document doc, Document selector ) : void
doc Document
selector Document
리턴 void

Update() 공개 메소드

Updates a document with the data in doc as found by the selector.
public Update ( Document doc, Document selector, UpdateFlags flags ) : void
doc Document The to update with ///
selector Document /// The query spec to find the document to update. ///
flags UpdateFlags /// ///
리턴 void

Update() 공개 메소드

public Update ( Document doc, Document selector, UpdateFlags flags, bool safemode ) : void
doc Document
selector Document
flags UpdateFlags
safemode bool
리턴 void

Update() 공개 메소드

public Update ( Document doc, Document selector, bool safemode ) : void
doc Document
selector Document
safemode bool
리턴 void

Update() 공개 메소드

public Update ( Document doc, Document selector, int flags ) : void
doc Document
selector Document
flags int
리턴 void

Update() 공개 메소드

public Update ( Document doc, Document selector, int flags, bool safemode ) : void
doc Document
selector Document
flags int
safemode bool
리턴 void

Update() 공개 메소드

public Update ( Document doc, bool safemode ) : void
doc Document
safemode bool
리턴 void

UpdateAll() 공개 메소드

Runs a multiple update query against the database. It will wrap any doc with $set if the passed in doc doesn't contain any '$' ops.
public UpdateAll ( Document doc, Document selector ) : void
doc Document
selector Document
리턴 void

UpdateAll() 공개 메소드

public UpdateAll ( Document doc, Document selector, bool safemode ) : void
doc Document
selector Document
safemode bool
리턴 void