Janzen.Pagination.PostgreSql
10.1.0
Prefix Reserved
dotnet add package Janzen.Pagination.PostgreSql --version 10.1.0
NuGet\Install-Package Janzen.Pagination.PostgreSql -Version 10.1.0
<PackageReference Include="Janzen.Pagination.PostgreSql" Version="10.1.0" />
<PackageVersion Include="Janzen.Pagination.PostgreSql" Version="10.1.0" />
<PackageReference Include="Janzen.Pagination.PostgreSql" />
paket add Janzen.Pagination.PostgreSql --version 10.1.0
#r "nuget: Janzen.Pagination.PostgreSql, 10.1.0"
#:package Janzen.Pagination.PostgreSql@10.1.0
#addin nuget:?package=Janzen.Pagination.PostgreSql&version=10.1.0
#tool nuget:?package=Janzen.Pagination.PostgreSql&version=10.1.0
Janzen.Pagination.PostgreSql
PostgreSQL provider for Janzen.Pagination —
case-insensitive search via PostgreSQL's native ILIKE operator.
Without a provider package the engine falls back to a portable LIKE, whose case-sensitivity is
whatever the engine underneath it does — and on PostgreSQL that is case-sensitive, with no
column collation that changes it before 18.6. This package registers a strategy that emits true
ILIKE, giving correct case-insensitive search on PostgreSQL on every supported major.
Install
dotnet add package Janzen.Pagination.PostgreSql
Requires Janzen.Pagination.EntityFrameworkCore
(referenced transitively).
Usage
Register once at startup. It makes every PaginateConfig emit native ILIKE in place of the portable
LIKE — there is no per-resource configuration:
// Program.cs
builder.Services.AddPagination(pagination => pagination
.AddAspNetCore() // optional: ASP.NET Core integration
.UsePostgreSql()); // emit native ILIKE for case-insensitive search / pattern filtering
Your PaginateConfig<T> definitions stay provider-agnostic:
PaginateConfig<Product>.Create(b => b
.WithLimits(25, 100)
.Sortable("name", p => p.Name)
.Searchable("name", p => p.Name)
.WithTieBreaker(p => p.Id));
What it changes
Three things emit a pattern match: free-text search, the $ilike and $sw filter
operators, and
$contains on a string field. This package makes all of them use ILIKE instead of
LIKE. Both forms pass an
explicit ESCAPE '\', and the engine escapes \, %, _ and [ in the user's value, so a search for 100%
matches that literal text.
It also nudges the generated OpenAPI examples: a filterable string field that allows ILike gets $ilike:…
as its example operator.
Documentation
Debugging
The package ships embedded PDBs with Source Link, so a debugger steps straight into these sources at the exact commit the version was built from. Nothing to configure: no symbol server, no separate symbol download, and it works offline.
License
MIT © Lubos Jansky
| 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
- Janzen.Pagination.EntityFrameworkCore (>= 10.1.0)
- Microsoft.EntityFrameworkCore (>= 10.0.12)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.