Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Position) predicate.Position
- func Code(v string) predicate.Position
- func CodeContains(v string) predicate.Position
- func CodeContainsFold(v string) predicate.Position
- func CodeEQ(v string) predicate.Position
- func CodeEqualFold(v string) predicate.Position
- func CodeGT(v string) predicate.Position
- func CodeGTE(v string) predicate.Position
- func CodeHasPrefix(v string) predicate.Position
- func CodeHasSuffix(v string) predicate.Position
- func CodeIn(vs ...string) predicate.Position
- func CodeLT(v string) predicate.Position
- func CodeLTE(v string) predicate.Position
- func CodeNEQ(v string) predicate.Position
- func CodeNotIn(vs ...string) predicate.Position
- func CreatedAt(v time.Time) predicate.Position
- func CreatedAtEQ(v time.Time) predicate.Position
- func CreatedAtGT(v time.Time) predicate.Position
- func CreatedAtGTE(v time.Time) predicate.Position
- func CreatedAtIn(vs ...time.Time) predicate.Position
- func CreatedAtLT(v time.Time) predicate.Position
- func CreatedAtLTE(v time.Time) predicate.Position
- func CreatedAtNEQ(v time.Time) predicate.Position
- func CreatedAtNotIn(vs ...time.Time) predicate.Position
- func HasUsers() predicate.Position
- func HasUsersWith(preds ...predicate.User) predicate.Position
- func ID(id uint64) predicate.Position
- func IDEQ(id uint64) predicate.Position
- func IDGT(id uint64) predicate.Position
- func IDGTE(id uint64) predicate.Position
- func IDIn(ids ...uint64) predicate.Position
- func IDLT(id uint64) predicate.Position
- func IDLTE(id uint64) predicate.Position
- func IDNEQ(id uint64) predicate.Position
- func IDNotIn(ids ...uint64) predicate.Position
- func Name(v string) predicate.Position
- func NameContains(v string) predicate.Position
- func NameContainsFold(v string) predicate.Position
- func NameEQ(v string) predicate.Position
- func NameEqualFold(v string) predicate.Position
- func NameGT(v string) predicate.Position
- func NameGTE(v string) predicate.Position
- func NameHasPrefix(v string) predicate.Position
- func NameHasSuffix(v string) predicate.Position
- func NameIn(vs ...string) predicate.Position
- func NameLT(v string) predicate.Position
- func NameLTE(v string) predicate.Position
- func NameNEQ(v string) predicate.Position
- func NameNotIn(vs ...string) predicate.Position
- func Not(p predicate.Position) predicate.Position
- func Or(predicates ...predicate.Position) predicate.Position
- func Remark(v string) predicate.Position
- func RemarkContains(v string) predicate.Position
- func RemarkContainsFold(v string) predicate.Position
- func RemarkEQ(v string) predicate.Position
- func RemarkEqualFold(v string) predicate.Position
- func RemarkGT(v string) predicate.Position
- func RemarkGTE(v string) predicate.Position
- func RemarkHasPrefix(v string) predicate.Position
- func RemarkHasSuffix(v string) predicate.Position
- func RemarkIn(vs ...string) predicate.Position
- func RemarkIsNil() predicate.Position
- func RemarkLT(v string) predicate.Position
- func RemarkLTE(v string) predicate.Position
- func RemarkNEQ(v string) predicate.Position
- func RemarkNotIn(vs ...string) predicate.Position
- func RemarkNotNil() predicate.Position
- func Sort(v uint32) predicate.Position
- func SortEQ(v uint32) predicate.Position
- func SortGT(v uint32) predicate.Position
- func SortGTE(v uint32) predicate.Position
- func SortIn(vs ...uint32) predicate.Position
- func SortLT(v uint32) predicate.Position
- func SortLTE(v uint32) predicate.Position
- func SortNEQ(v uint32) predicate.Position
- func SortNotIn(vs ...uint32) predicate.Position
- func Status(v uint8) predicate.Position
- func StatusEQ(v uint8) predicate.Position
- func StatusGT(v uint8) predicate.Position
- func StatusGTE(v uint8) predicate.Position
- func StatusIn(vs ...uint8) predicate.Position
- func StatusIsNil() predicate.Position
- func StatusLT(v uint8) predicate.Position
- func StatusLTE(v uint8) predicate.Position
- func StatusNEQ(v uint8) predicate.Position
- func StatusNotIn(vs ...uint8) predicate.Position
- func StatusNotNil() predicate.Position
- func UpdatedAt(v time.Time) predicate.Position
- func UpdatedAtEQ(v time.Time) predicate.Position
- func UpdatedAtGT(v time.Time) predicate.Position
- func UpdatedAtGTE(v time.Time) predicate.Position
- func UpdatedAtIn(vs ...time.Time) predicate.Position
- func UpdatedAtLT(v time.Time) predicate.Position
- func UpdatedAtLTE(v time.Time) predicate.Position
- func UpdatedAtNEQ(v time.Time) predicate.Position
- func UpdatedAtNotIn(vs ...time.Time) predicate.Position
- func ValidColumn(column string) bool
- type OrderOption
- func ByCode(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRemark(opts ...sql.OrderTermOption) OrderOption
- func BySort(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the position type in the database. Label = "position" // 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" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldSort holds the string denoting the sort field in the database. FieldSort = "sort" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldCode holds the string denoting the code field in the database. FieldCode = "code" // FieldRemark holds the string denoting the remark field in the database. FieldRemark = "remark" // EdgeUsers holds the string denoting the users edge name in mutations. EdgeUsers = "users" // Table holds the table name of the position in the database. Table = "sys_positions" // UsersTable is the table that holds the users relation/edge. The primary key declared below. UsersTable = "user_positions" // UsersInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UsersInverseTable = "sys_users" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus uint8 // DefaultSort holds the default value on creation for the "sort" field. DefaultSort uint32 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldSort, FieldName, FieldCode, FieldRemark, }
Columns holds all SQL columns for position fields.
var ( // UsersPrimaryKey and UsersColumn2 are the table columns denoting the // primary key for the users relation (M2M). UsersPrimaryKey = []string{"user_id", "position_id"} )
Functions ¶
func CodeContains ¶
CodeContains applies the Contains predicate on the "code" field.
func CodeContainsFold ¶
CodeContainsFold applies the ContainsFold predicate on the "code" field.
func CodeEqualFold ¶
CodeEqualFold applies the EqualFold predicate on the "code" field.
func CodeHasPrefix ¶
CodeHasPrefix applies the HasPrefix predicate on the "code" field.
func CodeHasSuffix ¶
CodeHasSuffix applies the HasSuffix predicate on the "code" 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 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 HasUsersWith ¶
HasUsersWith applies the HasEdge predicate on the "users" 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 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 ¶ added in v1.0.13
RemarkIsNil applies the IsNil predicate on the "remark" field.
func RemarkNotIn ¶
RemarkNotIn applies the NotIn predicate on the "remark" field.
func RemarkNotNil ¶ added in v1.0.13
RemarkNotNil applies the NotNil predicate on the "remark" field.
func Status ¶
Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func StatusIsNil ¶
StatusIsNil applies the IsNil predicate on the "status" field.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotNil ¶
StatusNotNil applies the NotNil predicate on the "status" 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 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶ added in v1.0.0
OrderOption defines the ordering options for the Position queries.
func ByCode ¶ added in v1.0.0
func ByCode(opts ...sql.OrderTermOption) OrderOption
ByCode orders the results by the code field.
func ByCreatedAt ¶ added in v1.0.0
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByID ¶ added in v1.0.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶ added in v1.0.0
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByRemark ¶ added in v1.0.0
func ByRemark(opts ...sql.OrderTermOption) OrderOption
ByRemark orders the results by the remark field.
func BySort ¶ added in v1.0.0
func BySort(opts ...sql.OrderTermOption) OrderOption
BySort orders the results by the sort field.
func ByStatus ¶ added in v1.0.0
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByUpdatedAt ¶ added in v1.0.0
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUsers ¶ added in v1.0.0
func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByUsers orders the results by users terms.
func ByUsersCount ¶ added in v1.0.0
func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
ByUsersCount orders the results by users count.