Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Saves) predicate.Saves
- func Caption(v string) predicate.Saves
- func CaptionContains(v string) predicate.Saves
- func CaptionContainsFold(v string) predicate.Saves
- func CaptionEQ(v string) predicate.Saves
- func CaptionEqualFold(v string) predicate.Saves
- func CaptionGT(v string) predicate.Saves
- func CaptionGTE(v string) predicate.Saves
- func CaptionHasPrefix(v string) predicate.Saves
- func CaptionHasSuffix(v string) predicate.Saves
- func CaptionIn(vs ...string) predicate.Saves
- func CaptionIsNil() predicate.Saves
- func CaptionLT(v string) predicate.Saves
- func CaptionLTE(v string) predicate.Saves
- func CaptionNEQ(v string) predicate.Saves
- func CaptionNotIn(vs ...string) predicate.Saves
- func CaptionNotNil() predicate.Saves
- func CreateTime(v time.Time) predicate.Saves
- func CreateTimeEQ(v time.Time) predicate.Saves
- func CreateTimeGT(v time.Time) predicate.Saves
- func CreateTimeGTE(v time.Time) predicate.Saves
- func CreateTimeIn(vs ...time.Time) predicate.Saves
- func CreateTimeLT(v time.Time) predicate.Saves
- func CreateTimeLTE(v time.Time) predicate.Saves
- func CreateTimeNEQ(v time.Time) predicate.Saves
- func CreateTimeNotIn(vs ...time.Time) predicate.Saves
- func HasDir() predicate.Saves
- func HasDirWith(preds ...predicate.Dirs) predicate.Saves
- func HasFile() predicate.Saves
- func HasFileWith(preds ...predicate.Files) predicate.Saves
- func HasOwner() predicate.Saves
- func HasOwnerWith(preds ...predicate.Users) predicate.Saves
- func ID(id uint64) predicate.Saves
- func IDEQ(id uint64) predicate.Saves
- func IDGT(id uint64) predicate.Saves
- func IDGTE(id uint64) predicate.Saves
- func IDIn(ids ...uint64) predicate.Saves
- func IDLT(id uint64) predicate.Saves
- func IDLTE(id uint64) predicate.Saves
- func IDNEQ(id uint64) predicate.Saves
- func IDNotIn(ids ...uint64) predicate.Saves
- func Name(v string) predicate.Saves
- func NameContains(v string) predicate.Saves
- func NameContainsFold(v string) predicate.Saves
- func NameEQ(v string) predicate.Saves
- func NameEqualFold(v string) predicate.Saves
- func NameGT(v string) predicate.Saves
- func NameGTE(v string) predicate.Saves
- func NameHasPrefix(v string) predicate.Saves
- func NameHasSuffix(v string) predicate.Saves
- func NameIn(vs ...string) predicate.Saves
- func NameLT(v string) predicate.Saves
- func NameLTE(v string) predicate.Saves
- func NameNEQ(v string) predicate.Saves
- func NameNotIn(vs ...string) predicate.Saves
- func Not(p predicate.Saves) predicate.Saves
- func Or(predicates ...predicate.Saves) predicate.Saves
- func UpdateTime(v time.Time) predicate.Saves
- func UpdateTimeEQ(v time.Time) predicate.Saves
- func UpdateTimeGT(v time.Time) predicate.Saves
- func UpdateTimeGTE(v time.Time) predicate.Saves
- func UpdateTimeIn(vs ...time.Time) predicate.Saves
- func UpdateTimeLT(v time.Time) predicate.Saves
- func UpdateTimeLTE(v time.Time) predicate.Saves
- func UpdateTimeNEQ(v time.Time) predicate.Saves
- func UpdateTimeNotIn(vs ...time.Time) predicate.Saves
- func ValidColumn(column string) bool
- type OrderOption
- func ByCaption(opts ...sql.OrderTermOption) OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByDir(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDirCount(opts ...sql.OrderTermOption) OrderOption
- func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the saves type in the database. Label = "saves" // 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" // FieldUpdateTime holds the string denoting the update_time field in the database. FieldUpdateTime = "update_time" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldCaption holds the string denoting the caption field in the database. FieldCaption = "caption" // EdgeFile holds the string denoting the file edge name in mutations. EdgeFile = "file" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // EdgeDir holds the string denoting the dir edge name in mutations. EdgeDir = "dir" // Table holds the table name of the saves in the database. Table = "saves" // FileTable is the table that holds the file relation/edge. FileTable = "saves" // FileInverseTable is the table name for the Files entity. // It exists in this package in order to avoid circular dependency with the "files" package. FileInverseTable = "files" // FileColumn is the table column denoting the file relation/edge. FileColumn = "files_saves" // OwnerTable is the table that holds the owner relation/edge. OwnerTable = "saves" // OwnerInverseTable is the table name for the Users entity. // It exists in this package in order to avoid circular dependency with the "users" package. OwnerInverseTable = "users" // OwnerColumn is the table column denoting the owner relation/edge. OwnerColumn = "users_saves" // DirTable is the table that holds the dir relation/edge. The primary key declared below. DirTable = "dirs_saves" // DirInverseTable is the table name for the Dirs entity. // It exists in this package in order to avoid circular dependency with the "dirs" package. DirInverseTable = "dirs" )
Variables ¶
var ( // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time // DefaultUpdateTime holds the default value on creation for the "update_time" field. DefaultUpdateTime func() time.Time // UpdateDefaultUpdateTime holds the default value on update for the "update_time" field. UpdateDefaultUpdateTime func() time.Time // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // CaptionValidator is a validator for the "caption" field. It is called by the builders before save. CaptionValidator func(string) error )
var Columns = []string{ FieldID, FieldCreateTime, FieldUpdateTime, FieldName, FieldCaption, }
Columns holds all SQL columns for saves fields.
var ( // DirPrimaryKey and DirColumn2 are the table columns denoting the // primary key for the dir relation (M2M). DirPrimaryKey = []string{"dirs_id", "saves_id"} )
var ForeignKeys = []string{
"files_saves",
"users_saves",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "saves" table and are not defined as standalone fields in the schema.
Functions ¶
func Caption ¶
Caption applies equality check predicate on the "caption" field. It's identical to CaptionEQ.
func CaptionContains ¶
CaptionContains applies the Contains predicate on the "caption" field.
func CaptionContainsFold ¶
CaptionContainsFold applies the ContainsFold predicate on the "caption" field.
func CaptionEqualFold ¶
CaptionEqualFold applies the EqualFold predicate on the "caption" field.
func CaptionGTE ¶
CaptionGTE applies the GTE predicate on the "caption" field.
func CaptionHasPrefix ¶
CaptionHasPrefix applies the HasPrefix predicate on the "caption" field.
func CaptionHasSuffix ¶
CaptionHasSuffix applies the HasSuffix predicate on the "caption" field.
func CaptionIsNil ¶
CaptionIsNil applies the IsNil predicate on the "caption" field.
func CaptionLTE ¶
CaptionLTE applies the LTE predicate on the "caption" field.
func CaptionNEQ ¶
CaptionNEQ applies the NEQ predicate on the "caption" field.
func CaptionNotIn ¶
CaptionNotIn applies the NotIn predicate on the "caption" field.
func CaptionNotNil ¶
CaptionNotNil applies the NotNil predicate on the "caption" field.
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 HasDirWith ¶
HasDirWith applies the HasEdge predicate on the "dir" edge with a given conditions (other predicates).
func HasFileWith ¶
HasFileWith applies the HasEdge predicate on the "file" edge with a given conditions (other predicates).
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" 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 UpdateTime ¶
UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTimeEQ ¶
UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeGT ¶
UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGTE ¶
UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeIn ¶
UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeLT ¶
UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLTE ¶
UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeNEQ ¶
UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNotIn ¶
UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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 Saves queries.
func ByCaption ¶
func ByCaption(opts ...sql.OrderTermOption) OrderOption
ByCaption orders the results by the caption field.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByDir ¶
func ByDir(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByDir orders the results by dir terms.
func ByDirCount ¶
func ByDirCount(opts ...sql.OrderTermOption) OrderOption
ByDirCount orders the results by dir count.
func ByFileField ¶
func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption
ByFileField orders the results by file 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 ByOwnerField ¶
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
ByOwnerField orders the results by owner field.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time field.