Introduction
The datastore is a feature of ConnectorLib .NET that allows a connector to store structured information in a file.
Each datastore file contains SQL-like tables with defined columns.
You can use the features provided by ConnectorLib .NET to create new tables in the datastore, store and retrieve information efficiently, and manage upgrades and versioning.
Quick Guide
The following table summarizes the functionality offered by the datastore.
Functionality | Provided By |
---|---|
Create or open a datastore | Create a DatastoreFile object |
Close a datastore | Dispose of the DatastoreFile object |
Create or open a table | DatastoreFile.NewTable
|
Insert a record | Table.Insert (pass a Record with all fields set) |
Update a record | Table.Update (only fields set in the Record are updated) |
Remove a record | Table.Remove
|
Commit changes | DatastoreFile.ProcessQueue
|
Select a single record that matches a filter | Table.SelectOne
|
Select all records that match a filter | Table.Select
|
Specify constraints | Call AddUniqueReplaceConstraint on a ColumnList and pass it to DatastoreFile.NewTable |
Add an index for faster queries | Table.CreateIndex
|
Upgrade a table | Table.Modify
|