Lyo.Query.Sql 3.0.0

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

Lyo.Query.Sql

Walks a QueryConcreteReq, ProjectionQueryReq, or QueryReq and returns command text plus positional parameters. Column names come from a caller-supplied SqlColumnMap, not from an EF model. The translator does not open a connection.

String compares use lower(). Contains / StartsWith / EndsWith become LIKE with bound, escaped patterns. Fuzzy prints similarity() and does not require pg_trgm to be installed at translate time. Regex, collection paths, sub-clauses, computed fields, includes, and keys throw SqlTranslationException.

Targets net10.0. Depends on Lyo.Query.Models.

Features

  • Concrete. SELECT of every mapped column, plus WHERE, ORDER BY, OFFSET, and LIMIT.
  • Projection. Listed scalar columns. Aggregates become COUNT, SUM, AVG, MIN, MAX, or COUNT(DISTINCT), with GROUP BY when Select is the group key.
  • Root. FROM alias, INNER / LEFT / RIGHT / FULL OUTER joins, and alias.property paths.
  • Parameters. Values stay in $1, $2, … and are never interpolated.

Examples

Translate a concrete filter

var map = new SqlColumnMap("people", "person", new Dictionary<string, string> { ["Status"] = "status" });
var request = new QueryConcreteReq { WhereClause = new ConditionClause("Status", ComparisonOperatorEnum.Equals, "Active") };
var sql = new SqlQueryTranslator().Translate(request, map);
// SELECT "status" FROM "people"."person" WHERE lower("status") = lower($1)

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.Exceptions (direct, lyo)
  • Lyo.Query.Models (direct, lyo)
  • Lyo.Common.Core (transitive, lyo)
  • Lyo.Common.Metadata (transitive, lyo)
  • Lyo.Json (transitive, lyo)
  • Lyo.Parameters (transitive, lyo)
  • Microsoft.Bcl.AsyncInterfaces 10.0.5 (transitive, microsoft, netstandard2.0)
  • System.Memory 4.6.3 (transitive, microsoft, netstandard2.0)
  • System.Text.Encoding.CodePages 10.0.5 (transitive, microsoft)
  • System.Text.Json 10.0.5 (transitive, microsoft, netstandard2.0)
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 (1)

Showing the top 1 NuGet packages that depend on Lyo.Query.Sql:

Package Downloads
Lyo.Api

Core API library for building RESTful APIs with Entity Framework Core, caching, and mapping support.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 541 10/23/2026