- Kết nối vào database
- connect-mysql-db: https://github.com/handuy/gin-gonic/tree/master/gorm/connect-mysql-db
- connect-mysql-read-config: https://github.com/handuy/gin-gonic/tree/master/gorm/connect-mysql-read-config
- Tạo bảng
- Insert dữ liệu vào bảng
- insert-rows: https://github.com/handuy/gin-gonic/tree/master/gorm/insert-rows
- insert-rows-read-form: https://github.com/handuy/gin-gonic/tree/master/gorm/insert-rows-read-form
- Đọc dữ liệu từ bảng và lưu vào biến
- select-to-struct: https://github.com/handuy/gin-gonic/tree/master/gorm/select-to-struct
- select-to-struct-other: https://github.com/handuy/gin-gonic/tree/master/gorm/select-to-struct-other
- select-to-struct-full: https://github.com/handuy/gin-gonic/tree/master/gorm/select-to-struct-full
- select-to-slice: https://github.com/handuy/gin-gonic/tree/master/gorm/select-to-slice
- raw-select: https://github.com/handuy/gin-gonic/tree/master/gorm/raw-select
- limit-offset: https://github.com/handuy/gin-gonic/tree/master/gorm/limit-offset
- Update dữ liệu
- update-orm: https://github.com/handuy/gin-gonic/tree/master/gorm/update-orm
- update-orm-1: https://github.com/handuy/gin-gonic/tree/master/gorm/update-orm-1
- raw-update: https://github.com/handuy/gin-gonic/tree/master/gorm/raw-update
- Delete
- Quan hệ 1-nhiều
- foreign-key-constraint: https://github.com/handuy/gin-gonic/tree/master/gorm/foreign-key-constraint
- Quan hệ nhiều-nhiều
- Transaction
- transaction: https://github.com/handuy/gin-gonic/tree/master/gorm/transaction
- transaction-rollback: https://github.com/handuy/gin-gonic/tree/master/gorm/transaction-rollback
Tham khảo thêm tại official docs của gorm: http://gorm.io/docs/