Documentation ¶
Index ¶
- Constants
- Variables
- func AncestorsIsNil() predicate.Dept
- func AncestorsNotNil() predicate.Dept
- func And(predicates ...predicate.Dept) predicate.Dept
- func CreatedAt(v time.Time) predicate.Dept
- func CreatedAtEQ(v time.Time) predicate.Dept
- func CreatedAtGT(v time.Time) predicate.Dept
- func CreatedAtGTE(v time.Time) predicate.Dept
- func CreatedAtIn(vs ...time.Time) predicate.Dept
- func CreatedAtIsNil() predicate.Dept
- func CreatedAtLT(v time.Time) predicate.Dept
- func CreatedAtLTE(v time.Time) predicate.Dept
- func CreatedAtNEQ(v time.Time) predicate.Dept
- func CreatedAtNotIn(vs ...time.Time) predicate.Dept
- func CreatedAtNotNil() predicate.Dept
- func DeletedAt(v time.Time) predicate.Dept
- func DeletedAtEQ(v time.Time) predicate.Dept
- func DeletedAtGT(v time.Time) predicate.Dept
- func DeletedAtGTE(v time.Time) predicate.Dept
- func DeletedAtIn(vs ...time.Time) predicate.Dept
- func DeletedAtIsNil() predicate.Dept
- func DeletedAtLT(v time.Time) predicate.Dept
- func DeletedAtLTE(v time.Time) predicate.Dept
- func DeletedAtNEQ(v time.Time) predicate.Dept
- func DeletedAtNotIn(vs ...time.Time) predicate.Dept
- func DeletedAtNotNil() predicate.Dept
- func HasChildren() predicate.Dept
- func HasChildrenWith(preds ...predicate.Dept) predicate.Dept
- func HasParent() predicate.Dept
- func HasParentWith(preds ...predicate.Dept) predicate.Dept
- func ID(id uint32) predicate.Dept
- func IDEQ(id uint32) predicate.Dept
- func IDGT(id uint32) predicate.Dept
- func IDGTE(id uint32) predicate.Dept
- func IDIn(ids ...uint32) predicate.Dept
- func IDLT(id uint32) predicate.Dept
- func IDLTE(id uint32) predicate.Dept
- func IDNEQ(id uint32) predicate.Dept
- func IDNotIn(ids ...uint32) predicate.Dept
- func Name(v string) predicate.Dept
- func NameContains(v string) predicate.Dept
- func NameContainsFold(v string) predicate.Dept
- func NameEQ(v string) predicate.Dept
- func NameEqualFold(v string) predicate.Dept
- func NameGT(v string) predicate.Dept
- func NameGTE(v string) predicate.Dept
- func NameHasPrefix(v string) predicate.Dept
- func NameHasSuffix(v string) predicate.Dept
- func NameIn(vs ...string) predicate.Dept
- func NameLT(v string) predicate.Dept
- func NameLTE(v string) predicate.Dept
- func NameNEQ(v string) predicate.Dept
- func NameNotIn(vs ...string) predicate.Dept
- func Not(p predicate.Dept) predicate.Dept
- func Or(predicates ...predicate.Dept) predicate.Dept
- func ParentID(v uint32) predicate.Dept
- func ParentIDEQ(v uint32) predicate.Dept
- func ParentIDIn(vs ...uint32) predicate.Dept
- func ParentIDIsNil() predicate.Dept
- func ParentIDNEQ(v uint32) predicate.Dept
- func ParentIDNotIn(vs ...uint32) predicate.Dept
- func ParentIDNotNil() predicate.Dept
- func Remark(v string) predicate.Dept
- func RemarkContains(v string) predicate.Dept
- func RemarkContainsFold(v string) predicate.Dept
- func RemarkEQ(v string) predicate.Dept
- func RemarkEqualFold(v string) predicate.Dept
- func RemarkGT(v string) predicate.Dept
- func RemarkGTE(v string) predicate.Dept
- func RemarkHasPrefix(v string) predicate.Dept
- func RemarkHasSuffix(v string) predicate.Dept
- func RemarkIn(vs ...string) predicate.Dept
- func RemarkIsNil() predicate.Dept
- func RemarkLT(v string) predicate.Dept
- func RemarkLTE(v string) predicate.Dept
- func RemarkNEQ(v string) predicate.Dept
- func RemarkNotIn(vs ...string) predicate.Dept
- func RemarkNotNil() predicate.Dept
- func Sort(v int32) predicate.Dept
- func SortEQ(v int32) predicate.Dept
- func SortGT(v int32) predicate.Dept
- func SortGTE(v int32) predicate.Dept
- func SortIn(vs ...int32) predicate.Dept
- func SortLT(v int32) predicate.Dept
- func SortLTE(v int32) predicate.Dept
- func SortNEQ(v int32) predicate.Dept
- func SortNotIn(vs ...int32) predicate.Dept
- func State(v int32) predicate.Dept
- func StateEQ(v int32) predicate.Dept
- func StateGT(v int32) predicate.Dept
- func StateGTE(v int32) predicate.Dept
- func StateIn(vs ...int32) predicate.Dept
- func StateLT(v int32) predicate.Dept
- func StateLTE(v int32) predicate.Dept
- func StateNEQ(v int32) predicate.Dept
- func StateNotIn(vs ...int32) predicate.Dept
- func UpdatedAt(v time.Time) predicate.Dept
- func UpdatedAtEQ(v time.Time) predicate.Dept
- func UpdatedAtGT(v time.Time) predicate.Dept
- func UpdatedAtGTE(v time.Time) predicate.Dept
- func UpdatedAtIn(vs ...time.Time) predicate.Dept
- func UpdatedAtIsNil() predicate.Dept
- func UpdatedAtLT(v time.Time) predicate.Dept
- func UpdatedAtLTE(v time.Time) predicate.Dept
- func UpdatedAtNEQ(v time.Time) predicate.Dept
- func UpdatedAtNotIn(vs ...time.Time) predicate.Dept
- func UpdatedAtNotNil() predicate.Dept
- func ValidColumn(column string) bool
- type OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByParentID(opts ...sql.OrderTermOption) OrderOption
- func ByRemark(opts ...sql.OrderTermOption) OrderOption
- func BySort(opts ...sql.OrderTermOption) OrderOption
- func ByState(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the dept type in the database. Label = "dept" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // FieldRemark holds the string denoting the remark field in the database. FieldRemark = "remark" // FieldSort holds the string denoting the sort field in the database. FieldSort = "sort" // FieldState holds the string denoting the state field in the database. FieldState = "state" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldParentID holds the string denoting the parent_id field in the database. FieldParentID = "parent_id" // FieldAncestors holds the string denoting the ancestors field in the database. FieldAncestors = "ancestors" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // Table holds the table name of the dept in the database. Table = "depts" // ParentTable is the table that holds the parent relation/edge. ParentTable = "depts" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "parent_id" // ChildrenTable is the table that holds the children relation/edge. ChildrenTable = "depts" // ChildrenColumn is the table column denoting the children relation/edge. ChildrenColumn = "parent_id" )
Variables ¶
var ( // DefaultRemark holds the default value on creation for the "remark" field. DefaultRemark string // DefaultSort holds the default value on creation for the "sort" field. DefaultSort int32 // SortValidator is a validator for the "sort" field. It is called by the builders before save. SortValidator func(int32) error // DefaultState holds the default value on creation for the "state" field. DefaultState int32 // StateValidator is a validator for the "state" field. It is called by the builders before save. StateValidator func(int32) error // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultParentID holds the default value on creation for the "parent_id" field. DefaultParentID uint32 // DefaultAncestors holds the default value on creation for the "ancestors" field. DefaultAncestors []int // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(uint32) error )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldRemark, FieldSort, FieldState, FieldName, FieldParentID, FieldAncestors, }
Columns holds all SQL columns for dept fields.
Functions ¶
func AncestorsIsNil ¶
AncestorsIsNil applies the IsNil predicate on the "ancestors" field.
func AncestorsNotNil ¶
AncestorsNotNil applies the NotNil predicate on the "ancestors" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIsNil ¶
CreatedAtIsNil applies the IsNil predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotNil ¶
CreatedAtNotNil applies the NotNil predicate on the "created_at" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" 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 ParentID ¶
ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
func ParentIDEQ ¶
ParentIDEQ applies the EQ predicate on the "parent_id" field.
func ParentIDIn ¶
ParentIDIn applies the In predicate on the "parent_id" field.
func ParentIDIsNil ¶
ParentIDIsNil applies the IsNil predicate on the "parent_id" field.
func ParentIDNEQ ¶
ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
func ParentIDNotIn ¶
ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
func ParentIDNotNil ¶
ParentIDNotNil applies the NotNil predicate on the "parent_id" field.
func Remark ¶
Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ.
func RemarkContains ¶
RemarkContains applies the Contains predicate on the "remark" field.
func RemarkContainsFold ¶
RemarkContainsFold applies the ContainsFold predicate on the "remark" field.
func RemarkEqualFold ¶
RemarkEqualFold applies the EqualFold predicate on the "remark" field.
func RemarkHasPrefix ¶
RemarkHasPrefix applies the HasPrefix predicate on the "remark" field.
func RemarkHasSuffix ¶
RemarkHasSuffix applies the HasSuffix predicate on the "remark" field.
func RemarkIsNil ¶
RemarkIsNil applies the IsNil predicate on the "remark" field.
func RemarkNotIn ¶
RemarkNotIn applies the NotIn predicate on the "remark" field.
func RemarkNotNil ¶
RemarkNotNil applies the NotNil predicate on the "remark" field.
func State ¶
State applies equality check predicate on the "state" field. It's identical to StateEQ.
func StateNotIn ¶
StateNotIn applies the NotIn predicate on the "state" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIsNil ¶
UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotNil ¶
UpdatedAtNotNil applies the NotNil predicate on the "updated_at" 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 Dept queries.
func ByChildren ¶
func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByChildren orders the results by children terms.
func ByChildrenCount ¶
func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
ByChildrenCount orders the results by children count.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDeletedAt ¶
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
ByDeletedAt orders the results by the deleted_at 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 ByParentField ¶
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
ByParentField orders the results by parent field.
func ByParentID ¶
func ByParentID(opts ...sql.OrderTermOption) OrderOption
ByParentID orders the results by the parent_id field.
func ByRemark ¶
func ByRemark(opts ...sql.OrderTermOption) OrderOption
ByRemark orders the results by the remark field.
func BySort ¶
func BySort(opts ...sql.OrderTermOption) OrderOption
BySort orders the results by the sort field.
func ByState ¶
func ByState(opts ...sql.OrderTermOption) OrderOption
ByState orders the results by the state field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.