Interface that describes basic interactions with an
ICogRecord-centric database.
Namespace: Cognex.VisionPro.DatabaseAssembly: Cognex.VisionPro.Database (in Cognex.VisionPro.Database.dll) Version: 80.0.0.0 (80.0.0.0)
Syntax
The ICogDatabase type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| Add |
Add the supplied record to the database with a key defined
by the RecordKey field. This key must be unique.
| |
| Clear |
Remove any and all database items. Does not affect the Metadata
property.
| |
| Connect |
Connect to the database specified by the Name property.
Successfully connecting grants exclusive read and write
access to the database. This method is idempotent - you
may safely call it repeatedly.
| |
| Disconnect |
Disconnect from the database specified by the Name property.
Successfully disconnecting releases exclusive read and write
access to the database. This method is idempotent - you
may safely call it repeatedly.
| |
| Fetch(Int32) |
Create an ICogRecord that duplicates the item specified
by the supplied index. Note that a new ICogRecord is
created every time this method is called.
| |
| Fetch(String) |
Create an ICogRecord that duplicates the item specified
by the supplied key. Note that a new ICogRecord is
created every time this method is called.
| |
| GetCount |
Get the number of items in the currently connected database.
| |
| GetEnumerator | Returns an enumerator that iterates through the collection. (Inherited from IEnumerable ICogRecord .) | |
| GetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.) | |
| GetKeys |
Generate an array of strings corresponding to the keys in the database.
| |
| Remove(Int32) |
Remove the specified item from the database.
| |
| Remove(String) |
Remove the specified item from the database.
| |
| Replace |
Find the database item whose key matches the RecordKey of the
supplied ICogRecord. Replace that database item with
(the contents of) the supplied ICogRecord.
|
Properties
| Name | Description | |
|---|---|---|
| Connected |
Is this object connected to a specific database?
| |
| Metadata |
Gets or sets the metadata associated with this database.
| |
| Name |
Gets or sets the name of this database. This must be set to
the desired value before calling Connect. Attempting to
set this when Connected is true will cause an exception to
be thrown.
|
Events
| Name | Description | |
|---|---|---|
| Added |
Event that is raised at the end of a call to Add.
| |
| Adding |
Event that is raised at the start of a call to Add.
| |
| Cleared |
Event that is raised at the end of a call to Clear.
| |
| Clearing |
Event that is raised at the start of a call to Clear.
| |
| Removed |
Event that is raised at the end of a call to Remove.
| |
| Removing |
Event that is raised at the start of a call to Remove.
| |
| Replaced |
Event that is raised at the end of a call to Replace.
| |
| Replacing |
Event that is raised at the start of a call to Replace.
|
See Also