history

package
v0.0.0-...-47c950a Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the history type in the database.
	Label = "history"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// EdgeItem holds the string denoting the item edge name in mutations.
	EdgeItem = "item"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the history in the database.
	Table = "histories"
	// ItemTable is the table that holds the item relation/edge.
	ItemTable = "histories"
	// ItemInverseTable is the table name for the Meta entity.
	// It exists in this package in order to avoid circular dependency with the "meta" package.
	ItemInverseTable = "meta"
	// ItemColumn is the table column denoting the item relation/edge.
	ItemColumn = "meta_histories"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "histories"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_histories"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldCreateTime,
}

Columns holds all SQL columns for history fields.

View Source
var (
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
)
View Source
var ForeignKeys = []string{
	"meta_histories",
	"user_histories",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "histories" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.History) predicate.History

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.History

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.History

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.History

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.History

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.History

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.History

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.History

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

func CreateTimeNotIn

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

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

func HasItem

func HasItem() predicate.History

HasItem applies the HasEdge predicate on the "item" edge.

func HasItemWith

func HasItemWith(preds ...predicate.Meta) predicate.History

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

func HasUser

func HasUser() predicate.History

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.History

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

func ID

func ID(id int) predicate.History

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.History

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.History

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.History

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.History

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.History

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.History

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.History) predicate.History

Or groups predicates with the OR operator between them.

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 History queries.

func ByCreateTime

func ByCreateTime(opts ...sql.OrderTermOption) OrderOption

ByCreateTime orders the results by the create_time field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByItemField

func ByItemField(field string, opts ...sql.OrderTermOption) OrderOption

ByItemField orders the results by item field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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