Hiperspace 2.5.18

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Hiperspace --version 2.5.18
                    
NuGet\Install-Package Hiperspace -Version 2.5.18
                    
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="Hiperspace" Version="2.5.18" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hiperspace" Version="2.5.18" />
                    
Directory.Packages.props
<PackageReference Include="Hiperspace" />
                    
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 Hiperspace --version 2.5.18
                    
#r "nuget: Hiperspace, 2.5.18"
                    
#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 Hiperspace@2.5.18
                    
#: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=Hiperspace&version=2.5.18
                    
Install as a Cake Addin
#tool nuget:?package=Hiperspace&version=2.5.18
                    
Install as a Cake Tool

Hiperspace

Hiperspace is an Object technology that uses a key-addressable store to expand an application data-model beyond the limits of memory that can be directly referenced in main memory.

Elements are not duplicated or changing to match database shapes.
Elements are serialized directly using Protocol Buffers to and from key/value structure for storage in memory stores including CXL expanded and pooled memory, shared cache , local SSD or key-value durable databases.
Elements that are not currently being used are released from main memory, and transparently (and quickly) reloaded when referenced. Memory stores allows petabytes of data to be addressed.

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 is compatible.  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 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 (3)

Showing the top 3 NuGet packages that depend on Hiperspace:

Package Downloads
Hiperspace.Rocks

HiperSpace RocksDB adaptor

Hiperspace.Heap

Hiperspace heap store for session, edge and testing purposes

Hiperspace.SQL

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.32 31 1/30/2026
2.5.29 133 1/17/2026
2.5.28 210 12/31/2025
2.5.26 1,292 12/21/2025
2.5.21 3,460 12/10/2025
2.5.18 5,490 12/3/2025
2.5.13 5,010 11/24/2025
2.5.8 4,989 11/15/2025
2.5.2 5,024 11/6/2025
2.5.1 4,971 10/23/2025
2.5.0 5,013 10/20/2025
2.4.6 5,025 9/23/2025
2.4.4 5,078 8/7/2025
2.4.2 4,964 7/28/2025
2.4.0 5,015 7/10/2025
2.3.8 5,019 7/1/2025
2.3.7 5,006 6/18/2025
2.3.3 5,026 6/5/2025
2.2.2 5,035 5/5/2025
2.2.1 5,100 4/14/2025
2.2.0 4,961 3/29/2025
2.1.3 5,106 3/5/2025
2.1.1 5,000 2/15/2025
2.1.0 4,975 1/24/2025
2.0.0 4,945 1/14/2025
1.3.9 4,986 11/15/2024
1.3.3 4,962 11/1/2024
1.3.1 5,030 10/18/2024
1.3.0 5,016 10/5/2024
1.2.31 5,030 9/15/2024
1.2.26 4,999 9/1/2024
1.2.18 4,948 8/6/2024
1.2.12 4,946 7/26/2024
1.2.9 4,991 7/19/2024
1.2.8 4,999 7/15/2024
1.2.4 5,023 7/4/2024
1.2.0 5,028 5/30/2024
1.0.46 4,955 5/11/2024
1.0.40 4,978 4/22/2024
1.0.34 5,032 3/14/2024
1.0.28 5,051 2/26/2024
1.0.27 5,017 2/16/2024
1.0.24 5,071 1/11/2024
1.0.23 5,063 1/1/2024
1.0.1 5,034 11/18/2023

https://www.cepheis.com/hiperspace/20251303
## Overview
This release adds `NotFoundException` to distinguish *not found* from *cannot be found* conditions. and extends the functionality of `@AlternateIndex` to support multiple alternate indexes on *segments* and *aspects* that are referenced by multiple *entities*.

-----

### Not Found

Prior to this release `Get(...)` calls did not distinguish between *Not Found* and *not found because of IO error*.  To improve the handling of missing values several changes have been made:
* Additional Exception class `NotFoundException`
* `KeyRef<>` (*reference to another element*) changed to return `null` when a value cannot be found
* `RefSingle<>` (*reference to an aspect*) changed to return `null` when a value cannot be found

-----

### AlternateIndex
Alternate indexes are created automatically whenever there is a path from an *element* from another *element*, but can be added to support access from a view.  The prime example is `Edge` which is defined (*in the Hilang prelude*) as
```
"edge between nodes"
view Edge
( /* keys */
   From        : Node,
   To          : Node,
   TypeName    : String
)
{ /* values */
   Name        : String
};
```
`@AlternateIndex` enables an *element* to index the *key/value* that corresponds to the `From` key member for indexed access from a `Node.Froms` extension property

