EDB 1.0.0
dotnet add package EDB --version 1.0.0
NuGet\Install-Package EDB -Version 1.0.0
<PackageReference Include="EDB" Version="1.0.0" />
<PackageVersion Include="EDB" Version="1.0.0" />
<PackageReference Include="EDB" />
paket add EDB --version 1.0.0
#r "nuget: EDB, 1.0.0"
#:package EDB@1.0.0
#addin nuget:?package=EDB&version=1.0.0
#tool nuget:?package=EDB&version=1.0.0
UNICOXDB Library Documentation
Table of Contents
- Introduction
- Key Components
- Database Operations
- Advanced Features
- Data Types and Enums
- Best Practices and Considerations
1. Introduction
UNICOXDB is a .NET library that provides a lightweight, in-memory database solution with persistent storage capabilities. It offers features such as table creation, CRUD operations, indexing, triggers, and stored procedures, making it suitable for applications requiring efficient data management without the overhead of a full-fledged database system.
2. Key Components
2.1 Database Class
The Database class is the central component of UNICOXDB. It manages tables, handles data persistence, and provides methods for various database operations.
Constructor
public Database(string name, string projectPath, string encryptionKey)
name: The name of the databaseprojectPath: The path where database files will be storedencryptionKey: A key used for encrypting sensitive data
2.2 Table Class
The Table class represents a database table and contains information about columns, indexes, and data storage.
2.3 BTree Class
The BTree class implements a B-tree data structure used for efficient indexing and searching.
3. Database Operations
3.1 Creating a Table
public async Task CreateTableAsync(string tableName, List<ColumnDefinition> columns)
Creates a new table with the specified name and column definitions.
3.2 Adding a Record
public async Task AddRecordAsync(string tableName, Dictionary<string, object> record)
Adds a new record to the specified table.
3.3 Querying Data
public async Task<List<Dictionary<string, object>>> QueryAsync(string tableName, Func<Dictionary<string, object>, bool>? predicate = null, List<string>? selectColumns = null)
Retrieves records from the specified table based on the given predicate and selected columns.
3.4 Updating Records
public async Task UpdateAsync(string tableName, Func<Dictionary<string, object>, bool> predicate, Dictionary<string, object> newValues)
Updates records in the specified table that match the given predicate with the new values.
3.5 Deleting Records
public async Task DeleteAsync(string tableName, Func<Dictionary<string, object>, bool> predicate)
Deletes records from the specified table that match the given predicate.
4. Advanced Features
4.1 Triggers
public void CreateTrigger(string tableName, string triggerName, TriggerType triggerType, Func<Dictionary<string, object>, Task<bool>> action)
Creates a trigger for the specified table that executes the given action based on the trigger type.
4.2 Stored Procedures
public void CreateProcedure(string procedureName, Func<Dictionary<string, object>, Task<object>> action)
Creates a stored procedure with the given name and action.
public async Task<object> ExecuteProcedureAsync(string procedureName, Dictionary<string, object> parameters)
Executes a stored procedure with the given name and parameters.
4.3 Indexing
public void CreateIndex(string tableName, string columnName)
Creates an index on the specified column of the given table.
5. Data Types and Enums
5.1 DataType Enum
Defines the supported data types for table columns:
- UniqueIndex
- Int
- String
- DateTime
- Boolean
- Decimal
- Float
- Double
5.2 TriggerType Enum
Defines the types of triggers supported:
- BeforeInsert
- AfterInsert
- BeforeUpdate
- AfterUpdate
- BeforeDelete
- AfterDelete
Built By Jose Rodolfo Esapa Riochi 2024/10/11 y/md
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 210 | 10/11/2024 |