Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Post) predicate.Post
- func CategoryID(v int) predicate.Post
- func CategoryIDEQ(v int) predicate.Post
- func CategoryIDGT(v int) predicate.Post
- func CategoryIDGTE(v int) predicate.Post
- func CategoryIDIn(vs ...int) predicate.Post
- func CategoryIDLT(v int) predicate.Post
- func CategoryIDLTE(v int) predicate.Post
- func CategoryIDNEQ(v int) predicate.Post
- func CategoryIDNotIn(vs ...int) predicate.Post
- func Content(v string) predicate.Post
- func ContentContains(v string) predicate.Post
- func ContentContainsFold(v string) predicate.Post
- func ContentEQ(v string) predicate.Post
- func ContentEqualFold(v string) predicate.Post
- func ContentGT(v string) predicate.Post
- func ContentGTE(v string) predicate.Post
- func ContentHasPrefix(v string) predicate.Post
- func ContentHasSuffix(v string) predicate.Post
- func ContentIn(vs ...string) predicate.Post
- func ContentLT(v string) predicate.Post
- func ContentLTE(v string) predicate.Post
- func ContentNEQ(v string) predicate.Post
- func ContentNotIn(vs ...string) predicate.Post
- func CreatedAt(v time.Time) predicate.Post
- func CreatedAtEQ(v time.Time) predicate.Post
- func CreatedAtGT(v time.Time) predicate.Post
- func CreatedAtGTE(v time.Time) predicate.Post
- func CreatedAtIn(vs ...time.Time) predicate.Post
- func CreatedAtLT(v time.Time) predicate.Post
- func CreatedAtLTE(v time.Time) predicate.Post
- func CreatedAtNEQ(v time.Time) predicate.Post
- func CreatedAtNotIn(vs ...time.Time) predicate.Post
- func DislikeCount(v int) predicate.Post
- func DislikeCountEQ(v int) predicate.Post
- func DislikeCountGT(v int) predicate.Post
- func DislikeCountGTE(v int) predicate.Post
- func DislikeCountIn(vs ...int) predicate.Post
- func DislikeCountLT(v int) predicate.Post
- func DislikeCountLTE(v int) predicate.Post
- func DislikeCountNEQ(v int) predicate.Post
- func DislikeCountNotIn(vs ...int) predicate.Post
- func FavoriteCount(v int) predicate.Post
- func FavoriteCountEQ(v int) predicate.Post
- func FavoriteCountGT(v int) predicate.Post
- func FavoriteCountGTE(v int) predicate.Post
- func FavoriteCountIn(vs ...int) predicate.Post
- func FavoriteCountLT(v int) predicate.Post
- func FavoriteCountLTE(v int) predicate.Post
- func FavoriteCountNEQ(v int) predicate.Post
- func FavoriteCountNotIn(vs ...int) predicate.Post
- func ID(id int) predicate.Post
- func IDEQ(id int) predicate.Post
- func IDGT(id int) predicate.Post
- func IDGTE(id int) predicate.Post
- func IDIn(ids ...int) predicate.Post
- func IDLT(id int) predicate.Post
- func IDLTE(id int) predicate.Post
- func IDNEQ(id int) predicate.Post
- func IDNotIn(ids ...int) predicate.Post
- func IsEssence(v bool) predicate.Post
- func IsEssenceEQ(v bool) predicate.Post
- func IsEssenceNEQ(v bool) predicate.Post
- func IsPinned(v bool) predicate.Post
- func IsPinnedEQ(v bool) predicate.Post
- func IsPinnedNEQ(v bool) predicate.Post
- func LastEditedAt(v time.Time) predicate.Post
- func LastEditedAtEQ(v time.Time) predicate.Post
- func LastEditedAtGT(v time.Time) predicate.Post
- func LastEditedAtGTE(v time.Time) predicate.Post
- func LastEditedAtIn(vs ...time.Time) predicate.Post
- func LastEditedAtIsNil() predicate.Post
- func LastEditedAtLT(v time.Time) predicate.Post
- func LastEditedAtLTE(v time.Time) predicate.Post
- func LastEditedAtNEQ(v time.Time) predicate.Post
- func LastEditedAtNotIn(vs ...time.Time) predicate.Post
- func LastEditedAtNotNil() predicate.Post
- func LikeCount(v int) predicate.Post
- func LikeCountEQ(v int) predicate.Post
- func LikeCountGT(v int) predicate.Post
- func LikeCountGTE(v int) predicate.Post
- func LikeCountIn(vs ...int) predicate.Post
- func LikeCountLT(v int) predicate.Post
- func LikeCountLTE(v int) predicate.Post
- func LikeCountNEQ(v int) predicate.Post
- func LikeCountNotIn(vs ...int) predicate.Post
- func Not(p predicate.Post) predicate.Post
- func Or(predicates ...predicate.Post) predicate.Post
- func PinScopeEQ(v PinScope) predicate.Post
- func PinScopeIn(vs ...PinScope) predicate.Post
- func PinScopeNEQ(v PinScope) predicate.Post
- func PinScopeNotIn(vs ...PinScope) predicate.Post
- func PinScopeValidator(ps PinScope) error
- func PublishIP(v string) predicate.Post
- func PublishIPContains(v string) predicate.Post
- func PublishIPContainsFold(v string) predicate.Post
- func PublishIPEQ(v string) predicate.Post
- func PublishIPEqualFold(v string) predicate.Post
- func PublishIPGT(v string) predicate.Post
- func PublishIPGTE(v string) predicate.Post
- func PublishIPHasPrefix(v string) predicate.Post
- func PublishIPHasSuffix(v string) predicate.Post
- func PublishIPIn(vs ...string) predicate.Post
- func PublishIPIsNil() predicate.Post
- func PublishIPLT(v string) predicate.Post
- func PublishIPLTE(v string) predicate.Post
- func PublishIPNEQ(v string) predicate.Post
- func PublishIPNotIn(vs ...string) predicate.Post
- func PublishIPNotNil() predicate.Post
- func ReadPermissionEQ(v ReadPermission) predicate.Post
- func ReadPermissionIn(vs ...ReadPermission) predicate.Post
- func ReadPermissionNEQ(v ReadPermission) predicate.Post
- func ReadPermissionNotIn(vs ...ReadPermission) predicate.Post
- func ReadPermissionPoints(v int) predicate.Post
- func ReadPermissionPointsEQ(v int) predicate.Post
- func ReadPermissionPointsGT(v int) predicate.Post
- func ReadPermissionPointsGTE(v int) predicate.Post
- func ReadPermissionPointsIn(vs ...int) predicate.Post
- func ReadPermissionPointsLT(v int) predicate.Post
- func ReadPermissionPointsLTE(v int) predicate.Post
- func ReadPermissionPointsNEQ(v int) predicate.Post
- func ReadPermissionPointsNotIn(vs ...int) predicate.Post
- func ReadPermissionValidator(rp ReadPermission) error
- func StatusEQ(v Status) predicate.Post
- func StatusIn(vs ...Status) predicate.Post
- func StatusNEQ(v Status) predicate.Post
- func StatusNotIn(vs ...Status) predicate.Post
- func StatusValidator(s Status) error
- func Title(v string) predicate.Post
- func TitleContains(v string) predicate.Post
- func TitleContainsFold(v string) predicate.Post
- func TitleEQ(v string) predicate.Post
- func TitleEqualFold(v string) predicate.Post
- func TitleGT(v string) predicate.Post
- func TitleGTE(v string) predicate.Post
- func TitleHasPrefix(v string) predicate.Post
- func TitleHasSuffix(v string) predicate.Post
- func TitleIn(vs ...string) predicate.Post
- func TitleLT(v string) predicate.Post
- func TitleLTE(v string) predicate.Post
- func TitleNEQ(v string) predicate.Post
- func TitleNotIn(vs ...string) predicate.Post
- func UpdatedAt(v time.Time) predicate.Post
- func UpdatedAtEQ(v time.Time) predicate.Post
- func UpdatedAtGT(v time.Time) predicate.Post
- func UpdatedAtGTE(v time.Time) predicate.Post
- func UpdatedAtIn(vs ...time.Time) predicate.Post
- func UpdatedAtLT(v time.Time) predicate.Post
- func UpdatedAtLTE(v time.Time) predicate.Post
- func UpdatedAtNEQ(v time.Time) predicate.Post
- func UpdatedAtNotIn(vs ...time.Time) predicate.Post
- func UserID(v int) predicate.Post
- func UserIDEQ(v int) predicate.Post
- func UserIDGT(v int) predicate.Post
- func UserIDGTE(v int) predicate.Post
- func UserIDIn(vs ...int) predicate.Post
- func UserIDLT(v int) predicate.Post
- func UserIDLTE(v int) predicate.Post
- func UserIDNEQ(v int) predicate.Post
- func UserIDNotIn(vs ...int) predicate.Post
- func ValidColumn(column string) bool
- func ViewCount(v int) predicate.Post
- func ViewCountEQ(v int) predicate.Post
- func ViewCountGT(v int) predicate.Post
- func ViewCountGTE(v int) predicate.Post
- func ViewCountIn(vs ...int) predicate.Post
- func ViewCountLT(v int) predicate.Post
- func ViewCountLTE(v int) predicate.Post
- func ViewCountNEQ(v int) predicate.Post
- func ViewCountNotIn(vs ...int) predicate.Post
- type OrderOption
- func ByCategoryID(opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDislikeCount(opts ...sql.OrderTermOption) OrderOption
- func ByFavoriteCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsEssence(opts ...sql.OrderTermOption) OrderOption
- func ByIsPinned(opts ...sql.OrderTermOption) OrderOption
- func ByLastEditedAt(opts ...sql.OrderTermOption) OrderOption
- func ByLikeCount(opts ...sql.OrderTermOption) OrderOption
- func ByPinScope(opts ...sql.OrderTermOption) OrderOption
- func ByPublishIP(opts ...sql.OrderTermOption) OrderOption
- func ByReadPermission(opts ...sql.OrderTermOption) OrderOption
- func ByReadPermissionPoints(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUserID(opts ...sql.OrderTermOption) OrderOption
- func ByViewCount(opts ...sql.OrderTermOption) OrderOption
- type PinScope
- type ReadPermission
- type Status
Constants ¶
const ( // Label holds the string label denoting the post type in the database. Label = "post" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // FieldCategoryID holds the string denoting the category_id field in the database. FieldCategoryID = "category_id" // FieldTitle holds the string denoting the title field in the database. FieldTitle = "title" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldReadPermission holds the string denoting the read_permission field in the database. FieldReadPermission = "read_permission" // FieldReadPermissionPoints holds the string denoting the read_permission_points field in the database. FieldReadPermissionPoints = "read_permission_points" // FieldViewCount holds the string denoting the view_count field in the database. FieldViewCount = "view_count" // FieldLikeCount holds the string denoting the like_count field in the database. FieldLikeCount = "like_count" // FieldDislikeCount holds the string denoting the dislike_count field in the database. FieldDislikeCount = "dislike_count" // FieldFavoriteCount holds the string denoting the favorite_count field in the database. FieldFavoriteCount = "favorite_count" // FieldIsEssence holds the string denoting the is_essence field in the database. FieldIsEssence = "is_essence" // FieldIsPinned holds the string denoting the is_pinned field in the database. FieldIsPinned = "is_pinned" // FieldPinScope holds the string denoting the pin_scope field in the database. FieldPinScope = "pin_scope" // FieldPublishIP holds the string denoting the publish_ip field in the database. FieldPublishIP = "publish_ip" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldLastEditedAt holds the string denoting the last_edited_at field in the database. FieldLastEditedAt = "last_edited_at" // Table holds the table name of the post in the database. Table = "posts" )
const DefaultPinScope = PinScopeNone
PinScopeNone is the default value of the PinScope enum.
const DefaultReadPermission = ReadPermissionPublic
ReadPermissionPublic is the default value of the ReadPermission enum.
const DefaultStatus = StatusNormal
StatusNormal is the default value of the Status enum.
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // UserIDValidator is a validator for the "user_id" field. It is called by the builders before save. UserIDValidator func(int) error // CategoryIDValidator is a validator for the "category_id" field. It is called by the builders before save. CategoryIDValidator func(int) error // TitleValidator is a validator for the "title" field. It is called by the builders before save. TitleValidator func(string) error // ContentValidator is a validator for the "content" field. It is called by the builders before save. ContentValidator func(string) error // DefaultReadPermissionPoints holds the default value on creation for the "read_permission_points" field. DefaultReadPermissionPoints int // ReadPermissionPointsValidator is a validator for the "read_permission_points" field. It is called by the builders before save. ReadPermissionPointsValidator func(int) error // DefaultViewCount holds the default value on creation for the "view_count" field. DefaultViewCount int // ViewCountValidator is a validator for the "view_count" field. It is called by the builders before save. ViewCountValidator func(int) error // DefaultLikeCount holds the default value on creation for the "like_count" field. DefaultLikeCount int // LikeCountValidator is a validator for the "like_count" field. It is called by the builders before save. LikeCountValidator func(int) error // DefaultDislikeCount holds the default value on creation for the "dislike_count" field. DefaultDislikeCount int // DislikeCountValidator is a validator for the "dislike_count" field. It is called by the builders before save. DislikeCountValidator func(int) error // DefaultFavoriteCount holds the default value on creation for the "favorite_count" field. DefaultFavoriteCount int // FavoriteCountValidator is a validator for the "favorite_count" field. It is called by the builders before save. FavoriteCountValidator func(int) error // DefaultIsEssence holds the default value on creation for the "is_essence" field. DefaultIsEssence bool // DefaultIsPinned holds the default value on creation for the "is_pinned" field. DefaultIsPinned bool )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldUserID, FieldCategoryID, FieldTitle, FieldContent, FieldReadPermission, FieldReadPermissionPoints, FieldViewCount, FieldLikeCount, FieldDislikeCount, FieldFavoriteCount, FieldIsEssence, FieldIsPinned, FieldPinScope, FieldPublishIP, FieldStatus, FieldLastEditedAt, }
Columns holds all SQL columns for post fields.
Functions ¶
func CategoryID ¶
CategoryID applies equality check predicate on the "category_id" field. It's identical to CategoryIDEQ.
func CategoryIDEQ ¶
CategoryIDEQ applies the EQ predicate on the "category_id" field.
func CategoryIDGT ¶
CategoryIDGT applies the GT predicate on the "category_id" field.
func CategoryIDGTE ¶
CategoryIDGTE applies the GTE predicate on the "category_id" field.
func CategoryIDIn ¶
CategoryIDIn applies the In predicate on the "category_id" field.
func CategoryIDLT ¶
CategoryIDLT applies the LT predicate on the "category_id" field.
func CategoryIDLTE ¶
CategoryIDLTE applies the LTE predicate on the "category_id" field.
func CategoryIDNEQ ¶
CategoryIDNEQ applies the NEQ predicate on the "category_id" field.
func CategoryIDNotIn ¶
CategoryIDNotIn applies the NotIn predicate on the "category_id" field.
func Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func DislikeCount ¶
DislikeCount applies equality check predicate on the "dislike_count" field. It's identical to DislikeCountEQ.
func DislikeCountEQ ¶
DislikeCountEQ applies the EQ predicate on the "dislike_count" field.
func DislikeCountGT ¶
DislikeCountGT applies the GT predicate on the "dislike_count" field.
func DislikeCountGTE ¶
DislikeCountGTE applies the GTE predicate on the "dislike_count" field.
func DislikeCountIn ¶
DislikeCountIn applies the In predicate on the "dislike_count" field.
func DislikeCountLT ¶
DislikeCountLT applies the LT predicate on the "dislike_count" field.
func DislikeCountLTE ¶
DislikeCountLTE applies the LTE predicate on the "dislike_count" field.
func DislikeCountNEQ ¶
DislikeCountNEQ applies the NEQ predicate on the "dislike_count" field.
func DislikeCountNotIn ¶
DislikeCountNotIn applies the NotIn predicate on the "dislike_count" field.
func FavoriteCount ¶
FavoriteCount applies equality check predicate on the "favorite_count" field. It's identical to FavoriteCountEQ.
func FavoriteCountEQ ¶
FavoriteCountEQ applies the EQ predicate on the "favorite_count" field.
func FavoriteCountGT ¶
FavoriteCountGT applies the GT predicate on the "favorite_count" field.
func FavoriteCountGTE ¶
FavoriteCountGTE applies the GTE predicate on the "favorite_count" field.
func FavoriteCountIn ¶
FavoriteCountIn applies the In predicate on the "favorite_count" field.
func FavoriteCountLT ¶
FavoriteCountLT applies the LT predicate on the "favorite_count" field.
func FavoriteCountLTE ¶
FavoriteCountLTE applies the LTE predicate on the "favorite_count" field.
func FavoriteCountNEQ ¶
FavoriteCountNEQ applies the NEQ predicate on the "favorite_count" field.
func FavoriteCountNotIn ¶
FavoriteCountNotIn applies the NotIn predicate on the "favorite_count" field.
func IsEssence ¶
IsEssence applies equality check predicate on the "is_essence" field. It's identical to IsEssenceEQ.
func IsEssenceEQ ¶
IsEssenceEQ applies the EQ predicate on the "is_essence" field.
func IsEssenceNEQ ¶
IsEssenceNEQ applies the NEQ predicate on the "is_essence" field.
func IsPinned ¶
IsPinned applies equality check predicate on the "is_pinned" field. It's identical to IsPinnedEQ.
func IsPinnedEQ ¶
IsPinnedEQ applies the EQ predicate on the "is_pinned" field.
func IsPinnedNEQ ¶
IsPinnedNEQ applies the NEQ predicate on the "is_pinned" field.
func LastEditedAt ¶
LastEditedAt applies equality check predicate on the "last_edited_at" field. It's identical to LastEditedAtEQ.
func LastEditedAtEQ ¶
LastEditedAtEQ applies the EQ predicate on the "last_edited_at" field.
func LastEditedAtGT ¶
LastEditedAtGT applies the GT predicate on the "last_edited_at" field.
func LastEditedAtGTE ¶
LastEditedAtGTE applies the GTE predicate on the "last_edited_at" field.
func LastEditedAtIn ¶
LastEditedAtIn applies the In predicate on the "last_edited_at" field.
func LastEditedAtIsNil ¶
LastEditedAtIsNil applies the IsNil predicate on the "last_edited_at" field.
func LastEditedAtLT ¶
LastEditedAtLT applies the LT predicate on the "last_edited_at" field.
func LastEditedAtLTE ¶
LastEditedAtLTE applies the LTE predicate on the "last_edited_at" field.
func LastEditedAtNEQ ¶
LastEditedAtNEQ applies the NEQ predicate on the "last_edited_at" field.
func LastEditedAtNotIn ¶
LastEditedAtNotIn applies the NotIn predicate on the "last_edited_at" field.
func LastEditedAtNotNil ¶
LastEditedAtNotNil applies the NotNil predicate on the "last_edited_at" field.
func LikeCount ¶
LikeCount applies equality check predicate on the "like_count" field. It's identical to LikeCountEQ.
func LikeCountEQ ¶
LikeCountEQ applies the EQ predicate on the "like_count" field.
func LikeCountGT ¶
LikeCountGT applies the GT predicate on the "like_count" field.
func LikeCountGTE ¶
LikeCountGTE applies the GTE predicate on the "like_count" field.
func LikeCountIn ¶
LikeCountIn applies the In predicate on the "like_count" field.
func LikeCountLT ¶
LikeCountLT applies the LT predicate on the "like_count" field.
func LikeCountLTE ¶
LikeCountLTE applies the LTE predicate on the "like_count" field.
func LikeCountNEQ ¶
LikeCountNEQ applies the NEQ predicate on the "like_count" field.
func LikeCountNotIn ¶
LikeCountNotIn applies the NotIn predicate on the "like_count" field.
func PinScopeEQ ¶
PinScopeEQ applies the EQ predicate on the "pin_scope" field.
func PinScopeIn ¶
PinScopeIn applies the In predicate on the "pin_scope" field.
func PinScopeNEQ ¶
PinScopeNEQ applies the NEQ predicate on the "pin_scope" field.
func PinScopeNotIn ¶
PinScopeNotIn applies the NotIn predicate on the "pin_scope" field.
func PinScopeValidator ¶
PinScopeValidator is a validator for the "pin_scope" field enum values. It is called by the builders before save.
func PublishIP ¶
PublishIP applies equality check predicate on the "publish_ip" field. It's identical to PublishIPEQ.
func PublishIPContains ¶
PublishIPContains applies the Contains predicate on the "publish_ip" field.
func PublishIPContainsFold ¶
PublishIPContainsFold applies the ContainsFold predicate on the "publish_ip" field.
func PublishIPEQ ¶
PublishIPEQ applies the EQ predicate on the "publish_ip" field.
func PublishIPEqualFold ¶
PublishIPEqualFold applies the EqualFold predicate on the "publish_ip" field.
func PublishIPGT ¶
PublishIPGT applies the GT predicate on the "publish_ip" field.
func PublishIPGTE ¶
PublishIPGTE applies the GTE predicate on the "publish_ip" field.
func PublishIPHasPrefix ¶
PublishIPHasPrefix applies the HasPrefix predicate on the "publish_ip" field.
func PublishIPHasSuffix ¶
PublishIPHasSuffix applies the HasSuffix predicate on the "publish_ip" field.
func PublishIPIn ¶
PublishIPIn applies the In predicate on the "publish_ip" field.
func PublishIPIsNil ¶
PublishIPIsNil applies the IsNil predicate on the "publish_ip" field.
func PublishIPLT ¶
PublishIPLT applies the LT predicate on the "publish_ip" field.
func PublishIPLTE ¶
PublishIPLTE applies the LTE predicate on the "publish_ip" field.
func PublishIPNEQ ¶
PublishIPNEQ applies the NEQ predicate on the "publish_ip" field.
func PublishIPNotIn ¶
PublishIPNotIn applies the NotIn predicate on the "publish_ip" field.
func PublishIPNotNil ¶
PublishIPNotNil applies the NotNil predicate on the "publish_ip" field.
func ReadPermissionEQ ¶
func ReadPermissionEQ(v ReadPermission) predicate.Post
ReadPermissionEQ applies the EQ predicate on the "read_permission" field.
func ReadPermissionIn ¶
func ReadPermissionIn(vs ...ReadPermission) predicate.Post
ReadPermissionIn applies the In predicate on the "read_permission" field.
func ReadPermissionNEQ ¶
func ReadPermissionNEQ(v ReadPermission) predicate.Post
ReadPermissionNEQ applies the NEQ predicate on the "read_permission" field.
func ReadPermissionNotIn ¶
func ReadPermissionNotIn(vs ...ReadPermission) predicate.Post
ReadPermissionNotIn applies the NotIn predicate on the "read_permission" field.
func ReadPermissionPoints ¶
ReadPermissionPoints applies equality check predicate on the "read_permission_points" field. It's identical to ReadPermissionPointsEQ.
func ReadPermissionPointsEQ ¶
ReadPermissionPointsEQ applies the EQ predicate on the "read_permission_points" field.
func ReadPermissionPointsGT ¶
ReadPermissionPointsGT applies the GT predicate on the "read_permission_points" field.
func ReadPermissionPointsGTE ¶
ReadPermissionPointsGTE applies the GTE predicate on the "read_permission_points" field.
func ReadPermissionPointsIn ¶
ReadPermissionPointsIn applies the In predicate on the "read_permission_points" field.
func ReadPermissionPointsLT ¶
ReadPermissionPointsLT applies the LT predicate on the "read_permission_points" field.
func ReadPermissionPointsLTE ¶
ReadPermissionPointsLTE applies the LTE predicate on the "read_permission_points" field.
func ReadPermissionPointsNEQ ¶
ReadPermissionPointsNEQ applies the NEQ predicate on the "read_permission_points" field.
func ReadPermissionPointsNotIn ¶
ReadPermissionPointsNotIn applies the NotIn predicate on the "read_permission_points" field.
func ReadPermissionValidator ¶
func ReadPermissionValidator(rp ReadPermission) error
ReadPermissionValidator is a validator for the "read_permission" field enum values. It is called by the builders before save.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func Title ¶
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEqualFold ¶
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleHasPrefix ¶
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UserID ¶
UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserIDNotIn ¶
UserIDNotIn applies the NotIn predicate on the "user_id" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func ViewCount ¶
ViewCount applies equality check predicate on the "view_count" field. It's identical to ViewCountEQ.
func ViewCountEQ ¶
ViewCountEQ applies the EQ predicate on the "view_count" field.
func ViewCountGT ¶
ViewCountGT applies the GT predicate on the "view_count" field.
func ViewCountGTE ¶
ViewCountGTE applies the GTE predicate on the "view_count" field.
func ViewCountIn ¶
ViewCountIn applies the In predicate on the "view_count" field.
func ViewCountLT ¶
ViewCountLT applies the LT predicate on the "view_count" field.
func ViewCountLTE ¶
ViewCountLTE applies the LTE predicate on the "view_count" field.
func ViewCountNEQ ¶
ViewCountNEQ applies the NEQ predicate on the "view_count" field.
func ViewCountNotIn ¶
ViewCountNotIn applies the NotIn predicate on the "view_count" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Post queries.
func ByCategoryID ¶
func ByCategoryID(opts ...sql.OrderTermOption) OrderOption
ByCategoryID orders the results by the category_id field.
func ByContent ¶
func ByContent(opts ...sql.OrderTermOption) OrderOption
ByContent orders the results by the content field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDislikeCount ¶
func ByDislikeCount(opts ...sql.OrderTermOption) OrderOption
ByDislikeCount orders the results by the dislike_count field.
func ByFavoriteCount ¶
func ByFavoriteCount(opts ...sql.OrderTermOption) OrderOption
ByFavoriteCount orders the results by the favorite_count field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIsEssence ¶
func ByIsEssence(opts ...sql.OrderTermOption) OrderOption
ByIsEssence orders the results by the is_essence field.
func ByIsPinned ¶
func ByIsPinned(opts ...sql.OrderTermOption) OrderOption
ByIsPinned orders the results by the is_pinned field.
func ByLastEditedAt ¶
func ByLastEditedAt(opts ...sql.OrderTermOption) OrderOption
ByLastEditedAt orders the results by the last_edited_at field.
func ByLikeCount ¶
func ByLikeCount(opts ...sql.OrderTermOption) OrderOption
ByLikeCount orders the results by the like_count field.
func ByPinScope ¶
func ByPinScope(opts ...sql.OrderTermOption) OrderOption
ByPinScope orders the results by the pin_scope field.
func ByPublishIP ¶
func ByPublishIP(opts ...sql.OrderTermOption) OrderOption
ByPublishIP orders the results by the publish_ip field.
func ByReadPermission ¶
func ByReadPermission(opts ...sql.OrderTermOption) OrderOption
ByReadPermission orders the results by the read_permission field.
func ByReadPermissionPoints ¶
func ByReadPermissionPoints(opts ...sql.OrderTermOption) OrderOption
ByReadPermissionPoints orders the results by the read_permission_points field.
func ByStatus ¶
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUserID ¶
func ByUserID(opts ...sql.OrderTermOption) OrderOption
ByUserID orders the results by the user_id field.
func ByViewCount ¶
func ByViewCount(opts ...sql.OrderTermOption) OrderOption
ByViewCount orders the results by the view_count field.
type PinScope ¶
type PinScope string
PinScope defines the type for the "pin_scope" enum field.
type ReadPermission ¶
type ReadPermission string
ReadPermission defines the type for the "read_permission" enum field.
const ( ReadPermissionPublic ReadPermission = "public" ReadPermissionLoginRequired ReadPermission = "login_required" ReadPermissionPointsRequired ReadPermission = "points_required" )
ReadPermission values.
func (ReadPermission) String ¶
func (rp ReadPermission) String() string