Platform.Data.Doublets C++
Loading...
Searching...
No Matches

Gitpod

NuGet Version and Downloads count Actions Status Codacy Badge CodeFactor

<a href="https://github.com/linksplatform/Data.Doublets" >Data.Doublets</a> (@ref "/home/runner/work/Data.Doublets/Data.Doublets/README.ru.md" "русская версия")

LinksPlatform's Platform.Data.Doublets Class Library.

Namespace: Platform.Data.Doublets

Forked from: Konard/LinksPlatform/Platform/Platform.Data.Doublets

NuGet package: Platform.Data.Doublets

<a href="https://github.com/linksplatform/Examples.Doublets.CRUD.DotNet" >Example</a> | <a href="https://dotnetfiddle.net/Y7Zvt0" >Run .NET fiddle</a>

#
using System;
using Platform.Data;
using Platform.Data.Doublets;
using Platform.Data.Doublets.Memory.United.Generic;
// A doublet links store is mapped to "db.links" file:
using var links = new UnitedMemoryLinks<uint>("db.links");
// A creation of the doublet link:
var link = links.Create();
// The link is updated to reference itself twice (as a source and a target):
link = links.Update(link, newSource: link, newTarget: link);
// Read operations:
Console.WriteLine($"The number of links in the data store is {links.Count()}.");
Console.WriteLine("Data store contents:");
var any = links.Constants.Any; // Means any link address or no restriction on link address
// Arguments of the query are interpreted as restrictions
var query = new Link<uint>(index: any, source: any, target: any);
links.Each((link) => {
Console.WriteLine(links.Format(link));
return links.Constants.Continue;
}, query);
// The link's content reset:
link = links.Update(link, newSource: default, newTarget: default);
// The link deletion:
links.Delete(link);

<a href="https://github.com/linksplatform/Comparisons.SQLiteVSDoublets" >SQLite vs Doublets</a>

![Image with result of performance comparison between SQLite and Doublets.](https://raw.githubusercontent.com/linksplatform/Documentation/master/doc/Examples/sqlite_vs_doublets_performance.png "Result of performance comparison between SQLite and Doublets")

Update/deletion contracts and design

Choose validation and resolution per call or through optional decorators. Raw C# deletion requires a live link, reset endpoints and caller-managed usages. Raw updates require a live internal address and valid endpoint/index state.

<a href="https://linksplatform.github.io/Data.Doublets" >Documentation</a>

PDF file with code for e-readers.

Dependency graph [C#]

C# dependency graph SVG image

Dependency graph [C++]

C++ dependency graph SVG image

Depend on

Support

Ask questions at stackoverflow.com/tags/links-platform (or with tag links-platform) to get our free support.

You can also get real-time support on our official Discord server.