GORM is a ORM in Golang for handling relational databases.
This demo uses mysql
as example. Make sure you have:
- Installed MySQL.
- Create a user
gorm
with passwordgorm
. - Create a database
gorm
, and havegorm
user have access to it. - Clone this repo:
git clone git@github.com:adlerhsieh/gorm_example.git
- Run in the proejct directory:
go run *.go
You should see all the results and queries. Follow the examples to see how GORM works.