LevelUp.Strategos.Ontology.Npgsql 4.0.0

dotnet add package LevelUp.Strategos.Ontology.Npgsql --version 4.0.0
                    
NuGet\Install-Package LevelUp.Strategos.Ontology.Npgsql -Version 4.0.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="LevelUp.Strategos.Ontology.Npgsql" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LevelUp.Strategos.Ontology.Npgsql" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="LevelUp.Strategos.Ontology.Npgsql" />
                    
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 LevelUp.Strategos.Ontology.Npgsql --version 4.0.0
                    
#r "nuget: LevelUp.Strategos.Ontology.Npgsql, 4.0.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.
#:package LevelUp.Strategos.Ontology.Npgsql@4.0.0
                    
#: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=LevelUp.Strategos.Ontology.Npgsql&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=LevelUp.Strategos.Ontology.Npgsql&version=4.0.0
                    
Install as a Cake Tool

Strategos.Ontology.Npgsql

A PostgreSQL object-set provider for Strategos.Ontology, backed by pgvector. It runs ontology queries and traversals as SQL.

The in-memory provider and this provider answer the same queries. Move from one to the other without a change to the query code.

Requirements

  • PostgreSQL 13 or later.
  • The vector extension, for similarity search.

Installation

dotnet add package LevelUp.Strategos.Ontology.Npgsql

Register the provider

services.AddPgVectorObjectSets(options =>
{
    options.ConnectionString = configuration.GetConnectionString("Ontology")!;
    options.Schema = "ontology";
    options.AutoCreateSchema = true;
    options.IndexType = PgVectorIndexType.Hnsw;
});

The call registers three services: the provider, IObjectSetProvider and IObjectSetWriter.

Options

Option Default Purpose
ConnectionString (none) The PostgreSQL connection string. Required.
Schema public The schema that holds the ontology tables
AutoCreateSchema false Creates the schema and the tables at start-up
IndexType IvfFlat The vector index type. Hnsw is the other value.
IterativeScan (none) Iterative-scan settings for a filtered similarity query

Set AutoCreateSchema in development only. In production, apply the schema through the migration process.

Generated identifiers

PostgreSQL truncates an identifier at 63 bytes. A long descriptor name or role name can therefore collide with another one, or can name a table that does not exist.

This provider sends every table name, endpoint column and index name through one truncate-and-hash function. The data-definition statements and the data-manipulation statements therefore derive the same identifier from the same logical name. A name within the limit is unchanged.

  • LevelUp.Strategos.Ontology — the descriptor model and the query surface.
  • LevelUp.Strategos.Ontology.Embeddings — an embedding provider for similarity search.

Scoped ontology actions

Register PostgresScopedOntologyActionDispatcher as IScopedOntologyActionDispatcher for a PostgreSQL-backed scoped action host. Bind IPostgresScopedOntologyActionBinder to the application's domain store and provide the data source that owns the target and grant records. The binder uses the supplied transaction to verify the exact tenant, actor, grant, action and target. Hold the grant lock and the target write lock until the transaction ends. Return the existing ontology action pipeline with its facts, relation reads and writes bound to that transaction. The dispatcher reuses the authenticated actor identity, intersects its claims with current grants, and commits after the action succeeds. A denied or failed action rolls back.

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

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
4.0.0 35 12/5/2026
3.0.0 1,156 9/11/2026
3.0.0-rc.1 100 9/10/2026
2.10.0 159 8/7/2026
2.9.1 1,467 6/23/2026
2.9.0 228 6/19/2026
2.8.0 429 5/25/2026
2.7.0 170 5/24/2026
2.6.0 140 5/17/2026
2.5.0 146 5/16/2026
2.4.2 147 4/13/2026
2.4.1 268 4/10/2026
2.4.0 152 4/7/2026
2.3.0 164 4/5/2026
2.2.1 195 3/15/2026
2.2.0 196 3/3/2026