Cohesive.Relations 0.1.0-alpha.126

This is a prerelease version of Cohesive.Relations.
dotnet add package Cohesive.Relations --version 0.1.0-alpha.126
                    
NuGet\Install-Package Cohesive.Relations -Version 0.1.0-alpha.126
                    
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="Cohesive.Relations" Version="0.1.0-alpha.126" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cohesive.Relations" Version="0.1.0-alpha.126" />
                    
Directory.Packages.props
<PackageReference Include="Cohesive.Relations" />
                    
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 Cohesive.Relations --version 0.1.0-alpha.126
                    
#r "nuget: Cohesive.Relations, 0.1.0-alpha.126"
                    
#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 Cohesive.Relations@0.1.0-alpha.126
                    
#: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=Cohesive.Relations&version=0.1.0-alpha.126&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Cohesive.Relations&version=0.1.0-alpha.126&prerelease
                    
Install as a Cake Tool

Cohesive.Relations

Cohesive.Relations lets applications describe relationships, projections, filters, and queries in typed C# while leaving storage placement and execution strategy to compilers and adapters.

Portable relation drafts support explicit nested fields, statically keyed object construction, explicit coalesce defaults, bounded code-conditionals, key-based collection join and collection select with shape-aware acceptance. Selectors preserve item scope and each target child's contract; source collections must be present and non-null. Explicit single requires exactly one selected item, and explicit parseInt32/parseInt64 convert in-range integer text. parseDecimal converts invariant text without rounding. Named enum literals are checked in their owning graph. Implicit element traversal and undeclared conversions remain unsupported.

Install

dotnet add package Cohesive.Relations

Author a relation

A complete Load -> LoadDto relation needs no hand-authored node IDs, binding names, source placement, or adapter configuration:

var author = RelationQuery.Expression();
var loads = author.Source<Load>();

var loadDtos = author.Project(
    loads,
    (Load load) => new LoadDto
    {
        Id = load.Id,
        Status = load.Status
    });

var relation = loadDtos.BuildRelation(dto => dto.Id);

The authoring session derives the logical nodes, bindings, shapes, field assignments, relation identity, display name, and provenance. relation contains the canonical definition and structured validation diagnostics.

Add a relationship when the result needs another fact:

var author = RelationQuery.Expression();
var loads = author.Source<Load>();

var customers = author.Traverse<Load, Customer>(
    loads,
    load => load.CustomerId);

var searchDocuments = author.Project(
    customers,
    (Load load, Customer customer) => new LoadSearchDto
    {
        Id = load.Id,
        CustomerName = customer.Name
    });

var loadSearch = searchDocuments.BuildRelation(dto => dto.Id);

The same traversal may become an in-memory lookup, a PostgreSQL join, bounded source reads followed by local correlation, or another capability-compatible realization. The relation itself does not change.

Use it for

  • DTO mapping and enrichment.
  • Independently invoked row and aggregation queries.
  • Application read models, API results, integration payloads, and reports.
  • Field-demand, dependency, lineage, and missing-input analysis.
  • Relation-derived materialized views and targeted rebuild planning.
  • Portable execution across supplied objects and registered physical sources.

How execution stays honest

The canonical relation/query document is the semantic authority. An invocation selects results and parameters; compilation derives the exact fields and operations it needs. A target must prove those requirements against its capabilities and operating boundaries. Unsupported semantics and incomplete source evidence produce structured diagnostics rather than a weakened query or a misleading empty result.

The expression API is the normal application surface. Structural authoring and direct IR construction remain available for importers, generators, persistence tooling, and compiler tests.

Continue

  • Getting started builds, evaluates, and enriches a relation.
  • Execution and adapters covers supplied facts, acquisition, placement, and native compilation.
  • Diagnostics explains incomplete evidence and requirement gaps.
  • Capability reference is generated from the implemented target profiles.
  • Migration covers the retired relation-query stack.
  • Internals retains the complete semantic model, compiler architecture, use cases, and design rationale.

Adapter-specific guides are available for Cohesive.Adapters.Postgres, Cohesive.Adapters.Cosmos, and Cohesive.Adapters.Elastic.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

NuGet packages (15)

Showing the top 5 NuGet packages that depend on Cohesive.Relations:

Package Downloads
Cohesive.Transitions

Cohesive semantic system definition and orchestration building blocks.

Cohesive.Processes

Cohesive semantic system definition and orchestration building blocks.

Cohesive.Storage

Cohesive semantic system definition and orchestration building blocks.

Cohesive.Api

Cohesive semantic system definition and orchestration building blocks.

Cohesive.Host

Cohesive semantic system definition and orchestration building blocks.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.126 0 10/4/2026
0.1.0-alpha.125 0 10/4/2026
0.1.0-alpha.124 0 10/4/2026
0.1.0-alpha.123 0 10/4/2026
0.1.0-alpha.122 6 10/3/2026
0.1.0-alpha.121 62 10/2/2026
0.1.0-alpha.120 173 9/29/2026
0.1.0-alpha.119 156 9/29/2026
0.1.0-alpha.118 166 9/29/2026
0.1.0-alpha.117 170 9/27/2026
0.1.0-alpha.116 159 9/26/2026
0.1.0-alpha.115 194 9/26/2026
0.1.0-alpha.114 173 9/24/2026
0.1.0-alpha.113 171 9/24/2026
0.1.0-alpha.112 170 9/23/2026
0.1.0-alpha.111 172 9/23/2026
0.1.0-alpha.110 167 9/23/2026
0.1.0-alpha.109.1 164 9/23/2026
0.1.0-alpha.109 156 9/23/2026
0.1.0-alpha.108 179 9/21/2026
Loading failed