Documentation
¶
Index ¶
- func ActiveCategoryIDsByTopicWithDB(db *gorm.DB, topicID uint64) ([]uint64, error)
- func ActiveTopicIDsByCategory(categoryID uint64, maxIDs int) ([]uint64, bool, error)
- func ActiveTopicIDsByCategoryWithDB(db *gorm.DB, categoryID uint64, maxIDs int) (topicIDs []uint64, complete bool, err error)
- func DeleteByTopicId(topicId uint64) int64
- func DeleteByTopicIdWithDB(db *gorm.DB, topicID uint64) (int64, error)
- func MultiCategoryTopicCounts(categoryIDs []uint64) (map[uint64]int64, error)
- func MultiCategoryTopicCountsWithDB(db *gorm.DB, categoryIDs []uint64) (map[uint64]int64, error)
- func ReplaceTopicCategories(topicId uint64, categoryIDs []uint64) error
- func ReplaceTopicCategoriesWithDB(db *gorm.DB, topicId uint64, categoryIDs []uint64) error
- func SaveOrCreateById(entity *Entity) int64
- type Entity
- type MultiCategoryTopicCount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActiveCategoryIDsByTopicWithDB ¶ added in v0.2.68
func ActiveTopicIDsByCategory ¶ added in v0.2.61
func ActiveTopicIDsByCategoryWithDB ¶ added in v0.2.61
func DeleteByTopicId ¶
func DeleteByTopicIdWithDB ¶ added in v0.2.68
func MultiCategoryTopicCounts ¶ added in v0.2.61
func MultiCategoryTopicCountsWithDB ¶ added in v0.2.61
func ReplaceTopicCategories ¶
func ReplaceTopicCategoriesWithDB ¶ added in v0.2.61
func SaveOrCreateById ¶
Types ¶
type Entity ¶
type Entity struct {
Id uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"`
TopicId uint64 `` /* 175-byte string literal not displayed */
CategoryId uint64 `` /* 169-byte string literal not displayed */
Effective int `gorm:"column:effective;type:int;not null;default:0;index:idx_topic_category_effective,priority:1;" json:"effective"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime;<-:create;" json:"createdAt"`
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime;" json:"updatedAt"`
}
func GetByTopicId ¶
func GetOneByCategoryId ¶
type MultiCategoryTopicCount ¶ added in v0.2.61
Click to show internal directories.
Click to hide internal directories.