Click or drag to resize

CollectionT Class

Represents a collection of documents with a generic type.
Inheritance Hierarchy
SystemObject
  MySqlX.XDevAPIDatabaseObject
    MySqlX.XDevAPICollection
      MySqlX.XDevAPICollectionT

Namespace:  MySqlX.XDevAPI
Assembly:  MySql.Data (in MySql.Data.dll) Version: 8.0.22
Syntax
public class Collection<T> : Collection

Type Parameters

T

The CollectionT type exposes the following members.

Constructors
  NameDescription
Public methodCollectionT
Initializes a new instance of the generic Collection class based on the specified schema and name.
Top
Properties
  NameDescription
Public propertyName
Gets the database object name.
(Inherited from DatabaseObject.)
Public propertySchema
Gets the schema that owns the database object.
(Inherited from DatabaseObject.)
Public propertySession
Gets the session that owns the database object.
(Inherited from DatabaseObject.)
Top
Methods
  NameDescription
Public methodAdd(Object)
Creates an AddStatement containing the provided objects that can be used to add one or more items to a collection.
(Inherited from Collection.)
Public methodAdd(T)
Creates an AddStatement containing the provided generic object. The add statement can be further modified before execution.
Public methodAddOrReplaceOne
Adds the given document to the collection unless the identifier or any other field that has a unique index already exists, in which case it will update the matching document.
(Inherited from Collection.)
Public methodCount
Returns the number of documents in this collection on the server.
(Inherited from Collection.)
Public methodCreateIndex
Creates an index based on the properties provided in the JSON document.
(Inherited from Collection.)
Public methodDropIndex
Drops a collection index.
(Inherited from Collection.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExistsInDatabase
Verifies if the current collection exists in the server schema.
(Inherited from Collection.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Creates a FindStatement with the given condition which can be used to find documents in a collection.
(Inherited from Collection.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetOne
Returns the document with the given identifier.
(Inherited from Collection.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodModify
Creates a ModifyStatement with the given condition that can be used to modify one or more documents from a collection.
(Inherited from Collection.)
Public methodRemove
Creates a RemoveStatement with the given condition that can be used to remove one or more documents from a collection.The statement can then be further modified before execution.
(Inherited from Collection.)
Public methodRemoveOne
Removes the document with the given identifier.
(Inherited from Collection.)
Public methodReplaceOne
Replaces the document matching the given identifier.
(Inherited from Collection.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodValidateOpenSession (Inherited from DatabaseObject.)
Top
See Also