Example of how to use generics for querying SQL db in golang Start the db docker-compose up -d go run main.go See the output. Check the selectAllV3 function and the BindDb method of Notes