pilagod / gorm-cursor-paginator

A paginator doing cursor-based pagination based on GORM
https://github.com/pilagod/gorm-cursor-paginator
MIT License
192 stars 44 forks source link

Use GORM column tag if exists as default key sql representation #31

Closed pilagod closed 3 years ago

pilagod commented 3 years ago

Use GORM column tag if exists as default key sql representation, for example:

type Model struct {
    ID string `gorm:"column:field_name"`
}

Use field_name as sql key instead of id