sqlc is my favorite, because has the highest performance (my benchmarks). I use it with a million users in mysql and postgres. You also have more control over your queries since you write them by hand. Good video!!! Thank you.
Thank you for sharing your experience! I've actually been using sqlx or the std library more, since I've found I had to modify the sqlc code for some edge cases. But if it works for you, that's what's important!! 😊
Yes! A query builder will avoid query injections, as will writing raw queries and binding them with arguments using the help of the driver package/pgx. SQL injection would only be a problem if the dev implemented something like fmt.Sprintf("SELECT * from users where email = %s;", email), instead of something like db.Query("SELECT * from users where email = $1;", email). Hope that clarifies it!
I don't think I have the code snippets publicly available, but I'll try to find them and update the description with the link to the repo! Thank you for watching! 🙏
If you build the query manually, yes. I said in the video that it's a possibility, but not if you build the query in the correct way (e.g. with question marks and the values as arguments).
That's true too, the language name itself is kinda bad for search engines, which is ironic since Google created it 😄 everything else is amazing about the language
Thank you for sharing this. I can only imagine the analysis that went into sorting the pros and cons. Thank you again for speeding out thinking cycle up 🫡
sqlc is my favorite, because has the highest performance (my benchmarks). I use it with a million users in mysql and postgres. You also have more control over your queries since you write them by hand. Good video!!! Thank you.
Does it work well with N+1 queries? (for two or more structs)
Thank you for sharing your experience! I've actually been using sqlx or the std library more, since I've found I had to modify the sqlc code for some edge cases. But if it works for you, that's what's important!! 😊
Awesome explanation and amazing seeing examples for each library. Thank you.
Thank you, I appreciate you watching. Glad it was helpful to you! 🙏
using goqu with or without sqlx to write queries would get rid sql-injection not?
Yes! A query builder will avoid query injections, as will writing raw queries and binding them with arguments using the help of the driver package/pgx. SQL injection would only be a problem if the dev implemented something like fmt.Sprintf("SELECT * from users where email = %s;", email), instead of something like db.Query("SELECT * from users where email = $1;", email). Hope that clarifies it!
Thanks! That was very insightful.
Thank you very much! I'm really glad it was insightful to you! 🙏
Very nice explanation, Can you please provide all the code snippets examples you have used.
I don't think I have the code snippets publicly available, but I'll try to find them and update the description with the link to the repo! Thank you for watching! 🙏
Great video.
Glad you enjoyed it!
What application is that, that you using for the notes?
Google excalidraw 👌🏿
It's excalidraw.
thanks!
I'm glad it was helpful! Thanks for watching!
sqlx it is. sql proficiency , control and gigachad points.
I agree, sqlx is probably my favorite choice too!
sql injections using sqlx? lol not true
If you build the query manually, yes. I said in the video that it's a possibility, but not if you build the query in the correct way (e.g. with question marks and the values as arguments).
The language is called Go, not Golang.
Sure, but it's referred to as Golang all the time so it's fine either way.
Sometimes saying _Golang_ can help in Search
That's true too, the language name itself is kinda bad for search engines, which is ironic since Google created it 😄 everything else is amazing about the language
I refuse use Go, I only use golang beacause I dont want search about "go go go, come on".😂
Thank you for sharing this. I can only imagine the analysis that went into sorting the pros and cons. Thank you again for speeding out thinking cycle up 🫡
Glad it was helpful!