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.
Click to show internal directories.
Click to hide internal directories.