Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.History) predicate.History
- func CreateTime(v time.Time) predicate.History
- func CreateTimeEQ(v time.Time) predicate.History
- func CreateTimeGT(v time.Time) predicate.History
- func CreateTimeGTE(v time.Time) predicate.History
- func CreateTimeIn(vs ...time.Time) predicate.History
- func CreateTimeLT(v time.Time) predicate.History
- func CreateTimeLTE(v time.Time) predicate.History
- func CreateTimeNEQ(v time.Time) predicate.History
- func CreateTimeNotIn(vs ...time.Time) predicate.History
- func HasItem() predicate.History
- func HasItemWith(preds ...predicate.Meta) predicate.History
- func HasUser() predicate.History
- func HasUserWith(preds ...predicate.User) predicate.History
- func ID(id int) predicate.History
- func IDEQ(id int) predicate.History
- func IDGT(id int) predicate.History
- func IDGTE(id int) predicate.History
- func IDIn(ids ...int) predicate.History
- func IDLT(id int) predicate.History
- func IDLTE(id int) predicate.History
- func IDNEQ(id int) predicate.History
- func IDNotIn(ids ...int) predicate.History
- func Not(p predicate.History) predicate.History
- func Or(predicates ...predicate.History) predicate.History
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
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 ¶
var Columns = []string{ FieldID, FieldCreateTime, }
Columns holds all SQL columns for history fields.
var ( // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time )
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 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 HasItemWith ¶
HasItemWith applies the HasEdge predicate on the "item" edge with a given conditions (other predicates).
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
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 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.