Celly.Json.Query 1.2.0

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

Celly.Json.Query

Zero-dependency CEL-to-database query translator for Celly.Json: compiles Google Common Expression Language (CEL) predicates into parameterized SQL, MongoDB filters, or strongly-typed EF Core / LINQ expression trees — with no database driver or ORM dependencies.

Install

dotnet add package Celly.Json.Query

Quick Start

Entity Framework Core & LINQ (IQueryable<T>.WhereCel)

using Celly.Json.Query;

// Works with EF Core relational tables, OwnsOne(...).ToJson() owned JSON columns,
// Cosmos/Mongo LINQ providers, and LINQ-to-Objects.
var highValueOrders = await db.Orders
    .WhereCel("order.total >= 100 && order.status == 'paid' && order.items.exists(i, i.qty > 1)", stripRootVariable: "order")
    .ToListAsync();

Parameterized SQL Dialects (PostgreSQL JSONB, Cosmos DB, SQL Server, SQLite)

using Celly.Json.Query;

// PostgreSQL jsonb
CelSqlQuery pg = CelSqlQueryTranslator.Translate(
    "user.age >= 18 && 'admin' in user.roles",
    CelQueryDialects.PostgresJsonb,
    rootSource: "doc");

// Azure Cosmos DB NoSQL
CelSqlQuery cosmos = CelSqlQueryTranslator.Translate(
    "user.age >= 18 && items.exists(i, i.price >= 50)",
    CelQueryDialects.Cosmos,
    rootSource: "c");

// SQL Server JSON (JSON_VALUE / OPENJSON) & SQLite JSON (json_extract / json_each)
CelSqlQuery sqlServer = CelSqlQueryTranslator.Translate("user.active == true", CelQueryDialects.SqlServer, rootSource: "doc");
CelSqlQuery sqlite = CelSqlQueryTranslator.Translate("user.active == true", CelQueryDialects.Sqlite, rootSource: "doc");

MongoDB Filter JSON

using Celly.Json.Query;

string mongoFilter = MongoFilterTranslator.Translate(
    "user.age >= 18 && 'admin' in user.roles && items.exists(i, i.price >= 50)");

Documentation

License

Licensed under the MIT License.

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.  net11.0 is compatible. 
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
1.7.2 36 12/2/2026
1.7.1 44 12/2/2026
1.7.0 74 12/1/2026
1.6.0 82 12/1/2026
1.5.1 91 11/30/2026
1.5.0 91 11/30/2026
1.4.0 80 11/30/2026
1.3.0 100 11/30/2026
1.2.0 94 11/29/2026
1.1.1 93 11/29/2026
1.1.0 95 11/29/2026
1.0.1 87 11/29/2026
1.0.0 94 11/29/2026