pgx

command
v0.0.0-...-78dbd8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Build and run some queries using the goqu library. GOQU combines both a SQL Builder with a struct scanner. Because of this, the boilerplate code is cut to an absolute minimum. Some disadvantages:

  • GOQU does its own interpolation. This is arguably a security concern, as I would much rather trust Postgres to correctly interpolate parameters.
  • A very minor disadvantage is that it doesn't use postgres' =ANY($1) format for IN queries using a slice, and instead enumerates all values in the slice.
  • The struct scanning only works if you pass the database/sql package's DB object in, which means it only works with database/sql and does not work with PGX. You could choose to only use the builder, and use a different scanning library, if you wanted PGX.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL