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
                    
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="Janzen.Pagination.PostgreSql" Version="10.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Janzen.Pagination.PostgreSql" Version="10.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Janzen.Pagination.PostgreSql" />
                    
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 Janzen.Pagination.PostgreSql --version 10.1.0
                    
#r "nuget: Janzen.Pagination.PostgreSql, 10.1.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 Janzen.Pagination.PostgreSql@10.1.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=Janzen.Pagination.PostgreSql&version=10.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Janzen.Pagination.PostgreSql&version=10.1.0
                    
Install as a Cake Tool

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 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.