SQLC in Go - Auto-Generating Database Code in Golang

Описание к видео SQLC in Go - Auto-Generating Database Code in Golang

Playlist ▶️:    • Go Programming  

In this video, we'll look at the SQLC package for auto-generating Go code, based on SQL queries that we define in our application codebase.

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:31 SQLC Overview
02:56 SQLC with PostgreSQL
03:41 Adding sqlc.yaml configuration file
05:11 Adding schema.sql file to define database schema
06:06 Adding query.sql file to define SQL queries
09:50 Generating Go code with sqlc generate
13:32 Creating PostgreSQL database
15:21 Querying database with generated Go code
22:52 Generating code with SQLC to add new records to a table
26:51 Generating code with SQLC to delete record from table
28:41 Generating code with SQLC for basic aggregation

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io
🐦 Twitter:   / bugbytesio  

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
SQLC: https://sqlc.dev/
SQL with PostgreSQL: https://docs.sqlc.dev/en/latest/tutor...
pq driver: https://github.com/lib/pq
Go database/sql package: https://pkg.go.dev/database/sql

#golang #webdevelopment #database #sql

Комментарии

Информация по комментариям в разработке