filmov
tv
Learning Golang: Relational Databases using MySQL

Показать описание
In this episode I cover how to interact with using MySQL in Go/Golang, this is via the "database/sql" package in the standard library.
In the previous I introduced "database/sql" but I used "pgx", a driver for PostgreSQL, in this case we are going to be using "go-sql-driver/mysql" and call out the differences compared to the PostgreSQL package.
Practically the biggest three differences are:
* Placeholders are defined by the character "?" instead of sequential dollar values
* "mysql.Config" should be used for creating a valid DSN value instead of url.URL
* "go-sql-driver/mysql" does not provide a MySQL-only API, so we have to use "database/sql" instead.
== Relevant links
== All Go/Golang Playlists
== Socials
00:00 - Start
00:25 - Introduction to go-sql-driver/mysql for Go/Golang
00:41 - Importing go-sql-driver/mysql and using it with Docker
03:48 - Using go-sql-driver/mysql
10:44 - Conclusion
=== Who am I?
Hello👋🏼! I'm Mario, a Hands-on Software Architect and Lead Backend Engineer with more than 16 years of professional experience building all kinds of software including on-premise Industrial Automation Systems, Linux Accessibility Desktop and Browser Components as well as Distributed Advertising Microservices.
Every week I will share with you different topics I've learned while working for small startups and large companies including the processes I've followed over the years for successfully delivering complex enterprise systems from start to end.
Subscribe if you like Software Development, Software Architecture and Systems Design!
Keep it up. Don't give up!
#golang #tutorial #mysql
=== Our Vlog Channel
=== Our affiliate links below
DISCLAIMER: Some of the links shared in the description are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost to you. I appreciate your support! 💖
In the previous I introduced "database/sql" but I used "pgx", a driver for PostgreSQL, in this case we are going to be using "go-sql-driver/mysql" and call out the differences compared to the PostgreSQL package.
Practically the biggest three differences are:
* Placeholders are defined by the character "?" instead of sequential dollar values
* "mysql.Config" should be used for creating a valid DSN value instead of url.URL
* "go-sql-driver/mysql" does not provide a MySQL-only API, so we have to use "database/sql" instead.
== Relevant links
== All Go/Golang Playlists
== Socials
00:00 - Start
00:25 - Introduction to go-sql-driver/mysql for Go/Golang
00:41 - Importing go-sql-driver/mysql and using it with Docker
03:48 - Using go-sql-driver/mysql
10:44 - Conclusion
=== Who am I?
Hello👋🏼! I'm Mario, a Hands-on Software Architect and Lead Backend Engineer with more than 16 years of professional experience building all kinds of software including on-premise Industrial Automation Systems, Linux Accessibility Desktop and Browser Components as well as Distributed Advertising Microservices.
Every week I will share with you different topics I've learned while working for small startups and large companies including the processes I've followed over the years for successfully delivering complex enterprise systems from start to end.
Subscribe if you like Software Development, Software Architecture and Systems Design!
Keep it up. Don't give up!
#golang #tutorial #mysql
=== Our Vlog Channel
=== Our affiliate links below
DISCLAIMER: Some of the links shared in the description are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost to you. I appreciate your support! 💖
Комментарии