Articles with the tag "SQL"

What is SQL injection and how do I avoid it in Go?

SQL injection is a method used by hackers to attempt to trick your code into running arbitrary (read - REALLY BAD) queries on your database.

Querying for multiple records with Go's sql package

Learn how to query for multiple records using Go's database/sql package by querying for several users in a users table.

Querying for a single record using Go's database/sql package

In this article we cover how to query for a single record using Go's database/sql package, including handling the ErrNoRows error.

Updating and deleting PostgreSQL records using Go's sql package

Learn how to update and delete records with the database/sql package in Go. We also cover how to verify how many records were altered and return data from those rows.

Inserting records into a PostgreSQL database with Go's database/sql package

Learn to insert new records into a Postgres database using Go's database/sql package, along with how to get the resulting ID of newly created records.

Connecting to a PostgreSQL database with Go's database/sql package

This tutorial explains how to connect to a Postgres DB using the database/sql and lib/pq packages. It also covers potential errors and solutions.

Avatar of Jon Calhoun
Articles and Tutorials by
Jon Calhoun

Jon Calhoun is a full stack web developer who teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.

Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.

Recent Articles All Articles Mini-Series Progress Updates Tags About Me Go Courses

©2024 Jonathan Calhoun. All rights reserved.