Categorygithub.com/nstogner/sqln
modulepackage
0.0.0-20191003134330-04386373fcc3
Repository: https://github.com/nstogner/sqln.git
Documentation: pkg.go.dev

# README

sqln

This package wraps sqlx and manages a map of named statements.

See test file for example usage.

Testing

# Create a docker container to run tests against.
docker run --name sqln-test-postgres -d -p 5432:5432 postgres

go test .

# Functions

New wraps a sqlx database.

# Structs

Database wraps a sqlx.DB and manages NamedStmt's.

# Interfaces

DB is an interface to allow for the Transact method to return a non-concrete type which is useful when wrapping this implementation.