Craticula.Mongo
1.3.0
dotnet add package Craticula.Mongo --version 1.3.0
NuGet\Install-Package Craticula.Mongo -Version 1.3.0
<PackageReference Include="Craticula.Mongo" Version="1.3.0" />
<PackageVersion Include="Craticula.Mongo" Version="1.3.0" />
<PackageReference Include="Craticula.Mongo" />
paket add Craticula.Mongo --version 1.3.0
#r "nuget: Craticula.Mongo, 1.3.0"
#:package Craticula.Mongo@1.3.0
#addin nuget:?package=Craticula.Mongo&version=1.3.0
#tool nuget:?package=Craticula.Mongo&version=1.3.0
Craticula.Mongo
The MongoDB compiler of Craticula. It turns the canonical IR into a MongoDB aggregation pipeline, written as Extended
JSON with System.Text.Json. It has no MongoDB driver dependency and never opens a connection (use
Craticula.MongoDB.Driver to run it).
Install
dotnet add package Craticula.Mongo
Example
using Craticula.Core.Ir;
using Craticula.Core.Schema;
using Craticula.Mongo;
public static class Example
{
public static MongoQuery Compile(GridSchema schema, FilterNode? filter, IReadOnlyList<SortItem>? sort, PageSpec page)
{
MongoQuery query = MongoPipelineBuilder.Build(
new MongoQueryRequest { Schema = schema, Filter = filter, Sort = sort, Page = page });
// query.Collection names the collection, query.Pipeline holds the stages.
return query;
}
}
Counting rows
MongoPipelineBuilder.BuildCount returns the page pipeline without its sort, row window and projection stages, ending in a $count stage. MongoDB sends no document when nothing matches, so read a missing result as 0. A grouped level counts its groups. Pass GridFilterPipeline.Process a NonePage for a count.
Compatibility
Implements Craticula spec version 0.3.0 (the language-neutral semantics and conformance fixtures in the
repository, spec/). Targets .NET 10.
License
Apache-2.0. Source and issues: https://github.com/pluries/craticula.
| Product | Versions 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. |
-
net10.0
- Craticula.Core (>= 1.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Craticula.Mongo:
| Package | Downloads |
|---|---|
|
Craticula.MongoDB.Driver
Craticula execution adapter for the official MongoDB .NET driver: compiles the IR to an aggregation pipeline and runs it. |
GitHub repositories
This package is not used by any popular GitHub repositories.