Hiperspace.Rocks 2.1.0

dotnet add package Hiperspace.Rocks --version 2.1.0                
NuGet\Install-Package Hiperspace.Rocks -Version 2.1.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="Hiperspace.Rocks" Version="2.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hiperspace.Rocks --version 2.1.0                
#r "nuget: Hiperspace.Rocks, 2.1.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.
// Install Hiperspace.Rocks as a Cake Addin
#addin nuget:?package=Hiperspace.Rocks&version=2.1.0

// Install Hiperspace.Rocks as a Cake Tool
#tool nuget:?package=Hiperspace.Rocks&version=2.1.0                

Hiperspace.Rocks

RocksDB is a remarkable technology, originally developed by Google (LevelDB) and optimized by Facebook for absolutely lowest possible latency writing to SSD devices. RocksDB used Log-structured-Merge (LSM) to stream updates while maintaining fast key access.
It is used both as a key/value database, and also as a driver for relational-databases, message-stores, blockchain and various analytical services. The use of LSM optimizes performance and life of SSD devices.

Hiperspace.Rocks uses RockDB to store elements in durable SSD memory

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.1.0 46 1/24/2025
2.0.0 38 1/14/2025
1.3.9 91 11/15/2024
1.3.0 102 10/5/2024
1.2.31 146 9/15/2024
1.2.28 110 9/7/2024
1.2.26 103 9/1/2024
1.2.8 111 7/15/2024
1.2.4 119 7/4/2024
1.2.0 115 5/30/2024
1.0.34 126 3/14/2024
1.0.28 128 2/26/2024
1.0.27 125 2/16/2024
1.0.24 165 1/11/2024
1.0.23 154 1/1/2024
1.0.1 153 11/18/2023

# Overview
     This release introduced introdues two changes, to enhance error reporting when binding an element that fails a horizon filter, the second add functionality to simplify schema evolution.  In addition to changes to Hiperspace, packages references have been upgraded to the latest versions.

     ## Horizon Filters

     Horizon filter provide a conditional view that divided a sybspace with elements that are viasible in the hiperspace, and thoswe that are not (*over the horizon*).  This is great for reading from hiperspace because it allows elements that are not valid in the current context (*e.g. changes that have not been approved*) or the user does not have access. The Horizon filters are also applied when binding an element to hiperspace, since you should not be able to add anthing that you could not see.

     Hiperspace horizon is contextual, to allow allow the same code to be used for initial seeding of data and logging errors for later analysis.  **This change** assists with validation by adding the option of an error message when the horizon is used for data validation.

     `new Horizon<Element_Type> ( "element only", element => element.Valid == true)' a horizon predicate with the element only
     `new Horizon<Element_Type> ( "element only", (element, read) => element.Valid == true || read)' a horizon predicate with a flag to indicate a read operation
     `new Horizon<Element_Type> ( "element only", (element, context, read) => element.Valid == true || read)' a horizon predicate with a context parameter and a flag to indicate a read operation
     `new Horizon<Element_Type> ( "element only",(element, context, user, read) => element.Valid == true || user?.IsInRole("BULK"))' a horizon predicate with a context parameter, user IPrinciple and a flag to indicate a read operation

     ## Auto-edit of #id alias in HiLang schema

     If a #id is not added to the definition of an {element, key, value, extent, index} an id is auto-allocated during the compilation of a **.hilang** file. It is best practice to add #id field to simplify the evolution of a schema since the internal #id can never be changed (*to a different data type*) or reused for a different purpose since it wil invalidate historic views of data.  This can be a problem when {element, key, value, extent, index} are dropped and the #id is then used for a later addition.  To simplify maintenance the directive `%ids;` has been added to optionally add the generated #id to the source file

     the source `entity Customer (Id : Int32) {Name :String} [SameName = Customer(Name = Name];` defines an entity *Customer* with a key *Id* and value *Name* and an index *SameName* that can be used to find Customers **or** to apply horizon validation 'Horizon<Customer>("Duplicate Name", (customer, read) => customer.SameName == null || read).

     When the `%ids;` directive is added, the the source is auto edited to `entity Customer #1 (Id : Int32 #1) {Name : String #2} [SameName = Customer(Name = Name) #2];` to indicate that Customer has #1 id and CustomerSameNameIndex has #2 (*stored items have unique #id, but SameName is not stored with customer, so does not need to be unique within the element*)

     If we decide to break *Name* into *First_Name* and *Family_Name* we'd change the entity to
     ```
     entity Customer #1 (Id : Int32 #1)
     {First_Name : String #3, Family_Name : String #4}
     [Name =  First_Name + " " + Family_Name, SameName #3 = Customer( Family_Name = Family_Name, First_Name = First_Name];
     ```
     Adding `%ids;` directive simplifies the process of avoiding clashes that will prevent the hiperspace being opened with updated code.

     ### DeltaIndex
     The `@DeltaIndex` property of an entity provides indexes access to elements that have changed since a date-time stamp.  The property has been updated to include the option to define the #id for the index by adding a parameter  `@DeltaIndex(4)`

     ### CubeFact
     The `@CubeFact` property of an element creates a fact element (the code `@CubeFact entity Account` adds an additional *Account_Fact* table to the hiperspace for stored historic aggregates of @CubeMeasure values).
     The property has been updated to incldue the #id of the fact table table  `@CubeFact(5)` indicates that the the fact table has #id of 5.

     `%ids;` is optional since #id's will be allocated (*during compilation*) for intermediate elements that will be pruned before generation resulting in gaps in the generated #id numbers