Skip to content

LinksPlatform's Platform.Data.Doublets Class Library

License

Notifications You must be signed in to change notification settings

linksplatform/Data.Doublets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,749 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitpod

NuGet Version and Downloads count Actions Status Codacy Badge CodeFactor

LinksPlatform's Platform.Data.Doublets Class Library.

Namespace: Platform.Data.Doublets

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

NuGet package: Platform.Data.Doublets

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);

Image with result of performance comparison between SQLite and Doublets.

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.

About

LinksPlatform's Platform.Data.Doublets Class Library

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors 14

Languages