For the model
```
entity CostCentre (Id : Int32) [Costs : Cost (CostCentre = this)];
aspect Cost {CostCentre : CostCentre, Amount : Decimal};
```
with
```
entity Asset (...) {...} [Cost : Cost];
entity Project (...) {...} [Cost : Cost];
```
Concreate elements `AssetCost` and `ProjectCost` will be created indexes
`AssetCostCostCentre.Index` and `ProjectCostCostCentre.Index`

Source edit will  change the source to  
```
entity CostCentre (Id : Int32) [Costs : Cost (CostCentre = this)];
aspect Cost
{
 @AlternateIndex("AssetCost", 42)
 ,AlternateIndex("ProjectCost", 43)
 CostCentre : CostCentre, Amount : Decimal};
```
To ensure the index Id is not used for something else resultuing in an incompatible model and store.

***how does CostCentre know what (Asset/Project/ etc) the Cost is for?***
The `aspect Cost` is transformed to a `view` that is equvilent to
```
view Cost (owner : Any) {CostCentre : CostCentre, Amount : Decimal};
```
the (*C#*) hiperspace query
```
from centre in space.CostCentres
select centre.Id, (from line in centre.Costs
                   let asset = line.owner.Is<Asset>() ? Amount : 0
                   let project = line.owner.Is<Project>() ? Amount : 0
                   group line by line.CostCentre into totals
                   select new { Projects = totals.Sum(v => v.asset),
                                Assets = totals.Sum(v => v.project)})
```
Will return the total costs by type for each CostCentre

#### Inherited Index
This model defines an overall *trade* type with three different implementations for {*FI, EQ, FX*}  that have different properties for the different asset-classes.   *Trade* is referenced by *Book*,  the extension property *`Book.Trades`* returns a collection of *Trade* has a *`Book`* equal to the current *Book*.  For efficient access, and index is created for the *`Trade.Book`* that is inherited by each implementation.

The syntax `Banking.FI.Trade : Banking.Trade = Banking.Trade()` means `Banking.FI.Trade`:
* Inherits *keys / values / extensions / properties* from `Banking.Trade` (via **`:`**)
* Can be viewed as a `Banking.Trade` (via **`=`**)

```
view Banking.Trade (Id : String)
{Book : Banking.Book};
entity Banking.FI.Trade : Banking.Trade = Banking.Trade();
entity Banking.FX.Trade : Banking.Trade = Banking.Trade();
entity Banking.EQ.Trade : Banking.Trade = Banking.Trade();
entity Banking.Book (Id : String) [Trades : Banking.Trade (Book = this)];
```

Adding `%ids` to the model, with result in a source edit to a `#` id to each *element*, *key/value* and extension property, and `@AlternateIndex` property for each generated concrete index.
```
view Banking.Trade #45 (Id : String)
{@AlternateIndex("Banking.EQ.Trade", 52)
,AlternateIndex("Banking.FI.Trade", 48)
,AlternateIndex("Banking.FX.Trade", 50)
Book : Banking.Book};
entity Banking.FI.Trade : Banking.Trade = Banking.Trade() #49;
entity Banking.FX.Trade : Banking.Trade = Banking.Trade() #51;
entity Banking.EQ.Trade : Banking.Trade = Banking.Trade() #53;
entity Banking.Book #47 (Id : String #1) [Trades : Banking.Trade (Book = this) #54];
```
subsequent compilation of the model will result in the indexes using the same *Id* value when stored.  
**NB** the `#id` can be of any value, but can never to reused for a different purpose once used with a *Hiperspace*.

-----

### Source Editing
When the directive `%ids` is added to a hilang model, the source code is edited to add `#id` values to ensure that the schema can be evolved without the risk of introducing incompatible changes.

***know issue***: Source editing lacks the context of other edits to a line of `hilang` source `@AlternateIndex("Banking.EQ.Trade", 52) @AlternateIndex("Banking.FI.Trade", 48) Book : Banking.Book` will create a syntax error the next time the *schema* is compiled because `@` is the prefix for a comma-separated list of one-or-more attributes.  The code needs to be edited to change subsequent `@` to `,`