SimpleDB 5.5.1
See the version list below for details.
dotnet add package SimpleDB --version 5.5.1
NuGet\Install-Package SimpleDB -Version 5.5.1
<PackageReference Include="SimpleDB" Version="5.5.1" />
paket add SimpleDB --version 5.5.1
#r "nuget: SimpleDB, 5.5.1"
// Install SimpleDB as a Cake Addin #addin nuget:?package=SimpleDB&version=5.5.1 // Install SimpleDB as a Cake Tool #tool nuget:?package=SimpleDB&version=5.5.1
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 delete
- 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 data to storage
- 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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 is compatible. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- SC.Shared.Library.Core (>= 3.10.2)
- SharedPluginFeatures (>= 5.5.1)
-
net6.0
- SC.Shared.Library.Core (>= 3.10.2)
- SharedPluginFeatures (>= 5.5.1)
-
net7.0
- SC.Shared.Library.Core (>= 3.10.2)
- SharedPluginFeatures (>= 5.5.1)
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, net 6.0 and net7.0