PostgresQuery 0.1.3
See the version list below for details.
dotnet add package PostgresQuery --version 0.1.3
NuGet\Install-Package PostgresQuery -Version 0.1.3
<PackageReference Include="PostgresQuery" Version="0.1.3" />
<PackageVersion Include="PostgresQuery" Version="0.1.3" />
<PackageReference Include="PostgresQuery" />
paket add PostgresQuery --version 0.1.3
#r "nuget: PostgresQuery, 0.1.3"
#:package PostgresQuery@0.1.3
#addin nuget:?package=PostgresQuery&version=0.1.3
#tool nuget:?package=PostgresQuery&version=0.1.3
PostgresQuery
Lightweight .NET wrapper around libpg_query.
Prebuilt native binaries for Linux, Windows, and macOS are included in the NuGet package.
Windows and macOS builds have not been tested, so be warned.
GitHub repository for the original parser: libpg_query
Install
dotnet add package PostgresQuery
Quick start
using PostgresQuery;
var ast = Parser.Parse("SELECT 1 AS value");
Console.WriteLine($"Postgres version: {ast.Version}");
var normalized = Parser.Normalize(" select 1 /* comment */ ");
var fingerprint = Parser.Fingerprint("select 1");
var statements = Parser.Split("select 1; select 2;");
Building and testing
The repository ships with a Docker-based build that produces the NuGet package and runs the consumer tests against it:
./run.sh # builds into ./out and runs PostgresQuery.Tests
PACKAGE_VERSION=0.1.0 ./run.sh # override package version
Generated protobuf bindings and NuGet package are produced inside the Docker build and emitted under out/.
License
PostgreSQL server source code, used under the PostgreSQL license. Portions Copyright (c) 1996-2023, The PostgreSQL Global Development Group Portions Copyright (c) 1994, The Regents of the University of California
The libpg_query library is licensed under the 3-clause BSD license. All other parts are licensed under the 3-clause BSD license, see LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Google.Protobuf (>= 3.25.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.