God I am loving this language, all tutorials i am finding are literally how I would want to to write my application. Connect to DB with 2 lines of code and create a table with raw SQL directly from your code! Yes please!!! 😍😍😍
Thanks for making this tutorial. I'm a beginner with Go and making a backend app; this video was precisely what I needed, presented clearly and concisely.
Love your Go content, i went the mysql workbench route but still saw this vid regardless and understood from you what i didnt from my other YT mentor, def need more Go+DB/HTMX+Go tutorials/vids
Please make a video showing how to use this sql database with an htmx app in golang too :) Also, I love that you don't have to deal with an ORM. The simple SQL query string is so refreshing!
Thanks for this great video. I have just one remark. When setting up a connection, do not call _defer db.Close()_ , before you check the error of _sql.Open_ . If there is an error, _nil_ is returned and calling _Close_ leads to a panic.
pretty cool! I'm getting into the Go trend it the language is cool and all. I'm eagle to learn it! but why is it most viral now than ever? Its been out.
Is it important not to initialize the db variable as global. Cz I tried to declare db as global so that I don't need to pass. But if I do that I get runtime error like below: runtime error: invalid memory address or nil pointer dereference Any reason for this?
For anyone getting this Error: "pq: SSL is not enabled on the server" It seems that now sql.Open("postgres", connStr) does NOT support URL-based credentials. It wants a DSN (Data Source Name) format. Here is an example: connStr := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=disable", host, port, username, password, database) db, err := sql.Open("postgres", connStr).
ok many people says that using gorm could give you performance problems in future. others says that using this sql package is really insecure. how can we prevent sql injection with database/sql ?
You have the art of inspiring self-confidence in every programming langage I've seen on this channel. Incredible ! Thank you for all Master.
Thanks a lot for that, really nice comment mate - cheers!
God I am loving this language, all tutorials i am finding are literally how I would want to to write my application.
Connect to DB with 2 lines of code and create a table with raw SQL directly from your code! Yes please!!! 😍😍😍
Thanks for making this tutorial. I'm a beginner with Go and making a backend app; this video was precisely what I needed, presented clearly and concisely.
Thank for this great content, next time please cover DB migrations, and ORMs.
Thank you so much for your efforts.
Thank you - will do, thanks a lot for the suggestion + the comment!
This is such a great tutorial, thank you!
Thanks a lot!
Love your Go content, i went the mysql workbench route but still saw this vid regardless and understood from you what i didnt from my other YT mentor, def need more Go+DB/HTMX+Go tutorials/vids
Thanks a lot - I've got more planned soon! Thanks for watching!
hi!! Thank you very much... you have such a great content which helped me!!!
Awesome to hear, thank you for commenting!
Please make a video showing how to use this sql database with an htmx app in golang too :)
Also, I love that you don't have to deal with an ORM. The simple SQL query string is so refreshing!
Thanks - that's the plan, it should be released next month! Thanks for the feedback and for watching :)
@@bugbytes3923 Thanks for the video!
Wouldve been cool to see you connect the db to a http server as well but this was very informative, thank you!
Excellent video. Everything simply explained. Thank you for these quality videos. :)
Thanks a lot, appreciate it!
Always great content. Thanks for the gist.
You are welcome, thanks as always for watching!
Thank you for your great content!!
Thanks a lot for commenting and glad you like the content!
Love this content.... Thanks for sharing.
Thanks a lot!
I wish you have golang course on Udemy :) You have very clear explanation :) thx for the video .)
In the near future perhaps ;) Thanks!
spasibo!very accessible
Thanks a lot!
Thank you very much!
No worries thanks for commenting!
Thank! Very informative video
Thanks a lot!
Great content, Thank you very much.
Can you please make a video about using database/sql with relationships and transactions.
Thanks a lot! Great idea, will do!
Please more go content
Thanks for this great video. I have just one remark.
When setting up a connection, do not call _defer db.Close()_ , before you check the error of _sql.Open_ . If there is an error, _nil_ is returned and calling _Close_ leads to a panic.
Ah - thank you for pointing that out!
pretty cool! I'm getting into the Go trend it the language is cool and all. I'm eagle to learn it! but why is it most viral now than ever? Its been out.
Is it important not to initialize the db variable as global. Cz I tried to declare db as global so that I don't need to pass. But if I do that I get runtime error like below:
runtime error: invalid memory address or nil pointer dereference
Any reason for this?
can you please make a full example crud application with golang ,maybe with Fiber or any other framework
how do you handle nullable values in golang sql?
Why are Golang videos not in a playlist 🤔💬❓
Thanks for pointing that out, I owe you (somehow forgot to do so) - I have created one now!
ua-cam.com/play/PL-2EBeDYMIbR1ag15E2MonJOj_cCIjUnd.html
Bookmarked so cheers 🥂
well, i have this error "pq: password authentication failed for user "postgres""
Must've mistyped the password, try asking chat gpt to help with it
For anyone getting this Error: "pq: SSL is not enabled on the server"
It seems that now sql.Open("postgres", connStr) does NOT support URL-based credentials.
It wants a DSN (Data Source Name) format. Here is an example:
connStr := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=disable", host, port, username, password, database)
db, err := sql.Open("postgres", connStr).
every Python developer make video about Golang programing 😂😂😂
You're right, haha
Can i request a big tutorial on HTML/templates like and example for building a simple website with it
Yeah, definitely gonna expand on templates with Go soon.
@@bugbytes3923 template caching system would be an awesome tutorial ;)
cold you please make a video as to how you would deploy a golang app that is connected to a database? thanks!
Great suggestion - thanks! Will look into more Go stuff very soon, including deployment.
How work without Docker? Sir.
What kind of accent is this?
@@sergeibatiuk3468 Scottish
ok
many people says that using gorm could give you performance problems in future.
others says that using this sql package is really insecure.
how can we prevent sql injection with database/sql ?
the syntax at 16:40 is supposed to take care of that