Documentation
¶
Index ¶
- Variables
- func CreateNextPageToken(id int32, value any) string
- func IsValidTablePrefix(tablePrefix string) bool
- func Paginate(value any, pagination *entity.Pagination, db *gorm.DB) func(db *gorm.DB) *gorm.DB
- func PaginateWithOptions(value any, pagination *entity.Pagination, db *gorm.DB, tablePrefix string, ...) func(db *gorm.DB) *gorm.DB
- func PaginateWithTablePrefix(value any, pagination *entity.Pagination, db *gorm.DB, tablePrefix string) func(db *gorm.DB) *gorm.DB
- type Cursor
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowedOrderByColumns = map[string]string{
"ID": "id",
"CREATE_TIME": "create_time_since_epoch",
"LAST_UPDATE_TIME": "last_update_time_since_epoch",
"id": "id",
}
AllowedOrderByColumns contains allowed column names for orderBy to prevent SQL injection
View Source
var AllowedSortOrders = map[string]string{ "ASC": entity.SortOrderAsc, "DESC": entity.SortOrderDesc, }
AllowedSortOrders contains allowed sort orders to prevent SQL injection
Functions ¶
func CreateNextPageToken ¶
func IsValidTablePrefix ¶
IsValidTablePrefix validates table prefix to prevent SQL injection
func PaginateWithOptions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.