SimpleDB 0.0.9
See the version list below for details.
dotnet add package SimpleDB --version 0.0.9
NuGet\Install-Package SimpleDB -Version 0.0.9
<PackageReference Include="SimpleDB" Version="0.0.9" />
paket add SimpleDB --version 0.0.9
#r "nuget: SimpleDB, 0.0.9"
// Install SimpleDB as a Cake Addin #addin nuget:?package=SimpleDB&version=0.0.9 // Install SimpleDB as a Cake Tool #tool nuget:?package=SimpleDB&version=0.0.9
SimpleDB
About
SimpleDB allows you to design your tables using standard C# classes, there are a number of methods for standard CRUD operations and support for the following features:
- Foreign Keys
- Unique indexes across multiple properties
- Before and after triggers for insert, update and select
- Sequences for unique indexes
- Select Caching Strategy for individual classes (tables)
- None - Records are read from storage as required.
- Memory - Records are kept in memory.
- Sliding - Records are retained in memory for n ms and when no longer used, memory is released. -Select Write Strategy for individual classes (tables)
- Forced - Records are saved immediately to storage
- Lazy - Records are saved periodically to storage or after specific time.
- Compression types for saving that is saved
- None - Data is not compressed
- Brotli - Data is compressed prior to saving
How it works
The class represents a record (row) of data, which exposes properties for the data (columns), there is a TableAttribute that defines the policies for the table of data. The class must descend from TableRowDefinition class in order to work.
Only properties which are public get/set are saved to storage, read only properties are not saved. One important caveat is that the set method must call the Update() method which is defined in TableRowDefinition, this ensures that any changes are recognised when performing insert or update actions.
[Table("Settings", CompressionType.Brotli, CachingStrategy.None)]
internal class SettingsDataRow : TableRowDefinition
{
string _name;
string _value;
public string Name
{
get
{
return _name;
}
set
{
if (_name == value)
return;
_name = value;
Update();
}
}
public string Value
{
get
{
return _value;
}
set
{
if (_value == value)
return;
_value = value;
Update();
}
}
}
Registering Tables
SimpleDB has been designed with IoC in mind, tables can be registered and retrieved through DI engines.
services.AddSingleton(typeof(TableRowDefinition), typeof(SettingsDataRow));
Using tables
internal sealed class SettingsProvider : IApplicationSettingsProvider
{
private readonly ISimpleDBOperations<SettingsDataRow> _settingsData;
public SettingsProvider(ISimpleDBOperations<SettingsDataRow> settingsData)
{
_settingsData = settingsData ?? throw new ArgumentNullException(nameof(settingsData));
}
}
You can then call methods on _settingsData to perform normal CRUD operations.
More Information
More information is available at https://www.pluginmanager.website/Docs/ or by visiting the GitHub Homepage https://github.com/k3ldar/.NetCorePluginManager
Please note the version number follows the parent project version
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Middleware (>= 4.4.0)
- SC.Shared.Library.Core (>= 3.4.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SimpleDB:
Package | Downloads |
---|---|
PluginManager.DAL.TextFiles
Plugin Manager |
GitHub repositories
This package is not used by any popular GitHub repositories.
Supports net core 3.1, net5.0 and net 6.0