Categorygithub.com/n-r-w/pgh/v2
package
2.1.3
Repository: https://github.com/n-r-w/pgh.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

PGH

A Go package that provides helper functions to combine the power of:

Go Reference CI Status Go Report Card

Purpose and Core Functionality

The PGH project is a Go package that provides helper functions to combine the power of several libraries:

  • Squirrel: SQL builder
  • pgx: PGX PostgreSQL driver
  • database/sql: Golang SQL package
  • scany: Scanning query results into Golang structs

Requirements

  • Go 1.23 or higher

Key Features and Capabilities

  • Helper functions for building SQL queries using Squirrel
  • Functions for executing SQL queries and handling results using pgx
  • Support for various query types, including modification queries, select queries, and batch queries
  • Options for adding conditions, sorting, searching, and pagination to queries
  • PostgreSQL error handling with specific error code support

Additional Functionality

Getting Started

# general functionality
go get github.com/n-r-w/pgh/v2
# pgx + squirrel + scany
go get github.com/n-r-w/pgh/v2/px
# database/sql + squirrel + scany
go get github.com/n-r-w/pgh/v2/pq

Usage Examples