Documentation ¶
Index ¶
- Constants
- Variables
- func Active(v bool) predicate.Meta
- func ActiveEQ(v bool) predicate.Meta
- func ActiveNEQ(v bool) predicate.Meta
- func And(predicates ...predicate.Meta) predicate.Meta
- func CreateTime(v time.Time) predicate.Meta
- func CreateTimeEQ(v time.Time) predicate.Meta
- func CreateTimeGT(v time.Time) predicate.Meta
- func CreateTimeGTE(v time.Time) predicate.Meta
- func CreateTimeIn(vs ...time.Time) predicate.Meta
- func CreateTimeLT(v time.Time) predicate.Meta
- func CreateTimeLTE(v time.Time) predicate.Meta
- func CreateTimeNEQ(v time.Time) predicate.Meta
- func CreateTimeNotIn(vs ...time.Time) predicate.Meta
- func Favorite(v bool) predicate.Meta
- func FavoriteEQ(v bool) predicate.Meta
- func FavoriteNEQ(v bool) predicate.Meta
- func HasTags() predicate.Meta
- func HasTagsWith(preds ...predicate.Tag) predicate.Meta
- func ID(id int) predicate.Meta
- func IDEQ(id int) predicate.Meta
- func IDGT(id int) predicate.Meta
- func IDGTE(id int) predicate.Meta
- func IDIn(ids ...int) predicate.Meta
- func IDLT(id int) predicate.Meta
- func IDLTE(id int) predicate.Meta
- func IDNEQ(id int) predicate.Meta
- func IDNotIn(ids ...int) predicate.Meta
- func Name(v string) predicate.Meta
- func NameContains(v string) predicate.Meta
- func NameContainsFold(v string) predicate.Meta
- func NameEQ(v string) predicate.Meta
- func NameEqualFold(v string) predicate.Meta
- func NameGT(v string) predicate.Meta
- func NameGTE(v string) predicate.Meta
- func NameHasPrefix(v string) predicate.Meta
- func NameHasSuffix(v string) predicate.Meta
- func NameIn(vs ...string) predicate.Meta
- func NameLT(v string) predicate.Meta
- func NameLTE(v string) predicate.Meta
- func NameNEQ(v string) predicate.Meta
- func NameNotIn(vs ...string) predicate.Meta
- func Not(p predicate.Meta) predicate.Meta
- func Or(predicates ...predicate.Meta) predicate.Meta
- func Read(v bool) predicate.Meta
- func ReadEQ(v bool) predicate.Meta
- func ReadNEQ(v bool) predicate.Meta
- func Thumbnail(v []byte) predicate.Meta
- func ThumbnailEQ(v []byte) predicate.Meta
- func ThumbnailGT(v []byte) predicate.Meta
- func ThumbnailGTE(v []byte) predicate.Meta
- func ThumbnailIn(vs ...[]byte) predicate.Meta
- func ThumbnailIsNil() predicate.Meta
- func ThumbnailLT(v []byte) predicate.Meta
- func ThumbnailLTE(v []byte) predicate.Meta
- func ThumbnailNEQ(v []byte) predicate.Meta
- func ThumbnailNotIn(vs ...[]byte) predicate.Meta
- func ThumbnailNotNil() predicate.Meta
- func ValidColumn(column string) bool
- type OrderOption
- func ByActive(opts ...sql.OrderTermOption) OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByFavorite(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRead(opts ...sql.OrderTermOption) OrderOption
- func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the meta type in the database. Label = "meta" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldCreateTime holds the string denoting the create_time field in the database. FieldCreateTime = "create_time" // FieldFavorite holds the string denoting the favorite field in the database. FieldFavorite = "favorite" // FieldFileIndices holds the string denoting the file_indices field in the database. FieldFileIndices = "file_indices" // FieldThumbnail holds the string denoting the thumbnail field in the database. FieldThumbnail = "thumbnail" // FieldRead holds the string denoting the read field in the database. FieldRead = "read" // FieldActive holds the string denoting the active field in the database. FieldActive = "active" // EdgeTags holds the string denoting the tags edge name in mutations. EdgeTags = "tags" // Table holds the table name of the meta in the database. Table = "meta" // TagsTable is the table that holds the tags relation/edge. The primary key declared below. TagsTable = "meta_tags" // TagsInverseTable is the table name for the Tag entity. // It exists in this package in order to avoid circular dependency with the "tag" package. TagsInverseTable = "tags" )
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime time.Time // DefaultFavorite holds the default value on creation for the "favorite" field. DefaultFavorite bool // DefaultFileIndices holds the default value on creation for the "file_indices" field. DefaultFileIndices []int // DefaultRead holds the default value on creation for the "read" field. DefaultRead bool // DefaultActive holds the default value on creation for the "active" field. DefaultActive bool )
var Columns = []string{ FieldID, FieldName, FieldCreateTime, FieldFavorite, FieldFileIndices, FieldThumbnail, FieldRead, FieldActive, }
Columns holds all SQL columns for meta fields.
var ( // TagsPrimaryKey and TagsColumn2 are the table columns denoting the // primary key for the tags relation (M2M). TagsPrimaryKey = []string{"meta_id", "tag_id"} )
Functions ¶
func Active ¶
Active applies equality check predicate on the "active" field. It's identical to ActiveEQ.
func CreateTime ¶
CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTimeEQ ¶
CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeGT ¶
CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGTE ¶
CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeIn ¶
CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeLT ¶
CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLTE ¶
CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeNEQ ¶
CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNotIn ¶
CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
func Favorite ¶
Favorite applies equality check predicate on the "favorite" field. It's identical to FavoriteEQ.
func FavoriteEQ ¶
FavoriteEQ applies the EQ predicate on the "favorite" field.
func FavoriteNEQ ¶
FavoriteNEQ applies the NEQ predicate on the "favorite" field.
func HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func Thumbnail ¶
Thumbnail applies equality check predicate on the "thumbnail" field. It's identical to ThumbnailEQ.
func ThumbnailEQ ¶
ThumbnailEQ applies the EQ predicate on the "thumbnail" field.
func ThumbnailGT ¶
ThumbnailGT applies the GT predicate on the "thumbnail" field.
func ThumbnailGTE ¶
ThumbnailGTE applies the GTE predicate on the "thumbnail" field.
func ThumbnailIn ¶
ThumbnailIn applies the In predicate on the "thumbnail" field.
func ThumbnailIsNil ¶
ThumbnailIsNil applies the IsNil predicate on the "thumbnail" field.
func ThumbnailLT ¶
ThumbnailLT applies the LT predicate on the "thumbnail" field.
func ThumbnailLTE ¶
ThumbnailLTE applies the LTE predicate on the "thumbnail" field.
func ThumbnailNEQ ¶
ThumbnailNEQ applies the NEQ predicate on the "thumbnail" field.
func ThumbnailNotIn ¶
ThumbnailNotIn applies the NotIn predicate on the "thumbnail" field.
func ThumbnailNotNil ¶
ThumbnailNotNil applies the NotNil predicate on the "thumbnail" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Meta queries.
func ByActive ¶
func ByActive(opts ...sql.OrderTermOption) OrderOption
ByActive orders the results by the active field.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByFavorite ¶
func ByFavorite(opts ...sql.OrderTermOption) OrderOption
ByFavorite orders the results by the favorite field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByRead ¶
func ByRead(opts ...sql.OrderTermOption) OrderOption
ByRead orders the results by the read field.
func ByTags ¶
func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTags orders the results by tags terms.
func ByTagsCount ¶
func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
ByTagsCount orders the results by tags count.