SQL with golang tutorial what you actuly need to know

Опубликовано: 16 Сентябрь 2026
на канале: Andrew Dear
69
2

Starting point repo: https://github.com/andrewdear/golang-...
In this tutorial, you’ll learn what you actually need to know to use SQL in Go—without getting lost in unnecessary complexity.
We’ll focus on real-world usage of Go’s database tools, covering how to run sql migrations, connect to a database, run queries, use external files and handle results

What you will learn:
SQL Migrations with goose
Connecting to SQL (postgres)
Keeping the connection alive for long running applications
Using SQLX to use struts and maps with your database
Using the default sql library
Using external sql files in queries
Using variables to interact with the database
Using context to add timeouts

This video is perfect for beginners who want a no-nonsense introduction, as well as developers who feel overwhelmed by ORMs and want to understand the fundamentals.

Timestamps:
0:00 Intro
1:55 Setup repo
3:57 database migrations
9:23 go setup
11:05 connect to sql in go
15:07 Insert with structs
17:54 Insert with maps
19:56 Select many into struct
22:31 Get one into struct
24:03 Using external sql files
28:44 retrieving data into variables
30:10 delete from table
32:33 Update with context and outro


#golang #sql #programming #backend #webdevelopment #sqlx #dataengineering #softwareengineering