Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultPageSize = 20 MaxDefaultPageSize = 100 )
Functions ¶
func QuoteIdentifier ¶
QuoteIdentifier quotes an "identifier" (e.g. a table or a column name) to be used as part of an SQL statement.
Types ¶
type Model ¶
type Model struct { ID uint `gorm:"primarykey" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` }
Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt It may be embedded into your model or you may build your own model without it
type User struct { gorm.Model }
type Pagination ¶
func (Pagination) LimitOffset ¶
func (p Pagination) LimitOffset() (limit, offset int)
LimitOffset returns LIMIT and OFFSET parameter for SQL. The first page is page 0.
Click to show internal directories.
Click to hide internal directories.