This template class implements record-based I/O using the installed file I/O provider and local/shared caching. The file data provider allows record-based I/O, similar to a SQL table and is a low-level data provider. It is used by application data providers and not by applications directly. The implementation details are hidden from the application and local/shared caching is used as appropriate, based on definitions in appsettings.json.
The file data provider should only be used with very small datasets.
Any class derived from FileDataProvider<KEYTYPE, OBJTYPE> is provided with a complete implementation of record-level I/O (browse, read, add, update, remove) accessing the defined dataset.
Namespace: YetaWF.DataProvider
Assembly: YetaWF.DataProvider.File
Inheritance
public class FileDataProvider<KEYTYPE,OBJTYPE> : YetaWF.DataProvider.FileDataProviderBase, YetaWF.Core.DataProvider.IDataProvider<KEYTYPE,OBJTYPE>, System.IDisposable, YetaWF.Core.DataProvider.IDataProviderTransactions;
FileDataProvider<KEYTYPE,OBJTYPE> | Constructor. |
BaseFolder | The full path of the folder where the data provider stores its data. The FileDataProvider.GetBaseFolder() method is used to define the full path. | |
Cacheable | Defines whether the data is cacheable. This corresponds to the Cacheable parameter of the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method. | |
CalculatedPropertyCallbackAsync | An optional callback which is called whenever an object is retrieved to update some properties. | |
Dataset | The dataset provided to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider was created. | |
IdentityName | Returns the name of the property that represents the identity column. | |
IdentitySeed | The initial value of the identity seed. The default value is defined by FileIdentityCount.IDENTITY_SEED, but this can be overridden by passing an optional IdentitySeed parameter to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider is created. | |
Key1Name | Returns the name of the property that represents the primary key column. | |
Logging | Defines whether logging is wanted for the data provider. The default value is false, but this can be overridden by passing an optional Logging parameter to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider is created. This does not appear to be used at this time by this data provider. | |
Options | A dictionary of options and optional parameters as provided to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider was created. | |
Package | The package implementing the data provider. | |
SiteIdentity | The site identity provided to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider was created. This may be 0 if no specific site is associated with the data provider. | |
UseIdentity | Defines whether the site identity SiteIdentity was provided to the YetaWF.Core.DataProvider.DataProviderImpl.MakeDataProvider method when the data provider was created. |
ExternalName | The name of the file data provider. This name is used in appsettings.json to select the data provider. |
AbortTransaction | Aborts a transaction, abandoning all updates. | |
AddAsync | Adds a new record. | |
AddSiteDataAsync | Adds data for a new site. | |
CommitTransactionAsync | Commits a transaction, saving all updates. | |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
Equals | Determines whether the specified object is equal to the current object. | |
ExportChunkAsync | Exports data from the data provider. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. | |
GetAsync | Retrieves the record with the specified primary key. | |
GetBaseFolder | Returns the full path of the folder where this data provider stores its data. | |
GetHashCode | Serves as the default hash function. | |
GetListOfKeysAsync | Given a base folder, returns a collection of primary key values for all records in the dataset. | |
GetOneRecordAsync | Retrieves one record using filtering criteria. | |
GetRecordsAsync | Retrieves a collection of records using filtering criteria with sorting, with support for paging. | |
GetType | Gets the Type of the current instance. | |
ImportChunkAsync | Imports data into the data provider. | |
InstallModelAsync | Installs all data models (files, tables, etc.) for the data provider. | |
IsInstalledAsync | Returns whether the data provider is installed and available. | |
LocalizeModelAsync | Called to translate the data managed by the data provider to another language. | |
MemberwiseClone | Creates a shallow copy of the current Object. | |
ReferenceEquals | Determines whether the specified Object instances are the same instance. | |
RemoveAsync | Removes an existing record with the specified primary key. | |
RemoveRecordsAsync | Removes records using filtering criteria. | |
RemoveSiteDataAsync | Removes data when a site is deleted. | |
StartTransaction | Starts a transaction that can be committed, saving all updates, or aborted to abandon all updates. | |
SupportTransactions | Used when creating a dataprovider whithin StartTransAction(). | |
ToString | Returns a string that represents the current object. | |
UninstallModelAsync | Uninstalls all data models (files, tables, etc.) for the data provider. | |
UpdateAsync | Updates an existing record with the specified primary key. |
See Also YetaWF.DataProvider.FileYetaWF.Core
Documentation Feedback
© 2024 - Softel vdm, Inc. - YetaWF.com