Sora.Data.Relational
0.4.0
dotnet add package Sora.Data.Relational --version 0.4.0
NuGet\Install-Package Sora.Data.Relational -Version 0.4.0
<PackageReference Include="Sora.Data.Relational" Version="0.4.0" />
<PackageVersion Include="Sora.Data.Relational" Version="0.4.0" />
<PackageReference Include="Sora.Data.Relational" />
paket add Sora.Data.Relational --version 0.4.0
#r "nuget: Sora.Data.Relational, 0.4.0"
#:package Sora.Data.Relational@0.4.0
#addin nuget:?package=Sora.Data.Relational&version=0.4.0
#tool nuget:?package=Sora.Data.Relational&version=0.4.0
Sora.Data.Relational
Adapter-agnostic relational schema + LINQ translator used by providers like Sora.Data.Sqlite and Sora.Data.SqlServer.
- Contracts:
IRelationalDialect,IRelationalSchemaModel,IRelationalSchemaSynchronizer - LINQ translator hooks:
ILinqSqlDialect,LinqWhereTranslator<TEntity>,RelationalCommandCache
Capabilities
- Build table/index models from entity annotations
- Add-only schema synchronization (create table/index)
- Minimal LINQ-to-SQL pushdown for simple predicates and projections
LINQ (minimal translator)
An intentionally small LINQ-to-SQL helper lives in Linq/:
ILinqSqlDialect: tiny hooks the translator needs (identifier quoting, LIKE escaping, parameter naming).LinqWhereTranslator<TEntity>: translates a restricted subset of predicate expressions to a WHERE clause and parameters.RelationalCommandCache: caches select lists per (entity, dialect) to avoid repeated string building.
Providers can implement ILinqSqlDialect (in addition to schema IRelationalDialect) to enable pushdown. Unsupported expressions should throw NotSupportedException; callers should fallback to in-memory filtering.
- Builder:
RelationalModelBuilder.FromEntity(typeof(TEntity))builds a table model from annotations - Synchronizer:
EnsureCreated(dialect, model, connection)emits CREATE TABLE + INDEX statements (add-only)
Notes:
- Provider-specific SQL grammar belongs in the provider (e.g.,
SqliteDialectinSora.Data.Sqlite). - Complex CLR types map to JSON-encoded TEXT columns; simple types map to native types.
References
- Data access reference:
~/reference/data-access.md - Decision DATA-0061:
~/decisions/DATA-0061-data-access-pagination-and-streaming.md
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
-
net9.0
- Sora.Data.Abstractions (>= 0.4.0)
- Sora.Data.Core (>= 0.4.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Sora.Data.Relational:
| Package | Downloads |
|---|---|
|
Sora.Data.Sqlite
SQLite provider for Sora relational data: lightweight local development and testing support. |
|
|
Sora.Data.SqlServer
SQL Server provider for Sora relational data with JSON-projection pushdowns, guardrails, and governance. |
|
|
Sora.Data.Postgres
PostgreSQL provider for Sora relational data: Dapper-based SQL integration with guardrails and governance. |
GitHub repositories
This package is not used by any popular GitHub repositories.
See release notes: https://github.com/sylin-labs/sora-framework/releases