March 2019
Beginner to intermediate
324 pages
7h 17m
English
One of the most popular Go ORM packages is the GORM package, which can be found at http://gorm.io/. GORM offers some mature functionality that makes writing backend database layers a breeze. Let's continue writing our database layer by utilizing ORM, step by step:
First, we need to retrieve the GORM package:
go get -u github.com/jinzhu/gorm
Then, we need to evolve our models so that they can be used properly by GORM.
An ORM needs model objects to accurately reflect the database table columns that are expected to be read and/or manipulated by the ORM library. The ORM can also make use of some meta information, for example, the last time a row was updated, deleted, or created, to ensure proper synchronization between the database and your ...
Read now
Unlock full access