EDB 1.0.0

dotnet add package EDB --version 1.0.0
                    
NuGet\Install-Package EDB -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EDB" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EDB" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="EDB" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EDB --version 1.0.0
                    
#r "nuget: EDB, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EDB@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EDB&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=EDB&version=1.0.0
                    
Install as a Cake Tool

UNICOXDB Library Documentation

Table of Contents

  1. Introduction
  2. Key Components
  3. Database Operations
  4. Advanced Features
  5. Data Types and Enums
  6. 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 database
  • projectPath: The path where database files will be stored
  • encryptionKey: 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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