meta

package
v0.0.0-...-77d2946 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)

Columns holds all SQL columns for meta fields.

View Source
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

func Active(v bool) predicate.Meta

Active applies equality check predicate on the "active" field. It's identical to ActiveEQ.

func ActiveEQ

func ActiveEQ(v bool) predicate.Meta

ActiveEQ applies the EQ predicate on the "active" field.

func ActiveNEQ

func ActiveNEQ(v bool) predicate.Meta

ActiveNEQ applies the NEQ predicate on the "active" field.

func And

func And(predicates ...predicate.Meta) predicate.Meta

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.Meta

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Meta

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Meta

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Meta

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Meta

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Meta

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Meta

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Meta

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Meta

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Favorite

func Favorite(v bool) predicate.Meta

Favorite applies equality check predicate on the "favorite" field. It's identical to FavoriteEQ.

func FavoriteEQ

func FavoriteEQ(v bool) predicate.Meta

FavoriteEQ applies the EQ predicate on the "favorite" field.

func FavoriteNEQ

func FavoriteNEQ(v bool) predicate.Meta

FavoriteNEQ applies the NEQ predicate on the "favorite" field.

func HasTags

func HasTags() predicate.Meta

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.Meta

HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Meta

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Meta

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Meta

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Meta

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Meta

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Meta

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Meta

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Meta

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Meta

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Meta

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Meta

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Meta

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Meta

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Meta

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Meta

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Meta

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Meta

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Meta

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Meta

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Meta

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Meta

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Meta

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Meta

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Meta) predicate.Meta

Or groups predicates with the OR operator between them.

func Read

func Read(v bool) predicate.Meta

Read applies equality check predicate on the "read" field. It's identical to ReadEQ.

func ReadEQ

func ReadEQ(v bool) predicate.Meta

ReadEQ applies the EQ predicate on the "read" field.

func ReadNEQ

func ReadNEQ(v bool) predicate.Meta

ReadNEQ applies the NEQ predicate on the "read" field.

func Thumbnail

func Thumbnail(v []byte) predicate.Meta

Thumbnail applies equality check predicate on the "thumbnail" field. It's identical to ThumbnailEQ.

func ThumbnailEQ

func ThumbnailEQ(v []byte) predicate.Meta

ThumbnailEQ applies the EQ predicate on the "thumbnail" field.

func ThumbnailGT

func ThumbnailGT(v []byte) predicate.Meta

ThumbnailGT applies the GT predicate on the "thumbnail" field.

func ThumbnailGTE

func ThumbnailGTE(v []byte) predicate.Meta

ThumbnailGTE applies the GTE predicate on the "thumbnail" field.

func ThumbnailIn

func ThumbnailIn(vs ...[]byte) predicate.Meta

ThumbnailIn applies the In predicate on the "thumbnail" field.

func ThumbnailIsNil

func ThumbnailIsNil() predicate.Meta

ThumbnailIsNil applies the IsNil predicate on the "thumbnail" field.

func ThumbnailLT

func ThumbnailLT(v []byte) predicate.Meta

ThumbnailLT applies the LT predicate on the "thumbnail" field.

func ThumbnailLTE

func ThumbnailLTE(v []byte) predicate.Meta

ThumbnailLTE applies the LTE predicate on the "thumbnail" field.

func ThumbnailNEQ

func ThumbnailNEQ(v []byte) predicate.Meta

ThumbnailNEQ applies the NEQ predicate on the "thumbnail" field.

func ThumbnailNotIn

func ThumbnailNotIn(vs ...[]byte) predicate.Meta

ThumbnailNotIn applies the NotIn predicate on the "thumbnail" field.

func ThumbnailNotNil

func ThumbnailNotNil() predicate.Meta

ThumbnailNotNil applies the NotNil predicate on the "thumbnail" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL