How to use GORM to interact with your SQL databases in Golang | #feurious
Donald Feury
š 1-on-1 Mentoring - https://bit.ly/2OQLkmH ā Become a Supporter - https://www.subscribestar.com/donaldfeury š„ My Gear - https://kit.co/dfeury
š„ Example Code - https://gitlab.com/dak425/golang-gorm-example
Want to create and interact with a SQL database schema but don't feel like writing SQL? Time to whip out GORM. GORM is a Code-First ORM that allows you to define your database tables, columns, and indexes using Go code. In addition, you can interact with said schema using the methods provided by the package, instead of writing raw SQL. (you still can if you need to)
Scripts Repository - https://gitlab.com/dak425/scripts Dotfiles Repository - https://gitlab.com/dak425/dotfiles
Support the Channel
Paypal - https://paypal.me/feurious
StreamElements - https://streamelements.com/donaldfeury/tip
Zelle - feurious@protonmail.com
Amazon - https://amzn.to/3b8IMZH
BTC - 1Q7PmpYhFHTdHVpgKt4s5iUiv25sdUCbCa
LTC - LKRQNuHRjouh546tfDTL53RZgZYywVqnad
ETH - 0x558e01f1cec4f55f52dC7A7435Ca6C9B36d9f01e
Video Platforms
YouTube - https://youtube.com/DonaldFeury
LBRY - https://lbry.tv/@dfeury:5
Bittube - https://bittube.tv/profile/dfeury
Bitchute - https://www.bitchute.com/channel/dfeury/
Social Links
Email - feurious@protonmail.com
Twitter - https://twitter.com/FeuryDonald
Discord - https://discord.gg/86gqHY5
Dev.to - https://dev.to/dak425
Medium - https://medium.com/@highlordazurai425
Timestamps: 00:00 - Overview 01:16 - Using structs to define tables 05:31 - Migrations 07:24 - Seeding the database 08:08 - Find first result 10:01 - Connect to database 11:05 - Verbose logging 11:59 - Get all users 12:28 - Get all messages made by user 13:59 - Review generated queries 21:16 - Error handling 22:32 - Review ... https://www.youtube.com/watch?v=9koLNdEcSR0
208228399 Bytes