Complete BLoC with Clean Architecture (group chat) Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Discount !! Online Learning Course App (BLoC) Online Learning Course App (Riverpod) Online Learning Course App (Getx) Discount !! Shopping App (Provider) Cool Flutter Game Flutter Nodejs Chat App Flutter Nodejs Api And Firebase Chat App Riverpod Task Management App
Let's learn about the most important packages for GoLang projects. I have used them in a project where I have used GoLang and Postgres for rest api.
Sqlx
github.com/jmoiron/sqlx
sqlx is a package for Go which provides a set of extensions on top of the excellent built-in database/sql package. From this package you can get sqlx.Connect(), which is very important for database connection. You also get DB object, which helps you to maintain database connection pool.
PQ driver
github.com/lib/pq
It is a is a popular third-party package for the Go programming language that provides a pure Go driver for the PostgreSQL database. It allows Go programs to connect to and interact with PostgreSQL databases by providing a simple and efficient API for executing SQL queries, retrieving results, and managing transactions
Postgres and migrates packages
github.com/golang-migrate/migrate/v4
github.com/golang-migrate/migrate/v4/database/postgres
The first one is for migrating the database and second one is the actual postgres package.
From the first package you can use the function migrate.NewWithDatabaseInstance().
From the second package we can use the function postgres.WithInstance() and it returns a database driver.