ent

package
v0.0.0-...-c1ffc38 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 59 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeApp               = "App"
	TypeAppAction         = "AppAction"
	TypeAppDict           = "AppDict"
	TypeAppDictItem       = "AppDictItem"
	TypeAppMenu           = "AppMenu"
	TypeAppPolicy         = "AppPolicy"
	TypeAppRes            = "AppRes"
	TypeAppRole           = "AppRole"
	TypeAppRolePolicy     = "AppRolePolicy"
	TypeFile              = "File"
	TypeFileSource        = "FileSource"
	TypeOauthClient       = "OauthClient"
	TypeOrg               = "Org"
	TypeOrgApp            = "OrgApp"
	TypeOrgPolicy         = "OrgPolicy"
	TypeOrgRole           = "OrgRole"
	TypeOrgRoleUser       = "OrgRoleUser"
	TypeOrgUser           = "OrgUser"
	TypeOrgUserPreference = "OrgUserPreference"
	TypePermission        = "Permission"
	TypeUser              = "User"
	TypeUserDevice        = "UserDevice"
	TypeUserIdentity      = "UserIdentity"
	TypeUserLoginProfile  = "UserLoginProfile"
	TypeUserPassword      = "UserPassword"
)

Variables

View Source
var (
	// AppDictItemOrderFieldCreatedAt orders AppDictItem by created_at.
	AppDictItemOrderFieldCreatedAt = &AppDictItemOrderField{
		Value: func(adi *AppDictItem) (ent.Value, error) {
			return adi.CreatedAt, nil
		},
		column: appdictitem.FieldCreatedAt,
		toTerm: appdictitem.ByCreatedAt,
		toCursor: func(adi *AppDictItem) Cursor {
			return Cursor{
				ID:    adi.ID,
				Value: adi.CreatedAt,
			}
		},
	}
	// AppDictItemOrderFieldDisplaySort orders AppDictItem by display_sort.
	AppDictItemOrderFieldDisplaySort = &AppDictItemOrderField{
		Value: func(adi *AppDictItem) (ent.Value, error) {
			return adi.DisplaySort, nil
		},
		column: appdictitem.FieldDisplaySort,
		toTerm: appdictitem.ByDisplaySort,
		toCursor: func(adi *AppDictItem) Cursor {
			return Cursor{
				ID:    adi.ID,
				Value: adi.DisplaySort,
			}
		},
	}
)
View Source
var (
	// AppMenuOrderFieldCreatedAt orders AppMenu by created_at.
	AppMenuOrderFieldCreatedAt = &AppMenuOrderField{
		Value: func(am *AppMenu) (ent.Value, error) {
			return am.CreatedAt, nil
		},
		column: appmenu.FieldCreatedAt,
		toTerm: appmenu.ByCreatedAt,
		toCursor: func(am *AppMenu) Cursor {
			return Cursor{
				ID:    am.ID,
				Value: am.CreatedAt,
			}
		},
	}
	// AppMenuOrderFieldDisplaySort orders AppMenu by display_sort.
	AppMenuOrderFieldDisplaySort = &AppMenuOrderField{
		Value: func(am *AppMenu) (ent.Value, error) {
			return am.DisplaySort, nil
		},
		column: appmenu.FieldDisplaySort,
		toTerm: appmenu.ByDisplaySort,
		toCursor: func(am *AppMenu) Cursor {
			return Cursor{
				ID:    am.ID,
				Value: am.DisplaySort,
			}
		},
	}
)
View Source
var (
	// OrgOrderFieldCreatedAt orders Org by created_at.
	OrgOrderFieldCreatedAt = &OrgOrderField{
		Value: func(o *Org) (ent.Value, error) {
			return o.CreatedAt, nil
		},
		column: org.FieldCreatedAt,
		toTerm: org.ByCreatedAt,
		toCursor: func(o *Org) Cursor {
			return Cursor{
				ID:    o.ID,
				Value: o.CreatedAt,
			}
		},
	}
	// OrgOrderFieldDisplaySort orders Org by display_sort.
	OrgOrderFieldDisplaySort = &OrgOrderField{
		Value: func(o *Org) (ent.Value, error) {
			return o.DisplaySort, nil
		},
		column: org.FieldDisplaySort,
		toTerm: org.ByDisplaySort,
		toCursor: func(o *Org) Cursor {
			return Cursor{
				ID:    o.ID,
				Value: o.DisplaySort,
			}
		},
	}
)
View Source
var (
	// AppActionOrderFieldCreatedAt orders AppAction by created_at.
	AppActionOrderFieldCreatedAt = &AppActionOrderField{
		Value: func(aa *AppAction) (ent.Value, error) {
			return aa.CreatedAt, nil
		},
		column: appaction.FieldCreatedAt,
		toTerm: appaction.ByCreatedAt,
		toCursor: func(aa *AppAction) Cursor {
			return Cursor{
				ID:    aa.ID,
				Value: aa.CreatedAt,
			}
		},
	}
)
View Source
var (
	// AppDictOrderFieldCreatedAt orders AppDict by created_at.
	AppDictOrderFieldCreatedAt = &AppDictOrderField{
		Value: func(ad *AppDict) (ent.Value, error) {
			return ad.CreatedAt, nil
		},
		column: appdict.FieldCreatedAt,
		toTerm: appdict.ByCreatedAt,
		toCursor: func(ad *AppDict) Cursor {
			return Cursor{
				ID:    ad.ID,
				Value: ad.CreatedAt,
			}
		},
	}
)
View Source
var (
	// AppOrderFieldCreatedAt orders App by created_at.
	AppOrderFieldCreatedAt = &AppOrderField{
		Value: func(a *App) (ent.Value, error) {
			return a.CreatedAt, nil
		},
		column: app.FieldCreatedAt,
		toTerm: app.ByCreatedAt,
		toCursor: func(a *App) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.CreatedAt,
			}
		},
	}
)
View Source
var (
	// AppPolicyOrderFieldCreatedAt orders AppPolicy by created_at.
	AppPolicyOrderFieldCreatedAt = &AppPolicyOrderField{
		Value: func(ap *AppPolicy) (ent.Value, error) {
			return ap.CreatedAt, nil
		},
		column: apppolicy.FieldCreatedAt,
		toTerm: apppolicy.ByCreatedAt,
		toCursor: func(ap *AppPolicy) Cursor {
			return Cursor{
				ID:    ap.ID,
				Value: ap.CreatedAt,
			}
		},
	}
)
View Source
var (
	// AppResOrderFieldCreatedAt orders AppRes by created_at.
	AppResOrderFieldCreatedAt = &AppResOrderField{
		Value: func(ar *AppRes) (ent.Value, error) {
			return ar.CreatedAt, nil
		},
		column: appres.FieldCreatedAt,
		toTerm: appres.ByCreatedAt,
		toCursor: func(ar *AppRes) Cursor {
			return Cursor{
				ID:    ar.ID,
				Value: ar.CreatedAt,
			}
		},
	}
)
View Source
var (
	// AppRoleOrderFieldCreatedAt orders AppRole by created_at.
	AppRoleOrderFieldCreatedAt = &AppRoleOrderField{
		Value: func(ar *AppRole) (ent.Value, error) {
			return ar.CreatedAt, nil
		},
		column: approle.FieldCreatedAt,
		toTerm: approle.ByCreatedAt,
		toCursor: func(ar *AppRole) Cursor {
			return Cursor{
				ID:    ar.ID,
				Value: ar.CreatedAt,
			}
		},
	}
)
View Source
var DefaultAppActionOrder = &AppActionOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppActionOrderField{
		Value: func(aa *AppAction) (ent.Value, error) {
			return aa.ID, nil
		},
		column: appaction.FieldID,
		toTerm: appaction.ByID,
		toCursor: func(aa *AppAction) Cursor {
			return Cursor{ID: aa.ID}
		},
	},
}

DefaultAppActionOrder is the default ordering of AppAction.

View Source
var DefaultAppDictItemOrder = &AppDictItemOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppDictItemOrderField{
		Value: func(adi *AppDictItem) (ent.Value, error) {
			return adi.ID, nil
		},
		column: appdictitem.FieldID,
		toTerm: appdictitem.ByID,
		toCursor: func(adi *AppDictItem) Cursor {
			return Cursor{ID: adi.ID}
		},
	},
}

DefaultAppDictItemOrder is the default ordering of AppDictItem.

View Source
var DefaultAppDictOrder = &AppDictOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppDictOrderField{
		Value: func(ad *AppDict) (ent.Value, error) {
			return ad.ID, nil
		},
		column: appdict.FieldID,
		toTerm: appdict.ByID,
		toCursor: func(ad *AppDict) Cursor {
			return Cursor{ID: ad.ID}
		},
	},
}

DefaultAppDictOrder is the default ordering of AppDict.

View Source
var DefaultAppMenuOrder = &AppMenuOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppMenuOrderField{
		Value: func(am *AppMenu) (ent.Value, error) {
			return am.ID, nil
		},
		column: appmenu.FieldID,
		toTerm: appmenu.ByID,
		toCursor: func(am *AppMenu) Cursor {
			return Cursor{ID: am.ID}
		},
	},
}

DefaultAppMenuOrder is the default ordering of AppMenu.

View Source
var DefaultAppOrder = &AppOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppOrderField{
		Value: func(a *App) (ent.Value, error) {
			return a.ID, nil
		},
		column: app.FieldID,
		toTerm: app.ByID,
		toCursor: func(a *App) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultAppOrder is the default ordering of App.

View Source
var DefaultAppPolicyOrder = &AppPolicyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppPolicyOrderField{
		Value: func(ap *AppPolicy) (ent.Value, error) {
			return ap.ID, nil
		},
		column: apppolicy.FieldID,
		toTerm: apppolicy.ByID,
		toCursor: func(ap *AppPolicy) Cursor {
			return Cursor{ID: ap.ID}
		},
	},
}

DefaultAppPolicyOrder is the default ordering of AppPolicy.

View Source
var DefaultAppResOrder = &AppResOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppResOrderField{
		Value: func(ar *AppRes) (ent.Value, error) {
			return ar.ID, nil
		},
		column: appres.FieldID,
		toTerm: appres.ByID,
		toCursor: func(ar *AppRes) Cursor {
			return Cursor{ID: ar.ID}
		},
	},
}

DefaultAppResOrder is the default ordering of AppRes.

View Source
var DefaultAppRoleOrder = &AppRoleOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppRoleOrderField{
		Value: func(ar *AppRole) (ent.Value, error) {
			return ar.ID, nil
		},
		column: approle.FieldID,
		toTerm: approle.ByID,
		toCursor: func(ar *AppRole) Cursor {
			return Cursor{ID: ar.ID}
		},
	},
}

DefaultAppRoleOrder is the default ordering of AppRole.

View Source
var DefaultFileOrder = &FileOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &FileOrderField{
		Value: func(f *File) (ent.Value, error) {
			return f.ID, nil
		},
		column: file.FieldID,
		toTerm: file.ByID,
		toCursor: func(f *File) Cursor {
			return Cursor{ID: f.ID}
		},
	},
}

DefaultFileOrder is the default ordering of File.

View Source
var DefaultFileSourceOrder = &FileSourceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &FileSourceOrderField{
		Value: func(fs *FileSource) (ent.Value, error) {
			return fs.ID, nil
		},
		column: filesource.FieldID,
		toTerm: filesource.ByID,
		toCursor: func(fs *FileSource) Cursor {
			return Cursor{ID: fs.ID}
		},
	},
}

DefaultFileSourceOrder is the default ordering of FileSource.

View Source
var DefaultOauthClientOrder = &OauthClientOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OauthClientOrderField{
		Value: func(oc *OauthClient) (ent.Value, error) {
			return oc.ID, nil
		},
		column: oauthclient.FieldID,
		toTerm: oauthclient.ByID,
		toCursor: func(oc *OauthClient) Cursor {
			return Cursor{ID: oc.ID}
		},
	},
}

DefaultOauthClientOrder is the default ordering of OauthClient.

View Source
var DefaultOrgOrder = &OrgOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OrgOrderField{
		Value: func(o *Org) (ent.Value, error) {
			return o.ID, nil
		},
		column: org.FieldID,
		toTerm: org.ByID,
		toCursor: func(o *Org) Cursor {
			return Cursor{ID: o.ID}
		},
	},
}

DefaultOrgOrder is the default ordering of Org.

View Source
var DefaultOrgPolicyOrder = &OrgPolicyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OrgPolicyOrderField{
		Value: func(op *OrgPolicy) (ent.Value, error) {
			return op.ID, nil
		},
		column: orgpolicy.FieldID,
		toTerm: orgpolicy.ByID,
		toCursor: func(op *OrgPolicy) Cursor {
			return Cursor{ID: op.ID}
		},
	},
}

DefaultOrgPolicyOrder is the default ordering of OrgPolicy.

View Source
var DefaultOrgRoleOrder = &OrgRoleOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OrgRoleOrderField{
		Value: func(or *OrgRole) (ent.Value, error) {
			return or.ID, nil
		},
		column: orgrole.FieldID,
		toTerm: orgrole.ByID,
		toCursor: func(or *OrgRole) Cursor {
			return Cursor{ID: or.ID}
		},
	},
}

DefaultOrgRoleOrder is the default ordering of OrgRole.

View Source
var DefaultOrgUserPreferenceOrder = &OrgUserPreferenceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &OrgUserPreferenceOrderField{
		Value: func(oup *OrgUserPreference) (ent.Value, error) {
			return oup.ID, nil
		},
		column: orguserpreference.FieldID,
		toTerm: orguserpreference.ByID,
		toCursor: func(oup *OrgUserPreference) Cursor {
			return Cursor{ID: oup.ID}
		},
	},
}

DefaultOrgUserPreferenceOrder is the default ordering of OrgUserPreference.

View Source
var DefaultPermissionOrder = &PermissionOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &PermissionOrderField{
		Value: func(pe *Permission) (ent.Value, error) {
			return pe.ID, nil
		},
		column: permission.FieldID,
		toTerm: permission.ByID,
		toCursor: func(pe *Permission) Cursor {
			return Cursor{ID: pe.ID}
		},
	},
}

DefaultPermissionOrder is the default ordering of Permission.

View Source
var DefaultUserDeviceOrder = &UserDeviceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserDeviceOrderField{
		Value: func(ud *UserDevice) (ent.Value, error) {
			return ud.ID, nil
		},
		column: userdevice.FieldID,
		toTerm: userdevice.ByID,
		toCursor: func(ud *UserDevice) Cursor {
			return Cursor{ID: ud.ID}
		},
	},
}

DefaultUserDeviceOrder is the default ordering of UserDevice.

View Source
var DefaultUserIdentityOrder = &UserIdentityOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserIdentityOrderField{
		Value: func(ui *UserIdentity) (ent.Value, error) {
			return ui.ID, nil
		},
		column: useridentity.FieldID,
		toTerm: useridentity.ByID,
		toCursor: func(ui *UserIdentity) Cursor {
			return Cursor{ID: ui.ID}
		},
	},
}

DefaultUserIdentityOrder is the default ordering of UserIdentity.

View Source
var DefaultUserLoginProfileOrder = &UserLoginProfileOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserLoginProfileOrderField{
		Value: func(ulp *UserLoginProfile) (ent.Value, error) {
			return ulp.ID, nil
		},
		column: userloginprofile.FieldID,
		toTerm: userloginprofile.ByID,
		toCursor: func(ulp *UserLoginProfile) Cursor {
			return Cursor{ID: ulp.ID}
		},
	},
}

DefaultUserLoginProfileOrder is the default ordering of UserLoginProfile.

View Source
var DefaultUserOrder = &UserOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserOrderField{
		Value: func(u *User) (ent.Value, error) {
			return u.ID, nil
		},
		column: user.FieldID,
		toTerm: user.ByID,
		toCursor: func(u *User) Cursor {
			return Cursor{ID: u.ID}
		},
	},
}

DefaultUserOrder is the default ordering of User.

View Source
var DefaultUserPasswordOrder = &UserPasswordOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserPasswordOrderField{
		Value: func(up *UserPassword) (ent.Value, error) {
			return up.ID, nil
		},
		column: userpassword.FieldID,
		toTerm: userpassword.ByID,
		toCursor: func(up *UserPassword) Cursor {
			return Cursor{ID: up.ID}
		},
	},
}

DefaultUserPasswordOrder is the default ordering of UserPassword.

View Source
var ErrEmptyAppActionWhereInput = errors.New("ent: empty predicate AppActionWhereInput")

ErrEmptyAppActionWhereInput is returned in case the AppActionWhereInput is empty.

View Source
var ErrEmptyAppDictItemWhereInput = errors.New("ent: empty predicate AppDictItemWhereInput")

ErrEmptyAppDictItemWhereInput is returned in case the AppDictItemWhereInput is empty.

View Source
var ErrEmptyAppDictWhereInput = errors.New("ent: empty predicate AppDictWhereInput")

ErrEmptyAppDictWhereInput is returned in case the AppDictWhereInput is empty.

View Source
var ErrEmptyAppMenuWhereInput = errors.New("ent: empty predicate AppMenuWhereInput")

ErrEmptyAppMenuWhereInput is returned in case the AppMenuWhereInput is empty.

View Source
var ErrEmptyAppPolicyWhereInput = errors.New("ent: empty predicate AppPolicyWhereInput")

ErrEmptyAppPolicyWhereInput is returned in case the AppPolicyWhereInput is empty.

View Source
var ErrEmptyAppResWhereInput = errors.New("ent: empty predicate AppResWhereInput")

ErrEmptyAppResWhereInput is returned in case the AppResWhereInput is empty.

View Source
var ErrEmptyAppRolePolicyWhereInput = errors.New("ent: empty predicate AppRolePolicyWhereInput")

ErrEmptyAppRolePolicyWhereInput is returned in case the AppRolePolicyWhereInput is empty.

View Source
var ErrEmptyAppRoleWhereInput = errors.New("ent: empty predicate AppRoleWhereInput")

ErrEmptyAppRoleWhereInput is returned in case the AppRoleWhereInput is empty.

View Source
var ErrEmptyAppWhereInput = errors.New("ent: empty predicate AppWhereInput")

ErrEmptyAppWhereInput is returned in case the AppWhereInput is empty.

View Source
var ErrEmptyFileSourceWhereInput = errors.New("ent: empty predicate FileSourceWhereInput")

ErrEmptyFileSourceWhereInput is returned in case the FileSourceWhereInput is empty.

View Source
var ErrEmptyFileWhereInput = errors.New("ent: empty predicate FileWhereInput")

ErrEmptyFileWhereInput is returned in case the FileWhereInput is empty.

View Source
var ErrEmptyOauthClientWhereInput = errors.New("ent: empty predicate OauthClientWhereInput")

ErrEmptyOauthClientWhereInput is returned in case the OauthClientWhereInput is empty.

View Source
var ErrEmptyOrgPolicyWhereInput = errors.New("ent: empty predicate OrgPolicyWhereInput")

ErrEmptyOrgPolicyWhereInput is returned in case the OrgPolicyWhereInput is empty.

View Source
var ErrEmptyOrgRoleUserWhereInput = errors.New("ent: empty predicate OrgRoleUserWhereInput")

ErrEmptyOrgRoleUserWhereInput is returned in case the OrgRoleUserWhereInput is empty.

View Source
var ErrEmptyOrgRoleWhereInput = errors.New("ent: empty predicate OrgRoleWhereInput")

ErrEmptyOrgRoleWhereInput is returned in case the OrgRoleWhereInput is empty.

View Source
var ErrEmptyOrgUserPreferenceWhereInput = errors.New("ent: empty predicate OrgUserPreferenceWhereInput")

ErrEmptyOrgUserPreferenceWhereInput is returned in case the OrgUserPreferenceWhereInput is empty.

View Source
var ErrEmptyOrgUserWhereInput = errors.New("ent: empty predicate OrgUserWhereInput")

ErrEmptyOrgUserWhereInput is returned in case the OrgUserWhereInput is empty.

View Source
var ErrEmptyOrgWhereInput = errors.New("ent: empty predicate OrgWhereInput")

ErrEmptyOrgWhereInput is returned in case the OrgWhereInput is empty.

View Source
var ErrEmptyPermissionWhereInput = errors.New("ent: empty predicate PermissionWhereInput")

ErrEmptyPermissionWhereInput is returned in case the PermissionWhereInput is empty.

View Source
var ErrEmptyUserDeviceWhereInput = errors.New("ent: empty predicate UserDeviceWhereInput")

ErrEmptyUserDeviceWhereInput is returned in case the UserDeviceWhereInput is empty.

View Source
var ErrEmptyUserIdentityWhereInput = errors.New("ent: empty predicate UserIdentityWhereInput")

ErrEmptyUserIdentityWhereInput is returned in case the UserIdentityWhereInput is empty.

View Source
var ErrEmptyUserLoginProfileWhereInput = errors.New("ent: empty predicate UserLoginProfileWhereInput")

ErrEmptyUserLoginProfileWhereInput is returned in case the UserLoginProfileWhereInput is empty.

View Source
var ErrEmptyUserPasswordWhereInput = errors.New("ent: empty predicate UserPasswordWhereInput")

ErrEmptyUserPasswordWhereInput is returned in case the UserPasswordWhereInput is empty.

View Source
var ErrEmptyUserWhereInput = errors.New("ent: empty predicate UserWhereInput")

ErrEmptyUserWhereInput is returned in case the UserWhereInput is empty.

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

View Source
var (
	// FileOrderFieldCreatedAt orders File by created_at.
	FileOrderFieldCreatedAt = &FileOrderField{
		Value: func(f *File) (ent.Value, error) {
			return f.CreatedAt, nil
		},
		column: file.FieldCreatedAt,
		toTerm: file.ByCreatedAt,
		toCursor: func(f *File) Cursor {
			return Cursor{
				ID:    f.ID,
				Value: f.CreatedAt,
			}
		},
	}
)
View Source
var (
	// FileSourceOrderFieldCreatedAt orders FileSource by created_at.
	FileSourceOrderFieldCreatedAt = &FileSourceOrderField{
		Value: func(fs *FileSource) (ent.Value, error) {
			return fs.CreatedAt, nil
		},
		column: filesource.FieldCreatedAt,
		toTerm: filesource.ByCreatedAt,
		toCursor: func(fs *FileSource) Cursor {
			return Cursor{
				ID:    fs.ID,
				Value: fs.CreatedAt,
			}
		},
	}
)
View Source
var (
	// OauthClientOrderFieldCreatedAt orders OauthClient by created_at.
	OauthClientOrderFieldCreatedAt = &OauthClientOrderField{
		Value: func(oc *OauthClient) (ent.Value, error) {
			return oc.CreatedAt, nil
		},
		column: oauthclient.FieldCreatedAt,
		toTerm: oauthclient.ByCreatedAt,
		toCursor: func(oc *OauthClient) Cursor {
			return Cursor{
				ID:    oc.ID,
				Value: oc.CreatedAt,
			}
		},
	}
)
View Source
var (
	// OrgPolicyOrderFieldCreatedAt orders OrgPolicy by created_at.
	OrgPolicyOrderFieldCreatedAt = &OrgPolicyOrderField{
		Value: func(op *OrgPolicy) (ent.Value, error) {
			return op.CreatedAt, nil
		},
		column: orgpolicy.FieldCreatedAt,
		toTerm: orgpolicy.ByCreatedAt,
		toCursor: func(op *OrgPolicy) Cursor {
			return Cursor{
				ID:    op.ID,
				Value: op.CreatedAt,
			}
		},
	}
)
View Source
var (
	// OrgRoleOrderFieldCreatedAt orders OrgRole by created_at.
	OrgRoleOrderFieldCreatedAt = &OrgRoleOrderField{
		Value: func(or *OrgRole) (ent.Value, error) {
			return or.CreatedAt, nil
		},
		column: orgrole.FieldCreatedAt,
		toTerm: orgrole.ByCreatedAt,
		toCursor: func(or *OrgRole) Cursor {
			return Cursor{
				ID:    or.ID,
				Value: or.CreatedAt,
			}
		},
	}
)
View Source
var (
	// OrgUserPreferenceOrderFieldCreatedAt orders OrgUserPreference by created_at.
	OrgUserPreferenceOrderFieldCreatedAt = &OrgUserPreferenceOrderField{
		Value: func(oup *OrgUserPreference) (ent.Value, error) {
			return oup.CreatedAt, nil
		},
		column: orguserpreference.FieldCreatedAt,
		toTerm: orguserpreference.ByCreatedAt,
		toCursor: func(oup *OrgUserPreference) Cursor {
			return Cursor{
				ID:    oup.ID,
				Value: oup.CreatedAt,
			}
		},
	}
)
View Source
var (
	// PermissionOrderFieldCreatedAt orders Permission by created_at.
	PermissionOrderFieldCreatedAt = &PermissionOrderField{
		Value: func(pe *Permission) (ent.Value, error) {
			return pe.CreatedAt, nil
		},
		column: permission.FieldCreatedAt,
		toTerm: permission.ByCreatedAt,
		toCursor: func(pe *Permission) Cursor {
			return Cursor{
				ID:    pe.ID,
				Value: pe.CreatedAt,
			}
		},
	}
)
View Source
var (
	// UserDeviceOrderFieldCreatedAt orders UserDevice by created_at.
	UserDeviceOrderFieldCreatedAt = &UserDeviceOrderField{
		Value: func(ud *UserDevice) (ent.Value, error) {
			return ud.CreatedAt, nil
		},
		column: userdevice.FieldCreatedAt,
		toTerm: userdevice.ByCreatedAt,
		toCursor: func(ud *UserDevice) Cursor {
			return Cursor{
				ID:    ud.ID,
				Value: ud.CreatedAt,
			}
		},
	}
)
View Source
var (
	// UserIdentityOrderFieldCreatedAt orders UserIdentity by created_at.
	UserIdentityOrderFieldCreatedAt = &UserIdentityOrderField{
		Value: func(ui *UserIdentity) (ent.Value, error) {
			return ui.CreatedAt, nil
		},
		column: useridentity.FieldCreatedAt,
		toTerm: useridentity.ByCreatedAt,
		toCursor: func(ui *UserIdentity) Cursor {
			return Cursor{
				ID:    ui.ID,
				Value: ui.CreatedAt,
			}
		},
	}
)
View Source
var (
	// UserLoginProfileOrderFieldCreatedAt orders UserLoginProfile by created_at.
	UserLoginProfileOrderFieldCreatedAt = &UserLoginProfileOrderField{
		Value: func(ulp *UserLoginProfile) (ent.Value, error) {
			return ulp.CreatedAt, nil
		},
		column: userloginprofile.FieldCreatedAt,
		toTerm: userloginprofile.ByCreatedAt,
		toCursor: func(ulp *UserLoginProfile) Cursor {
			return Cursor{
				ID:    ulp.ID,
				Value: ulp.CreatedAt,
			}
		},
	}
)
View Source
var (
	// UserOrderFieldCreatedAt orders User by created_at.
	UserOrderFieldCreatedAt = &UserOrderField{
		Value: func(u *User) (ent.Value, error) {
			return u.CreatedAt, nil
		},
		column: user.FieldCreatedAt,
		toTerm: user.ByCreatedAt,
		toCursor: func(u *User) Cursor {
			return Cursor{
				ID:    u.ID,
				Value: u.CreatedAt,
			}
		},
	}
)
View Source
var (
	// UserPasswordOrderFieldCreatedAt orders UserPassword by created_at.
	UserPasswordOrderFieldCreatedAt = &UserPasswordOrderField{
		Value: func(up *UserPassword) (ent.Value, error) {
			return up.CreatedAt, nil
		},
		column: userpassword.FieldCreatedAt,
		toTerm: userpassword.ByCreatedAt,
		toCursor: func(up *UserPassword) Cursor {
			return Cursor{
				ID:    up.ID,
				Value: up.CreatedAt,
			}
		},
	}
)

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func GlobalID

func GlobalID(tp, id string) (string, error)

GlobalID returns the global identifier for the given type and id.

func IntFromGlobalID

func IntFromGlobalID(s string) (int, error)

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

func WithSimplePagination

func WithSimplePagination(ctx context.Context, sp *SimplePagination) context.Context

WithSimplePagination returns a new context with the given SimplePagination.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type App

type App struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// 用于标识应用资源的唯一代码,尽量简短
	Code string `json:"code,omitempty"`
	// 应用类型
	Kind app.Kind `json:"kind,omitempty"`
	// 回调地址
	RedirectURI string `json:"redirect_uri,omitempty"`
	// 应用ID
	AppKey string `json:"app_key,omitempty"`
	// 应用密钥
	AppSecret string `json:"app_secret,omitempty"`
	// 权限范围
	Scopes string `json:"scopes,omitempty"`
	// token有效期
	TokenValidity int32 `json:"token_validity,omitempty"`
	// refresh_token有效期
	RefreshTokenValidity int32 `json:"refresh_token_validity,omitempty"`
	// 图标,存储路规则:/{appcode}/{tid}/xxx
	LogoFileID int `json:"logo_file_id,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 私有App,表示由组织创建
	Private bool `json:"private,omitempty"`
	// 创建的根组织ID
	OwnerOrgID int `json:"owner_org_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppQuery when eager-loading is set.
	Edges AppEdges `json:"edges"`
	// contains filtered or unexported fields
}

App is the model entity for the App schema.

func (*App) Actions

func (a *App) Actions(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AppActionOrder, where *AppActionWhereInput,
) (*AppActionConnection, error)

func (*App) Dicts

func (a *App) Dicts(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AppDictOrder, where *AppDictWhereInput,
) (*AppDictConnection, error)

func (*App) GlobalID

func (a *App) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given App node.

func (*App) IsNode

func (*App) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*App) Menus

func (a *App) Menus(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AppMenuOrder, where *AppMenuWhereInput,
) (*AppMenuConnection, error)

func (*App) NamedActions

func (a *App) NamedActions(name string) ([]*AppAction, error)

NamedActions returns the Actions named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) NamedDicts

func (a *App) NamedDicts(name string) ([]*AppDict, error)

NamedDicts returns the Dicts named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) NamedMenus

func (a *App) NamedMenus(name string) ([]*AppMenu, error)

NamedMenus returns the Menus named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) NamedOrgApp

func (a *App) NamedOrgApp(name string) ([]*OrgApp, error)

NamedOrgApp returns the OrgApp named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) NamedOrgs

func (a *App) NamedOrgs(name string) ([]*Org, error)

NamedOrgs returns the Orgs named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) NamedPolicies

func (a *App) NamedPolicies(name string) ([]*AppPolicy, error)

NamedPolicies returns the Policies named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) NamedResources

func (a *App) NamedResources(name string) ([]*AppRes, error)

NamedResources returns the Resources named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) NamedRoles

func (a *App) NamedRoles(name string) ([]*AppRole, error)

NamedRoles returns the Roles named value or an error if the edge was not loaded in eager-loading with this name.

func (*App) Orgs

func (a *App) Orgs(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *OrgOrder, where *OrgWhereInput,
) (*OrgConnection, error)

func (*App) Policies

func (a *App) Policies(ctx context.Context) (result []*AppPolicy, err error)

func (*App) QueryActions

func (a *App) QueryActions() *AppActionQuery

QueryActions queries the "actions" edge of the App entity.

func (*App) QueryDicts

func (a *App) QueryDicts() *AppDictQuery

QueryDicts queries the "dicts" edge of the App entity.

func (*App) QueryMenus

func (a *App) QueryMenus() *AppMenuQuery

QueryMenus queries the "menus" edge of the App entity.

func (*App) QueryOrgApp

func (a *App) QueryOrgApp() *OrgAppQuery

QueryOrgApp queries the "org_app" edge of the App entity.

func (*App) QueryOrgs

func (a *App) QueryOrgs() *OrgQuery

QueryOrgs queries the "orgs" edge of the App entity.

func (*App) QueryPolicies

func (a *App) QueryPolicies() *AppPolicyQuery

QueryPolicies queries the "policies" edge of the App entity.

func (*App) QueryResources

func (a *App) QueryResources() *AppResQuery

QueryResources queries the "resources" edge of the App entity.

func (*App) QueryRoles

func (a *App) QueryRoles() *AppRoleQuery

QueryRoles queries the "roles" edge of the App entity.

func (*App) Resources

func (a *App) Resources(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AppResOrder, where *AppResWhereInput,
) (*AppResConnection, error)

func (*App) Roles

func (a *App) Roles(ctx context.Context) (result []*AppRole, err error)

func (*App) String

func (a *App) String() string

String implements the fmt.Stringer.

func (*App) ToEdge

func (a *App) ToEdge(order *AppOrder) *AppEdge

ToEdge converts App into AppEdge.

func (*App) Unwrap

func (a *App) Unwrap() *App

Unwrap unwraps the App entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*App) Update

func (a *App) Update() *AppUpdateOne

Update returns a builder for updating this App. Note that you need to call App.Unwrap() before calling this method if this App was returned from a transaction, and the transaction was committed or rolled back.

func (*App) Value

func (a *App) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the App. This includes values selected through modifiers, order, etc.

type AppAction

type AppAction struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 所属应用
	AppID int `json:"app_id,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// restful,graphql,rpc,function
	Kind appaction.Kind `json:"kind,omitempty"`
	// 操作方法:读,写,列表
	Method appaction.Method `json:"method,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppActionQuery when eager-loading is set.
	Edges AppActionEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppAction is the model entity for the AppAction schema.

func (*AppAction) App

func (aa *AppAction) App(ctx context.Context) (*App, error)

func (*AppAction) GlobalID

func (aa *AppAction) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppAction node.

func (*AppAction) IsNode

func (*AppAction) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppAction) Menus

func (aa *AppAction) Menus(ctx context.Context) (result []*AppMenu, err error)

func (*AppAction) NamedMenus

func (aa *AppAction) NamedMenus(name string) ([]*AppMenu, error)

NamedMenus returns the Menus named value or an error if the edge was not loaded in eager-loading with this name.

func (*AppAction) QueryApp

func (aa *AppAction) QueryApp() *AppQuery

QueryApp queries the "app" edge of the AppAction entity.

func (*AppAction) QueryMenus

func (aa *AppAction) QueryMenus() *AppMenuQuery

QueryMenus queries the "menus" edge of the AppAction entity.

func (*AppAction) String

func (aa *AppAction) String() string

String implements the fmt.Stringer.

func (*AppAction) ToEdge

func (aa *AppAction) ToEdge(order *AppActionOrder) *AppActionEdge

ToEdge converts AppAction into AppActionEdge.

func (*AppAction) Unwrap

func (aa *AppAction) Unwrap() *AppAction

Unwrap unwraps the AppAction entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppAction) Update

func (aa *AppAction) Update() *AppActionUpdateOne

Update returns a builder for updating this AppAction. Note that you need to call AppAction.Unwrap() before calling this method if this AppAction was returned from a transaction, and the transaction was committed or rolled back.

func (*AppAction) Value

func (aa *AppAction) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppAction. This includes values selected through modifiers, order, etc.

type AppActionClient

type AppActionClient struct {
	// contains filtered or unexported fields
}

AppActionClient is a client for the AppAction schema.

func NewAppActionClient

func NewAppActionClient(c config) *AppActionClient

NewAppActionClient returns a client for the AppAction from the given config.

func (*AppActionClient) Create

func (c *AppActionClient) Create() *AppActionCreate

Create returns a builder for creating a AppAction entity.

func (*AppActionClient) CreateBulk

func (c *AppActionClient) CreateBulk(builders ...*AppActionCreate) *AppActionCreateBulk

CreateBulk returns a builder for creating a bulk of AppAction entities.

func (*AppActionClient) Delete

func (c *AppActionClient) Delete() *AppActionDelete

Delete returns a delete builder for AppAction.

func (*AppActionClient) DeleteOne

func (c *AppActionClient) DeleteOne(aa *AppAction) *AppActionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppActionClient) DeleteOneID

func (c *AppActionClient) DeleteOneID(id int) *AppActionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppActionClient) Get

func (c *AppActionClient) Get(ctx context.Context, id int) (*AppAction, error)

Get returns a AppAction entity by its id.

func (*AppActionClient) GetX

func (c *AppActionClient) GetX(ctx context.Context, id int) *AppAction

GetX is like Get, but panics if an error occurs.

func (*AppActionClient) Hooks

func (c *AppActionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppActionClient) Intercept

func (c *AppActionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `appaction.Intercept(f(g(h())))`.

func (*AppActionClient) Interceptors

func (c *AppActionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppActionClient) MapCreateBulk

func (c *AppActionClient) MapCreateBulk(slice any, setFunc func(*AppActionCreate, int)) *AppActionCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppActionClient) Query

func (c *AppActionClient) Query() *AppActionQuery

Query returns a query builder for AppAction.

func (*AppActionClient) QueryApp

func (c *AppActionClient) QueryApp(aa *AppAction) *AppQuery

QueryApp queries the app edge of a AppAction.

func (*AppActionClient) QueryMenus

func (c *AppActionClient) QueryMenus(aa *AppAction) *AppMenuQuery

QueryMenus queries the menus edge of a AppAction.

func (*AppActionClient) Update

func (c *AppActionClient) Update() *AppActionUpdate

Update returns an update builder for AppAction.

func (*AppActionClient) UpdateOne

func (c *AppActionClient) UpdateOne(aa *AppAction) *AppActionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppActionClient) UpdateOneID

func (c *AppActionClient) UpdateOneID(id int) *AppActionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppActionClient) Use

func (c *AppActionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `appaction.Hooks(f(g(h())))`.

type AppActionConnection

type AppActionConnection struct {
	Edges      []*AppActionEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

AppActionConnection is the connection containing edges to AppAction.

type AppActionCreate

type AppActionCreate struct {
	// contains filtered or unexported fields
}

AppActionCreate is the builder for creating a AppAction entity.

func (*AppActionCreate) AddMenuIDs

func (aac *AppActionCreate) AddMenuIDs(ids ...int) *AppActionCreate

AddMenuIDs adds the "menus" edge to the AppMenu entity by IDs.

func (*AppActionCreate) AddMenus

func (aac *AppActionCreate) AddMenus(a ...*AppMenu) *AppActionCreate

AddMenus adds the "menus" edges to the AppMenu entity.

func (*AppActionCreate) Exec

func (aac *AppActionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppActionCreate) ExecX

func (aac *AppActionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppActionCreate) Mutation

func (aac *AppActionCreate) Mutation() *AppActionMutation

Mutation returns the AppActionMutation object of the builder.

func (*AppActionCreate) OnConflict

func (aac *AppActionCreate) OnConflict(opts ...sql.ConflictOption) *AppActionUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppAction.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppActionUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppActionCreate) OnConflictColumns

func (aac *AppActionCreate) OnConflictColumns(columns ...string) *AppActionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppAction.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppActionCreate) Save

func (aac *AppActionCreate) Save(ctx context.Context) (*AppAction, error)

Save creates the AppAction in the database.

func (*AppActionCreate) SaveX

func (aac *AppActionCreate) SaveX(ctx context.Context) *AppAction

SaveX calls Save and panics if Save returns an error.

func (*AppActionCreate) SetApp

func (aac *AppActionCreate) SetApp(a *App) *AppActionCreate

SetApp sets the "app" edge to the App entity.

func (*AppActionCreate) SetAppID

func (aac *AppActionCreate) SetAppID(i int) *AppActionCreate

SetAppID sets the "app_id" field.

func (*AppActionCreate) SetComments

func (aac *AppActionCreate) SetComments(s string) *AppActionCreate

SetComments sets the "comments" field.

func (*AppActionCreate) SetCreatedAt

func (aac *AppActionCreate) SetCreatedAt(t time.Time) *AppActionCreate

SetCreatedAt sets the "created_at" field.

func (*AppActionCreate) SetCreatedBy

func (aac *AppActionCreate) SetCreatedBy(i int) *AppActionCreate

SetCreatedBy sets the "created_by" field.

func (*AppActionCreate) SetID

func (aac *AppActionCreate) SetID(i int) *AppActionCreate

SetID sets the "id" field.

func (*AppActionCreate) SetInput

SetInput applies the change-set in the CreateAppActionInput on the AppActionCreate builder.

func (*AppActionCreate) SetKind

func (aac *AppActionCreate) SetKind(a appaction.Kind) *AppActionCreate

SetKind sets the "kind" field.

func (*AppActionCreate) SetMethod

func (aac *AppActionCreate) SetMethod(a appaction.Method) *AppActionCreate

SetMethod sets the "method" field.

func (*AppActionCreate) SetName

func (aac *AppActionCreate) SetName(s string) *AppActionCreate

SetName sets the "name" field.

func (*AppActionCreate) SetNillableAppID

func (aac *AppActionCreate) SetNillableAppID(i *int) *AppActionCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*AppActionCreate) SetNillableComments

func (aac *AppActionCreate) SetNillableComments(s *string) *AppActionCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppActionCreate) SetNillableCreatedAt

func (aac *AppActionCreate) SetNillableCreatedAt(t *time.Time) *AppActionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppActionCreate) SetNillableID

func (aac *AppActionCreate) SetNillableID(i *int) *AppActionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AppActionCreate) SetNillableUpdatedAt

func (aac *AppActionCreate) SetNillableUpdatedAt(t *time.Time) *AppActionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppActionCreate) SetNillableUpdatedBy

func (aac *AppActionCreate) SetNillableUpdatedBy(i *int) *AppActionCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppActionCreate) SetUpdatedAt

func (aac *AppActionCreate) SetUpdatedAt(t time.Time) *AppActionCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppActionCreate) SetUpdatedBy

func (aac *AppActionCreate) SetUpdatedBy(i int) *AppActionCreate

SetUpdatedBy sets the "updated_by" field.

type AppActionCreateBulk

type AppActionCreateBulk struct {
	// contains filtered or unexported fields
}

AppActionCreateBulk is the builder for creating many AppAction entities in bulk.

func (*AppActionCreateBulk) Exec

func (aacb *AppActionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppActionCreateBulk) ExecX

func (aacb *AppActionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppActionCreateBulk) OnConflict

func (aacb *AppActionCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppActionUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppAction.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppActionUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppActionCreateBulk) OnConflictColumns

func (aacb *AppActionCreateBulk) OnConflictColumns(columns ...string) *AppActionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppAction.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppActionCreateBulk) Save

func (aacb *AppActionCreateBulk) Save(ctx context.Context) ([]*AppAction, error)

Save creates the AppAction entities in the database.

func (*AppActionCreateBulk) SaveX

func (aacb *AppActionCreateBulk) SaveX(ctx context.Context) []*AppAction

SaveX is like Save, but panics if an error occurs.

type AppActionDelete

type AppActionDelete struct {
	// contains filtered or unexported fields
}

AppActionDelete is the builder for deleting a AppAction entity.

func (*AppActionDelete) Exec

func (aad *AppActionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppActionDelete) ExecX

func (aad *AppActionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppActionDelete) Where

Where appends a list predicates to the AppActionDelete builder.

type AppActionDeleteOne

type AppActionDeleteOne struct {
	// contains filtered or unexported fields
}

AppActionDeleteOne is the builder for deleting a single AppAction entity.

func (*AppActionDeleteOne) Exec

func (aado *AppActionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppActionDeleteOne) ExecX

func (aado *AppActionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppActionDeleteOne) Where

Where appends a list predicates to the AppActionDelete builder.

type AppActionEdge

type AppActionEdge struct {
	Node   *AppAction `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

AppActionEdge is the edge representation of AppAction.

type AppActionEdges

type AppActionEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// 被引用的菜单项
	Menus []*AppMenu `json:"menus,omitempty"`
	// contains filtered or unexported fields
}

AppActionEdges holds the relations/edges for other nodes in the graph.

func (AppActionEdges) AppOrErr

func (e AppActionEdges) AppOrErr() (*App, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AppActionEdges) MenusOrErr

func (e AppActionEdges) MenusOrErr() ([]*AppMenu, error)

MenusOrErr returns the Menus value or an error if the edge was not loaded in eager-loading.

type AppActionGroupBy

type AppActionGroupBy struct {
	// contains filtered or unexported fields
}

AppActionGroupBy is the group-by builder for AppAction entities.

func (*AppActionGroupBy) Aggregate

func (aagb *AppActionGroupBy) Aggregate(fns ...AggregateFunc) *AppActionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppActionGroupBy) Bool

func (s *AppActionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) BoolX

func (s *AppActionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppActionGroupBy) Bools

func (s *AppActionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) BoolsX

func (s *AppActionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppActionGroupBy) Float64

func (s *AppActionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) Float64X

func (s *AppActionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppActionGroupBy) Float64s

func (s *AppActionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) Float64sX

func (s *AppActionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppActionGroupBy) Int

func (s *AppActionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) IntX

func (s *AppActionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppActionGroupBy) Ints

func (s *AppActionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) IntsX

func (s *AppActionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppActionGroupBy) Scan

func (aagb *AppActionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppActionGroupBy) ScanX

func (s *AppActionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppActionGroupBy) String

func (s *AppActionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) StringX

func (s *AppActionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppActionGroupBy) Strings

func (s *AppActionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppActionGroupBy) StringsX

func (s *AppActionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppActionMutation

type AppActionMutation struct {
	// contains filtered or unexported fields
}

AppActionMutation represents an operation that mutates the AppAction nodes in the graph.

func (*AppActionMutation) AddCreatedBy

func (m *AppActionMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppActionMutation) AddField

func (m *AppActionMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppActionMutation) AddMenuIDs

func (m *AppActionMutation) AddMenuIDs(ids ...int)

AddMenuIDs adds the "menus" edge to the AppMenu entity by ids.

func (*AppActionMutation) AddUpdatedBy

func (m *AppActionMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppActionMutation) AddedCreatedBy

func (m *AppActionMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppActionMutation) AddedEdges

func (m *AppActionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppActionMutation) AddedField

func (m *AppActionMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppActionMutation) AddedFields

func (m *AppActionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppActionMutation) AddedIDs

func (m *AppActionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppActionMutation) AddedUpdatedBy

func (m *AppActionMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppActionMutation) AppCleared

func (m *AppActionMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*AppActionMutation) AppID

func (m *AppActionMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*AppActionMutation) AppIDCleared

func (m *AppActionMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*AppActionMutation) AppIDs

func (m *AppActionMutation) AppIDs() (ids []int)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*AppActionMutation) ClearApp

func (m *AppActionMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*AppActionMutation) ClearAppID

func (m *AppActionMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*AppActionMutation) ClearComments

func (m *AppActionMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppActionMutation) ClearEdge

func (m *AppActionMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppActionMutation) ClearField

func (m *AppActionMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppActionMutation) ClearMenus

func (m *AppActionMutation) ClearMenus()

ClearMenus clears the "menus" edge to the AppMenu entity.

func (*AppActionMutation) ClearUpdatedAt

func (m *AppActionMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppActionMutation) ClearUpdatedBy

func (m *AppActionMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppActionMutation) ClearedEdges

func (m *AppActionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppActionMutation) ClearedFields

func (m *AppActionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppActionMutation) Client

func (m AppActionMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppActionMutation) Comments

func (m *AppActionMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*AppActionMutation) CommentsCleared

func (m *AppActionMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*AppActionMutation) CreatedAt

func (m *AppActionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppActionMutation) CreatedBy

func (m *AppActionMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppActionMutation) EdgeCleared

func (m *AppActionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppActionMutation) Field

func (m *AppActionMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppActionMutation) FieldCleared

func (m *AppActionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppActionMutation) Fields

func (m *AppActionMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppActionMutation) ID

func (m *AppActionMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppActionMutation) IDs

func (m *AppActionMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppActionMutation) Kind

func (m *AppActionMutation) Kind() (r appaction.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*AppActionMutation) MenusCleared

func (m *AppActionMutation) MenusCleared() bool

MenusCleared reports if the "menus" edge to the AppMenu entity was cleared.

func (*AppActionMutation) MenusIDs

func (m *AppActionMutation) MenusIDs() (ids []int)

MenusIDs returns the "menus" edge IDs in the mutation.

func (*AppActionMutation) Method

func (m *AppActionMutation) Method() (r appaction.Method, exists bool)

Method returns the value of the "method" field in the mutation.

func (*AppActionMutation) Name

func (m *AppActionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppActionMutation) OldAppID

func (m *AppActionMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldComments

func (m *AppActionMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldCreatedAt

func (m *AppActionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldCreatedBy

func (m *AppActionMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldField

func (m *AppActionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppActionMutation) OldKind

func (m *AppActionMutation) OldKind(ctx context.Context) (v appaction.Kind, err error)

OldKind returns the old "kind" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldMethod

func (m *AppActionMutation) OldMethod(ctx context.Context) (v appaction.Method, err error)

OldMethod returns the old "method" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldName

func (m *AppActionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldUpdatedAt

func (m *AppActionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) OldUpdatedBy

func (m *AppActionMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppAction entity. If the AppAction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppActionMutation) Op

func (m *AppActionMutation) Op() Op

Op returns the operation name.

func (*AppActionMutation) RemoveMenuIDs

func (m *AppActionMutation) RemoveMenuIDs(ids ...int)

RemoveMenuIDs removes the "menus" edge to the AppMenu entity by IDs.

func (*AppActionMutation) RemovedEdges

func (m *AppActionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppActionMutation) RemovedIDs

func (m *AppActionMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppActionMutation) RemovedMenusIDs

func (m *AppActionMutation) RemovedMenusIDs() (ids []int)

RemovedMenus returns the removed IDs of the "menus" edge to the AppMenu entity.

func (*AppActionMutation) ResetApp

func (m *AppActionMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppActionMutation) ResetAppID

func (m *AppActionMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppActionMutation) ResetComments

func (m *AppActionMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppActionMutation) ResetCreatedAt

func (m *AppActionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppActionMutation) ResetCreatedBy

func (m *AppActionMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppActionMutation) ResetEdge

func (m *AppActionMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppActionMutation) ResetField

func (m *AppActionMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppActionMutation) ResetKind

func (m *AppActionMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*AppActionMutation) ResetMenus

func (m *AppActionMutation) ResetMenus()

ResetMenus resets all changes to the "menus" edge.

func (*AppActionMutation) ResetMethod

func (m *AppActionMutation) ResetMethod()

ResetMethod resets all changes to the "method" field.

func (*AppActionMutation) ResetName

func (m *AppActionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppActionMutation) ResetUpdatedAt

func (m *AppActionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppActionMutation) ResetUpdatedBy

func (m *AppActionMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppActionMutation) SetAppID

func (m *AppActionMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppActionMutation) SetComments

func (m *AppActionMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppActionMutation) SetCreatedAt

func (m *AppActionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppActionMutation) SetCreatedBy

func (m *AppActionMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppActionMutation) SetField

func (m *AppActionMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppActionMutation) SetID

func (m *AppActionMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppAction entities.

func (*AppActionMutation) SetKind

func (m *AppActionMutation) SetKind(a appaction.Kind)

SetKind sets the "kind" field.

func (*AppActionMutation) SetMethod

func (m *AppActionMutation) SetMethod(a appaction.Method)

SetMethod sets the "method" field.

func (*AppActionMutation) SetName

func (m *AppActionMutation) SetName(s string)

SetName sets the "name" field.

func (*AppActionMutation) SetOp

func (m *AppActionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppActionMutation) SetUpdatedAt

func (m *AppActionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppActionMutation) SetUpdatedBy

func (m *AppActionMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (AppActionMutation) Tx

func (m AppActionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppActionMutation) Type

func (m *AppActionMutation) Type() string

Type returns the node type of this mutation (AppAction).

func (*AppActionMutation) UpdatedAt

func (m *AppActionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppActionMutation) UpdatedAtCleared

func (m *AppActionMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppActionMutation) UpdatedBy

func (m *AppActionMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppActionMutation) UpdatedByCleared

func (m *AppActionMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppActionMutation) Where

func (m *AppActionMutation) Where(ps ...predicate.AppAction)

Where appends a list predicates to the AppActionMutation builder.

func (*AppActionMutation) WhereP

func (m *AppActionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppActionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppActionOrder

type AppActionOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *AppActionOrderField `json:"field"`
}

AppActionOrder defines the ordering of AppAction.

type AppActionOrderField

type AppActionOrderField struct {
	// Value extracts the ordering value from the given AppAction.
	Value func(*AppAction) (ent.Value, error)
	// contains filtered or unexported fields
}

AppActionOrderField defines the ordering field of AppAction.

func (AppActionOrderField) MarshalGQL

func (f AppActionOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppActionOrderField) String

func (f AppActionOrderField) String() string

String implement fmt.Stringer interface.

func (*AppActionOrderField) UnmarshalGQL

func (f *AppActionOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppActionPaginateOption

type AppActionPaginateOption func(*appactionPager) error

AppActionPaginateOption enables pagination customization.

func WithAppActionFilter

func WithAppActionFilter(filter func(*AppActionQuery) (*AppActionQuery, error)) AppActionPaginateOption

WithAppActionFilter configures pagination filter.

func WithAppActionOrder

func WithAppActionOrder(order *AppActionOrder) AppActionPaginateOption

WithAppActionOrder configures pagination ordering.

type AppActionQuery

type AppActionQuery struct {
	// contains filtered or unexported fields
}

AppActionQuery is the builder for querying AppAction entities.

func (*AppActionQuery) Aggregate

func (aaq *AppActionQuery) Aggregate(fns ...AggregateFunc) *AppActionSelect

Aggregate returns a AppActionSelect configured with the given aggregations.

func (*AppActionQuery) All

func (aaq *AppActionQuery) All(ctx context.Context) ([]*AppAction, error)

All executes the query and returns a list of AppActions.

func (*AppActionQuery) AllX

func (aaq *AppActionQuery) AllX(ctx context.Context) []*AppAction

AllX is like All, but panics if an error occurs.

func (*AppActionQuery) Clone

func (aaq *AppActionQuery) Clone() *AppActionQuery

Clone returns a duplicate of the AppActionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppActionQuery) CollectFields

func (aa *AppActionQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppActionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppActionQuery) Count

func (aaq *AppActionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppActionQuery) CountX

func (aaq *AppActionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppActionQuery) Exist

func (aaq *AppActionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppActionQuery) ExistX

func (aaq *AppActionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppActionQuery) First

func (aaq *AppActionQuery) First(ctx context.Context) (*AppAction, error)

First returns the first AppAction entity from the query. Returns a *NotFoundError when no AppAction was found.

func (*AppActionQuery) FirstID

func (aaq *AppActionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppAction ID from the query. Returns a *NotFoundError when no AppAction ID was found.

func (*AppActionQuery) FirstIDX

func (aaq *AppActionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppActionQuery) FirstX

func (aaq *AppActionQuery) FirstX(ctx context.Context) *AppAction

FirstX is like First, but panics if an error occurs.

func (*AppActionQuery) GroupBy

func (aaq *AppActionQuery) GroupBy(field string, fields ...string) *AppActionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppAction.Query().
	GroupBy(appaction.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppActionQuery) IDs

func (aaq *AppActionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppAction IDs.

func (*AppActionQuery) IDsX

func (aaq *AppActionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppActionQuery) Limit

func (aaq *AppActionQuery) Limit(limit int) *AppActionQuery

Limit the number of records to be returned by this query.

func (*AppActionQuery) Offset

func (aaq *AppActionQuery) Offset(offset int) *AppActionQuery

Offset to start from.

func (*AppActionQuery) Only

func (aaq *AppActionQuery) Only(ctx context.Context) (*AppAction, error)

Only returns a single AppAction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppAction entity is found. Returns a *NotFoundError when no AppAction entities are found.

func (*AppActionQuery) OnlyID

func (aaq *AppActionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppAction ID in the query. Returns a *NotSingularError when more than one AppAction ID is found. Returns a *NotFoundError when no entities are found.

func (*AppActionQuery) OnlyIDX

func (aaq *AppActionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppActionQuery) OnlyX

func (aaq *AppActionQuery) OnlyX(ctx context.Context) *AppAction

OnlyX is like Only, but panics if an error occurs.

func (*AppActionQuery) Order

Order specifies how the records should be ordered.

func (*AppActionQuery) Paginate

func (aa *AppActionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppActionPaginateOption,
) (*AppActionConnection, error)

Paginate executes the query and returns a relay based cursor connection to AppAction.

func (*AppActionQuery) QueryApp

func (aaq *AppActionQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*AppActionQuery) QueryMenus

func (aaq *AppActionQuery) QueryMenus() *AppMenuQuery

QueryMenus chains the current query on the "menus" edge.

func (*AppActionQuery) Select

func (aaq *AppActionQuery) Select(fields ...string) *AppActionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppAction.Query().
	Select(appaction.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppActionQuery) Unique

func (aaq *AppActionQuery) Unique(unique bool) *AppActionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppActionQuery) Where

func (aaq *AppActionQuery) Where(ps ...predicate.AppAction) *AppActionQuery

Where adds a new predicate for the AppActionQuery builder.

func (*AppActionQuery) WithApp

func (aaq *AppActionQuery) WithApp(opts ...func(*AppQuery)) *AppActionQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppActionQuery) WithMenus

func (aaq *AppActionQuery) WithMenus(opts ...func(*AppMenuQuery)) *AppActionQuery

WithMenus tells the query-builder to eager-load the nodes that are connected to the "menus" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppActionQuery) WithNamedMenus

func (aaq *AppActionQuery) WithNamedMenus(name string, opts ...func(*AppMenuQuery)) *AppActionQuery

WithNamedMenus tells the query-builder to eager-load the nodes that are connected to the "menus" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type AppActionSelect

type AppActionSelect struct {
	*AppActionQuery
	// contains filtered or unexported fields
}

AppActionSelect is the builder for selecting fields of AppAction entities.

func (*AppActionSelect) Aggregate

func (aas *AppActionSelect) Aggregate(fns ...AggregateFunc) *AppActionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppActionSelect) Bool

func (s *AppActionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) BoolX

func (s *AppActionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppActionSelect) Bools

func (s *AppActionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) BoolsX

func (s *AppActionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppActionSelect) Float64

func (s *AppActionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) Float64X

func (s *AppActionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppActionSelect) Float64s

func (s *AppActionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) Float64sX

func (s *AppActionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppActionSelect) Int

func (s *AppActionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) IntX

func (s *AppActionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppActionSelect) Ints

func (s *AppActionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) IntsX

func (s *AppActionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppActionSelect) Scan

func (aas *AppActionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppActionSelect) ScanX

func (s *AppActionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppActionSelect) String

func (s *AppActionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) StringX

func (s *AppActionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppActionSelect) Strings

func (s *AppActionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppActionSelect) StringsX

func (s *AppActionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppActionUpdate

type AppActionUpdate struct {
	// contains filtered or unexported fields
}

AppActionUpdate is the builder for updating AppAction entities.

func (*AppActionUpdate) AddMenuIDs

func (aau *AppActionUpdate) AddMenuIDs(ids ...int) *AppActionUpdate

AddMenuIDs adds the "menus" edge to the AppMenu entity by IDs.

func (*AppActionUpdate) AddMenus

func (aau *AppActionUpdate) AddMenus(a ...*AppMenu) *AppActionUpdate

AddMenus adds the "menus" edges to the AppMenu entity.

func (*AppActionUpdate) AddUpdatedBy

func (aau *AppActionUpdate) AddUpdatedBy(i int) *AppActionUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppActionUpdate) ClearComments

func (aau *AppActionUpdate) ClearComments() *AppActionUpdate

ClearComments clears the value of the "comments" field.

func (*AppActionUpdate) ClearMenus

func (aau *AppActionUpdate) ClearMenus() *AppActionUpdate

ClearMenus clears all "menus" edges to the AppMenu entity.

func (*AppActionUpdate) ClearUpdatedAt

func (aau *AppActionUpdate) ClearUpdatedAt() *AppActionUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppActionUpdate) ClearUpdatedBy

func (aau *AppActionUpdate) ClearUpdatedBy() *AppActionUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppActionUpdate) Exec

func (aau *AppActionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppActionUpdate) ExecX

func (aau *AppActionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppActionUpdate) Mutation

func (aau *AppActionUpdate) Mutation() *AppActionMutation

Mutation returns the AppActionMutation object of the builder.

func (*AppActionUpdate) RemoveMenuIDs

func (aau *AppActionUpdate) RemoveMenuIDs(ids ...int) *AppActionUpdate

RemoveMenuIDs removes the "menus" edge to AppMenu entities by IDs.

func (*AppActionUpdate) RemoveMenus

func (aau *AppActionUpdate) RemoveMenus(a ...*AppMenu) *AppActionUpdate

RemoveMenus removes "menus" edges to AppMenu entities.

func (*AppActionUpdate) Save

func (aau *AppActionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppActionUpdate) SaveX

func (aau *AppActionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppActionUpdate) SetComments

func (aau *AppActionUpdate) SetComments(s string) *AppActionUpdate

SetComments sets the "comments" field.

func (*AppActionUpdate) SetInput

SetInput applies the change-set in the UpdateAppActionInput on the AppActionUpdate builder.

func (*AppActionUpdate) SetKind

func (aau *AppActionUpdate) SetKind(a appaction.Kind) *AppActionUpdate

SetKind sets the "kind" field.

func (*AppActionUpdate) SetMethod

func (aau *AppActionUpdate) SetMethod(a appaction.Method) *AppActionUpdate

SetMethod sets the "method" field.

func (*AppActionUpdate) SetName

func (aau *AppActionUpdate) SetName(s string) *AppActionUpdate

SetName sets the "name" field.

func (*AppActionUpdate) SetNillableComments

func (aau *AppActionUpdate) SetNillableComments(s *string) *AppActionUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppActionUpdate) SetNillableUpdatedAt

func (aau *AppActionUpdate) SetNillableUpdatedAt(t *time.Time) *AppActionUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppActionUpdate) SetNillableUpdatedBy

func (aau *AppActionUpdate) SetNillableUpdatedBy(i *int) *AppActionUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppActionUpdate) SetUpdatedAt

func (aau *AppActionUpdate) SetUpdatedAt(t time.Time) *AppActionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppActionUpdate) SetUpdatedBy

func (aau *AppActionUpdate) SetUpdatedBy(i int) *AppActionUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppActionUpdate) Where

Where appends a list predicates to the AppActionUpdate builder.

type AppActionUpdateOne

type AppActionUpdateOne struct {
	// contains filtered or unexported fields
}

AppActionUpdateOne is the builder for updating a single AppAction entity.

func (*AppActionUpdateOne) AddMenuIDs

func (aauo *AppActionUpdateOne) AddMenuIDs(ids ...int) *AppActionUpdateOne

AddMenuIDs adds the "menus" edge to the AppMenu entity by IDs.

func (*AppActionUpdateOne) AddMenus

func (aauo *AppActionUpdateOne) AddMenus(a ...*AppMenu) *AppActionUpdateOne

AddMenus adds the "menus" edges to the AppMenu entity.

func (*AppActionUpdateOne) AddUpdatedBy

func (aauo *AppActionUpdateOne) AddUpdatedBy(i int) *AppActionUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppActionUpdateOne) ClearComments

func (aauo *AppActionUpdateOne) ClearComments() *AppActionUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppActionUpdateOne) ClearMenus

func (aauo *AppActionUpdateOne) ClearMenus() *AppActionUpdateOne

ClearMenus clears all "menus" edges to the AppMenu entity.

func (*AppActionUpdateOne) ClearUpdatedAt

func (aauo *AppActionUpdateOne) ClearUpdatedAt() *AppActionUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppActionUpdateOne) ClearUpdatedBy

func (aauo *AppActionUpdateOne) ClearUpdatedBy() *AppActionUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppActionUpdateOne) Exec

func (aauo *AppActionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppActionUpdateOne) ExecX

func (aauo *AppActionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppActionUpdateOne) Mutation

func (aauo *AppActionUpdateOne) Mutation() *AppActionMutation

Mutation returns the AppActionMutation object of the builder.

func (*AppActionUpdateOne) RemoveMenuIDs

func (aauo *AppActionUpdateOne) RemoveMenuIDs(ids ...int) *AppActionUpdateOne

RemoveMenuIDs removes the "menus" edge to AppMenu entities by IDs.

func (*AppActionUpdateOne) RemoveMenus

func (aauo *AppActionUpdateOne) RemoveMenus(a ...*AppMenu) *AppActionUpdateOne

RemoveMenus removes "menus" edges to AppMenu entities.

func (*AppActionUpdateOne) Save

func (aauo *AppActionUpdateOne) Save(ctx context.Context) (*AppAction, error)

Save executes the query and returns the updated AppAction entity.

func (*AppActionUpdateOne) SaveX

func (aauo *AppActionUpdateOne) SaveX(ctx context.Context) *AppAction

SaveX is like Save, but panics if an error occurs.

func (*AppActionUpdateOne) Select

func (aauo *AppActionUpdateOne) Select(field string, fields ...string) *AppActionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppActionUpdateOne) SetComments

func (aauo *AppActionUpdateOne) SetComments(s string) *AppActionUpdateOne

SetComments sets the "comments" field.

func (*AppActionUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppActionInput on the AppActionUpdateOne builder.

func (*AppActionUpdateOne) SetKind

SetKind sets the "kind" field.

func (*AppActionUpdateOne) SetMethod

SetMethod sets the "method" field.

func (*AppActionUpdateOne) SetName

func (aauo *AppActionUpdateOne) SetName(s string) *AppActionUpdateOne

SetName sets the "name" field.

func (*AppActionUpdateOne) SetNillableComments

func (aauo *AppActionUpdateOne) SetNillableComments(s *string) *AppActionUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppActionUpdateOne) SetNillableUpdatedAt

func (aauo *AppActionUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppActionUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppActionUpdateOne) SetNillableUpdatedBy

func (aauo *AppActionUpdateOne) SetNillableUpdatedBy(i *int) *AppActionUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppActionUpdateOne) SetUpdatedAt

func (aauo *AppActionUpdateOne) SetUpdatedAt(t time.Time) *AppActionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppActionUpdateOne) SetUpdatedBy

func (aauo *AppActionUpdateOne) SetUpdatedBy(i int) *AppActionUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppActionUpdateOne) Where

Where appends a list predicates to the AppActionUpdate builder.

type AppActionUpsert

type AppActionUpsert struct {
	*sql.UpdateSet
}

AppActionUpsert is the "OnConflict" setter.

func (*AppActionUpsert) AddUpdatedBy

func (u *AppActionUpsert) AddUpdatedBy(v int) *AppActionUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppActionUpsert) ClearComments

func (u *AppActionUpsert) ClearComments() *AppActionUpsert

ClearComments clears the value of the "comments" field.

func (*AppActionUpsert) ClearUpdatedAt

func (u *AppActionUpsert) ClearUpdatedAt() *AppActionUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppActionUpsert) ClearUpdatedBy

func (u *AppActionUpsert) ClearUpdatedBy() *AppActionUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppActionUpsert) SetComments

func (u *AppActionUpsert) SetComments(v string) *AppActionUpsert

SetComments sets the "comments" field.

func (*AppActionUpsert) SetKind

SetKind sets the "kind" field.

func (*AppActionUpsert) SetMethod

SetMethod sets the "method" field.

func (*AppActionUpsert) SetName

func (u *AppActionUpsert) SetName(v string) *AppActionUpsert

SetName sets the "name" field.

func (*AppActionUpsert) SetUpdatedAt

func (u *AppActionUpsert) SetUpdatedAt(v time.Time) *AppActionUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppActionUpsert) SetUpdatedBy

func (u *AppActionUpsert) SetUpdatedBy(v int) *AppActionUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppActionUpsert) UpdateComments

func (u *AppActionUpsert) UpdateComments() *AppActionUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppActionUpsert) UpdateKind

func (u *AppActionUpsert) UpdateKind() *AppActionUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppActionUpsert) UpdateMethod

func (u *AppActionUpsert) UpdateMethod() *AppActionUpsert

UpdateMethod sets the "method" field to the value that was provided on create.

func (*AppActionUpsert) UpdateName

func (u *AppActionUpsert) UpdateName() *AppActionUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppActionUpsert) UpdateUpdatedAt

func (u *AppActionUpsert) UpdateUpdatedAt() *AppActionUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppActionUpsert) UpdateUpdatedBy

func (u *AppActionUpsert) UpdateUpdatedBy() *AppActionUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppActionUpsertBulk

type AppActionUpsertBulk struct {
	// contains filtered or unexported fields
}

AppActionUpsertBulk is the builder for "upsert"-ing a bulk of AppAction nodes.

func (*AppActionUpsertBulk) AddUpdatedBy

func (u *AppActionUpsertBulk) AddUpdatedBy(v int) *AppActionUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppActionUpsertBulk) ClearComments

func (u *AppActionUpsertBulk) ClearComments() *AppActionUpsertBulk

ClearComments clears the value of the "comments" field.

func (*AppActionUpsertBulk) ClearUpdatedAt

func (u *AppActionUpsertBulk) ClearUpdatedAt() *AppActionUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppActionUpsertBulk) ClearUpdatedBy

func (u *AppActionUpsertBulk) ClearUpdatedBy() *AppActionUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppActionUpsertBulk) DoNothing

func (u *AppActionUpsertBulk) DoNothing() *AppActionUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppActionUpsertBulk) Exec

Exec executes the query.

func (*AppActionUpsertBulk) ExecX

func (u *AppActionUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppActionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppAction.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppActionUpsertBulk) SetComments

func (u *AppActionUpsertBulk) SetComments(v string) *AppActionUpsertBulk

SetComments sets the "comments" field.

func (*AppActionUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*AppActionUpsertBulk) SetMethod

SetMethod sets the "method" field.

func (*AppActionUpsertBulk) SetName

SetName sets the "name" field.

func (*AppActionUpsertBulk) SetUpdatedAt

func (u *AppActionUpsertBulk) SetUpdatedAt(v time.Time) *AppActionUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppActionUpsertBulk) SetUpdatedBy

func (u *AppActionUpsertBulk) SetUpdatedBy(v int) *AppActionUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppActionUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the AppActionCreateBulk.OnConflict documentation for more info.

func (*AppActionUpsertBulk) UpdateComments

func (u *AppActionUpsertBulk) UpdateComments() *AppActionUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppActionUpsertBulk) UpdateKind

func (u *AppActionUpsertBulk) UpdateKind() *AppActionUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppActionUpsertBulk) UpdateMethod

func (u *AppActionUpsertBulk) UpdateMethod() *AppActionUpsertBulk

UpdateMethod sets the "method" field to the value that was provided on create.

func (*AppActionUpsertBulk) UpdateName

func (u *AppActionUpsertBulk) UpdateName() *AppActionUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppActionUpsertBulk) UpdateNewValues

func (u *AppActionUpsertBulk) UpdateNewValues() *AppActionUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppAction.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appaction.FieldID)
		}),
	).
	Exec(ctx)

func (*AppActionUpsertBulk) UpdateUpdatedAt

func (u *AppActionUpsertBulk) UpdateUpdatedAt() *AppActionUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppActionUpsertBulk) UpdateUpdatedBy

func (u *AppActionUpsertBulk) UpdateUpdatedBy() *AppActionUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppActionUpsertOne

type AppActionUpsertOne struct {
	// contains filtered or unexported fields
}

AppActionUpsertOne is the builder for "upsert"-ing

one AppAction node.

func (*AppActionUpsertOne) AddUpdatedBy

func (u *AppActionUpsertOne) AddUpdatedBy(v int) *AppActionUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppActionUpsertOne) ClearComments

func (u *AppActionUpsertOne) ClearComments() *AppActionUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppActionUpsertOne) ClearUpdatedAt

func (u *AppActionUpsertOne) ClearUpdatedAt() *AppActionUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppActionUpsertOne) ClearUpdatedBy

func (u *AppActionUpsertOne) ClearUpdatedBy() *AppActionUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppActionUpsertOne) DoNothing

func (u *AppActionUpsertOne) DoNothing() *AppActionUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppActionUpsertOne) Exec

func (u *AppActionUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppActionUpsertOne) ExecX

func (u *AppActionUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppActionUpsertOne) ID

func (u *AppActionUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppActionUpsertOne) IDX

func (u *AppActionUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*AppActionUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppAction.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppActionUpsertOne) SetComments

func (u *AppActionUpsertOne) SetComments(v string) *AppActionUpsertOne

SetComments sets the "comments" field.

func (*AppActionUpsertOne) SetKind

SetKind sets the "kind" field.

func (*AppActionUpsertOne) SetMethod

SetMethod sets the "method" field.

func (*AppActionUpsertOne) SetName

SetName sets the "name" field.

func (*AppActionUpsertOne) SetUpdatedAt

func (u *AppActionUpsertOne) SetUpdatedAt(v time.Time) *AppActionUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppActionUpsertOne) SetUpdatedBy

func (u *AppActionUpsertOne) SetUpdatedBy(v int) *AppActionUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppActionUpsertOne) Update

func (u *AppActionUpsertOne) Update(set func(*AppActionUpsert)) *AppActionUpsertOne

Update allows overriding fields `UPDATE` values. See the AppActionCreate.OnConflict documentation for more info.

func (*AppActionUpsertOne) UpdateComments

func (u *AppActionUpsertOne) UpdateComments() *AppActionUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppActionUpsertOne) UpdateKind

func (u *AppActionUpsertOne) UpdateKind() *AppActionUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppActionUpsertOne) UpdateMethod

func (u *AppActionUpsertOne) UpdateMethod() *AppActionUpsertOne

UpdateMethod sets the "method" field to the value that was provided on create.

func (*AppActionUpsertOne) UpdateName

func (u *AppActionUpsertOne) UpdateName() *AppActionUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppActionUpsertOne) UpdateNewValues

func (u *AppActionUpsertOne) UpdateNewValues() *AppActionUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppAction.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appaction.FieldID)
		}),
	).
	Exec(ctx)

func (*AppActionUpsertOne) UpdateUpdatedAt

func (u *AppActionUpsertOne) UpdateUpdatedAt() *AppActionUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppActionUpsertOne) UpdateUpdatedBy

func (u *AppActionUpsertOne) UpdateUpdatedBy() *AppActionUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppActionWhereInput

type AppActionWhereInput struct {
	Predicates []predicate.AppAction  `json:"-"`
	Not        *AppActionWhereInput   `json:"not,omitempty"`
	Or         []*AppActionWhereInput `json:"or,omitempty"`
	And        []*AppActionWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_id" field predicates.
	AppID       *int  `json:"appID,omitempty"`
	AppIDNEQ    *int  `json:"appIDNEQ,omitempty"`
	AppIDIn     []int `json:"appIDIn,omitempty"`
	AppIDNotIn  []int `json:"appIDNotIn,omitempty"`
	AppIDIsNil  bool  `json:"appIDIsNil,omitempty"`
	AppIDNotNil bool  `json:"appIDNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "kind" field predicates.
	Kind      *appaction.Kind  `json:"kind,omitempty"`
	KindNEQ   *appaction.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []appaction.Kind `json:"kindIn,omitempty"`
	KindNotIn []appaction.Kind `json:"kindNotIn,omitempty"`

	// "method" field predicates.
	Method      *appaction.Method  `json:"method,omitempty"`
	MethodNEQ   *appaction.Method  `json:"methodNEQ,omitempty"`
	MethodIn    []appaction.Method `json:"methodIn,omitempty"`
	MethodNotIn []appaction.Method `json:"methodNotIn,omitempty"`

	// "app" edge predicates.
	HasApp     *bool            `json:"hasApp,omitempty"`
	HasAppWith []*AppWhereInput `json:"hasAppWith,omitempty"`

	// "menus" edge predicates.
	HasMenus     *bool                `json:"hasMenus,omitempty"`
	HasMenusWith []*AppMenuWhereInput `json:"hasMenusWith,omitempty"`
}

AppActionWhereInput represents a where input for filtering AppAction queries.

func (*AppActionWhereInput) AddPredicates

func (i *AppActionWhereInput) AddPredicates(predicates ...predicate.AppAction)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppActionWhereInput) Filter

Filter applies the AppActionWhereInput filter on the AppActionQuery builder.

func (*AppActionWhereInput) P

P returns a predicate for filtering appactions. An error is returned if the input is empty or invalid.

type AppActions

type AppActions []*AppAction

AppActions is a parsable slice of AppAction.

type AppClient

type AppClient struct {
	// contains filtered or unexported fields
}

AppClient is a client for the App schema.

func NewAppClient

func NewAppClient(c config) *AppClient

NewAppClient returns a client for the App from the given config.

func (*AppClient) Create

func (c *AppClient) Create() *AppCreate

Create returns a builder for creating a App entity.

func (*AppClient) CreateBulk

func (c *AppClient) CreateBulk(builders ...*AppCreate) *AppCreateBulk

CreateBulk returns a builder for creating a bulk of App entities.

func (*AppClient) Delete

func (c *AppClient) Delete() *AppDelete

Delete returns a delete builder for App.

func (*AppClient) DeleteOne

func (c *AppClient) DeleteOne(a *App) *AppDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppClient) DeleteOneID

func (c *AppClient) DeleteOneID(id int) *AppDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppClient) Get

func (c *AppClient) Get(ctx context.Context, id int) (*App, error)

Get returns a App entity by its id.

func (*AppClient) GetX

func (c *AppClient) GetX(ctx context.Context, id int) *App

GetX is like Get, but panics if an error occurs.

func (*AppClient) Hooks

func (c *AppClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppClient) Intercept

func (c *AppClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `app.Intercept(f(g(h())))`.

func (*AppClient) Interceptors

func (c *AppClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppClient) MapCreateBulk

func (c *AppClient) MapCreateBulk(slice any, setFunc func(*AppCreate, int)) *AppCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppClient) Query

func (c *AppClient) Query() *AppQuery

Query returns a query builder for App.

func (*AppClient) QueryActions

func (c *AppClient) QueryActions(a *App) *AppActionQuery

QueryActions queries the actions edge of a App.

func (*AppClient) QueryDicts

func (c *AppClient) QueryDicts(a *App) *AppDictQuery

QueryDicts queries the dicts edge of a App.

func (*AppClient) QueryMenus

func (c *AppClient) QueryMenus(a *App) *AppMenuQuery

QueryMenus queries the menus edge of a App.

func (*AppClient) QueryOrgApp

func (c *AppClient) QueryOrgApp(a *App) *OrgAppQuery

QueryOrgApp queries the org_app edge of a App.

func (*AppClient) QueryOrgs

func (c *AppClient) QueryOrgs(a *App) *OrgQuery

QueryOrgs queries the orgs edge of a App.

func (*AppClient) QueryPolicies

func (c *AppClient) QueryPolicies(a *App) *AppPolicyQuery

QueryPolicies queries the policies edge of a App.

func (*AppClient) QueryResources

func (c *AppClient) QueryResources(a *App) *AppResQuery

QueryResources queries the resources edge of a App.

func (*AppClient) QueryRoles

func (c *AppClient) QueryRoles(a *App) *AppRoleQuery

QueryRoles queries the roles edge of a App.

func (*AppClient) Update

func (c *AppClient) Update() *AppUpdate

Update returns an update builder for App.

func (*AppClient) UpdateOne

func (c *AppClient) UpdateOne(a *App) *AppUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppClient) UpdateOneID

func (c *AppClient) UpdateOneID(id int) *AppUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppClient) Use

func (c *AppClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `app.Hooks(f(g(h())))`.

type AppConnection

type AppConnection struct {
	Edges      []*AppEdge `json:"edges"`
	PageInfo   PageInfo   `json:"pageInfo"`
	TotalCount int        `json:"totalCount"`
}

AppConnection is the connection containing edges to App.

type AppCreate

type AppCreate struct {
	// contains filtered or unexported fields
}

AppCreate is the builder for creating a App entity.

func (*AppCreate) AddActionIDs

func (ac *AppCreate) AddActionIDs(ids ...int) *AppCreate

AddActionIDs adds the "actions" edge to the AppAction entity by IDs.

func (*AppCreate) AddActions

func (ac *AppCreate) AddActions(a ...*AppAction) *AppCreate

AddActions adds the "actions" edges to the AppAction entity.

func (*AppCreate) AddDictIDs

func (ac *AppCreate) AddDictIDs(ids ...int) *AppCreate

AddDictIDs adds the "dicts" edge to the AppDict entity by IDs.

func (*AppCreate) AddDicts

func (ac *AppCreate) AddDicts(a ...*AppDict) *AppCreate

AddDicts adds the "dicts" edges to the AppDict entity.

func (*AppCreate) AddMenuIDs

func (ac *AppCreate) AddMenuIDs(ids ...int) *AppCreate

AddMenuIDs adds the "menus" edge to the AppMenu entity by IDs.

func (*AppCreate) AddMenus

func (ac *AppCreate) AddMenus(a ...*AppMenu) *AppCreate

AddMenus adds the "menus" edges to the AppMenu entity.

func (*AppCreate) AddOrgApp

func (ac *AppCreate) AddOrgApp(o ...*OrgApp) *AppCreate

AddOrgApp adds the "org_app" edges to the OrgApp entity.

func (*AppCreate) AddOrgAppIDs

func (ac *AppCreate) AddOrgAppIDs(ids ...int) *AppCreate

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by IDs.

func (*AppCreate) AddOrgIDs

func (ac *AppCreate) AddOrgIDs(ids ...int) *AppCreate

AddOrgIDs adds the "orgs" edge to the Org entity by IDs.

func (*AppCreate) AddOrgs

func (ac *AppCreate) AddOrgs(o ...*Org) *AppCreate

AddOrgs adds the "orgs" edges to the Org entity.

func (*AppCreate) AddPolicies

func (ac *AppCreate) AddPolicies(a ...*AppPolicy) *AppCreate

AddPolicies adds the "policies" edges to the AppPolicy entity.

func (*AppCreate) AddPolicyIDs

func (ac *AppCreate) AddPolicyIDs(ids ...int) *AppCreate

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by IDs.

func (*AppCreate) AddResourceIDs

func (ac *AppCreate) AddResourceIDs(ids ...int) *AppCreate

AddResourceIDs adds the "resources" edge to the AppRes entity by IDs.

func (*AppCreate) AddResources

func (ac *AppCreate) AddResources(a ...*AppRes) *AppCreate

AddResources adds the "resources" edges to the AppRes entity.

func (*AppCreate) AddRoleIDs

func (ac *AppCreate) AddRoleIDs(ids ...int) *AppCreate

AddRoleIDs adds the "roles" edge to the AppRole entity by IDs.

func (*AppCreate) AddRoles

func (ac *AppCreate) AddRoles(a ...*AppRole) *AppCreate

AddRoles adds the "roles" edges to the AppRole entity.

func (*AppCreate) Exec

func (ac *AppCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppCreate) ExecX

func (ac *AppCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppCreate) Mutation

func (ac *AppCreate) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppCreate) OnConflict

func (ac *AppCreate) OnConflict(opts ...sql.ConflictOption) *AppUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.App.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppCreate) OnConflictColumns

func (ac *AppCreate) OnConflictColumns(columns ...string) *AppUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.App.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppCreate) Save

func (ac *AppCreate) Save(ctx context.Context) (*App, error)

Save creates the App in the database.

func (*AppCreate) SaveX

func (ac *AppCreate) SaveX(ctx context.Context) *App

SaveX calls Save and panics if Save returns an error.

func (*AppCreate) SetAppKey

func (ac *AppCreate) SetAppKey(s string) *AppCreate

SetAppKey sets the "app_key" field.

func (*AppCreate) SetAppSecret

func (ac *AppCreate) SetAppSecret(s string) *AppCreate

SetAppSecret sets the "app_secret" field.

func (*AppCreate) SetCode

func (ac *AppCreate) SetCode(s string) *AppCreate

SetCode sets the "code" field.

func (*AppCreate) SetComments

func (ac *AppCreate) SetComments(s string) *AppCreate

SetComments sets the "comments" field.

func (*AppCreate) SetCreatedAt

func (ac *AppCreate) SetCreatedAt(t time.Time) *AppCreate

SetCreatedAt sets the "created_at" field.

func (*AppCreate) SetCreatedBy

func (ac *AppCreate) SetCreatedBy(i int) *AppCreate

SetCreatedBy sets the "created_by" field.

func (*AppCreate) SetID

func (ac *AppCreate) SetID(i int) *AppCreate

SetID sets the "id" field.

func (*AppCreate) SetInput

func (c *AppCreate) SetInput(i CreateAppInput) *AppCreate

SetInput applies the change-set in the CreateAppInput on the AppCreate builder.

func (*AppCreate) SetKind

func (ac *AppCreate) SetKind(a app.Kind) *AppCreate

SetKind sets the "kind" field.

func (*AppCreate) SetLogoFileID

func (ac *AppCreate) SetLogoFileID(i int) *AppCreate

SetLogoFileID sets the "logo_file_id" field.

func (*AppCreate) SetName

func (ac *AppCreate) SetName(s string) *AppCreate

SetName sets the "name" field.

func (*AppCreate) SetNillableAppKey

func (ac *AppCreate) SetNillableAppKey(s *string) *AppCreate

SetNillableAppKey sets the "app_key" field if the given value is not nil.

func (*AppCreate) SetNillableAppSecret

func (ac *AppCreate) SetNillableAppSecret(s *string) *AppCreate

SetNillableAppSecret sets the "app_secret" field if the given value is not nil.

func (*AppCreate) SetNillableComments

func (ac *AppCreate) SetNillableComments(s *string) *AppCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppCreate) SetNillableCreatedAt

func (ac *AppCreate) SetNillableCreatedAt(t *time.Time) *AppCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppCreate) SetNillableID

func (ac *AppCreate) SetNillableID(i *int) *AppCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AppCreate) SetNillableLogoFileID

func (ac *AppCreate) SetNillableLogoFileID(i *int) *AppCreate

SetNillableLogoFileID sets the "logo_file_id" field if the given value is not nil.

func (*AppCreate) SetNillableOwnerOrgID

func (ac *AppCreate) SetNillableOwnerOrgID(i *int) *AppCreate

SetNillableOwnerOrgID sets the "owner_org_id" field if the given value is not nil.

func (*AppCreate) SetNillablePrivate

func (ac *AppCreate) SetNillablePrivate(b *bool) *AppCreate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*AppCreate) SetNillableRedirectURI

func (ac *AppCreate) SetNillableRedirectURI(s *string) *AppCreate

SetNillableRedirectURI sets the "redirect_uri" field if the given value is not nil.

func (*AppCreate) SetNillableRefreshTokenValidity

func (ac *AppCreate) SetNillableRefreshTokenValidity(i *int32) *AppCreate

SetNillableRefreshTokenValidity sets the "refresh_token_validity" field if the given value is not nil.

func (*AppCreate) SetNillableScopes

func (ac *AppCreate) SetNillableScopes(s *string) *AppCreate

SetNillableScopes sets the "scopes" field if the given value is not nil.

func (*AppCreate) SetNillableStatus

func (ac *AppCreate) SetNillableStatus(ts *typex.SimpleStatus) *AppCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppCreate) SetNillableTokenValidity

func (ac *AppCreate) SetNillableTokenValidity(i *int32) *AppCreate

SetNillableTokenValidity sets the "token_validity" field if the given value is not nil.

func (*AppCreate) SetNillableUpdatedAt

func (ac *AppCreate) SetNillableUpdatedAt(t *time.Time) *AppCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppCreate) SetNillableUpdatedBy

func (ac *AppCreate) SetNillableUpdatedBy(i *int) *AppCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppCreate) SetOwnerOrgID

func (ac *AppCreate) SetOwnerOrgID(i int) *AppCreate

SetOwnerOrgID sets the "owner_org_id" field.

func (*AppCreate) SetPrivate

func (ac *AppCreate) SetPrivate(b bool) *AppCreate

SetPrivate sets the "private" field.

func (*AppCreate) SetRedirectURI

func (ac *AppCreate) SetRedirectURI(s string) *AppCreate

SetRedirectURI sets the "redirect_uri" field.

func (*AppCreate) SetRefreshTokenValidity

func (ac *AppCreate) SetRefreshTokenValidity(i int32) *AppCreate

SetRefreshTokenValidity sets the "refresh_token_validity" field.

func (*AppCreate) SetScopes

func (ac *AppCreate) SetScopes(s string) *AppCreate

SetScopes sets the "scopes" field.

func (*AppCreate) SetStatus

func (ac *AppCreate) SetStatus(ts typex.SimpleStatus) *AppCreate

SetStatus sets the "status" field.

func (*AppCreate) SetTokenValidity

func (ac *AppCreate) SetTokenValidity(i int32) *AppCreate

SetTokenValidity sets the "token_validity" field.

func (*AppCreate) SetUpdatedAt

func (ac *AppCreate) SetUpdatedAt(t time.Time) *AppCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppCreate) SetUpdatedBy

func (ac *AppCreate) SetUpdatedBy(i int) *AppCreate

SetUpdatedBy sets the "updated_by" field.

type AppCreateBulk

type AppCreateBulk struct {
	// contains filtered or unexported fields
}

AppCreateBulk is the builder for creating many App entities in bulk.

func (*AppCreateBulk) Exec

func (acb *AppCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppCreateBulk) ExecX

func (acb *AppCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppCreateBulk) OnConflict

func (acb *AppCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.App.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppCreateBulk) OnConflictColumns

func (acb *AppCreateBulk) OnConflictColumns(columns ...string) *AppUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.App.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppCreateBulk) Save

func (acb *AppCreateBulk) Save(ctx context.Context) ([]*App, error)

Save creates the App entities in the database.

func (*AppCreateBulk) SaveX

func (acb *AppCreateBulk) SaveX(ctx context.Context) []*App

SaveX is like Save, but panics if an error occurs.

type AppDelete

type AppDelete struct {
	// contains filtered or unexported fields
}

AppDelete is the builder for deleting a App entity.

func (*AppDelete) Exec

func (ad *AppDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppDelete) ExecX

func (ad *AppDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppDelete) Where

func (ad *AppDelete) Where(ps ...predicate.App) *AppDelete

Where appends a list predicates to the AppDelete builder.

type AppDeleteOne

type AppDeleteOne struct {
	// contains filtered or unexported fields
}

AppDeleteOne is the builder for deleting a single App entity.

func (*AppDeleteOne) Exec

func (ado *AppDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppDeleteOne) ExecX

func (ado *AppDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDeleteOne) Where

func (ado *AppDeleteOne) Where(ps ...predicate.App) *AppDeleteOne

Where appends a list predicates to the AppDelete builder.

type AppDict

type AppDict struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 所属应用
	AppID int `json:"app_id,omitempty"`
	// 用于标识应用资源的唯一代码,尽量简短
	Code string `json:"code,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppDictQuery when eager-loading is set.
	Edges AppDictEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppDict is the model entity for the AppDict schema.

func (*AppDict) App

func (ad *AppDict) App(ctx context.Context) (*App, error)

func (*AppDict) GlobalID

func (ad *AppDict) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppDict node.

func (*AppDict) IsNode

func (*AppDict) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppDict) Items

func (ad *AppDict) Items(ctx context.Context) (result []*AppDictItem, err error)

func (*AppDict) NamedItems

func (ad *AppDict) NamedItems(name string) ([]*AppDictItem, error)

NamedItems returns the Items named value or an error if the edge was not loaded in eager-loading with this name.

func (*AppDict) QueryApp

func (ad *AppDict) QueryApp() *AppQuery

QueryApp queries the "app" edge of the AppDict entity.

func (*AppDict) QueryItems

func (ad *AppDict) QueryItems() *AppDictItemQuery

QueryItems queries the "items" edge of the AppDict entity.

func (*AppDict) String

func (ad *AppDict) String() string

String implements the fmt.Stringer.

func (*AppDict) ToEdge

func (ad *AppDict) ToEdge(order *AppDictOrder) *AppDictEdge

ToEdge converts AppDict into AppDictEdge.

func (*AppDict) Unwrap

func (ad *AppDict) Unwrap() *AppDict

Unwrap unwraps the AppDict entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppDict) Update

func (ad *AppDict) Update() *AppDictUpdateOne

Update returns a builder for updating this AppDict. Note that you need to call AppDict.Unwrap() before calling this method if this AppDict was returned from a transaction, and the transaction was committed or rolled back.

func (*AppDict) Value

func (ad *AppDict) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppDict. This includes values selected through modifiers, order, etc.

type AppDictClient

type AppDictClient struct {
	// contains filtered or unexported fields
}

AppDictClient is a client for the AppDict schema.

func NewAppDictClient

func NewAppDictClient(c config) *AppDictClient

NewAppDictClient returns a client for the AppDict from the given config.

func (*AppDictClient) Create

func (c *AppDictClient) Create() *AppDictCreate

Create returns a builder for creating a AppDict entity.

func (*AppDictClient) CreateBulk

func (c *AppDictClient) CreateBulk(builders ...*AppDictCreate) *AppDictCreateBulk

CreateBulk returns a builder for creating a bulk of AppDict entities.

func (*AppDictClient) Delete

func (c *AppDictClient) Delete() *AppDictDelete

Delete returns a delete builder for AppDict.

func (*AppDictClient) DeleteOne

func (c *AppDictClient) DeleteOne(ad *AppDict) *AppDictDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppDictClient) DeleteOneID

func (c *AppDictClient) DeleteOneID(id int) *AppDictDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppDictClient) Get

func (c *AppDictClient) Get(ctx context.Context, id int) (*AppDict, error)

Get returns a AppDict entity by its id.

func (*AppDictClient) GetX

func (c *AppDictClient) GetX(ctx context.Context, id int) *AppDict

GetX is like Get, but panics if an error occurs.

func (*AppDictClient) Hooks

func (c *AppDictClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppDictClient) Intercept

func (c *AppDictClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `appdict.Intercept(f(g(h())))`.

func (*AppDictClient) Interceptors

func (c *AppDictClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppDictClient) MapCreateBulk

func (c *AppDictClient) MapCreateBulk(slice any, setFunc func(*AppDictCreate, int)) *AppDictCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppDictClient) Query

func (c *AppDictClient) Query() *AppDictQuery

Query returns a query builder for AppDict.

func (*AppDictClient) QueryApp

func (c *AppDictClient) QueryApp(ad *AppDict) *AppQuery

QueryApp queries the app edge of a AppDict.

func (*AppDictClient) QueryItems

func (c *AppDictClient) QueryItems(ad *AppDict) *AppDictItemQuery

QueryItems queries the items edge of a AppDict.

func (*AppDictClient) Update

func (c *AppDictClient) Update() *AppDictUpdate

Update returns an update builder for AppDict.

func (*AppDictClient) UpdateOne

func (c *AppDictClient) UpdateOne(ad *AppDict) *AppDictUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppDictClient) UpdateOneID

func (c *AppDictClient) UpdateOneID(id int) *AppDictUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppDictClient) Use

func (c *AppDictClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `appdict.Hooks(f(g(h())))`.

type AppDictConnection

type AppDictConnection struct {
	Edges      []*AppDictEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

AppDictConnection is the connection containing edges to AppDict.

type AppDictCreate

type AppDictCreate struct {
	// contains filtered or unexported fields
}

AppDictCreate is the builder for creating a AppDict entity.

func (*AppDictCreate) AddItemIDs

func (adc *AppDictCreate) AddItemIDs(ids ...int) *AppDictCreate

AddItemIDs adds the "items" edge to the AppDictItem entity by IDs.

func (*AppDictCreate) AddItems

func (adc *AppDictCreate) AddItems(a ...*AppDictItem) *AppDictCreate

AddItems adds the "items" edges to the AppDictItem entity.

func (*AppDictCreate) Exec

func (adc *AppDictCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictCreate) ExecX

func (adc *AppDictCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictCreate) Mutation

func (adc *AppDictCreate) Mutation() *AppDictMutation

Mutation returns the AppDictMutation object of the builder.

func (*AppDictCreate) OnConflict

func (adc *AppDictCreate) OnConflict(opts ...sql.ConflictOption) *AppDictUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppDict.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppDictUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppDictCreate) OnConflictColumns

func (adc *AppDictCreate) OnConflictColumns(columns ...string) *AppDictUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppDict.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppDictCreate) Save

func (adc *AppDictCreate) Save(ctx context.Context) (*AppDict, error)

Save creates the AppDict in the database.

func (*AppDictCreate) SaveX

func (adc *AppDictCreate) SaveX(ctx context.Context) *AppDict

SaveX calls Save and panics if Save returns an error.

func (*AppDictCreate) SetApp

func (adc *AppDictCreate) SetApp(a *App) *AppDictCreate

SetApp sets the "app" edge to the App entity.

func (*AppDictCreate) SetAppID

func (adc *AppDictCreate) SetAppID(i int) *AppDictCreate

SetAppID sets the "app_id" field.

func (*AppDictCreate) SetCode

func (adc *AppDictCreate) SetCode(s string) *AppDictCreate

SetCode sets the "code" field.

func (*AppDictCreate) SetComments

func (adc *AppDictCreate) SetComments(s string) *AppDictCreate

SetComments sets the "comments" field.

func (*AppDictCreate) SetCreatedAt

func (adc *AppDictCreate) SetCreatedAt(t time.Time) *AppDictCreate

SetCreatedAt sets the "created_at" field.

func (*AppDictCreate) SetCreatedBy

func (adc *AppDictCreate) SetCreatedBy(i int) *AppDictCreate

SetCreatedBy sets the "created_by" field.

func (*AppDictCreate) SetID

func (adc *AppDictCreate) SetID(i int) *AppDictCreate

SetID sets the "id" field.

func (*AppDictCreate) SetInput

SetInput applies the change-set in the CreateAppDictInput on the AppDictCreate builder.

func (*AppDictCreate) SetName

func (adc *AppDictCreate) SetName(s string) *AppDictCreate

SetName sets the "name" field.

func (*AppDictCreate) SetNillableAppID

func (adc *AppDictCreate) SetNillableAppID(i *int) *AppDictCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*AppDictCreate) SetNillableComments

func (adc *AppDictCreate) SetNillableComments(s *string) *AppDictCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppDictCreate) SetNillableCreatedAt

func (adc *AppDictCreate) SetNillableCreatedAt(t *time.Time) *AppDictCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppDictCreate) SetNillableUpdatedAt

func (adc *AppDictCreate) SetNillableUpdatedAt(t *time.Time) *AppDictCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppDictCreate) SetNillableUpdatedBy

func (adc *AppDictCreate) SetNillableUpdatedBy(i *int) *AppDictCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppDictCreate) SetUpdatedAt

func (adc *AppDictCreate) SetUpdatedAt(t time.Time) *AppDictCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppDictCreate) SetUpdatedBy

func (adc *AppDictCreate) SetUpdatedBy(i int) *AppDictCreate

SetUpdatedBy sets the "updated_by" field.

type AppDictCreateBulk

type AppDictCreateBulk struct {
	// contains filtered or unexported fields
}

AppDictCreateBulk is the builder for creating many AppDict entities in bulk.

func (*AppDictCreateBulk) Exec

func (adcb *AppDictCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictCreateBulk) ExecX

func (adcb *AppDictCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictCreateBulk) OnConflict

func (adcb *AppDictCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppDictUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppDict.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppDictUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppDictCreateBulk) OnConflictColumns

func (adcb *AppDictCreateBulk) OnConflictColumns(columns ...string) *AppDictUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppDict.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppDictCreateBulk) Save

func (adcb *AppDictCreateBulk) Save(ctx context.Context) ([]*AppDict, error)

Save creates the AppDict entities in the database.

func (*AppDictCreateBulk) SaveX

func (adcb *AppDictCreateBulk) SaveX(ctx context.Context) []*AppDict

SaveX is like Save, but panics if an error occurs.

type AppDictDelete

type AppDictDelete struct {
	// contains filtered or unexported fields
}

AppDictDelete is the builder for deleting a AppDict entity.

func (*AppDictDelete) Exec

func (add *AppDictDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppDictDelete) ExecX

func (add *AppDictDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppDictDelete) Where

func (add *AppDictDelete) Where(ps ...predicate.AppDict) *AppDictDelete

Where appends a list predicates to the AppDictDelete builder.

type AppDictDeleteOne

type AppDictDeleteOne struct {
	// contains filtered or unexported fields
}

AppDictDeleteOne is the builder for deleting a single AppDict entity.

func (*AppDictDeleteOne) Exec

func (addo *AppDictDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppDictDeleteOne) ExecX

func (addo *AppDictDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictDeleteOne) Where

func (addo *AppDictDeleteOne) Where(ps ...predicate.AppDict) *AppDictDeleteOne

Where appends a list predicates to the AppDictDelete builder.

type AppDictEdge

type AppDictEdge struct {
	Node   *AppDict `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

AppDictEdge is the edge representation of AppDict.

type AppDictEdges

type AppDictEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// Items holds the value of the items edge.
	Items []*AppDictItem `json:"items,omitempty"`
	// contains filtered or unexported fields
}

AppDictEdges holds the relations/edges for other nodes in the graph.

func (AppDictEdges) AppOrErr

func (e AppDictEdges) AppOrErr() (*App, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AppDictEdges) ItemsOrErr

func (e AppDictEdges) ItemsOrErr() ([]*AppDictItem, error)

ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.

type AppDictGroupBy

type AppDictGroupBy struct {
	// contains filtered or unexported fields
}

AppDictGroupBy is the group-by builder for AppDict entities.

func (*AppDictGroupBy) Aggregate

func (adgb *AppDictGroupBy) Aggregate(fns ...AggregateFunc) *AppDictGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppDictGroupBy) Bool

func (s *AppDictGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) BoolX

func (s *AppDictGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppDictGroupBy) Bools

func (s *AppDictGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) BoolsX

func (s *AppDictGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppDictGroupBy) Float64

func (s *AppDictGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) Float64X

func (s *AppDictGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppDictGroupBy) Float64s

func (s *AppDictGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) Float64sX

func (s *AppDictGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppDictGroupBy) Int

func (s *AppDictGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) IntX

func (s *AppDictGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppDictGroupBy) Ints

func (s *AppDictGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) IntsX

func (s *AppDictGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppDictGroupBy) Scan

func (adgb *AppDictGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppDictGroupBy) ScanX

func (s *AppDictGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppDictGroupBy) String

func (s *AppDictGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) StringX

func (s *AppDictGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppDictGroupBy) Strings

func (s *AppDictGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppDictGroupBy) StringsX

func (s *AppDictGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppDictItem

type AppDictItem struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 组织ID,空为全局字典
	OrgID int `json:"org_id,omitempty"`
	// 所属字典
	DictID int `json:"dict_id,omitempty"`
	// 关联代码,由app_code和dict_code组成
	RefCode string `json:"ref_code,omitempty"`
	// 字典值唯一编码,生效后不可修改.
	Code string `json:"code,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// DisplaySort holds the value of the "display_sort" field.
	DisplaySort int32 `json:"display_sort,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppDictItemQuery when eager-loading is set.
	Edges AppDictItemEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppDictItem is the model entity for the AppDictItem schema.

func (*AppDictItem) Dict

func (adi *AppDictItem) Dict(ctx context.Context) (*AppDict, error)

func (*AppDictItem) GlobalID

func (adi *AppDictItem) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppDictItem node.

func (*AppDictItem) IsNode

func (*AppDictItem) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppDictItem) Org

func (adi *AppDictItem) Org(ctx context.Context) (*Org, error)

func (*AppDictItem) QueryDict

func (adi *AppDictItem) QueryDict() *AppDictQuery

QueryDict queries the "dict" edge of the AppDictItem entity.

func (*AppDictItem) QueryOrg

func (adi *AppDictItem) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the AppDictItem entity.

func (*AppDictItem) String

func (adi *AppDictItem) String() string

String implements the fmt.Stringer.

func (*AppDictItem) ToEdge

func (adi *AppDictItem) ToEdge(order *AppDictItemOrder) *AppDictItemEdge

ToEdge converts AppDictItem into AppDictItemEdge.

func (*AppDictItem) Unwrap

func (adi *AppDictItem) Unwrap() *AppDictItem

Unwrap unwraps the AppDictItem entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppDictItem) Update

func (adi *AppDictItem) Update() *AppDictItemUpdateOne

Update returns a builder for updating this AppDictItem. Note that you need to call AppDictItem.Unwrap() before calling this method if this AppDictItem was returned from a transaction, and the transaction was committed or rolled back.

func (*AppDictItem) Value

func (adi *AppDictItem) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppDictItem. This includes values selected through modifiers, order, etc.

type AppDictItemClient

type AppDictItemClient struct {
	// contains filtered or unexported fields
}

AppDictItemClient is a client for the AppDictItem schema.

func NewAppDictItemClient

func NewAppDictItemClient(c config) *AppDictItemClient

NewAppDictItemClient returns a client for the AppDictItem from the given config.

func (*AppDictItemClient) Create

func (c *AppDictItemClient) Create() *AppDictItemCreate

Create returns a builder for creating a AppDictItem entity.

func (*AppDictItemClient) CreateBulk

func (c *AppDictItemClient) CreateBulk(builders ...*AppDictItemCreate) *AppDictItemCreateBulk

CreateBulk returns a builder for creating a bulk of AppDictItem entities.

func (*AppDictItemClient) Delete

func (c *AppDictItemClient) Delete() *AppDictItemDelete

Delete returns a delete builder for AppDictItem.

func (*AppDictItemClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppDictItemClient) DeleteOneID

func (c *AppDictItemClient) DeleteOneID(id int) *AppDictItemDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppDictItemClient) Get

func (c *AppDictItemClient) Get(ctx context.Context, id int) (*AppDictItem, error)

Get returns a AppDictItem entity by its id.

func (*AppDictItemClient) GetX

func (c *AppDictItemClient) GetX(ctx context.Context, id int) *AppDictItem

GetX is like Get, but panics if an error occurs.

func (*AppDictItemClient) Hooks

func (c *AppDictItemClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppDictItemClient) Intercept

func (c *AppDictItemClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `appdictitem.Intercept(f(g(h())))`.

func (*AppDictItemClient) Interceptors

func (c *AppDictItemClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppDictItemClient) MapCreateBulk

func (c *AppDictItemClient) MapCreateBulk(slice any, setFunc func(*AppDictItemCreate, int)) *AppDictItemCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppDictItemClient) Query

func (c *AppDictItemClient) Query() *AppDictItemQuery

Query returns a query builder for AppDictItem.

func (*AppDictItemClient) QueryDict

func (c *AppDictItemClient) QueryDict(adi *AppDictItem) *AppDictQuery

QueryDict queries the dict edge of a AppDictItem.

func (*AppDictItemClient) QueryOrg

func (c *AppDictItemClient) QueryOrg(adi *AppDictItem) *OrgQuery

QueryOrg queries the org edge of a AppDictItem.

func (*AppDictItemClient) Update

func (c *AppDictItemClient) Update() *AppDictItemUpdate

Update returns an update builder for AppDictItem.

func (*AppDictItemClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppDictItemClient) UpdateOneID

func (c *AppDictItemClient) UpdateOneID(id int) *AppDictItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppDictItemClient) Use

func (c *AppDictItemClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `appdictitem.Hooks(f(g(h())))`.

type AppDictItemConnection

type AppDictItemConnection struct {
	Edges      []*AppDictItemEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

AppDictItemConnection is the connection containing edges to AppDictItem.

type AppDictItemCreate

type AppDictItemCreate struct {
	// contains filtered or unexported fields
}

AppDictItemCreate is the builder for creating a AppDictItem entity.

func (*AppDictItemCreate) Exec

func (adic *AppDictItemCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictItemCreate) ExecX

func (adic *AppDictItemCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemCreate) Mutation

func (adic *AppDictItemCreate) Mutation() *AppDictItemMutation

Mutation returns the AppDictItemMutation object of the builder.

func (*AppDictItemCreate) OnConflict

func (adic *AppDictItemCreate) OnConflict(opts ...sql.ConflictOption) *AppDictItemUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppDictItem.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppDictItemUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppDictItemCreate) OnConflictColumns

func (adic *AppDictItemCreate) OnConflictColumns(columns ...string) *AppDictItemUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppDictItem.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppDictItemCreate) Save

func (adic *AppDictItemCreate) Save(ctx context.Context) (*AppDictItem, error)

Save creates the AppDictItem in the database.

func (*AppDictItemCreate) SaveX

func (adic *AppDictItemCreate) SaveX(ctx context.Context) *AppDictItem

SaveX calls Save and panics if Save returns an error.

func (*AppDictItemCreate) SetCode

func (adic *AppDictItemCreate) SetCode(s string) *AppDictItemCreate

SetCode sets the "code" field.

func (*AppDictItemCreate) SetComments

func (adic *AppDictItemCreate) SetComments(s string) *AppDictItemCreate

SetComments sets the "comments" field.

func (*AppDictItemCreate) SetCreatedAt

func (adic *AppDictItemCreate) SetCreatedAt(t time.Time) *AppDictItemCreate

SetCreatedAt sets the "created_at" field.

func (*AppDictItemCreate) SetCreatedBy

func (adic *AppDictItemCreate) SetCreatedBy(i int) *AppDictItemCreate

SetCreatedBy sets the "created_by" field.

func (*AppDictItemCreate) SetDict

func (adic *AppDictItemCreate) SetDict(a *AppDict) *AppDictItemCreate

SetDict sets the "dict" edge to the AppDict entity.

func (*AppDictItemCreate) SetDictID

func (adic *AppDictItemCreate) SetDictID(i int) *AppDictItemCreate

SetDictID sets the "dict_id" field.

func (*AppDictItemCreate) SetDisplaySort

func (adic *AppDictItemCreate) SetDisplaySort(i int32) *AppDictItemCreate

SetDisplaySort sets the "display_sort" field.

func (*AppDictItemCreate) SetID

func (adic *AppDictItemCreate) SetID(i int) *AppDictItemCreate

SetID sets the "id" field.

func (*AppDictItemCreate) SetInput

SetInput applies the change-set in the CreateAppDictItemInput on the AppDictItemCreate builder.

func (*AppDictItemCreate) SetName

func (adic *AppDictItemCreate) SetName(s string) *AppDictItemCreate

SetName sets the "name" field.

func (*AppDictItemCreate) SetNillableComments

func (adic *AppDictItemCreate) SetNillableComments(s *string) *AppDictItemCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppDictItemCreate) SetNillableCreatedAt

func (adic *AppDictItemCreate) SetNillableCreatedAt(t *time.Time) *AppDictItemCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppDictItemCreate) SetNillableDictID

func (adic *AppDictItemCreate) SetNillableDictID(i *int) *AppDictItemCreate

SetNillableDictID sets the "dict_id" field if the given value is not nil.

func (*AppDictItemCreate) SetNillableDisplaySort

func (adic *AppDictItemCreate) SetNillableDisplaySort(i *int32) *AppDictItemCreate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppDictItemCreate) SetNillableOrgID

func (adic *AppDictItemCreate) SetNillableOrgID(i *int) *AppDictItemCreate

SetNillableOrgID sets the "org_id" field if the given value is not nil.

func (*AppDictItemCreate) SetNillableStatus

func (adic *AppDictItemCreate) SetNillableStatus(ts *typex.SimpleStatus) *AppDictItemCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppDictItemCreate) SetNillableUpdatedAt

func (adic *AppDictItemCreate) SetNillableUpdatedAt(t *time.Time) *AppDictItemCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppDictItemCreate) SetNillableUpdatedBy

func (adic *AppDictItemCreate) SetNillableUpdatedBy(i *int) *AppDictItemCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppDictItemCreate) SetOrg

func (adic *AppDictItemCreate) SetOrg(o *Org) *AppDictItemCreate

SetOrg sets the "org" edge to the Org entity.

func (*AppDictItemCreate) SetOrgID

func (adic *AppDictItemCreate) SetOrgID(i int) *AppDictItemCreate

SetOrgID sets the "org_id" field.

func (*AppDictItemCreate) SetRefCode

func (adic *AppDictItemCreate) SetRefCode(s string) *AppDictItemCreate

SetRefCode sets the "ref_code" field.

func (*AppDictItemCreate) SetStatus

SetStatus sets the "status" field.

func (*AppDictItemCreate) SetUpdatedAt

func (adic *AppDictItemCreate) SetUpdatedAt(t time.Time) *AppDictItemCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppDictItemCreate) SetUpdatedBy

func (adic *AppDictItemCreate) SetUpdatedBy(i int) *AppDictItemCreate

SetUpdatedBy sets the "updated_by" field.

type AppDictItemCreateBulk

type AppDictItemCreateBulk struct {
	// contains filtered or unexported fields
}

AppDictItemCreateBulk is the builder for creating many AppDictItem entities in bulk.

func (*AppDictItemCreateBulk) Exec

func (adicb *AppDictItemCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictItemCreateBulk) ExecX

func (adicb *AppDictItemCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemCreateBulk) OnConflict

func (adicb *AppDictItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppDictItemUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppDictItem.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppDictItemUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppDictItemCreateBulk) OnConflictColumns

func (adicb *AppDictItemCreateBulk) OnConflictColumns(columns ...string) *AppDictItemUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppDictItem.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppDictItemCreateBulk) Save

func (adicb *AppDictItemCreateBulk) Save(ctx context.Context) ([]*AppDictItem, error)

Save creates the AppDictItem entities in the database.

func (*AppDictItemCreateBulk) SaveX

func (adicb *AppDictItemCreateBulk) SaveX(ctx context.Context) []*AppDictItem

SaveX is like Save, but panics if an error occurs.

type AppDictItemDelete

type AppDictItemDelete struct {
	// contains filtered or unexported fields
}

AppDictItemDelete is the builder for deleting a AppDictItem entity.

func (*AppDictItemDelete) Exec

func (adid *AppDictItemDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppDictItemDelete) ExecX

func (adid *AppDictItemDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemDelete) Where

Where appends a list predicates to the AppDictItemDelete builder.

type AppDictItemDeleteOne

type AppDictItemDeleteOne struct {
	// contains filtered or unexported fields
}

AppDictItemDeleteOne is the builder for deleting a single AppDictItem entity.

func (*AppDictItemDeleteOne) Exec

func (adido *AppDictItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppDictItemDeleteOne) ExecX

func (adido *AppDictItemDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemDeleteOne) Where

Where appends a list predicates to the AppDictItemDelete builder.

type AppDictItemEdge

type AppDictItemEdge struct {
	Node   *AppDictItem `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

AppDictItemEdge is the edge representation of AppDictItem.

type AppDictItemEdges

type AppDictItemEdges struct {
	// Dict holds the value of the dict edge.
	Dict *AppDict `json:"dict,omitempty"`
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// contains filtered or unexported fields
}

AppDictItemEdges holds the relations/edges for other nodes in the graph.

func (AppDictItemEdges) DictOrErr

func (e AppDictItemEdges) DictOrErr() (*AppDict, error)

DictOrErr returns the Dict value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AppDictItemEdges) OrgOrErr

func (e AppDictItemEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type AppDictItemGroupBy

type AppDictItemGroupBy struct {
	// contains filtered or unexported fields
}

AppDictItemGroupBy is the group-by builder for AppDictItem entities.

func (*AppDictItemGroupBy) Aggregate

func (adigb *AppDictItemGroupBy) Aggregate(fns ...AggregateFunc) *AppDictItemGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppDictItemGroupBy) Bool

func (s *AppDictItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) BoolX

func (s *AppDictItemGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppDictItemGroupBy) Bools

func (s *AppDictItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) BoolsX

func (s *AppDictItemGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppDictItemGroupBy) Float64

func (s *AppDictItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) Float64X

func (s *AppDictItemGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppDictItemGroupBy) Float64s

func (s *AppDictItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) Float64sX

func (s *AppDictItemGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppDictItemGroupBy) Int

func (s *AppDictItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) IntX

func (s *AppDictItemGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppDictItemGroupBy) Ints

func (s *AppDictItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) IntsX

func (s *AppDictItemGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppDictItemGroupBy) Scan

func (adigb *AppDictItemGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppDictItemGroupBy) ScanX

func (s *AppDictItemGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppDictItemGroupBy) String

func (s *AppDictItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) StringX

func (s *AppDictItemGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppDictItemGroupBy) Strings

func (s *AppDictItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppDictItemGroupBy) StringsX

func (s *AppDictItemGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppDictItemMutation

type AppDictItemMutation struct {
	// contains filtered or unexported fields
}

AppDictItemMutation represents an operation that mutates the AppDictItem nodes in the graph.

func (*AppDictItemMutation) AddCreatedBy

func (m *AppDictItemMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppDictItemMutation) AddDisplaySort

func (m *AppDictItemMutation) AddDisplaySort(i int32)

AddDisplaySort adds i to the "display_sort" field.

func (*AppDictItemMutation) AddField

func (m *AppDictItemMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppDictItemMutation) AddUpdatedBy

func (m *AppDictItemMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppDictItemMutation) AddedCreatedBy

func (m *AppDictItemMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppDictItemMutation) AddedDisplaySort

func (m *AppDictItemMutation) AddedDisplaySort() (r int32, exists bool)

AddedDisplaySort returns the value that was added to the "display_sort" field in this mutation.

func (*AppDictItemMutation) AddedEdges

func (m *AppDictItemMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppDictItemMutation) AddedField

func (m *AppDictItemMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppDictItemMutation) AddedFields

func (m *AppDictItemMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppDictItemMutation) AddedIDs

func (m *AppDictItemMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppDictItemMutation) AddedUpdatedBy

func (m *AppDictItemMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppDictItemMutation) ClearComments

func (m *AppDictItemMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppDictItemMutation) ClearDict

func (m *AppDictItemMutation) ClearDict()

ClearDict clears the "dict" edge to the AppDict entity.

func (*AppDictItemMutation) ClearDictID

func (m *AppDictItemMutation) ClearDictID()

ClearDictID clears the value of the "dict_id" field.

func (*AppDictItemMutation) ClearDisplaySort

func (m *AppDictItemMutation) ClearDisplaySort()

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppDictItemMutation) ClearEdge

func (m *AppDictItemMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppDictItemMutation) ClearField

func (m *AppDictItemMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppDictItemMutation) ClearOrg

func (m *AppDictItemMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*AppDictItemMutation) ClearOrgID

func (m *AppDictItemMutation) ClearOrgID()

ClearOrgID clears the value of the "org_id" field.

func (*AppDictItemMutation) ClearStatus

func (m *AppDictItemMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*AppDictItemMutation) ClearUpdatedAt

func (m *AppDictItemMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictItemMutation) ClearUpdatedBy

func (m *AppDictItemMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictItemMutation) ClearedEdges

func (m *AppDictItemMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppDictItemMutation) ClearedFields

func (m *AppDictItemMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppDictItemMutation) Client

func (m AppDictItemMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppDictItemMutation) Code

func (m *AppDictItemMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*AppDictItemMutation) Comments

func (m *AppDictItemMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*AppDictItemMutation) CommentsCleared

func (m *AppDictItemMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*AppDictItemMutation) CreatedAt

func (m *AppDictItemMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppDictItemMutation) CreatedBy

func (m *AppDictItemMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppDictItemMutation) DictCleared

func (m *AppDictItemMutation) DictCleared() bool

DictCleared reports if the "dict" edge to the AppDict entity was cleared.

func (*AppDictItemMutation) DictID

func (m *AppDictItemMutation) DictID() (r int, exists bool)

DictID returns the value of the "dict_id" field in the mutation.

func (*AppDictItemMutation) DictIDCleared

func (m *AppDictItemMutation) DictIDCleared() bool

DictIDCleared returns if the "dict_id" field was cleared in this mutation.

func (*AppDictItemMutation) DictIDs

func (m *AppDictItemMutation) DictIDs() (ids []int)

DictIDs returns the "dict" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DictID instead. It exists only for internal usage by the builders.

func (*AppDictItemMutation) DisplaySort

func (m *AppDictItemMutation) DisplaySort() (r int32, exists bool)

DisplaySort returns the value of the "display_sort" field in the mutation.

func (*AppDictItemMutation) DisplaySortCleared

func (m *AppDictItemMutation) DisplaySortCleared() bool

DisplaySortCleared returns if the "display_sort" field was cleared in this mutation.

func (*AppDictItemMutation) EdgeCleared

func (m *AppDictItemMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppDictItemMutation) Field

func (m *AppDictItemMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppDictItemMutation) FieldCleared

func (m *AppDictItemMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppDictItemMutation) Fields

func (m *AppDictItemMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppDictItemMutation) ID

func (m *AppDictItemMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppDictItemMutation) IDs

func (m *AppDictItemMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppDictItemMutation) Name

func (m *AppDictItemMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppDictItemMutation) OldCode

func (m *AppDictItemMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldComments

func (m *AppDictItemMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldCreatedAt

func (m *AppDictItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldCreatedBy

func (m *AppDictItemMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldDictID

func (m *AppDictItemMutation) OldDictID(ctx context.Context) (v int, err error)

OldDictID returns the old "dict_id" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldDisplaySort

func (m *AppDictItemMutation) OldDisplaySort(ctx context.Context) (v int32, err error)

OldDisplaySort returns the old "display_sort" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldField

func (m *AppDictItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppDictItemMutation) OldName

func (m *AppDictItemMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldOrgID

func (m *AppDictItemMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldRefCode

func (m *AppDictItemMutation) OldRefCode(ctx context.Context) (v string, err error)

OldRefCode returns the old "ref_code" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldStatus

func (m *AppDictItemMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldUpdatedAt

func (m *AppDictItemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) OldUpdatedBy

func (m *AppDictItemMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppDictItem entity. If the AppDictItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictItemMutation) Op

func (m *AppDictItemMutation) Op() Op

Op returns the operation name.

func (*AppDictItemMutation) OrgCleared

func (m *AppDictItemMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*AppDictItemMutation) OrgID

func (m *AppDictItemMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*AppDictItemMutation) OrgIDCleared

func (m *AppDictItemMutation) OrgIDCleared() bool

OrgIDCleared returns if the "org_id" field was cleared in this mutation.

func (*AppDictItemMutation) OrgIDs

func (m *AppDictItemMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*AppDictItemMutation) RefCode

func (m *AppDictItemMutation) RefCode() (r string, exists bool)

RefCode returns the value of the "ref_code" field in the mutation.

func (*AppDictItemMutation) RemovedEdges

func (m *AppDictItemMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppDictItemMutation) RemovedIDs

func (m *AppDictItemMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppDictItemMutation) ResetCode

func (m *AppDictItemMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*AppDictItemMutation) ResetComments

func (m *AppDictItemMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppDictItemMutation) ResetCreatedAt

func (m *AppDictItemMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppDictItemMutation) ResetCreatedBy

func (m *AppDictItemMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppDictItemMutation) ResetDict

func (m *AppDictItemMutation) ResetDict()

ResetDict resets all changes to the "dict" edge.

func (*AppDictItemMutation) ResetDictID

func (m *AppDictItemMutation) ResetDictID()

ResetDictID resets all changes to the "dict_id" field.

func (*AppDictItemMutation) ResetDisplaySort

func (m *AppDictItemMutation) ResetDisplaySort()

ResetDisplaySort resets all changes to the "display_sort" field.

func (*AppDictItemMutation) ResetEdge

func (m *AppDictItemMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppDictItemMutation) ResetField

func (m *AppDictItemMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppDictItemMutation) ResetName

func (m *AppDictItemMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppDictItemMutation) ResetOrg

func (m *AppDictItemMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*AppDictItemMutation) ResetOrgID

func (m *AppDictItemMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*AppDictItemMutation) ResetRefCode

func (m *AppDictItemMutation) ResetRefCode()

ResetRefCode resets all changes to the "ref_code" field.

func (*AppDictItemMutation) ResetStatus

func (m *AppDictItemMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*AppDictItemMutation) ResetUpdatedAt

func (m *AppDictItemMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppDictItemMutation) ResetUpdatedBy

func (m *AppDictItemMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppDictItemMutation) SetCode

func (m *AppDictItemMutation) SetCode(s string)

SetCode sets the "code" field.

func (*AppDictItemMutation) SetComments

func (m *AppDictItemMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppDictItemMutation) SetCreatedAt

func (m *AppDictItemMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppDictItemMutation) SetCreatedBy

func (m *AppDictItemMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppDictItemMutation) SetDictID

func (m *AppDictItemMutation) SetDictID(i int)

SetDictID sets the "dict_id" field.

func (*AppDictItemMutation) SetDisplaySort

func (m *AppDictItemMutation) SetDisplaySort(i int32)

SetDisplaySort sets the "display_sort" field.

func (*AppDictItemMutation) SetField

func (m *AppDictItemMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppDictItemMutation) SetID

func (m *AppDictItemMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppDictItem entities.

func (*AppDictItemMutation) SetName

func (m *AppDictItemMutation) SetName(s string)

SetName sets the "name" field.

func (*AppDictItemMutation) SetOp

func (m *AppDictItemMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppDictItemMutation) SetOrgID

func (m *AppDictItemMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*AppDictItemMutation) SetRefCode

func (m *AppDictItemMutation) SetRefCode(s string)

SetRefCode sets the "ref_code" field.

func (*AppDictItemMutation) SetStatus

func (m *AppDictItemMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*AppDictItemMutation) SetUpdatedAt

func (m *AppDictItemMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppDictItemMutation) SetUpdatedBy

func (m *AppDictItemMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*AppDictItemMutation) Status

func (m *AppDictItemMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*AppDictItemMutation) StatusCleared

func (m *AppDictItemMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (AppDictItemMutation) Tx

func (m AppDictItemMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppDictItemMutation) Type

func (m *AppDictItemMutation) Type() string

Type returns the node type of this mutation (AppDictItem).

func (*AppDictItemMutation) UpdatedAt

func (m *AppDictItemMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppDictItemMutation) UpdatedAtCleared

func (m *AppDictItemMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppDictItemMutation) UpdatedBy

func (m *AppDictItemMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppDictItemMutation) UpdatedByCleared

func (m *AppDictItemMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppDictItemMutation) Where

func (m *AppDictItemMutation) Where(ps ...predicate.AppDictItem)

Where appends a list predicates to the AppDictItemMutation builder.

func (*AppDictItemMutation) WhereP

func (m *AppDictItemMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppDictItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppDictItemOrder

type AppDictItemOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *AppDictItemOrderField `json:"field"`
}

AppDictItemOrder defines the ordering of AppDictItem.

type AppDictItemOrderField

type AppDictItemOrderField struct {
	// Value extracts the ordering value from the given AppDictItem.
	Value func(*AppDictItem) (ent.Value, error)
	// contains filtered or unexported fields
}

AppDictItemOrderField defines the ordering field of AppDictItem.

func (AppDictItemOrderField) MarshalGQL

func (f AppDictItemOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppDictItemOrderField) String

func (f AppDictItemOrderField) String() string

String implement fmt.Stringer interface.

func (*AppDictItemOrderField) UnmarshalGQL

func (f *AppDictItemOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppDictItemPaginateOption

type AppDictItemPaginateOption func(*appdictitemPager) error

AppDictItemPaginateOption enables pagination customization.

func WithAppDictItemFilter

func WithAppDictItemFilter(filter func(*AppDictItemQuery) (*AppDictItemQuery, error)) AppDictItemPaginateOption

WithAppDictItemFilter configures pagination filter.

func WithAppDictItemOrder

func WithAppDictItemOrder(order *AppDictItemOrder) AppDictItemPaginateOption

WithAppDictItemOrder configures pagination ordering.

type AppDictItemQuery

type AppDictItemQuery struct {
	// contains filtered or unexported fields
}

AppDictItemQuery is the builder for querying AppDictItem entities.

func (*AppDictItemQuery) Aggregate

func (adiq *AppDictItemQuery) Aggregate(fns ...AggregateFunc) *AppDictItemSelect

Aggregate returns a AppDictItemSelect configured with the given aggregations.

func (*AppDictItemQuery) All

func (adiq *AppDictItemQuery) All(ctx context.Context) ([]*AppDictItem, error)

All executes the query and returns a list of AppDictItems.

func (*AppDictItemQuery) AllX

func (adiq *AppDictItemQuery) AllX(ctx context.Context) []*AppDictItem

AllX is like All, but panics if an error occurs.

func (*AppDictItemQuery) Clone

func (adiq *AppDictItemQuery) Clone() *AppDictItemQuery

Clone returns a duplicate of the AppDictItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppDictItemQuery) CollectFields

func (adi *AppDictItemQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppDictItemQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppDictItemQuery) Count

func (adiq *AppDictItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppDictItemQuery) CountX

func (adiq *AppDictItemQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppDictItemQuery) Exist

func (adiq *AppDictItemQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppDictItemQuery) ExistX

func (adiq *AppDictItemQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppDictItemQuery) First

func (adiq *AppDictItemQuery) First(ctx context.Context) (*AppDictItem, error)

First returns the first AppDictItem entity from the query. Returns a *NotFoundError when no AppDictItem was found.

func (*AppDictItemQuery) FirstID

func (adiq *AppDictItemQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppDictItem ID from the query. Returns a *NotFoundError when no AppDictItem ID was found.

func (*AppDictItemQuery) FirstIDX

func (adiq *AppDictItemQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppDictItemQuery) FirstX

func (adiq *AppDictItemQuery) FirstX(ctx context.Context) *AppDictItem

FirstX is like First, but panics if an error occurs.

func (*AppDictItemQuery) GroupBy

func (adiq *AppDictItemQuery) GroupBy(field string, fields ...string) *AppDictItemGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppDictItem.Query().
	GroupBy(appdictitem.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppDictItemQuery) IDs

func (adiq *AppDictItemQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppDictItem IDs.

func (*AppDictItemQuery) IDsX

func (adiq *AppDictItemQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppDictItemQuery) Limit

func (adiq *AppDictItemQuery) Limit(limit int) *AppDictItemQuery

Limit the number of records to be returned by this query.

func (*AppDictItemQuery) Offset

func (adiq *AppDictItemQuery) Offset(offset int) *AppDictItemQuery

Offset to start from.

func (*AppDictItemQuery) Only

func (adiq *AppDictItemQuery) Only(ctx context.Context) (*AppDictItem, error)

Only returns a single AppDictItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppDictItem entity is found. Returns a *NotFoundError when no AppDictItem entities are found.

func (*AppDictItemQuery) OnlyID

func (adiq *AppDictItemQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppDictItem ID in the query. Returns a *NotSingularError when more than one AppDictItem ID is found. Returns a *NotFoundError when no entities are found.

func (*AppDictItemQuery) OnlyIDX

func (adiq *AppDictItemQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppDictItemQuery) OnlyX

func (adiq *AppDictItemQuery) OnlyX(ctx context.Context) *AppDictItem

OnlyX is like Only, but panics if an error occurs.

func (*AppDictItemQuery) Order

Order specifies how the records should be ordered.

func (*AppDictItemQuery) Paginate

func (adi *AppDictItemQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppDictItemPaginateOption,
) (*AppDictItemConnection, error)

Paginate executes the query and returns a relay based cursor connection to AppDictItem.

func (*AppDictItemQuery) QueryDict

func (adiq *AppDictItemQuery) QueryDict() *AppDictQuery

QueryDict chains the current query on the "dict" edge.

func (*AppDictItemQuery) QueryOrg

func (adiq *AppDictItemQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*AppDictItemQuery) Select

func (adiq *AppDictItemQuery) Select(fields ...string) *AppDictItemSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppDictItem.Query().
	Select(appdictitem.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppDictItemQuery) Unique

func (adiq *AppDictItemQuery) Unique(unique bool) *AppDictItemQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppDictItemQuery) Where

Where adds a new predicate for the AppDictItemQuery builder.

func (*AppDictItemQuery) WithDict

func (adiq *AppDictItemQuery) WithDict(opts ...func(*AppDictQuery)) *AppDictItemQuery

WithDict tells the query-builder to eager-load the nodes that are connected to the "dict" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppDictItemQuery) WithOrg

func (adiq *AppDictItemQuery) WithOrg(opts ...func(*OrgQuery)) *AppDictItemQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

type AppDictItemSelect

type AppDictItemSelect struct {
	*AppDictItemQuery
	// contains filtered or unexported fields
}

AppDictItemSelect is the builder for selecting fields of AppDictItem entities.

func (*AppDictItemSelect) Aggregate

func (adis *AppDictItemSelect) Aggregate(fns ...AggregateFunc) *AppDictItemSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppDictItemSelect) Bool

func (s *AppDictItemSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) BoolX

func (s *AppDictItemSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppDictItemSelect) Bools

func (s *AppDictItemSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) BoolsX

func (s *AppDictItemSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppDictItemSelect) Float64

func (s *AppDictItemSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) Float64X

func (s *AppDictItemSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppDictItemSelect) Float64s

func (s *AppDictItemSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) Float64sX

func (s *AppDictItemSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppDictItemSelect) Int

func (s *AppDictItemSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) IntX

func (s *AppDictItemSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppDictItemSelect) Ints

func (s *AppDictItemSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) IntsX

func (s *AppDictItemSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppDictItemSelect) Scan

func (adis *AppDictItemSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppDictItemSelect) ScanX

func (s *AppDictItemSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppDictItemSelect) String

func (s *AppDictItemSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) StringX

func (s *AppDictItemSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppDictItemSelect) Strings

func (s *AppDictItemSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppDictItemSelect) StringsX

func (s *AppDictItemSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppDictItemUpdate

type AppDictItemUpdate struct {
	// contains filtered or unexported fields
}

AppDictItemUpdate is the builder for updating AppDictItem entities.

func (*AppDictItemUpdate) AddDisplaySort

func (adiu *AppDictItemUpdate) AddDisplaySort(i int32) *AppDictItemUpdate

AddDisplaySort adds i to the "display_sort" field.

func (*AppDictItemUpdate) AddUpdatedBy

func (adiu *AppDictItemUpdate) AddUpdatedBy(i int) *AppDictItemUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppDictItemUpdate) ClearComments

func (adiu *AppDictItemUpdate) ClearComments() *AppDictItemUpdate

ClearComments clears the value of the "comments" field.

func (*AppDictItemUpdate) ClearDisplaySort

func (adiu *AppDictItemUpdate) ClearDisplaySort() *AppDictItemUpdate

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppDictItemUpdate) ClearStatus

func (adiu *AppDictItemUpdate) ClearStatus() *AppDictItemUpdate

ClearStatus clears the value of the "status" field.

func (*AppDictItemUpdate) ClearUpdatedAt

func (adiu *AppDictItemUpdate) ClearUpdatedAt() *AppDictItemUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictItemUpdate) ClearUpdatedBy

func (adiu *AppDictItemUpdate) ClearUpdatedBy() *AppDictItemUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictItemUpdate) Exec

func (adiu *AppDictItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictItemUpdate) ExecX

func (adiu *AppDictItemUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemUpdate) Mutation

func (adiu *AppDictItemUpdate) Mutation() *AppDictItemMutation

Mutation returns the AppDictItemMutation object of the builder.

func (*AppDictItemUpdate) Save

func (adiu *AppDictItemUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppDictItemUpdate) SaveX

func (adiu *AppDictItemUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppDictItemUpdate) SetComments

func (adiu *AppDictItemUpdate) SetComments(s string) *AppDictItemUpdate

SetComments sets the "comments" field.

func (*AppDictItemUpdate) SetDisplaySort

func (adiu *AppDictItemUpdate) SetDisplaySort(i int32) *AppDictItemUpdate

SetDisplaySort sets the "display_sort" field.

func (*AppDictItemUpdate) SetInput

SetInput applies the change-set in the UpdateAppDictItemInput on the AppDictItemUpdate builder.

func (*AppDictItemUpdate) SetName

func (adiu *AppDictItemUpdate) SetName(s string) *AppDictItemUpdate

SetName sets the "name" field.

func (*AppDictItemUpdate) SetNillableComments

func (adiu *AppDictItemUpdate) SetNillableComments(s *string) *AppDictItemUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppDictItemUpdate) SetNillableDisplaySort

func (adiu *AppDictItemUpdate) SetNillableDisplaySort(i *int32) *AppDictItemUpdate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppDictItemUpdate) SetNillableStatus

func (adiu *AppDictItemUpdate) SetNillableStatus(ts *typex.SimpleStatus) *AppDictItemUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppDictItemUpdate) SetNillableUpdatedAt

func (adiu *AppDictItemUpdate) SetNillableUpdatedAt(t *time.Time) *AppDictItemUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppDictItemUpdate) SetNillableUpdatedBy

func (adiu *AppDictItemUpdate) SetNillableUpdatedBy(i *int) *AppDictItemUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppDictItemUpdate) SetRefCode

func (adiu *AppDictItemUpdate) SetRefCode(s string) *AppDictItemUpdate

SetRefCode sets the "ref_code" field.

func (*AppDictItemUpdate) SetStatus

SetStatus sets the "status" field.

func (*AppDictItemUpdate) SetUpdatedAt

func (adiu *AppDictItemUpdate) SetUpdatedAt(t time.Time) *AppDictItemUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppDictItemUpdate) SetUpdatedBy

func (adiu *AppDictItemUpdate) SetUpdatedBy(i int) *AppDictItemUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppDictItemUpdate) Where

Where appends a list predicates to the AppDictItemUpdate builder.

type AppDictItemUpdateOne

type AppDictItemUpdateOne struct {
	// contains filtered or unexported fields
}

AppDictItemUpdateOne is the builder for updating a single AppDictItem entity.

func (*AppDictItemUpdateOne) AddDisplaySort

func (adiuo *AppDictItemUpdateOne) AddDisplaySort(i int32) *AppDictItemUpdateOne

AddDisplaySort adds i to the "display_sort" field.

func (*AppDictItemUpdateOne) AddUpdatedBy

func (adiuo *AppDictItemUpdateOne) AddUpdatedBy(i int) *AppDictItemUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppDictItemUpdateOne) ClearComments

func (adiuo *AppDictItemUpdateOne) ClearComments() *AppDictItemUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppDictItemUpdateOne) ClearDisplaySort

func (adiuo *AppDictItemUpdateOne) ClearDisplaySort() *AppDictItemUpdateOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppDictItemUpdateOne) ClearStatus

func (adiuo *AppDictItemUpdateOne) ClearStatus() *AppDictItemUpdateOne

ClearStatus clears the value of the "status" field.

func (*AppDictItemUpdateOne) ClearUpdatedAt

func (adiuo *AppDictItemUpdateOne) ClearUpdatedAt() *AppDictItemUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictItemUpdateOne) ClearUpdatedBy

func (adiuo *AppDictItemUpdateOne) ClearUpdatedBy() *AppDictItemUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictItemUpdateOne) Exec

func (adiuo *AppDictItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppDictItemUpdateOne) ExecX

func (adiuo *AppDictItemUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemUpdateOne) Mutation

func (adiuo *AppDictItemUpdateOne) Mutation() *AppDictItemMutation

Mutation returns the AppDictItemMutation object of the builder.

func (*AppDictItemUpdateOne) Save

func (adiuo *AppDictItemUpdateOne) Save(ctx context.Context) (*AppDictItem, error)

Save executes the query and returns the updated AppDictItem entity.

func (*AppDictItemUpdateOne) SaveX

func (adiuo *AppDictItemUpdateOne) SaveX(ctx context.Context) *AppDictItem

SaveX is like Save, but panics if an error occurs.

func (*AppDictItemUpdateOne) Select

func (adiuo *AppDictItemUpdateOne) Select(field string, fields ...string) *AppDictItemUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppDictItemUpdateOne) SetComments

func (adiuo *AppDictItemUpdateOne) SetComments(s string) *AppDictItemUpdateOne

SetComments sets the "comments" field.

func (*AppDictItemUpdateOne) SetDisplaySort

func (adiuo *AppDictItemUpdateOne) SetDisplaySort(i int32) *AppDictItemUpdateOne

SetDisplaySort sets the "display_sort" field.

func (*AppDictItemUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppDictItemInput on the AppDictItemUpdateOne builder.

func (*AppDictItemUpdateOne) SetName

SetName sets the "name" field.

func (*AppDictItemUpdateOne) SetNillableComments

func (adiuo *AppDictItemUpdateOne) SetNillableComments(s *string) *AppDictItemUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppDictItemUpdateOne) SetNillableDisplaySort

func (adiuo *AppDictItemUpdateOne) SetNillableDisplaySort(i *int32) *AppDictItemUpdateOne

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppDictItemUpdateOne) SetNillableStatus

func (adiuo *AppDictItemUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *AppDictItemUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppDictItemUpdateOne) SetNillableUpdatedAt

func (adiuo *AppDictItemUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppDictItemUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppDictItemUpdateOne) SetNillableUpdatedBy

func (adiuo *AppDictItemUpdateOne) SetNillableUpdatedBy(i *int) *AppDictItemUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppDictItemUpdateOne) SetRefCode

func (adiuo *AppDictItemUpdateOne) SetRefCode(s string) *AppDictItemUpdateOne

SetRefCode sets the "ref_code" field.

func (*AppDictItemUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*AppDictItemUpdateOne) SetUpdatedAt

func (adiuo *AppDictItemUpdateOne) SetUpdatedAt(t time.Time) *AppDictItemUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppDictItemUpdateOne) SetUpdatedBy

func (adiuo *AppDictItemUpdateOne) SetUpdatedBy(i int) *AppDictItemUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppDictItemUpdateOne) Where

Where appends a list predicates to the AppDictItemUpdate builder.

type AppDictItemUpsert

type AppDictItemUpsert struct {
	*sql.UpdateSet
}

AppDictItemUpsert is the "OnConflict" setter.

func (*AppDictItemUpsert) AddDisplaySort

func (u *AppDictItemUpsert) AddDisplaySort(v int32) *AppDictItemUpsert

AddDisplaySort adds v to the "display_sort" field.

func (*AppDictItemUpsert) AddUpdatedBy

func (u *AppDictItemUpsert) AddUpdatedBy(v int) *AppDictItemUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppDictItemUpsert) ClearComments

func (u *AppDictItemUpsert) ClearComments() *AppDictItemUpsert

ClearComments clears the value of the "comments" field.

func (*AppDictItemUpsert) ClearDisplaySort

func (u *AppDictItemUpsert) ClearDisplaySort() *AppDictItemUpsert

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppDictItemUpsert) ClearStatus

func (u *AppDictItemUpsert) ClearStatus() *AppDictItemUpsert

ClearStatus clears the value of the "status" field.

func (*AppDictItemUpsert) ClearUpdatedAt

func (u *AppDictItemUpsert) ClearUpdatedAt() *AppDictItemUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictItemUpsert) ClearUpdatedBy

func (u *AppDictItemUpsert) ClearUpdatedBy() *AppDictItemUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictItemUpsert) SetComments

func (u *AppDictItemUpsert) SetComments(v string) *AppDictItemUpsert

SetComments sets the "comments" field.

func (*AppDictItemUpsert) SetDisplaySort

func (u *AppDictItemUpsert) SetDisplaySort(v int32) *AppDictItemUpsert

SetDisplaySort sets the "display_sort" field.

func (*AppDictItemUpsert) SetName

SetName sets the "name" field.

func (*AppDictItemUpsert) SetRefCode

func (u *AppDictItemUpsert) SetRefCode(v string) *AppDictItemUpsert

SetRefCode sets the "ref_code" field.

func (*AppDictItemUpsert) SetStatus

SetStatus sets the "status" field.

func (*AppDictItemUpsert) SetUpdatedAt

func (u *AppDictItemUpsert) SetUpdatedAt(v time.Time) *AppDictItemUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppDictItemUpsert) SetUpdatedBy

func (u *AppDictItemUpsert) SetUpdatedBy(v int) *AppDictItemUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppDictItemUpsert) UpdateComments

func (u *AppDictItemUpsert) UpdateComments() *AppDictItemUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppDictItemUpsert) UpdateDisplaySort

func (u *AppDictItemUpsert) UpdateDisplaySort() *AppDictItemUpsert

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppDictItemUpsert) UpdateName

func (u *AppDictItemUpsert) UpdateName() *AppDictItemUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppDictItemUpsert) UpdateRefCode

func (u *AppDictItemUpsert) UpdateRefCode() *AppDictItemUpsert

UpdateRefCode sets the "ref_code" field to the value that was provided on create.

func (*AppDictItemUpsert) UpdateStatus

func (u *AppDictItemUpsert) UpdateStatus() *AppDictItemUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppDictItemUpsert) UpdateUpdatedAt

func (u *AppDictItemUpsert) UpdateUpdatedAt() *AppDictItemUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppDictItemUpsert) UpdateUpdatedBy

func (u *AppDictItemUpsert) UpdateUpdatedBy() *AppDictItemUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppDictItemUpsertBulk

type AppDictItemUpsertBulk struct {
	// contains filtered or unexported fields
}

AppDictItemUpsertBulk is the builder for "upsert"-ing a bulk of AppDictItem nodes.

func (*AppDictItemUpsertBulk) AddDisplaySort

func (u *AppDictItemUpsertBulk) AddDisplaySort(v int32) *AppDictItemUpsertBulk

AddDisplaySort adds v to the "display_sort" field.

func (*AppDictItemUpsertBulk) AddUpdatedBy

func (u *AppDictItemUpsertBulk) AddUpdatedBy(v int) *AppDictItemUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppDictItemUpsertBulk) ClearComments

func (u *AppDictItemUpsertBulk) ClearComments() *AppDictItemUpsertBulk

ClearComments clears the value of the "comments" field.

func (*AppDictItemUpsertBulk) ClearDisplaySort

func (u *AppDictItemUpsertBulk) ClearDisplaySort() *AppDictItemUpsertBulk

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppDictItemUpsertBulk) ClearStatus

func (u *AppDictItemUpsertBulk) ClearStatus() *AppDictItemUpsertBulk

ClearStatus clears the value of the "status" field.

func (*AppDictItemUpsertBulk) ClearUpdatedAt

func (u *AppDictItemUpsertBulk) ClearUpdatedAt() *AppDictItemUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictItemUpsertBulk) ClearUpdatedBy

func (u *AppDictItemUpsertBulk) ClearUpdatedBy() *AppDictItemUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictItemUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppDictItemUpsertBulk) Exec

Exec executes the query.

func (*AppDictItemUpsertBulk) ExecX

func (u *AppDictItemUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppDictItem.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppDictItemUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*AppDictItemUpsertBulk) SetDisplaySort

func (u *AppDictItemUpsertBulk) SetDisplaySort(v int32) *AppDictItemUpsertBulk

SetDisplaySort sets the "display_sort" field.

func (*AppDictItemUpsertBulk) SetName

SetName sets the "name" field.

func (*AppDictItemUpsertBulk) SetRefCode

SetRefCode sets the "ref_code" field.

func (*AppDictItemUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*AppDictItemUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*AppDictItemUpsertBulk) SetUpdatedBy

func (u *AppDictItemUpsertBulk) SetUpdatedBy(v int) *AppDictItemUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppDictItemUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the AppDictItemCreateBulk.OnConflict documentation for more info.

func (*AppDictItemUpsertBulk) UpdateComments

func (u *AppDictItemUpsertBulk) UpdateComments() *AppDictItemUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppDictItemUpsertBulk) UpdateDisplaySort

func (u *AppDictItemUpsertBulk) UpdateDisplaySort() *AppDictItemUpsertBulk

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppDictItemUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*AppDictItemUpsertBulk) UpdateNewValues

func (u *AppDictItemUpsertBulk) UpdateNewValues() *AppDictItemUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppDictItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appdictitem.FieldID)
		}),
	).
	Exec(ctx)

func (*AppDictItemUpsertBulk) UpdateRefCode

func (u *AppDictItemUpsertBulk) UpdateRefCode() *AppDictItemUpsertBulk

UpdateRefCode sets the "ref_code" field to the value that was provided on create.

func (*AppDictItemUpsertBulk) UpdateStatus

func (u *AppDictItemUpsertBulk) UpdateStatus() *AppDictItemUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppDictItemUpsertBulk) UpdateUpdatedAt

func (u *AppDictItemUpsertBulk) UpdateUpdatedAt() *AppDictItemUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppDictItemUpsertBulk) UpdateUpdatedBy

func (u *AppDictItemUpsertBulk) UpdateUpdatedBy() *AppDictItemUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppDictItemUpsertOne

type AppDictItemUpsertOne struct {
	// contains filtered or unexported fields
}

AppDictItemUpsertOne is the builder for "upsert"-ing

one AppDictItem node.

func (*AppDictItemUpsertOne) AddDisplaySort

func (u *AppDictItemUpsertOne) AddDisplaySort(v int32) *AppDictItemUpsertOne

AddDisplaySort adds v to the "display_sort" field.

func (*AppDictItemUpsertOne) AddUpdatedBy

func (u *AppDictItemUpsertOne) AddUpdatedBy(v int) *AppDictItemUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppDictItemUpsertOne) ClearComments

func (u *AppDictItemUpsertOne) ClearComments() *AppDictItemUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppDictItemUpsertOne) ClearDisplaySort

func (u *AppDictItemUpsertOne) ClearDisplaySort() *AppDictItemUpsertOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppDictItemUpsertOne) ClearStatus

func (u *AppDictItemUpsertOne) ClearStatus() *AppDictItemUpsertOne

ClearStatus clears the value of the "status" field.

func (*AppDictItemUpsertOne) ClearUpdatedAt

func (u *AppDictItemUpsertOne) ClearUpdatedAt() *AppDictItemUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictItemUpsertOne) ClearUpdatedBy

func (u *AppDictItemUpsertOne) ClearUpdatedBy() *AppDictItemUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictItemUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppDictItemUpsertOne) Exec

Exec executes the query.

func (*AppDictItemUpsertOne) ExecX

func (u *AppDictItemUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictItemUpsertOne) ID

func (u *AppDictItemUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppDictItemUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*AppDictItemUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppDictItem.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppDictItemUpsertOne) SetComments

SetComments sets the "comments" field.

func (*AppDictItemUpsertOne) SetDisplaySort

func (u *AppDictItemUpsertOne) SetDisplaySort(v int32) *AppDictItemUpsertOne

SetDisplaySort sets the "display_sort" field.

func (*AppDictItemUpsertOne) SetName

SetName sets the "name" field.

func (*AppDictItemUpsertOne) SetRefCode

SetRefCode sets the "ref_code" field.

func (*AppDictItemUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*AppDictItemUpsertOne) SetUpdatedAt

func (u *AppDictItemUpsertOne) SetUpdatedAt(v time.Time) *AppDictItemUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppDictItemUpsertOne) SetUpdatedBy

func (u *AppDictItemUpsertOne) SetUpdatedBy(v int) *AppDictItemUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppDictItemUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the AppDictItemCreate.OnConflict documentation for more info.

func (*AppDictItemUpsertOne) UpdateComments

func (u *AppDictItemUpsertOne) UpdateComments() *AppDictItemUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppDictItemUpsertOne) UpdateDisplaySort

func (u *AppDictItemUpsertOne) UpdateDisplaySort() *AppDictItemUpsertOne

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppDictItemUpsertOne) UpdateName

func (u *AppDictItemUpsertOne) UpdateName() *AppDictItemUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppDictItemUpsertOne) UpdateNewValues

func (u *AppDictItemUpsertOne) UpdateNewValues() *AppDictItemUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppDictItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appdictitem.FieldID)
		}),
	).
	Exec(ctx)

func (*AppDictItemUpsertOne) UpdateRefCode

func (u *AppDictItemUpsertOne) UpdateRefCode() *AppDictItemUpsertOne

UpdateRefCode sets the "ref_code" field to the value that was provided on create.

func (*AppDictItemUpsertOne) UpdateStatus

func (u *AppDictItemUpsertOne) UpdateStatus() *AppDictItemUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppDictItemUpsertOne) UpdateUpdatedAt

func (u *AppDictItemUpsertOne) UpdateUpdatedAt() *AppDictItemUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppDictItemUpsertOne) UpdateUpdatedBy

func (u *AppDictItemUpsertOne) UpdateUpdatedBy() *AppDictItemUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppDictItemWhereInput

type AppDictItemWhereInput struct {
	Predicates []predicate.AppDictItem  `json:"-"`
	Not        *AppDictItemWhereInput   `json:"not,omitempty"`
	Or         []*AppDictItemWhereInput `json:"or,omitempty"`
	And        []*AppDictItemWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "org_id" field predicates.
	OrgID       *int  `json:"orgID,omitempty"`
	OrgIDNEQ    *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn     []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn  []int `json:"orgIDNotIn,omitempty"`
	OrgIDIsNil  bool  `json:"orgIDIsNil,omitempty"`
	OrgIDNotNil bool  `json:"orgIDNotNil,omitempty"`

	// "dict_id" field predicates.
	DictID       *int  `json:"dictID,omitempty"`
	DictIDNEQ    *int  `json:"dictIDNEQ,omitempty"`
	DictIDIn     []int `json:"dictIDIn,omitempty"`
	DictIDNotIn  []int `json:"dictIDNotIn,omitempty"`
	DictIDIsNil  bool  `json:"dictIDIsNil,omitempty"`
	DictIDNotNil bool  `json:"dictIDNotNil,omitempty"`

	// "code" field predicates.
	Code             *string  `json:"code,omitempty"`
	CodeNEQ          *string  `json:"codeNEQ,omitempty"`
	CodeIn           []string `json:"codeIn,omitempty"`
	CodeNotIn        []string `json:"codeNotIn,omitempty"`
	CodeGT           *string  `json:"codeGT,omitempty"`
	CodeGTE          *string  `json:"codeGTE,omitempty"`
	CodeLT           *string  `json:"codeLT,omitempty"`
	CodeLTE          *string  `json:"codeLTE,omitempty"`
	CodeContains     *string  `json:"codeContains,omitempty"`
	CodeHasPrefix    *string  `json:"codeHasPrefix,omitempty"`
	CodeHasSuffix    *string  `json:"codeHasSuffix,omitempty"`
	CodeEqualFold    *string  `json:"codeEqualFold,omitempty"`
	CodeContainsFold *string  `json:"codeContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "dict" edge predicates.
	HasDict     *bool                `json:"hasDict,omitempty"`
	HasDictWith []*AppDictWhereInput `json:"hasDictWith,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`
}

AppDictItemWhereInput represents a where input for filtering AppDictItem queries.

func (*AppDictItemWhereInput) AddPredicates

func (i *AppDictItemWhereInput) AddPredicates(predicates ...predicate.AppDictItem)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppDictItemWhereInput) Filter

Filter applies the AppDictItemWhereInput filter on the AppDictItemQuery builder.

func (*AppDictItemWhereInput) P

P returns a predicate for filtering appdictitems. An error is returned if the input is empty or invalid.

type AppDictItems

type AppDictItems []*AppDictItem

AppDictItems is a parsable slice of AppDictItem.

type AppDictMutation

type AppDictMutation struct {
	// contains filtered or unexported fields
}

AppDictMutation represents an operation that mutates the AppDict nodes in the graph.

func (*AppDictMutation) AddCreatedBy

func (m *AppDictMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppDictMutation) AddField

func (m *AppDictMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppDictMutation) AddItemIDs

func (m *AppDictMutation) AddItemIDs(ids ...int)

AddItemIDs adds the "items" edge to the AppDictItem entity by ids.

func (*AppDictMutation) AddUpdatedBy

func (m *AppDictMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppDictMutation) AddedCreatedBy

func (m *AppDictMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppDictMutation) AddedEdges

func (m *AppDictMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppDictMutation) AddedField

func (m *AppDictMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppDictMutation) AddedFields

func (m *AppDictMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppDictMutation) AddedIDs

func (m *AppDictMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppDictMutation) AddedUpdatedBy

func (m *AppDictMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppDictMutation) AppCleared

func (m *AppDictMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*AppDictMutation) AppID

func (m *AppDictMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*AppDictMutation) AppIDCleared

func (m *AppDictMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*AppDictMutation) AppIDs

func (m *AppDictMutation) AppIDs() (ids []int)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*AppDictMutation) ClearApp

func (m *AppDictMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*AppDictMutation) ClearAppID

func (m *AppDictMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*AppDictMutation) ClearComments

func (m *AppDictMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppDictMutation) ClearEdge

func (m *AppDictMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppDictMutation) ClearField

func (m *AppDictMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppDictMutation) ClearItems

func (m *AppDictMutation) ClearItems()

ClearItems clears the "items" edge to the AppDictItem entity.

func (*AppDictMutation) ClearUpdatedAt

func (m *AppDictMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictMutation) ClearUpdatedBy

func (m *AppDictMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictMutation) ClearedEdges

func (m *AppDictMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppDictMutation) ClearedFields

func (m *AppDictMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppDictMutation) Client

func (m AppDictMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppDictMutation) Code

func (m *AppDictMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*AppDictMutation) Comments

func (m *AppDictMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*AppDictMutation) CommentsCleared

func (m *AppDictMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*AppDictMutation) CreatedAt

func (m *AppDictMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppDictMutation) CreatedBy

func (m *AppDictMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppDictMutation) EdgeCleared

func (m *AppDictMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppDictMutation) Field

func (m *AppDictMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppDictMutation) FieldCleared

func (m *AppDictMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppDictMutation) Fields

func (m *AppDictMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppDictMutation) ID

func (m *AppDictMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppDictMutation) IDs

func (m *AppDictMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppDictMutation) ItemsCleared

func (m *AppDictMutation) ItemsCleared() bool

ItemsCleared reports if the "items" edge to the AppDictItem entity was cleared.

func (*AppDictMutation) ItemsIDs

func (m *AppDictMutation) ItemsIDs() (ids []int)

ItemsIDs returns the "items" edge IDs in the mutation.

func (*AppDictMutation) Name

func (m *AppDictMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppDictMutation) OldAppID

func (m *AppDictMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) OldCode

func (m *AppDictMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) OldComments

func (m *AppDictMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) OldCreatedAt

func (m *AppDictMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) OldCreatedBy

func (m *AppDictMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) OldField

func (m *AppDictMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppDictMutation) OldName

func (m *AppDictMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) OldUpdatedAt

func (m *AppDictMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) OldUpdatedBy

func (m *AppDictMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppDict entity. If the AppDict object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppDictMutation) Op

func (m *AppDictMutation) Op() Op

Op returns the operation name.

func (*AppDictMutation) RemoveItemIDs

func (m *AppDictMutation) RemoveItemIDs(ids ...int)

RemoveItemIDs removes the "items" edge to the AppDictItem entity by IDs.

func (*AppDictMutation) RemovedEdges

func (m *AppDictMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppDictMutation) RemovedIDs

func (m *AppDictMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppDictMutation) RemovedItemsIDs

func (m *AppDictMutation) RemovedItemsIDs() (ids []int)

RemovedItems returns the removed IDs of the "items" edge to the AppDictItem entity.

func (*AppDictMutation) ResetApp

func (m *AppDictMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppDictMutation) ResetAppID

func (m *AppDictMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppDictMutation) ResetCode

func (m *AppDictMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*AppDictMutation) ResetComments

func (m *AppDictMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppDictMutation) ResetCreatedAt

func (m *AppDictMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppDictMutation) ResetCreatedBy

func (m *AppDictMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppDictMutation) ResetEdge

func (m *AppDictMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppDictMutation) ResetField

func (m *AppDictMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppDictMutation) ResetItems

func (m *AppDictMutation) ResetItems()

ResetItems resets all changes to the "items" edge.

func (*AppDictMutation) ResetName

func (m *AppDictMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppDictMutation) ResetUpdatedAt

func (m *AppDictMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppDictMutation) ResetUpdatedBy

func (m *AppDictMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppDictMutation) SetAppID

func (m *AppDictMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppDictMutation) SetCode

func (m *AppDictMutation) SetCode(s string)

SetCode sets the "code" field.

func (*AppDictMutation) SetComments

func (m *AppDictMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppDictMutation) SetCreatedAt

func (m *AppDictMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppDictMutation) SetCreatedBy

func (m *AppDictMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppDictMutation) SetField

func (m *AppDictMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppDictMutation) SetID

func (m *AppDictMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppDict entities.

func (*AppDictMutation) SetName

func (m *AppDictMutation) SetName(s string)

SetName sets the "name" field.

func (*AppDictMutation) SetOp

func (m *AppDictMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppDictMutation) SetUpdatedAt

func (m *AppDictMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppDictMutation) SetUpdatedBy

func (m *AppDictMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (AppDictMutation) Tx

func (m AppDictMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppDictMutation) Type

func (m *AppDictMutation) Type() string

Type returns the node type of this mutation (AppDict).

func (*AppDictMutation) UpdatedAt

func (m *AppDictMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppDictMutation) UpdatedAtCleared

func (m *AppDictMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppDictMutation) UpdatedBy

func (m *AppDictMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppDictMutation) UpdatedByCleared

func (m *AppDictMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppDictMutation) Where

func (m *AppDictMutation) Where(ps ...predicate.AppDict)

Where appends a list predicates to the AppDictMutation builder.

func (*AppDictMutation) WhereP

func (m *AppDictMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppDictMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppDictOrder

type AppDictOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *AppDictOrderField `json:"field"`
}

AppDictOrder defines the ordering of AppDict.

type AppDictOrderField

type AppDictOrderField struct {
	// Value extracts the ordering value from the given AppDict.
	Value func(*AppDict) (ent.Value, error)
	// contains filtered or unexported fields
}

AppDictOrderField defines the ordering field of AppDict.

func (AppDictOrderField) MarshalGQL

func (f AppDictOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppDictOrderField) String

func (f AppDictOrderField) String() string

String implement fmt.Stringer interface.

func (*AppDictOrderField) UnmarshalGQL

func (f *AppDictOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppDictPaginateOption

type AppDictPaginateOption func(*appdictPager) error

AppDictPaginateOption enables pagination customization.

func WithAppDictFilter

func WithAppDictFilter(filter func(*AppDictQuery) (*AppDictQuery, error)) AppDictPaginateOption

WithAppDictFilter configures pagination filter.

func WithAppDictOrder

func WithAppDictOrder(order *AppDictOrder) AppDictPaginateOption

WithAppDictOrder configures pagination ordering.

type AppDictQuery

type AppDictQuery struct {
	// contains filtered or unexported fields
}

AppDictQuery is the builder for querying AppDict entities.

func (*AppDictQuery) Aggregate

func (adq *AppDictQuery) Aggregate(fns ...AggregateFunc) *AppDictSelect

Aggregate returns a AppDictSelect configured with the given aggregations.

func (*AppDictQuery) All

func (adq *AppDictQuery) All(ctx context.Context) ([]*AppDict, error)

All executes the query and returns a list of AppDicts.

func (*AppDictQuery) AllX

func (adq *AppDictQuery) AllX(ctx context.Context) []*AppDict

AllX is like All, but panics if an error occurs.

func (*AppDictQuery) Clone

func (adq *AppDictQuery) Clone() *AppDictQuery

Clone returns a duplicate of the AppDictQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppDictQuery) CollectFields

func (ad *AppDictQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppDictQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppDictQuery) Count

func (adq *AppDictQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppDictQuery) CountX

func (adq *AppDictQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppDictQuery) Exist

func (adq *AppDictQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppDictQuery) ExistX

func (adq *AppDictQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppDictQuery) First

func (adq *AppDictQuery) First(ctx context.Context) (*AppDict, error)

First returns the first AppDict entity from the query. Returns a *NotFoundError when no AppDict was found.

func (*AppDictQuery) FirstID

func (adq *AppDictQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppDict ID from the query. Returns a *NotFoundError when no AppDict ID was found.

func (*AppDictQuery) FirstIDX

func (adq *AppDictQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppDictQuery) FirstX

func (adq *AppDictQuery) FirstX(ctx context.Context) *AppDict

FirstX is like First, but panics if an error occurs.

func (*AppDictQuery) GroupBy

func (adq *AppDictQuery) GroupBy(field string, fields ...string) *AppDictGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppDict.Query().
	GroupBy(appdict.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppDictQuery) IDs

func (adq *AppDictQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppDict IDs.

func (*AppDictQuery) IDsX

func (adq *AppDictQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppDictQuery) Limit

func (adq *AppDictQuery) Limit(limit int) *AppDictQuery

Limit the number of records to be returned by this query.

func (*AppDictQuery) Offset

func (adq *AppDictQuery) Offset(offset int) *AppDictQuery

Offset to start from.

func (*AppDictQuery) Only

func (adq *AppDictQuery) Only(ctx context.Context) (*AppDict, error)

Only returns a single AppDict entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppDict entity is found. Returns a *NotFoundError when no AppDict entities are found.

func (*AppDictQuery) OnlyID

func (adq *AppDictQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppDict ID in the query. Returns a *NotSingularError when more than one AppDict ID is found. Returns a *NotFoundError when no entities are found.

func (*AppDictQuery) OnlyIDX

func (adq *AppDictQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppDictQuery) OnlyX

func (adq *AppDictQuery) OnlyX(ctx context.Context) *AppDict

OnlyX is like Only, but panics if an error occurs.

func (*AppDictQuery) Order

func (adq *AppDictQuery) Order(o ...appdict.OrderOption) *AppDictQuery

Order specifies how the records should be ordered.

func (*AppDictQuery) Paginate

func (ad *AppDictQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppDictPaginateOption,
) (*AppDictConnection, error)

Paginate executes the query and returns a relay based cursor connection to AppDict.

func (*AppDictQuery) QueryApp

func (adq *AppDictQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*AppDictQuery) QueryItems

func (adq *AppDictQuery) QueryItems() *AppDictItemQuery

QueryItems chains the current query on the "items" edge.

func (*AppDictQuery) Select

func (adq *AppDictQuery) Select(fields ...string) *AppDictSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppDict.Query().
	Select(appdict.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppDictQuery) Unique

func (adq *AppDictQuery) Unique(unique bool) *AppDictQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppDictQuery) Where

func (adq *AppDictQuery) Where(ps ...predicate.AppDict) *AppDictQuery

Where adds a new predicate for the AppDictQuery builder.

func (*AppDictQuery) WithApp

func (adq *AppDictQuery) WithApp(opts ...func(*AppQuery)) *AppDictQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppDictQuery) WithItems

func (adq *AppDictQuery) WithItems(opts ...func(*AppDictItemQuery)) *AppDictQuery

WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppDictQuery) WithNamedItems

func (adq *AppDictQuery) WithNamedItems(name string, opts ...func(*AppDictItemQuery)) *AppDictQuery

WithNamedItems tells the query-builder to eager-load the nodes that are connected to the "items" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type AppDictSelect

type AppDictSelect struct {
	*AppDictQuery
	// contains filtered or unexported fields
}

AppDictSelect is the builder for selecting fields of AppDict entities.

func (*AppDictSelect) Aggregate

func (ads *AppDictSelect) Aggregate(fns ...AggregateFunc) *AppDictSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppDictSelect) Bool

func (s *AppDictSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) BoolX

func (s *AppDictSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppDictSelect) Bools

func (s *AppDictSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) BoolsX

func (s *AppDictSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppDictSelect) Float64

func (s *AppDictSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) Float64X

func (s *AppDictSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppDictSelect) Float64s

func (s *AppDictSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) Float64sX

func (s *AppDictSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppDictSelect) Int

func (s *AppDictSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) IntX

func (s *AppDictSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppDictSelect) Ints

func (s *AppDictSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) IntsX

func (s *AppDictSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppDictSelect) Scan

func (ads *AppDictSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppDictSelect) ScanX

func (s *AppDictSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppDictSelect) String

func (s *AppDictSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) StringX

func (s *AppDictSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppDictSelect) Strings

func (s *AppDictSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppDictSelect) StringsX

func (s *AppDictSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppDictUpdate

type AppDictUpdate struct {
	// contains filtered or unexported fields
}

AppDictUpdate is the builder for updating AppDict entities.

func (*AppDictUpdate) AddItemIDs

func (adu *AppDictUpdate) AddItemIDs(ids ...int) *AppDictUpdate

AddItemIDs adds the "items" edge to the AppDictItem entity by IDs.

func (*AppDictUpdate) AddItems

func (adu *AppDictUpdate) AddItems(a ...*AppDictItem) *AppDictUpdate

AddItems adds the "items" edges to the AppDictItem entity.

func (*AppDictUpdate) AddUpdatedBy

func (adu *AppDictUpdate) AddUpdatedBy(i int) *AppDictUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppDictUpdate) ClearComments

func (adu *AppDictUpdate) ClearComments() *AppDictUpdate

ClearComments clears the value of the "comments" field.

func (*AppDictUpdate) ClearItems

func (adu *AppDictUpdate) ClearItems() *AppDictUpdate

ClearItems clears all "items" edges to the AppDictItem entity.

func (*AppDictUpdate) ClearUpdatedAt

func (adu *AppDictUpdate) ClearUpdatedAt() *AppDictUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictUpdate) ClearUpdatedBy

func (adu *AppDictUpdate) ClearUpdatedBy() *AppDictUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictUpdate) Exec

func (adu *AppDictUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictUpdate) ExecX

func (adu *AppDictUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictUpdate) Mutation

func (adu *AppDictUpdate) Mutation() *AppDictMutation

Mutation returns the AppDictMutation object of the builder.

func (*AppDictUpdate) RemoveItemIDs

func (adu *AppDictUpdate) RemoveItemIDs(ids ...int) *AppDictUpdate

RemoveItemIDs removes the "items" edge to AppDictItem entities by IDs.

func (*AppDictUpdate) RemoveItems

func (adu *AppDictUpdate) RemoveItems(a ...*AppDictItem) *AppDictUpdate

RemoveItems removes "items" edges to AppDictItem entities.

func (*AppDictUpdate) Save

func (adu *AppDictUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppDictUpdate) SaveX

func (adu *AppDictUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppDictUpdate) SetComments

func (adu *AppDictUpdate) SetComments(s string) *AppDictUpdate

SetComments sets the "comments" field.

func (*AppDictUpdate) SetInput

SetInput applies the change-set in the UpdateAppDictInput on the AppDictUpdate builder.

func (*AppDictUpdate) SetName

func (adu *AppDictUpdate) SetName(s string) *AppDictUpdate

SetName sets the "name" field.

func (*AppDictUpdate) SetNillableComments

func (adu *AppDictUpdate) SetNillableComments(s *string) *AppDictUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppDictUpdate) SetNillableUpdatedAt

func (adu *AppDictUpdate) SetNillableUpdatedAt(t *time.Time) *AppDictUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppDictUpdate) SetNillableUpdatedBy

func (adu *AppDictUpdate) SetNillableUpdatedBy(i *int) *AppDictUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppDictUpdate) SetUpdatedAt

func (adu *AppDictUpdate) SetUpdatedAt(t time.Time) *AppDictUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppDictUpdate) SetUpdatedBy

func (adu *AppDictUpdate) SetUpdatedBy(i int) *AppDictUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppDictUpdate) Where

func (adu *AppDictUpdate) Where(ps ...predicate.AppDict) *AppDictUpdate

Where appends a list predicates to the AppDictUpdate builder.

type AppDictUpdateOne

type AppDictUpdateOne struct {
	// contains filtered or unexported fields
}

AppDictUpdateOne is the builder for updating a single AppDict entity.

func (*AppDictUpdateOne) AddItemIDs

func (aduo *AppDictUpdateOne) AddItemIDs(ids ...int) *AppDictUpdateOne

AddItemIDs adds the "items" edge to the AppDictItem entity by IDs.

func (*AppDictUpdateOne) AddItems

func (aduo *AppDictUpdateOne) AddItems(a ...*AppDictItem) *AppDictUpdateOne

AddItems adds the "items" edges to the AppDictItem entity.

func (*AppDictUpdateOne) AddUpdatedBy

func (aduo *AppDictUpdateOne) AddUpdatedBy(i int) *AppDictUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppDictUpdateOne) ClearComments

func (aduo *AppDictUpdateOne) ClearComments() *AppDictUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppDictUpdateOne) ClearItems

func (aduo *AppDictUpdateOne) ClearItems() *AppDictUpdateOne

ClearItems clears all "items" edges to the AppDictItem entity.

func (*AppDictUpdateOne) ClearUpdatedAt

func (aduo *AppDictUpdateOne) ClearUpdatedAt() *AppDictUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictUpdateOne) ClearUpdatedBy

func (aduo *AppDictUpdateOne) ClearUpdatedBy() *AppDictUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictUpdateOne) Exec

func (aduo *AppDictUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppDictUpdateOne) ExecX

func (aduo *AppDictUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictUpdateOne) Mutation

func (aduo *AppDictUpdateOne) Mutation() *AppDictMutation

Mutation returns the AppDictMutation object of the builder.

func (*AppDictUpdateOne) RemoveItemIDs

func (aduo *AppDictUpdateOne) RemoveItemIDs(ids ...int) *AppDictUpdateOne

RemoveItemIDs removes the "items" edge to AppDictItem entities by IDs.

func (*AppDictUpdateOne) RemoveItems

func (aduo *AppDictUpdateOne) RemoveItems(a ...*AppDictItem) *AppDictUpdateOne

RemoveItems removes "items" edges to AppDictItem entities.

func (*AppDictUpdateOne) Save

func (aduo *AppDictUpdateOne) Save(ctx context.Context) (*AppDict, error)

Save executes the query and returns the updated AppDict entity.

func (*AppDictUpdateOne) SaveX

func (aduo *AppDictUpdateOne) SaveX(ctx context.Context) *AppDict

SaveX is like Save, but panics if an error occurs.

func (*AppDictUpdateOne) Select

func (aduo *AppDictUpdateOne) Select(field string, fields ...string) *AppDictUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppDictUpdateOne) SetComments

func (aduo *AppDictUpdateOne) SetComments(s string) *AppDictUpdateOne

SetComments sets the "comments" field.

func (*AppDictUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppDictInput on the AppDictUpdateOne builder.

func (*AppDictUpdateOne) SetName

func (aduo *AppDictUpdateOne) SetName(s string) *AppDictUpdateOne

SetName sets the "name" field.

func (*AppDictUpdateOne) SetNillableComments

func (aduo *AppDictUpdateOne) SetNillableComments(s *string) *AppDictUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppDictUpdateOne) SetNillableUpdatedAt

func (aduo *AppDictUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppDictUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppDictUpdateOne) SetNillableUpdatedBy

func (aduo *AppDictUpdateOne) SetNillableUpdatedBy(i *int) *AppDictUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppDictUpdateOne) SetUpdatedAt

func (aduo *AppDictUpdateOne) SetUpdatedAt(t time.Time) *AppDictUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppDictUpdateOne) SetUpdatedBy

func (aduo *AppDictUpdateOne) SetUpdatedBy(i int) *AppDictUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppDictUpdateOne) Where

func (aduo *AppDictUpdateOne) Where(ps ...predicate.AppDict) *AppDictUpdateOne

Where appends a list predicates to the AppDictUpdate builder.

type AppDictUpsert

type AppDictUpsert struct {
	*sql.UpdateSet
}

AppDictUpsert is the "OnConflict" setter.

func (*AppDictUpsert) AddUpdatedBy

func (u *AppDictUpsert) AddUpdatedBy(v int) *AppDictUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppDictUpsert) ClearComments

func (u *AppDictUpsert) ClearComments() *AppDictUpsert

ClearComments clears the value of the "comments" field.

func (*AppDictUpsert) ClearUpdatedAt

func (u *AppDictUpsert) ClearUpdatedAt() *AppDictUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictUpsert) ClearUpdatedBy

func (u *AppDictUpsert) ClearUpdatedBy() *AppDictUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictUpsert) SetComments

func (u *AppDictUpsert) SetComments(v string) *AppDictUpsert

SetComments sets the "comments" field.

func (*AppDictUpsert) SetName

func (u *AppDictUpsert) SetName(v string) *AppDictUpsert

SetName sets the "name" field.

func (*AppDictUpsert) SetUpdatedAt

func (u *AppDictUpsert) SetUpdatedAt(v time.Time) *AppDictUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppDictUpsert) SetUpdatedBy

func (u *AppDictUpsert) SetUpdatedBy(v int) *AppDictUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppDictUpsert) UpdateComments

func (u *AppDictUpsert) UpdateComments() *AppDictUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppDictUpsert) UpdateName

func (u *AppDictUpsert) UpdateName() *AppDictUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppDictUpsert) UpdateUpdatedAt

func (u *AppDictUpsert) UpdateUpdatedAt() *AppDictUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppDictUpsert) UpdateUpdatedBy

func (u *AppDictUpsert) UpdateUpdatedBy() *AppDictUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppDictUpsertBulk

type AppDictUpsertBulk struct {
	// contains filtered or unexported fields
}

AppDictUpsertBulk is the builder for "upsert"-ing a bulk of AppDict nodes.

func (*AppDictUpsertBulk) AddUpdatedBy

func (u *AppDictUpsertBulk) AddUpdatedBy(v int) *AppDictUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppDictUpsertBulk) ClearComments

func (u *AppDictUpsertBulk) ClearComments() *AppDictUpsertBulk

ClearComments clears the value of the "comments" field.

func (*AppDictUpsertBulk) ClearUpdatedAt

func (u *AppDictUpsertBulk) ClearUpdatedAt() *AppDictUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictUpsertBulk) ClearUpdatedBy

func (u *AppDictUpsertBulk) ClearUpdatedBy() *AppDictUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictUpsertBulk) DoNothing

func (u *AppDictUpsertBulk) DoNothing() *AppDictUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppDictUpsertBulk) Exec

func (u *AppDictUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictUpsertBulk) ExecX

func (u *AppDictUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictUpsertBulk) Ignore

func (u *AppDictUpsertBulk) Ignore() *AppDictUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppDict.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppDictUpsertBulk) SetComments

func (u *AppDictUpsertBulk) SetComments(v string) *AppDictUpsertBulk

SetComments sets the "comments" field.

func (*AppDictUpsertBulk) SetName

SetName sets the "name" field.

func (*AppDictUpsertBulk) SetUpdatedAt

func (u *AppDictUpsertBulk) SetUpdatedAt(v time.Time) *AppDictUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppDictUpsertBulk) SetUpdatedBy

func (u *AppDictUpsertBulk) SetUpdatedBy(v int) *AppDictUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppDictUpsertBulk) Update

func (u *AppDictUpsertBulk) Update(set func(*AppDictUpsert)) *AppDictUpsertBulk

Update allows overriding fields `UPDATE` values. See the AppDictCreateBulk.OnConflict documentation for more info.

func (*AppDictUpsertBulk) UpdateComments

func (u *AppDictUpsertBulk) UpdateComments() *AppDictUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppDictUpsertBulk) UpdateName

func (u *AppDictUpsertBulk) UpdateName() *AppDictUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppDictUpsertBulk) UpdateNewValues

func (u *AppDictUpsertBulk) UpdateNewValues() *AppDictUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppDict.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appdict.FieldID)
		}),
	).
	Exec(ctx)

func (*AppDictUpsertBulk) UpdateUpdatedAt

func (u *AppDictUpsertBulk) UpdateUpdatedAt() *AppDictUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppDictUpsertBulk) UpdateUpdatedBy

func (u *AppDictUpsertBulk) UpdateUpdatedBy() *AppDictUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppDictUpsertOne

type AppDictUpsertOne struct {
	// contains filtered or unexported fields
}

AppDictUpsertOne is the builder for "upsert"-ing

one AppDict node.

func (*AppDictUpsertOne) AddUpdatedBy

func (u *AppDictUpsertOne) AddUpdatedBy(v int) *AppDictUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppDictUpsertOne) ClearComments

func (u *AppDictUpsertOne) ClearComments() *AppDictUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppDictUpsertOne) ClearUpdatedAt

func (u *AppDictUpsertOne) ClearUpdatedAt() *AppDictUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppDictUpsertOne) ClearUpdatedBy

func (u *AppDictUpsertOne) ClearUpdatedBy() *AppDictUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppDictUpsertOne) DoNothing

func (u *AppDictUpsertOne) DoNothing() *AppDictUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppDictUpsertOne) Exec

func (u *AppDictUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppDictUpsertOne) ExecX

func (u *AppDictUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDictUpsertOne) ID

func (u *AppDictUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppDictUpsertOne) IDX

func (u *AppDictUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*AppDictUpsertOne) Ignore

func (u *AppDictUpsertOne) Ignore() *AppDictUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppDict.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppDictUpsertOne) SetComments

func (u *AppDictUpsertOne) SetComments(v string) *AppDictUpsertOne

SetComments sets the "comments" field.

func (*AppDictUpsertOne) SetName

func (u *AppDictUpsertOne) SetName(v string) *AppDictUpsertOne

SetName sets the "name" field.

func (*AppDictUpsertOne) SetUpdatedAt

func (u *AppDictUpsertOne) SetUpdatedAt(v time.Time) *AppDictUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppDictUpsertOne) SetUpdatedBy

func (u *AppDictUpsertOne) SetUpdatedBy(v int) *AppDictUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppDictUpsertOne) Update

func (u *AppDictUpsertOne) Update(set func(*AppDictUpsert)) *AppDictUpsertOne

Update allows overriding fields `UPDATE` values. See the AppDictCreate.OnConflict documentation for more info.

func (*AppDictUpsertOne) UpdateComments

func (u *AppDictUpsertOne) UpdateComments() *AppDictUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppDictUpsertOne) UpdateName

func (u *AppDictUpsertOne) UpdateName() *AppDictUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppDictUpsertOne) UpdateNewValues

func (u *AppDictUpsertOne) UpdateNewValues() *AppDictUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppDict.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appdict.FieldID)
		}),
	).
	Exec(ctx)

func (*AppDictUpsertOne) UpdateUpdatedAt

func (u *AppDictUpsertOne) UpdateUpdatedAt() *AppDictUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppDictUpsertOne) UpdateUpdatedBy

func (u *AppDictUpsertOne) UpdateUpdatedBy() *AppDictUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppDictWhereInput

type AppDictWhereInput struct {
	Predicates []predicate.AppDict  `json:"-"`
	Not        *AppDictWhereInput   `json:"not,omitempty"`
	Or         []*AppDictWhereInput `json:"or,omitempty"`
	And        []*AppDictWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_id" field predicates.
	AppID       *int  `json:"appID,omitempty"`
	AppIDNEQ    *int  `json:"appIDNEQ,omitempty"`
	AppIDIn     []int `json:"appIDIn,omitempty"`
	AppIDNotIn  []int `json:"appIDNotIn,omitempty"`
	AppIDIsNil  bool  `json:"appIDIsNil,omitempty"`
	AppIDNotNil bool  `json:"appIDNotNil,omitempty"`

	// "code" field predicates.
	Code             *string  `json:"code,omitempty"`
	CodeNEQ          *string  `json:"codeNEQ,omitempty"`
	CodeIn           []string `json:"codeIn,omitempty"`
	CodeNotIn        []string `json:"codeNotIn,omitempty"`
	CodeGT           *string  `json:"codeGT,omitempty"`
	CodeGTE          *string  `json:"codeGTE,omitempty"`
	CodeLT           *string  `json:"codeLT,omitempty"`
	CodeLTE          *string  `json:"codeLTE,omitempty"`
	CodeContains     *string  `json:"codeContains,omitempty"`
	CodeHasPrefix    *string  `json:"codeHasPrefix,omitempty"`
	CodeHasSuffix    *string  `json:"codeHasSuffix,omitempty"`
	CodeEqualFold    *string  `json:"codeEqualFold,omitempty"`
	CodeContainsFold *string  `json:"codeContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "app" edge predicates.
	HasApp     *bool            `json:"hasApp,omitempty"`
	HasAppWith []*AppWhereInput `json:"hasAppWith,omitempty"`

	// "items" edge predicates.
	HasItems     *bool                    `json:"hasItems,omitempty"`
	HasItemsWith []*AppDictItemWhereInput `json:"hasItemsWith,omitempty"`
}

AppDictWhereInput represents a where input for filtering AppDict queries.

func (*AppDictWhereInput) AddPredicates

func (i *AppDictWhereInput) AddPredicates(predicates ...predicate.AppDict)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppDictWhereInput) Filter

Filter applies the AppDictWhereInput filter on the AppDictQuery builder.

func (*AppDictWhereInput) P

P returns a predicate for filtering appdicts. An error is returned if the input is empty or invalid.

type AppDicts

type AppDicts []*AppDict

AppDicts is a parsable slice of AppDict.

type AppEdge

type AppEdge struct {
	Node   *App   `json:"node"`
	Cursor Cursor `json:"cursor"`
}

AppEdge is the edge representation of App.

type AppEdges

type AppEdges struct {
	// 菜单
	Menus []*AppMenu `json:"menus,omitempty"`
	// 权限
	Actions []*AppAction `json:"actions,omitempty"`
	// 资源
	Resources []*AppRes `json:"resources,omitempty"`
	// 角色
	Roles []*AppRole `json:"roles,omitempty"`
	// 策略
	Policies []*AppPolicy `json:"policies,omitempty"`
	// 使用该应用的组织
	Orgs []*Org `json:"orgs,omitempty"`
	// 数据字典
	Dicts []*AppDict `json:"dicts,omitempty"`
	// OrgApp holds the value of the org_app edge.
	OrgApp []*OrgApp `json:"org_app,omitempty"`
	// contains filtered or unexported fields
}

AppEdges holds the relations/edges for other nodes in the graph.

func (AppEdges) ActionsOrErr

func (e AppEdges) ActionsOrErr() ([]*AppAction, error)

ActionsOrErr returns the Actions value or an error if the edge was not loaded in eager-loading.

func (AppEdges) DictsOrErr

func (e AppEdges) DictsOrErr() ([]*AppDict, error)

DictsOrErr returns the Dicts value or an error if the edge was not loaded in eager-loading.

func (AppEdges) MenusOrErr

func (e AppEdges) MenusOrErr() ([]*AppMenu, error)

MenusOrErr returns the Menus value or an error if the edge was not loaded in eager-loading.

func (AppEdges) OrgAppOrErr

func (e AppEdges) OrgAppOrErr() ([]*OrgApp, error)

OrgAppOrErr returns the OrgApp value or an error if the edge was not loaded in eager-loading.

func (AppEdges) OrgsOrErr

func (e AppEdges) OrgsOrErr() ([]*Org, error)

OrgsOrErr returns the Orgs value or an error if the edge was not loaded in eager-loading.

func (AppEdges) PoliciesOrErr

func (e AppEdges) PoliciesOrErr() ([]*AppPolicy, error)

PoliciesOrErr returns the Policies value or an error if the edge was not loaded in eager-loading.

func (AppEdges) ResourcesOrErr

func (e AppEdges) ResourcesOrErr() ([]*AppRes, error)

ResourcesOrErr returns the Resources value or an error if the edge was not loaded in eager-loading.

func (AppEdges) RolesOrErr

func (e AppEdges) RolesOrErr() ([]*AppRole, error)

RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.

type AppGroupBy

type AppGroupBy struct {
	// contains filtered or unexported fields
}

AppGroupBy is the group-by builder for App entities.

func (*AppGroupBy) Aggregate

func (agb *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppGroupBy) Bool

func (s *AppGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) BoolX

func (s *AppGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppGroupBy) Bools

func (s *AppGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) BoolsX

func (s *AppGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppGroupBy) Float64

func (s *AppGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) Float64X

func (s *AppGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppGroupBy) Float64s

func (s *AppGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) Float64sX

func (s *AppGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppGroupBy) Int

func (s *AppGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) IntX

func (s *AppGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppGroupBy) Ints

func (s *AppGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) IntsX

func (s *AppGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppGroupBy) Scan

func (agb *AppGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppGroupBy) ScanX

func (s *AppGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppGroupBy) String

func (s *AppGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) StringX

func (s *AppGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppGroupBy) Strings

func (s *AppGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) StringsX

func (s *AppGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppMenu

type AppMenu struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 所属应用
	AppID int `json:"app_id,omitempty"`
	// 父级ID
	ParentID int `json:"parent_id,omitempty"`
	// 目录,菜单项
	Kind appmenu.Kind `json:"kind,omitempty"`
	// 菜单名称
	Name string `json:"name,omitempty"`
	// 菜单图标
	Icon string `json:"icon,omitempty"`
	// 菜单路由
	Route string `json:"route,omitempty"`
	// 操作ID
	ActionID *int `json:"action_id,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// DisplaySort holds the value of the "display_sort" field.
	DisplaySort int32 `json:"display_sort,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppMenuQuery when eager-loading is set.
	Edges AppMenuEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppMenu is the model entity for the AppMenu schema.

func (*AppMenu) Action

func (am *AppMenu) Action(ctx context.Context) (*AppAction, error)

func (*AppMenu) App

func (am *AppMenu) App(ctx context.Context) (*App, error)

func (*AppMenu) GlobalID

func (am *AppMenu) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppMenu node.

func (*AppMenu) IsNode

func (*AppMenu) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppMenu) QueryAction

func (am *AppMenu) QueryAction() *AppActionQuery

QueryAction queries the "action" edge of the AppMenu entity.

func (*AppMenu) QueryApp

func (am *AppMenu) QueryApp() *AppQuery

QueryApp queries the "app" edge of the AppMenu entity.

func (*AppMenu) String

func (am *AppMenu) String() string

String implements the fmt.Stringer.

func (*AppMenu) ToEdge

func (am *AppMenu) ToEdge(order *AppMenuOrder) *AppMenuEdge

ToEdge converts AppMenu into AppMenuEdge.

func (*AppMenu) Unwrap

func (am *AppMenu) Unwrap() *AppMenu

Unwrap unwraps the AppMenu entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppMenu) Update

func (am *AppMenu) Update() *AppMenuUpdateOne

Update returns a builder for updating this AppMenu. Note that you need to call AppMenu.Unwrap() before calling this method if this AppMenu was returned from a transaction, and the transaction was committed or rolled back.

func (*AppMenu) Value

func (am *AppMenu) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppMenu. This includes values selected through modifiers, order, etc.

type AppMenuClient

type AppMenuClient struct {
	// contains filtered or unexported fields
}

AppMenuClient is a client for the AppMenu schema.

func NewAppMenuClient

func NewAppMenuClient(c config) *AppMenuClient

NewAppMenuClient returns a client for the AppMenu from the given config.

func (*AppMenuClient) Create

func (c *AppMenuClient) Create() *AppMenuCreate

Create returns a builder for creating a AppMenu entity.

func (*AppMenuClient) CreateBulk

func (c *AppMenuClient) CreateBulk(builders ...*AppMenuCreate) *AppMenuCreateBulk

CreateBulk returns a builder for creating a bulk of AppMenu entities.

func (*AppMenuClient) Delete

func (c *AppMenuClient) Delete() *AppMenuDelete

Delete returns a delete builder for AppMenu.

func (*AppMenuClient) DeleteOne

func (c *AppMenuClient) DeleteOne(am *AppMenu) *AppMenuDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppMenuClient) DeleteOneID

func (c *AppMenuClient) DeleteOneID(id int) *AppMenuDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppMenuClient) Get

func (c *AppMenuClient) Get(ctx context.Context, id int) (*AppMenu, error)

Get returns a AppMenu entity by its id.

func (*AppMenuClient) GetX

func (c *AppMenuClient) GetX(ctx context.Context, id int) *AppMenu

GetX is like Get, but panics if an error occurs.

func (*AppMenuClient) Hooks

func (c *AppMenuClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppMenuClient) Intercept

func (c *AppMenuClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `appmenu.Intercept(f(g(h())))`.

func (*AppMenuClient) Interceptors

func (c *AppMenuClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppMenuClient) MapCreateBulk

func (c *AppMenuClient) MapCreateBulk(slice any, setFunc func(*AppMenuCreate, int)) *AppMenuCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppMenuClient) Query

func (c *AppMenuClient) Query() *AppMenuQuery

Query returns a query builder for AppMenu.

func (*AppMenuClient) QueryAction

func (c *AppMenuClient) QueryAction(am *AppMenu) *AppActionQuery

QueryAction queries the action edge of a AppMenu.

func (*AppMenuClient) QueryApp

func (c *AppMenuClient) QueryApp(am *AppMenu) *AppQuery

QueryApp queries the app edge of a AppMenu.

func (*AppMenuClient) Update

func (c *AppMenuClient) Update() *AppMenuUpdate

Update returns an update builder for AppMenu.

func (*AppMenuClient) UpdateOne

func (c *AppMenuClient) UpdateOne(am *AppMenu) *AppMenuUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppMenuClient) UpdateOneID

func (c *AppMenuClient) UpdateOneID(id int) *AppMenuUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppMenuClient) Use

func (c *AppMenuClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `appmenu.Hooks(f(g(h())))`.

type AppMenuConnection

type AppMenuConnection struct {
	Edges      []*AppMenuEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

AppMenuConnection is the connection containing edges to AppMenu.

type AppMenuCreate

type AppMenuCreate struct {
	// contains filtered or unexported fields
}

AppMenuCreate is the builder for creating a AppMenu entity.

func (*AppMenuCreate) Exec

func (amc *AppMenuCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppMenuCreate) ExecX

func (amc *AppMenuCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuCreate) Mutation

func (amc *AppMenuCreate) Mutation() *AppMenuMutation

Mutation returns the AppMenuMutation object of the builder.

func (*AppMenuCreate) OnConflict

func (amc *AppMenuCreate) OnConflict(opts ...sql.ConflictOption) *AppMenuUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppMenu.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppMenuUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppMenuCreate) OnConflictColumns

func (amc *AppMenuCreate) OnConflictColumns(columns ...string) *AppMenuUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppMenu.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppMenuCreate) Save

func (amc *AppMenuCreate) Save(ctx context.Context) (*AppMenu, error)

Save creates the AppMenu in the database.

func (*AppMenuCreate) SaveX

func (amc *AppMenuCreate) SaveX(ctx context.Context) *AppMenu

SaveX calls Save and panics if Save returns an error.

func (*AppMenuCreate) SetAction

func (amc *AppMenuCreate) SetAction(a *AppAction) *AppMenuCreate

SetAction sets the "action" edge to the AppAction entity.

func (*AppMenuCreate) SetActionID

func (amc *AppMenuCreate) SetActionID(i int) *AppMenuCreate

SetActionID sets the "action_id" field.

func (*AppMenuCreate) SetApp

func (amc *AppMenuCreate) SetApp(a *App) *AppMenuCreate

SetApp sets the "app" edge to the App entity.

func (*AppMenuCreate) SetAppID

func (amc *AppMenuCreate) SetAppID(i int) *AppMenuCreate

SetAppID sets the "app_id" field.

func (*AppMenuCreate) SetComments

func (amc *AppMenuCreate) SetComments(s string) *AppMenuCreate

SetComments sets the "comments" field.

func (*AppMenuCreate) SetCreatedAt

func (amc *AppMenuCreate) SetCreatedAt(t time.Time) *AppMenuCreate

SetCreatedAt sets the "created_at" field.

func (*AppMenuCreate) SetCreatedBy

func (amc *AppMenuCreate) SetCreatedBy(i int) *AppMenuCreate

SetCreatedBy sets the "created_by" field.

func (*AppMenuCreate) SetDisplaySort

func (amc *AppMenuCreate) SetDisplaySort(i int32) *AppMenuCreate

SetDisplaySort sets the "display_sort" field.

func (*AppMenuCreate) SetID

func (amc *AppMenuCreate) SetID(i int) *AppMenuCreate

SetID sets the "id" field.

func (*AppMenuCreate) SetIcon

func (amc *AppMenuCreate) SetIcon(s string) *AppMenuCreate

SetIcon sets the "icon" field.

func (*AppMenuCreate) SetInput

SetInput applies the change-set in the CreateAppMenuInput on the AppMenuCreate builder.

func (*AppMenuCreate) SetKind

func (amc *AppMenuCreate) SetKind(a appmenu.Kind) *AppMenuCreate

SetKind sets the "kind" field.

func (*AppMenuCreate) SetName

func (amc *AppMenuCreate) SetName(s string) *AppMenuCreate

SetName sets the "name" field.

func (*AppMenuCreate) SetNillableActionID

func (amc *AppMenuCreate) SetNillableActionID(i *int) *AppMenuCreate

SetNillableActionID sets the "action_id" field if the given value is not nil.

func (*AppMenuCreate) SetNillableAppID

func (amc *AppMenuCreate) SetNillableAppID(i *int) *AppMenuCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*AppMenuCreate) SetNillableComments

func (amc *AppMenuCreate) SetNillableComments(s *string) *AppMenuCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppMenuCreate) SetNillableCreatedAt

func (amc *AppMenuCreate) SetNillableCreatedAt(t *time.Time) *AppMenuCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppMenuCreate) SetNillableDisplaySort

func (amc *AppMenuCreate) SetNillableDisplaySort(i *int32) *AppMenuCreate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppMenuCreate) SetNillableID

func (amc *AppMenuCreate) SetNillableID(i *int) *AppMenuCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AppMenuCreate) SetNillableIcon

func (amc *AppMenuCreate) SetNillableIcon(s *string) *AppMenuCreate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*AppMenuCreate) SetNillableRoute

func (amc *AppMenuCreate) SetNillableRoute(s *string) *AppMenuCreate

SetNillableRoute sets the "route" field if the given value is not nil.

func (*AppMenuCreate) SetNillableUpdatedAt

func (amc *AppMenuCreate) SetNillableUpdatedAt(t *time.Time) *AppMenuCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppMenuCreate) SetNillableUpdatedBy

func (amc *AppMenuCreate) SetNillableUpdatedBy(i *int) *AppMenuCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppMenuCreate) SetParentID

func (amc *AppMenuCreate) SetParentID(i int) *AppMenuCreate

SetParentID sets the "parent_id" field.

func (*AppMenuCreate) SetRoute

func (amc *AppMenuCreate) SetRoute(s string) *AppMenuCreate

SetRoute sets the "route" field.

func (*AppMenuCreate) SetUpdatedAt

func (amc *AppMenuCreate) SetUpdatedAt(t time.Time) *AppMenuCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppMenuCreate) SetUpdatedBy

func (amc *AppMenuCreate) SetUpdatedBy(i int) *AppMenuCreate

SetUpdatedBy sets the "updated_by" field.

type AppMenuCreateBulk

type AppMenuCreateBulk struct {
	// contains filtered or unexported fields
}

AppMenuCreateBulk is the builder for creating many AppMenu entities in bulk.

func (*AppMenuCreateBulk) Exec

func (amcb *AppMenuCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppMenuCreateBulk) ExecX

func (amcb *AppMenuCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuCreateBulk) OnConflict

func (amcb *AppMenuCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppMenuUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppMenu.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppMenuUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppMenuCreateBulk) OnConflictColumns

func (amcb *AppMenuCreateBulk) OnConflictColumns(columns ...string) *AppMenuUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppMenu.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppMenuCreateBulk) Save

func (amcb *AppMenuCreateBulk) Save(ctx context.Context) ([]*AppMenu, error)

Save creates the AppMenu entities in the database.

func (*AppMenuCreateBulk) SaveX

func (amcb *AppMenuCreateBulk) SaveX(ctx context.Context) []*AppMenu

SaveX is like Save, but panics if an error occurs.

type AppMenuDelete

type AppMenuDelete struct {
	// contains filtered or unexported fields
}

AppMenuDelete is the builder for deleting a AppMenu entity.

func (*AppMenuDelete) Exec

func (amd *AppMenuDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppMenuDelete) ExecX

func (amd *AppMenuDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuDelete) Where

func (amd *AppMenuDelete) Where(ps ...predicate.AppMenu) *AppMenuDelete

Where appends a list predicates to the AppMenuDelete builder.

type AppMenuDeleteOne

type AppMenuDeleteOne struct {
	// contains filtered or unexported fields
}

AppMenuDeleteOne is the builder for deleting a single AppMenu entity.

func (*AppMenuDeleteOne) Exec

func (amdo *AppMenuDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppMenuDeleteOne) ExecX

func (amdo *AppMenuDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuDeleteOne) Where

func (amdo *AppMenuDeleteOne) Where(ps ...predicate.AppMenu) *AppMenuDeleteOne

Where appends a list predicates to the AppMenuDelete builder.

type AppMenuEdge

type AppMenuEdge struct {
	Node   *AppMenu `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

AppMenuEdge is the edge representation of AppMenu.

type AppMenuEdges

type AppMenuEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// 需要权限控制时对应的权限
	Action *AppAction `json:"action,omitempty"`
	// contains filtered or unexported fields
}

AppMenuEdges holds the relations/edges for other nodes in the graph.

func (AppMenuEdges) ActionOrErr

func (e AppMenuEdges) ActionOrErr() (*AppAction, error)

ActionOrErr returns the Action value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AppMenuEdges) AppOrErr

func (e AppMenuEdges) AppOrErr() (*App, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type AppMenuGroupBy

type AppMenuGroupBy struct {
	// contains filtered or unexported fields
}

AppMenuGroupBy is the group-by builder for AppMenu entities.

func (*AppMenuGroupBy) Aggregate

func (amgb *AppMenuGroupBy) Aggregate(fns ...AggregateFunc) *AppMenuGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppMenuGroupBy) Bool

func (s *AppMenuGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) BoolX

func (s *AppMenuGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppMenuGroupBy) Bools

func (s *AppMenuGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) BoolsX

func (s *AppMenuGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppMenuGroupBy) Float64

func (s *AppMenuGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) Float64X

func (s *AppMenuGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppMenuGroupBy) Float64s

func (s *AppMenuGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) Float64sX

func (s *AppMenuGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppMenuGroupBy) Int

func (s *AppMenuGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) IntX

func (s *AppMenuGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppMenuGroupBy) Ints

func (s *AppMenuGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) IntsX

func (s *AppMenuGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppMenuGroupBy) Scan

func (amgb *AppMenuGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppMenuGroupBy) ScanX

func (s *AppMenuGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppMenuGroupBy) String

func (s *AppMenuGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) StringX

func (s *AppMenuGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppMenuGroupBy) Strings

func (s *AppMenuGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppMenuGroupBy) StringsX

func (s *AppMenuGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppMenuMutation

type AppMenuMutation struct {
	// contains filtered or unexported fields
}

AppMenuMutation represents an operation that mutates the AppMenu nodes in the graph.

func (*AppMenuMutation) ActionCleared

func (m *AppMenuMutation) ActionCleared() bool

ActionCleared reports if the "action" edge to the AppAction entity was cleared.

func (*AppMenuMutation) ActionID

func (m *AppMenuMutation) ActionID() (r int, exists bool)

ActionID returns the value of the "action_id" field in the mutation.

func (*AppMenuMutation) ActionIDCleared

func (m *AppMenuMutation) ActionIDCleared() bool

ActionIDCleared returns if the "action_id" field was cleared in this mutation.

func (*AppMenuMutation) ActionIDs

func (m *AppMenuMutation) ActionIDs() (ids []int)

ActionIDs returns the "action" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ActionID instead. It exists only for internal usage by the builders.

func (*AppMenuMutation) AddCreatedBy

func (m *AppMenuMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppMenuMutation) AddDisplaySort

func (m *AppMenuMutation) AddDisplaySort(i int32)

AddDisplaySort adds i to the "display_sort" field.

func (*AppMenuMutation) AddField

func (m *AppMenuMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppMenuMutation) AddParentID

func (m *AppMenuMutation) AddParentID(i int)

AddParentID adds i to the "parent_id" field.

func (*AppMenuMutation) AddUpdatedBy

func (m *AppMenuMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppMenuMutation) AddedCreatedBy

func (m *AppMenuMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppMenuMutation) AddedDisplaySort

func (m *AppMenuMutation) AddedDisplaySort() (r int32, exists bool)

AddedDisplaySort returns the value that was added to the "display_sort" field in this mutation.

func (*AppMenuMutation) AddedEdges

func (m *AppMenuMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppMenuMutation) AddedField

func (m *AppMenuMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppMenuMutation) AddedFields

func (m *AppMenuMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppMenuMutation) AddedIDs

func (m *AppMenuMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppMenuMutation) AddedParentID

func (m *AppMenuMutation) AddedParentID() (r int, exists bool)

AddedParentID returns the value that was added to the "parent_id" field in this mutation.

func (*AppMenuMutation) AddedUpdatedBy

func (m *AppMenuMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppMenuMutation) AppCleared

func (m *AppMenuMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*AppMenuMutation) AppID

func (m *AppMenuMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*AppMenuMutation) AppIDCleared

func (m *AppMenuMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*AppMenuMutation) AppIDs

func (m *AppMenuMutation) AppIDs() (ids []int)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*AppMenuMutation) ClearAction

func (m *AppMenuMutation) ClearAction()

ClearAction clears the "action" edge to the AppAction entity.

func (*AppMenuMutation) ClearActionID

func (m *AppMenuMutation) ClearActionID()

ClearActionID clears the value of the "action_id" field.

func (*AppMenuMutation) ClearApp

func (m *AppMenuMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*AppMenuMutation) ClearAppID

func (m *AppMenuMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*AppMenuMutation) ClearComments

func (m *AppMenuMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppMenuMutation) ClearDisplaySort

func (m *AppMenuMutation) ClearDisplaySort()

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppMenuMutation) ClearEdge

func (m *AppMenuMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppMenuMutation) ClearField

func (m *AppMenuMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppMenuMutation) ClearIcon

func (m *AppMenuMutation) ClearIcon()

ClearIcon clears the value of the "icon" field.

func (*AppMenuMutation) ClearRoute

func (m *AppMenuMutation) ClearRoute()

ClearRoute clears the value of the "route" field.

func (*AppMenuMutation) ClearUpdatedAt

func (m *AppMenuMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppMenuMutation) ClearUpdatedBy

func (m *AppMenuMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppMenuMutation) ClearedEdges

func (m *AppMenuMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppMenuMutation) ClearedFields

func (m *AppMenuMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppMenuMutation) Client

func (m AppMenuMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppMenuMutation) Comments

func (m *AppMenuMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*AppMenuMutation) CommentsCleared

func (m *AppMenuMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*AppMenuMutation) CreatedAt

func (m *AppMenuMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppMenuMutation) CreatedBy

func (m *AppMenuMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppMenuMutation) DisplaySort

func (m *AppMenuMutation) DisplaySort() (r int32, exists bool)

DisplaySort returns the value of the "display_sort" field in the mutation.

func (*AppMenuMutation) DisplaySortCleared

func (m *AppMenuMutation) DisplaySortCleared() bool

DisplaySortCleared returns if the "display_sort" field was cleared in this mutation.

func (*AppMenuMutation) EdgeCleared

func (m *AppMenuMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppMenuMutation) Field

func (m *AppMenuMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppMenuMutation) FieldCleared

func (m *AppMenuMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppMenuMutation) Fields

func (m *AppMenuMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppMenuMutation) ID

func (m *AppMenuMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppMenuMutation) IDs

func (m *AppMenuMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppMenuMutation) Icon

func (m *AppMenuMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*AppMenuMutation) IconCleared

func (m *AppMenuMutation) IconCleared() bool

IconCleared returns if the "icon" field was cleared in this mutation.

func (*AppMenuMutation) Kind

func (m *AppMenuMutation) Kind() (r appmenu.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*AppMenuMutation) Name

func (m *AppMenuMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppMenuMutation) OldActionID

func (m *AppMenuMutation) OldActionID(ctx context.Context) (v *int, err error)

OldActionID returns the old "action_id" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldAppID

func (m *AppMenuMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldComments

func (m *AppMenuMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldCreatedAt

func (m *AppMenuMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldCreatedBy

func (m *AppMenuMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldDisplaySort

func (m *AppMenuMutation) OldDisplaySort(ctx context.Context) (v int32, err error)

OldDisplaySort returns the old "display_sort" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldField

func (m *AppMenuMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppMenuMutation) OldIcon

func (m *AppMenuMutation) OldIcon(ctx context.Context) (v string, err error)

OldIcon returns the old "icon" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldKind

func (m *AppMenuMutation) OldKind(ctx context.Context) (v appmenu.Kind, err error)

OldKind returns the old "kind" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldName

func (m *AppMenuMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldParentID

func (m *AppMenuMutation) OldParentID(ctx context.Context) (v int, err error)

OldParentID returns the old "parent_id" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldRoute

func (m *AppMenuMutation) OldRoute(ctx context.Context) (v string, err error)

OldRoute returns the old "route" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldUpdatedAt

func (m *AppMenuMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) OldUpdatedBy

func (m *AppMenuMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppMenu entity. If the AppMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMenuMutation) Op

func (m *AppMenuMutation) Op() Op

Op returns the operation name.

func (*AppMenuMutation) ParentID

func (m *AppMenuMutation) ParentID() (r int, exists bool)

ParentID returns the value of the "parent_id" field in the mutation.

func (*AppMenuMutation) RemovedEdges

func (m *AppMenuMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppMenuMutation) RemovedIDs

func (m *AppMenuMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppMenuMutation) ResetAction

func (m *AppMenuMutation) ResetAction()

ResetAction resets all changes to the "action" edge.

func (*AppMenuMutation) ResetActionID

func (m *AppMenuMutation) ResetActionID()

ResetActionID resets all changes to the "action_id" field.

func (*AppMenuMutation) ResetApp

func (m *AppMenuMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppMenuMutation) ResetAppID

func (m *AppMenuMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppMenuMutation) ResetComments

func (m *AppMenuMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppMenuMutation) ResetCreatedAt

func (m *AppMenuMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppMenuMutation) ResetCreatedBy

func (m *AppMenuMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppMenuMutation) ResetDisplaySort

func (m *AppMenuMutation) ResetDisplaySort()

ResetDisplaySort resets all changes to the "display_sort" field.

func (*AppMenuMutation) ResetEdge

func (m *AppMenuMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppMenuMutation) ResetField

func (m *AppMenuMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppMenuMutation) ResetIcon

func (m *AppMenuMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*AppMenuMutation) ResetKind

func (m *AppMenuMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*AppMenuMutation) ResetName

func (m *AppMenuMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppMenuMutation) ResetParentID

func (m *AppMenuMutation) ResetParentID()

ResetParentID resets all changes to the "parent_id" field.

func (*AppMenuMutation) ResetRoute

func (m *AppMenuMutation) ResetRoute()

ResetRoute resets all changes to the "route" field.

func (*AppMenuMutation) ResetUpdatedAt

func (m *AppMenuMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppMenuMutation) ResetUpdatedBy

func (m *AppMenuMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppMenuMutation) Route

func (m *AppMenuMutation) Route() (r string, exists bool)

Route returns the value of the "route" field in the mutation.

func (*AppMenuMutation) RouteCleared

func (m *AppMenuMutation) RouteCleared() bool

RouteCleared returns if the "route" field was cleared in this mutation.

func (*AppMenuMutation) SetActionID

func (m *AppMenuMutation) SetActionID(i int)

SetActionID sets the "action_id" field.

func (*AppMenuMutation) SetAppID

func (m *AppMenuMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppMenuMutation) SetComments

func (m *AppMenuMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppMenuMutation) SetCreatedAt

func (m *AppMenuMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppMenuMutation) SetCreatedBy

func (m *AppMenuMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppMenuMutation) SetDisplaySort

func (m *AppMenuMutation) SetDisplaySort(i int32)

SetDisplaySort sets the "display_sort" field.

func (*AppMenuMutation) SetField

func (m *AppMenuMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppMenuMutation) SetID

func (m *AppMenuMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppMenu entities.

func (*AppMenuMutation) SetIcon

func (m *AppMenuMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*AppMenuMutation) SetKind

func (m *AppMenuMutation) SetKind(a appmenu.Kind)

SetKind sets the "kind" field.

func (*AppMenuMutation) SetName

func (m *AppMenuMutation) SetName(s string)

SetName sets the "name" field.

func (*AppMenuMutation) SetOp

func (m *AppMenuMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppMenuMutation) SetParentID

func (m *AppMenuMutation) SetParentID(i int)

SetParentID sets the "parent_id" field.

func (*AppMenuMutation) SetRoute

func (m *AppMenuMutation) SetRoute(s string)

SetRoute sets the "route" field.

func (*AppMenuMutation) SetUpdatedAt

func (m *AppMenuMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppMenuMutation) SetUpdatedBy

func (m *AppMenuMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (AppMenuMutation) Tx

func (m AppMenuMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppMenuMutation) Type

func (m *AppMenuMutation) Type() string

Type returns the node type of this mutation (AppMenu).

func (*AppMenuMutation) UpdatedAt

func (m *AppMenuMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppMenuMutation) UpdatedAtCleared

func (m *AppMenuMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppMenuMutation) UpdatedBy

func (m *AppMenuMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppMenuMutation) UpdatedByCleared

func (m *AppMenuMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppMenuMutation) Where

func (m *AppMenuMutation) Where(ps ...predicate.AppMenu)

Where appends a list predicates to the AppMenuMutation builder.

func (*AppMenuMutation) WhereP

func (m *AppMenuMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppMenuMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppMenuOrder

type AppMenuOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *AppMenuOrderField `json:"field"`
}

AppMenuOrder defines the ordering of AppMenu.

type AppMenuOrderField

type AppMenuOrderField struct {
	// Value extracts the ordering value from the given AppMenu.
	Value func(*AppMenu) (ent.Value, error)
	// contains filtered or unexported fields
}

AppMenuOrderField defines the ordering field of AppMenu.

func (AppMenuOrderField) MarshalGQL

func (f AppMenuOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppMenuOrderField) String

func (f AppMenuOrderField) String() string

String implement fmt.Stringer interface.

func (*AppMenuOrderField) UnmarshalGQL

func (f *AppMenuOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppMenuPaginateOption

type AppMenuPaginateOption func(*appmenuPager) error

AppMenuPaginateOption enables pagination customization.

func WithAppMenuFilter

func WithAppMenuFilter(filter func(*AppMenuQuery) (*AppMenuQuery, error)) AppMenuPaginateOption

WithAppMenuFilter configures pagination filter.

func WithAppMenuOrder

func WithAppMenuOrder(order *AppMenuOrder) AppMenuPaginateOption

WithAppMenuOrder configures pagination ordering.

type AppMenuQuery

type AppMenuQuery struct {
	// contains filtered or unexported fields
}

AppMenuQuery is the builder for querying AppMenu entities.

func (*AppMenuQuery) Aggregate

func (amq *AppMenuQuery) Aggregate(fns ...AggregateFunc) *AppMenuSelect

Aggregate returns a AppMenuSelect configured with the given aggregations.

func (*AppMenuQuery) All

func (amq *AppMenuQuery) All(ctx context.Context) ([]*AppMenu, error)

All executes the query and returns a list of AppMenus.

func (*AppMenuQuery) AllX

func (amq *AppMenuQuery) AllX(ctx context.Context) []*AppMenu

AllX is like All, but panics if an error occurs.

func (*AppMenuQuery) Clone

func (amq *AppMenuQuery) Clone() *AppMenuQuery

Clone returns a duplicate of the AppMenuQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppMenuQuery) CollectFields

func (am *AppMenuQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppMenuQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppMenuQuery) Count

func (amq *AppMenuQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppMenuQuery) CountX

func (amq *AppMenuQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppMenuQuery) Exist

func (amq *AppMenuQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppMenuQuery) ExistX

func (amq *AppMenuQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppMenuQuery) First

func (amq *AppMenuQuery) First(ctx context.Context) (*AppMenu, error)

First returns the first AppMenu entity from the query. Returns a *NotFoundError when no AppMenu was found.

func (*AppMenuQuery) FirstID

func (amq *AppMenuQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppMenu ID from the query. Returns a *NotFoundError when no AppMenu ID was found.

func (*AppMenuQuery) FirstIDX

func (amq *AppMenuQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppMenuQuery) FirstX

func (amq *AppMenuQuery) FirstX(ctx context.Context) *AppMenu

FirstX is like First, but panics if an error occurs.

func (*AppMenuQuery) GroupBy

func (amq *AppMenuQuery) GroupBy(field string, fields ...string) *AppMenuGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppMenu.Query().
	GroupBy(appmenu.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppMenuQuery) IDs

func (amq *AppMenuQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppMenu IDs.

func (*AppMenuQuery) IDsX

func (amq *AppMenuQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppMenuQuery) Limit

func (amq *AppMenuQuery) Limit(limit int) *AppMenuQuery

Limit the number of records to be returned by this query.

func (*AppMenuQuery) Offset

func (amq *AppMenuQuery) Offset(offset int) *AppMenuQuery

Offset to start from.

func (*AppMenuQuery) Only

func (amq *AppMenuQuery) Only(ctx context.Context) (*AppMenu, error)

Only returns a single AppMenu entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppMenu entity is found. Returns a *NotFoundError when no AppMenu entities are found.

func (*AppMenuQuery) OnlyID

func (amq *AppMenuQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppMenu ID in the query. Returns a *NotSingularError when more than one AppMenu ID is found. Returns a *NotFoundError when no entities are found.

func (*AppMenuQuery) OnlyIDX

func (amq *AppMenuQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppMenuQuery) OnlyX

func (amq *AppMenuQuery) OnlyX(ctx context.Context) *AppMenu

OnlyX is like Only, but panics if an error occurs.

func (*AppMenuQuery) Order

func (amq *AppMenuQuery) Order(o ...appmenu.OrderOption) *AppMenuQuery

Order specifies how the records should be ordered.

func (*AppMenuQuery) Paginate

func (am *AppMenuQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppMenuPaginateOption,
) (*AppMenuConnection, error)

Paginate executes the query and returns a relay based cursor connection to AppMenu.

func (*AppMenuQuery) QueryAction

func (amq *AppMenuQuery) QueryAction() *AppActionQuery

QueryAction chains the current query on the "action" edge.

func (*AppMenuQuery) QueryApp

func (amq *AppMenuQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*AppMenuQuery) Select

func (amq *AppMenuQuery) Select(fields ...string) *AppMenuSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppMenu.Query().
	Select(appmenu.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppMenuQuery) Unique

func (amq *AppMenuQuery) Unique(unique bool) *AppMenuQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppMenuQuery) Where

func (amq *AppMenuQuery) Where(ps ...predicate.AppMenu) *AppMenuQuery

Where adds a new predicate for the AppMenuQuery builder.

func (*AppMenuQuery) WithAction

func (amq *AppMenuQuery) WithAction(opts ...func(*AppActionQuery)) *AppMenuQuery

WithAction tells the query-builder to eager-load the nodes that are connected to the "action" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppMenuQuery) WithApp

func (amq *AppMenuQuery) WithApp(opts ...func(*AppQuery)) *AppMenuQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

type AppMenuSelect

type AppMenuSelect struct {
	*AppMenuQuery
	// contains filtered or unexported fields
}

AppMenuSelect is the builder for selecting fields of AppMenu entities.

func (*AppMenuSelect) Aggregate

func (ams *AppMenuSelect) Aggregate(fns ...AggregateFunc) *AppMenuSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppMenuSelect) Bool

func (s *AppMenuSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) BoolX

func (s *AppMenuSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppMenuSelect) Bools

func (s *AppMenuSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) BoolsX

func (s *AppMenuSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppMenuSelect) Float64

func (s *AppMenuSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) Float64X

func (s *AppMenuSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppMenuSelect) Float64s

func (s *AppMenuSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) Float64sX

func (s *AppMenuSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppMenuSelect) Int

func (s *AppMenuSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) IntX

func (s *AppMenuSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppMenuSelect) Ints

func (s *AppMenuSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) IntsX

func (s *AppMenuSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppMenuSelect) Scan

func (ams *AppMenuSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppMenuSelect) ScanX

func (s *AppMenuSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppMenuSelect) String

func (s *AppMenuSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) StringX

func (s *AppMenuSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppMenuSelect) Strings

func (s *AppMenuSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppMenuSelect) StringsX

func (s *AppMenuSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppMenuUpdate

type AppMenuUpdate struct {
	// contains filtered or unexported fields
}

AppMenuUpdate is the builder for updating AppMenu entities.

func (*AppMenuUpdate) AddDisplaySort

func (amu *AppMenuUpdate) AddDisplaySort(i int32) *AppMenuUpdate

AddDisplaySort adds i to the "display_sort" field.

func (*AppMenuUpdate) AddParentID

func (amu *AppMenuUpdate) AddParentID(i int) *AppMenuUpdate

AddParentID adds i to the "parent_id" field.

func (*AppMenuUpdate) AddUpdatedBy

func (amu *AppMenuUpdate) AddUpdatedBy(i int) *AppMenuUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppMenuUpdate) ClearAction

func (amu *AppMenuUpdate) ClearAction() *AppMenuUpdate

ClearAction clears the "action" edge to the AppAction entity.

func (*AppMenuUpdate) ClearActionID

func (amu *AppMenuUpdate) ClearActionID() *AppMenuUpdate

ClearActionID clears the value of the "action_id" field.

func (*AppMenuUpdate) ClearComments

func (amu *AppMenuUpdate) ClearComments() *AppMenuUpdate

ClearComments clears the value of the "comments" field.

func (*AppMenuUpdate) ClearDisplaySort

func (amu *AppMenuUpdate) ClearDisplaySort() *AppMenuUpdate

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppMenuUpdate) ClearIcon

func (amu *AppMenuUpdate) ClearIcon() *AppMenuUpdate

ClearIcon clears the value of the "icon" field.

func (*AppMenuUpdate) ClearRoute

func (amu *AppMenuUpdate) ClearRoute() *AppMenuUpdate

ClearRoute clears the value of the "route" field.

func (*AppMenuUpdate) ClearUpdatedAt

func (amu *AppMenuUpdate) ClearUpdatedAt() *AppMenuUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppMenuUpdate) ClearUpdatedBy

func (amu *AppMenuUpdate) ClearUpdatedBy() *AppMenuUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppMenuUpdate) Exec

func (amu *AppMenuUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppMenuUpdate) ExecX

func (amu *AppMenuUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuUpdate) Mutation

func (amu *AppMenuUpdate) Mutation() *AppMenuMutation

Mutation returns the AppMenuMutation object of the builder.

func (*AppMenuUpdate) Save

func (amu *AppMenuUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppMenuUpdate) SaveX

func (amu *AppMenuUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppMenuUpdate) SetAction

func (amu *AppMenuUpdate) SetAction(a *AppAction) *AppMenuUpdate

SetAction sets the "action" edge to the AppAction entity.

func (*AppMenuUpdate) SetActionID

func (amu *AppMenuUpdate) SetActionID(i int) *AppMenuUpdate

SetActionID sets the "action_id" field.

func (*AppMenuUpdate) SetComments

func (amu *AppMenuUpdate) SetComments(s string) *AppMenuUpdate

SetComments sets the "comments" field.

func (*AppMenuUpdate) SetDisplaySort

func (amu *AppMenuUpdate) SetDisplaySort(i int32) *AppMenuUpdate

SetDisplaySort sets the "display_sort" field.

func (*AppMenuUpdate) SetIcon

func (amu *AppMenuUpdate) SetIcon(s string) *AppMenuUpdate

SetIcon sets the "icon" field.

func (*AppMenuUpdate) SetInput

SetInput applies the change-set in the UpdateAppMenuInput on the AppMenuUpdate builder.

func (*AppMenuUpdate) SetKind

func (amu *AppMenuUpdate) SetKind(a appmenu.Kind) *AppMenuUpdate

SetKind sets the "kind" field.

func (*AppMenuUpdate) SetName

func (amu *AppMenuUpdate) SetName(s string) *AppMenuUpdate

SetName sets the "name" field.

func (*AppMenuUpdate) SetNillableActionID

func (amu *AppMenuUpdate) SetNillableActionID(i *int) *AppMenuUpdate

SetNillableActionID sets the "action_id" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableComments

func (amu *AppMenuUpdate) SetNillableComments(s *string) *AppMenuUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableDisplaySort

func (amu *AppMenuUpdate) SetNillableDisplaySort(i *int32) *AppMenuUpdate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableIcon

func (amu *AppMenuUpdate) SetNillableIcon(s *string) *AppMenuUpdate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableRoute

func (amu *AppMenuUpdate) SetNillableRoute(s *string) *AppMenuUpdate

SetNillableRoute sets the "route" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableUpdatedAt

func (amu *AppMenuUpdate) SetNillableUpdatedAt(t *time.Time) *AppMenuUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableUpdatedBy

func (amu *AppMenuUpdate) SetNillableUpdatedBy(i *int) *AppMenuUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppMenuUpdate) SetParentID

func (amu *AppMenuUpdate) SetParentID(i int) *AppMenuUpdate

SetParentID sets the "parent_id" field.

func (*AppMenuUpdate) SetRoute

func (amu *AppMenuUpdate) SetRoute(s string) *AppMenuUpdate

SetRoute sets the "route" field.

func (*AppMenuUpdate) SetUpdatedAt

func (amu *AppMenuUpdate) SetUpdatedAt(t time.Time) *AppMenuUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppMenuUpdate) SetUpdatedBy

func (amu *AppMenuUpdate) SetUpdatedBy(i int) *AppMenuUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppMenuUpdate) Where

func (amu *AppMenuUpdate) Where(ps ...predicate.AppMenu) *AppMenuUpdate

Where appends a list predicates to the AppMenuUpdate builder.

type AppMenuUpdateOne

type AppMenuUpdateOne struct {
	// contains filtered or unexported fields
}

AppMenuUpdateOne is the builder for updating a single AppMenu entity.

func (*AppMenuUpdateOne) AddDisplaySort

func (amuo *AppMenuUpdateOne) AddDisplaySort(i int32) *AppMenuUpdateOne

AddDisplaySort adds i to the "display_sort" field.

func (*AppMenuUpdateOne) AddParentID

func (amuo *AppMenuUpdateOne) AddParentID(i int) *AppMenuUpdateOne

AddParentID adds i to the "parent_id" field.

func (*AppMenuUpdateOne) AddUpdatedBy

func (amuo *AppMenuUpdateOne) AddUpdatedBy(i int) *AppMenuUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppMenuUpdateOne) ClearAction

func (amuo *AppMenuUpdateOne) ClearAction() *AppMenuUpdateOne

ClearAction clears the "action" edge to the AppAction entity.

func (*AppMenuUpdateOne) ClearActionID

func (amuo *AppMenuUpdateOne) ClearActionID() *AppMenuUpdateOne

ClearActionID clears the value of the "action_id" field.

func (*AppMenuUpdateOne) ClearComments

func (amuo *AppMenuUpdateOne) ClearComments() *AppMenuUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppMenuUpdateOne) ClearDisplaySort

func (amuo *AppMenuUpdateOne) ClearDisplaySort() *AppMenuUpdateOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppMenuUpdateOne) ClearIcon

func (amuo *AppMenuUpdateOne) ClearIcon() *AppMenuUpdateOne

ClearIcon clears the value of the "icon" field.

func (*AppMenuUpdateOne) ClearRoute

func (amuo *AppMenuUpdateOne) ClearRoute() *AppMenuUpdateOne

ClearRoute clears the value of the "route" field.

func (*AppMenuUpdateOne) ClearUpdatedAt

func (amuo *AppMenuUpdateOne) ClearUpdatedAt() *AppMenuUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppMenuUpdateOne) ClearUpdatedBy

func (amuo *AppMenuUpdateOne) ClearUpdatedBy() *AppMenuUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppMenuUpdateOne) Exec

func (amuo *AppMenuUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppMenuUpdateOne) ExecX

func (amuo *AppMenuUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuUpdateOne) Mutation

func (amuo *AppMenuUpdateOne) Mutation() *AppMenuMutation

Mutation returns the AppMenuMutation object of the builder.

func (*AppMenuUpdateOne) Save

func (amuo *AppMenuUpdateOne) Save(ctx context.Context) (*AppMenu, error)

Save executes the query and returns the updated AppMenu entity.

func (*AppMenuUpdateOne) SaveX

func (amuo *AppMenuUpdateOne) SaveX(ctx context.Context) *AppMenu

SaveX is like Save, but panics if an error occurs.

func (*AppMenuUpdateOne) Select

func (amuo *AppMenuUpdateOne) Select(field string, fields ...string) *AppMenuUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppMenuUpdateOne) SetAction

func (amuo *AppMenuUpdateOne) SetAction(a *AppAction) *AppMenuUpdateOne

SetAction sets the "action" edge to the AppAction entity.

func (*AppMenuUpdateOne) SetActionID

func (amuo *AppMenuUpdateOne) SetActionID(i int) *AppMenuUpdateOne

SetActionID sets the "action_id" field.

func (*AppMenuUpdateOne) SetComments

func (amuo *AppMenuUpdateOne) SetComments(s string) *AppMenuUpdateOne

SetComments sets the "comments" field.

func (*AppMenuUpdateOne) SetDisplaySort

func (amuo *AppMenuUpdateOne) SetDisplaySort(i int32) *AppMenuUpdateOne

SetDisplaySort sets the "display_sort" field.

func (*AppMenuUpdateOne) SetIcon

func (amuo *AppMenuUpdateOne) SetIcon(s string) *AppMenuUpdateOne

SetIcon sets the "icon" field.

func (*AppMenuUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppMenuInput on the AppMenuUpdateOne builder.

func (*AppMenuUpdateOne) SetKind

func (amuo *AppMenuUpdateOne) SetKind(a appmenu.Kind) *AppMenuUpdateOne

SetKind sets the "kind" field.

func (*AppMenuUpdateOne) SetName

func (amuo *AppMenuUpdateOne) SetName(s string) *AppMenuUpdateOne

SetName sets the "name" field.

func (*AppMenuUpdateOne) SetNillableActionID

func (amuo *AppMenuUpdateOne) SetNillableActionID(i *int) *AppMenuUpdateOne

SetNillableActionID sets the "action_id" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableComments

func (amuo *AppMenuUpdateOne) SetNillableComments(s *string) *AppMenuUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableDisplaySort

func (amuo *AppMenuUpdateOne) SetNillableDisplaySort(i *int32) *AppMenuUpdateOne

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableIcon

func (amuo *AppMenuUpdateOne) SetNillableIcon(s *string) *AppMenuUpdateOne

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableRoute

func (amuo *AppMenuUpdateOne) SetNillableRoute(s *string) *AppMenuUpdateOne

SetNillableRoute sets the "route" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableUpdatedAt

func (amuo *AppMenuUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppMenuUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableUpdatedBy

func (amuo *AppMenuUpdateOne) SetNillableUpdatedBy(i *int) *AppMenuUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppMenuUpdateOne) SetParentID

func (amuo *AppMenuUpdateOne) SetParentID(i int) *AppMenuUpdateOne

SetParentID sets the "parent_id" field.

func (*AppMenuUpdateOne) SetRoute

func (amuo *AppMenuUpdateOne) SetRoute(s string) *AppMenuUpdateOne

SetRoute sets the "route" field.

func (*AppMenuUpdateOne) SetUpdatedAt

func (amuo *AppMenuUpdateOne) SetUpdatedAt(t time.Time) *AppMenuUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppMenuUpdateOne) SetUpdatedBy

func (amuo *AppMenuUpdateOne) SetUpdatedBy(i int) *AppMenuUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppMenuUpdateOne) Where

func (amuo *AppMenuUpdateOne) Where(ps ...predicate.AppMenu) *AppMenuUpdateOne

Where appends a list predicates to the AppMenuUpdate builder.

type AppMenuUpsert

type AppMenuUpsert struct {
	*sql.UpdateSet
}

AppMenuUpsert is the "OnConflict" setter.

func (*AppMenuUpsert) AddDisplaySort

func (u *AppMenuUpsert) AddDisplaySort(v int32) *AppMenuUpsert

AddDisplaySort adds v to the "display_sort" field.

func (*AppMenuUpsert) AddParentID

func (u *AppMenuUpsert) AddParentID(v int) *AppMenuUpsert

AddParentID adds v to the "parent_id" field.

func (*AppMenuUpsert) AddUpdatedBy

func (u *AppMenuUpsert) AddUpdatedBy(v int) *AppMenuUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppMenuUpsert) ClearActionID

func (u *AppMenuUpsert) ClearActionID() *AppMenuUpsert

ClearActionID clears the value of the "action_id" field.

func (*AppMenuUpsert) ClearComments

func (u *AppMenuUpsert) ClearComments() *AppMenuUpsert

ClearComments clears the value of the "comments" field.

func (*AppMenuUpsert) ClearDisplaySort

func (u *AppMenuUpsert) ClearDisplaySort() *AppMenuUpsert

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppMenuUpsert) ClearIcon

func (u *AppMenuUpsert) ClearIcon() *AppMenuUpsert

ClearIcon clears the value of the "icon" field.

func (*AppMenuUpsert) ClearRoute

func (u *AppMenuUpsert) ClearRoute() *AppMenuUpsert

ClearRoute clears the value of the "route" field.

func (*AppMenuUpsert) ClearUpdatedAt

func (u *AppMenuUpsert) ClearUpdatedAt() *AppMenuUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppMenuUpsert) ClearUpdatedBy

func (u *AppMenuUpsert) ClearUpdatedBy() *AppMenuUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppMenuUpsert) SetActionID

func (u *AppMenuUpsert) SetActionID(v int) *AppMenuUpsert

SetActionID sets the "action_id" field.

func (*AppMenuUpsert) SetComments

func (u *AppMenuUpsert) SetComments(v string) *AppMenuUpsert

SetComments sets the "comments" field.

func (*AppMenuUpsert) SetDisplaySort

func (u *AppMenuUpsert) SetDisplaySort(v int32) *AppMenuUpsert

SetDisplaySort sets the "display_sort" field.

func (*AppMenuUpsert) SetIcon

func (u *AppMenuUpsert) SetIcon(v string) *AppMenuUpsert

SetIcon sets the "icon" field.

func (*AppMenuUpsert) SetKind

func (u *AppMenuUpsert) SetKind(v appmenu.Kind) *AppMenuUpsert

SetKind sets the "kind" field.

func (*AppMenuUpsert) SetName

func (u *AppMenuUpsert) SetName(v string) *AppMenuUpsert

SetName sets the "name" field.

func (*AppMenuUpsert) SetParentID

func (u *AppMenuUpsert) SetParentID(v int) *AppMenuUpsert

SetParentID sets the "parent_id" field.

func (*AppMenuUpsert) SetRoute

func (u *AppMenuUpsert) SetRoute(v string) *AppMenuUpsert

SetRoute sets the "route" field.

func (*AppMenuUpsert) SetUpdatedAt

func (u *AppMenuUpsert) SetUpdatedAt(v time.Time) *AppMenuUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppMenuUpsert) SetUpdatedBy

func (u *AppMenuUpsert) SetUpdatedBy(v int) *AppMenuUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppMenuUpsert) UpdateActionID

func (u *AppMenuUpsert) UpdateActionID() *AppMenuUpsert

UpdateActionID sets the "action_id" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateComments

func (u *AppMenuUpsert) UpdateComments() *AppMenuUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateDisplaySort

func (u *AppMenuUpsert) UpdateDisplaySort() *AppMenuUpsert

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateIcon

func (u *AppMenuUpsert) UpdateIcon() *AppMenuUpsert

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateKind

func (u *AppMenuUpsert) UpdateKind() *AppMenuUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateName

func (u *AppMenuUpsert) UpdateName() *AppMenuUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateParentID

func (u *AppMenuUpsert) UpdateParentID() *AppMenuUpsert

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateRoute

func (u *AppMenuUpsert) UpdateRoute() *AppMenuUpsert

UpdateRoute sets the "route" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateUpdatedAt

func (u *AppMenuUpsert) UpdateUpdatedAt() *AppMenuUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppMenuUpsert) UpdateUpdatedBy

func (u *AppMenuUpsert) UpdateUpdatedBy() *AppMenuUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppMenuUpsertBulk

type AppMenuUpsertBulk struct {
	// contains filtered or unexported fields
}

AppMenuUpsertBulk is the builder for "upsert"-ing a bulk of AppMenu nodes.

func (*AppMenuUpsertBulk) AddDisplaySort

func (u *AppMenuUpsertBulk) AddDisplaySort(v int32) *AppMenuUpsertBulk

AddDisplaySort adds v to the "display_sort" field.

func (*AppMenuUpsertBulk) AddParentID

func (u *AppMenuUpsertBulk) AddParentID(v int) *AppMenuUpsertBulk

AddParentID adds v to the "parent_id" field.

func (*AppMenuUpsertBulk) AddUpdatedBy

func (u *AppMenuUpsertBulk) AddUpdatedBy(v int) *AppMenuUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppMenuUpsertBulk) ClearActionID

func (u *AppMenuUpsertBulk) ClearActionID() *AppMenuUpsertBulk

ClearActionID clears the value of the "action_id" field.

func (*AppMenuUpsertBulk) ClearComments

func (u *AppMenuUpsertBulk) ClearComments() *AppMenuUpsertBulk

ClearComments clears the value of the "comments" field.

func (*AppMenuUpsertBulk) ClearDisplaySort

func (u *AppMenuUpsertBulk) ClearDisplaySort() *AppMenuUpsertBulk

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppMenuUpsertBulk) ClearIcon

func (u *AppMenuUpsertBulk) ClearIcon() *AppMenuUpsertBulk

ClearIcon clears the value of the "icon" field.

func (*AppMenuUpsertBulk) ClearRoute

func (u *AppMenuUpsertBulk) ClearRoute() *AppMenuUpsertBulk

ClearRoute clears the value of the "route" field.

func (*AppMenuUpsertBulk) ClearUpdatedAt

func (u *AppMenuUpsertBulk) ClearUpdatedAt() *AppMenuUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppMenuUpsertBulk) ClearUpdatedBy

func (u *AppMenuUpsertBulk) ClearUpdatedBy() *AppMenuUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppMenuUpsertBulk) DoNothing

func (u *AppMenuUpsertBulk) DoNothing() *AppMenuUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppMenuUpsertBulk) Exec

func (u *AppMenuUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppMenuUpsertBulk) ExecX

func (u *AppMenuUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuUpsertBulk) Ignore

func (u *AppMenuUpsertBulk) Ignore() *AppMenuUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppMenu.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppMenuUpsertBulk) SetActionID

func (u *AppMenuUpsertBulk) SetActionID(v int) *AppMenuUpsertBulk

SetActionID sets the "action_id" field.

func (*AppMenuUpsertBulk) SetComments

func (u *AppMenuUpsertBulk) SetComments(v string) *AppMenuUpsertBulk

SetComments sets the "comments" field.

func (*AppMenuUpsertBulk) SetDisplaySort

func (u *AppMenuUpsertBulk) SetDisplaySort(v int32) *AppMenuUpsertBulk

SetDisplaySort sets the "display_sort" field.

func (*AppMenuUpsertBulk) SetIcon

SetIcon sets the "icon" field.

func (*AppMenuUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*AppMenuUpsertBulk) SetName

SetName sets the "name" field.

func (*AppMenuUpsertBulk) SetParentID

func (u *AppMenuUpsertBulk) SetParentID(v int) *AppMenuUpsertBulk

SetParentID sets the "parent_id" field.

func (*AppMenuUpsertBulk) SetRoute

func (u *AppMenuUpsertBulk) SetRoute(v string) *AppMenuUpsertBulk

SetRoute sets the "route" field.

func (*AppMenuUpsertBulk) SetUpdatedAt

func (u *AppMenuUpsertBulk) SetUpdatedAt(v time.Time) *AppMenuUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppMenuUpsertBulk) SetUpdatedBy

func (u *AppMenuUpsertBulk) SetUpdatedBy(v int) *AppMenuUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppMenuUpsertBulk) Update

func (u *AppMenuUpsertBulk) Update(set func(*AppMenuUpsert)) *AppMenuUpsertBulk

Update allows overriding fields `UPDATE` values. See the AppMenuCreateBulk.OnConflict documentation for more info.

func (*AppMenuUpsertBulk) UpdateActionID

func (u *AppMenuUpsertBulk) UpdateActionID() *AppMenuUpsertBulk

UpdateActionID sets the "action_id" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateComments

func (u *AppMenuUpsertBulk) UpdateComments() *AppMenuUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateDisplaySort

func (u *AppMenuUpsertBulk) UpdateDisplaySort() *AppMenuUpsertBulk

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateIcon

func (u *AppMenuUpsertBulk) UpdateIcon() *AppMenuUpsertBulk

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateKind

func (u *AppMenuUpsertBulk) UpdateKind() *AppMenuUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateName

func (u *AppMenuUpsertBulk) UpdateName() *AppMenuUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateNewValues

func (u *AppMenuUpsertBulk) UpdateNewValues() *AppMenuUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppMenu.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appmenu.FieldID)
		}),
	).
	Exec(ctx)

func (*AppMenuUpsertBulk) UpdateParentID

func (u *AppMenuUpsertBulk) UpdateParentID() *AppMenuUpsertBulk

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateRoute

func (u *AppMenuUpsertBulk) UpdateRoute() *AppMenuUpsertBulk

UpdateRoute sets the "route" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateUpdatedAt

func (u *AppMenuUpsertBulk) UpdateUpdatedAt() *AppMenuUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppMenuUpsertBulk) UpdateUpdatedBy

func (u *AppMenuUpsertBulk) UpdateUpdatedBy() *AppMenuUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppMenuUpsertOne

type AppMenuUpsertOne struct {
	// contains filtered or unexported fields
}

AppMenuUpsertOne is the builder for "upsert"-ing

one AppMenu node.

func (*AppMenuUpsertOne) AddDisplaySort

func (u *AppMenuUpsertOne) AddDisplaySort(v int32) *AppMenuUpsertOne

AddDisplaySort adds v to the "display_sort" field.

func (*AppMenuUpsertOne) AddParentID

func (u *AppMenuUpsertOne) AddParentID(v int) *AppMenuUpsertOne

AddParentID adds v to the "parent_id" field.

func (*AppMenuUpsertOne) AddUpdatedBy

func (u *AppMenuUpsertOne) AddUpdatedBy(v int) *AppMenuUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppMenuUpsertOne) ClearActionID

func (u *AppMenuUpsertOne) ClearActionID() *AppMenuUpsertOne

ClearActionID clears the value of the "action_id" field.

func (*AppMenuUpsertOne) ClearComments

func (u *AppMenuUpsertOne) ClearComments() *AppMenuUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppMenuUpsertOne) ClearDisplaySort

func (u *AppMenuUpsertOne) ClearDisplaySort() *AppMenuUpsertOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppMenuUpsertOne) ClearIcon

func (u *AppMenuUpsertOne) ClearIcon() *AppMenuUpsertOne

ClearIcon clears the value of the "icon" field.

func (*AppMenuUpsertOne) ClearRoute

func (u *AppMenuUpsertOne) ClearRoute() *AppMenuUpsertOne

ClearRoute clears the value of the "route" field.

func (*AppMenuUpsertOne) ClearUpdatedAt

func (u *AppMenuUpsertOne) ClearUpdatedAt() *AppMenuUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppMenuUpsertOne) ClearUpdatedBy

func (u *AppMenuUpsertOne) ClearUpdatedBy() *AppMenuUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppMenuUpsertOne) DoNothing

func (u *AppMenuUpsertOne) DoNothing() *AppMenuUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppMenuUpsertOne) Exec

func (u *AppMenuUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppMenuUpsertOne) ExecX

func (u *AppMenuUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppMenuUpsertOne) ID

func (u *AppMenuUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppMenuUpsertOne) IDX

func (u *AppMenuUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*AppMenuUpsertOne) Ignore

func (u *AppMenuUpsertOne) Ignore() *AppMenuUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppMenu.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppMenuUpsertOne) SetActionID

func (u *AppMenuUpsertOne) SetActionID(v int) *AppMenuUpsertOne

SetActionID sets the "action_id" field.

func (*AppMenuUpsertOne) SetComments

func (u *AppMenuUpsertOne) SetComments(v string) *AppMenuUpsertOne

SetComments sets the "comments" field.

func (*AppMenuUpsertOne) SetDisplaySort

func (u *AppMenuUpsertOne) SetDisplaySort(v int32) *AppMenuUpsertOne

SetDisplaySort sets the "display_sort" field.

func (*AppMenuUpsertOne) SetIcon

func (u *AppMenuUpsertOne) SetIcon(v string) *AppMenuUpsertOne

SetIcon sets the "icon" field.

func (*AppMenuUpsertOne) SetKind

SetKind sets the "kind" field.

func (*AppMenuUpsertOne) SetName

func (u *AppMenuUpsertOne) SetName(v string) *AppMenuUpsertOne

SetName sets the "name" field.

func (*AppMenuUpsertOne) SetParentID

func (u *AppMenuUpsertOne) SetParentID(v int) *AppMenuUpsertOne

SetParentID sets the "parent_id" field.

func (*AppMenuUpsertOne) SetRoute

func (u *AppMenuUpsertOne) SetRoute(v string) *AppMenuUpsertOne

SetRoute sets the "route" field.

func (*AppMenuUpsertOne) SetUpdatedAt

func (u *AppMenuUpsertOne) SetUpdatedAt(v time.Time) *AppMenuUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppMenuUpsertOne) SetUpdatedBy

func (u *AppMenuUpsertOne) SetUpdatedBy(v int) *AppMenuUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppMenuUpsertOne) Update

func (u *AppMenuUpsertOne) Update(set func(*AppMenuUpsert)) *AppMenuUpsertOne

Update allows overriding fields `UPDATE` values. See the AppMenuCreate.OnConflict documentation for more info.

func (*AppMenuUpsertOne) UpdateActionID

func (u *AppMenuUpsertOne) UpdateActionID() *AppMenuUpsertOne

UpdateActionID sets the "action_id" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateComments

func (u *AppMenuUpsertOne) UpdateComments() *AppMenuUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateDisplaySort

func (u *AppMenuUpsertOne) UpdateDisplaySort() *AppMenuUpsertOne

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateIcon

func (u *AppMenuUpsertOne) UpdateIcon() *AppMenuUpsertOne

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateKind

func (u *AppMenuUpsertOne) UpdateKind() *AppMenuUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateName

func (u *AppMenuUpsertOne) UpdateName() *AppMenuUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateNewValues

func (u *AppMenuUpsertOne) UpdateNewValues() *AppMenuUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppMenu.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appmenu.FieldID)
		}),
	).
	Exec(ctx)

func (*AppMenuUpsertOne) UpdateParentID

func (u *AppMenuUpsertOne) UpdateParentID() *AppMenuUpsertOne

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateRoute

func (u *AppMenuUpsertOne) UpdateRoute() *AppMenuUpsertOne

UpdateRoute sets the "route" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateUpdatedAt

func (u *AppMenuUpsertOne) UpdateUpdatedAt() *AppMenuUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppMenuUpsertOne) UpdateUpdatedBy

func (u *AppMenuUpsertOne) UpdateUpdatedBy() *AppMenuUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppMenuWhereInput

type AppMenuWhereInput struct {
	Predicates []predicate.AppMenu  `json:"-"`
	Not        *AppMenuWhereInput   `json:"not,omitempty"`
	Or         []*AppMenuWhereInput `json:"or,omitempty"`
	And        []*AppMenuWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_id" field predicates.
	AppID       *int  `json:"appID,omitempty"`
	AppIDNEQ    *int  `json:"appIDNEQ,omitempty"`
	AppIDIn     []int `json:"appIDIn,omitempty"`
	AppIDNotIn  []int `json:"appIDNotIn,omitempty"`
	AppIDIsNil  bool  `json:"appIDIsNil,omitempty"`
	AppIDNotNil bool  `json:"appIDNotNil,omitempty"`

	// "parent_id" field predicates.
	ParentID      *int  `json:"parentID,omitempty"`
	ParentIDNEQ   *int  `json:"parentIDNEQ,omitempty"`
	ParentIDIn    []int `json:"parentIDIn,omitempty"`
	ParentIDNotIn []int `json:"parentIDNotIn,omitempty"`
	ParentIDGT    *int  `json:"parentIDGT,omitempty"`
	ParentIDGTE   *int  `json:"parentIDGTE,omitempty"`
	ParentIDLT    *int  `json:"parentIDLT,omitempty"`
	ParentIDLTE   *int  `json:"parentIDLTE,omitempty"`

	// "kind" field predicates.
	Kind      *appmenu.Kind  `json:"kind,omitempty"`
	KindNEQ   *appmenu.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []appmenu.Kind `json:"kindIn,omitempty"`
	KindNotIn []appmenu.Kind `json:"kindNotIn,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "icon" field predicates.
	Icon             *string  `json:"icon,omitempty"`
	IconNEQ          *string  `json:"iconNEQ,omitempty"`
	IconIn           []string `json:"iconIn,omitempty"`
	IconNotIn        []string `json:"iconNotIn,omitempty"`
	IconGT           *string  `json:"iconGT,omitempty"`
	IconGTE          *string  `json:"iconGTE,omitempty"`
	IconLT           *string  `json:"iconLT,omitempty"`
	IconLTE          *string  `json:"iconLTE,omitempty"`
	IconContains     *string  `json:"iconContains,omitempty"`
	IconHasPrefix    *string  `json:"iconHasPrefix,omitempty"`
	IconHasSuffix    *string  `json:"iconHasSuffix,omitempty"`
	IconIsNil        bool     `json:"iconIsNil,omitempty"`
	IconNotNil       bool     `json:"iconNotNil,omitempty"`
	IconEqualFold    *string  `json:"iconEqualFold,omitempty"`
	IconContainsFold *string  `json:"iconContainsFold,omitempty"`

	// "route" field predicates.
	Route             *string  `json:"route,omitempty"`
	RouteNEQ          *string  `json:"routeNEQ,omitempty"`
	RouteIn           []string `json:"routeIn,omitempty"`
	RouteNotIn        []string `json:"routeNotIn,omitempty"`
	RouteGT           *string  `json:"routeGT,omitempty"`
	RouteGTE          *string  `json:"routeGTE,omitempty"`
	RouteLT           *string  `json:"routeLT,omitempty"`
	RouteLTE          *string  `json:"routeLTE,omitempty"`
	RouteContains     *string  `json:"routeContains,omitempty"`
	RouteHasPrefix    *string  `json:"routeHasPrefix,omitempty"`
	RouteHasSuffix    *string  `json:"routeHasSuffix,omitempty"`
	RouteIsNil        bool     `json:"routeIsNil,omitempty"`
	RouteNotNil       bool     `json:"routeNotNil,omitempty"`
	RouteEqualFold    *string  `json:"routeEqualFold,omitempty"`
	RouteContainsFold *string  `json:"routeContainsFold,omitempty"`

	// "app" edge predicates.
	HasApp     *bool            `json:"hasApp,omitempty"`
	HasAppWith []*AppWhereInput `json:"hasAppWith,omitempty"`

	// "action" edge predicates.
	HasAction     *bool                  `json:"hasAction,omitempty"`
	HasActionWith []*AppActionWhereInput `json:"hasActionWith,omitempty"`
}

AppMenuWhereInput represents a where input for filtering AppMenu queries.

func (*AppMenuWhereInput) AddPredicates

func (i *AppMenuWhereInput) AddPredicates(predicates ...predicate.AppMenu)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppMenuWhereInput) Filter

Filter applies the AppMenuWhereInput filter on the AppMenuQuery builder.

func (*AppMenuWhereInput) P

P returns a predicate for filtering appmenus. An error is returned if the input is empty or invalid.

type AppMenus

type AppMenus []*AppMenu

AppMenus is a parsable slice of AppMenu.

type AppMutation

type AppMutation struct {
	// contains filtered or unexported fields
}

AppMutation represents an operation that mutates the App nodes in the graph.

func (*AppMutation) ActionsCleared

func (m *AppMutation) ActionsCleared() bool

ActionsCleared reports if the "actions" edge to the AppAction entity was cleared.

func (*AppMutation) ActionsIDs

func (m *AppMutation) ActionsIDs() (ids []int)

ActionsIDs returns the "actions" edge IDs in the mutation.

func (*AppMutation) AddActionIDs

func (m *AppMutation) AddActionIDs(ids ...int)

AddActionIDs adds the "actions" edge to the AppAction entity by ids.

func (*AppMutation) AddCreatedBy

func (m *AppMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppMutation) AddDictIDs

func (m *AppMutation) AddDictIDs(ids ...int)

AddDictIDs adds the "dicts" edge to the AppDict entity by ids.

func (*AppMutation) AddField

func (m *AppMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppMutation) AddLogoFileID

func (m *AppMutation) AddLogoFileID(i int)

AddLogoFileID adds i to the "logo_file_id" field.

func (*AppMutation) AddMenuIDs

func (m *AppMutation) AddMenuIDs(ids ...int)

AddMenuIDs adds the "menus" edge to the AppMenu entity by ids.

func (*AppMutation) AddOrgAppIDs

func (m *AppMutation) AddOrgAppIDs(ids ...int)

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by ids.

func (*AppMutation) AddOrgIDs

func (m *AppMutation) AddOrgIDs(ids ...int)

AddOrgIDs adds the "orgs" edge to the Org entity by ids.

func (*AppMutation) AddOwnerOrgID

func (m *AppMutation) AddOwnerOrgID(i int)

AddOwnerOrgID adds i to the "owner_org_id" field.

func (*AppMutation) AddPolicyIDs

func (m *AppMutation) AddPolicyIDs(ids ...int)

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by ids.

func (*AppMutation) AddRefreshTokenValidity

func (m *AppMutation) AddRefreshTokenValidity(i int32)

AddRefreshTokenValidity adds i to the "refresh_token_validity" field.

func (*AppMutation) AddResourceIDs

func (m *AppMutation) AddResourceIDs(ids ...int)

AddResourceIDs adds the "resources" edge to the AppRes entity by ids.

func (*AppMutation) AddRoleIDs

func (m *AppMutation) AddRoleIDs(ids ...int)

AddRoleIDs adds the "roles" edge to the AppRole entity by ids.

func (*AppMutation) AddTokenValidity

func (m *AppMutation) AddTokenValidity(i int32)

AddTokenValidity adds i to the "token_validity" field.

func (*AppMutation) AddUpdatedBy

func (m *AppMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppMutation) AddedCreatedBy

func (m *AppMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppMutation) AddedEdges

func (m *AppMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppMutation) AddedField

func (m *AppMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppMutation) AddedFields

func (m *AppMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppMutation) AddedIDs

func (m *AppMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppMutation) AddedLogoFileID

func (m *AppMutation) AddedLogoFileID() (r int, exists bool)

AddedLogoFileID returns the value that was added to the "logo_file_id" field in this mutation.

func (*AppMutation) AddedOwnerOrgID

func (m *AppMutation) AddedOwnerOrgID() (r int, exists bool)

AddedOwnerOrgID returns the value that was added to the "owner_org_id" field in this mutation.

func (*AppMutation) AddedRefreshTokenValidity

func (m *AppMutation) AddedRefreshTokenValidity() (r int32, exists bool)

AddedRefreshTokenValidity returns the value that was added to the "refresh_token_validity" field in this mutation.

func (*AppMutation) AddedTokenValidity

func (m *AppMutation) AddedTokenValidity() (r int32, exists bool)

AddedTokenValidity returns the value that was added to the "token_validity" field in this mutation.

func (*AppMutation) AddedUpdatedBy

func (m *AppMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppMutation) AppKey

func (m *AppMutation) AppKey() (r string, exists bool)

AppKey returns the value of the "app_key" field in the mutation.

func (*AppMutation) AppKeyCleared

func (m *AppMutation) AppKeyCleared() bool

AppKeyCleared returns if the "app_key" field was cleared in this mutation.

func (*AppMutation) AppSecret

func (m *AppMutation) AppSecret() (r string, exists bool)

AppSecret returns the value of the "app_secret" field in the mutation.

func (*AppMutation) AppSecretCleared

func (m *AppMutation) AppSecretCleared() bool

AppSecretCleared returns if the "app_secret" field was cleared in this mutation.

func (*AppMutation) ClearActions

func (m *AppMutation) ClearActions()

ClearActions clears the "actions" edge to the AppAction entity.

func (*AppMutation) ClearAppKey

func (m *AppMutation) ClearAppKey()

ClearAppKey clears the value of the "app_key" field.

func (*AppMutation) ClearAppSecret

func (m *AppMutation) ClearAppSecret()

ClearAppSecret clears the value of the "app_secret" field.

func (*AppMutation) ClearComments

func (m *AppMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppMutation) ClearDicts

func (m *AppMutation) ClearDicts()

ClearDicts clears the "dicts" edge to the AppDict entity.

func (*AppMutation) ClearEdge

func (m *AppMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppMutation) ClearField

func (m *AppMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppMutation) ClearLogoFileID

func (m *AppMutation) ClearLogoFileID()

ClearLogoFileID clears the value of the "logo_file_id" field.

func (*AppMutation) ClearMenus

func (m *AppMutation) ClearMenus()

ClearMenus clears the "menus" edge to the AppMenu entity.

func (*AppMutation) ClearOrgApp

func (m *AppMutation) ClearOrgApp()

ClearOrgApp clears the "org_app" edge to the OrgApp entity.

func (*AppMutation) ClearOrgs

func (m *AppMutation) ClearOrgs()

ClearOrgs clears the "orgs" edge to the Org entity.

func (*AppMutation) ClearOwnerOrgID

func (m *AppMutation) ClearOwnerOrgID()

ClearOwnerOrgID clears the value of the "owner_org_id" field.

func (*AppMutation) ClearPolicies

func (m *AppMutation) ClearPolicies()

ClearPolicies clears the "policies" edge to the AppPolicy entity.

func (*AppMutation) ClearPrivate

func (m *AppMutation) ClearPrivate()

ClearPrivate clears the value of the "private" field.

func (*AppMutation) ClearRedirectURI

func (m *AppMutation) ClearRedirectURI()

ClearRedirectURI clears the value of the "redirect_uri" field.

func (*AppMutation) ClearRefreshTokenValidity

func (m *AppMutation) ClearRefreshTokenValidity()

ClearRefreshTokenValidity clears the value of the "refresh_token_validity" field.

func (*AppMutation) ClearResources

func (m *AppMutation) ClearResources()

ClearResources clears the "resources" edge to the AppRes entity.

func (*AppMutation) ClearRoles

func (m *AppMutation) ClearRoles()

ClearRoles clears the "roles" edge to the AppRole entity.

func (*AppMutation) ClearScopes

func (m *AppMutation) ClearScopes()

ClearScopes clears the value of the "scopes" field.

func (*AppMutation) ClearStatus

func (m *AppMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*AppMutation) ClearTokenValidity

func (m *AppMutation) ClearTokenValidity()

ClearTokenValidity clears the value of the "token_validity" field.

func (*AppMutation) ClearUpdatedAt

func (m *AppMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppMutation) ClearUpdatedBy

func (m *AppMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppMutation) ClearedEdges

func (m *AppMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppMutation) ClearedFields

func (m *AppMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppMutation) Client

func (m AppMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppMutation) Code

func (m *AppMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*AppMutation) Comments

func (m *AppMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*AppMutation) CommentsCleared

func (m *AppMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*AppMutation) CreatedAt

func (m *AppMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppMutation) CreatedBy

func (m *AppMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppMutation) DictsCleared

func (m *AppMutation) DictsCleared() bool

DictsCleared reports if the "dicts" edge to the AppDict entity was cleared.

func (*AppMutation) DictsIDs

func (m *AppMutation) DictsIDs() (ids []int)

DictsIDs returns the "dicts" edge IDs in the mutation.

func (*AppMutation) EdgeCleared

func (m *AppMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppMutation) Field

func (m *AppMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppMutation) FieldCleared

func (m *AppMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppMutation) Fields

func (m *AppMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppMutation) ID

func (m *AppMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppMutation) IDs

func (m *AppMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppMutation) Kind

func (m *AppMutation) Kind() (r app.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*AppMutation) LogoFileID

func (m *AppMutation) LogoFileID() (r int, exists bool)

LogoFileID returns the value of the "logo_file_id" field in the mutation.

func (*AppMutation) LogoFileIDCleared

func (m *AppMutation) LogoFileIDCleared() bool

LogoFileIDCleared returns if the "logo_file_id" field was cleared in this mutation.

func (*AppMutation) MenusCleared

func (m *AppMutation) MenusCleared() bool

MenusCleared reports if the "menus" edge to the AppMenu entity was cleared.

func (*AppMutation) MenusIDs

func (m *AppMutation) MenusIDs() (ids []int)

MenusIDs returns the "menus" edge IDs in the mutation.

func (*AppMutation) Name

func (m *AppMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppMutation) OldAppKey

func (m *AppMutation) OldAppKey(ctx context.Context) (v string, err error)

OldAppKey returns the old "app_key" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldAppSecret

func (m *AppMutation) OldAppSecret(ctx context.Context) (v string, err error)

OldAppSecret returns the old "app_secret" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldCode

func (m *AppMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldComments

func (m *AppMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldCreatedAt

func (m *AppMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldCreatedBy

func (m *AppMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldField

func (m *AppMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppMutation) OldKind

func (m *AppMutation) OldKind(ctx context.Context) (v app.Kind, err error)

OldKind returns the old "kind" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldLogoFileID

func (m *AppMutation) OldLogoFileID(ctx context.Context) (v int, err error)

OldLogoFileID returns the old "logo_file_id" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldName

func (m *AppMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldOwnerOrgID

func (m *AppMutation) OldOwnerOrgID(ctx context.Context) (v int, err error)

OldOwnerOrgID returns the old "owner_org_id" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldPrivate

func (m *AppMutation) OldPrivate(ctx context.Context) (v bool, err error)

OldPrivate returns the old "private" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldRedirectURI

func (m *AppMutation) OldRedirectURI(ctx context.Context) (v string, err error)

OldRedirectURI returns the old "redirect_uri" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldRefreshTokenValidity

func (m *AppMutation) OldRefreshTokenValidity(ctx context.Context) (v int32, err error)

OldRefreshTokenValidity returns the old "refresh_token_validity" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldScopes

func (m *AppMutation) OldScopes(ctx context.Context) (v string, err error)

OldScopes returns the old "scopes" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldStatus

func (m *AppMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldTokenValidity

func (m *AppMutation) OldTokenValidity(ctx context.Context) (v int32, err error)

OldTokenValidity returns the old "token_validity" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldUpdatedAt

func (m *AppMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldUpdatedBy

func (m *AppMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) Op

func (m *AppMutation) Op() Op

Op returns the operation name.

func (*AppMutation) OrgAppCleared

func (m *AppMutation) OrgAppCleared() bool

OrgAppCleared reports if the "org_app" edge to the OrgApp entity was cleared.

func (*AppMutation) OrgAppIDs

func (m *AppMutation) OrgAppIDs() (ids []int)

OrgAppIDs returns the "org_app" edge IDs in the mutation.

func (*AppMutation) OrgsCleared

func (m *AppMutation) OrgsCleared() bool

OrgsCleared reports if the "orgs" edge to the Org entity was cleared.

func (*AppMutation) OrgsIDs

func (m *AppMutation) OrgsIDs() (ids []int)

OrgsIDs returns the "orgs" edge IDs in the mutation.

func (*AppMutation) OwnerOrgID

func (m *AppMutation) OwnerOrgID() (r int, exists bool)

OwnerOrgID returns the value of the "owner_org_id" field in the mutation.

func (*AppMutation) OwnerOrgIDCleared

func (m *AppMutation) OwnerOrgIDCleared() bool

OwnerOrgIDCleared returns if the "owner_org_id" field was cleared in this mutation.

func (*AppMutation) PoliciesCleared

func (m *AppMutation) PoliciesCleared() bool

PoliciesCleared reports if the "policies" edge to the AppPolicy entity was cleared.

func (*AppMutation) PoliciesIDs

func (m *AppMutation) PoliciesIDs() (ids []int)

PoliciesIDs returns the "policies" edge IDs in the mutation.

func (*AppMutation) Private

func (m *AppMutation) Private() (r bool, exists bool)

Private returns the value of the "private" field in the mutation.

func (*AppMutation) PrivateCleared

func (m *AppMutation) PrivateCleared() bool

PrivateCleared returns if the "private" field was cleared in this mutation.

func (*AppMutation) RedirectURI

func (m *AppMutation) RedirectURI() (r string, exists bool)

RedirectURI returns the value of the "redirect_uri" field in the mutation.

func (*AppMutation) RedirectURICleared

func (m *AppMutation) RedirectURICleared() bool

RedirectURICleared returns if the "redirect_uri" field was cleared in this mutation.

func (*AppMutation) RefreshTokenValidity

func (m *AppMutation) RefreshTokenValidity() (r int32, exists bool)

RefreshTokenValidity returns the value of the "refresh_token_validity" field in the mutation.

func (*AppMutation) RefreshTokenValidityCleared

func (m *AppMutation) RefreshTokenValidityCleared() bool

RefreshTokenValidityCleared returns if the "refresh_token_validity" field was cleared in this mutation.

func (*AppMutation) RemoveActionIDs

func (m *AppMutation) RemoveActionIDs(ids ...int)

RemoveActionIDs removes the "actions" edge to the AppAction entity by IDs.

func (*AppMutation) RemoveDictIDs

func (m *AppMutation) RemoveDictIDs(ids ...int)

RemoveDictIDs removes the "dicts" edge to the AppDict entity by IDs.

func (*AppMutation) RemoveMenuIDs

func (m *AppMutation) RemoveMenuIDs(ids ...int)

RemoveMenuIDs removes the "menus" edge to the AppMenu entity by IDs.

func (*AppMutation) RemoveOrgAppIDs

func (m *AppMutation) RemoveOrgAppIDs(ids ...int)

RemoveOrgAppIDs removes the "org_app" edge to the OrgApp entity by IDs.

func (*AppMutation) RemoveOrgIDs

func (m *AppMutation) RemoveOrgIDs(ids ...int)

RemoveOrgIDs removes the "orgs" edge to the Org entity by IDs.

func (*AppMutation) RemovePolicyIDs

func (m *AppMutation) RemovePolicyIDs(ids ...int)

RemovePolicyIDs removes the "policies" edge to the AppPolicy entity by IDs.

func (*AppMutation) RemoveResourceIDs

func (m *AppMutation) RemoveResourceIDs(ids ...int)

RemoveResourceIDs removes the "resources" edge to the AppRes entity by IDs.

func (*AppMutation) RemoveRoleIDs

func (m *AppMutation) RemoveRoleIDs(ids ...int)

RemoveRoleIDs removes the "roles" edge to the AppRole entity by IDs.

func (*AppMutation) RemovedActionsIDs

func (m *AppMutation) RemovedActionsIDs() (ids []int)

RemovedActions returns the removed IDs of the "actions" edge to the AppAction entity.

func (*AppMutation) RemovedDictsIDs

func (m *AppMutation) RemovedDictsIDs() (ids []int)

RemovedDicts returns the removed IDs of the "dicts" edge to the AppDict entity.

func (*AppMutation) RemovedEdges

func (m *AppMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppMutation) RemovedIDs

func (m *AppMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppMutation) RemovedMenusIDs

func (m *AppMutation) RemovedMenusIDs() (ids []int)

RemovedMenus returns the removed IDs of the "menus" edge to the AppMenu entity.

func (*AppMutation) RemovedOrgAppIDs

func (m *AppMutation) RemovedOrgAppIDs() (ids []int)

RemovedOrgApp returns the removed IDs of the "org_app" edge to the OrgApp entity.

func (*AppMutation) RemovedOrgsIDs

func (m *AppMutation) RemovedOrgsIDs() (ids []int)

RemovedOrgs returns the removed IDs of the "orgs" edge to the Org entity.

func (*AppMutation) RemovedPoliciesIDs

func (m *AppMutation) RemovedPoliciesIDs() (ids []int)

RemovedPolicies returns the removed IDs of the "policies" edge to the AppPolicy entity.

func (*AppMutation) RemovedResourcesIDs

func (m *AppMutation) RemovedResourcesIDs() (ids []int)

RemovedResources returns the removed IDs of the "resources" edge to the AppRes entity.

func (*AppMutation) RemovedRolesIDs

func (m *AppMutation) RemovedRolesIDs() (ids []int)

RemovedRoles returns the removed IDs of the "roles" edge to the AppRole entity.

func (*AppMutation) ResetActions

func (m *AppMutation) ResetActions()

ResetActions resets all changes to the "actions" edge.

func (*AppMutation) ResetAppKey

func (m *AppMutation) ResetAppKey()

ResetAppKey resets all changes to the "app_key" field.

func (*AppMutation) ResetAppSecret

func (m *AppMutation) ResetAppSecret()

ResetAppSecret resets all changes to the "app_secret" field.

func (*AppMutation) ResetCode

func (m *AppMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*AppMutation) ResetComments

func (m *AppMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppMutation) ResetCreatedAt

func (m *AppMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppMutation) ResetCreatedBy

func (m *AppMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppMutation) ResetDicts

func (m *AppMutation) ResetDicts()

ResetDicts resets all changes to the "dicts" edge.

func (*AppMutation) ResetEdge

func (m *AppMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppMutation) ResetField

func (m *AppMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppMutation) ResetKind

func (m *AppMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*AppMutation) ResetLogoFileID

func (m *AppMutation) ResetLogoFileID()

ResetLogoFileID resets all changes to the "logo_file_id" field.

func (*AppMutation) ResetMenus

func (m *AppMutation) ResetMenus()

ResetMenus resets all changes to the "menus" edge.

func (*AppMutation) ResetName

func (m *AppMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppMutation) ResetOrgApp

func (m *AppMutation) ResetOrgApp()

ResetOrgApp resets all changes to the "org_app" edge.

func (*AppMutation) ResetOrgs

func (m *AppMutation) ResetOrgs()

ResetOrgs resets all changes to the "orgs" edge.

func (*AppMutation) ResetOwnerOrgID

func (m *AppMutation) ResetOwnerOrgID()

ResetOwnerOrgID resets all changes to the "owner_org_id" field.

func (*AppMutation) ResetPolicies

func (m *AppMutation) ResetPolicies()

ResetPolicies resets all changes to the "policies" edge.

func (*AppMutation) ResetPrivate

func (m *AppMutation) ResetPrivate()

ResetPrivate resets all changes to the "private" field.

func (*AppMutation) ResetRedirectURI

func (m *AppMutation) ResetRedirectURI()

ResetRedirectURI resets all changes to the "redirect_uri" field.

func (*AppMutation) ResetRefreshTokenValidity

func (m *AppMutation) ResetRefreshTokenValidity()

ResetRefreshTokenValidity resets all changes to the "refresh_token_validity" field.

func (*AppMutation) ResetResources

func (m *AppMutation) ResetResources()

ResetResources resets all changes to the "resources" edge.

func (*AppMutation) ResetRoles

func (m *AppMutation) ResetRoles()

ResetRoles resets all changes to the "roles" edge.

func (*AppMutation) ResetScopes

func (m *AppMutation) ResetScopes()

ResetScopes resets all changes to the "scopes" field.

func (*AppMutation) ResetStatus

func (m *AppMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*AppMutation) ResetTokenValidity

func (m *AppMutation) ResetTokenValidity()

ResetTokenValidity resets all changes to the "token_validity" field.

func (*AppMutation) ResetUpdatedAt

func (m *AppMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppMutation) ResetUpdatedBy

func (m *AppMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppMutation) ResourcesCleared

func (m *AppMutation) ResourcesCleared() bool

ResourcesCleared reports if the "resources" edge to the AppRes entity was cleared.

func (*AppMutation) ResourcesIDs

func (m *AppMutation) ResourcesIDs() (ids []int)

ResourcesIDs returns the "resources" edge IDs in the mutation.

func (*AppMutation) RolesCleared

func (m *AppMutation) RolesCleared() bool

RolesCleared reports if the "roles" edge to the AppRole entity was cleared.

func (*AppMutation) RolesIDs

func (m *AppMutation) RolesIDs() (ids []int)

RolesIDs returns the "roles" edge IDs in the mutation.

func (*AppMutation) Scopes

func (m *AppMutation) Scopes() (r string, exists bool)

Scopes returns the value of the "scopes" field in the mutation.

func (*AppMutation) ScopesCleared

func (m *AppMutation) ScopesCleared() bool

ScopesCleared returns if the "scopes" field was cleared in this mutation.

func (*AppMutation) SetAppKey

func (m *AppMutation) SetAppKey(s string)

SetAppKey sets the "app_key" field.

func (*AppMutation) SetAppSecret

func (m *AppMutation) SetAppSecret(s string)

SetAppSecret sets the "app_secret" field.

func (*AppMutation) SetCode

func (m *AppMutation) SetCode(s string)

SetCode sets the "code" field.

func (*AppMutation) SetComments

func (m *AppMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppMutation) SetCreatedAt

func (m *AppMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppMutation) SetCreatedBy

func (m *AppMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppMutation) SetField

func (m *AppMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppMutation) SetID

func (m *AppMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of App entities.

func (*AppMutation) SetKind

func (m *AppMutation) SetKind(a app.Kind)

SetKind sets the "kind" field.

func (*AppMutation) SetLogoFileID

func (m *AppMutation) SetLogoFileID(i int)

SetLogoFileID sets the "logo_file_id" field.

func (*AppMutation) SetName

func (m *AppMutation) SetName(s string)

SetName sets the "name" field.

func (*AppMutation) SetOp

func (m *AppMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppMutation) SetOwnerOrgID

func (m *AppMutation) SetOwnerOrgID(i int)

SetOwnerOrgID sets the "owner_org_id" field.

func (*AppMutation) SetPrivate

func (m *AppMutation) SetPrivate(b bool)

SetPrivate sets the "private" field.

func (*AppMutation) SetRedirectURI

func (m *AppMutation) SetRedirectURI(s string)

SetRedirectURI sets the "redirect_uri" field.

func (*AppMutation) SetRefreshTokenValidity

func (m *AppMutation) SetRefreshTokenValidity(i int32)

SetRefreshTokenValidity sets the "refresh_token_validity" field.

func (*AppMutation) SetScopes

func (m *AppMutation) SetScopes(s string)

SetScopes sets the "scopes" field.

func (*AppMutation) SetStatus

func (m *AppMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*AppMutation) SetTokenValidity

func (m *AppMutation) SetTokenValidity(i int32)

SetTokenValidity sets the "token_validity" field.

func (*AppMutation) SetUpdatedAt

func (m *AppMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppMutation) SetUpdatedBy

func (m *AppMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*AppMutation) Status

func (m *AppMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*AppMutation) StatusCleared

func (m *AppMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*AppMutation) TokenValidity

func (m *AppMutation) TokenValidity() (r int32, exists bool)

TokenValidity returns the value of the "token_validity" field in the mutation.

func (*AppMutation) TokenValidityCleared

func (m *AppMutation) TokenValidityCleared() bool

TokenValidityCleared returns if the "token_validity" field was cleared in this mutation.

func (AppMutation) Tx

func (m AppMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppMutation) Type

func (m *AppMutation) Type() string

Type returns the node type of this mutation (App).

func (*AppMutation) UpdatedAt

func (m *AppMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppMutation) UpdatedAtCleared

func (m *AppMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppMutation) UpdatedBy

func (m *AppMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppMutation) UpdatedByCleared

func (m *AppMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppMutation) Where

func (m *AppMutation) Where(ps ...predicate.App)

Where appends a list predicates to the AppMutation builder.

func (*AppMutation) WhereP

func (m *AppMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppOrder

type AppOrder struct {
	Direction OrderDirection `json:"direction"`
	Field     *AppOrderField `json:"field"`
}

AppOrder defines the ordering of App.

type AppOrderField

type AppOrderField struct {
	// Value extracts the ordering value from the given App.
	Value func(*App) (ent.Value, error)
	// contains filtered or unexported fields
}

AppOrderField defines the ordering field of App.

func (AppOrderField) MarshalGQL

func (f AppOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppOrderField) String

func (f AppOrderField) String() string

String implement fmt.Stringer interface.

func (*AppOrderField) UnmarshalGQL

func (f *AppOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppPaginateOption

type AppPaginateOption func(*appPager) error

AppPaginateOption enables pagination customization.

func WithAppFilter

func WithAppFilter(filter func(*AppQuery) (*AppQuery, error)) AppPaginateOption

WithAppFilter configures pagination filter.

func WithAppOrder

func WithAppOrder(order *AppOrder) AppPaginateOption

WithAppOrder configures pagination ordering.

type AppPolicies

type AppPolicies []*AppPolicy

AppPolicies is a parsable slice of AppPolicy.

type AppPolicy

type AppPolicy struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 所属应用
	AppID int `json:"app_id,omitempty"`
	// 策略名称
	Name string `json:"name,omitempty"`
	// 描述
	Comments string `json:"comments,omitempty"`
	// 策略规则
	Rules []*types.PolicyRule `json:"rules,omitempty"`
	// 版本号
	Version string `json:"version,omitempty"`
	// 标识是否自动授予到账户
	AutoGrant bool `json:"auto_grant,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppPolicyQuery when eager-loading is set.
	Edges AppPolicyEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppPolicy is the model entity for the AppPolicy schema.

func (*AppPolicy) App

func (ap *AppPolicy) App(ctx context.Context) (*App, error)

func (*AppPolicy) GlobalID

func (ap *AppPolicy) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppPolicy node.

func (*AppPolicy) IsNode

func (*AppPolicy) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppPolicy) NamedAppRolePolicy

func (ap *AppPolicy) NamedAppRolePolicy(name string) ([]*AppRolePolicy, error)

NamedAppRolePolicy returns the AppRolePolicy named value or an error if the edge was not loaded in eager-loading with this name.

func (*AppPolicy) NamedRoles

func (ap *AppPolicy) NamedRoles(name string) ([]*AppRole, error)

NamedRoles returns the Roles named value or an error if the edge was not loaded in eager-loading with this name.

func (*AppPolicy) QueryApp

func (ap *AppPolicy) QueryApp() *AppQuery

QueryApp queries the "app" edge of the AppPolicy entity.

func (*AppPolicy) QueryAppRolePolicy

func (ap *AppPolicy) QueryAppRolePolicy() *AppRolePolicyQuery

QueryAppRolePolicy queries the "app_role_policy" edge of the AppPolicy entity.

func (*AppPolicy) QueryRoles

func (ap *AppPolicy) QueryRoles() *AppRoleQuery

QueryRoles queries the "roles" edge of the AppPolicy entity.

func (*AppPolicy) Roles

func (ap *AppPolicy) Roles(ctx context.Context) (result []*AppRole, err error)

func (*AppPolicy) String

func (ap *AppPolicy) String() string

String implements the fmt.Stringer.

func (*AppPolicy) ToEdge

func (ap *AppPolicy) ToEdge(order *AppPolicyOrder) *AppPolicyEdge

ToEdge converts AppPolicy into AppPolicyEdge.

func (*AppPolicy) Unwrap

func (ap *AppPolicy) Unwrap() *AppPolicy

Unwrap unwraps the AppPolicy entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppPolicy) Update

func (ap *AppPolicy) Update() *AppPolicyUpdateOne

Update returns a builder for updating this AppPolicy. Note that you need to call AppPolicy.Unwrap() before calling this method if this AppPolicy was returned from a transaction, and the transaction was committed or rolled back.

func (*AppPolicy) Value

func (ap *AppPolicy) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppPolicy. This includes values selected through modifiers, order, etc.

type AppPolicyClient

type AppPolicyClient struct {
	// contains filtered or unexported fields
}

AppPolicyClient is a client for the AppPolicy schema.

func NewAppPolicyClient

func NewAppPolicyClient(c config) *AppPolicyClient

NewAppPolicyClient returns a client for the AppPolicy from the given config.

func (*AppPolicyClient) Create

func (c *AppPolicyClient) Create() *AppPolicyCreate

Create returns a builder for creating a AppPolicy entity.

func (*AppPolicyClient) CreateBulk

func (c *AppPolicyClient) CreateBulk(builders ...*AppPolicyCreate) *AppPolicyCreateBulk

CreateBulk returns a builder for creating a bulk of AppPolicy entities.

func (*AppPolicyClient) Delete

func (c *AppPolicyClient) Delete() *AppPolicyDelete

Delete returns a delete builder for AppPolicy.

func (*AppPolicyClient) DeleteOne

func (c *AppPolicyClient) DeleteOne(ap *AppPolicy) *AppPolicyDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppPolicyClient) DeleteOneID

func (c *AppPolicyClient) DeleteOneID(id int) *AppPolicyDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppPolicyClient) Get

func (c *AppPolicyClient) Get(ctx context.Context, id int) (*AppPolicy, error)

Get returns a AppPolicy entity by its id.

func (*AppPolicyClient) GetX

func (c *AppPolicyClient) GetX(ctx context.Context, id int) *AppPolicy

GetX is like Get, but panics if an error occurs.

func (*AppPolicyClient) Hooks

func (c *AppPolicyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppPolicyClient) Intercept

func (c *AppPolicyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `apppolicy.Intercept(f(g(h())))`.

func (*AppPolicyClient) Interceptors

func (c *AppPolicyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppPolicyClient) MapCreateBulk

func (c *AppPolicyClient) MapCreateBulk(slice any, setFunc func(*AppPolicyCreate, int)) *AppPolicyCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppPolicyClient) Query

func (c *AppPolicyClient) Query() *AppPolicyQuery

Query returns a query builder for AppPolicy.

func (*AppPolicyClient) QueryApp

func (c *AppPolicyClient) QueryApp(ap *AppPolicy) *AppQuery

QueryApp queries the app edge of a AppPolicy.

func (*AppPolicyClient) QueryAppRolePolicy

func (c *AppPolicyClient) QueryAppRolePolicy(ap *AppPolicy) *AppRolePolicyQuery

QueryAppRolePolicy queries the app_role_policy edge of a AppPolicy.

func (*AppPolicyClient) QueryRoles

func (c *AppPolicyClient) QueryRoles(ap *AppPolicy) *AppRoleQuery

QueryRoles queries the roles edge of a AppPolicy.

func (*AppPolicyClient) Update

func (c *AppPolicyClient) Update() *AppPolicyUpdate

Update returns an update builder for AppPolicy.

func (*AppPolicyClient) UpdateOne

func (c *AppPolicyClient) UpdateOne(ap *AppPolicy) *AppPolicyUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppPolicyClient) UpdateOneID

func (c *AppPolicyClient) UpdateOneID(id int) *AppPolicyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppPolicyClient) Use

func (c *AppPolicyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `apppolicy.Hooks(f(g(h())))`.

type AppPolicyConnection

type AppPolicyConnection struct {
	Edges      []*AppPolicyEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

AppPolicyConnection is the connection containing edges to AppPolicy.

type AppPolicyCreate

type AppPolicyCreate struct {
	// contains filtered or unexported fields
}

AppPolicyCreate is the builder for creating a AppPolicy entity.

func (*AppPolicyCreate) AddAppRolePolicy

func (apc *AppPolicyCreate) AddAppRolePolicy(a ...*AppRolePolicy) *AppPolicyCreate

AddAppRolePolicy adds the "app_role_policy" edges to the AppRolePolicy entity.

func (*AppPolicyCreate) AddAppRolePolicyIDs

func (apc *AppPolicyCreate) AddAppRolePolicyIDs(ids ...int) *AppPolicyCreate

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppPolicyCreate) AddRoleIDs

func (apc *AppPolicyCreate) AddRoleIDs(ids ...int) *AppPolicyCreate

AddRoleIDs adds the "roles" edge to the AppRole entity by IDs.

func (*AppPolicyCreate) AddRoles

func (apc *AppPolicyCreate) AddRoles(a ...*AppRole) *AppPolicyCreate

AddRoles adds the "roles" edges to the AppRole entity.

func (*AppPolicyCreate) Exec

func (apc *AppPolicyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPolicyCreate) ExecX

func (apc *AppPolicyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyCreate) Mutation

func (apc *AppPolicyCreate) Mutation() *AppPolicyMutation

Mutation returns the AppPolicyMutation object of the builder.

func (*AppPolicyCreate) OnConflict

func (apc *AppPolicyCreate) OnConflict(opts ...sql.ConflictOption) *AppPolicyUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppPolicy.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppPolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppPolicyCreate) OnConflictColumns

func (apc *AppPolicyCreate) OnConflictColumns(columns ...string) *AppPolicyUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppPolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppPolicyCreate) Save

func (apc *AppPolicyCreate) Save(ctx context.Context) (*AppPolicy, error)

Save creates the AppPolicy in the database.

func (*AppPolicyCreate) SaveX

func (apc *AppPolicyCreate) SaveX(ctx context.Context) *AppPolicy

SaveX calls Save and panics if Save returns an error.

func (*AppPolicyCreate) SetApp

func (apc *AppPolicyCreate) SetApp(a *App) *AppPolicyCreate

SetApp sets the "app" edge to the App entity.

func (*AppPolicyCreate) SetAppID

func (apc *AppPolicyCreate) SetAppID(i int) *AppPolicyCreate

SetAppID sets the "app_id" field.

func (*AppPolicyCreate) SetAutoGrant

func (apc *AppPolicyCreate) SetAutoGrant(b bool) *AppPolicyCreate

SetAutoGrant sets the "auto_grant" field.

func (*AppPolicyCreate) SetComments

func (apc *AppPolicyCreate) SetComments(s string) *AppPolicyCreate

SetComments sets the "comments" field.

func (*AppPolicyCreate) SetCreatedAt

func (apc *AppPolicyCreate) SetCreatedAt(t time.Time) *AppPolicyCreate

SetCreatedAt sets the "created_at" field.

func (*AppPolicyCreate) SetCreatedBy

func (apc *AppPolicyCreate) SetCreatedBy(i int) *AppPolicyCreate

SetCreatedBy sets the "created_by" field.

func (*AppPolicyCreate) SetID

func (apc *AppPolicyCreate) SetID(i int) *AppPolicyCreate

SetID sets the "id" field.

func (*AppPolicyCreate) SetInput

SetInput applies the change-set in the CreateAppPolicyInput on the AppPolicyCreate builder.

func (*AppPolicyCreate) SetName

func (apc *AppPolicyCreate) SetName(s string) *AppPolicyCreate

SetName sets the "name" field.

func (*AppPolicyCreate) SetNillableAppID

func (apc *AppPolicyCreate) SetNillableAppID(i *int) *AppPolicyCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableAutoGrant

func (apc *AppPolicyCreate) SetNillableAutoGrant(b *bool) *AppPolicyCreate

SetNillableAutoGrant sets the "auto_grant" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableComments

func (apc *AppPolicyCreate) SetNillableComments(s *string) *AppPolicyCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableCreatedAt

func (apc *AppPolicyCreate) SetNillableCreatedAt(t *time.Time) *AppPolicyCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableID

func (apc *AppPolicyCreate) SetNillableID(i *int) *AppPolicyCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableStatus

func (apc *AppPolicyCreate) SetNillableStatus(ts *typex.SimpleStatus) *AppPolicyCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableUpdatedAt

func (apc *AppPolicyCreate) SetNillableUpdatedAt(t *time.Time) *AppPolicyCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableUpdatedBy

func (apc *AppPolicyCreate) SetNillableUpdatedBy(i *int) *AppPolicyCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppPolicyCreate) SetNillableVersion

func (apc *AppPolicyCreate) SetNillableVersion(s *string) *AppPolicyCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*AppPolicyCreate) SetRules

func (apc *AppPolicyCreate) SetRules(tr []*types.PolicyRule) *AppPolicyCreate

SetRules sets the "rules" field.

func (*AppPolicyCreate) SetStatus

func (apc *AppPolicyCreate) SetStatus(ts typex.SimpleStatus) *AppPolicyCreate

SetStatus sets the "status" field.

func (*AppPolicyCreate) SetUpdatedAt

func (apc *AppPolicyCreate) SetUpdatedAt(t time.Time) *AppPolicyCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyCreate) SetUpdatedBy

func (apc *AppPolicyCreate) SetUpdatedBy(i int) *AppPolicyCreate

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyCreate) SetVersion

func (apc *AppPolicyCreate) SetVersion(s string) *AppPolicyCreate

SetVersion sets the "version" field.

type AppPolicyCreateBulk

type AppPolicyCreateBulk struct {
	// contains filtered or unexported fields
}

AppPolicyCreateBulk is the builder for creating many AppPolicy entities in bulk.

func (*AppPolicyCreateBulk) Exec

func (apcb *AppPolicyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPolicyCreateBulk) ExecX

func (apcb *AppPolicyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyCreateBulk) OnConflict

func (apcb *AppPolicyCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppPolicyUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppPolicy.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppPolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppPolicyCreateBulk) OnConflictColumns

func (apcb *AppPolicyCreateBulk) OnConflictColumns(columns ...string) *AppPolicyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppPolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppPolicyCreateBulk) Save

func (apcb *AppPolicyCreateBulk) Save(ctx context.Context) ([]*AppPolicy, error)

Save creates the AppPolicy entities in the database.

func (*AppPolicyCreateBulk) SaveX

func (apcb *AppPolicyCreateBulk) SaveX(ctx context.Context) []*AppPolicy

SaveX is like Save, but panics if an error occurs.

type AppPolicyDelete

type AppPolicyDelete struct {
	// contains filtered or unexported fields
}

AppPolicyDelete is the builder for deleting a AppPolicy entity.

func (*AppPolicyDelete) Exec

func (apd *AppPolicyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppPolicyDelete) ExecX

func (apd *AppPolicyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyDelete) Where

Where appends a list predicates to the AppPolicyDelete builder.

type AppPolicyDeleteOne

type AppPolicyDeleteOne struct {
	// contains filtered or unexported fields
}

AppPolicyDeleteOne is the builder for deleting a single AppPolicy entity.

func (*AppPolicyDeleteOne) Exec

func (apdo *AppPolicyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppPolicyDeleteOne) ExecX

func (apdo *AppPolicyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyDeleteOne) Where

Where appends a list predicates to the AppPolicyDelete builder.

type AppPolicyEdge

type AppPolicyEdge struct {
	Node   *AppPolicy `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

AppPolicyEdge is the edge representation of AppPolicy.

type AppPolicyEdges

type AppPolicyEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// Roles holds the value of the roles edge.
	Roles []*AppRole `json:"roles,omitempty"`
	// AppRolePolicy holds the value of the app_role_policy edge.
	AppRolePolicy []*AppRolePolicy `json:"app_role_policy,omitempty"`
	// contains filtered or unexported fields
}

AppPolicyEdges holds the relations/edges for other nodes in the graph.

func (AppPolicyEdges) AppOrErr

func (e AppPolicyEdges) AppOrErr() (*App, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AppPolicyEdges) AppRolePolicyOrErr

func (e AppPolicyEdges) AppRolePolicyOrErr() ([]*AppRolePolicy, error)

AppRolePolicyOrErr returns the AppRolePolicy value or an error if the edge was not loaded in eager-loading.

func (AppPolicyEdges) RolesOrErr

func (e AppPolicyEdges) RolesOrErr() ([]*AppRole, error)

RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.

type AppPolicyGroupBy

type AppPolicyGroupBy struct {
	// contains filtered or unexported fields
}

AppPolicyGroupBy is the group-by builder for AppPolicy entities.

func (*AppPolicyGroupBy) Aggregate

func (apgb *AppPolicyGroupBy) Aggregate(fns ...AggregateFunc) *AppPolicyGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppPolicyGroupBy) Bool

func (s *AppPolicyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) BoolX

func (s *AppPolicyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppPolicyGroupBy) Bools

func (s *AppPolicyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) BoolsX

func (s *AppPolicyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppPolicyGroupBy) Float64

func (s *AppPolicyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) Float64X

func (s *AppPolicyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppPolicyGroupBy) Float64s

func (s *AppPolicyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) Float64sX

func (s *AppPolicyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppPolicyGroupBy) Int

func (s *AppPolicyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) IntX

func (s *AppPolicyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppPolicyGroupBy) Ints

func (s *AppPolicyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) IntsX

func (s *AppPolicyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppPolicyGroupBy) Scan

func (apgb *AppPolicyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppPolicyGroupBy) ScanX

func (s *AppPolicyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppPolicyGroupBy) String

func (s *AppPolicyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) StringX

func (s *AppPolicyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppPolicyGroupBy) Strings

func (s *AppPolicyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppPolicyGroupBy) StringsX

func (s *AppPolicyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppPolicyMutation

type AppPolicyMutation struct {
	// contains filtered or unexported fields
}

AppPolicyMutation represents an operation that mutates the AppPolicy nodes in the graph.

func (*AppPolicyMutation) AddAppRolePolicyIDs

func (m *AppPolicyMutation) AddAppRolePolicyIDs(ids ...int)

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by ids.

func (*AppPolicyMutation) AddCreatedBy

func (m *AppPolicyMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppPolicyMutation) AddField

func (m *AppPolicyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppPolicyMutation) AddRoleIDs

func (m *AppPolicyMutation) AddRoleIDs(ids ...int)

AddRoleIDs adds the "roles" edge to the AppRole entity by ids.

func (*AppPolicyMutation) AddUpdatedBy

func (m *AppPolicyMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppPolicyMutation) AddedCreatedBy

func (m *AppPolicyMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppPolicyMutation) AddedEdges

func (m *AppPolicyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppPolicyMutation) AddedField

func (m *AppPolicyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppPolicyMutation) AddedFields

func (m *AppPolicyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppPolicyMutation) AddedIDs

func (m *AppPolicyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppPolicyMutation) AddedUpdatedBy

func (m *AppPolicyMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppPolicyMutation) AppCleared

func (m *AppPolicyMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*AppPolicyMutation) AppID

func (m *AppPolicyMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*AppPolicyMutation) AppIDCleared

func (m *AppPolicyMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*AppPolicyMutation) AppIDs

func (m *AppPolicyMutation) AppIDs() (ids []int)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*AppPolicyMutation) AppRolePolicyCleared

func (m *AppPolicyMutation) AppRolePolicyCleared() bool

AppRolePolicyCleared reports if the "app_role_policy" edge to the AppRolePolicy entity was cleared.

func (*AppPolicyMutation) AppRolePolicyIDs

func (m *AppPolicyMutation) AppRolePolicyIDs() (ids []int)

AppRolePolicyIDs returns the "app_role_policy" edge IDs in the mutation.

func (*AppPolicyMutation) AppendRules

func (m *AppPolicyMutation) AppendRules(tr []*types.PolicyRule)

AppendRules adds tr to the "rules" field.

func (*AppPolicyMutation) AppendedRules

func (m *AppPolicyMutation) AppendedRules() ([]*types.PolicyRule, bool)

AppendedRules returns the list of values that were appended to the "rules" field in this mutation.

func (*AppPolicyMutation) AutoGrant

func (m *AppPolicyMutation) AutoGrant() (r bool, exists bool)

AutoGrant returns the value of the "auto_grant" field in the mutation.

func (*AppPolicyMutation) ClearApp

func (m *AppPolicyMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*AppPolicyMutation) ClearAppID

func (m *AppPolicyMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*AppPolicyMutation) ClearAppRolePolicy

func (m *AppPolicyMutation) ClearAppRolePolicy()

ClearAppRolePolicy clears the "app_role_policy" edge to the AppRolePolicy entity.

func (*AppPolicyMutation) ClearComments

func (m *AppPolicyMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppPolicyMutation) ClearEdge

func (m *AppPolicyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppPolicyMutation) ClearField

func (m *AppPolicyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppPolicyMutation) ClearRoles

func (m *AppPolicyMutation) ClearRoles()

ClearRoles clears the "roles" edge to the AppRole entity.

func (*AppPolicyMutation) ClearStatus

func (m *AppPolicyMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*AppPolicyMutation) ClearUpdatedAt

func (m *AppPolicyMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyMutation) ClearUpdatedBy

func (m *AppPolicyMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyMutation) ClearedEdges

func (m *AppPolicyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppPolicyMutation) ClearedFields

func (m *AppPolicyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppPolicyMutation) Client

func (m AppPolicyMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppPolicyMutation) Comments

func (m *AppPolicyMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*AppPolicyMutation) CommentsCleared

func (m *AppPolicyMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*AppPolicyMutation) CreatedAt

func (m *AppPolicyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppPolicyMutation) CreatedBy

func (m *AppPolicyMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppPolicyMutation) EdgeCleared

func (m *AppPolicyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppPolicyMutation) Field

func (m *AppPolicyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppPolicyMutation) FieldCleared

func (m *AppPolicyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppPolicyMutation) Fields

func (m *AppPolicyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppPolicyMutation) ID

func (m *AppPolicyMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppPolicyMutation) IDs

func (m *AppPolicyMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppPolicyMutation) Name

func (m *AppPolicyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppPolicyMutation) OldAppID

func (m *AppPolicyMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldAutoGrant

func (m *AppPolicyMutation) OldAutoGrant(ctx context.Context) (v bool, err error)

OldAutoGrant returns the old "auto_grant" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldComments

func (m *AppPolicyMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldCreatedAt

func (m *AppPolicyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldCreatedBy

func (m *AppPolicyMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldField

func (m *AppPolicyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppPolicyMutation) OldName

func (m *AppPolicyMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldRules

func (m *AppPolicyMutation) OldRules(ctx context.Context) (v []*types.PolicyRule, err error)

OldRules returns the old "rules" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldStatus

func (m *AppPolicyMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldUpdatedAt

func (m *AppPolicyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldUpdatedBy

func (m *AppPolicyMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) OldVersion

func (m *AppPolicyMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the AppPolicy entity. If the AppPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppPolicyMutation) Op

func (m *AppPolicyMutation) Op() Op

Op returns the operation name.

func (*AppPolicyMutation) RemoveAppRolePolicyIDs

func (m *AppPolicyMutation) RemoveAppRolePolicyIDs(ids ...int)

RemoveAppRolePolicyIDs removes the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppPolicyMutation) RemoveRoleIDs

func (m *AppPolicyMutation) RemoveRoleIDs(ids ...int)

RemoveRoleIDs removes the "roles" edge to the AppRole entity by IDs.

func (*AppPolicyMutation) RemovedAppRolePolicyIDs

func (m *AppPolicyMutation) RemovedAppRolePolicyIDs() (ids []int)

RemovedAppRolePolicy returns the removed IDs of the "app_role_policy" edge to the AppRolePolicy entity.

func (*AppPolicyMutation) RemovedEdges

func (m *AppPolicyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppPolicyMutation) RemovedIDs

func (m *AppPolicyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppPolicyMutation) RemovedRolesIDs

func (m *AppPolicyMutation) RemovedRolesIDs() (ids []int)

RemovedRoles returns the removed IDs of the "roles" edge to the AppRole entity.

func (*AppPolicyMutation) ResetApp

func (m *AppPolicyMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppPolicyMutation) ResetAppID

func (m *AppPolicyMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppPolicyMutation) ResetAppRolePolicy

func (m *AppPolicyMutation) ResetAppRolePolicy()

ResetAppRolePolicy resets all changes to the "app_role_policy" edge.

func (*AppPolicyMutation) ResetAutoGrant

func (m *AppPolicyMutation) ResetAutoGrant()

ResetAutoGrant resets all changes to the "auto_grant" field.

func (*AppPolicyMutation) ResetComments

func (m *AppPolicyMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppPolicyMutation) ResetCreatedAt

func (m *AppPolicyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppPolicyMutation) ResetCreatedBy

func (m *AppPolicyMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppPolicyMutation) ResetEdge

func (m *AppPolicyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppPolicyMutation) ResetField

func (m *AppPolicyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppPolicyMutation) ResetName

func (m *AppPolicyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppPolicyMutation) ResetRoles

func (m *AppPolicyMutation) ResetRoles()

ResetRoles resets all changes to the "roles" edge.

func (*AppPolicyMutation) ResetRules

func (m *AppPolicyMutation) ResetRules()

ResetRules resets all changes to the "rules" field.

func (*AppPolicyMutation) ResetStatus

func (m *AppPolicyMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*AppPolicyMutation) ResetUpdatedAt

func (m *AppPolicyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppPolicyMutation) ResetUpdatedBy

func (m *AppPolicyMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppPolicyMutation) ResetVersion

func (m *AppPolicyMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*AppPolicyMutation) RolesCleared

func (m *AppPolicyMutation) RolesCleared() bool

RolesCleared reports if the "roles" edge to the AppRole entity was cleared.

func (*AppPolicyMutation) RolesIDs

func (m *AppPolicyMutation) RolesIDs() (ids []int)

RolesIDs returns the "roles" edge IDs in the mutation.

func (*AppPolicyMutation) Rules

func (m *AppPolicyMutation) Rules() (r []*types.PolicyRule, exists bool)

Rules returns the value of the "rules" field in the mutation.

func (*AppPolicyMutation) SetAppID

func (m *AppPolicyMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppPolicyMutation) SetAutoGrant

func (m *AppPolicyMutation) SetAutoGrant(b bool)

SetAutoGrant sets the "auto_grant" field.

func (*AppPolicyMutation) SetComments

func (m *AppPolicyMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppPolicyMutation) SetCreatedAt

func (m *AppPolicyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppPolicyMutation) SetCreatedBy

func (m *AppPolicyMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppPolicyMutation) SetField

func (m *AppPolicyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppPolicyMutation) SetID

func (m *AppPolicyMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppPolicy entities.

func (*AppPolicyMutation) SetName

func (m *AppPolicyMutation) SetName(s string)

SetName sets the "name" field.

func (*AppPolicyMutation) SetOp

func (m *AppPolicyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppPolicyMutation) SetRules

func (m *AppPolicyMutation) SetRules(tr []*types.PolicyRule)

SetRules sets the "rules" field.

func (*AppPolicyMutation) SetStatus

func (m *AppPolicyMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*AppPolicyMutation) SetUpdatedAt

func (m *AppPolicyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyMutation) SetUpdatedBy

func (m *AppPolicyMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyMutation) SetVersion

func (m *AppPolicyMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*AppPolicyMutation) Status

func (m *AppPolicyMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*AppPolicyMutation) StatusCleared

func (m *AppPolicyMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (AppPolicyMutation) Tx

func (m AppPolicyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppPolicyMutation) Type

func (m *AppPolicyMutation) Type() string

Type returns the node type of this mutation (AppPolicy).

func (*AppPolicyMutation) UpdatedAt

func (m *AppPolicyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppPolicyMutation) UpdatedAtCleared

func (m *AppPolicyMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppPolicyMutation) UpdatedBy

func (m *AppPolicyMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppPolicyMutation) UpdatedByCleared

func (m *AppPolicyMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppPolicyMutation) Version

func (m *AppPolicyMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*AppPolicyMutation) Where

func (m *AppPolicyMutation) Where(ps ...predicate.AppPolicy)

Where appends a list predicates to the AppPolicyMutation builder.

func (*AppPolicyMutation) WhereP

func (m *AppPolicyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppPolicyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppPolicyOrder

type AppPolicyOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *AppPolicyOrderField `json:"field"`
}

AppPolicyOrder defines the ordering of AppPolicy.

type AppPolicyOrderField

type AppPolicyOrderField struct {
	// Value extracts the ordering value from the given AppPolicy.
	Value func(*AppPolicy) (ent.Value, error)
	// contains filtered or unexported fields
}

AppPolicyOrderField defines the ordering field of AppPolicy.

func (AppPolicyOrderField) MarshalGQL

func (f AppPolicyOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppPolicyOrderField) String

func (f AppPolicyOrderField) String() string

String implement fmt.Stringer interface.

func (*AppPolicyOrderField) UnmarshalGQL

func (f *AppPolicyOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppPolicyPaginateOption

type AppPolicyPaginateOption func(*apppolicyPager) error

AppPolicyPaginateOption enables pagination customization.

func WithAppPolicyFilter

func WithAppPolicyFilter(filter func(*AppPolicyQuery) (*AppPolicyQuery, error)) AppPolicyPaginateOption

WithAppPolicyFilter configures pagination filter.

func WithAppPolicyOrder

func WithAppPolicyOrder(order *AppPolicyOrder) AppPolicyPaginateOption

WithAppPolicyOrder configures pagination ordering.

type AppPolicyQuery

type AppPolicyQuery struct {
	// contains filtered or unexported fields
}

AppPolicyQuery is the builder for querying AppPolicy entities.

func (*AppPolicyQuery) Aggregate

func (apq *AppPolicyQuery) Aggregate(fns ...AggregateFunc) *AppPolicySelect

Aggregate returns a AppPolicySelect configured with the given aggregations.

func (*AppPolicyQuery) All

func (apq *AppPolicyQuery) All(ctx context.Context) ([]*AppPolicy, error)

All executes the query and returns a list of AppPolicies.

func (*AppPolicyQuery) AllX

func (apq *AppPolicyQuery) AllX(ctx context.Context) []*AppPolicy

AllX is like All, but panics if an error occurs.

func (*AppPolicyQuery) Clone

func (apq *AppPolicyQuery) Clone() *AppPolicyQuery

Clone returns a duplicate of the AppPolicyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppPolicyQuery) CollectFields

func (ap *AppPolicyQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppPolicyQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppPolicyQuery) Count

func (apq *AppPolicyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppPolicyQuery) CountX

func (apq *AppPolicyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppPolicyQuery) Exist

func (apq *AppPolicyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppPolicyQuery) ExistX

func (apq *AppPolicyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppPolicyQuery) First

func (apq *AppPolicyQuery) First(ctx context.Context) (*AppPolicy, error)

First returns the first AppPolicy entity from the query. Returns a *NotFoundError when no AppPolicy was found.

func (*AppPolicyQuery) FirstID

func (apq *AppPolicyQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppPolicy ID from the query. Returns a *NotFoundError when no AppPolicy ID was found.

func (*AppPolicyQuery) FirstIDX

func (apq *AppPolicyQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppPolicyQuery) FirstX

func (apq *AppPolicyQuery) FirstX(ctx context.Context) *AppPolicy

FirstX is like First, but panics if an error occurs.

func (*AppPolicyQuery) GroupBy

func (apq *AppPolicyQuery) GroupBy(field string, fields ...string) *AppPolicyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppPolicy.Query().
	GroupBy(apppolicy.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppPolicyQuery) IDs

func (apq *AppPolicyQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppPolicy IDs.

func (*AppPolicyQuery) IDsX

func (apq *AppPolicyQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppPolicyQuery) Limit

func (apq *AppPolicyQuery) Limit(limit int) *AppPolicyQuery

Limit the number of records to be returned by this query.

func (*AppPolicyQuery) Offset

func (apq *AppPolicyQuery) Offset(offset int) *AppPolicyQuery

Offset to start from.

func (*AppPolicyQuery) Only

func (apq *AppPolicyQuery) Only(ctx context.Context) (*AppPolicy, error)

Only returns a single AppPolicy entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppPolicy entity is found. Returns a *NotFoundError when no AppPolicy entities are found.

func (*AppPolicyQuery) OnlyID

func (apq *AppPolicyQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppPolicy ID in the query. Returns a *NotSingularError when more than one AppPolicy ID is found. Returns a *NotFoundError when no entities are found.

func (*AppPolicyQuery) OnlyIDX

func (apq *AppPolicyQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppPolicyQuery) OnlyX

func (apq *AppPolicyQuery) OnlyX(ctx context.Context) *AppPolicy

OnlyX is like Only, but panics if an error occurs.

func (*AppPolicyQuery) Order

Order specifies how the records should be ordered.

func (*AppPolicyQuery) Paginate

func (ap *AppPolicyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppPolicyPaginateOption,
) (*AppPolicyConnection, error)

Paginate executes the query and returns a relay based cursor connection to AppPolicy.

func (*AppPolicyQuery) QueryApp

func (apq *AppPolicyQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*AppPolicyQuery) QueryAppRolePolicy

func (apq *AppPolicyQuery) QueryAppRolePolicy() *AppRolePolicyQuery

QueryAppRolePolicy chains the current query on the "app_role_policy" edge.

func (*AppPolicyQuery) QueryRoles

func (apq *AppPolicyQuery) QueryRoles() *AppRoleQuery

QueryRoles chains the current query on the "roles" edge.

func (*AppPolicyQuery) Select

func (apq *AppPolicyQuery) Select(fields ...string) *AppPolicySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppPolicy.Query().
	Select(apppolicy.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppPolicyQuery) Unique

func (apq *AppPolicyQuery) Unique(unique bool) *AppPolicyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppPolicyQuery) Where

func (apq *AppPolicyQuery) Where(ps ...predicate.AppPolicy) *AppPolicyQuery

Where adds a new predicate for the AppPolicyQuery builder.

func (*AppPolicyQuery) WithApp

func (apq *AppPolicyQuery) WithApp(opts ...func(*AppQuery)) *AppPolicyQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppPolicyQuery) WithAppRolePolicy

func (apq *AppPolicyQuery) WithAppRolePolicy(opts ...func(*AppRolePolicyQuery)) *AppPolicyQuery

WithAppRolePolicy tells the query-builder to eager-load the nodes that are connected to the "app_role_policy" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppPolicyQuery) WithNamedAppRolePolicy

func (apq *AppPolicyQuery) WithNamedAppRolePolicy(name string, opts ...func(*AppRolePolicyQuery)) *AppPolicyQuery

WithNamedAppRolePolicy tells the query-builder to eager-load the nodes that are connected to the "app_role_policy" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppPolicyQuery) WithNamedRoles

func (apq *AppPolicyQuery) WithNamedRoles(name string, opts ...func(*AppRoleQuery)) *AppPolicyQuery

WithNamedRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppPolicyQuery) WithRoles

func (apq *AppPolicyQuery) WithRoles(opts ...func(*AppRoleQuery)) *AppPolicyQuery

WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.

type AppPolicySelect

type AppPolicySelect struct {
	*AppPolicyQuery
	// contains filtered or unexported fields
}

AppPolicySelect is the builder for selecting fields of AppPolicy entities.

func (*AppPolicySelect) Aggregate

func (aps *AppPolicySelect) Aggregate(fns ...AggregateFunc) *AppPolicySelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppPolicySelect) Bool

func (s *AppPolicySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) BoolX

func (s *AppPolicySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppPolicySelect) Bools

func (s *AppPolicySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) BoolsX

func (s *AppPolicySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppPolicySelect) Float64

func (s *AppPolicySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) Float64X

func (s *AppPolicySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppPolicySelect) Float64s

func (s *AppPolicySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) Float64sX

func (s *AppPolicySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppPolicySelect) Int

func (s *AppPolicySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) IntX

func (s *AppPolicySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppPolicySelect) Ints

func (s *AppPolicySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) IntsX

func (s *AppPolicySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppPolicySelect) Scan

func (aps *AppPolicySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppPolicySelect) ScanX

func (s *AppPolicySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppPolicySelect) String

func (s *AppPolicySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) StringX

func (s *AppPolicySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppPolicySelect) Strings

func (s *AppPolicySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppPolicySelect) StringsX

func (s *AppPolicySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppPolicyUpdate

type AppPolicyUpdate struct {
	// contains filtered or unexported fields
}

AppPolicyUpdate is the builder for updating AppPolicy entities.

func (*AppPolicyUpdate) AddAppRolePolicy

func (apu *AppPolicyUpdate) AddAppRolePolicy(a ...*AppRolePolicy) *AppPolicyUpdate

AddAppRolePolicy adds the "app_role_policy" edges to the AppRolePolicy entity.

func (*AppPolicyUpdate) AddAppRolePolicyIDs

func (apu *AppPolicyUpdate) AddAppRolePolicyIDs(ids ...int) *AppPolicyUpdate

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppPolicyUpdate) AddRoleIDs

func (apu *AppPolicyUpdate) AddRoleIDs(ids ...int) *AppPolicyUpdate

AddRoleIDs adds the "roles" edge to the AppRole entity by IDs.

func (*AppPolicyUpdate) AddRoles

func (apu *AppPolicyUpdate) AddRoles(a ...*AppRole) *AppPolicyUpdate

AddRoles adds the "roles" edges to the AppRole entity.

func (*AppPolicyUpdate) AddUpdatedBy

func (apu *AppPolicyUpdate) AddUpdatedBy(i int) *AppPolicyUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppPolicyUpdate) AppendRules

func (apu *AppPolicyUpdate) AppendRules(tr []*types.PolicyRule) *AppPolicyUpdate

AppendRules appends tr to the "rules" field.

func (*AppPolicyUpdate) ClearAppRolePolicy

func (apu *AppPolicyUpdate) ClearAppRolePolicy() *AppPolicyUpdate

ClearAppRolePolicy clears all "app_role_policy" edges to the AppRolePolicy entity.

func (*AppPolicyUpdate) ClearComments

func (apu *AppPolicyUpdate) ClearComments() *AppPolicyUpdate

ClearComments clears the value of the "comments" field.

func (*AppPolicyUpdate) ClearRoles

func (apu *AppPolicyUpdate) ClearRoles() *AppPolicyUpdate

ClearRoles clears all "roles" edges to the AppRole entity.

func (*AppPolicyUpdate) ClearStatus

func (apu *AppPolicyUpdate) ClearStatus() *AppPolicyUpdate

ClearStatus clears the value of the "status" field.

func (*AppPolicyUpdate) ClearUpdatedAt

func (apu *AppPolicyUpdate) ClearUpdatedAt() *AppPolicyUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyUpdate) ClearUpdatedBy

func (apu *AppPolicyUpdate) ClearUpdatedBy() *AppPolicyUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyUpdate) Exec

func (apu *AppPolicyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPolicyUpdate) ExecX

func (apu *AppPolicyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyUpdate) Mutation

func (apu *AppPolicyUpdate) Mutation() *AppPolicyMutation

Mutation returns the AppPolicyMutation object of the builder.

func (*AppPolicyUpdate) RemoveAppRolePolicy

func (apu *AppPolicyUpdate) RemoveAppRolePolicy(a ...*AppRolePolicy) *AppPolicyUpdate

RemoveAppRolePolicy removes "app_role_policy" edges to AppRolePolicy entities.

func (*AppPolicyUpdate) RemoveAppRolePolicyIDs

func (apu *AppPolicyUpdate) RemoveAppRolePolicyIDs(ids ...int) *AppPolicyUpdate

RemoveAppRolePolicyIDs removes the "app_role_policy" edge to AppRolePolicy entities by IDs.

func (*AppPolicyUpdate) RemoveRoleIDs

func (apu *AppPolicyUpdate) RemoveRoleIDs(ids ...int) *AppPolicyUpdate

RemoveRoleIDs removes the "roles" edge to AppRole entities by IDs.

func (*AppPolicyUpdate) RemoveRoles

func (apu *AppPolicyUpdate) RemoveRoles(a ...*AppRole) *AppPolicyUpdate

RemoveRoles removes "roles" edges to AppRole entities.

func (*AppPolicyUpdate) Save

func (apu *AppPolicyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppPolicyUpdate) SaveX

func (apu *AppPolicyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppPolicyUpdate) SetAutoGrant

func (apu *AppPolicyUpdate) SetAutoGrant(b bool) *AppPolicyUpdate

SetAutoGrant sets the "auto_grant" field.

func (*AppPolicyUpdate) SetComments

func (apu *AppPolicyUpdate) SetComments(s string) *AppPolicyUpdate

SetComments sets the "comments" field.

func (*AppPolicyUpdate) SetInput

SetInput applies the change-set in the UpdateAppPolicyInput on the AppPolicyUpdate builder.

func (*AppPolicyUpdate) SetName

func (apu *AppPolicyUpdate) SetName(s string) *AppPolicyUpdate

SetName sets the "name" field.

func (*AppPolicyUpdate) SetNillableAutoGrant

func (apu *AppPolicyUpdate) SetNillableAutoGrant(b *bool) *AppPolicyUpdate

SetNillableAutoGrant sets the "auto_grant" field if the given value is not nil.

func (*AppPolicyUpdate) SetNillableComments

func (apu *AppPolicyUpdate) SetNillableComments(s *string) *AppPolicyUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppPolicyUpdate) SetNillableStatus

func (apu *AppPolicyUpdate) SetNillableStatus(ts *typex.SimpleStatus) *AppPolicyUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppPolicyUpdate) SetNillableUpdatedAt

func (apu *AppPolicyUpdate) SetNillableUpdatedAt(t *time.Time) *AppPolicyUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppPolicyUpdate) SetNillableUpdatedBy

func (apu *AppPolicyUpdate) SetNillableUpdatedBy(i *int) *AppPolicyUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppPolicyUpdate) SetNillableVersion

func (apu *AppPolicyUpdate) SetNillableVersion(s *string) *AppPolicyUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*AppPolicyUpdate) SetRules

func (apu *AppPolicyUpdate) SetRules(tr []*types.PolicyRule) *AppPolicyUpdate

SetRules sets the "rules" field.

func (*AppPolicyUpdate) SetStatus

func (apu *AppPolicyUpdate) SetStatus(ts typex.SimpleStatus) *AppPolicyUpdate

SetStatus sets the "status" field.

func (*AppPolicyUpdate) SetUpdatedAt

func (apu *AppPolicyUpdate) SetUpdatedAt(t time.Time) *AppPolicyUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyUpdate) SetUpdatedBy

func (apu *AppPolicyUpdate) SetUpdatedBy(i int) *AppPolicyUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyUpdate) SetVersion

func (apu *AppPolicyUpdate) SetVersion(s string) *AppPolicyUpdate

SetVersion sets the "version" field.

func (*AppPolicyUpdate) Where

Where appends a list predicates to the AppPolicyUpdate builder.

type AppPolicyUpdateOne

type AppPolicyUpdateOne struct {
	// contains filtered or unexported fields
}

AppPolicyUpdateOne is the builder for updating a single AppPolicy entity.

func (*AppPolicyUpdateOne) AddAppRolePolicy

func (apuo *AppPolicyUpdateOne) AddAppRolePolicy(a ...*AppRolePolicy) *AppPolicyUpdateOne

AddAppRolePolicy adds the "app_role_policy" edges to the AppRolePolicy entity.

func (*AppPolicyUpdateOne) AddAppRolePolicyIDs

func (apuo *AppPolicyUpdateOne) AddAppRolePolicyIDs(ids ...int) *AppPolicyUpdateOne

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppPolicyUpdateOne) AddRoleIDs

func (apuo *AppPolicyUpdateOne) AddRoleIDs(ids ...int) *AppPolicyUpdateOne

AddRoleIDs adds the "roles" edge to the AppRole entity by IDs.

func (*AppPolicyUpdateOne) AddRoles

func (apuo *AppPolicyUpdateOne) AddRoles(a ...*AppRole) *AppPolicyUpdateOne

AddRoles adds the "roles" edges to the AppRole entity.

func (*AppPolicyUpdateOne) AddUpdatedBy

func (apuo *AppPolicyUpdateOne) AddUpdatedBy(i int) *AppPolicyUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppPolicyUpdateOne) AppendRules

func (apuo *AppPolicyUpdateOne) AppendRules(tr []*types.PolicyRule) *AppPolicyUpdateOne

AppendRules appends tr to the "rules" field.

func (*AppPolicyUpdateOne) ClearAppRolePolicy

func (apuo *AppPolicyUpdateOne) ClearAppRolePolicy() *AppPolicyUpdateOne

ClearAppRolePolicy clears all "app_role_policy" edges to the AppRolePolicy entity.

func (*AppPolicyUpdateOne) ClearComments

func (apuo *AppPolicyUpdateOne) ClearComments() *AppPolicyUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppPolicyUpdateOne) ClearRoles

func (apuo *AppPolicyUpdateOne) ClearRoles() *AppPolicyUpdateOne

ClearRoles clears all "roles" edges to the AppRole entity.

func (*AppPolicyUpdateOne) ClearStatus

func (apuo *AppPolicyUpdateOne) ClearStatus() *AppPolicyUpdateOne

ClearStatus clears the value of the "status" field.

func (*AppPolicyUpdateOne) ClearUpdatedAt

func (apuo *AppPolicyUpdateOne) ClearUpdatedAt() *AppPolicyUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyUpdateOne) ClearUpdatedBy

func (apuo *AppPolicyUpdateOne) ClearUpdatedBy() *AppPolicyUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyUpdateOne) Exec

func (apuo *AppPolicyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppPolicyUpdateOne) ExecX

func (apuo *AppPolicyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyUpdateOne) Mutation

func (apuo *AppPolicyUpdateOne) Mutation() *AppPolicyMutation

Mutation returns the AppPolicyMutation object of the builder.

func (*AppPolicyUpdateOne) RemoveAppRolePolicy

func (apuo *AppPolicyUpdateOne) RemoveAppRolePolicy(a ...*AppRolePolicy) *AppPolicyUpdateOne

RemoveAppRolePolicy removes "app_role_policy" edges to AppRolePolicy entities.

func (*AppPolicyUpdateOne) RemoveAppRolePolicyIDs

func (apuo *AppPolicyUpdateOne) RemoveAppRolePolicyIDs(ids ...int) *AppPolicyUpdateOne

RemoveAppRolePolicyIDs removes the "app_role_policy" edge to AppRolePolicy entities by IDs.

func (*AppPolicyUpdateOne) RemoveRoleIDs

func (apuo *AppPolicyUpdateOne) RemoveRoleIDs(ids ...int) *AppPolicyUpdateOne

RemoveRoleIDs removes the "roles" edge to AppRole entities by IDs.

func (*AppPolicyUpdateOne) RemoveRoles

func (apuo *AppPolicyUpdateOne) RemoveRoles(a ...*AppRole) *AppPolicyUpdateOne

RemoveRoles removes "roles" edges to AppRole entities.

func (*AppPolicyUpdateOne) Save

func (apuo *AppPolicyUpdateOne) Save(ctx context.Context) (*AppPolicy, error)

Save executes the query and returns the updated AppPolicy entity.

func (*AppPolicyUpdateOne) SaveX

func (apuo *AppPolicyUpdateOne) SaveX(ctx context.Context) *AppPolicy

SaveX is like Save, but panics if an error occurs.

func (*AppPolicyUpdateOne) Select

func (apuo *AppPolicyUpdateOne) Select(field string, fields ...string) *AppPolicyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppPolicyUpdateOne) SetAutoGrant

func (apuo *AppPolicyUpdateOne) SetAutoGrant(b bool) *AppPolicyUpdateOne

SetAutoGrant sets the "auto_grant" field.

func (*AppPolicyUpdateOne) SetComments

func (apuo *AppPolicyUpdateOne) SetComments(s string) *AppPolicyUpdateOne

SetComments sets the "comments" field.

func (*AppPolicyUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppPolicyInput on the AppPolicyUpdateOne builder.

func (*AppPolicyUpdateOne) SetName

func (apuo *AppPolicyUpdateOne) SetName(s string) *AppPolicyUpdateOne

SetName sets the "name" field.

func (*AppPolicyUpdateOne) SetNillableAutoGrant

func (apuo *AppPolicyUpdateOne) SetNillableAutoGrant(b *bool) *AppPolicyUpdateOne

SetNillableAutoGrant sets the "auto_grant" field if the given value is not nil.

func (*AppPolicyUpdateOne) SetNillableComments

func (apuo *AppPolicyUpdateOne) SetNillableComments(s *string) *AppPolicyUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppPolicyUpdateOne) SetNillableStatus

func (apuo *AppPolicyUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *AppPolicyUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppPolicyUpdateOne) SetNillableUpdatedAt

func (apuo *AppPolicyUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppPolicyUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppPolicyUpdateOne) SetNillableUpdatedBy

func (apuo *AppPolicyUpdateOne) SetNillableUpdatedBy(i *int) *AppPolicyUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppPolicyUpdateOne) SetNillableVersion

func (apuo *AppPolicyUpdateOne) SetNillableVersion(s *string) *AppPolicyUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*AppPolicyUpdateOne) SetRules

func (apuo *AppPolicyUpdateOne) SetRules(tr []*types.PolicyRule) *AppPolicyUpdateOne

SetRules sets the "rules" field.

func (*AppPolicyUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*AppPolicyUpdateOne) SetUpdatedAt

func (apuo *AppPolicyUpdateOne) SetUpdatedAt(t time.Time) *AppPolicyUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyUpdateOne) SetUpdatedBy

func (apuo *AppPolicyUpdateOne) SetUpdatedBy(i int) *AppPolicyUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyUpdateOne) SetVersion

func (apuo *AppPolicyUpdateOne) SetVersion(s string) *AppPolicyUpdateOne

SetVersion sets the "version" field.

func (*AppPolicyUpdateOne) Where

Where appends a list predicates to the AppPolicyUpdate builder.

type AppPolicyUpsert

type AppPolicyUpsert struct {
	*sql.UpdateSet
}

AppPolicyUpsert is the "OnConflict" setter.

func (*AppPolicyUpsert) AddUpdatedBy

func (u *AppPolicyUpsert) AddUpdatedBy(v int) *AppPolicyUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppPolicyUpsert) ClearComments

func (u *AppPolicyUpsert) ClearComments() *AppPolicyUpsert

ClearComments clears the value of the "comments" field.

func (*AppPolicyUpsert) ClearStatus

func (u *AppPolicyUpsert) ClearStatus() *AppPolicyUpsert

ClearStatus clears the value of the "status" field.

func (*AppPolicyUpsert) ClearUpdatedAt

func (u *AppPolicyUpsert) ClearUpdatedAt() *AppPolicyUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyUpsert) ClearUpdatedBy

func (u *AppPolicyUpsert) ClearUpdatedBy() *AppPolicyUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyUpsert) SetAutoGrant

func (u *AppPolicyUpsert) SetAutoGrant(v bool) *AppPolicyUpsert

SetAutoGrant sets the "auto_grant" field.

func (*AppPolicyUpsert) SetComments

func (u *AppPolicyUpsert) SetComments(v string) *AppPolicyUpsert

SetComments sets the "comments" field.

func (*AppPolicyUpsert) SetName

func (u *AppPolicyUpsert) SetName(v string) *AppPolicyUpsert

SetName sets the "name" field.

func (*AppPolicyUpsert) SetRules

func (u *AppPolicyUpsert) SetRules(v []*types.PolicyRule) *AppPolicyUpsert

SetRules sets the "rules" field.

func (*AppPolicyUpsert) SetStatus

SetStatus sets the "status" field.

func (*AppPolicyUpsert) SetUpdatedAt

func (u *AppPolicyUpsert) SetUpdatedAt(v time.Time) *AppPolicyUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyUpsert) SetUpdatedBy

func (u *AppPolicyUpsert) SetUpdatedBy(v int) *AppPolicyUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyUpsert) SetVersion

func (u *AppPolicyUpsert) SetVersion(v string) *AppPolicyUpsert

SetVersion sets the "version" field.

func (*AppPolicyUpsert) UpdateAutoGrant

func (u *AppPolicyUpsert) UpdateAutoGrant() *AppPolicyUpsert

UpdateAutoGrant sets the "auto_grant" field to the value that was provided on create.

func (*AppPolicyUpsert) UpdateComments

func (u *AppPolicyUpsert) UpdateComments() *AppPolicyUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppPolicyUpsert) UpdateName

func (u *AppPolicyUpsert) UpdateName() *AppPolicyUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppPolicyUpsert) UpdateRules

func (u *AppPolicyUpsert) UpdateRules() *AppPolicyUpsert

UpdateRules sets the "rules" field to the value that was provided on create.

func (*AppPolicyUpsert) UpdateStatus

func (u *AppPolicyUpsert) UpdateStatus() *AppPolicyUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppPolicyUpsert) UpdateUpdatedAt

func (u *AppPolicyUpsert) UpdateUpdatedAt() *AppPolicyUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppPolicyUpsert) UpdateUpdatedBy

func (u *AppPolicyUpsert) UpdateUpdatedBy() *AppPolicyUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*AppPolicyUpsert) UpdateVersion

func (u *AppPolicyUpsert) UpdateVersion() *AppPolicyUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type AppPolicyUpsertBulk

type AppPolicyUpsertBulk struct {
	// contains filtered or unexported fields
}

AppPolicyUpsertBulk is the builder for "upsert"-ing a bulk of AppPolicy nodes.

func (*AppPolicyUpsertBulk) AddUpdatedBy

func (u *AppPolicyUpsertBulk) AddUpdatedBy(v int) *AppPolicyUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppPolicyUpsertBulk) ClearComments

func (u *AppPolicyUpsertBulk) ClearComments() *AppPolicyUpsertBulk

ClearComments clears the value of the "comments" field.

func (*AppPolicyUpsertBulk) ClearStatus

func (u *AppPolicyUpsertBulk) ClearStatus() *AppPolicyUpsertBulk

ClearStatus clears the value of the "status" field.

func (*AppPolicyUpsertBulk) ClearUpdatedAt

func (u *AppPolicyUpsertBulk) ClearUpdatedAt() *AppPolicyUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyUpsertBulk) ClearUpdatedBy

func (u *AppPolicyUpsertBulk) ClearUpdatedBy() *AppPolicyUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyUpsertBulk) DoNothing

func (u *AppPolicyUpsertBulk) DoNothing() *AppPolicyUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppPolicyUpsertBulk) Exec

Exec executes the query.

func (*AppPolicyUpsertBulk) ExecX

func (u *AppPolicyUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppPolicy.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppPolicyUpsertBulk) SetAutoGrant

func (u *AppPolicyUpsertBulk) SetAutoGrant(v bool) *AppPolicyUpsertBulk

SetAutoGrant sets the "auto_grant" field.

func (*AppPolicyUpsertBulk) SetComments

func (u *AppPolicyUpsertBulk) SetComments(v string) *AppPolicyUpsertBulk

SetComments sets the "comments" field.

func (*AppPolicyUpsertBulk) SetName

SetName sets the "name" field.

func (*AppPolicyUpsertBulk) SetRules

SetRules sets the "rules" field.

func (*AppPolicyUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*AppPolicyUpsertBulk) SetUpdatedAt

func (u *AppPolicyUpsertBulk) SetUpdatedAt(v time.Time) *AppPolicyUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyUpsertBulk) SetUpdatedBy

func (u *AppPolicyUpsertBulk) SetUpdatedBy(v int) *AppPolicyUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyUpsertBulk) SetVersion

SetVersion sets the "version" field.

func (*AppPolicyUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the AppPolicyCreateBulk.OnConflict documentation for more info.

func (*AppPolicyUpsertBulk) UpdateAutoGrant

func (u *AppPolicyUpsertBulk) UpdateAutoGrant() *AppPolicyUpsertBulk

UpdateAutoGrant sets the "auto_grant" field to the value that was provided on create.

func (*AppPolicyUpsertBulk) UpdateComments

func (u *AppPolicyUpsertBulk) UpdateComments() *AppPolicyUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppPolicyUpsertBulk) UpdateName

func (u *AppPolicyUpsertBulk) UpdateName() *AppPolicyUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppPolicyUpsertBulk) UpdateNewValues

func (u *AppPolicyUpsertBulk) UpdateNewValues() *AppPolicyUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppPolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apppolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*AppPolicyUpsertBulk) UpdateRules

func (u *AppPolicyUpsertBulk) UpdateRules() *AppPolicyUpsertBulk

UpdateRules sets the "rules" field to the value that was provided on create.

func (*AppPolicyUpsertBulk) UpdateStatus

func (u *AppPolicyUpsertBulk) UpdateStatus() *AppPolicyUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppPolicyUpsertBulk) UpdateUpdatedAt

func (u *AppPolicyUpsertBulk) UpdateUpdatedAt() *AppPolicyUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppPolicyUpsertBulk) UpdateUpdatedBy

func (u *AppPolicyUpsertBulk) UpdateUpdatedBy() *AppPolicyUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*AppPolicyUpsertBulk) UpdateVersion

func (u *AppPolicyUpsertBulk) UpdateVersion() *AppPolicyUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

type AppPolicyUpsertOne

type AppPolicyUpsertOne struct {
	// contains filtered or unexported fields
}

AppPolicyUpsertOne is the builder for "upsert"-ing

one AppPolicy node.

func (*AppPolicyUpsertOne) AddUpdatedBy

func (u *AppPolicyUpsertOne) AddUpdatedBy(v int) *AppPolicyUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppPolicyUpsertOne) ClearComments

func (u *AppPolicyUpsertOne) ClearComments() *AppPolicyUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppPolicyUpsertOne) ClearStatus

func (u *AppPolicyUpsertOne) ClearStatus() *AppPolicyUpsertOne

ClearStatus clears the value of the "status" field.

func (*AppPolicyUpsertOne) ClearUpdatedAt

func (u *AppPolicyUpsertOne) ClearUpdatedAt() *AppPolicyUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyUpsertOne) ClearUpdatedBy

func (u *AppPolicyUpsertOne) ClearUpdatedBy() *AppPolicyUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyUpsertOne) DoNothing

func (u *AppPolicyUpsertOne) DoNothing() *AppPolicyUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppPolicyUpsertOne) Exec

func (u *AppPolicyUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPolicyUpsertOne) ExecX

func (u *AppPolicyUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppPolicyUpsertOne) ID

func (u *AppPolicyUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppPolicyUpsertOne) IDX

func (u *AppPolicyUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*AppPolicyUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppPolicy.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppPolicyUpsertOne) SetAutoGrant

func (u *AppPolicyUpsertOne) SetAutoGrant(v bool) *AppPolicyUpsertOne

SetAutoGrant sets the "auto_grant" field.

func (*AppPolicyUpsertOne) SetComments

func (u *AppPolicyUpsertOne) SetComments(v string) *AppPolicyUpsertOne

SetComments sets the "comments" field.

func (*AppPolicyUpsertOne) SetName

SetName sets the "name" field.

func (*AppPolicyUpsertOne) SetRules

SetRules sets the "rules" field.

func (*AppPolicyUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*AppPolicyUpsertOne) SetUpdatedAt

func (u *AppPolicyUpsertOne) SetUpdatedAt(v time.Time) *AppPolicyUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyUpsertOne) SetUpdatedBy

func (u *AppPolicyUpsertOne) SetUpdatedBy(v int) *AppPolicyUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyUpsertOne) SetVersion

func (u *AppPolicyUpsertOne) SetVersion(v string) *AppPolicyUpsertOne

SetVersion sets the "version" field.

func (*AppPolicyUpsertOne) Update

func (u *AppPolicyUpsertOne) Update(set func(*AppPolicyUpsert)) *AppPolicyUpsertOne

Update allows overriding fields `UPDATE` values. See the AppPolicyCreate.OnConflict documentation for more info.

func (*AppPolicyUpsertOne) UpdateAutoGrant

func (u *AppPolicyUpsertOne) UpdateAutoGrant() *AppPolicyUpsertOne

UpdateAutoGrant sets the "auto_grant" field to the value that was provided on create.

func (*AppPolicyUpsertOne) UpdateComments

func (u *AppPolicyUpsertOne) UpdateComments() *AppPolicyUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppPolicyUpsertOne) UpdateName

func (u *AppPolicyUpsertOne) UpdateName() *AppPolicyUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppPolicyUpsertOne) UpdateNewValues

func (u *AppPolicyUpsertOne) UpdateNewValues() *AppPolicyUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppPolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apppolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*AppPolicyUpsertOne) UpdateRules

func (u *AppPolicyUpsertOne) UpdateRules() *AppPolicyUpsertOne

UpdateRules sets the "rules" field to the value that was provided on create.

func (*AppPolicyUpsertOne) UpdateStatus

func (u *AppPolicyUpsertOne) UpdateStatus() *AppPolicyUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppPolicyUpsertOne) UpdateUpdatedAt

func (u *AppPolicyUpsertOne) UpdateUpdatedAt() *AppPolicyUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppPolicyUpsertOne) UpdateUpdatedBy

func (u *AppPolicyUpsertOne) UpdateUpdatedBy() *AppPolicyUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*AppPolicyUpsertOne) UpdateVersion

func (u *AppPolicyUpsertOne) UpdateVersion() *AppPolicyUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

type AppPolicyWhereInput

type AppPolicyWhereInput struct {
	Predicates []predicate.AppPolicy  `json:"-"`
	Not        *AppPolicyWhereInput   `json:"not,omitempty"`
	Or         []*AppPolicyWhereInput `json:"or,omitempty"`
	And        []*AppPolicyWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_id" field predicates.
	AppID       *int  `json:"appID,omitempty"`
	AppIDNEQ    *int  `json:"appIDNEQ,omitempty"`
	AppIDIn     []int `json:"appIDIn,omitempty"`
	AppIDNotIn  []int `json:"appIDNotIn,omitempty"`
	AppIDIsNil  bool  `json:"appIDIsNil,omitempty"`
	AppIDNotNil bool  `json:"appIDNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "comments" field predicates.
	Comments             *string  `json:"comments,omitempty"`
	CommentsNEQ          *string  `json:"commentsNEQ,omitempty"`
	CommentsIn           []string `json:"commentsIn,omitempty"`
	CommentsNotIn        []string `json:"commentsNotIn,omitempty"`
	CommentsGT           *string  `json:"commentsGT,omitempty"`
	CommentsGTE          *string  `json:"commentsGTE,omitempty"`
	CommentsLT           *string  `json:"commentsLT,omitempty"`
	CommentsLTE          *string  `json:"commentsLTE,omitempty"`
	CommentsContains     *string  `json:"commentsContains,omitempty"`
	CommentsHasPrefix    *string  `json:"commentsHasPrefix,omitempty"`
	CommentsHasSuffix    *string  `json:"commentsHasSuffix,omitempty"`
	CommentsIsNil        bool     `json:"commentsIsNil,omitempty"`
	CommentsNotNil       bool     `json:"commentsNotNil,omitempty"`
	CommentsEqualFold    *string  `json:"commentsEqualFold,omitempty"`
	CommentsContainsFold *string  `json:"commentsContainsFold,omitempty"`

	// "auto_grant" field predicates.
	AutoGrant    *bool `json:"autoGrant,omitempty"`
	AutoGrantNEQ *bool `json:"autoGrantNEQ,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "app" edge predicates.
	HasApp     *bool            `json:"hasApp,omitempty"`
	HasAppWith []*AppWhereInput `json:"hasAppWith,omitempty"`

	// "roles" edge predicates.
	HasRoles     *bool                `json:"hasRoles,omitempty"`
	HasRolesWith []*AppRoleWhereInput `json:"hasRolesWith,omitempty"`

	// "app_role_policy" edge predicates.
	HasAppRolePolicy     *bool                      `json:"hasAppRolePolicy,omitempty"`
	HasAppRolePolicyWith []*AppRolePolicyWhereInput `json:"hasAppRolePolicyWith,omitempty"`
}

AppPolicyWhereInput represents a where input for filtering AppPolicy queries.

func (*AppPolicyWhereInput) AddPredicates

func (i *AppPolicyWhereInput) AddPredicates(predicates ...predicate.AppPolicy)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppPolicyWhereInput) Filter

Filter applies the AppPolicyWhereInput filter on the AppPolicyQuery builder.

func (*AppPolicyWhereInput) P

P returns a predicate for filtering apppolicies. An error is returned if the input is empty or invalid.

type AppQuery

type AppQuery struct {
	// contains filtered or unexported fields
}

AppQuery is the builder for querying App entities.

func (*AppQuery) Aggregate

func (aq *AppQuery) Aggregate(fns ...AggregateFunc) *AppSelect

Aggregate returns a AppSelect configured with the given aggregations.

func (*AppQuery) All

func (aq *AppQuery) All(ctx context.Context) ([]*App, error)

All executes the query and returns a list of Apps.

func (*AppQuery) AllX

func (aq *AppQuery) AllX(ctx context.Context) []*App

AllX is like All, but panics if an error occurs.

func (*AppQuery) Clone

func (aq *AppQuery) Clone() *AppQuery

Clone returns a duplicate of the AppQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppQuery) CollectFields

func (a *AppQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppQuery) Count

func (aq *AppQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppQuery) CountX

func (aq *AppQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppQuery) Exist

func (aq *AppQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppQuery) ExistX

func (aq *AppQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppQuery) First

func (aq *AppQuery) First(ctx context.Context) (*App, error)

First returns the first App entity from the query. Returns a *NotFoundError when no App was found.

func (*AppQuery) FirstID

func (aq *AppQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first App ID from the query. Returns a *NotFoundError when no App ID was found.

func (*AppQuery) FirstIDX

func (aq *AppQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppQuery) FirstX

func (aq *AppQuery) FirstX(ctx context.Context) *App

FirstX is like First, but panics if an error occurs.

func (*AppQuery) GroupBy

func (aq *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.App.Query().
	GroupBy(app.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppQuery) IDs

func (aq *AppQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of App IDs.

func (*AppQuery) IDsX

func (aq *AppQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppQuery) Limit

func (aq *AppQuery) Limit(limit int) *AppQuery

Limit the number of records to be returned by this query.

func (*AppQuery) Offset

func (aq *AppQuery) Offset(offset int) *AppQuery

Offset to start from.

func (*AppQuery) Only

func (aq *AppQuery) Only(ctx context.Context) (*App, error)

Only returns a single App entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one App entity is found. Returns a *NotFoundError when no App entities are found.

func (*AppQuery) OnlyID

func (aq *AppQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only App ID in the query. Returns a *NotSingularError when more than one App ID is found. Returns a *NotFoundError when no entities are found.

func (*AppQuery) OnlyIDX

func (aq *AppQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppQuery) OnlyX

func (aq *AppQuery) OnlyX(ctx context.Context) *App

OnlyX is like Only, but panics if an error occurs.

func (*AppQuery) Order

func (aq *AppQuery) Order(o ...app.OrderOption) *AppQuery

Order specifies how the records should be ordered.

func (*AppQuery) Paginate

func (a *AppQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppPaginateOption,
) (*AppConnection, error)

Paginate executes the query and returns a relay based cursor connection to App.

func (*AppQuery) QueryActions

func (aq *AppQuery) QueryActions() *AppActionQuery

QueryActions chains the current query on the "actions" edge.

func (*AppQuery) QueryDicts

func (aq *AppQuery) QueryDicts() *AppDictQuery

QueryDicts chains the current query on the "dicts" edge.

func (*AppQuery) QueryMenus

func (aq *AppQuery) QueryMenus() *AppMenuQuery

QueryMenus chains the current query on the "menus" edge.

func (*AppQuery) QueryOrgApp

func (aq *AppQuery) QueryOrgApp() *OrgAppQuery

QueryOrgApp chains the current query on the "org_app" edge.

func (*AppQuery) QueryOrgs

func (aq *AppQuery) QueryOrgs() *OrgQuery

QueryOrgs chains the current query on the "orgs" edge.

func (*AppQuery) QueryPolicies

func (aq *AppQuery) QueryPolicies() *AppPolicyQuery

QueryPolicies chains the current query on the "policies" edge.

func (*AppQuery) QueryResources

func (aq *AppQuery) QueryResources() *AppResQuery

QueryResources chains the current query on the "resources" edge.

func (*AppQuery) QueryRoles

func (aq *AppQuery) QueryRoles() *AppRoleQuery

QueryRoles chains the current query on the "roles" edge.

func (*AppQuery) Select

func (aq *AppQuery) Select(fields ...string) *AppSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.App.Query().
	Select(app.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppQuery) Unique

func (aq *AppQuery) Unique(unique bool) *AppQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppQuery) Where

func (aq *AppQuery) Where(ps ...predicate.App) *AppQuery

Where adds a new predicate for the AppQuery builder.

func (*AppQuery) WithActions

func (aq *AppQuery) WithActions(opts ...func(*AppActionQuery)) *AppQuery

WithActions tells the query-builder to eager-load the nodes that are connected to the "actions" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithDicts

func (aq *AppQuery) WithDicts(opts ...func(*AppDictQuery)) *AppQuery

WithDicts tells the query-builder to eager-load the nodes that are connected to the "dicts" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithMenus

func (aq *AppQuery) WithMenus(opts ...func(*AppMenuQuery)) *AppQuery

WithMenus tells the query-builder to eager-load the nodes that are connected to the "menus" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedActions

func (aq *AppQuery) WithNamedActions(name string, opts ...func(*AppActionQuery)) *AppQuery

WithNamedActions tells the query-builder to eager-load the nodes that are connected to the "actions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedDicts

func (aq *AppQuery) WithNamedDicts(name string, opts ...func(*AppDictQuery)) *AppQuery

WithNamedDicts tells the query-builder to eager-load the nodes that are connected to the "dicts" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedMenus

func (aq *AppQuery) WithNamedMenus(name string, opts ...func(*AppMenuQuery)) *AppQuery

WithNamedMenus tells the query-builder to eager-load the nodes that are connected to the "menus" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedOrgApp

func (aq *AppQuery) WithNamedOrgApp(name string, opts ...func(*OrgAppQuery)) *AppQuery

WithNamedOrgApp tells the query-builder to eager-load the nodes that are connected to the "org_app" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedOrgs

func (aq *AppQuery) WithNamedOrgs(name string, opts ...func(*OrgQuery)) *AppQuery

WithNamedOrgs tells the query-builder to eager-load the nodes that are connected to the "orgs" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedPolicies

func (aq *AppQuery) WithNamedPolicies(name string, opts ...func(*AppPolicyQuery)) *AppQuery

WithNamedPolicies tells the query-builder to eager-load the nodes that are connected to the "policies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedResources

func (aq *AppQuery) WithNamedResources(name string, opts ...func(*AppResQuery)) *AppQuery

WithNamedResources tells the query-builder to eager-load the nodes that are connected to the "resources" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithNamedRoles

func (aq *AppQuery) WithNamedRoles(name string, opts ...func(*AppRoleQuery)) *AppQuery

WithNamedRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithOrgApp

func (aq *AppQuery) WithOrgApp(opts ...func(*OrgAppQuery)) *AppQuery

WithOrgApp tells the query-builder to eager-load the nodes that are connected to the "org_app" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithOrgs

func (aq *AppQuery) WithOrgs(opts ...func(*OrgQuery)) *AppQuery

WithOrgs tells the query-builder to eager-load the nodes that are connected to the "orgs" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithPolicies

func (aq *AppQuery) WithPolicies(opts ...func(*AppPolicyQuery)) *AppQuery

WithPolicies tells the query-builder to eager-load the nodes that are connected to the "policies" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithResources

func (aq *AppQuery) WithResources(opts ...func(*AppResQuery)) *AppQuery

WithResources tells the query-builder to eager-load the nodes that are connected to the "resources" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppQuery) WithRoles

func (aq *AppQuery) WithRoles(opts ...func(*AppRoleQuery)) *AppQuery

WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.

type AppRes

type AppRes struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 所属应用
	AppID int `json:"app_id,omitempty"`
	// 资源名称
	Name string `json:"name,omitempty"`
	// 资源类型名称,如数据库表名
	TypeName string `json:"type_name,omitempty"`
	// 应用资源表达式
	ArnPattern string `json:"arn_pattern,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppResQuery when eager-loading is set.
	Edges AppResEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppRes is the model entity for the AppRes schema.

func (*AppRes) App

func (ar *AppRes) App(ctx context.Context) (*App, error)

func (*AppRes) GlobalID

func (ar *AppRes) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppRes node.

func (*AppRes) IsNode

func (*AppRes) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppRes) QueryApp

func (ar *AppRes) QueryApp() *AppQuery

QueryApp queries the "app" edge of the AppRes entity.

func (*AppRes) String

func (ar *AppRes) String() string

String implements the fmt.Stringer.

func (*AppRes) ToEdge

func (ar *AppRes) ToEdge(order *AppResOrder) *AppResEdge

ToEdge converts AppRes into AppResEdge.

func (*AppRes) Unwrap

func (ar *AppRes) Unwrap() *AppRes

Unwrap unwraps the AppRes entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppRes) Update

func (ar *AppRes) Update() *AppResUpdateOne

Update returns a builder for updating this AppRes. Note that you need to call AppRes.Unwrap() before calling this method if this AppRes was returned from a transaction, and the transaction was committed or rolled back.

func (*AppRes) Value

func (ar *AppRes) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppRes. This includes values selected through modifiers, order, etc.

type AppResClient

type AppResClient struct {
	// contains filtered or unexported fields
}

AppResClient is a client for the AppRes schema.

func NewAppResClient

func NewAppResClient(c config) *AppResClient

NewAppResClient returns a client for the AppRes from the given config.

func (*AppResClient) Create

func (c *AppResClient) Create() *AppResCreate

Create returns a builder for creating a AppRes entity.

func (*AppResClient) CreateBulk

func (c *AppResClient) CreateBulk(builders ...*AppResCreate) *AppResCreateBulk

CreateBulk returns a builder for creating a bulk of AppRes entities.

func (*AppResClient) Delete

func (c *AppResClient) Delete() *AppResDelete

Delete returns a delete builder for AppRes.

func (*AppResClient) DeleteOne

func (c *AppResClient) DeleteOne(ar *AppRes) *AppResDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppResClient) DeleteOneID

func (c *AppResClient) DeleteOneID(id int) *AppResDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppResClient) Get

func (c *AppResClient) Get(ctx context.Context, id int) (*AppRes, error)

Get returns a AppRes entity by its id.

func (*AppResClient) GetX

func (c *AppResClient) GetX(ctx context.Context, id int) *AppRes

GetX is like Get, but panics if an error occurs.

func (*AppResClient) Hooks

func (c *AppResClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppResClient) Intercept

func (c *AppResClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `appres.Intercept(f(g(h())))`.

func (*AppResClient) Interceptors

func (c *AppResClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppResClient) MapCreateBulk

func (c *AppResClient) MapCreateBulk(slice any, setFunc func(*AppResCreate, int)) *AppResCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppResClient) Query

func (c *AppResClient) Query() *AppResQuery

Query returns a query builder for AppRes.

func (*AppResClient) QueryApp

func (c *AppResClient) QueryApp(ar *AppRes) *AppQuery

QueryApp queries the app edge of a AppRes.

func (*AppResClient) Update

func (c *AppResClient) Update() *AppResUpdate

Update returns an update builder for AppRes.

func (*AppResClient) UpdateOne

func (c *AppResClient) UpdateOne(ar *AppRes) *AppResUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppResClient) UpdateOneID

func (c *AppResClient) UpdateOneID(id int) *AppResUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppResClient) Use

func (c *AppResClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `appres.Hooks(f(g(h())))`.

type AppResConnection

type AppResConnection struct {
	Edges      []*AppResEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

AppResConnection is the connection containing edges to AppRes.

type AppResCreate

type AppResCreate struct {
	// contains filtered or unexported fields
}

AppResCreate is the builder for creating a AppRes entity.

func (*AppResCreate) Exec

func (arc *AppResCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppResCreate) ExecX

func (arc *AppResCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppResCreate) Mutation

func (arc *AppResCreate) Mutation() *AppResMutation

Mutation returns the AppResMutation object of the builder.

func (*AppResCreate) OnConflict

func (arc *AppResCreate) OnConflict(opts ...sql.ConflictOption) *AppResUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppRes.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppResUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppResCreate) OnConflictColumns

func (arc *AppResCreate) OnConflictColumns(columns ...string) *AppResUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppRes.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppResCreate) Save

func (arc *AppResCreate) Save(ctx context.Context) (*AppRes, error)

Save creates the AppRes in the database.

func (*AppResCreate) SaveX

func (arc *AppResCreate) SaveX(ctx context.Context) *AppRes

SaveX calls Save and panics if Save returns an error.

func (*AppResCreate) SetApp

func (arc *AppResCreate) SetApp(a *App) *AppResCreate

SetApp sets the "app" edge to the App entity.

func (*AppResCreate) SetAppID

func (arc *AppResCreate) SetAppID(i int) *AppResCreate

SetAppID sets the "app_id" field.

func (*AppResCreate) SetArnPattern

func (arc *AppResCreate) SetArnPattern(s string) *AppResCreate

SetArnPattern sets the "arn_pattern" field.

func (*AppResCreate) SetCreatedAt

func (arc *AppResCreate) SetCreatedAt(t time.Time) *AppResCreate

SetCreatedAt sets the "created_at" field.

func (*AppResCreate) SetCreatedBy

func (arc *AppResCreate) SetCreatedBy(i int) *AppResCreate

SetCreatedBy sets the "created_by" field.

func (*AppResCreate) SetID

func (arc *AppResCreate) SetID(i int) *AppResCreate

SetID sets the "id" field.

func (*AppResCreate) SetInput

SetInput applies the change-set in the CreateAppResInput on the AppResCreate builder.

func (*AppResCreate) SetName

func (arc *AppResCreate) SetName(s string) *AppResCreate

SetName sets the "name" field.

func (*AppResCreate) SetNillableAppID

func (arc *AppResCreate) SetNillableAppID(i *int) *AppResCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*AppResCreate) SetNillableCreatedAt

func (arc *AppResCreate) SetNillableCreatedAt(t *time.Time) *AppResCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppResCreate) SetNillableID

func (arc *AppResCreate) SetNillableID(i *int) *AppResCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AppResCreate) SetNillableUpdatedAt

func (arc *AppResCreate) SetNillableUpdatedAt(t *time.Time) *AppResCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppResCreate) SetNillableUpdatedBy

func (arc *AppResCreate) SetNillableUpdatedBy(i *int) *AppResCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppResCreate) SetTypeName

func (arc *AppResCreate) SetTypeName(s string) *AppResCreate

SetTypeName sets the "type_name" field.

func (*AppResCreate) SetUpdatedAt

func (arc *AppResCreate) SetUpdatedAt(t time.Time) *AppResCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppResCreate) SetUpdatedBy

func (arc *AppResCreate) SetUpdatedBy(i int) *AppResCreate

SetUpdatedBy sets the "updated_by" field.

type AppResCreateBulk

type AppResCreateBulk struct {
	// contains filtered or unexported fields
}

AppResCreateBulk is the builder for creating many AppRes entities in bulk.

func (*AppResCreateBulk) Exec

func (arcb *AppResCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppResCreateBulk) ExecX

func (arcb *AppResCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppResCreateBulk) OnConflict

func (arcb *AppResCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppResUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppRes.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppResUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppResCreateBulk) OnConflictColumns

func (arcb *AppResCreateBulk) OnConflictColumns(columns ...string) *AppResUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppRes.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppResCreateBulk) Save

func (arcb *AppResCreateBulk) Save(ctx context.Context) ([]*AppRes, error)

Save creates the AppRes entities in the database.

func (*AppResCreateBulk) SaveX

func (arcb *AppResCreateBulk) SaveX(ctx context.Context) []*AppRes

SaveX is like Save, but panics if an error occurs.

type AppResDelete

type AppResDelete struct {
	// contains filtered or unexported fields
}

AppResDelete is the builder for deleting a AppRes entity.

func (*AppResDelete) Exec

func (ard *AppResDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppResDelete) ExecX

func (ard *AppResDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppResDelete) Where

func (ard *AppResDelete) Where(ps ...predicate.AppRes) *AppResDelete

Where appends a list predicates to the AppResDelete builder.

type AppResDeleteOne

type AppResDeleteOne struct {
	// contains filtered or unexported fields
}

AppResDeleteOne is the builder for deleting a single AppRes entity.

func (*AppResDeleteOne) Exec

func (ardo *AppResDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppResDeleteOne) ExecX

func (ardo *AppResDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppResDeleteOne) Where

func (ardo *AppResDeleteOne) Where(ps ...predicate.AppRes) *AppResDeleteOne

Where appends a list predicates to the AppResDelete builder.

type AppResEdge

type AppResEdge struct {
	Node   *AppRes `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

AppResEdge is the edge representation of AppRes.

type AppResEdges

type AppResEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// contains filtered or unexported fields
}

AppResEdges holds the relations/edges for other nodes in the graph.

func (AppResEdges) AppOrErr

func (e AppResEdges) AppOrErr() (*App, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type AppResGroupBy

type AppResGroupBy struct {
	// contains filtered or unexported fields
}

AppResGroupBy is the group-by builder for AppRes entities.

func (*AppResGroupBy) Aggregate

func (argb *AppResGroupBy) Aggregate(fns ...AggregateFunc) *AppResGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppResGroupBy) Bool

func (s *AppResGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) BoolX

func (s *AppResGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppResGroupBy) Bools

func (s *AppResGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) BoolsX

func (s *AppResGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppResGroupBy) Float64

func (s *AppResGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) Float64X

func (s *AppResGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppResGroupBy) Float64s

func (s *AppResGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) Float64sX

func (s *AppResGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppResGroupBy) Int

func (s *AppResGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) IntX

func (s *AppResGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppResGroupBy) Ints

func (s *AppResGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) IntsX

func (s *AppResGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppResGroupBy) Scan

func (argb *AppResGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppResGroupBy) ScanX

func (s *AppResGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppResGroupBy) String

func (s *AppResGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) StringX

func (s *AppResGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppResGroupBy) Strings

func (s *AppResGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppResGroupBy) StringsX

func (s *AppResGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppResMutation

type AppResMutation struct {
	// contains filtered or unexported fields
}

AppResMutation represents an operation that mutates the AppRes nodes in the graph.

func (*AppResMutation) AddCreatedBy

func (m *AppResMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppResMutation) AddField

func (m *AppResMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppResMutation) AddUpdatedBy

func (m *AppResMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppResMutation) AddedCreatedBy

func (m *AppResMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppResMutation) AddedEdges

func (m *AppResMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppResMutation) AddedField

func (m *AppResMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppResMutation) AddedFields

func (m *AppResMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppResMutation) AddedIDs

func (m *AppResMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppResMutation) AddedUpdatedBy

func (m *AppResMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppResMutation) AppCleared

func (m *AppResMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*AppResMutation) AppID

func (m *AppResMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*AppResMutation) AppIDCleared

func (m *AppResMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*AppResMutation) AppIDs

func (m *AppResMutation) AppIDs() (ids []int)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*AppResMutation) ArnPattern

func (m *AppResMutation) ArnPattern() (r string, exists bool)

ArnPattern returns the value of the "arn_pattern" field in the mutation.

func (*AppResMutation) ClearApp

func (m *AppResMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*AppResMutation) ClearAppID

func (m *AppResMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*AppResMutation) ClearEdge

func (m *AppResMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppResMutation) ClearField

func (m *AppResMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppResMutation) ClearUpdatedAt

func (m *AppResMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppResMutation) ClearUpdatedBy

func (m *AppResMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppResMutation) ClearedEdges

func (m *AppResMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppResMutation) ClearedFields

func (m *AppResMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppResMutation) Client

func (m AppResMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppResMutation) CreatedAt

func (m *AppResMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppResMutation) CreatedBy

func (m *AppResMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppResMutation) EdgeCleared

func (m *AppResMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppResMutation) Field

func (m *AppResMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppResMutation) FieldCleared

func (m *AppResMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppResMutation) Fields

func (m *AppResMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppResMutation) ID

func (m *AppResMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppResMutation) IDs

func (m *AppResMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppResMutation) Name

func (m *AppResMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppResMutation) OldAppID

func (m *AppResMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) OldArnPattern

func (m *AppResMutation) OldArnPattern(ctx context.Context) (v string, err error)

OldArnPattern returns the old "arn_pattern" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) OldCreatedAt

func (m *AppResMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) OldCreatedBy

func (m *AppResMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) OldField

func (m *AppResMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppResMutation) OldName

func (m *AppResMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) OldTypeName

func (m *AppResMutation) OldTypeName(ctx context.Context) (v string, err error)

OldTypeName returns the old "type_name" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) OldUpdatedAt

func (m *AppResMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) OldUpdatedBy

func (m *AppResMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppRes entity. If the AppRes object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppResMutation) Op

func (m *AppResMutation) Op() Op

Op returns the operation name.

func (*AppResMutation) RemovedEdges

func (m *AppResMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppResMutation) RemovedIDs

func (m *AppResMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppResMutation) ResetApp

func (m *AppResMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppResMutation) ResetAppID

func (m *AppResMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppResMutation) ResetArnPattern

func (m *AppResMutation) ResetArnPattern()

ResetArnPattern resets all changes to the "arn_pattern" field.

func (*AppResMutation) ResetCreatedAt

func (m *AppResMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppResMutation) ResetCreatedBy

func (m *AppResMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppResMutation) ResetEdge

func (m *AppResMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppResMutation) ResetField

func (m *AppResMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppResMutation) ResetName

func (m *AppResMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppResMutation) ResetTypeName

func (m *AppResMutation) ResetTypeName()

ResetTypeName resets all changes to the "type_name" field.

func (*AppResMutation) ResetUpdatedAt

func (m *AppResMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppResMutation) ResetUpdatedBy

func (m *AppResMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppResMutation) SetAppID

func (m *AppResMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppResMutation) SetArnPattern

func (m *AppResMutation) SetArnPattern(s string)

SetArnPattern sets the "arn_pattern" field.

func (*AppResMutation) SetCreatedAt

func (m *AppResMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppResMutation) SetCreatedBy

func (m *AppResMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppResMutation) SetField

func (m *AppResMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppResMutation) SetID

func (m *AppResMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppRes entities.

func (*AppResMutation) SetName

func (m *AppResMutation) SetName(s string)

SetName sets the "name" field.

func (*AppResMutation) SetOp

func (m *AppResMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppResMutation) SetTypeName

func (m *AppResMutation) SetTypeName(s string)

SetTypeName sets the "type_name" field.

func (*AppResMutation) SetUpdatedAt

func (m *AppResMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppResMutation) SetUpdatedBy

func (m *AppResMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (AppResMutation) Tx

func (m AppResMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppResMutation) Type

func (m *AppResMutation) Type() string

Type returns the node type of this mutation (AppRes).

func (*AppResMutation) TypeName

func (m *AppResMutation) TypeName() (r string, exists bool)

TypeName returns the value of the "type_name" field in the mutation.

func (*AppResMutation) UpdatedAt

func (m *AppResMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppResMutation) UpdatedAtCleared

func (m *AppResMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppResMutation) UpdatedBy

func (m *AppResMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppResMutation) UpdatedByCleared

func (m *AppResMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppResMutation) Where

func (m *AppResMutation) Where(ps ...predicate.AppRes)

Where appends a list predicates to the AppResMutation builder.

func (*AppResMutation) WhereP

func (m *AppResMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppResMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppResOrder

type AppResOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *AppResOrderField `json:"field"`
}

AppResOrder defines the ordering of AppRes.

type AppResOrderField

type AppResOrderField struct {
	// Value extracts the ordering value from the given AppRes.
	Value func(*AppRes) (ent.Value, error)
	// contains filtered or unexported fields
}

AppResOrderField defines the ordering field of AppRes.

func (AppResOrderField) MarshalGQL

func (f AppResOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppResOrderField) String

func (f AppResOrderField) String() string

String implement fmt.Stringer interface.

func (*AppResOrderField) UnmarshalGQL

func (f *AppResOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppResPaginateOption

type AppResPaginateOption func(*appresPager) error

AppResPaginateOption enables pagination customization.

func WithAppResFilter

func WithAppResFilter(filter func(*AppResQuery) (*AppResQuery, error)) AppResPaginateOption

WithAppResFilter configures pagination filter.

func WithAppResOrder

func WithAppResOrder(order *AppResOrder) AppResPaginateOption

WithAppResOrder configures pagination ordering.

type AppResQuery

type AppResQuery struct {
	// contains filtered or unexported fields
}

AppResQuery is the builder for querying AppRes entities.

func (*AppResQuery) Aggregate

func (arq *AppResQuery) Aggregate(fns ...AggregateFunc) *AppResSelect

Aggregate returns a AppResSelect configured with the given aggregations.

func (*AppResQuery) All

func (arq *AppResQuery) All(ctx context.Context) ([]*AppRes, error)

All executes the query and returns a list of AppResSlice.

func (*AppResQuery) AllX

func (arq *AppResQuery) AllX(ctx context.Context) []*AppRes

AllX is like All, but panics if an error occurs.

func (*AppResQuery) Clone

func (arq *AppResQuery) Clone() *AppResQuery

Clone returns a duplicate of the AppResQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppResQuery) CollectFields

func (ar *AppResQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppResQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppResQuery) Count

func (arq *AppResQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppResQuery) CountX

func (arq *AppResQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppResQuery) Exist

func (arq *AppResQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppResQuery) ExistX

func (arq *AppResQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppResQuery) First

func (arq *AppResQuery) First(ctx context.Context) (*AppRes, error)

First returns the first AppRes entity from the query. Returns a *NotFoundError when no AppRes was found.

func (*AppResQuery) FirstID

func (arq *AppResQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppRes ID from the query. Returns a *NotFoundError when no AppRes ID was found.

func (*AppResQuery) FirstIDX

func (arq *AppResQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppResQuery) FirstX

func (arq *AppResQuery) FirstX(ctx context.Context) *AppRes

FirstX is like First, but panics if an error occurs.

func (*AppResQuery) GroupBy

func (arq *AppResQuery) GroupBy(field string, fields ...string) *AppResGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppRes.Query().
	GroupBy(appres.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppResQuery) IDs

func (arq *AppResQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppRes IDs.

func (*AppResQuery) IDsX

func (arq *AppResQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppResQuery) Limit

func (arq *AppResQuery) Limit(limit int) *AppResQuery

Limit the number of records to be returned by this query.

func (*AppResQuery) Offset

func (arq *AppResQuery) Offset(offset int) *AppResQuery

Offset to start from.

func (*AppResQuery) Only

func (arq *AppResQuery) Only(ctx context.Context) (*AppRes, error)

Only returns a single AppRes entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppRes entity is found. Returns a *NotFoundError when no AppRes entities are found.

func (*AppResQuery) OnlyID

func (arq *AppResQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppRes ID in the query. Returns a *NotSingularError when more than one AppRes ID is found. Returns a *NotFoundError when no entities are found.

func (*AppResQuery) OnlyIDX

func (arq *AppResQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppResQuery) OnlyX

func (arq *AppResQuery) OnlyX(ctx context.Context) *AppRes

OnlyX is like Only, but panics if an error occurs.

func (*AppResQuery) Order

func (arq *AppResQuery) Order(o ...appres.OrderOption) *AppResQuery

Order specifies how the records should be ordered.

func (*AppResQuery) Paginate

func (ar *AppResQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppResPaginateOption,
) (*AppResConnection, error)

Paginate executes the query and returns a relay based cursor connection to AppRes.

func (*AppResQuery) QueryApp

func (arq *AppResQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*AppResQuery) Select

func (arq *AppResQuery) Select(fields ...string) *AppResSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppRes.Query().
	Select(appres.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppResQuery) Unique

func (arq *AppResQuery) Unique(unique bool) *AppResQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppResQuery) Where

func (arq *AppResQuery) Where(ps ...predicate.AppRes) *AppResQuery

Where adds a new predicate for the AppResQuery builder.

func (*AppResQuery) WithApp

func (arq *AppResQuery) WithApp(opts ...func(*AppQuery)) *AppResQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

type AppResSelect

type AppResSelect struct {
	*AppResQuery
	// contains filtered or unexported fields
}

AppResSelect is the builder for selecting fields of AppRes entities.

func (*AppResSelect) Aggregate

func (ars *AppResSelect) Aggregate(fns ...AggregateFunc) *AppResSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppResSelect) Bool

func (s *AppResSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppResSelect) BoolX

func (s *AppResSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppResSelect) Bools

func (s *AppResSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppResSelect) BoolsX

func (s *AppResSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppResSelect) Float64

func (s *AppResSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppResSelect) Float64X

func (s *AppResSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppResSelect) Float64s

func (s *AppResSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppResSelect) Float64sX

func (s *AppResSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppResSelect) Int

func (s *AppResSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppResSelect) IntX

func (s *AppResSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppResSelect) Ints

func (s *AppResSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppResSelect) IntsX

func (s *AppResSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppResSelect) Scan

func (ars *AppResSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppResSelect) ScanX

func (s *AppResSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppResSelect) String

func (s *AppResSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppResSelect) StringX

func (s *AppResSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppResSelect) Strings

func (s *AppResSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppResSelect) StringsX

func (s *AppResSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppResSlice

type AppResSlice []*AppRes

AppResSlice is a parsable slice of AppRes.

type AppResUpdate

type AppResUpdate struct {
	// contains filtered or unexported fields
}

AppResUpdate is the builder for updating AppRes entities.

func (*AppResUpdate) AddUpdatedBy

func (aru *AppResUpdate) AddUpdatedBy(i int) *AppResUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppResUpdate) ClearUpdatedAt

func (aru *AppResUpdate) ClearUpdatedAt() *AppResUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppResUpdate) ClearUpdatedBy

func (aru *AppResUpdate) ClearUpdatedBy() *AppResUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppResUpdate) Exec

func (aru *AppResUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppResUpdate) ExecX

func (aru *AppResUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppResUpdate) Mutation

func (aru *AppResUpdate) Mutation() *AppResMutation

Mutation returns the AppResMutation object of the builder.

func (*AppResUpdate) Save

func (aru *AppResUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppResUpdate) SaveX

func (aru *AppResUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppResUpdate) SetArnPattern

func (aru *AppResUpdate) SetArnPattern(s string) *AppResUpdate

SetArnPattern sets the "arn_pattern" field.

func (*AppResUpdate) SetInput

SetInput applies the change-set in the UpdateAppResInput on the AppResUpdate builder.

func (*AppResUpdate) SetName

func (aru *AppResUpdate) SetName(s string) *AppResUpdate

SetName sets the "name" field.

func (*AppResUpdate) SetNillableUpdatedAt

func (aru *AppResUpdate) SetNillableUpdatedAt(t *time.Time) *AppResUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppResUpdate) SetNillableUpdatedBy

func (aru *AppResUpdate) SetNillableUpdatedBy(i *int) *AppResUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppResUpdate) SetTypeName

func (aru *AppResUpdate) SetTypeName(s string) *AppResUpdate

SetTypeName sets the "type_name" field.

func (*AppResUpdate) SetUpdatedAt

func (aru *AppResUpdate) SetUpdatedAt(t time.Time) *AppResUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppResUpdate) SetUpdatedBy

func (aru *AppResUpdate) SetUpdatedBy(i int) *AppResUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppResUpdate) Where

func (aru *AppResUpdate) Where(ps ...predicate.AppRes) *AppResUpdate

Where appends a list predicates to the AppResUpdate builder.

type AppResUpdateOne

type AppResUpdateOne struct {
	// contains filtered or unexported fields
}

AppResUpdateOne is the builder for updating a single AppRes entity.

func (*AppResUpdateOne) AddUpdatedBy

func (aruo *AppResUpdateOne) AddUpdatedBy(i int) *AppResUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppResUpdateOne) ClearUpdatedAt

func (aruo *AppResUpdateOne) ClearUpdatedAt() *AppResUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppResUpdateOne) ClearUpdatedBy

func (aruo *AppResUpdateOne) ClearUpdatedBy() *AppResUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppResUpdateOne) Exec

func (aruo *AppResUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppResUpdateOne) ExecX

func (aruo *AppResUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppResUpdateOne) Mutation

func (aruo *AppResUpdateOne) Mutation() *AppResMutation

Mutation returns the AppResMutation object of the builder.

func (*AppResUpdateOne) Save

func (aruo *AppResUpdateOne) Save(ctx context.Context) (*AppRes, error)

Save executes the query and returns the updated AppRes entity.

func (*AppResUpdateOne) SaveX

func (aruo *AppResUpdateOne) SaveX(ctx context.Context) *AppRes

SaveX is like Save, but panics if an error occurs.

func (*AppResUpdateOne) Select

func (aruo *AppResUpdateOne) Select(field string, fields ...string) *AppResUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppResUpdateOne) SetArnPattern

func (aruo *AppResUpdateOne) SetArnPattern(s string) *AppResUpdateOne

SetArnPattern sets the "arn_pattern" field.

func (*AppResUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppResInput on the AppResUpdateOne builder.

func (*AppResUpdateOne) SetName

func (aruo *AppResUpdateOne) SetName(s string) *AppResUpdateOne

SetName sets the "name" field.

func (*AppResUpdateOne) SetNillableUpdatedAt

func (aruo *AppResUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppResUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppResUpdateOne) SetNillableUpdatedBy

func (aruo *AppResUpdateOne) SetNillableUpdatedBy(i *int) *AppResUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppResUpdateOne) SetTypeName

func (aruo *AppResUpdateOne) SetTypeName(s string) *AppResUpdateOne

SetTypeName sets the "type_name" field.

func (*AppResUpdateOne) SetUpdatedAt

func (aruo *AppResUpdateOne) SetUpdatedAt(t time.Time) *AppResUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppResUpdateOne) SetUpdatedBy

func (aruo *AppResUpdateOne) SetUpdatedBy(i int) *AppResUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppResUpdateOne) Where

func (aruo *AppResUpdateOne) Where(ps ...predicate.AppRes) *AppResUpdateOne

Where appends a list predicates to the AppResUpdate builder.

type AppResUpsert

type AppResUpsert struct {
	*sql.UpdateSet
}

AppResUpsert is the "OnConflict" setter.

func (*AppResUpsert) AddUpdatedBy

func (u *AppResUpsert) AddUpdatedBy(v int) *AppResUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppResUpsert) ClearUpdatedAt

func (u *AppResUpsert) ClearUpdatedAt() *AppResUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppResUpsert) ClearUpdatedBy

func (u *AppResUpsert) ClearUpdatedBy() *AppResUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppResUpsert) SetArnPattern

func (u *AppResUpsert) SetArnPattern(v string) *AppResUpsert

SetArnPattern sets the "arn_pattern" field.

func (*AppResUpsert) SetName

func (u *AppResUpsert) SetName(v string) *AppResUpsert

SetName sets the "name" field.

func (*AppResUpsert) SetTypeName

func (u *AppResUpsert) SetTypeName(v string) *AppResUpsert

SetTypeName sets the "type_name" field.

func (*AppResUpsert) SetUpdatedAt

func (u *AppResUpsert) SetUpdatedAt(v time.Time) *AppResUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppResUpsert) SetUpdatedBy

func (u *AppResUpsert) SetUpdatedBy(v int) *AppResUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppResUpsert) UpdateArnPattern

func (u *AppResUpsert) UpdateArnPattern() *AppResUpsert

UpdateArnPattern sets the "arn_pattern" field to the value that was provided on create.

func (*AppResUpsert) UpdateName

func (u *AppResUpsert) UpdateName() *AppResUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppResUpsert) UpdateTypeName

func (u *AppResUpsert) UpdateTypeName() *AppResUpsert

UpdateTypeName sets the "type_name" field to the value that was provided on create.

func (*AppResUpsert) UpdateUpdatedAt

func (u *AppResUpsert) UpdateUpdatedAt() *AppResUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppResUpsert) UpdateUpdatedBy

func (u *AppResUpsert) UpdateUpdatedBy() *AppResUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppResUpsertBulk

type AppResUpsertBulk struct {
	// contains filtered or unexported fields
}

AppResUpsertBulk is the builder for "upsert"-ing a bulk of AppRes nodes.

func (*AppResUpsertBulk) AddUpdatedBy

func (u *AppResUpsertBulk) AddUpdatedBy(v int) *AppResUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppResUpsertBulk) ClearUpdatedAt

func (u *AppResUpsertBulk) ClearUpdatedAt() *AppResUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppResUpsertBulk) ClearUpdatedBy

func (u *AppResUpsertBulk) ClearUpdatedBy() *AppResUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppResUpsertBulk) DoNothing

func (u *AppResUpsertBulk) DoNothing() *AppResUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppResUpsertBulk) Exec

func (u *AppResUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppResUpsertBulk) ExecX

func (u *AppResUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppResUpsertBulk) Ignore

func (u *AppResUpsertBulk) Ignore() *AppResUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppRes.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppResUpsertBulk) SetArnPattern

func (u *AppResUpsertBulk) SetArnPattern(v string) *AppResUpsertBulk

SetArnPattern sets the "arn_pattern" field.

func (*AppResUpsertBulk) SetName

func (u *AppResUpsertBulk) SetName(v string) *AppResUpsertBulk

SetName sets the "name" field.

func (*AppResUpsertBulk) SetTypeName

func (u *AppResUpsertBulk) SetTypeName(v string) *AppResUpsertBulk

SetTypeName sets the "type_name" field.

func (*AppResUpsertBulk) SetUpdatedAt

func (u *AppResUpsertBulk) SetUpdatedAt(v time.Time) *AppResUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppResUpsertBulk) SetUpdatedBy

func (u *AppResUpsertBulk) SetUpdatedBy(v int) *AppResUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppResUpsertBulk) Update

func (u *AppResUpsertBulk) Update(set func(*AppResUpsert)) *AppResUpsertBulk

Update allows overriding fields `UPDATE` values. See the AppResCreateBulk.OnConflict documentation for more info.

func (*AppResUpsertBulk) UpdateArnPattern

func (u *AppResUpsertBulk) UpdateArnPattern() *AppResUpsertBulk

UpdateArnPattern sets the "arn_pattern" field to the value that was provided on create.

func (*AppResUpsertBulk) UpdateName

func (u *AppResUpsertBulk) UpdateName() *AppResUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppResUpsertBulk) UpdateNewValues

func (u *AppResUpsertBulk) UpdateNewValues() *AppResUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppRes.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appres.FieldID)
		}),
	).
	Exec(ctx)

func (*AppResUpsertBulk) UpdateTypeName

func (u *AppResUpsertBulk) UpdateTypeName() *AppResUpsertBulk

UpdateTypeName sets the "type_name" field to the value that was provided on create.

func (*AppResUpsertBulk) UpdateUpdatedAt

func (u *AppResUpsertBulk) UpdateUpdatedAt() *AppResUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppResUpsertBulk) UpdateUpdatedBy

func (u *AppResUpsertBulk) UpdateUpdatedBy() *AppResUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppResUpsertOne

type AppResUpsertOne struct {
	// contains filtered or unexported fields
}

AppResUpsertOne is the builder for "upsert"-ing

one AppRes node.

func (*AppResUpsertOne) AddUpdatedBy

func (u *AppResUpsertOne) AddUpdatedBy(v int) *AppResUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppResUpsertOne) ClearUpdatedAt

func (u *AppResUpsertOne) ClearUpdatedAt() *AppResUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppResUpsertOne) ClearUpdatedBy

func (u *AppResUpsertOne) ClearUpdatedBy() *AppResUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppResUpsertOne) DoNothing

func (u *AppResUpsertOne) DoNothing() *AppResUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppResUpsertOne) Exec

func (u *AppResUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppResUpsertOne) ExecX

func (u *AppResUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppResUpsertOne) ID

func (u *AppResUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppResUpsertOne) IDX

func (u *AppResUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*AppResUpsertOne) Ignore

func (u *AppResUpsertOne) Ignore() *AppResUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppRes.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppResUpsertOne) SetArnPattern

func (u *AppResUpsertOne) SetArnPattern(v string) *AppResUpsertOne

SetArnPattern sets the "arn_pattern" field.

func (*AppResUpsertOne) SetName

func (u *AppResUpsertOne) SetName(v string) *AppResUpsertOne

SetName sets the "name" field.

func (*AppResUpsertOne) SetTypeName

func (u *AppResUpsertOne) SetTypeName(v string) *AppResUpsertOne

SetTypeName sets the "type_name" field.

func (*AppResUpsertOne) SetUpdatedAt

func (u *AppResUpsertOne) SetUpdatedAt(v time.Time) *AppResUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppResUpsertOne) SetUpdatedBy

func (u *AppResUpsertOne) SetUpdatedBy(v int) *AppResUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppResUpsertOne) Update

func (u *AppResUpsertOne) Update(set func(*AppResUpsert)) *AppResUpsertOne

Update allows overriding fields `UPDATE` values. See the AppResCreate.OnConflict documentation for more info.

func (*AppResUpsertOne) UpdateArnPattern

func (u *AppResUpsertOne) UpdateArnPattern() *AppResUpsertOne

UpdateArnPattern sets the "arn_pattern" field to the value that was provided on create.

func (*AppResUpsertOne) UpdateName

func (u *AppResUpsertOne) UpdateName() *AppResUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppResUpsertOne) UpdateNewValues

func (u *AppResUpsertOne) UpdateNewValues() *AppResUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppRes.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(appres.FieldID)
		}),
	).
	Exec(ctx)

func (*AppResUpsertOne) UpdateTypeName

func (u *AppResUpsertOne) UpdateTypeName() *AppResUpsertOne

UpdateTypeName sets the "type_name" field to the value that was provided on create.

func (*AppResUpsertOne) UpdateUpdatedAt

func (u *AppResUpsertOne) UpdateUpdatedAt() *AppResUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppResUpsertOne) UpdateUpdatedBy

func (u *AppResUpsertOne) UpdateUpdatedBy() *AppResUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppResWhereInput

type AppResWhereInput struct {
	Predicates []predicate.AppRes  `json:"-"`
	Not        *AppResWhereInput   `json:"not,omitempty"`
	Or         []*AppResWhereInput `json:"or,omitempty"`
	And        []*AppResWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_id" field predicates.
	AppID       *int  `json:"appID,omitempty"`
	AppIDNEQ    *int  `json:"appIDNEQ,omitempty"`
	AppIDIn     []int `json:"appIDIn,omitempty"`
	AppIDNotIn  []int `json:"appIDNotIn,omitempty"`
	AppIDIsNil  bool  `json:"appIDIsNil,omitempty"`
	AppIDNotNil bool  `json:"appIDNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "type_name" field predicates.
	TypeName             *string  `json:"typeName,omitempty"`
	TypeNameNEQ          *string  `json:"typeNameNEQ,omitempty"`
	TypeNameIn           []string `json:"typeNameIn,omitempty"`
	TypeNameNotIn        []string `json:"typeNameNotIn,omitempty"`
	TypeNameGT           *string  `json:"typeNameGT,omitempty"`
	TypeNameGTE          *string  `json:"typeNameGTE,omitempty"`
	TypeNameLT           *string  `json:"typeNameLT,omitempty"`
	TypeNameLTE          *string  `json:"typeNameLTE,omitempty"`
	TypeNameContains     *string  `json:"typeNameContains,omitempty"`
	TypeNameHasPrefix    *string  `json:"typeNameHasPrefix,omitempty"`
	TypeNameHasSuffix    *string  `json:"typeNameHasSuffix,omitempty"`
	TypeNameEqualFold    *string  `json:"typeNameEqualFold,omitempty"`
	TypeNameContainsFold *string  `json:"typeNameContainsFold,omitempty"`

	// "arn_pattern" field predicates.
	ArnPattern             *string  `json:"arnPattern,omitempty"`
	ArnPatternNEQ          *string  `json:"arnPatternNEQ,omitempty"`
	ArnPatternIn           []string `json:"arnPatternIn,omitempty"`
	ArnPatternNotIn        []string `json:"arnPatternNotIn,omitempty"`
	ArnPatternGT           *string  `json:"arnPatternGT,omitempty"`
	ArnPatternGTE          *string  `json:"arnPatternGTE,omitempty"`
	ArnPatternLT           *string  `json:"arnPatternLT,omitempty"`
	ArnPatternLTE          *string  `json:"arnPatternLTE,omitempty"`
	ArnPatternContains     *string  `json:"arnPatternContains,omitempty"`
	ArnPatternHasPrefix    *string  `json:"arnPatternHasPrefix,omitempty"`
	ArnPatternHasSuffix    *string  `json:"arnPatternHasSuffix,omitempty"`
	ArnPatternEqualFold    *string  `json:"arnPatternEqualFold,omitempty"`
	ArnPatternContainsFold *string  `json:"arnPatternContainsFold,omitempty"`

	// "app" edge predicates.
	HasApp     *bool            `json:"hasApp,omitempty"`
	HasAppWith []*AppWhereInput `json:"hasAppWith,omitempty"`
}

AppResWhereInput represents a where input for filtering AppRes queries.

func (*AppResWhereInput) AddPredicates

func (i *AppResWhereInput) AddPredicates(predicates ...predicate.AppRes)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppResWhereInput) Filter

func (i *AppResWhereInput) Filter(q *AppResQuery) (*AppResQuery, error)

Filter applies the AppResWhereInput filter on the AppResQuery builder.

func (*AppResWhereInput) P

P returns a predicate for filtering appresslice. An error is returned if the input is empty or invalid.

type AppRole

type AppRole struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 所属应用
	AppID int `json:"app_id,omitempty"`
	// 角色名称
	Name string `json:"name,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 标识是否自动授予到账户
	AutoGrant bool `json:"auto_grant,omitempty"`
	// 授权后是否可编辑
	Editable bool `json:"editable,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppRoleQuery when eager-loading is set.
	Edges AppRoleEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppRole is the model entity for the AppRole schema.

func (*AppRole) App

func (ar *AppRole) App(ctx context.Context) (*App, error)

func (*AppRole) GlobalID

func (ar *AppRole) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppRole node.

func (*AppRole) IsNode

func (*AppRole) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppRole) NamedAppRolePolicy

func (ar *AppRole) NamedAppRolePolicy(name string) ([]*AppRolePolicy, error)

NamedAppRolePolicy returns the AppRolePolicy named value or an error if the edge was not loaded in eager-loading with this name.

func (*AppRole) NamedPolicies

func (ar *AppRole) NamedPolicies(name string) ([]*AppPolicy, error)

NamedPolicies returns the Policies named value or an error if the edge was not loaded in eager-loading with this name.

func (*AppRole) Policies

func (ar *AppRole) Policies(ctx context.Context) (result []*AppPolicy, err error)

func (*AppRole) QueryApp

func (ar *AppRole) QueryApp() *AppQuery

QueryApp queries the "app" edge of the AppRole entity.

func (*AppRole) QueryAppRolePolicy

func (ar *AppRole) QueryAppRolePolicy() *AppRolePolicyQuery

QueryAppRolePolicy queries the "app_role_policy" edge of the AppRole entity.

func (*AppRole) QueryPolicies

func (ar *AppRole) QueryPolicies() *AppPolicyQuery

QueryPolicies queries the "policies" edge of the AppRole entity.

func (*AppRole) String

func (ar *AppRole) String() string

String implements the fmt.Stringer.

func (*AppRole) ToEdge

func (ar *AppRole) ToEdge(order *AppRoleOrder) *AppRoleEdge

ToEdge converts AppRole into AppRoleEdge.

func (*AppRole) Unwrap

func (ar *AppRole) Unwrap() *AppRole

Unwrap unwraps the AppRole entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppRole) Update

func (ar *AppRole) Update() *AppRoleUpdateOne

Update returns a builder for updating this AppRole. Note that you need to call AppRole.Unwrap() before calling this method if this AppRole was returned from a transaction, and the transaction was committed or rolled back.

func (*AppRole) Value

func (ar *AppRole) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppRole. This includes values selected through modifiers, order, etc.

type AppRoleClient

type AppRoleClient struct {
	// contains filtered or unexported fields
}

AppRoleClient is a client for the AppRole schema.

func NewAppRoleClient

func NewAppRoleClient(c config) *AppRoleClient

NewAppRoleClient returns a client for the AppRole from the given config.

func (*AppRoleClient) Create

func (c *AppRoleClient) Create() *AppRoleCreate

Create returns a builder for creating a AppRole entity.

func (*AppRoleClient) CreateBulk

func (c *AppRoleClient) CreateBulk(builders ...*AppRoleCreate) *AppRoleCreateBulk

CreateBulk returns a builder for creating a bulk of AppRole entities.

func (*AppRoleClient) Delete

func (c *AppRoleClient) Delete() *AppRoleDelete

Delete returns a delete builder for AppRole.

func (*AppRoleClient) DeleteOne

func (c *AppRoleClient) DeleteOne(ar *AppRole) *AppRoleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppRoleClient) DeleteOneID

func (c *AppRoleClient) DeleteOneID(id int) *AppRoleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppRoleClient) Get

func (c *AppRoleClient) Get(ctx context.Context, id int) (*AppRole, error)

Get returns a AppRole entity by its id.

func (*AppRoleClient) GetX

func (c *AppRoleClient) GetX(ctx context.Context, id int) *AppRole

GetX is like Get, but panics if an error occurs.

func (*AppRoleClient) Hooks

func (c *AppRoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppRoleClient) Intercept

func (c *AppRoleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `approle.Intercept(f(g(h())))`.

func (*AppRoleClient) Interceptors

func (c *AppRoleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppRoleClient) MapCreateBulk

func (c *AppRoleClient) MapCreateBulk(slice any, setFunc func(*AppRoleCreate, int)) *AppRoleCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppRoleClient) Query

func (c *AppRoleClient) Query() *AppRoleQuery

Query returns a query builder for AppRole.

func (*AppRoleClient) QueryApp

func (c *AppRoleClient) QueryApp(ar *AppRole) *AppQuery

QueryApp queries the app edge of a AppRole.

func (*AppRoleClient) QueryAppRolePolicy

func (c *AppRoleClient) QueryAppRolePolicy(ar *AppRole) *AppRolePolicyQuery

QueryAppRolePolicy queries the app_role_policy edge of a AppRole.

func (*AppRoleClient) QueryPolicies

func (c *AppRoleClient) QueryPolicies(ar *AppRole) *AppPolicyQuery

QueryPolicies queries the policies edge of a AppRole.

func (*AppRoleClient) Update

func (c *AppRoleClient) Update() *AppRoleUpdate

Update returns an update builder for AppRole.

func (*AppRoleClient) UpdateOne

func (c *AppRoleClient) UpdateOne(ar *AppRole) *AppRoleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppRoleClient) UpdateOneID

func (c *AppRoleClient) UpdateOneID(id int) *AppRoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppRoleClient) Use

func (c *AppRoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `approle.Hooks(f(g(h())))`.

type AppRoleConnection

type AppRoleConnection struct {
	Edges      []*AppRoleEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

AppRoleConnection is the connection containing edges to AppRole.

type AppRoleCreate

type AppRoleCreate struct {
	// contains filtered or unexported fields
}

AppRoleCreate is the builder for creating a AppRole entity.

func (*AppRoleCreate) AddAppRolePolicy

func (arc *AppRoleCreate) AddAppRolePolicy(a ...*AppRolePolicy) *AppRoleCreate

AddAppRolePolicy adds the "app_role_policy" edges to the AppRolePolicy entity.

func (*AppRoleCreate) AddAppRolePolicyIDs

func (arc *AppRoleCreate) AddAppRolePolicyIDs(ids ...int) *AppRoleCreate

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppRoleCreate) AddPolicies

func (arc *AppRoleCreate) AddPolicies(a ...*AppPolicy) *AppRoleCreate

AddPolicies adds the "policies" edges to the AppPolicy entity.

func (*AppRoleCreate) AddPolicyIDs

func (arc *AppRoleCreate) AddPolicyIDs(ids ...int) *AppRoleCreate

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by IDs.

func (*AppRoleCreate) Exec

func (arc *AppRoleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRoleCreate) ExecX

func (arc *AppRoleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleCreate) Mutation

func (arc *AppRoleCreate) Mutation() *AppRoleMutation

Mutation returns the AppRoleMutation object of the builder.

func (*AppRoleCreate) OnConflict

func (arc *AppRoleCreate) OnConflict(opts ...sql.ConflictOption) *AppRoleUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppRole.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppRoleUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppRoleCreate) OnConflictColumns

func (arc *AppRoleCreate) OnConflictColumns(columns ...string) *AppRoleUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppRole.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppRoleCreate) Save

func (arc *AppRoleCreate) Save(ctx context.Context) (*AppRole, error)

Save creates the AppRole in the database.

func (*AppRoleCreate) SaveX

func (arc *AppRoleCreate) SaveX(ctx context.Context) *AppRole

SaveX calls Save and panics if Save returns an error.

func (*AppRoleCreate) SetApp

func (arc *AppRoleCreate) SetApp(a *App) *AppRoleCreate

SetApp sets the "app" edge to the App entity.

func (*AppRoleCreate) SetAppID

func (arc *AppRoleCreate) SetAppID(i int) *AppRoleCreate

SetAppID sets the "app_id" field.

func (*AppRoleCreate) SetAutoGrant

func (arc *AppRoleCreate) SetAutoGrant(b bool) *AppRoleCreate

SetAutoGrant sets the "auto_grant" field.

func (*AppRoleCreate) SetComments

func (arc *AppRoleCreate) SetComments(s string) *AppRoleCreate

SetComments sets the "comments" field.

func (*AppRoleCreate) SetCreatedAt

func (arc *AppRoleCreate) SetCreatedAt(t time.Time) *AppRoleCreate

SetCreatedAt sets the "created_at" field.

func (*AppRoleCreate) SetCreatedBy

func (arc *AppRoleCreate) SetCreatedBy(i int) *AppRoleCreate

SetCreatedBy sets the "created_by" field.

func (*AppRoleCreate) SetEditable

func (arc *AppRoleCreate) SetEditable(b bool) *AppRoleCreate

SetEditable sets the "editable" field.

func (*AppRoleCreate) SetID

func (arc *AppRoleCreate) SetID(i int) *AppRoleCreate

SetID sets the "id" field.

func (*AppRoleCreate) SetInput

SetInput applies the change-set in the CreateAppRoleInput on the AppRoleCreate builder.

func (*AppRoleCreate) SetName

func (arc *AppRoleCreate) SetName(s string) *AppRoleCreate

SetName sets the "name" field.

func (*AppRoleCreate) SetNillableAppID

func (arc *AppRoleCreate) SetNillableAppID(i *int) *AppRoleCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*AppRoleCreate) SetNillableAutoGrant

func (arc *AppRoleCreate) SetNillableAutoGrant(b *bool) *AppRoleCreate

SetNillableAutoGrant sets the "auto_grant" field if the given value is not nil.

func (*AppRoleCreate) SetNillableComments

func (arc *AppRoleCreate) SetNillableComments(s *string) *AppRoleCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppRoleCreate) SetNillableCreatedAt

func (arc *AppRoleCreate) SetNillableCreatedAt(t *time.Time) *AppRoleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppRoleCreate) SetNillableEditable

func (arc *AppRoleCreate) SetNillableEditable(b *bool) *AppRoleCreate

SetNillableEditable sets the "editable" field if the given value is not nil.

func (*AppRoleCreate) SetNillableID

func (arc *AppRoleCreate) SetNillableID(i *int) *AppRoleCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AppRoleCreate) SetNillableUpdatedAt

func (arc *AppRoleCreate) SetNillableUpdatedAt(t *time.Time) *AppRoleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppRoleCreate) SetNillableUpdatedBy

func (arc *AppRoleCreate) SetNillableUpdatedBy(i *int) *AppRoleCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppRoleCreate) SetUpdatedAt

func (arc *AppRoleCreate) SetUpdatedAt(t time.Time) *AppRoleCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppRoleCreate) SetUpdatedBy

func (arc *AppRoleCreate) SetUpdatedBy(i int) *AppRoleCreate

SetUpdatedBy sets the "updated_by" field.

type AppRoleCreateBulk

type AppRoleCreateBulk struct {
	// contains filtered or unexported fields
}

AppRoleCreateBulk is the builder for creating many AppRole entities in bulk.

func (*AppRoleCreateBulk) Exec

func (arcb *AppRoleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRoleCreateBulk) ExecX

func (arcb *AppRoleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleCreateBulk) OnConflict

func (arcb *AppRoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *AppRoleUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppRole.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppRoleUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppRoleCreateBulk) OnConflictColumns

func (arcb *AppRoleCreateBulk) OnConflictColumns(columns ...string) *AppRoleUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppRole.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppRoleCreateBulk) Save

func (arcb *AppRoleCreateBulk) Save(ctx context.Context) ([]*AppRole, error)

Save creates the AppRole entities in the database.

func (*AppRoleCreateBulk) SaveX

func (arcb *AppRoleCreateBulk) SaveX(ctx context.Context) []*AppRole

SaveX is like Save, but panics if an error occurs.

type AppRoleDelete

type AppRoleDelete struct {
	// contains filtered or unexported fields
}

AppRoleDelete is the builder for deleting a AppRole entity.

func (*AppRoleDelete) Exec

func (ard *AppRoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppRoleDelete) ExecX

func (ard *AppRoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleDelete) Where

func (ard *AppRoleDelete) Where(ps ...predicate.AppRole) *AppRoleDelete

Where appends a list predicates to the AppRoleDelete builder.

type AppRoleDeleteOne

type AppRoleDeleteOne struct {
	// contains filtered or unexported fields
}

AppRoleDeleteOne is the builder for deleting a single AppRole entity.

func (*AppRoleDeleteOne) Exec

func (ardo *AppRoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppRoleDeleteOne) ExecX

func (ardo *AppRoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleDeleteOne) Where

func (ardo *AppRoleDeleteOne) Where(ps ...predicate.AppRole) *AppRoleDeleteOne

Where appends a list predicates to the AppRoleDelete builder.

type AppRoleEdge

type AppRoleEdge struct {
	Node   *AppRole `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

AppRoleEdge is the edge representation of AppRole.

type AppRoleEdges

type AppRoleEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// 权限授权策略
	Policies []*AppPolicy `json:"policies,omitempty"`
	// AppRolePolicy holds the value of the app_role_policy edge.
	AppRolePolicy []*AppRolePolicy `json:"app_role_policy,omitempty"`
	// contains filtered or unexported fields
}

AppRoleEdges holds the relations/edges for other nodes in the graph.

func (AppRoleEdges) AppOrErr

func (e AppRoleEdges) AppOrErr() (*App, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AppRoleEdges) AppRolePolicyOrErr

func (e AppRoleEdges) AppRolePolicyOrErr() ([]*AppRolePolicy, error)

AppRolePolicyOrErr returns the AppRolePolicy value or an error if the edge was not loaded in eager-loading.

func (AppRoleEdges) PoliciesOrErr

func (e AppRoleEdges) PoliciesOrErr() ([]*AppPolicy, error)

PoliciesOrErr returns the Policies value or an error if the edge was not loaded in eager-loading.

type AppRoleGroupBy

type AppRoleGroupBy struct {
	// contains filtered or unexported fields
}

AppRoleGroupBy is the group-by builder for AppRole entities.

func (*AppRoleGroupBy) Aggregate

func (argb *AppRoleGroupBy) Aggregate(fns ...AggregateFunc) *AppRoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppRoleGroupBy) Bool

func (s *AppRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) BoolX

func (s *AppRoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppRoleGroupBy) Bools

func (s *AppRoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) BoolsX

func (s *AppRoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppRoleGroupBy) Float64

func (s *AppRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) Float64X

func (s *AppRoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppRoleGroupBy) Float64s

func (s *AppRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) Float64sX

func (s *AppRoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppRoleGroupBy) Int

func (s *AppRoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) IntX

func (s *AppRoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppRoleGroupBy) Ints

func (s *AppRoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) IntsX

func (s *AppRoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppRoleGroupBy) Scan

func (argb *AppRoleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppRoleGroupBy) ScanX

func (s *AppRoleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppRoleGroupBy) String

func (s *AppRoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) StringX

func (s *AppRoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppRoleGroupBy) Strings

func (s *AppRoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppRoleGroupBy) StringsX

func (s *AppRoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppRoleMutation

type AppRoleMutation struct {
	// contains filtered or unexported fields
}

AppRoleMutation represents an operation that mutates the AppRole nodes in the graph.

func (*AppRoleMutation) AddAppRolePolicyIDs

func (m *AppRoleMutation) AddAppRolePolicyIDs(ids ...int)

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by ids.

func (*AppRoleMutation) AddCreatedBy

func (m *AppRoleMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppRoleMutation) AddField

func (m *AppRoleMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppRoleMutation) AddPolicyIDs

func (m *AppRoleMutation) AddPolicyIDs(ids ...int)

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by ids.

func (*AppRoleMutation) AddUpdatedBy

func (m *AppRoleMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppRoleMutation) AddedCreatedBy

func (m *AppRoleMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppRoleMutation) AddedEdges

func (m *AppRoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppRoleMutation) AddedField

func (m *AppRoleMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppRoleMutation) AddedFields

func (m *AppRoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppRoleMutation) AddedIDs

func (m *AppRoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppRoleMutation) AddedUpdatedBy

func (m *AppRoleMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppRoleMutation) AppCleared

func (m *AppRoleMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*AppRoleMutation) AppID

func (m *AppRoleMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*AppRoleMutation) AppIDCleared

func (m *AppRoleMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*AppRoleMutation) AppIDs

func (m *AppRoleMutation) AppIDs() (ids []int)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*AppRoleMutation) AppRolePolicyCleared

func (m *AppRoleMutation) AppRolePolicyCleared() bool

AppRolePolicyCleared reports if the "app_role_policy" edge to the AppRolePolicy entity was cleared.

func (*AppRoleMutation) AppRolePolicyIDs

func (m *AppRoleMutation) AppRolePolicyIDs() (ids []int)

AppRolePolicyIDs returns the "app_role_policy" edge IDs in the mutation.

func (*AppRoleMutation) AutoGrant

func (m *AppRoleMutation) AutoGrant() (r bool, exists bool)

AutoGrant returns the value of the "auto_grant" field in the mutation.

func (*AppRoleMutation) ClearApp

func (m *AppRoleMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*AppRoleMutation) ClearAppID

func (m *AppRoleMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*AppRoleMutation) ClearAppRolePolicy

func (m *AppRoleMutation) ClearAppRolePolicy()

ClearAppRolePolicy clears the "app_role_policy" edge to the AppRolePolicy entity.

func (*AppRoleMutation) ClearComments

func (m *AppRoleMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppRoleMutation) ClearEdge

func (m *AppRoleMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppRoleMutation) ClearField

func (m *AppRoleMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppRoleMutation) ClearPolicies

func (m *AppRoleMutation) ClearPolicies()

ClearPolicies clears the "policies" edge to the AppPolicy entity.

func (*AppRoleMutation) ClearUpdatedAt

func (m *AppRoleMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRoleMutation) ClearUpdatedBy

func (m *AppRoleMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRoleMutation) ClearedEdges

func (m *AppRoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppRoleMutation) ClearedFields

func (m *AppRoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppRoleMutation) Client

func (m AppRoleMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppRoleMutation) Comments

func (m *AppRoleMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*AppRoleMutation) CommentsCleared

func (m *AppRoleMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*AppRoleMutation) CreatedAt

func (m *AppRoleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppRoleMutation) CreatedBy

func (m *AppRoleMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppRoleMutation) EdgeCleared

func (m *AppRoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppRoleMutation) Editable

func (m *AppRoleMutation) Editable() (r bool, exists bool)

Editable returns the value of the "editable" field in the mutation.

func (*AppRoleMutation) Field

func (m *AppRoleMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppRoleMutation) FieldCleared

func (m *AppRoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppRoleMutation) Fields

func (m *AppRoleMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppRoleMutation) ID

func (m *AppRoleMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppRoleMutation) IDs

func (m *AppRoleMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppRoleMutation) Name

func (m *AppRoleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppRoleMutation) OldAppID

func (m *AppRoleMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldAutoGrant

func (m *AppRoleMutation) OldAutoGrant(ctx context.Context) (v bool, err error)

OldAutoGrant returns the old "auto_grant" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldComments

func (m *AppRoleMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldCreatedAt

func (m *AppRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldCreatedBy

func (m *AppRoleMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldEditable

func (m *AppRoleMutation) OldEditable(ctx context.Context) (v bool, err error)

OldEditable returns the old "editable" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldField

func (m *AppRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppRoleMutation) OldName

func (m *AppRoleMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldUpdatedAt

func (m *AppRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) OldUpdatedBy

func (m *AppRoleMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppRole entity. If the AppRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRoleMutation) Op

func (m *AppRoleMutation) Op() Op

Op returns the operation name.

func (*AppRoleMutation) PoliciesCleared

func (m *AppRoleMutation) PoliciesCleared() bool

PoliciesCleared reports if the "policies" edge to the AppPolicy entity was cleared.

func (*AppRoleMutation) PoliciesIDs

func (m *AppRoleMutation) PoliciesIDs() (ids []int)

PoliciesIDs returns the "policies" edge IDs in the mutation.

func (*AppRoleMutation) RemoveAppRolePolicyIDs

func (m *AppRoleMutation) RemoveAppRolePolicyIDs(ids ...int)

RemoveAppRolePolicyIDs removes the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppRoleMutation) RemovePolicyIDs

func (m *AppRoleMutation) RemovePolicyIDs(ids ...int)

RemovePolicyIDs removes the "policies" edge to the AppPolicy entity by IDs.

func (*AppRoleMutation) RemovedAppRolePolicyIDs

func (m *AppRoleMutation) RemovedAppRolePolicyIDs() (ids []int)

RemovedAppRolePolicy returns the removed IDs of the "app_role_policy" edge to the AppRolePolicy entity.

func (*AppRoleMutation) RemovedEdges

func (m *AppRoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppRoleMutation) RemovedIDs

func (m *AppRoleMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppRoleMutation) RemovedPoliciesIDs

func (m *AppRoleMutation) RemovedPoliciesIDs() (ids []int)

RemovedPolicies returns the removed IDs of the "policies" edge to the AppPolicy entity.

func (*AppRoleMutation) ResetApp

func (m *AppRoleMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppRoleMutation) ResetAppID

func (m *AppRoleMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppRoleMutation) ResetAppRolePolicy

func (m *AppRoleMutation) ResetAppRolePolicy()

ResetAppRolePolicy resets all changes to the "app_role_policy" edge.

func (*AppRoleMutation) ResetAutoGrant

func (m *AppRoleMutation) ResetAutoGrant()

ResetAutoGrant resets all changes to the "auto_grant" field.

func (*AppRoleMutation) ResetComments

func (m *AppRoleMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppRoleMutation) ResetCreatedAt

func (m *AppRoleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppRoleMutation) ResetCreatedBy

func (m *AppRoleMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppRoleMutation) ResetEdge

func (m *AppRoleMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppRoleMutation) ResetEditable

func (m *AppRoleMutation) ResetEditable()

ResetEditable resets all changes to the "editable" field.

func (*AppRoleMutation) ResetField

func (m *AppRoleMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppRoleMutation) ResetName

func (m *AppRoleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppRoleMutation) ResetPolicies

func (m *AppRoleMutation) ResetPolicies()

ResetPolicies resets all changes to the "policies" edge.

func (*AppRoleMutation) ResetUpdatedAt

func (m *AppRoleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppRoleMutation) ResetUpdatedBy

func (m *AppRoleMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppRoleMutation) SetAppID

func (m *AppRoleMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppRoleMutation) SetAutoGrant

func (m *AppRoleMutation) SetAutoGrant(b bool)

SetAutoGrant sets the "auto_grant" field.

func (*AppRoleMutation) SetComments

func (m *AppRoleMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppRoleMutation) SetCreatedAt

func (m *AppRoleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppRoleMutation) SetCreatedBy

func (m *AppRoleMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppRoleMutation) SetEditable

func (m *AppRoleMutation) SetEditable(b bool)

SetEditable sets the "editable" field.

func (*AppRoleMutation) SetField

func (m *AppRoleMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppRoleMutation) SetID

func (m *AppRoleMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppRole entities.

func (*AppRoleMutation) SetName

func (m *AppRoleMutation) SetName(s string)

SetName sets the "name" field.

func (*AppRoleMutation) SetOp

func (m *AppRoleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppRoleMutation) SetUpdatedAt

func (m *AppRoleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppRoleMutation) SetUpdatedBy

func (m *AppRoleMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (AppRoleMutation) Tx

func (m AppRoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppRoleMutation) Type

func (m *AppRoleMutation) Type() string

Type returns the node type of this mutation (AppRole).

func (*AppRoleMutation) UpdatedAt

func (m *AppRoleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppRoleMutation) UpdatedAtCleared

func (m *AppRoleMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppRoleMutation) UpdatedBy

func (m *AppRoleMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppRoleMutation) UpdatedByCleared

func (m *AppRoleMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppRoleMutation) Where

func (m *AppRoleMutation) Where(ps ...predicate.AppRole)

Where appends a list predicates to the AppRoleMutation builder.

func (*AppRoleMutation) WhereP

func (m *AppRoleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppRoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppRoleOrder

type AppRoleOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *AppRoleOrderField `json:"field"`
}

AppRoleOrder defines the ordering of AppRole.

type AppRoleOrderField

type AppRoleOrderField struct {
	// Value extracts the ordering value from the given AppRole.
	Value func(*AppRole) (ent.Value, error)
	// contains filtered or unexported fields
}

AppRoleOrderField defines the ordering field of AppRole.

func (AppRoleOrderField) MarshalGQL

func (f AppRoleOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AppRoleOrderField) String

func (f AppRoleOrderField) String() string

String implement fmt.Stringer interface.

func (*AppRoleOrderField) UnmarshalGQL

func (f *AppRoleOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppRolePaginateOption

type AppRolePaginateOption func(*approlePager) error

AppRolePaginateOption enables pagination customization.

func WithAppRoleFilter

func WithAppRoleFilter(filter func(*AppRoleQuery) (*AppRoleQuery, error)) AppRolePaginateOption

WithAppRoleFilter configures pagination filter.

func WithAppRoleOrder

func WithAppRoleOrder(order *AppRoleOrder) AppRolePaginateOption

WithAppRoleOrder configures pagination ordering.

type AppRolePolicies

type AppRolePolicies []*AppRolePolicy

AppRolePolicies is a parsable slice of AppRolePolicy.

type AppRolePolicy

type AppRolePolicy struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 应用角色ID
	AppRoleID int `json:"app_role_id,omitempty"`
	// 策略ID
	AppPolicyID int `json:"app_policy_id,omitempty"`
	// 应用ID
	AppID int `json:"app_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AppRolePolicyQuery when eager-loading is set.
	Edges AppRolePolicyEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppRolePolicy is the model entity for the AppRolePolicy schema.

func (*AppRolePolicy) QueryPolicy

func (arp *AppRolePolicy) QueryPolicy() *AppPolicyQuery

QueryPolicy queries the "policy" edge of the AppRolePolicy entity.

func (*AppRolePolicy) QueryRole

func (arp *AppRolePolicy) QueryRole() *AppRoleQuery

QueryRole queries the "role" edge of the AppRolePolicy entity.

func (*AppRolePolicy) String

func (arp *AppRolePolicy) String() string

String implements the fmt.Stringer.

func (*AppRolePolicy) Unwrap

func (arp *AppRolePolicy) Unwrap() *AppRolePolicy

Unwrap unwraps the AppRolePolicy entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AppRolePolicy) Update

func (arp *AppRolePolicy) Update() *AppRolePolicyUpdateOne

Update returns a builder for updating this AppRolePolicy. Note that you need to call AppRolePolicy.Unwrap() before calling this method if this AppRolePolicy was returned from a transaction, and the transaction was committed or rolled back.

func (*AppRolePolicy) Value

func (arp *AppRolePolicy) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AppRolePolicy. This includes values selected through modifiers, order, etc.

type AppRolePolicyClient

type AppRolePolicyClient struct {
	// contains filtered or unexported fields
}

AppRolePolicyClient is a client for the AppRolePolicy schema.

func NewAppRolePolicyClient

func NewAppRolePolicyClient(c config) *AppRolePolicyClient

NewAppRolePolicyClient returns a client for the AppRolePolicy from the given config.

func (*AppRolePolicyClient) Create

Create returns a builder for creating a AppRolePolicy entity.

func (*AppRolePolicyClient) CreateBulk

CreateBulk returns a builder for creating a bulk of AppRolePolicy entities.

func (*AppRolePolicyClient) Delete

Delete returns a delete builder for AppRolePolicy.

func (*AppRolePolicyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppRolePolicyClient) DeleteOneID

func (c *AppRolePolicyClient) DeleteOneID(id int) *AppRolePolicyDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppRolePolicyClient) Get

Get returns a AppRolePolicy entity by its id.

func (*AppRolePolicyClient) GetX

GetX is like Get, but panics if an error occurs.

func (*AppRolePolicyClient) Hooks

func (c *AppRolePolicyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppRolePolicyClient) Intercept

func (c *AppRolePolicyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `approlepolicy.Intercept(f(g(h())))`.

func (*AppRolePolicyClient) Interceptors

func (c *AppRolePolicyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppRolePolicyClient) MapCreateBulk

func (c *AppRolePolicyClient) MapCreateBulk(slice any, setFunc func(*AppRolePolicyCreate, int)) *AppRolePolicyCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*AppRolePolicyClient) Query

Query returns a query builder for AppRolePolicy.

func (*AppRolePolicyClient) QueryPolicy

func (c *AppRolePolicyClient) QueryPolicy(arp *AppRolePolicy) *AppPolicyQuery

QueryPolicy queries the policy edge of a AppRolePolicy.

func (*AppRolePolicyClient) QueryRole

func (c *AppRolePolicyClient) QueryRole(arp *AppRolePolicy) *AppRoleQuery

QueryRole queries the role edge of a AppRolePolicy.

func (*AppRolePolicyClient) Update

Update returns an update builder for AppRolePolicy.

func (*AppRolePolicyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppRolePolicyClient) UpdateOneID

func (c *AppRolePolicyClient) UpdateOneID(id int) *AppRolePolicyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppRolePolicyClient) Use

func (c *AppRolePolicyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `approlepolicy.Hooks(f(g(h())))`.

type AppRolePolicyCreate

type AppRolePolicyCreate struct {
	// contains filtered or unexported fields
}

AppRolePolicyCreate is the builder for creating a AppRolePolicy entity.

func (*AppRolePolicyCreate) Exec

func (arpc *AppRolePolicyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRolePolicyCreate) ExecX

func (arpc *AppRolePolicyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyCreate) Mutation

func (arpc *AppRolePolicyCreate) Mutation() *AppRolePolicyMutation

Mutation returns the AppRolePolicyMutation object of the builder.

func (*AppRolePolicyCreate) OnConflict

func (arpc *AppRolePolicyCreate) OnConflict(opts ...sql.ConflictOption) *AppRolePolicyUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppRolePolicy.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppRolePolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppRolePolicyCreate) OnConflictColumns

func (arpc *AppRolePolicyCreate) OnConflictColumns(columns ...string) *AppRolePolicyUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppRolePolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppRolePolicyCreate) Save

Save creates the AppRolePolicy in the database.

func (*AppRolePolicyCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AppRolePolicyCreate) SetAppID

func (arpc *AppRolePolicyCreate) SetAppID(i int) *AppRolePolicyCreate

SetAppID sets the "app_id" field.

func (*AppRolePolicyCreate) SetAppPolicyID

func (arpc *AppRolePolicyCreate) SetAppPolicyID(i int) *AppRolePolicyCreate

SetAppPolicyID sets the "app_policy_id" field.

func (*AppRolePolicyCreate) SetAppRoleID

func (arpc *AppRolePolicyCreate) SetAppRoleID(i int) *AppRolePolicyCreate

SetAppRoleID sets the "app_role_id" field.

func (*AppRolePolicyCreate) SetCreatedAt

func (arpc *AppRolePolicyCreate) SetCreatedAt(t time.Time) *AppRolePolicyCreate

SetCreatedAt sets the "created_at" field.

func (*AppRolePolicyCreate) SetCreatedBy

func (arpc *AppRolePolicyCreate) SetCreatedBy(i int) *AppRolePolicyCreate

SetCreatedBy sets the "created_by" field.

func (*AppRolePolicyCreate) SetID

SetID sets the "id" field.

func (*AppRolePolicyCreate) SetNillableCreatedAt

func (arpc *AppRolePolicyCreate) SetNillableCreatedAt(t *time.Time) *AppRolePolicyCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppRolePolicyCreate) SetNillableUpdatedAt

func (arpc *AppRolePolicyCreate) SetNillableUpdatedAt(t *time.Time) *AppRolePolicyCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppRolePolicyCreate) SetNillableUpdatedBy

func (arpc *AppRolePolicyCreate) SetNillableUpdatedBy(i *int) *AppRolePolicyCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppRolePolicyCreate) SetPolicy

func (arpc *AppRolePolicyCreate) SetPolicy(a *AppPolicy) *AppRolePolicyCreate

SetPolicy sets the "policy" edge to the AppPolicy entity.

func (*AppRolePolicyCreate) SetPolicyID

func (arpc *AppRolePolicyCreate) SetPolicyID(id int) *AppRolePolicyCreate

SetPolicyID sets the "policy" edge to the AppPolicy entity by ID.

func (*AppRolePolicyCreate) SetRole

func (arpc *AppRolePolicyCreate) SetRole(a *AppRole) *AppRolePolicyCreate

SetRole sets the "role" edge to the AppRole entity.

func (*AppRolePolicyCreate) SetRoleID

func (arpc *AppRolePolicyCreate) SetRoleID(id int) *AppRolePolicyCreate

SetRoleID sets the "role" edge to the AppRole entity by ID.

func (*AppRolePolicyCreate) SetUpdatedAt

func (arpc *AppRolePolicyCreate) SetUpdatedAt(t time.Time) *AppRolePolicyCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppRolePolicyCreate) SetUpdatedBy

func (arpc *AppRolePolicyCreate) SetUpdatedBy(i int) *AppRolePolicyCreate

SetUpdatedBy sets the "updated_by" field.

type AppRolePolicyCreateBulk

type AppRolePolicyCreateBulk struct {
	// contains filtered or unexported fields
}

AppRolePolicyCreateBulk is the builder for creating many AppRolePolicy entities in bulk.

func (*AppRolePolicyCreateBulk) Exec

func (arpcb *AppRolePolicyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRolePolicyCreateBulk) ExecX

func (arpcb *AppRolePolicyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AppRolePolicy.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AppRolePolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppRolePolicyCreateBulk) OnConflictColumns

func (arpcb *AppRolePolicyCreateBulk) OnConflictColumns(columns ...string) *AppRolePolicyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AppRolePolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*AppRolePolicyCreateBulk) Save

Save creates the AppRolePolicy entities in the database.

func (*AppRolePolicyCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type AppRolePolicyDelete

type AppRolePolicyDelete struct {
	// contains filtered or unexported fields
}

AppRolePolicyDelete is the builder for deleting a AppRolePolicy entity.

func (*AppRolePolicyDelete) Exec

func (arpd *AppRolePolicyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppRolePolicyDelete) ExecX

func (arpd *AppRolePolicyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyDelete) Where

Where appends a list predicates to the AppRolePolicyDelete builder.

type AppRolePolicyDeleteOne

type AppRolePolicyDeleteOne struct {
	// contains filtered or unexported fields
}

AppRolePolicyDeleteOne is the builder for deleting a single AppRolePolicy entity.

func (*AppRolePolicyDeleteOne) Exec

func (arpdo *AppRolePolicyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppRolePolicyDeleteOne) ExecX

func (arpdo *AppRolePolicyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyDeleteOne) Where

Where appends a list predicates to the AppRolePolicyDelete builder.

type AppRolePolicyEdges

type AppRolePolicyEdges struct {
	// Role holds the value of the role edge.
	Role *AppRole `json:"role,omitempty"`
	// Policy holds the value of the policy edge.
	Policy *AppPolicy `json:"policy,omitempty"`
	// contains filtered or unexported fields
}

AppRolePolicyEdges holds the relations/edges for other nodes in the graph.

func (AppRolePolicyEdges) PolicyOrErr

func (e AppRolePolicyEdges) PolicyOrErr() (*AppPolicy, error)

PolicyOrErr returns the Policy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AppRolePolicyEdges) RoleOrErr

func (e AppRolePolicyEdges) RoleOrErr() (*AppRole, error)

RoleOrErr returns the Role value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type AppRolePolicyGroupBy

type AppRolePolicyGroupBy struct {
	// contains filtered or unexported fields
}

AppRolePolicyGroupBy is the group-by builder for AppRolePolicy entities.

func (*AppRolePolicyGroupBy) Aggregate

func (arpgb *AppRolePolicyGroupBy) Aggregate(fns ...AggregateFunc) *AppRolePolicyGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppRolePolicyGroupBy) Bool

func (s *AppRolePolicyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) BoolX

func (s *AppRolePolicyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppRolePolicyGroupBy) Bools

func (s *AppRolePolicyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) BoolsX

func (s *AppRolePolicyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppRolePolicyGroupBy) Float64

func (s *AppRolePolicyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) Float64X

func (s *AppRolePolicyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppRolePolicyGroupBy) Float64s

func (s *AppRolePolicyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) Float64sX

func (s *AppRolePolicyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppRolePolicyGroupBy) Int

func (s *AppRolePolicyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) IntX

func (s *AppRolePolicyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppRolePolicyGroupBy) Ints

func (s *AppRolePolicyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) IntsX

func (s *AppRolePolicyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppRolePolicyGroupBy) Scan

func (arpgb *AppRolePolicyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppRolePolicyGroupBy) ScanX

func (s *AppRolePolicyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppRolePolicyGroupBy) String

func (s *AppRolePolicyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) StringX

func (s *AppRolePolicyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppRolePolicyGroupBy) Strings

func (s *AppRolePolicyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppRolePolicyGroupBy) StringsX

func (s *AppRolePolicyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppRolePolicyMutation

type AppRolePolicyMutation struct {
	// contains filtered or unexported fields
}

AppRolePolicyMutation represents an operation that mutates the AppRolePolicy nodes in the graph.

func (*AppRolePolicyMutation) AddAppID

func (m *AppRolePolicyMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*AppRolePolicyMutation) AddCreatedBy

func (m *AppRolePolicyMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppRolePolicyMutation) AddField

func (m *AppRolePolicyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppRolePolicyMutation) AddUpdatedBy

func (m *AppRolePolicyMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppRolePolicyMutation) AddedAppID

func (m *AppRolePolicyMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*AppRolePolicyMutation) AddedCreatedBy

func (m *AppRolePolicyMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*AppRolePolicyMutation) AddedEdges

func (m *AppRolePolicyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppRolePolicyMutation) AddedField

func (m *AppRolePolicyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppRolePolicyMutation) AddedFields

func (m *AppRolePolicyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppRolePolicyMutation) AddedIDs

func (m *AppRolePolicyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppRolePolicyMutation) AddedUpdatedBy

func (m *AppRolePolicyMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*AppRolePolicyMutation) AppID

func (m *AppRolePolicyMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*AppRolePolicyMutation) AppPolicyID

func (m *AppRolePolicyMutation) AppPolicyID() (r int, exists bool)

AppPolicyID returns the value of the "app_policy_id" field in the mutation.

func (*AppRolePolicyMutation) AppRoleID

func (m *AppRolePolicyMutation) AppRoleID() (r int, exists bool)

AppRoleID returns the value of the "app_role_id" field in the mutation.

func (*AppRolePolicyMutation) ClearEdge

func (m *AppRolePolicyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AppRolePolicyMutation) ClearField

func (m *AppRolePolicyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppRolePolicyMutation) ClearPolicy

func (m *AppRolePolicyMutation) ClearPolicy()

ClearPolicy clears the "policy" edge to the AppPolicy entity.

func (*AppRolePolicyMutation) ClearRole

func (m *AppRolePolicyMutation) ClearRole()

ClearRole clears the "role" edge to the AppRole entity.

func (*AppRolePolicyMutation) ClearUpdatedAt

func (m *AppRolePolicyMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRolePolicyMutation) ClearUpdatedBy

func (m *AppRolePolicyMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRolePolicyMutation) ClearedEdges

func (m *AppRolePolicyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppRolePolicyMutation) ClearedFields

func (m *AppRolePolicyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppRolePolicyMutation) Client

func (m AppRolePolicyMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AppRolePolicyMutation) CreatedAt

func (m *AppRolePolicyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppRolePolicyMutation) CreatedBy

func (m *AppRolePolicyMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*AppRolePolicyMutation) EdgeCleared

func (m *AppRolePolicyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppRolePolicyMutation) Field

func (m *AppRolePolicyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AppRolePolicyMutation) FieldCleared

func (m *AppRolePolicyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppRolePolicyMutation) Fields

func (m *AppRolePolicyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AppRolePolicyMutation) ID

func (m *AppRolePolicyMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AppRolePolicyMutation) IDs

func (m *AppRolePolicyMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AppRolePolicyMutation) OldAppID

func (m *AppRolePolicyMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the AppRolePolicy entity. If the AppRolePolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRolePolicyMutation) OldAppPolicyID

func (m *AppRolePolicyMutation) OldAppPolicyID(ctx context.Context) (v int, err error)

OldAppPolicyID returns the old "app_policy_id" field's value of the AppRolePolicy entity. If the AppRolePolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRolePolicyMutation) OldAppRoleID

func (m *AppRolePolicyMutation) OldAppRoleID(ctx context.Context) (v int, err error)

OldAppRoleID returns the old "app_role_id" field's value of the AppRolePolicy entity. If the AppRolePolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRolePolicyMutation) OldCreatedAt

func (m *AppRolePolicyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AppRolePolicy entity. If the AppRolePolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRolePolicyMutation) OldCreatedBy

func (m *AppRolePolicyMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the AppRolePolicy entity. If the AppRolePolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRolePolicyMutation) OldField

func (m *AppRolePolicyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AppRolePolicyMutation) OldUpdatedAt

func (m *AppRolePolicyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AppRolePolicy entity. If the AppRolePolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRolePolicyMutation) OldUpdatedBy

func (m *AppRolePolicyMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the AppRolePolicy entity. If the AppRolePolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppRolePolicyMutation) Op

func (m *AppRolePolicyMutation) Op() Op

Op returns the operation name.

func (*AppRolePolicyMutation) PolicyCleared

func (m *AppRolePolicyMutation) PolicyCleared() bool

PolicyCleared reports if the "policy" edge to the AppPolicy entity was cleared.

func (*AppRolePolicyMutation) PolicyID

func (m *AppRolePolicyMutation) PolicyID() (id int, exists bool)

PolicyID returns the "policy" edge ID in the mutation.

func (*AppRolePolicyMutation) PolicyIDs

func (m *AppRolePolicyMutation) PolicyIDs() (ids []int)

PolicyIDs returns the "policy" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PolicyID instead. It exists only for internal usage by the builders.

func (*AppRolePolicyMutation) RemovedEdges

func (m *AppRolePolicyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppRolePolicyMutation) RemovedIDs

func (m *AppRolePolicyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AppRolePolicyMutation) ResetAppID

func (m *AppRolePolicyMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppRolePolicyMutation) ResetAppPolicyID

func (m *AppRolePolicyMutation) ResetAppPolicyID()

ResetAppPolicyID resets all changes to the "app_policy_id" field.

func (*AppRolePolicyMutation) ResetAppRoleID

func (m *AppRolePolicyMutation) ResetAppRoleID()

ResetAppRoleID resets all changes to the "app_role_id" field.

func (*AppRolePolicyMutation) ResetCreatedAt

func (m *AppRolePolicyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppRolePolicyMutation) ResetCreatedBy

func (m *AppRolePolicyMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppRolePolicyMutation) ResetEdge

func (m *AppRolePolicyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AppRolePolicyMutation) ResetField

func (m *AppRolePolicyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AppRolePolicyMutation) ResetPolicy

func (m *AppRolePolicyMutation) ResetPolicy()

ResetPolicy resets all changes to the "policy" edge.

func (*AppRolePolicyMutation) ResetRole

func (m *AppRolePolicyMutation) ResetRole()

ResetRole resets all changes to the "role" edge.

func (*AppRolePolicyMutation) ResetUpdatedAt

func (m *AppRolePolicyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppRolePolicyMutation) ResetUpdatedBy

func (m *AppRolePolicyMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppRolePolicyMutation) RoleCleared

func (m *AppRolePolicyMutation) RoleCleared() bool

RoleCleared reports if the "role" edge to the AppRole entity was cleared.

func (*AppRolePolicyMutation) RoleID

func (m *AppRolePolicyMutation) RoleID() (id int, exists bool)

RoleID returns the "role" edge ID in the mutation.

func (*AppRolePolicyMutation) RoleIDs

func (m *AppRolePolicyMutation) RoleIDs() (ids []int)

RoleIDs returns the "role" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoleID instead. It exists only for internal usage by the builders.

func (*AppRolePolicyMutation) SetAppID

func (m *AppRolePolicyMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppRolePolicyMutation) SetAppPolicyID

func (m *AppRolePolicyMutation) SetAppPolicyID(i int)

SetAppPolicyID sets the "app_policy_id" field.

func (*AppRolePolicyMutation) SetAppRoleID

func (m *AppRolePolicyMutation) SetAppRoleID(i int)

SetAppRoleID sets the "app_role_id" field.

func (*AppRolePolicyMutation) SetCreatedAt

func (m *AppRolePolicyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppRolePolicyMutation) SetCreatedBy

func (m *AppRolePolicyMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppRolePolicyMutation) SetField

func (m *AppRolePolicyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AppRolePolicyMutation) SetID

func (m *AppRolePolicyMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AppRolePolicy entities.

func (*AppRolePolicyMutation) SetOp

func (m *AppRolePolicyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppRolePolicyMutation) SetPolicyID

func (m *AppRolePolicyMutation) SetPolicyID(id int)

SetPolicyID sets the "policy" edge to the AppPolicy entity by id.

func (*AppRolePolicyMutation) SetRoleID

func (m *AppRolePolicyMutation) SetRoleID(id int)

SetRoleID sets the "role" edge to the AppRole entity by id.

func (*AppRolePolicyMutation) SetUpdatedAt

func (m *AppRolePolicyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppRolePolicyMutation) SetUpdatedBy

func (m *AppRolePolicyMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (AppRolePolicyMutation) Tx

func (m AppRolePolicyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppRolePolicyMutation) Type

func (m *AppRolePolicyMutation) Type() string

Type returns the node type of this mutation (AppRolePolicy).

func (*AppRolePolicyMutation) UpdatedAt

func (m *AppRolePolicyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppRolePolicyMutation) UpdatedAtCleared

func (m *AppRolePolicyMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*AppRolePolicyMutation) UpdatedBy

func (m *AppRolePolicyMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*AppRolePolicyMutation) UpdatedByCleared

func (m *AppRolePolicyMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*AppRolePolicyMutation) Where

Where appends a list predicates to the AppRolePolicyMutation builder.

func (*AppRolePolicyMutation) WhereP

func (m *AppRolePolicyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppRolePolicyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppRolePolicyQuery

type AppRolePolicyQuery struct {
	// contains filtered or unexported fields
}

AppRolePolicyQuery is the builder for querying AppRolePolicy entities.

func (*AppRolePolicyQuery) Aggregate

func (arpq *AppRolePolicyQuery) Aggregate(fns ...AggregateFunc) *AppRolePolicySelect

Aggregate returns a AppRolePolicySelect configured with the given aggregations.

func (*AppRolePolicyQuery) All

func (arpq *AppRolePolicyQuery) All(ctx context.Context) ([]*AppRolePolicy, error)

All executes the query and returns a list of AppRolePolicies.

func (*AppRolePolicyQuery) AllX

func (arpq *AppRolePolicyQuery) AllX(ctx context.Context) []*AppRolePolicy

AllX is like All, but panics if an error occurs.

func (*AppRolePolicyQuery) Clone

func (arpq *AppRolePolicyQuery) Clone() *AppRolePolicyQuery

Clone returns a duplicate of the AppRolePolicyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppRolePolicyQuery) Count

func (arpq *AppRolePolicyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppRolePolicyQuery) CountX

func (arpq *AppRolePolicyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppRolePolicyQuery) Exist

func (arpq *AppRolePolicyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppRolePolicyQuery) ExistX

func (arpq *AppRolePolicyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppRolePolicyQuery) First

func (arpq *AppRolePolicyQuery) First(ctx context.Context) (*AppRolePolicy, error)

First returns the first AppRolePolicy entity from the query. Returns a *NotFoundError when no AppRolePolicy was found.

func (*AppRolePolicyQuery) FirstID

func (arpq *AppRolePolicyQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppRolePolicy ID from the query. Returns a *NotFoundError when no AppRolePolicy ID was found.

func (*AppRolePolicyQuery) FirstIDX

func (arpq *AppRolePolicyQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppRolePolicyQuery) FirstX

func (arpq *AppRolePolicyQuery) FirstX(ctx context.Context) *AppRolePolicy

FirstX is like First, but panics if an error occurs.

func (*AppRolePolicyQuery) GroupBy

func (arpq *AppRolePolicyQuery) GroupBy(field string, fields ...string) *AppRolePolicyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppRolePolicy.Query().
	GroupBy(approlepolicy.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppRolePolicyQuery) IDs

func (arpq *AppRolePolicyQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppRolePolicy IDs.

func (*AppRolePolicyQuery) IDsX

func (arpq *AppRolePolicyQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppRolePolicyQuery) Limit

func (arpq *AppRolePolicyQuery) Limit(limit int) *AppRolePolicyQuery

Limit the number of records to be returned by this query.

func (*AppRolePolicyQuery) Offset

func (arpq *AppRolePolicyQuery) Offset(offset int) *AppRolePolicyQuery

Offset to start from.

func (*AppRolePolicyQuery) Only

Only returns a single AppRolePolicy entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppRolePolicy entity is found. Returns a *NotFoundError when no AppRolePolicy entities are found.

func (*AppRolePolicyQuery) OnlyID

func (arpq *AppRolePolicyQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppRolePolicy ID in the query. Returns a *NotSingularError when more than one AppRolePolicy ID is found. Returns a *NotFoundError when no entities are found.

func (*AppRolePolicyQuery) OnlyIDX

func (arpq *AppRolePolicyQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppRolePolicyQuery) OnlyX

func (arpq *AppRolePolicyQuery) OnlyX(ctx context.Context) *AppRolePolicy

OnlyX is like Only, but panics if an error occurs.

func (*AppRolePolicyQuery) Order

Order specifies how the records should be ordered.

func (*AppRolePolicyQuery) QueryPolicy

func (arpq *AppRolePolicyQuery) QueryPolicy() *AppPolicyQuery

QueryPolicy chains the current query on the "policy" edge.

func (*AppRolePolicyQuery) QueryRole

func (arpq *AppRolePolicyQuery) QueryRole() *AppRoleQuery

QueryRole chains the current query on the "role" edge.

func (*AppRolePolicyQuery) Select

func (arpq *AppRolePolicyQuery) Select(fields ...string) *AppRolePolicySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppRolePolicy.Query().
	Select(approlepolicy.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppRolePolicyQuery) Unique

func (arpq *AppRolePolicyQuery) Unique(unique bool) *AppRolePolicyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppRolePolicyQuery) Where

Where adds a new predicate for the AppRolePolicyQuery builder.

func (*AppRolePolicyQuery) WithPolicy

func (arpq *AppRolePolicyQuery) WithPolicy(opts ...func(*AppPolicyQuery)) *AppRolePolicyQuery

WithPolicy tells the query-builder to eager-load the nodes that are connected to the "policy" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppRolePolicyQuery) WithRole

func (arpq *AppRolePolicyQuery) WithRole(opts ...func(*AppRoleQuery)) *AppRolePolicyQuery

WithRole tells the query-builder to eager-load the nodes that are connected to the "role" edge. The optional arguments are used to configure the query builder of the edge.

type AppRolePolicySelect

type AppRolePolicySelect struct {
	*AppRolePolicyQuery
	// contains filtered or unexported fields
}

AppRolePolicySelect is the builder for selecting fields of AppRolePolicy entities.

func (*AppRolePolicySelect) Aggregate

func (arps *AppRolePolicySelect) Aggregate(fns ...AggregateFunc) *AppRolePolicySelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppRolePolicySelect) Bool

func (s *AppRolePolicySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) BoolX

func (s *AppRolePolicySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppRolePolicySelect) Bools

func (s *AppRolePolicySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) BoolsX

func (s *AppRolePolicySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppRolePolicySelect) Float64

func (s *AppRolePolicySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) Float64X

func (s *AppRolePolicySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppRolePolicySelect) Float64s

func (s *AppRolePolicySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) Float64sX

func (s *AppRolePolicySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppRolePolicySelect) Int

func (s *AppRolePolicySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) IntX

func (s *AppRolePolicySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppRolePolicySelect) Ints

func (s *AppRolePolicySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) IntsX

func (s *AppRolePolicySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppRolePolicySelect) Scan

func (arps *AppRolePolicySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppRolePolicySelect) ScanX

func (s *AppRolePolicySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppRolePolicySelect) String

func (s *AppRolePolicySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) StringX

func (s *AppRolePolicySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppRolePolicySelect) Strings

func (s *AppRolePolicySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppRolePolicySelect) StringsX

func (s *AppRolePolicySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppRolePolicyUpdate

type AppRolePolicyUpdate struct {
	// contains filtered or unexported fields
}

AppRolePolicyUpdate is the builder for updating AppRolePolicy entities.

func (*AppRolePolicyUpdate) AddAppID

func (arpu *AppRolePolicyUpdate) AddAppID(i int) *AppRolePolicyUpdate

AddAppID adds i to the "app_id" field.

func (*AppRolePolicyUpdate) AddUpdatedBy

func (arpu *AppRolePolicyUpdate) AddUpdatedBy(i int) *AppRolePolicyUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppRolePolicyUpdate) ClearPolicy

func (arpu *AppRolePolicyUpdate) ClearPolicy() *AppRolePolicyUpdate

ClearPolicy clears the "policy" edge to the AppPolicy entity.

func (*AppRolePolicyUpdate) ClearRole

func (arpu *AppRolePolicyUpdate) ClearRole() *AppRolePolicyUpdate

ClearRole clears the "role" edge to the AppRole entity.

func (*AppRolePolicyUpdate) ClearUpdatedAt

func (arpu *AppRolePolicyUpdate) ClearUpdatedAt() *AppRolePolicyUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRolePolicyUpdate) ClearUpdatedBy

func (arpu *AppRolePolicyUpdate) ClearUpdatedBy() *AppRolePolicyUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRolePolicyUpdate) Exec

func (arpu *AppRolePolicyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRolePolicyUpdate) ExecX

func (arpu *AppRolePolicyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyUpdate) Mutation

func (arpu *AppRolePolicyUpdate) Mutation() *AppRolePolicyMutation

Mutation returns the AppRolePolicyMutation object of the builder.

func (*AppRolePolicyUpdate) Save

func (arpu *AppRolePolicyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppRolePolicyUpdate) SaveX

func (arpu *AppRolePolicyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppRolePolicyUpdate) SetAppID

func (arpu *AppRolePolicyUpdate) SetAppID(i int) *AppRolePolicyUpdate

SetAppID sets the "app_id" field.

func (*AppRolePolicyUpdate) SetAppPolicyID

func (arpu *AppRolePolicyUpdate) SetAppPolicyID(i int) *AppRolePolicyUpdate

SetAppPolicyID sets the "app_policy_id" field.

func (*AppRolePolicyUpdate) SetAppRoleID

func (arpu *AppRolePolicyUpdate) SetAppRoleID(i int) *AppRolePolicyUpdate

SetAppRoleID sets the "app_role_id" field.

func (*AppRolePolicyUpdate) SetNillableUpdatedAt

func (arpu *AppRolePolicyUpdate) SetNillableUpdatedAt(t *time.Time) *AppRolePolicyUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppRolePolicyUpdate) SetNillableUpdatedBy

func (arpu *AppRolePolicyUpdate) SetNillableUpdatedBy(i *int) *AppRolePolicyUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppRolePolicyUpdate) SetPolicy

func (arpu *AppRolePolicyUpdate) SetPolicy(a *AppPolicy) *AppRolePolicyUpdate

SetPolicy sets the "policy" edge to the AppPolicy entity.

func (*AppRolePolicyUpdate) SetPolicyID

func (arpu *AppRolePolicyUpdate) SetPolicyID(id int) *AppRolePolicyUpdate

SetPolicyID sets the "policy" edge to the AppPolicy entity by ID.

func (*AppRolePolicyUpdate) SetRole

func (arpu *AppRolePolicyUpdate) SetRole(a *AppRole) *AppRolePolicyUpdate

SetRole sets the "role" edge to the AppRole entity.

func (*AppRolePolicyUpdate) SetRoleID

func (arpu *AppRolePolicyUpdate) SetRoleID(id int) *AppRolePolicyUpdate

SetRoleID sets the "role" edge to the AppRole entity by ID.

func (*AppRolePolicyUpdate) SetUpdatedAt

func (arpu *AppRolePolicyUpdate) SetUpdatedAt(t time.Time) *AppRolePolicyUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppRolePolicyUpdate) SetUpdatedBy

func (arpu *AppRolePolicyUpdate) SetUpdatedBy(i int) *AppRolePolicyUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppRolePolicyUpdate) Where

Where appends a list predicates to the AppRolePolicyUpdate builder.

type AppRolePolicyUpdateOne

type AppRolePolicyUpdateOne struct {
	// contains filtered or unexported fields
}

AppRolePolicyUpdateOne is the builder for updating a single AppRolePolicy entity.

func (*AppRolePolicyUpdateOne) AddAppID

AddAppID adds i to the "app_id" field.

func (*AppRolePolicyUpdateOne) AddUpdatedBy

func (arpuo *AppRolePolicyUpdateOne) AddUpdatedBy(i int) *AppRolePolicyUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppRolePolicyUpdateOne) ClearPolicy

func (arpuo *AppRolePolicyUpdateOne) ClearPolicy() *AppRolePolicyUpdateOne

ClearPolicy clears the "policy" edge to the AppPolicy entity.

func (*AppRolePolicyUpdateOne) ClearRole

func (arpuo *AppRolePolicyUpdateOne) ClearRole() *AppRolePolicyUpdateOne

ClearRole clears the "role" edge to the AppRole entity.

func (*AppRolePolicyUpdateOne) ClearUpdatedAt

func (arpuo *AppRolePolicyUpdateOne) ClearUpdatedAt() *AppRolePolicyUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRolePolicyUpdateOne) ClearUpdatedBy

func (arpuo *AppRolePolicyUpdateOne) ClearUpdatedBy() *AppRolePolicyUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRolePolicyUpdateOne) Exec

func (arpuo *AppRolePolicyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppRolePolicyUpdateOne) ExecX

func (arpuo *AppRolePolicyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyUpdateOne) Mutation

func (arpuo *AppRolePolicyUpdateOne) Mutation() *AppRolePolicyMutation

Mutation returns the AppRolePolicyMutation object of the builder.

func (*AppRolePolicyUpdateOne) Save

Save executes the query and returns the updated AppRolePolicy entity.

func (*AppRolePolicyUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*AppRolePolicyUpdateOne) Select

func (arpuo *AppRolePolicyUpdateOne) Select(field string, fields ...string) *AppRolePolicyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppRolePolicyUpdateOne) SetAppID

SetAppID sets the "app_id" field.

func (*AppRolePolicyUpdateOne) SetAppPolicyID

func (arpuo *AppRolePolicyUpdateOne) SetAppPolicyID(i int) *AppRolePolicyUpdateOne

SetAppPolicyID sets the "app_policy_id" field.

func (*AppRolePolicyUpdateOne) SetAppRoleID

func (arpuo *AppRolePolicyUpdateOne) SetAppRoleID(i int) *AppRolePolicyUpdateOne

SetAppRoleID sets the "app_role_id" field.

func (*AppRolePolicyUpdateOne) SetNillableUpdatedAt

func (arpuo *AppRolePolicyUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppRolePolicyUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppRolePolicyUpdateOne) SetNillableUpdatedBy

func (arpuo *AppRolePolicyUpdateOne) SetNillableUpdatedBy(i *int) *AppRolePolicyUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppRolePolicyUpdateOne) SetPolicy

SetPolicy sets the "policy" edge to the AppPolicy entity.

func (*AppRolePolicyUpdateOne) SetPolicyID

func (arpuo *AppRolePolicyUpdateOne) SetPolicyID(id int) *AppRolePolicyUpdateOne

SetPolicyID sets the "policy" edge to the AppPolicy entity by ID.

func (*AppRolePolicyUpdateOne) SetRole

SetRole sets the "role" edge to the AppRole entity.

func (*AppRolePolicyUpdateOne) SetRoleID

func (arpuo *AppRolePolicyUpdateOne) SetRoleID(id int) *AppRolePolicyUpdateOne

SetRoleID sets the "role" edge to the AppRole entity by ID.

func (*AppRolePolicyUpdateOne) SetUpdatedAt

func (arpuo *AppRolePolicyUpdateOne) SetUpdatedAt(t time.Time) *AppRolePolicyUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppRolePolicyUpdateOne) SetUpdatedBy

func (arpuo *AppRolePolicyUpdateOne) SetUpdatedBy(i int) *AppRolePolicyUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppRolePolicyUpdateOne) Where

Where appends a list predicates to the AppRolePolicyUpdate builder.

type AppRolePolicyUpsert

type AppRolePolicyUpsert struct {
	*sql.UpdateSet
}

AppRolePolicyUpsert is the "OnConflict" setter.

func (*AppRolePolicyUpsert) AddAppID

AddAppID adds v to the "app_id" field.

func (*AppRolePolicyUpsert) AddUpdatedBy

func (u *AppRolePolicyUpsert) AddUpdatedBy(v int) *AppRolePolicyUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppRolePolicyUpsert) ClearUpdatedAt

func (u *AppRolePolicyUpsert) ClearUpdatedAt() *AppRolePolicyUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRolePolicyUpsert) ClearUpdatedBy

func (u *AppRolePolicyUpsert) ClearUpdatedBy() *AppRolePolicyUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRolePolicyUpsert) SetAppID

SetAppID sets the "app_id" field.

func (*AppRolePolicyUpsert) SetAppPolicyID

func (u *AppRolePolicyUpsert) SetAppPolicyID(v int) *AppRolePolicyUpsert

SetAppPolicyID sets the "app_policy_id" field.

func (*AppRolePolicyUpsert) SetAppRoleID

func (u *AppRolePolicyUpsert) SetAppRoleID(v int) *AppRolePolicyUpsert

SetAppRoleID sets the "app_role_id" field.

func (*AppRolePolicyUpsert) SetUpdatedAt

func (u *AppRolePolicyUpsert) SetUpdatedAt(v time.Time) *AppRolePolicyUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppRolePolicyUpsert) SetUpdatedBy

func (u *AppRolePolicyUpsert) SetUpdatedBy(v int) *AppRolePolicyUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppRolePolicyUpsert) UpdateAppID

func (u *AppRolePolicyUpsert) UpdateAppID() *AppRolePolicyUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*AppRolePolicyUpsert) UpdateAppPolicyID

func (u *AppRolePolicyUpsert) UpdateAppPolicyID() *AppRolePolicyUpsert

UpdateAppPolicyID sets the "app_policy_id" field to the value that was provided on create.

func (*AppRolePolicyUpsert) UpdateAppRoleID

func (u *AppRolePolicyUpsert) UpdateAppRoleID() *AppRolePolicyUpsert

UpdateAppRoleID sets the "app_role_id" field to the value that was provided on create.

func (*AppRolePolicyUpsert) UpdateUpdatedAt

func (u *AppRolePolicyUpsert) UpdateUpdatedAt() *AppRolePolicyUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppRolePolicyUpsert) UpdateUpdatedBy

func (u *AppRolePolicyUpsert) UpdateUpdatedBy() *AppRolePolicyUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppRolePolicyUpsertBulk

type AppRolePolicyUpsertBulk struct {
	// contains filtered or unexported fields
}

AppRolePolicyUpsertBulk is the builder for "upsert"-ing a bulk of AppRolePolicy nodes.

func (*AppRolePolicyUpsertBulk) AddAppID

AddAppID adds v to the "app_id" field.

func (*AppRolePolicyUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*AppRolePolicyUpsertBulk) ClearUpdatedAt

func (u *AppRolePolicyUpsertBulk) ClearUpdatedAt() *AppRolePolicyUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRolePolicyUpsertBulk) ClearUpdatedBy

func (u *AppRolePolicyUpsertBulk) ClearUpdatedBy() *AppRolePolicyUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRolePolicyUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppRolePolicyUpsertBulk) Exec

Exec executes the query.

func (*AppRolePolicyUpsertBulk) ExecX

func (u *AppRolePolicyUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppRolePolicy.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppRolePolicyUpsertBulk) SetAppID

SetAppID sets the "app_id" field.

func (*AppRolePolicyUpsertBulk) SetAppPolicyID

func (u *AppRolePolicyUpsertBulk) SetAppPolicyID(v int) *AppRolePolicyUpsertBulk

SetAppPolicyID sets the "app_policy_id" field.

func (*AppRolePolicyUpsertBulk) SetAppRoleID

SetAppRoleID sets the "app_role_id" field.

func (*AppRolePolicyUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*AppRolePolicyUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*AppRolePolicyUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the AppRolePolicyCreateBulk.OnConflict documentation for more info.

func (*AppRolePolicyUpsertBulk) UpdateAppID

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*AppRolePolicyUpsertBulk) UpdateAppPolicyID

func (u *AppRolePolicyUpsertBulk) UpdateAppPolicyID() *AppRolePolicyUpsertBulk

UpdateAppPolicyID sets the "app_policy_id" field to the value that was provided on create.

func (*AppRolePolicyUpsertBulk) UpdateAppRoleID

func (u *AppRolePolicyUpsertBulk) UpdateAppRoleID() *AppRolePolicyUpsertBulk

UpdateAppRoleID sets the "app_role_id" field to the value that was provided on create.

func (*AppRolePolicyUpsertBulk) UpdateNewValues

func (u *AppRolePolicyUpsertBulk) UpdateNewValues() *AppRolePolicyUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppRolePolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(approlepolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*AppRolePolicyUpsertBulk) UpdateUpdatedAt

func (u *AppRolePolicyUpsertBulk) UpdateUpdatedAt() *AppRolePolicyUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppRolePolicyUpsertBulk) UpdateUpdatedBy

func (u *AppRolePolicyUpsertBulk) UpdateUpdatedBy() *AppRolePolicyUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppRolePolicyUpsertOne

type AppRolePolicyUpsertOne struct {
	// contains filtered or unexported fields
}

AppRolePolicyUpsertOne is the builder for "upsert"-ing

one AppRolePolicy node.

func (*AppRolePolicyUpsertOne) AddAppID

AddAppID adds v to the "app_id" field.

func (*AppRolePolicyUpsertOne) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*AppRolePolicyUpsertOne) ClearUpdatedAt

func (u *AppRolePolicyUpsertOne) ClearUpdatedAt() *AppRolePolicyUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRolePolicyUpsertOne) ClearUpdatedBy

func (u *AppRolePolicyUpsertOne) ClearUpdatedBy() *AppRolePolicyUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRolePolicyUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppRolePolicyUpsertOne) Exec

Exec executes the query.

func (*AppRolePolicyUpsertOne) ExecX

func (u *AppRolePolicyUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRolePolicyUpsertOne) ID

func (u *AppRolePolicyUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppRolePolicyUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*AppRolePolicyUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppRolePolicy.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppRolePolicyUpsertOne) SetAppID

SetAppID sets the "app_id" field.

func (*AppRolePolicyUpsertOne) SetAppPolicyID

func (u *AppRolePolicyUpsertOne) SetAppPolicyID(v int) *AppRolePolicyUpsertOne

SetAppPolicyID sets the "app_policy_id" field.

func (*AppRolePolicyUpsertOne) SetAppRoleID

SetAppRoleID sets the "app_role_id" field.

func (*AppRolePolicyUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*AppRolePolicyUpsertOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*AppRolePolicyUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the AppRolePolicyCreate.OnConflict documentation for more info.

func (*AppRolePolicyUpsertOne) UpdateAppID

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*AppRolePolicyUpsertOne) UpdateAppPolicyID

func (u *AppRolePolicyUpsertOne) UpdateAppPolicyID() *AppRolePolicyUpsertOne

UpdateAppPolicyID sets the "app_policy_id" field to the value that was provided on create.

func (*AppRolePolicyUpsertOne) UpdateAppRoleID

func (u *AppRolePolicyUpsertOne) UpdateAppRoleID() *AppRolePolicyUpsertOne

UpdateAppRoleID sets the "app_role_id" field to the value that was provided on create.

func (*AppRolePolicyUpsertOne) UpdateNewValues

func (u *AppRolePolicyUpsertOne) UpdateNewValues() *AppRolePolicyUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppRolePolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(approlepolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*AppRolePolicyUpsertOne) UpdateUpdatedAt

func (u *AppRolePolicyUpsertOne) UpdateUpdatedAt() *AppRolePolicyUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppRolePolicyUpsertOne) UpdateUpdatedBy

func (u *AppRolePolicyUpsertOne) UpdateUpdatedBy() *AppRolePolicyUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppRolePolicyWhereInput

type AppRolePolicyWhereInput struct {
	Predicates []predicate.AppRolePolicy  `json:"-"`
	Not        *AppRolePolicyWhereInput   `json:"not,omitempty"`
	Or         []*AppRolePolicyWhereInput `json:"or,omitempty"`
	And        []*AppRolePolicyWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_role_id" field predicates.
	AppRoleID      *int  `json:"appRoleID,omitempty"`
	AppRoleIDNEQ   *int  `json:"appRoleIDNEQ,omitempty"`
	AppRoleIDIn    []int `json:"appRoleIDIn,omitempty"`
	AppRoleIDNotIn []int `json:"appRoleIDNotIn,omitempty"`

	// "app_policy_id" field predicates.
	AppPolicyID      *int  `json:"appPolicyID,omitempty"`
	AppPolicyIDNEQ   *int  `json:"appPolicyIDNEQ,omitempty"`
	AppPolicyIDIn    []int `json:"appPolicyIDIn,omitempty"`
	AppPolicyIDNotIn []int `json:"appPolicyIDNotIn,omitempty"`

	// "app_id" field predicates.
	AppID      *int  `json:"appID,omitempty"`
	AppIDNEQ   *int  `json:"appIDNEQ,omitempty"`
	AppIDIn    []int `json:"appIDIn,omitempty"`
	AppIDNotIn []int `json:"appIDNotIn,omitempty"`
	AppIDGT    *int  `json:"appIDGT,omitempty"`
	AppIDGTE   *int  `json:"appIDGTE,omitempty"`
	AppIDLT    *int  `json:"appIDLT,omitempty"`
	AppIDLTE   *int  `json:"appIDLTE,omitempty"`

	// "role" edge predicates.
	HasRole     *bool                `json:"hasRole,omitempty"`
	HasRoleWith []*AppRoleWhereInput `json:"hasRoleWith,omitempty"`

	// "policy" edge predicates.
	HasPolicy     *bool                  `json:"hasPolicy,omitempty"`
	HasPolicyWith []*AppPolicyWhereInput `json:"hasPolicyWith,omitempty"`
}

AppRolePolicyWhereInput represents a where input for filtering AppRolePolicy queries.

func (*AppRolePolicyWhereInput) AddPredicates

func (i *AppRolePolicyWhereInput) AddPredicates(predicates ...predicate.AppRolePolicy)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppRolePolicyWhereInput) Filter

Filter applies the AppRolePolicyWhereInput filter on the AppRolePolicyQuery builder.

func (*AppRolePolicyWhereInput) P

P returns a predicate for filtering approlepolicies. An error is returned if the input is empty or invalid.

type AppRoleQuery

type AppRoleQuery struct {
	// contains filtered or unexported fields
}

AppRoleQuery is the builder for querying AppRole entities.

func (*AppRoleQuery) Aggregate

func (arq *AppRoleQuery) Aggregate(fns ...AggregateFunc) *AppRoleSelect

Aggregate returns a AppRoleSelect configured with the given aggregations.

func (*AppRoleQuery) All

func (arq *AppRoleQuery) All(ctx context.Context) ([]*AppRole, error)

All executes the query and returns a list of AppRoles.

func (*AppRoleQuery) AllX

func (arq *AppRoleQuery) AllX(ctx context.Context) []*AppRole

AllX is like All, but panics if an error occurs.

func (*AppRoleQuery) Clone

func (arq *AppRoleQuery) Clone() *AppRoleQuery

Clone returns a duplicate of the AppRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppRoleQuery) CollectFields

func (ar *AppRoleQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppRoleQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AppRoleQuery) Count

func (arq *AppRoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppRoleQuery) CountX

func (arq *AppRoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppRoleQuery) Exist

func (arq *AppRoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppRoleQuery) ExistX

func (arq *AppRoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppRoleQuery) First

func (arq *AppRoleQuery) First(ctx context.Context) (*AppRole, error)

First returns the first AppRole entity from the query. Returns a *NotFoundError when no AppRole was found.

func (*AppRoleQuery) FirstID

func (arq *AppRoleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AppRole ID from the query. Returns a *NotFoundError when no AppRole ID was found.

func (*AppRoleQuery) FirstIDX

func (arq *AppRoleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppRoleQuery) FirstX

func (arq *AppRoleQuery) FirstX(ctx context.Context) *AppRole

FirstX is like First, but panics if an error occurs.

func (*AppRoleQuery) GroupBy

func (arq *AppRoleQuery) GroupBy(field string, fields ...string) *AppRoleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AppRole.Query().
	GroupBy(approle.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppRoleQuery) IDs

func (arq *AppRoleQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AppRole IDs.

func (*AppRoleQuery) IDsX

func (arq *AppRoleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AppRoleQuery) Limit

func (arq *AppRoleQuery) Limit(limit int) *AppRoleQuery

Limit the number of records to be returned by this query.

func (*AppRoleQuery) Offset

func (arq *AppRoleQuery) Offset(offset int) *AppRoleQuery

Offset to start from.

func (*AppRoleQuery) Only

func (arq *AppRoleQuery) Only(ctx context.Context) (*AppRole, error)

Only returns a single AppRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AppRole entity is found. Returns a *NotFoundError when no AppRole entities are found.

func (*AppRoleQuery) OnlyID

func (arq *AppRoleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AppRole ID in the query. Returns a *NotSingularError when more than one AppRole ID is found. Returns a *NotFoundError when no entities are found.

func (*AppRoleQuery) OnlyIDX

func (arq *AppRoleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppRoleQuery) OnlyX

func (arq *AppRoleQuery) OnlyX(ctx context.Context) *AppRole

OnlyX is like Only, but panics if an error occurs.

func (*AppRoleQuery) Order

func (arq *AppRoleQuery) Order(o ...approle.OrderOption) *AppRoleQuery

Order specifies how the records should be ordered.

func (*AppRoleQuery) Paginate

func (ar *AppRoleQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppRolePaginateOption,
) (*AppRoleConnection, error)

Paginate executes the query and returns a relay based cursor connection to AppRole.

func (*AppRoleQuery) QueryApp

func (arq *AppRoleQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*AppRoleQuery) QueryAppRolePolicy

func (arq *AppRoleQuery) QueryAppRolePolicy() *AppRolePolicyQuery

QueryAppRolePolicy chains the current query on the "app_role_policy" edge.

func (*AppRoleQuery) QueryPolicies

func (arq *AppRoleQuery) QueryPolicies() *AppPolicyQuery

QueryPolicies chains the current query on the "policies" edge.

func (*AppRoleQuery) Select

func (arq *AppRoleQuery) Select(fields ...string) *AppRoleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.AppRole.Query().
	Select(approle.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppRoleQuery) Unique

func (arq *AppRoleQuery) Unique(unique bool) *AppRoleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AppRoleQuery) Where

func (arq *AppRoleQuery) Where(ps ...predicate.AppRole) *AppRoleQuery

Where adds a new predicate for the AppRoleQuery builder.

func (*AppRoleQuery) WithApp

func (arq *AppRoleQuery) WithApp(opts ...func(*AppQuery)) *AppRoleQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppRoleQuery) WithAppRolePolicy

func (arq *AppRoleQuery) WithAppRolePolicy(opts ...func(*AppRolePolicyQuery)) *AppRoleQuery

WithAppRolePolicy tells the query-builder to eager-load the nodes that are connected to the "app_role_policy" edge. The optional arguments are used to configure the query builder of the edge.

func (*AppRoleQuery) WithNamedAppRolePolicy

func (arq *AppRoleQuery) WithNamedAppRolePolicy(name string, opts ...func(*AppRolePolicyQuery)) *AppRoleQuery

WithNamedAppRolePolicy tells the query-builder to eager-load the nodes that are connected to the "app_role_policy" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppRoleQuery) WithNamedPolicies

func (arq *AppRoleQuery) WithNamedPolicies(name string, opts ...func(*AppPolicyQuery)) *AppRoleQuery

WithNamedPolicies tells the query-builder to eager-load the nodes that are connected to the "policies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AppRoleQuery) WithPolicies

func (arq *AppRoleQuery) WithPolicies(opts ...func(*AppPolicyQuery)) *AppRoleQuery

WithPolicies tells the query-builder to eager-load the nodes that are connected to the "policies" edge. The optional arguments are used to configure the query builder of the edge.

type AppRoleSelect

type AppRoleSelect struct {
	*AppRoleQuery
	// contains filtered or unexported fields
}

AppRoleSelect is the builder for selecting fields of AppRole entities.

func (*AppRoleSelect) Aggregate

func (ars *AppRoleSelect) Aggregate(fns ...AggregateFunc) *AppRoleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppRoleSelect) Bool

func (s *AppRoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) BoolX

func (s *AppRoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppRoleSelect) Bools

func (s *AppRoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) BoolsX

func (s *AppRoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppRoleSelect) Float64

func (s *AppRoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) Float64X

func (s *AppRoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppRoleSelect) Float64s

func (s *AppRoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) Float64sX

func (s *AppRoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppRoleSelect) Int

func (s *AppRoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) IntX

func (s *AppRoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppRoleSelect) Ints

func (s *AppRoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) IntsX

func (s *AppRoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppRoleSelect) Scan

func (ars *AppRoleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppRoleSelect) ScanX

func (s *AppRoleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppRoleSelect) String

func (s *AppRoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) StringX

func (s *AppRoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppRoleSelect) Strings

func (s *AppRoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppRoleSelect) StringsX

func (s *AppRoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppRoleUpdate

type AppRoleUpdate struct {
	// contains filtered or unexported fields
}

AppRoleUpdate is the builder for updating AppRole entities.

func (*AppRoleUpdate) AddAppRolePolicy

func (aru *AppRoleUpdate) AddAppRolePolicy(a ...*AppRolePolicy) *AppRoleUpdate

AddAppRolePolicy adds the "app_role_policy" edges to the AppRolePolicy entity.

func (*AppRoleUpdate) AddAppRolePolicyIDs

func (aru *AppRoleUpdate) AddAppRolePolicyIDs(ids ...int) *AppRoleUpdate

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppRoleUpdate) AddPolicies

func (aru *AppRoleUpdate) AddPolicies(a ...*AppPolicy) *AppRoleUpdate

AddPolicies adds the "policies" edges to the AppPolicy entity.

func (*AppRoleUpdate) AddPolicyIDs

func (aru *AppRoleUpdate) AddPolicyIDs(ids ...int) *AppRoleUpdate

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by IDs.

func (*AppRoleUpdate) AddUpdatedBy

func (aru *AppRoleUpdate) AddUpdatedBy(i int) *AppRoleUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppRoleUpdate) ClearAppRolePolicy

func (aru *AppRoleUpdate) ClearAppRolePolicy() *AppRoleUpdate

ClearAppRolePolicy clears all "app_role_policy" edges to the AppRolePolicy entity.

func (*AppRoleUpdate) ClearComments

func (aru *AppRoleUpdate) ClearComments() *AppRoleUpdate

ClearComments clears the value of the "comments" field.

func (*AppRoleUpdate) ClearPolicies

func (aru *AppRoleUpdate) ClearPolicies() *AppRoleUpdate

ClearPolicies clears all "policies" edges to the AppPolicy entity.

func (*AppRoleUpdate) ClearUpdatedAt

func (aru *AppRoleUpdate) ClearUpdatedAt() *AppRoleUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRoleUpdate) ClearUpdatedBy

func (aru *AppRoleUpdate) ClearUpdatedBy() *AppRoleUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRoleUpdate) Exec

func (aru *AppRoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRoleUpdate) ExecX

func (aru *AppRoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleUpdate) Mutation

func (aru *AppRoleUpdate) Mutation() *AppRoleMutation

Mutation returns the AppRoleMutation object of the builder.

func (*AppRoleUpdate) RemoveAppRolePolicy

func (aru *AppRoleUpdate) RemoveAppRolePolicy(a ...*AppRolePolicy) *AppRoleUpdate

RemoveAppRolePolicy removes "app_role_policy" edges to AppRolePolicy entities.

func (*AppRoleUpdate) RemoveAppRolePolicyIDs

func (aru *AppRoleUpdate) RemoveAppRolePolicyIDs(ids ...int) *AppRoleUpdate

RemoveAppRolePolicyIDs removes the "app_role_policy" edge to AppRolePolicy entities by IDs.

func (*AppRoleUpdate) RemovePolicies

func (aru *AppRoleUpdate) RemovePolicies(a ...*AppPolicy) *AppRoleUpdate

RemovePolicies removes "policies" edges to AppPolicy entities.

func (*AppRoleUpdate) RemovePolicyIDs

func (aru *AppRoleUpdate) RemovePolicyIDs(ids ...int) *AppRoleUpdate

RemovePolicyIDs removes the "policies" edge to AppPolicy entities by IDs.

func (*AppRoleUpdate) Save

func (aru *AppRoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppRoleUpdate) SaveX

func (aru *AppRoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppRoleUpdate) SetAutoGrant

func (aru *AppRoleUpdate) SetAutoGrant(b bool) *AppRoleUpdate

SetAutoGrant sets the "auto_grant" field.

func (*AppRoleUpdate) SetComments

func (aru *AppRoleUpdate) SetComments(s string) *AppRoleUpdate

SetComments sets the "comments" field.

func (*AppRoleUpdate) SetEditable

func (aru *AppRoleUpdate) SetEditable(b bool) *AppRoleUpdate

SetEditable sets the "editable" field.

func (*AppRoleUpdate) SetInput

SetInput applies the change-set in the UpdateAppRoleInput on the AppRoleUpdate builder.

func (*AppRoleUpdate) SetName

func (aru *AppRoleUpdate) SetName(s string) *AppRoleUpdate

SetName sets the "name" field.

func (*AppRoleUpdate) SetNillableAutoGrant

func (aru *AppRoleUpdate) SetNillableAutoGrant(b *bool) *AppRoleUpdate

SetNillableAutoGrant sets the "auto_grant" field if the given value is not nil.

func (*AppRoleUpdate) SetNillableComments

func (aru *AppRoleUpdate) SetNillableComments(s *string) *AppRoleUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppRoleUpdate) SetNillableEditable

func (aru *AppRoleUpdate) SetNillableEditable(b *bool) *AppRoleUpdate

SetNillableEditable sets the "editable" field if the given value is not nil.

func (*AppRoleUpdate) SetNillableUpdatedAt

func (aru *AppRoleUpdate) SetNillableUpdatedAt(t *time.Time) *AppRoleUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppRoleUpdate) SetNillableUpdatedBy

func (aru *AppRoleUpdate) SetNillableUpdatedBy(i *int) *AppRoleUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppRoleUpdate) SetUpdatedAt

func (aru *AppRoleUpdate) SetUpdatedAt(t time.Time) *AppRoleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppRoleUpdate) SetUpdatedBy

func (aru *AppRoleUpdate) SetUpdatedBy(i int) *AppRoleUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppRoleUpdate) Where

func (aru *AppRoleUpdate) Where(ps ...predicate.AppRole) *AppRoleUpdate

Where appends a list predicates to the AppRoleUpdate builder.

type AppRoleUpdateOne

type AppRoleUpdateOne struct {
	// contains filtered or unexported fields
}

AppRoleUpdateOne is the builder for updating a single AppRole entity.

func (*AppRoleUpdateOne) AddAppRolePolicy

func (aruo *AppRoleUpdateOne) AddAppRolePolicy(a ...*AppRolePolicy) *AppRoleUpdateOne

AddAppRolePolicy adds the "app_role_policy" edges to the AppRolePolicy entity.

func (*AppRoleUpdateOne) AddAppRolePolicyIDs

func (aruo *AppRoleUpdateOne) AddAppRolePolicyIDs(ids ...int) *AppRoleUpdateOne

AddAppRolePolicyIDs adds the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppRoleUpdateOne) AddPolicies

func (aruo *AppRoleUpdateOne) AddPolicies(a ...*AppPolicy) *AppRoleUpdateOne

AddPolicies adds the "policies" edges to the AppPolicy entity.

func (*AppRoleUpdateOne) AddPolicyIDs

func (aruo *AppRoleUpdateOne) AddPolicyIDs(ids ...int) *AppRoleUpdateOne

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by IDs.

func (*AppRoleUpdateOne) AddUpdatedBy

func (aruo *AppRoleUpdateOne) AddUpdatedBy(i int) *AppRoleUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppRoleUpdateOne) ClearAppRolePolicy

func (aruo *AppRoleUpdateOne) ClearAppRolePolicy() *AppRoleUpdateOne

ClearAppRolePolicy clears all "app_role_policy" edges to the AppRolePolicy entity.

func (*AppRoleUpdateOne) ClearComments

func (aruo *AppRoleUpdateOne) ClearComments() *AppRoleUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppRoleUpdateOne) ClearPolicies

func (aruo *AppRoleUpdateOne) ClearPolicies() *AppRoleUpdateOne

ClearPolicies clears all "policies" edges to the AppPolicy entity.

func (*AppRoleUpdateOne) ClearUpdatedAt

func (aruo *AppRoleUpdateOne) ClearUpdatedAt() *AppRoleUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRoleUpdateOne) ClearUpdatedBy

func (aruo *AppRoleUpdateOne) ClearUpdatedBy() *AppRoleUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRoleUpdateOne) Exec

func (aruo *AppRoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppRoleUpdateOne) ExecX

func (aruo *AppRoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleUpdateOne) Mutation

func (aruo *AppRoleUpdateOne) Mutation() *AppRoleMutation

Mutation returns the AppRoleMutation object of the builder.

func (*AppRoleUpdateOne) RemoveAppRolePolicy

func (aruo *AppRoleUpdateOne) RemoveAppRolePolicy(a ...*AppRolePolicy) *AppRoleUpdateOne

RemoveAppRolePolicy removes "app_role_policy" edges to AppRolePolicy entities.

func (*AppRoleUpdateOne) RemoveAppRolePolicyIDs

func (aruo *AppRoleUpdateOne) RemoveAppRolePolicyIDs(ids ...int) *AppRoleUpdateOne

RemoveAppRolePolicyIDs removes the "app_role_policy" edge to AppRolePolicy entities by IDs.

func (*AppRoleUpdateOne) RemovePolicies

func (aruo *AppRoleUpdateOne) RemovePolicies(a ...*AppPolicy) *AppRoleUpdateOne

RemovePolicies removes "policies" edges to AppPolicy entities.

func (*AppRoleUpdateOne) RemovePolicyIDs

func (aruo *AppRoleUpdateOne) RemovePolicyIDs(ids ...int) *AppRoleUpdateOne

RemovePolicyIDs removes the "policies" edge to AppPolicy entities by IDs.

func (*AppRoleUpdateOne) Save

func (aruo *AppRoleUpdateOne) Save(ctx context.Context) (*AppRole, error)

Save executes the query and returns the updated AppRole entity.

func (*AppRoleUpdateOne) SaveX

func (aruo *AppRoleUpdateOne) SaveX(ctx context.Context) *AppRole

SaveX is like Save, but panics if an error occurs.

func (*AppRoleUpdateOne) Select

func (aruo *AppRoleUpdateOne) Select(field string, fields ...string) *AppRoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppRoleUpdateOne) SetAutoGrant

func (aruo *AppRoleUpdateOne) SetAutoGrant(b bool) *AppRoleUpdateOne

SetAutoGrant sets the "auto_grant" field.

func (*AppRoleUpdateOne) SetComments

func (aruo *AppRoleUpdateOne) SetComments(s string) *AppRoleUpdateOne

SetComments sets the "comments" field.

func (*AppRoleUpdateOne) SetEditable

func (aruo *AppRoleUpdateOne) SetEditable(b bool) *AppRoleUpdateOne

SetEditable sets the "editable" field.

func (*AppRoleUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppRoleInput on the AppRoleUpdateOne builder.

func (*AppRoleUpdateOne) SetName

func (aruo *AppRoleUpdateOne) SetName(s string) *AppRoleUpdateOne

SetName sets the "name" field.

func (*AppRoleUpdateOne) SetNillableAutoGrant

func (aruo *AppRoleUpdateOne) SetNillableAutoGrant(b *bool) *AppRoleUpdateOne

SetNillableAutoGrant sets the "auto_grant" field if the given value is not nil.

func (*AppRoleUpdateOne) SetNillableComments

func (aruo *AppRoleUpdateOne) SetNillableComments(s *string) *AppRoleUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppRoleUpdateOne) SetNillableEditable

func (aruo *AppRoleUpdateOne) SetNillableEditable(b *bool) *AppRoleUpdateOne

SetNillableEditable sets the "editable" field if the given value is not nil.

func (*AppRoleUpdateOne) SetNillableUpdatedAt

func (aruo *AppRoleUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppRoleUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppRoleUpdateOne) SetNillableUpdatedBy

func (aruo *AppRoleUpdateOne) SetNillableUpdatedBy(i *int) *AppRoleUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppRoleUpdateOne) SetUpdatedAt

func (aruo *AppRoleUpdateOne) SetUpdatedAt(t time.Time) *AppRoleUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppRoleUpdateOne) SetUpdatedBy

func (aruo *AppRoleUpdateOne) SetUpdatedBy(i int) *AppRoleUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppRoleUpdateOne) Where

func (aruo *AppRoleUpdateOne) Where(ps ...predicate.AppRole) *AppRoleUpdateOne

Where appends a list predicates to the AppRoleUpdate builder.

type AppRoleUpsert

type AppRoleUpsert struct {
	*sql.UpdateSet
}

AppRoleUpsert is the "OnConflict" setter.

func (*AppRoleUpsert) AddUpdatedBy

func (u *AppRoleUpsert) AddUpdatedBy(v int) *AppRoleUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppRoleUpsert) ClearComments

func (u *AppRoleUpsert) ClearComments() *AppRoleUpsert

ClearComments clears the value of the "comments" field.

func (*AppRoleUpsert) ClearUpdatedAt

func (u *AppRoleUpsert) ClearUpdatedAt() *AppRoleUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRoleUpsert) ClearUpdatedBy

func (u *AppRoleUpsert) ClearUpdatedBy() *AppRoleUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRoleUpsert) SetAutoGrant

func (u *AppRoleUpsert) SetAutoGrant(v bool) *AppRoleUpsert

SetAutoGrant sets the "auto_grant" field.

func (*AppRoleUpsert) SetComments

func (u *AppRoleUpsert) SetComments(v string) *AppRoleUpsert

SetComments sets the "comments" field.

func (*AppRoleUpsert) SetEditable

func (u *AppRoleUpsert) SetEditable(v bool) *AppRoleUpsert

SetEditable sets the "editable" field.

func (*AppRoleUpsert) SetName

func (u *AppRoleUpsert) SetName(v string) *AppRoleUpsert

SetName sets the "name" field.

func (*AppRoleUpsert) SetUpdatedAt

func (u *AppRoleUpsert) SetUpdatedAt(v time.Time) *AppRoleUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppRoleUpsert) SetUpdatedBy

func (u *AppRoleUpsert) SetUpdatedBy(v int) *AppRoleUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppRoleUpsert) UpdateAutoGrant

func (u *AppRoleUpsert) UpdateAutoGrant() *AppRoleUpsert

UpdateAutoGrant sets the "auto_grant" field to the value that was provided on create.

func (*AppRoleUpsert) UpdateComments

func (u *AppRoleUpsert) UpdateComments() *AppRoleUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppRoleUpsert) UpdateEditable

func (u *AppRoleUpsert) UpdateEditable() *AppRoleUpsert

UpdateEditable sets the "editable" field to the value that was provided on create.

func (*AppRoleUpsert) UpdateName

func (u *AppRoleUpsert) UpdateName() *AppRoleUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppRoleUpsert) UpdateUpdatedAt

func (u *AppRoleUpsert) UpdateUpdatedAt() *AppRoleUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppRoleUpsert) UpdateUpdatedBy

func (u *AppRoleUpsert) UpdateUpdatedBy() *AppRoleUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppRoleUpsertBulk

type AppRoleUpsertBulk struct {
	// contains filtered or unexported fields
}

AppRoleUpsertBulk is the builder for "upsert"-ing a bulk of AppRole nodes.

func (*AppRoleUpsertBulk) AddUpdatedBy

func (u *AppRoleUpsertBulk) AddUpdatedBy(v int) *AppRoleUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppRoleUpsertBulk) ClearComments

func (u *AppRoleUpsertBulk) ClearComments() *AppRoleUpsertBulk

ClearComments clears the value of the "comments" field.

func (*AppRoleUpsertBulk) ClearUpdatedAt

func (u *AppRoleUpsertBulk) ClearUpdatedAt() *AppRoleUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRoleUpsertBulk) ClearUpdatedBy

func (u *AppRoleUpsertBulk) ClearUpdatedBy() *AppRoleUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRoleUpsertBulk) DoNothing

func (u *AppRoleUpsertBulk) DoNothing() *AppRoleUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppRoleUpsertBulk) Exec

func (u *AppRoleUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRoleUpsertBulk) ExecX

func (u *AppRoleUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleUpsertBulk) Ignore

func (u *AppRoleUpsertBulk) Ignore() *AppRoleUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppRole.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppRoleUpsertBulk) SetAutoGrant

func (u *AppRoleUpsertBulk) SetAutoGrant(v bool) *AppRoleUpsertBulk

SetAutoGrant sets the "auto_grant" field.

func (*AppRoleUpsertBulk) SetComments

func (u *AppRoleUpsertBulk) SetComments(v string) *AppRoleUpsertBulk

SetComments sets the "comments" field.

func (*AppRoleUpsertBulk) SetEditable

func (u *AppRoleUpsertBulk) SetEditable(v bool) *AppRoleUpsertBulk

SetEditable sets the "editable" field.

func (*AppRoleUpsertBulk) SetName

SetName sets the "name" field.

func (*AppRoleUpsertBulk) SetUpdatedAt

func (u *AppRoleUpsertBulk) SetUpdatedAt(v time.Time) *AppRoleUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppRoleUpsertBulk) SetUpdatedBy

func (u *AppRoleUpsertBulk) SetUpdatedBy(v int) *AppRoleUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppRoleUpsertBulk) Update

func (u *AppRoleUpsertBulk) Update(set func(*AppRoleUpsert)) *AppRoleUpsertBulk

Update allows overriding fields `UPDATE` values. See the AppRoleCreateBulk.OnConflict documentation for more info.

func (*AppRoleUpsertBulk) UpdateAutoGrant

func (u *AppRoleUpsertBulk) UpdateAutoGrant() *AppRoleUpsertBulk

UpdateAutoGrant sets the "auto_grant" field to the value that was provided on create.

func (*AppRoleUpsertBulk) UpdateComments

func (u *AppRoleUpsertBulk) UpdateComments() *AppRoleUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppRoleUpsertBulk) UpdateEditable

func (u *AppRoleUpsertBulk) UpdateEditable() *AppRoleUpsertBulk

UpdateEditable sets the "editable" field to the value that was provided on create.

func (*AppRoleUpsertBulk) UpdateName

func (u *AppRoleUpsertBulk) UpdateName() *AppRoleUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppRoleUpsertBulk) UpdateNewValues

func (u *AppRoleUpsertBulk) UpdateNewValues() *AppRoleUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.AppRole.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(approle.FieldID)
		}),
	).
	Exec(ctx)

func (*AppRoleUpsertBulk) UpdateUpdatedAt

func (u *AppRoleUpsertBulk) UpdateUpdatedAt() *AppRoleUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppRoleUpsertBulk) UpdateUpdatedBy

func (u *AppRoleUpsertBulk) UpdateUpdatedBy() *AppRoleUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppRoleUpsertOne

type AppRoleUpsertOne struct {
	// contains filtered or unexported fields
}

AppRoleUpsertOne is the builder for "upsert"-ing

one AppRole node.

func (*AppRoleUpsertOne) AddUpdatedBy

func (u *AppRoleUpsertOne) AddUpdatedBy(v int) *AppRoleUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppRoleUpsertOne) ClearComments

func (u *AppRoleUpsertOne) ClearComments() *AppRoleUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppRoleUpsertOne) ClearUpdatedAt

func (u *AppRoleUpsertOne) ClearUpdatedAt() *AppRoleUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppRoleUpsertOne) ClearUpdatedBy

func (u *AppRoleUpsertOne) ClearUpdatedBy() *AppRoleUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppRoleUpsertOne) DoNothing

func (u *AppRoleUpsertOne) DoNothing() *AppRoleUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppRoleUpsertOne) Exec

func (u *AppRoleUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppRoleUpsertOne) ExecX

func (u *AppRoleUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppRoleUpsertOne) ID

func (u *AppRoleUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppRoleUpsertOne) IDX

func (u *AppRoleUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*AppRoleUpsertOne) Ignore

func (u *AppRoleUpsertOne) Ignore() *AppRoleUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AppRole.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppRoleUpsertOne) SetAutoGrant

func (u *AppRoleUpsertOne) SetAutoGrant(v bool) *AppRoleUpsertOne

SetAutoGrant sets the "auto_grant" field.

func (*AppRoleUpsertOne) SetComments

func (u *AppRoleUpsertOne) SetComments(v string) *AppRoleUpsertOne

SetComments sets the "comments" field.

func (*AppRoleUpsertOne) SetEditable

func (u *AppRoleUpsertOne) SetEditable(v bool) *AppRoleUpsertOne

SetEditable sets the "editable" field.

func (*AppRoleUpsertOne) SetName

func (u *AppRoleUpsertOne) SetName(v string) *AppRoleUpsertOne

SetName sets the "name" field.

func (*AppRoleUpsertOne) SetUpdatedAt

func (u *AppRoleUpsertOne) SetUpdatedAt(v time.Time) *AppRoleUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppRoleUpsertOne) SetUpdatedBy

func (u *AppRoleUpsertOne) SetUpdatedBy(v int) *AppRoleUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppRoleUpsertOne) Update

func (u *AppRoleUpsertOne) Update(set func(*AppRoleUpsert)) *AppRoleUpsertOne

Update allows overriding fields `UPDATE` values. See the AppRoleCreate.OnConflict documentation for more info.

func (*AppRoleUpsertOne) UpdateAutoGrant

func (u *AppRoleUpsertOne) UpdateAutoGrant() *AppRoleUpsertOne

UpdateAutoGrant sets the "auto_grant" field to the value that was provided on create.

func (*AppRoleUpsertOne) UpdateComments

func (u *AppRoleUpsertOne) UpdateComments() *AppRoleUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppRoleUpsertOne) UpdateEditable

func (u *AppRoleUpsertOne) UpdateEditable() *AppRoleUpsertOne

UpdateEditable sets the "editable" field to the value that was provided on create.

func (*AppRoleUpsertOne) UpdateName

func (u *AppRoleUpsertOne) UpdateName() *AppRoleUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppRoleUpsertOne) UpdateNewValues

func (u *AppRoleUpsertOne) UpdateNewValues() *AppRoleUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.AppRole.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(approle.FieldID)
		}),
	).
	Exec(ctx)

func (*AppRoleUpsertOne) UpdateUpdatedAt

func (u *AppRoleUpsertOne) UpdateUpdatedAt() *AppRoleUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppRoleUpsertOne) UpdateUpdatedBy

func (u *AppRoleUpsertOne) UpdateUpdatedBy() *AppRoleUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppRoleWhereInput

type AppRoleWhereInput struct {
	Predicates []predicate.AppRole  `json:"-"`
	Not        *AppRoleWhereInput   `json:"not,omitempty"`
	Or         []*AppRoleWhereInput `json:"or,omitempty"`
	And        []*AppRoleWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_id" field predicates.
	AppID       *int  `json:"appID,omitempty"`
	AppIDNEQ    *int  `json:"appIDNEQ,omitempty"`
	AppIDIn     []int `json:"appIDIn,omitempty"`
	AppIDNotIn  []int `json:"appIDNotIn,omitempty"`
	AppIDIsNil  bool  `json:"appIDIsNil,omitempty"`
	AppIDNotNil bool  `json:"appIDNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "auto_grant" field predicates.
	AutoGrant    *bool `json:"autoGrant,omitempty"`
	AutoGrantNEQ *bool `json:"autoGrantNEQ,omitempty"`

	// "editable" field predicates.
	Editable    *bool `json:"editable,omitempty"`
	EditableNEQ *bool `json:"editableNEQ,omitempty"`

	// "app" edge predicates.
	HasApp     *bool            `json:"hasApp,omitempty"`
	HasAppWith []*AppWhereInput `json:"hasAppWith,omitempty"`

	// "policies" edge predicates.
	HasPolicies     *bool                  `json:"hasPolicies,omitempty"`
	HasPoliciesWith []*AppPolicyWhereInput `json:"hasPoliciesWith,omitempty"`

	// "app_role_policy" edge predicates.
	HasAppRolePolicy     *bool                      `json:"hasAppRolePolicy,omitempty"`
	HasAppRolePolicyWith []*AppRolePolicyWhereInput `json:"hasAppRolePolicyWith,omitempty"`
}

AppRoleWhereInput represents a where input for filtering AppRole queries.

func (*AppRoleWhereInput) AddPredicates

func (i *AppRoleWhereInput) AddPredicates(predicates ...predicate.AppRole)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppRoleWhereInput) Filter

Filter applies the AppRoleWhereInput filter on the AppRoleQuery builder.

func (*AppRoleWhereInput) P

P returns a predicate for filtering approles. An error is returned if the input is empty or invalid.

type AppRoles

type AppRoles []*AppRole

AppRoles is a parsable slice of AppRole.

type AppSelect

type AppSelect struct {
	*AppQuery
	// contains filtered or unexported fields
}

AppSelect is the builder for selecting fields of App entities.

func (*AppSelect) Aggregate

func (as *AppSelect) Aggregate(fns ...AggregateFunc) *AppSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppSelect) Bool

func (s *AppSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppSelect) BoolX

func (s *AppSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppSelect) Bools

func (s *AppSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppSelect) BoolsX

func (s *AppSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppSelect) Float64

func (s *AppSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppSelect) Float64X

func (s *AppSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppSelect) Float64s

func (s *AppSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppSelect) Float64sX

func (s *AppSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppSelect) Int

func (s *AppSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppSelect) IntX

func (s *AppSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppSelect) Ints

func (s *AppSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppSelect) IntsX

func (s *AppSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppSelect) Scan

func (as *AppSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppSelect) ScanX

func (s *AppSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppSelect) String

func (s *AppSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppSelect) StringX

func (s *AppSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppSelect) Strings

func (s *AppSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppSelect) StringsX

func (s *AppSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppUpdate

type AppUpdate struct {
	// contains filtered or unexported fields
}

AppUpdate is the builder for updating App entities.

func (*AppUpdate) AddActionIDs

func (au *AppUpdate) AddActionIDs(ids ...int) *AppUpdate

AddActionIDs adds the "actions" edge to the AppAction entity by IDs.

func (*AppUpdate) AddActions

func (au *AppUpdate) AddActions(a ...*AppAction) *AppUpdate

AddActions adds the "actions" edges to the AppAction entity.

func (*AppUpdate) AddDictIDs

func (au *AppUpdate) AddDictIDs(ids ...int) *AppUpdate

AddDictIDs adds the "dicts" edge to the AppDict entity by IDs.

func (*AppUpdate) AddDicts

func (au *AppUpdate) AddDicts(a ...*AppDict) *AppUpdate

AddDicts adds the "dicts" edges to the AppDict entity.

func (*AppUpdate) AddLogoFileID

func (au *AppUpdate) AddLogoFileID(i int) *AppUpdate

AddLogoFileID adds i to the "logo_file_id" field.

func (*AppUpdate) AddMenuIDs

func (au *AppUpdate) AddMenuIDs(ids ...int) *AppUpdate

AddMenuIDs adds the "menus" edge to the AppMenu entity by IDs.

func (*AppUpdate) AddMenus

func (au *AppUpdate) AddMenus(a ...*AppMenu) *AppUpdate

AddMenus adds the "menus" edges to the AppMenu entity.

func (*AppUpdate) AddOrgApp

func (au *AppUpdate) AddOrgApp(o ...*OrgApp) *AppUpdate

AddOrgApp adds the "org_app" edges to the OrgApp entity.

func (*AppUpdate) AddOrgAppIDs

func (au *AppUpdate) AddOrgAppIDs(ids ...int) *AppUpdate

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by IDs.

func (*AppUpdate) AddOrgIDs

func (au *AppUpdate) AddOrgIDs(ids ...int) *AppUpdate

AddOrgIDs adds the "orgs" edge to the Org entity by IDs.

func (*AppUpdate) AddOrgs

func (au *AppUpdate) AddOrgs(o ...*Org) *AppUpdate

AddOrgs adds the "orgs" edges to the Org entity.

func (*AppUpdate) AddOwnerOrgID

func (au *AppUpdate) AddOwnerOrgID(i int) *AppUpdate

AddOwnerOrgID adds i to the "owner_org_id" field.

func (*AppUpdate) AddPolicies

func (au *AppUpdate) AddPolicies(a ...*AppPolicy) *AppUpdate

AddPolicies adds the "policies" edges to the AppPolicy entity.

func (*AppUpdate) AddPolicyIDs

func (au *AppUpdate) AddPolicyIDs(ids ...int) *AppUpdate

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by IDs.

func (*AppUpdate) AddRefreshTokenValidity

func (au *AppUpdate) AddRefreshTokenValidity(i int32) *AppUpdate

AddRefreshTokenValidity adds i to the "refresh_token_validity" field.

func (*AppUpdate) AddResourceIDs

func (au *AppUpdate) AddResourceIDs(ids ...int) *AppUpdate

AddResourceIDs adds the "resources" edge to the AppRes entity by IDs.

func (*AppUpdate) AddResources

func (au *AppUpdate) AddResources(a ...*AppRes) *AppUpdate

AddResources adds the "resources" edges to the AppRes entity.

func (*AppUpdate) AddRoleIDs

func (au *AppUpdate) AddRoleIDs(ids ...int) *AppUpdate

AddRoleIDs adds the "roles" edge to the AppRole entity by IDs.

func (*AppUpdate) AddRoles

func (au *AppUpdate) AddRoles(a ...*AppRole) *AppUpdate

AddRoles adds the "roles" edges to the AppRole entity.

func (*AppUpdate) AddTokenValidity

func (au *AppUpdate) AddTokenValidity(i int32) *AppUpdate

AddTokenValidity adds i to the "token_validity" field.

func (*AppUpdate) AddUpdatedBy

func (au *AppUpdate) AddUpdatedBy(i int) *AppUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppUpdate) ClearActions

func (au *AppUpdate) ClearActions() *AppUpdate

ClearActions clears all "actions" edges to the AppAction entity.

func (*AppUpdate) ClearAppKey

func (au *AppUpdate) ClearAppKey() *AppUpdate

ClearAppKey clears the value of the "app_key" field.

func (*AppUpdate) ClearAppSecret

func (au *AppUpdate) ClearAppSecret() *AppUpdate

ClearAppSecret clears the value of the "app_secret" field.

func (*AppUpdate) ClearComments

func (au *AppUpdate) ClearComments() *AppUpdate

ClearComments clears the value of the "comments" field.

func (*AppUpdate) ClearDicts

func (au *AppUpdate) ClearDicts() *AppUpdate

ClearDicts clears all "dicts" edges to the AppDict entity.

func (*AppUpdate) ClearLogoFileID

func (au *AppUpdate) ClearLogoFileID() *AppUpdate

ClearLogoFileID clears the value of the "logo_file_id" field.

func (*AppUpdate) ClearMenus

func (au *AppUpdate) ClearMenus() *AppUpdate

ClearMenus clears all "menus" edges to the AppMenu entity.

func (*AppUpdate) ClearOrgApp

func (au *AppUpdate) ClearOrgApp() *AppUpdate

ClearOrgApp clears all "org_app" edges to the OrgApp entity.

func (*AppUpdate) ClearOrgs

func (au *AppUpdate) ClearOrgs() *AppUpdate

ClearOrgs clears all "orgs" edges to the Org entity.

func (*AppUpdate) ClearOwnerOrgID

func (au *AppUpdate) ClearOwnerOrgID() *AppUpdate

ClearOwnerOrgID clears the value of the "owner_org_id" field.

func (*AppUpdate) ClearPolicies

func (au *AppUpdate) ClearPolicies() *AppUpdate

ClearPolicies clears all "policies" edges to the AppPolicy entity.

func (*AppUpdate) ClearPrivate

func (au *AppUpdate) ClearPrivate() *AppUpdate

ClearPrivate clears the value of the "private" field.

func (*AppUpdate) ClearRedirectURI

func (au *AppUpdate) ClearRedirectURI() *AppUpdate

ClearRedirectURI clears the value of the "redirect_uri" field.

func (*AppUpdate) ClearRefreshTokenValidity

func (au *AppUpdate) ClearRefreshTokenValidity() *AppUpdate

ClearRefreshTokenValidity clears the value of the "refresh_token_validity" field.

func (*AppUpdate) ClearResources

func (au *AppUpdate) ClearResources() *AppUpdate

ClearResources clears all "resources" edges to the AppRes entity.

func (*AppUpdate) ClearRoles

func (au *AppUpdate) ClearRoles() *AppUpdate

ClearRoles clears all "roles" edges to the AppRole entity.

func (*AppUpdate) ClearScopes

func (au *AppUpdate) ClearScopes() *AppUpdate

ClearScopes clears the value of the "scopes" field.

func (*AppUpdate) ClearStatus

func (au *AppUpdate) ClearStatus() *AppUpdate

ClearStatus clears the value of the "status" field.

func (*AppUpdate) ClearTokenValidity

func (au *AppUpdate) ClearTokenValidity() *AppUpdate

ClearTokenValidity clears the value of the "token_validity" field.

func (*AppUpdate) ClearUpdatedAt

func (au *AppUpdate) ClearUpdatedAt() *AppUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppUpdate) ClearUpdatedBy

func (au *AppUpdate) ClearUpdatedBy() *AppUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppUpdate) Exec

func (au *AppUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppUpdate) ExecX

func (au *AppUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppUpdate) Mutation

func (au *AppUpdate) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppUpdate) RemoveActionIDs

func (au *AppUpdate) RemoveActionIDs(ids ...int) *AppUpdate

RemoveActionIDs removes the "actions" edge to AppAction entities by IDs.

func (*AppUpdate) RemoveActions

func (au *AppUpdate) RemoveActions(a ...*AppAction) *AppUpdate

RemoveActions removes "actions" edges to AppAction entities.

func (*AppUpdate) RemoveDictIDs

func (au *AppUpdate) RemoveDictIDs(ids ...int) *AppUpdate

RemoveDictIDs removes the "dicts" edge to AppDict entities by IDs.

func (*AppUpdate) RemoveDicts

func (au *AppUpdate) RemoveDicts(a ...*AppDict) *AppUpdate

RemoveDicts removes "dicts" edges to AppDict entities.

func (*AppUpdate) RemoveMenuIDs

func (au *AppUpdate) RemoveMenuIDs(ids ...int) *AppUpdate

RemoveMenuIDs removes the "menus" edge to AppMenu entities by IDs.

func (*AppUpdate) RemoveMenus

func (au *AppUpdate) RemoveMenus(a ...*AppMenu) *AppUpdate

RemoveMenus removes "menus" edges to AppMenu entities.

func (*AppUpdate) RemoveOrgApp

func (au *AppUpdate) RemoveOrgApp(o ...*OrgApp) *AppUpdate

RemoveOrgApp removes "org_app" edges to OrgApp entities.

func (*AppUpdate) RemoveOrgAppIDs

func (au *AppUpdate) RemoveOrgAppIDs(ids ...int) *AppUpdate

RemoveOrgAppIDs removes the "org_app" edge to OrgApp entities by IDs.

func (*AppUpdate) RemoveOrgIDs

func (au *AppUpdate) RemoveOrgIDs(ids ...int) *AppUpdate

RemoveOrgIDs removes the "orgs" edge to Org entities by IDs.

func (*AppUpdate) RemoveOrgs

func (au *AppUpdate) RemoveOrgs(o ...*Org) *AppUpdate

RemoveOrgs removes "orgs" edges to Org entities.

func (*AppUpdate) RemovePolicies

func (au *AppUpdate) RemovePolicies(a ...*AppPolicy) *AppUpdate

RemovePolicies removes "policies" edges to AppPolicy entities.

func (*AppUpdate) RemovePolicyIDs

func (au *AppUpdate) RemovePolicyIDs(ids ...int) *AppUpdate

RemovePolicyIDs removes the "policies" edge to AppPolicy entities by IDs.

func (*AppUpdate) RemoveResourceIDs

func (au *AppUpdate) RemoveResourceIDs(ids ...int) *AppUpdate

RemoveResourceIDs removes the "resources" edge to AppRes entities by IDs.

func (*AppUpdate) RemoveResources

func (au *AppUpdate) RemoveResources(a ...*AppRes) *AppUpdate

RemoveResources removes "resources" edges to AppRes entities.

func (*AppUpdate) RemoveRoleIDs

func (au *AppUpdate) RemoveRoleIDs(ids ...int) *AppUpdate

RemoveRoleIDs removes the "roles" edge to AppRole entities by IDs.

func (*AppUpdate) RemoveRoles

func (au *AppUpdate) RemoveRoles(a ...*AppRole) *AppUpdate

RemoveRoles removes "roles" edges to AppRole entities.

func (*AppUpdate) Save

func (au *AppUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppUpdate) SaveX

func (au *AppUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppUpdate) SetAppKey

func (au *AppUpdate) SetAppKey(s string) *AppUpdate

SetAppKey sets the "app_key" field.

func (*AppUpdate) SetAppSecret

func (au *AppUpdate) SetAppSecret(s string) *AppUpdate

SetAppSecret sets the "app_secret" field.

func (*AppUpdate) SetComments

func (au *AppUpdate) SetComments(s string) *AppUpdate

SetComments sets the "comments" field.

func (*AppUpdate) SetInput

func (c *AppUpdate) SetInput(i UpdateAppInput) *AppUpdate

SetInput applies the change-set in the UpdateAppInput on the AppUpdate builder.

func (*AppUpdate) SetKind

func (au *AppUpdate) SetKind(a app.Kind) *AppUpdate

SetKind sets the "kind" field.

func (*AppUpdate) SetLogoFileID

func (au *AppUpdate) SetLogoFileID(i int) *AppUpdate

SetLogoFileID sets the "logo_file_id" field.

func (*AppUpdate) SetName

func (au *AppUpdate) SetName(s string) *AppUpdate

SetName sets the "name" field.

func (*AppUpdate) SetNillableAppKey

func (au *AppUpdate) SetNillableAppKey(s *string) *AppUpdate

SetNillableAppKey sets the "app_key" field if the given value is not nil.

func (*AppUpdate) SetNillableAppSecret

func (au *AppUpdate) SetNillableAppSecret(s *string) *AppUpdate

SetNillableAppSecret sets the "app_secret" field if the given value is not nil.

func (*AppUpdate) SetNillableComments

func (au *AppUpdate) SetNillableComments(s *string) *AppUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppUpdate) SetNillableLogoFileID

func (au *AppUpdate) SetNillableLogoFileID(i *int) *AppUpdate

SetNillableLogoFileID sets the "logo_file_id" field if the given value is not nil.

func (*AppUpdate) SetNillableOwnerOrgID

func (au *AppUpdate) SetNillableOwnerOrgID(i *int) *AppUpdate

SetNillableOwnerOrgID sets the "owner_org_id" field if the given value is not nil.

func (*AppUpdate) SetNillablePrivate

func (au *AppUpdate) SetNillablePrivate(b *bool) *AppUpdate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*AppUpdate) SetNillableRedirectURI

func (au *AppUpdate) SetNillableRedirectURI(s *string) *AppUpdate

SetNillableRedirectURI sets the "redirect_uri" field if the given value is not nil.

func (*AppUpdate) SetNillableRefreshTokenValidity

func (au *AppUpdate) SetNillableRefreshTokenValidity(i *int32) *AppUpdate

SetNillableRefreshTokenValidity sets the "refresh_token_validity" field if the given value is not nil.

func (*AppUpdate) SetNillableScopes

func (au *AppUpdate) SetNillableScopes(s *string) *AppUpdate

SetNillableScopes sets the "scopes" field if the given value is not nil.

func (*AppUpdate) SetNillableStatus

func (au *AppUpdate) SetNillableStatus(ts *typex.SimpleStatus) *AppUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppUpdate) SetNillableTokenValidity

func (au *AppUpdate) SetNillableTokenValidity(i *int32) *AppUpdate

SetNillableTokenValidity sets the "token_validity" field if the given value is not nil.

func (*AppUpdate) SetNillableUpdatedAt

func (au *AppUpdate) SetNillableUpdatedAt(t *time.Time) *AppUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppUpdate) SetNillableUpdatedBy

func (au *AppUpdate) SetNillableUpdatedBy(i *int) *AppUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppUpdate) SetOwnerOrgID

func (au *AppUpdate) SetOwnerOrgID(i int) *AppUpdate

SetOwnerOrgID sets the "owner_org_id" field.

func (*AppUpdate) SetPrivate

func (au *AppUpdate) SetPrivate(b bool) *AppUpdate

SetPrivate sets the "private" field.

func (*AppUpdate) SetRedirectURI

func (au *AppUpdate) SetRedirectURI(s string) *AppUpdate

SetRedirectURI sets the "redirect_uri" field.

func (*AppUpdate) SetRefreshTokenValidity

func (au *AppUpdate) SetRefreshTokenValidity(i int32) *AppUpdate

SetRefreshTokenValidity sets the "refresh_token_validity" field.

func (*AppUpdate) SetScopes

func (au *AppUpdate) SetScopes(s string) *AppUpdate

SetScopes sets the "scopes" field.

func (*AppUpdate) SetStatus

func (au *AppUpdate) SetStatus(ts typex.SimpleStatus) *AppUpdate

SetStatus sets the "status" field.

func (*AppUpdate) SetTokenValidity

func (au *AppUpdate) SetTokenValidity(i int32) *AppUpdate

SetTokenValidity sets the "token_validity" field.

func (*AppUpdate) SetUpdatedAt

func (au *AppUpdate) SetUpdatedAt(t time.Time) *AppUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppUpdate) SetUpdatedBy

func (au *AppUpdate) SetUpdatedBy(i int) *AppUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppUpdate) Where

func (au *AppUpdate) Where(ps ...predicate.App) *AppUpdate

Where appends a list predicates to the AppUpdate builder.

type AppUpdateOne

type AppUpdateOne struct {
	// contains filtered or unexported fields
}

AppUpdateOne is the builder for updating a single App entity.

func (*AppUpdateOne) AddActionIDs

func (auo *AppUpdateOne) AddActionIDs(ids ...int) *AppUpdateOne

AddActionIDs adds the "actions" edge to the AppAction entity by IDs.

func (*AppUpdateOne) AddActions

func (auo *AppUpdateOne) AddActions(a ...*AppAction) *AppUpdateOne

AddActions adds the "actions" edges to the AppAction entity.

func (*AppUpdateOne) AddDictIDs

func (auo *AppUpdateOne) AddDictIDs(ids ...int) *AppUpdateOne

AddDictIDs adds the "dicts" edge to the AppDict entity by IDs.

func (*AppUpdateOne) AddDicts

func (auo *AppUpdateOne) AddDicts(a ...*AppDict) *AppUpdateOne

AddDicts adds the "dicts" edges to the AppDict entity.

func (*AppUpdateOne) AddLogoFileID

func (auo *AppUpdateOne) AddLogoFileID(i int) *AppUpdateOne

AddLogoFileID adds i to the "logo_file_id" field.

func (*AppUpdateOne) AddMenuIDs

func (auo *AppUpdateOne) AddMenuIDs(ids ...int) *AppUpdateOne

AddMenuIDs adds the "menus" edge to the AppMenu entity by IDs.

func (*AppUpdateOne) AddMenus

func (auo *AppUpdateOne) AddMenus(a ...*AppMenu) *AppUpdateOne

AddMenus adds the "menus" edges to the AppMenu entity.

func (*AppUpdateOne) AddOrgApp

func (auo *AppUpdateOne) AddOrgApp(o ...*OrgApp) *AppUpdateOne

AddOrgApp adds the "org_app" edges to the OrgApp entity.

func (*AppUpdateOne) AddOrgAppIDs

func (auo *AppUpdateOne) AddOrgAppIDs(ids ...int) *AppUpdateOne

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by IDs.

func (*AppUpdateOne) AddOrgIDs

func (auo *AppUpdateOne) AddOrgIDs(ids ...int) *AppUpdateOne

AddOrgIDs adds the "orgs" edge to the Org entity by IDs.

func (*AppUpdateOne) AddOrgs

func (auo *AppUpdateOne) AddOrgs(o ...*Org) *AppUpdateOne

AddOrgs adds the "orgs" edges to the Org entity.

func (*AppUpdateOne) AddOwnerOrgID

func (auo *AppUpdateOne) AddOwnerOrgID(i int) *AppUpdateOne

AddOwnerOrgID adds i to the "owner_org_id" field.

func (*AppUpdateOne) AddPolicies

func (auo *AppUpdateOne) AddPolicies(a ...*AppPolicy) *AppUpdateOne

AddPolicies adds the "policies" edges to the AppPolicy entity.

func (*AppUpdateOne) AddPolicyIDs

func (auo *AppUpdateOne) AddPolicyIDs(ids ...int) *AppUpdateOne

AddPolicyIDs adds the "policies" edge to the AppPolicy entity by IDs.

func (*AppUpdateOne) AddRefreshTokenValidity

func (auo *AppUpdateOne) AddRefreshTokenValidity(i int32) *AppUpdateOne

AddRefreshTokenValidity adds i to the "refresh_token_validity" field.

func (*AppUpdateOne) AddResourceIDs

func (auo *AppUpdateOne) AddResourceIDs(ids ...int) *AppUpdateOne

AddResourceIDs adds the "resources" edge to the AppRes entity by IDs.

func (*AppUpdateOne) AddResources

func (auo *AppUpdateOne) AddResources(a ...*AppRes) *AppUpdateOne

AddResources adds the "resources" edges to the AppRes entity.

func (*AppUpdateOne) AddRoleIDs

func (auo *AppUpdateOne) AddRoleIDs(ids ...int) *AppUpdateOne

AddRoleIDs adds the "roles" edge to the AppRole entity by IDs.

func (*AppUpdateOne) AddRoles

func (auo *AppUpdateOne) AddRoles(a ...*AppRole) *AppUpdateOne

AddRoles adds the "roles" edges to the AppRole entity.

func (*AppUpdateOne) AddTokenValidity

func (auo *AppUpdateOne) AddTokenValidity(i int32) *AppUpdateOne

AddTokenValidity adds i to the "token_validity" field.

func (*AppUpdateOne) AddUpdatedBy

func (auo *AppUpdateOne) AddUpdatedBy(i int) *AppUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppUpdateOne) ClearActions

func (auo *AppUpdateOne) ClearActions() *AppUpdateOne

ClearActions clears all "actions" edges to the AppAction entity.

func (*AppUpdateOne) ClearAppKey

func (auo *AppUpdateOne) ClearAppKey() *AppUpdateOne

ClearAppKey clears the value of the "app_key" field.

func (*AppUpdateOne) ClearAppSecret

func (auo *AppUpdateOne) ClearAppSecret() *AppUpdateOne

ClearAppSecret clears the value of the "app_secret" field.

func (*AppUpdateOne) ClearComments

func (auo *AppUpdateOne) ClearComments() *AppUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppUpdateOne) ClearDicts

func (auo *AppUpdateOne) ClearDicts() *AppUpdateOne

ClearDicts clears all "dicts" edges to the AppDict entity.

func (*AppUpdateOne) ClearLogoFileID

func (auo *AppUpdateOne) ClearLogoFileID() *AppUpdateOne

ClearLogoFileID clears the value of the "logo_file_id" field.

func (*AppUpdateOne) ClearMenus

func (auo *AppUpdateOne) ClearMenus() *AppUpdateOne

ClearMenus clears all "menus" edges to the AppMenu entity.

func (*AppUpdateOne) ClearOrgApp

func (auo *AppUpdateOne) ClearOrgApp() *AppUpdateOne

ClearOrgApp clears all "org_app" edges to the OrgApp entity.

func (*AppUpdateOne) ClearOrgs

func (auo *AppUpdateOne) ClearOrgs() *AppUpdateOne

ClearOrgs clears all "orgs" edges to the Org entity.

func (*AppUpdateOne) ClearOwnerOrgID

func (auo *AppUpdateOne) ClearOwnerOrgID() *AppUpdateOne

ClearOwnerOrgID clears the value of the "owner_org_id" field.

func (*AppUpdateOne) ClearPolicies

func (auo *AppUpdateOne) ClearPolicies() *AppUpdateOne

ClearPolicies clears all "policies" edges to the AppPolicy entity.

func (*AppUpdateOne) ClearPrivate

func (auo *AppUpdateOne) ClearPrivate() *AppUpdateOne

ClearPrivate clears the value of the "private" field.

func (*AppUpdateOne) ClearRedirectURI

func (auo *AppUpdateOne) ClearRedirectURI() *AppUpdateOne

ClearRedirectURI clears the value of the "redirect_uri" field.

func (*AppUpdateOne) ClearRefreshTokenValidity

func (auo *AppUpdateOne) ClearRefreshTokenValidity() *AppUpdateOne

ClearRefreshTokenValidity clears the value of the "refresh_token_validity" field.

func (*AppUpdateOne) ClearResources

func (auo *AppUpdateOne) ClearResources() *AppUpdateOne

ClearResources clears all "resources" edges to the AppRes entity.

func (*AppUpdateOne) ClearRoles

func (auo *AppUpdateOne) ClearRoles() *AppUpdateOne

ClearRoles clears all "roles" edges to the AppRole entity.

func (*AppUpdateOne) ClearScopes

func (auo *AppUpdateOne) ClearScopes() *AppUpdateOne

ClearScopes clears the value of the "scopes" field.

func (*AppUpdateOne) ClearStatus

func (auo *AppUpdateOne) ClearStatus() *AppUpdateOne

ClearStatus clears the value of the "status" field.

func (*AppUpdateOne) ClearTokenValidity

func (auo *AppUpdateOne) ClearTokenValidity() *AppUpdateOne

ClearTokenValidity clears the value of the "token_validity" field.

func (*AppUpdateOne) ClearUpdatedAt

func (auo *AppUpdateOne) ClearUpdatedAt() *AppUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppUpdateOne) ClearUpdatedBy

func (auo *AppUpdateOne) ClearUpdatedBy() *AppUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppUpdateOne) Exec

func (auo *AppUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppUpdateOne) ExecX

func (auo *AppUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppUpdateOne) Mutation

func (auo *AppUpdateOne) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppUpdateOne) RemoveActionIDs

func (auo *AppUpdateOne) RemoveActionIDs(ids ...int) *AppUpdateOne

RemoveActionIDs removes the "actions" edge to AppAction entities by IDs.

func (*AppUpdateOne) RemoveActions

func (auo *AppUpdateOne) RemoveActions(a ...*AppAction) *AppUpdateOne

RemoveActions removes "actions" edges to AppAction entities.

func (*AppUpdateOne) RemoveDictIDs

func (auo *AppUpdateOne) RemoveDictIDs(ids ...int) *AppUpdateOne

RemoveDictIDs removes the "dicts" edge to AppDict entities by IDs.

func (*AppUpdateOne) RemoveDicts

func (auo *AppUpdateOne) RemoveDicts(a ...*AppDict) *AppUpdateOne

RemoveDicts removes "dicts" edges to AppDict entities.

func (*AppUpdateOne) RemoveMenuIDs

func (auo *AppUpdateOne) RemoveMenuIDs(ids ...int) *AppUpdateOne

RemoveMenuIDs removes the "menus" edge to AppMenu entities by IDs.

func (*AppUpdateOne) RemoveMenus

func (auo *AppUpdateOne) RemoveMenus(a ...*AppMenu) *AppUpdateOne

RemoveMenus removes "menus" edges to AppMenu entities.

func (*AppUpdateOne) RemoveOrgApp

func (auo *AppUpdateOne) RemoveOrgApp(o ...*OrgApp) *AppUpdateOne

RemoveOrgApp removes "org_app" edges to OrgApp entities.

func (*AppUpdateOne) RemoveOrgAppIDs

func (auo *AppUpdateOne) RemoveOrgAppIDs(ids ...int) *AppUpdateOne

RemoveOrgAppIDs removes the "org_app" edge to OrgApp entities by IDs.

func (*AppUpdateOne) RemoveOrgIDs

func (auo *AppUpdateOne) RemoveOrgIDs(ids ...int) *AppUpdateOne

RemoveOrgIDs removes the "orgs" edge to Org entities by IDs.

func (*AppUpdateOne) RemoveOrgs

func (auo *AppUpdateOne) RemoveOrgs(o ...*Org) *AppUpdateOne

RemoveOrgs removes "orgs" edges to Org entities.

func (*AppUpdateOne) RemovePolicies

func (auo *AppUpdateOne) RemovePolicies(a ...*AppPolicy) *AppUpdateOne

RemovePolicies removes "policies" edges to AppPolicy entities.

func (*AppUpdateOne) RemovePolicyIDs

func (auo *AppUpdateOne) RemovePolicyIDs(ids ...int) *AppUpdateOne

RemovePolicyIDs removes the "policies" edge to AppPolicy entities by IDs.

func (*AppUpdateOne) RemoveResourceIDs

func (auo *AppUpdateOne) RemoveResourceIDs(ids ...int) *AppUpdateOne

RemoveResourceIDs removes the "resources" edge to AppRes entities by IDs.

func (*AppUpdateOne) RemoveResources

func (auo *AppUpdateOne) RemoveResources(a ...*AppRes) *AppUpdateOne

RemoveResources removes "resources" edges to AppRes entities.

func (*AppUpdateOne) RemoveRoleIDs

func (auo *AppUpdateOne) RemoveRoleIDs(ids ...int) *AppUpdateOne

RemoveRoleIDs removes the "roles" edge to AppRole entities by IDs.

func (*AppUpdateOne) RemoveRoles

func (auo *AppUpdateOne) RemoveRoles(a ...*AppRole) *AppUpdateOne

RemoveRoles removes "roles" edges to AppRole entities.

func (*AppUpdateOne) Save

func (auo *AppUpdateOne) Save(ctx context.Context) (*App, error)

Save executes the query and returns the updated App entity.

func (*AppUpdateOne) SaveX

func (auo *AppUpdateOne) SaveX(ctx context.Context) *App

SaveX is like Save, but panics if an error occurs.

func (*AppUpdateOne) Select

func (auo *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppUpdateOne) SetAppKey

func (auo *AppUpdateOne) SetAppKey(s string) *AppUpdateOne

SetAppKey sets the "app_key" field.

func (*AppUpdateOne) SetAppSecret

func (auo *AppUpdateOne) SetAppSecret(s string) *AppUpdateOne

SetAppSecret sets the "app_secret" field.

func (*AppUpdateOne) SetComments

func (auo *AppUpdateOne) SetComments(s string) *AppUpdateOne

SetComments sets the "comments" field.

func (*AppUpdateOne) SetInput

func (c *AppUpdateOne) SetInput(i UpdateAppInput) *AppUpdateOne

SetInput applies the change-set in the UpdateAppInput on the AppUpdateOne builder.

func (*AppUpdateOne) SetKind

func (auo *AppUpdateOne) SetKind(a app.Kind) *AppUpdateOne

SetKind sets the "kind" field.

func (*AppUpdateOne) SetLogoFileID

func (auo *AppUpdateOne) SetLogoFileID(i int) *AppUpdateOne

SetLogoFileID sets the "logo_file_id" field.

func (*AppUpdateOne) SetName

func (auo *AppUpdateOne) SetName(s string) *AppUpdateOne

SetName sets the "name" field.

func (*AppUpdateOne) SetNillableAppKey

func (auo *AppUpdateOne) SetNillableAppKey(s *string) *AppUpdateOne

SetNillableAppKey sets the "app_key" field if the given value is not nil.

func (*AppUpdateOne) SetNillableAppSecret

func (auo *AppUpdateOne) SetNillableAppSecret(s *string) *AppUpdateOne

SetNillableAppSecret sets the "app_secret" field if the given value is not nil.

func (*AppUpdateOne) SetNillableComments

func (auo *AppUpdateOne) SetNillableComments(s *string) *AppUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*AppUpdateOne) SetNillableLogoFileID

func (auo *AppUpdateOne) SetNillableLogoFileID(i *int) *AppUpdateOne

SetNillableLogoFileID sets the "logo_file_id" field if the given value is not nil.

func (*AppUpdateOne) SetNillableOwnerOrgID

func (auo *AppUpdateOne) SetNillableOwnerOrgID(i *int) *AppUpdateOne

SetNillableOwnerOrgID sets the "owner_org_id" field if the given value is not nil.

func (*AppUpdateOne) SetNillablePrivate

func (auo *AppUpdateOne) SetNillablePrivate(b *bool) *AppUpdateOne

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*AppUpdateOne) SetNillableRedirectURI

func (auo *AppUpdateOne) SetNillableRedirectURI(s *string) *AppUpdateOne

SetNillableRedirectURI sets the "redirect_uri" field if the given value is not nil.

func (*AppUpdateOne) SetNillableRefreshTokenValidity

func (auo *AppUpdateOne) SetNillableRefreshTokenValidity(i *int32) *AppUpdateOne

SetNillableRefreshTokenValidity sets the "refresh_token_validity" field if the given value is not nil.

func (*AppUpdateOne) SetNillableScopes

func (auo *AppUpdateOne) SetNillableScopes(s *string) *AppUpdateOne

SetNillableScopes sets the "scopes" field if the given value is not nil.

func (*AppUpdateOne) SetNillableStatus

func (auo *AppUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *AppUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppUpdateOne) SetNillableTokenValidity

func (auo *AppUpdateOne) SetNillableTokenValidity(i *int32) *AppUpdateOne

SetNillableTokenValidity sets the "token_validity" field if the given value is not nil.

func (*AppUpdateOne) SetNillableUpdatedAt

func (auo *AppUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppUpdateOne) SetNillableUpdatedBy

func (auo *AppUpdateOne) SetNillableUpdatedBy(i *int) *AppUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*AppUpdateOne) SetOwnerOrgID

func (auo *AppUpdateOne) SetOwnerOrgID(i int) *AppUpdateOne

SetOwnerOrgID sets the "owner_org_id" field.

func (*AppUpdateOne) SetPrivate

func (auo *AppUpdateOne) SetPrivate(b bool) *AppUpdateOne

SetPrivate sets the "private" field.

func (*AppUpdateOne) SetRedirectURI

func (auo *AppUpdateOne) SetRedirectURI(s string) *AppUpdateOne

SetRedirectURI sets the "redirect_uri" field.

func (*AppUpdateOne) SetRefreshTokenValidity

func (auo *AppUpdateOne) SetRefreshTokenValidity(i int32) *AppUpdateOne

SetRefreshTokenValidity sets the "refresh_token_validity" field.

func (*AppUpdateOne) SetScopes

func (auo *AppUpdateOne) SetScopes(s string) *AppUpdateOne

SetScopes sets the "scopes" field.

func (*AppUpdateOne) SetStatus

func (auo *AppUpdateOne) SetStatus(ts typex.SimpleStatus) *AppUpdateOne

SetStatus sets the "status" field.

func (*AppUpdateOne) SetTokenValidity

func (auo *AppUpdateOne) SetTokenValidity(i int32) *AppUpdateOne

SetTokenValidity sets the "token_validity" field.

func (*AppUpdateOne) SetUpdatedAt

func (auo *AppUpdateOne) SetUpdatedAt(t time.Time) *AppUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppUpdateOne) SetUpdatedBy

func (auo *AppUpdateOne) SetUpdatedBy(i int) *AppUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppUpdateOne) Where

func (auo *AppUpdateOne) Where(ps ...predicate.App) *AppUpdateOne

Where appends a list predicates to the AppUpdate builder.

type AppUpsert

type AppUpsert struct {
	*sql.UpdateSet
}

AppUpsert is the "OnConflict" setter.

func (*AppUpsert) AddLogoFileID

func (u *AppUpsert) AddLogoFileID(v int) *AppUpsert

AddLogoFileID adds v to the "logo_file_id" field.

func (*AppUpsert) AddOwnerOrgID

func (u *AppUpsert) AddOwnerOrgID(v int) *AppUpsert

AddOwnerOrgID adds v to the "owner_org_id" field.

func (*AppUpsert) AddRefreshTokenValidity

func (u *AppUpsert) AddRefreshTokenValidity(v int32) *AppUpsert

AddRefreshTokenValidity adds v to the "refresh_token_validity" field.

func (*AppUpsert) AddTokenValidity

func (u *AppUpsert) AddTokenValidity(v int32) *AppUpsert

AddTokenValidity adds v to the "token_validity" field.

func (*AppUpsert) AddUpdatedBy

func (u *AppUpsert) AddUpdatedBy(v int) *AppUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*AppUpsert) ClearAppKey

func (u *AppUpsert) ClearAppKey() *AppUpsert

ClearAppKey clears the value of the "app_key" field.

func (*AppUpsert) ClearAppSecret

func (u *AppUpsert) ClearAppSecret() *AppUpsert

ClearAppSecret clears the value of the "app_secret" field.

func (*AppUpsert) ClearComments

func (u *AppUpsert) ClearComments() *AppUpsert

ClearComments clears the value of the "comments" field.

func (*AppUpsert) ClearLogoFileID

func (u *AppUpsert) ClearLogoFileID() *AppUpsert

ClearLogoFileID clears the value of the "logo_file_id" field.

func (*AppUpsert) ClearOwnerOrgID

func (u *AppUpsert) ClearOwnerOrgID() *AppUpsert

ClearOwnerOrgID clears the value of the "owner_org_id" field.

func (*AppUpsert) ClearPrivate

func (u *AppUpsert) ClearPrivate() *AppUpsert

ClearPrivate clears the value of the "private" field.

func (*AppUpsert) ClearRedirectURI

func (u *AppUpsert) ClearRedirectURI() *AppUpsert

ClearRedirectURI clears the value of the "redirect_uri" field.

func (*AppUpsert) ClearRefreshTokenValidity

func (u *AppUpsert) ClearRefreshTokenValidity() *AppUpsert

ClearRefreshTokenValidity clears the value of the "refresh_token_validity" field.

func (*AppUpsert) ClearScopes

func (u *AppUpsert) ClearScopes() *AppUpsert

ClearScopes clears the value of the "scopes" field.

func (*AppUpsert) ClearStatus

func (u *AppUpsert) ClearStatus() *AppUpsert

ClearStatus clears the value of the "status" field.

func (*AppUpsert) ClearTokenValidity

func (u *AppUpsert) ClearTokenValidity() *AppUpsert

ClearTokenValidity clears the value of the "token_validity" field.

func (*AppUpsert) ClearUpdatedAt

func (u *AppUpsert) ClearUpdatedAt() *AppUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppUpsert) ClearUpdatedBy

func (u *AppUpsert) ClearUpdatedBy() *AppUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppUpsert) SetAppKey

func (u *AppUpsert) SetAppKey(v string) *AppUpsert

SetAppKey sets the "app_key" field.

func (*AppUpsert) SetAppSecret

func (u *AppUpsert) SetAppSecret(v string) *AppUpsert

SetAppSecret sets the "app_secret" field.

func (*AppUpsert) SetComments

func (u *AppUpsert) SetComments(v string) *AppUpsert

SetComments sets the "comments" field.

func (*AppUpsert) SetKind

func (u *AppUpsert) SetKind(v app.Kind) *AppUpsert

SetKind sets the "kind" field.

func (*AppUpsert) SetLogoFileID

func (u *AppUpsert) SetLogoFileID(v int) *AppUpsert

SetLogoFileID sets the "logo_file_id" field.

func (*AppUpsert) SetName

func (u *AppUpsert) SetName(v string) *AppUpsert

SetName sets the "name" field.

func (*AppUpsert) SetOwnerOrgID

func (u *AppUpsert) SetOwnerOrgID(v int) *AppUpsert

SetOwnerOrgID sets the "owner_org_id" field.

func (*AppUpsert) SetPrivate

func (u *AppUpsert) SetPrivate(v bool) *AppUpsert

SetPrivate sets the "private" field.

func (*AppUpsert) SetRedirectURI

func (u *AppUpsert) SetRedirectURI(v string) *AppUpsert

SetRedirectURI sets the "redirect_uri" field.

func (*AppUpsert) SetRefreshTokenValidity

func (u *AppUpsert) SetRefreshTokenValidity(v int32) *AppUpsert

SetRefreshTokenValidity sets the "refresh_token_validity" field.

func (*AppUpsert) SetScopes

func (u *AppUpsert) SetScopes(v string) *AppUpsert

SetScopes sets the "scopes" field.

func (*AppUpsert) SetStatus

func (u *AppUpsert) SetStatus(v typex.SimpleStatus) *AppUpsert

SetStatus sets the "status" field.

func (*AppUpsert) SetTokenValidity

func (u *AppUpsert) SetTokenValidity(v int32) *AppUpsert

SetTokenValidity sets the "token_validity" field.

func (*AppUpsert) SetUpdatedAt

func (u *AppUpsert) SetUpdatedAt(v time.Time) *AppUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AppUpsert) SetUpdatedBy

func (u *AppUpsert) SetUpdatedBy(v int) *AppUpsert

SetUpdatedBy sets the "updated_by" field.

func (*AppUpsert) UpdateAppKey

func (u *AppUpsert) UpdateAppKey() *AppUpsert

UpdateAppKey sets the "app_key" field to the value that was provided on create.

func (*AppUpsert) UpdateAppSecret

func (u *AppUpsert) UpdateAppSecret() *AppUpsert

UpdateAppSecret sets the "app_secret" field to the value that was provided on create.

func (*AppUpsert) UpdateComments

func (u *AppUpsert) UpdateComments() *AppUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppUpsert) UpdateKind

func (u *AppUpsert) UpdateKind() *AppUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppUpsert) UpdateLogoFileID

func (u *AppUpsert) UpdateLogoFileID() *AppUpsert

UpdateLogoFileID sets the "logo_file_id" field to the value that was provided on create.

func (*AppUpsert) UpdateName

func (u *AppUpsert) UpdateName() *AppUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AppUpsert) UpdateOwnerOrgID

func (u *AppUpsert) UpdateOwnerOrgID() *AppUpsert

UpdateOwnerOrgID sets the "owner_org_id" field to the value that was provided on create.

func (*AppUpsert) UpdatePrivate

func (u *AppUpsert) UpdatePrivate() *AppUpsert

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*AppUpsert) UpdateRedirectURI

func (u *AppUpsert) UpdateRedirectURI() *AppUpsert

UpdateRedirectURI sets the "redirect_uri" field to the value that was provided on create.

func (*AppUpsert) UpdateRefreshTokenValidity

func (u *AppUpsert) UpdateRefreshTokenValidity() *AppUpsert

UpdateRefreshTokenValidity sets the "refresh_token_validity" field to the value that was provided on create.

func (*AppUpsert) UpdateScopes

func (u *AppUpsert) UpdateScopes() *AppUpsert

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*AppUpsert) UpdateStatus

func (u *AppUpsert) UpdateStatus() *AppUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppUpsert) UpdateTokenValidity

func (u *AppUpsert) UpdateTokenValidity() *AppUpsert

UpdateTokenValidity sets the "token_validity" field to the value that was provided on create.

func (*AppUpsert) UpdateUpdatedAt

func (u *AppUpsert) UpdateUpdatedAt() *AppUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppUpsert) UpdateUpdatedBy

func (u *AppUpsert) UpdateUpdatedBy() *AppUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppUpsertBulk

type AppUpsertBulk struct {
	// contains filtered or unexported fields
}

AppUpsertBulk is the builder for "upsert"-ing a bulk of App nodes.

func (*AppUpsertBulk) AddLogoFileID

func (u *AppUpsertBulk) AddLogoFileID(v int) *AppUpsertBulk

AddLogoFileID adds v to the "logo_file_id" field.

func (*AppUpsertBulk) AddOwnerOrgID

func (u *AppUpsertBulk) AddOwnerOrgID(v int) *AppUpsertBulk

AddOwnerOrgID adds v to the "owner_org_id" field.

func (*AppUpsertBulk) AddRefreshTokenValidity

func (u *AppUpsertBulk) AddRefreshTokenValidity(v int32) *AppUpsertBulk

AddRefreshTokenValidity adds v to the "refresh_token_validity" field.

func (*AppUpsertBulk) AddTokenValidity

func (u *AppUpsertBulk) AddTokenValidity(v int32) *AppUpsertBulk

AddTokenValidity adds v to the "token_validity" field.

func (*AppUpsertBulk) AddUpdatedBy

func (u *AppUpsertBulk) AddUpdatedBy(v int) *AppUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*AppUpsertBulk) ClearAppKey

func (u *AppUpsertBulk) ClearAppKey() *AppUpsertBulk

ClearAppKey clears the value of the "app_key" field.

func (*AppUpsertBulk) ClearAppSecret

func (u *AppUpsertBulk) ClearAppSecret() *AppUpsertBulk

ClearAppSecret clears the value of the "app_secret" field.

func (*AppUpsertBulk) ClearComments

func (u *AppUpsertBulk) ClearComments() *AppUpsertBulk

ClearComments clears the value of the "comments" field.

func (*AppUpsertBulk) ClearLogoFileID

func (u *AppUpsertBulk) ClearLogoFileID() *AppUpsertBulk

ClearLogoFileID clears the value of the "logo_file_id" field.

func (*AppUpsertBulk) ClearOwnerOrgID

func (u *AppUpsertBulk) ClearOwnerOrgID() *AppUpsertBulk

ClearOwnerOrgID clears the value of the "owner_org_id" field.

func (*AppUpsertBulk) ClearPrivate

func (u *AppUpsertBulk) ClearPrivate() *AppUpsertBulk

ClearPrivate clears the value of the "private" field.

func (*AppUpsertBulk) ClearRedirectURI

func (u *AppUpsertBulk) ClearRedirectURI() *AppUpsertBulk

ClearRedirectURI clears the value of the "redirect_uri" field.

func (*AppUpsertBulk) ClearRefreshTokenValidity

func (u *AppUpsertBulk) ClearRefreshTokenValidity() *AppUpsertBulk

ClearRefreshTokenValidity clears the value of the "refresh_token_validity" field.

func (*AppUpsertBulk) ClearScopes

func (u *AppUpsertBulk) ClearScopes() *AppUpsertBulk

ClearScopes clears the value of the "scopes" field.

func (*AppUpsertBulk) ClearStatus

func (u *AppUpsertBulk) ClearStatus() *AppUpsertBulk

ClearStatus clears the value of the "status" field.

func (*AppUpsertBulk) ClearTokenValidity

func (u *AppUpsertBulk) ClearTokenValidity() *AppUpsertBulk

ClearTokenValidity clears the value of the "token_validity" field.

func (*AppUpsertBulk) ClearUpdatedAt

func (u *AppUpsertBulk) ClearUpdatedAt() *AppUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppUpsertBulk) ClearUpdatedBy

func (u *AppUpsertBulk) ClearUpdatedBy() *AppUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppUpsertBulk) DoNothing

func (u *AppUpsertBulk) DoNothing() *AppUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppUpsertBulk) Exec

func (u *AppUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppUpsertBulk) ExecX

func (u *AppUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppUpsertBulk) Ignore

func (u *AppUpsertBulk) Ignore() *AppUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.App.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*AppUpsertBulk) SetAppKey

func (u *AppUpsertBulk) SetAppKey(v string) *AppUpsertBulk

SetAppKey sets the "app_key" field.

func (*AppUpsertBulk) SetAppSecret

func (u *AppUpsertBulk) SetAppSecret(v string) *AppUpsertBulk

SetAppSecret sets the "app_secret" field.

func (*AppUpsertBulk) SetComments

func (u *AppUpsertBulk) SetComments(v string) *AppUpsertBulk

SetComments sets the "comments" field.

func (*AppUpsertBulk) SetKind

func (u *AppUpsertBulk) SetKind(v app.Kind) *AppUpsertBulk

SetKind sets the "kind" field.

func (*AppUpsertBulk) SetLogoFileID

func (u *AppUpsertBulk) SetLogoFileID(v int) *AppUpsertBulk

SetLogoFileID sets the "logo_file_id" field.

func (*AppUpsertBulk) SetName

func (u *AppUpsertBulk) SetName(v string) *AppUpsertBulk

SetName sets the "name" field.

func (*AppUpsertBulk) SetOwnerOrgID

func (u *AppUpsertBulk) SetOwnerOrgID(v int) *AppUpsertBulk

SetOwnerOrgID sets the "owner_org_id" field.

func (*AppUpsertBulk) SetPrivate

func (u *AppUpsertBulk) SetPrivate(v bool) *AppUpsertBulk

SetPrivate sets the "private" field.

func (*AppUpsertBulk) SetRedirectURI

func (u *AppUpsertBulk) SetRedirectURI(v string) *AppUpsertBulk

SetRedirectURI sets the "redirect_uri" field.

func (*AppUpsertBulk) SetRefreshTokenValidity

func (u *AppUpsertBulk) SetRefreshTokenValidity(v int32) *AppUpsertBulk

SetRefreshTokenValidity sets the "refresh_token_validity" field.

func (*AppUpsertBulk) SetScopes

func (u *AppUpsertBulk) SetScopes(v string) *AppUpsertBulk

SetScopes sets the "scopes" field.

func (*AppUpsertBulk) SetStatus

func (u *AppUpsertBulk) SetStatus(v typex.SimpleStatus) *AppUpsertBulk

SetStatus sets the "status" field.

func (*AppUpsertBulk) SetTokenValidity

func (u *AppUpsertBulk) SetTokenValidity(v int32) *AppUpsertBulk

SetTokenValidity sets the "token_validity" field.

func (*AppUpsertBulk) SetUpdatedAt

func (u *AppUpsertBulk) SetUpdatedAt(v time.Time) *AppUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AppUpsertBulk) SetUpdatedBy

func (u *AppUpsertBulk) SetUpdatedBy(v int) *AppUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*AppUpsertBulk) Update

func (u *AppUpsertBulk) Update(set func(*AppUpsert)) *AppUpsertBulk

Update allows overriding fields `UPDATE` values. See the AppCreateBulk.OnConflict documentation for more info.

func (*AppUpsertBulk) UpdateAppKey

func (u *AppUpsertBulk) UpdateAppKey() *AppUpsertBulk

UpdateAppKey sets the "app_key" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateAppSecret

func (u *AppUpsertBulk) UpdateAppSecret() *AppUpsertBulk

UpdateAppSecret sets the "app_secret" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateComments

func (u *AppUpsertBulk) UpdateComments() *AppUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateKind

func (u *AppUpsertBulk) UpdateKind() *AppUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateLogoFileID

func (u *AppUpsertBulk) UpdateLogoFileID() *AppUpsertBulk

UpdateLogoFileID sets the "logo_file_id" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateName

func (u *AppUpsertBulk) UpdateName() *AppUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateNewValues

func (u *AppUpsertBulk) UpdateNewValues() *AppUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.App.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(app.FieldID)
		}),
	).
	Exec(ctx)

func (*AppUpsertBulk) UpdateOwnerOrgID

func (u *AppUpsertBulk) UpdateOwnerOrgID() *AppUpsertBulk

UpdateOwnerOrgID sets the "owner_org_id" field to the value that was provided on create.

func (*AppUpsertBulk) UpdatePrivate

func (u *AppUpsertBulk) UpdatePrivate() *AppUpsertBulk

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateRedirectURI

func (u *AppUpsertBulk) UpdateRedirectURI() *AppUpsertBulk

UpdateRedirectURI sets the "redirect_uri" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateRefreshTokenValidity

func (u *AppUpsertBulk) UpdateRefreshTokenValidity() *AppUpsertBulk

UpdateRefreshTokenValidity sets the "refresh_token_validity" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateScopes

func (u *AppUpsertBulk) UpdateScopes() *AppUpsertBulk

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateStatus

func (u *AppUpsertBulk) UpdateStatus() *AppUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateTokenValidity

func (u *AppUpsertBulk) UpdateTokenValidity() *AppUpsertBulk

UpdateTokenValidity sets the "token_validity" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateUpdatedAt

func (u *AppUpsertBulk) UpdateUpdatedAt() *AppUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppUpsertBulk) UpdateUpdatedBy

func (u *AppUpsertBulk) UpdateUpdatedBy() *AppUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppUpsertOne

type AppUpsertOne struct {
	// contains filtered or unexported fields
}

AppUpsertOne is the builder for "upsert"-ing

one App node.

func (*AppUpsertOne) AddLogoFileID

func (u *AppUpsertOne) AddLogoFileID(v int) *AppUpsertOne

AddLogoFileID adds v to the "logo_file_id" field.

func (*AppUpsertOne) AddOwnerOrgID

func (u *AppUpsertOne) AddOwnerOrgID(v int) *AppUpsertOne

AddOwnerOrgID adds v to the "owner_org_id" field.

func (*AppUpsertOne) AddRefreshTokenValidity

func (u *AppUpsertOne) AddRefreshTokenValidity(v int32) *AppUpsertOne

AddRefreshTokenValidity adds v to the "refresh_token_validity" field.

func (*AppUpsertOne) AddTokenValidity

func (u *AppUpsertOne) AddTokenValidity(v int32) *AppUpsertOne

AddTokenValidity adds v to the "token_validity" field.

func (*AppUpsertOne) AddUpdatedBy

func (u *AppUpsertOne) AddUpdatedBy(v int) *AppUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*AppUpsertOne) ClearAppKey

func (u *AppUpsertOne) ClearAppKey() *AppUpsertOne

ClearAppKey clears the value of the "app_key" field.

func (*AppUpsertOne) ClearAppSecret

func (u *AppUpsertOne) ClearAppSecret() *AppUpsertOne

ClearAppSecret clears the value of the "app_secret" field.

func (*AppUpsertOne) ClearComments

func (u *AppUpsertOne) ClearComments() *AppUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppUpsertOne) ClearLogoFileID

func (u *AppUpsertOne) ClearLogoFileID() *AppUpsertOne

ClearLogoFileID clears the value of the "logo_file_id" field.

func (*AppUpsertOne) ClearOwnerOrgID

func (u *AppUpsertOne) ClearOwnerOrgID() *AppUpsertOne

ClearOwnerOrgID clears the value of the "owner_org_id" field.

func (*AppUpsertOne) ClearPrivate

func (u *AppUpsertOne) ClearPrivate() *AppUpsertOne

ClearPrivate clears the value of the "private" field.

func (*AppUpsertOne) ClearRedirectURI

func (u *AppUpsertOne) ClearRedirectURI() *AppUpsertOne

ClearRedirectURI clears the value of the "redirect_uri" field.

func (*AppUpsertOne) ClearRefreshTokenValidity

func (u *AppUpsertOne) ClearRefreshTokenValidity() *AppUpsertOne

ClearRefreshTokenValidity clears the value of the "refresh_token_validity" field.

func (*AppUpsertOne) ClearScopes

func (u *AppUpsertOne) ClearScopes() *AppUpsertOne

ClearScopes clears the value of the "scopes" field.

func (*AppUpsertOne) ClearStatus

func (u *AppUpsertOne) ClearStatus() *AppUpsertOne

ClearStatus clears the value of the "status" field.

func (*AppUpsertOne) ClearTokenValidity

func (u *AppUpsertOne) ClearTokenValidity() *AppUpsertOne

ClearTokenValidity clears the value of the "token_validity" field.

func (*AppUpsertOne) ClearUpdatedAt

func (u *AppUpsertOne) ClearUpdatedAt() *AppUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppUpsertOne) ClearUpdatedBy

func (u *AppUpsertOne) ClearUpdatedBy() *AppUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppUpsertOne) DoNothing

func (u *AppUpsertOne) DoNothing() *AppUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AppUpsertOne) Exec

func (u *AppUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*AppUpsertOne) ExecX

func (u *AppUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppUpsertOne) ID

func (u *AppUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AppUpsertOne) IDX

func (u *AppUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*AppUpsertOne) Ignore

func (u *AppUpsertOne) Ignore() *AppUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.App.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AppUpsertOne) SetAppKey

func (u *AppUpsertOne) SetAppKey(v string) *AppUpsertOne

SetAppKey sets the "app_key" field.

func (*AppUpsertOne) SetAppSecret

func (u *AppUpsertOne) SetAppSecret(v string) *AppUpsertOne

SetAppSecret sets the "app_secret" field.

func (*AppUpsertOne) SetComments

func (u *AppUpsertOne) SetComments(v string) *AppUpsertOne

SetComments sets the "comments" field.

func (*AppUpsertOne) SetKind

func (u *AppUpsertOne) SetKind(v app.Kind) *AppUpsertOne

SetKind sets the "kind" field.

func (*AppUpsertOne) SetLogoFileID

func (u *AppUpsertOne) SetLogoFileID(v int) *AppUpsertOne

SetLogoFileID sets the "logo_file_id" field.

func (*AppUpsertOne) SetName

func (u *AppUpsertOne) SetName(v string) *AppUpsertOne

SetName sets the "name" field.

func (*AppUpsertOne) SetOwnerOrgID

func (u *AppUpsertOne) SetOwnerOrgID(v int) *AppUpsertOne

SetOwnerOrgID sets the "owner_org_id" field.

func (*AppUpsertOne) SetPrivate

func (u *AppUpsertOne) SetPrivate(v bool) *AppUpsertOne

SetPrivate sets the "private" field.

func (*AppUpsertOne) SetRedirectURI

func (u *AppUpsertOne) SetRedirectURI(v string) *AppUpsertOne

SetRedirectURI sets the "redirect_uri" field.

func (*AppUpsertOne) SetRefreshTokenValidity

func (u *AppUpsertOne) SetRefreshTokenValidity(v int32) *AppUpsertOne

SetRefreshTokenValidity sets the "refresh_token_validity" field.

func (*AppUpsertOne) SetScopes

func (u *AppUpsertOne) SetScopes(v string) *AppUpsertOne

SetScopes sets the "scopes" field.

func (*AppUpsertOne) SetStatus

func (u *AppUpsertOne) SetStatus(v typex.SimpleStatus) *AppUpsertOne

SetStatus sets the "status" field.

func (*AppUpsertOne) SetTokenValidity

func (u *AppUpsertOne) SetTokenValidity(v int32) *AppUpsertOne

SetTokenValidity sets the "token_validity" field.

func (*AppUpsertOne) SetUpdatedAt

func (u *AppUpsertOne) SetUpdatedAt(v time.Time) *AppUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AppUpsertOne) SetUpdatedBy

func (u *AppUpsertOne) SetUpdatedBy(v int) *AppUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*AppUpsertOne) Update

func (u *AppUpsertOne) Update(set func(*AppUpsert)) *AppUpsertOne

Update allows overriding fields `UPDATE` values. See the AppCreate.OnConflict documentation for more info.

func (*AppUpsertOne) UpdateAppKey

func (u *AppUpsertOne) UpdateAppKey() *AppUpsertOne

UpdateAppKey sets the "app_key" field to the value that was provided on create.

func (*AppUpsertOne) UpdateAppSecret

func (u *AppUpsertOne) UpdateAppSecret() *AppUpsertOne

UpdateAppSecret sets the "app_secret" field to the value that was provided on create.

func (*AppUpsertOne) UpdateComments

func (u *AppUpsertOne) UpdateComments() *AppUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*AppUpsertOne) UpdateKind

func (u *AppUpsertOne) UpdateKind() *AppUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*AppUpsertOne) UpdateLogoFileID

func (u *AppUpsertOne) UpdateLogoFileID() *AppUpsertOne

UpdateLogoFileID sets the "logo_file_id" field to the value that was provided on create.

func (*AppUpsertOne) UpdateName

func (u *AppUpsertOne) UpdateName() *AppUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AppUpsertOne) UpdateNewValues

func (u *AppUpsertOne) UpdateNewValues() *AppUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.App.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(app.FieldID)
		}),
	).
	Exec(ctx)

func (*AppUpsertOne) UpdateOwnerOrgID

func (u *AppUpsertOne) UpdateOwnerOrgID() *AppUpsertOne

UpdateOwnerOrgID sets the "owner_org_id" field to the value that was provided on create.

func (*AppUpsertOne) UpdatePrivate

func (u *AppUpsertOne) UpdatePrivate() *AppUpsertOne

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*AppUpsertOne) UpdateRedirectURI

func (u *AppUpsertOne) UpdateRedirectURI() *AppUpsertOne

UpdateRedirectURI sets the "redirect_uri" field to the value that was provided on create.

func (*AppUpsertOne) UpdateRefreshTokenValidity

func (u *AppUpsertOne) UpdateRefreshTokenValidity() *AppUpsertOne

UpdateRefreshTokenValidity sets the "refresh_token_validity" field to the value that was provided on create.

func (*AppUpsertOne) UpdateScopes

func (u *AppUpsertOne) UpdateScopes() *AppUpsertOne

UpdateScopes sets the "scopes" field to the value that was provided on create.

func (*AppUpsertOne) UpdateStatus

func (u *AppUpsertOne) UpdateStatus() *AppUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*AppUpsertOne) UpdateTokenValidity

func (u *AppUpsertOne) UpdateTokenValidity() *AppUpsertOne

UpdateTokenValidity sets the "token_validity" field to the value that was provided on create.

func (*AppUpsertOne) UpdateUpdatedAt

func (u *AppUpsertOne) UpdateUpdatedAt() *AppUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AppUpsertOne) UpdateUpdatedBy

func (u *AppUpsertOne) UpdateUpdatedBy() *AppUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type AppWhereInput

type AppWhereInput struct {
	Predicates []predicate.App  `json:"-"`
	Not        *AppWhereInput   `json:"not,omitempty"`
	Or         []*AppWhereInput `json:"or,omitempty"`
	And        []*AppWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "code" field predicates.
	Code             *string  `json:"code,omitempty"`
	CodeNEQ          *string  `json:"codeNEQ,omitempty"`
	CodeIn           []string `json:"codeIn,omitempty"`
	CodeNotIn        []string `json:"codeNotIn,omitempty"`
	CodeGT           *string  `json:"codeGT,omitempty"`
	CodeGTE          *string  `json:"codeGTE,omitempty"`
	CodeLT           *string  `json:"codeLT,omitempty"`
	CodeLTE          *string  `json:"codeLTE,omitempty"`
	CodeContains     *string  `json:"codeContains,omitempty"`
	CodeHasPrefix    *string  `json:"codeHasPrefix,omitempty"`
	CodeHasSuffix    *string  `json:"codeHasSuffix,omitempty"`
	CodeEqualFold    *string  `json:"codeEqualFold,omitempty"`
	CodeContainsFold *string  `json:"codeContainsFold,omitempty"`

	// "kind" field predicates.
	Kind      *app.Kind  `json:"kind,omitempty"`
	KindNEQ   *app.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []app.Kind `json:"kindIn,omitempty"`
	KindNotIn []app.Kind `json:"kindNotIn,omitempty"`

	// "redirect_uri" field predicates.
	RedirectURI             *string  `json:"redirectURI,omitempty"`
	RedirectURINEQ          *string  `json:"redirectURINEQ,omitempty"`
	RedirectURIIn           []string `json:"redirectURIIn,omitempty"`
	RedirectURINotIn        []string `json:"redirectURINotIn,omitempty"`
	RedirectURIGT           *string  `json:"redirectURIGT,omitempty"`
	RedirectURIGTE          *string  `json:"redirectURIGTE,omitempty"`
	RedirectURILT           *string  `json:"redirectURILT,omitempty"`
	RedirectURILTE          *string  `json:"redirectURILTE,omitempty"`
	RedirectURIContains     *string  `json:"redirectURIContains,omitempty"`
	RedirectURIHasPrefix    *string  `json:"redirectURIHasPrefix,omitempty"`
	RedirectURIHasSuffix    *string  `json:"redirectURIHasSuffix,omitempty"`
	RedirectURIIsNil        bool     `json:"redirectURIIsNil,omitempty"`
	RedirectURINotNil       bool     `json:"redirectURINotNil,omitempty"`
	RedirectURIEqualFold    *string  `json:"redirectURIEqualFold,omitempty"`
	RedirectURIContainsFold *string  `json:"redirectURIContainsFold,omitempty"`

	// "app_key" field predicates.
	AppKey             *string  `json:"appKey,omitempty"`
	AppKeyNEQ          *string  `json:"appKeyNEQ,omitempty"`
	AppKeyIn           []string `json:"appKeyIn,omitempty"`
	AppKeyNotIn        []string `json:"appKeyNotIn,omitempty"`
	AppKeyGT           *string  `json:"appKeyGT,omitempty"`
	AppKeyGTE          *string  `json:"appKeyGTE,omitempty"`
	AppKeyLT           *string  `json:"appKeyLT,omitempty"`
	AppKeyLTE          *string  `json:"appKeyLTE,omitempty"`
	AppKeyContains     *string  `json:"appKeyContains,omitempty"`
	AppKeyHasPrefix    *string  `json:"appKeyHasPrefix,omitempty"`
	AppKeyHasSuffix    *string  `json:"appKeyHasSuffix,omitempty"`
	AppKeyIsNil        bool     `json:"appKeyIsNil,omitempty"`
	AppKeyNotNil       bool     `json:"appKeyNotNil,omitempty"`
	AppKeyEqualFold    *string  `json:"appKeyEqualFold,omitempty"`
	AppKeyContainsFold *string  `json:"appKeyContainsFold,omitempty"`

	// "app_secret" field predicates.
	AppSecret             *string  `json:"appSecret,omitempty"`
	AppSecretNEQ          *string  `json:"appSecretNEQ,omitempty"`
	AppSecretIn           []string `json:"appSecretIn,omitempty"`
	AppSecretNotIn        []string `json:"appSecretNotIn,omitempty"`
	AppSecretGT           *string  `json:"appSecretGT,omitempty"`
	AppSecretGTE          *string  `json:"appSecretGTE,omitempty"`
	AppSecretLT           *string  `json:"appSecretLT,omitempty"`
	AppSecretLTE          *string  `json:"appSecretLTE,omitempty"`
	AppSecretContains     *string  `json:"appSecretContains,omitempty"`
	AppSecretHasPrefix    *string  `json:"appSecretHasPrefix,omitempty"`
	AppSecretHasSuffix    *string  `json:"appSecretHasSuffix,omitempty"`
	AppSecretIsNil        bool     `json:"appSecretIsNil,omitempty"`
	AppSecretNotNil       bool     `json:"appSecretNotNil,omitempty"`
	AppSecretEqualFold    *string  `json:"appSecretEqualFold,omitempty"`
	AppSecretContainsFold *string  `json:"appSecretContainsFold,omitempty"`

	// "scopes" field predicates.
	Scopes             *string  `json:"scopes,omitempty"`
	ScopesNEQ          *string  `json:"scopesNEQ,omitempty"`
	ScopesIn           []string `json:"scopesIn,omitempty"`
	ScopesNotIn        []string `json:"scopesNotIn,omitempty"`
	ScopesGT           *string  `json:"scopesGT,omitempty"`
	ScopesGTE          *string  `json:"scopesGTE,omitempty"`
	ScopesLT           *string  `json:"scopesLT,omitempty"`
	ScopesLTE          *string  `json:"scopesLTE,omitempty"`
	ScopesContains     *string  `json:"scopesContains,omitempty"`
	ScopesHasPrefix    *string  `json:"scopesHasPrefix,omitempty"`
	ScopesHasSuffix    *string  `json:"scopesHasSuffix,omitempty"`
	ScopesIsNil        bool     `json:"scopesIsNil,omitempty"`
	ScopesNotNil       bool     `json:"scopesNotNil,omitempty"`
	ScopesEqualFold    *string  `json:"scopesEqualFold,omitempty"`
	ScopesContainsFold *string  `json:"scopesContainsFold,omitempty"`

	// "token_validity" field predicates.
	TokenValidity       *int32  `json:"tokenValidity,omitempty"`
	TokenValidityNEQ    *int32  `json:"tokenValidityNEQ,omitempty"`
	TokenValidityIn     []int32 `json:"tokenValidityIn,omitempty"`
	TokenValidityNotIn  []int32 `json:"tokenValidityNotIn,omitempty"`
	TokenValidityGT     *int32  `json:"tokenValidityGT,omitempty"`
	TokenValidityGTE    *int32  `json:"tokenValidityGTE,omitempty"`
	TokenValidityLT     *int32  `json:"tokenValidityLT,omitempty"`
	TokenValidityLTE    *int32  `json:"tokenValidityLTE,omitempty"`
	TokenValidityIsNil  bool    `json:"tokenValidityIsNil,omitempty"`
	TokenValidityNotNil bool    `json:"tokenValidityNotNil,omitempty"`

	// "refresh_token_validity" field predicates.
	RefreshTokenValidity       *int32  `json:"refreshTokenValidity,omitempty"`
	RefreshTokenValidityNEQ    *int32  `json:"refreshTokenValidityNEQ,omitempty"`
	RefreshTokenValidityIn     []int32 `json:"refreshTokenValidityIn,omitempty"`
	RefreshTokenValidityNotIn  []int32 `json:"refreshTokenValidityNotIn,omitempty"`
	RefreshTokenValidityGT     *int32  `json:"refreshTokenValidityGT,omitempty"`
	RefreshTokenValidityGTE    *int32  `json:"refreshTokenValidityGTE,omitempty"`
	RefreshTokenValidityLT     *int32  `json:"refreshTokenValidityLT,omitempty"`
	RefreshTokenValidityLTE    *int32  `json:"refreshTokenValidityLTE,omitempty"`
	RefreshTokenValidityIsNil  bool    `json:"refreshTokenValidityIsNil,omitempty"`
	RefreshTokenValidityNotNil bool    `json:"refreshTokenValidityNotNil,omitempty"`

	// "logo_file_id" field predicates.
	LogoFileID       *int  `json:"logoFileID,omitempty"`
	LogoFileIDNEQ    *int  `json:"logoFileIDNEQ,omitempty"`
	LogoFileIDIn     []int `json:"logoFileIDIn,omitempty"`
	LogoFileIDNotIn  []int `json:"logoFileIDNotIn,omitempty"`
	LogoFileIDGT     *int  `json:"logoFileIDGT,omitempty"`
	LogoFileIDGTE    *int  `json:"logoFileIDGTE,omitempty"`
	LogoFileIDLT     *int  `json:"logoFileIDLT,omitempty"`
	LogoFileIDLTE    *int  `json:"logoFileIDLTE,omitempty"`
	LogoFileIDIsNil  bool  `json:"logoFileIDIsNil,omitempty"`
	LogoFileIDNotNil bool  `json:"logoFileIDNotNil,omitempty"`

	// "comments" field predicates.
	Comments             *string  `json:"comments,omitempty"`
	CommentsNEQ          *string  `json:"commentsNEQ,omitempty"`
	CommentsIn           []string `json:"commentsIn,omitempty"`
	CommentsNotIn        []string `json:"commentsNotIn,omitempty"`
	CommentsGT           *string  `json:"commentsGT,omitempty"`
	CommentsGTE          *string  `json:"commentsGTE,omitempty"`
	CommentsLT           *string  `json:"commentsLT,omitempty"`
	CommentsLTE          *string  `json:"commentsLTE,omitempty"`
	CommentsContains     *string  `json:"commentsContains,omitempty"`
	CommentsHasPrefix    *string  `json:"commentsHasPrefix,omitempty"`
	CommentsHasSuffix    *string  `json:"commentsHasSuffix,omitempty"`
	CommentsIsNil        bool     `json:"commentsIsNil,omitempty"`
	CommentsNotNil       bool     `json:"commentsNotNil,omitempty"`
	CommentsEqualFold    *string  `json:"commentsEqualFold,omitempty"`
	CommentsContainsFold *string  `json:"commentsContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "menus" edge predicates.
	HasMenus     *bool                `json:"hasMenus,omitempty"`
	HasMenusWith []*AppMenuWhereInput `json:"hasMenusWith,omitempty"`

	// "actions" edge predicates.
	HasActions     *bool                  `json:"hasActions,omitempty"`
	HasActionsWith []*AppActionWhereInput `json:"hasActionsWith,omitempty"`

	// "resources" edge predicates.
	HasResources     *bool               `json:"hasResources,omitempty"`
	HasResourcesWith []*AppResWhereInput `json:"hasResourcesWith,omitempty"`

	// "roles" edge predicates.
	HasRoles     *bool                `json:"hasRoles,omitempty"`
	HasRolesWith []*AppRoleWhereInput `json:"hasRolesWith,omitempty"`

	// "policies" edge predicates.
	HasPolicies     *bool                  `json:"hasPolicies,omitempty"`
	HasPoliciesWith []*AppPolicyWhereInput `json:"hasPoliciesWith,omitempty"`

	// "orgs" edge predicates.
	HasOrgs     *bool            `json:"hasOrgs,omitempty"`
	HasOrgsWith []*OrgWhereInput `json:"hasOrgsWith,omitempty"`

	// "dicts" edge predicates.
	HasDicts     *bool                `json:"hasDicts,omitempty"`
	HasDictsWith []*AppDictWhereInput `json:"hasDictsWith,omitempty"`
}

AppWhereInput represents a where input for filtering App queries.

func (*AppWhereInput) AddPredicates

func (i *AppWhereInput) AddPredicates(predicates ...predicate.App)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AppWhereInput) Filter

func (i *AppWhereInput) Filter(q *AppQuery) (*AppQuery, error)

Filter applies the AppWhereInput filter on the AppQuery builder.

func (*AppWhereInput) P

func (i *AppWhereInput) P() (predicate.App, error)

P returns a predicate for filtering apps. An error is returned if the input is empty or invalid.

type Apps

type Apps []*App

Apps is a parsable slice of App.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// App is the client for interacting with the App builders.
	App *AppClient
	// AppAction is the client for interacting with the AppAction builders.
	AppAction *AppActionClient
	// AppDict is the client for interacting with the AppDict builders.
	AppDict *AppDictClient
	// AppDictItem is the client for interacting with the AppDictItem builders.
	AppDictItem *AppDictItemClient
	// AppMenu is the client for interacting with the AppMenu builders.
	AppMenu *AppMenuClient
	// AppPolicy is the client for interacting with the AppPolicy builders.
	AppPolicy *AppPolicyClient
	// AppRes is the client for interacting with the AppRes builders.
	AppRes *AppResClient
	// AppRole is the client for interacting with the AppRole builders.
	AppRole *AppRoleClient
	// AppRolePolicy is the client for interacting with the AppRolePolicy builders.
	AppRolePolicy *AppRolePolicyClient
	// File is the client for interacting with the File builders.
	File *FileClient
	// FileSource is the client for interacting with the FileSource builders.
	FileSource *FileSourceClient
	// OauthClient is the client for interacting with the OauthClient builders.
	OauthClient *OauthClientClient
	// Org is the client for interacting with the Org builders.
	Org *OrgClient
	// OrgApp is the client for interacting with the OrgApp builders.
	OrgApp *OrgAppClient
	// OrgPolicy is the client for interacting with the OrgPolicy builders.
	OrgPolicy *OrgPolicyClient
	// OrgRole is the client for interacting with the OrgRole builders.
	OrgRole *OrgRoleClient
	// OrgRoleUser is the client for interacting with the OrgRoleUser builders.
	OrgRoleUser *OrgRoleUserClient
	// OrgUser is the client for interacting with the OrgUser builders.
	OrgUser *OrgUserClient
	// OrgUserPreference is the client for interacting with the OrgUserPreference builders.
	OrgUserPreference *OrgUserPreferenceClient
	// Permission is the client for interacting with the Permission builders.
	Permission *PermissionClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserDevice is the client for interacting with the UserDevice builders.
	UserDevice *UserDeviceClient
	// UserIdentity is the client for interacting with the UserIdentity builders.
	UserIdentity *UserIdentityClient
	// UserLoginProfile is the client for interacting with the UserLoginProfile builders.
	UserLoginProfile *UserLoginProfileClient
	// UserPassword is the client for interacting with the UserPassword builders.
	UserPassword *UserPasswordClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	App.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) NoderEx

func (c *Client) NoderEx(ctx context.Context, id string) (Noder, error)

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)

func (*Client) NodersEx

func (c *Client) NodersEx(ctx context.Context, ids []string, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

type ConstraintError struct {
	// contains filtered or unexported fields
}

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type CreateAppActionInput

type CreateAppActionInput struct {
	Name     string
	Kind     appaction.Kind
	Method   appaction.Method
	Comments *string
	AppID    *int
	MenuIDs  []int
}

CreateAppActionInput represents a mutation input for creating appactions.

func (*CreateAppActionInput) Mutate

Mutate applies the CreateAppActionInput on the AppActionMutation builder.

type CreateAppDictInput

type CreateAppDictInput struct {
	Code     string
	Name     string
	Comments *string
	AppID    *int
	ItemIDs  []int
}

CreateAppDictInput represents a mutation input for creating appdicts.

func (*CreateAppDictInput) Mutate

func (i *CreateAppDictInput) Mutate(m *AppDictMutation)

Mutate applies the CreateAppDictInput on the AppDictMutation builder.

type CreateAppDictItemInput

type CreateAppDictItemInput struct {
	Code     string
	Name     string
	Comments *string
	Status   *typex.SimpleStatus
	DictID   *int
	OrgID    *int
}

CreateAppDictItemInput represents a mutation input for creating appdictitems.

func (*CreateAppDictItemInput) Mutate

Mutate applies the CreateAppDictItemInput on the AppDictItemMutation builder.

type CreateAppInput

type CreateAppInput struct {
	Name                 string
	Code                 string
	Kind                 app.Kind
	RedirectURI          *string
	AppKey               *string
	AppSecret            *string
	Scopes               *string
	TokenValidity        *int32
	RefreshTokenValidity *int32
	LogoFileID           *int
	Comments             *string
	Status               *typex.SimpleStatus
	MenuIDs              []int
	ActionIDs            []int
	ResourceIDs          []int
	RoleIDs              []int
	PolicyIDs            []int
	DictIDs              []int
}

CreateAppInput represents a mutation input for creating apps.

func (*CreateAppInput) Mutate

func (i *CreateAppInput) Mutate(m *AppMutation)

Mutate applies the CreateAppInput on the AppMutation builder.

type CreateAppMenuInput

type CreateAppMenuInput struct {
	ParentID int
	Kind     appmenu.Kind
	Name     string
	Icon     *string
	Route    *string
	Comments *string
	AppID    *int
	ActionID *int
}

CreateAppMenuInput represents a mutation input for creating appmenus.

func (*CreateAppMenuInput) Mutate

func (i *CreateAppMenuInput) Mutate(m *AppMenuMutation)

Mutate applies the CreateAppMenuInput on the AppMenuMutation builder.

type CreateAppPolicyInput

type CreateAppPolicyInput struct {
	Name      string
	Comments  *string
	Rules     []*types.PolicyRule
	AutoGrant *bool
	Status    *typex.SimpleStatus
	AppID     *int
	RoleIDs   []int
}

CreateAppPolicyInput represents a mutation input for creating apppolicies.

func (*CreateAppPolicyInput) Mutate

Mutate applies the CreateAppPolicyInput on the AppPolicyMutation builder.

type CreateAppResInput

type CreateAppResInput struct {
	Name       string
	TypeName   string
	ArnPattern string
	AppID      *int
}

CreateAppResInput represents a mutation input for creating appresslice.

func (*CreateAppResInput) Mutate

func (i *CreateAppResInput) Mutate(m *AppResMutation)

Mutate applies the CreateAppResInput on the AppResMutation builder.

type CreateAppRoleInput

type CreateAppRoleInput struct {
	Name      string
	Comments  *string
	AutoGrant *bool
	Editable  *bool
	AppID     *int
}

CreateAppRoleInput represents a mutation input for creating approles.

func (*CreateAppRoleInput) Mutate

func (i *CreateAppRoleInput) Mutate(m *AppRoleMutation)

Mutate applies the CreateAppRoleInput on the AppRoleMutation builder.

type CreateFileSourceInput

type CreateFileSourceInput struct {
	Kind     filesource.Kind
	Comments *string
	Endpoint *string
	Region   *string
	Bucket   *string
	FileIDs  []int
}

CreateFileSourceInput represents a mutation input for creating filesources.

func (*CreateFileSourceInput) Mutate

Mutate applies the CreateFileSourceInput on the FileSourceMutation builder.

type CreateOauthClientInput

type CreateOauthClientInput struct {
	Name       string
	GrantTypes oauthclient.GrantTypes
	UserID     int
}

CreateOauthClientInput represents a mutation input for creating oauthclients.

func (*CreateOauthClientInput) Mutate

Mutate applies the CreateOauthClientInput on the OauthClientMutation builder.

type CreateOrgInput

type CreateOrgInput struct {
	Domain           *string
	Name             string
	Profile          *string
	Status           *typex.SimpleStatus
	CountryCode      *string
	Timezone         *string
	ParentID         int
	ChildIDs         []int
	OwnerID          *int
	UserIDs          []int
	RolesAndGroupIDs []int
	PermissionIDs    []int
	PolicyIDs        []int
	AppIDs           []int
}

CreateOrgInput represents a mutation input for creating orgs.

func (*CreateOrgInput) Mutate

func (i *CreateOrgInput) Mutate(m *OrgMutation)

Mutate applies the CreateOrgInput on the OrgMutation builder.

type CreateOrgPolicyInput

type CreateOrgPolicyInput struct {
	AppPolicyID   *int
	Name          string
	Comments      *string
	Rules         []*types.PolicyRule
	OrgID         *int
	PermissionIDs []int
}

CreateOrgPolicyInput represents a mutation input for creating orgpolicies.

func (*CreateOrgPolicyInput) Mutate

Mutate applies the CreateOrgPolicyInput on the OrgPolicyMutation builder.

type CreateOrgRoleInput

type CreateOrgRoleInput struct {
	Kind     orgrole.Kind
	Name     string
	Comments *string
	OrgID    *int
}

CreateOrgRoleInput represents a mutation input for creating orgroles.

func (*CreateOrgRoleInput) Mutate

func (i *CreateOrgRoleInput) Mutate(m *OrgRoleMutation)

Mutate applies the CreateOrgRoleInput on the OrgRoleMutation builder.

type CreateOrgUserInput

type CreateOrgUserInput struct {
	JoinedAt    *time.Time
	DisplayName string
	OrgID       int
	UserID      int
}

CreateOrgUserInput represents a mutation input for creating orgusers.

func (*CreateOrgUserInput) Mutate

func (i *CreateOrgUserInput) Mutate(m *OrgUserMutation)

Mutate applies the CreateOrgUserInput on the OrgUserMutation builder.

type CreateOrgUserPreferenceInput

type CreateOrgUserPreferenceInput struct {
	MenuFavorite []int
	MenuRecent   []int
}

CreateOrgUserPreferenceInput represents a mutation input for creating orguserpreferences.

func (*CreateOrgUserPreferenceInput) Mutate

Mutate applies the CreateOrgUserPreferenceInput on the OrgUserPreferenceMutation builder.

type CreatePermissionInput

type CreatePermissionInput struct {
	PrincipalKind permission.PrincipalKind
	StartAt       *time.Time
	EndAt         *time.Time
	OrgID         int
	UserID        *int
	RoleID        *int
	OrgPolicyID   int
}

CreatePermissionInput represents a mutation input for creating permissions.

func (*CreatePermissionInput) Mutate

Mutate applies the CreatePermissionInput on the PermissionMutation builder.

type CreateUserIdentityInput

type CreateUserIdentityInput struct {
	Kind       useridentity.Kind
	Code       *string
	CodeExtend *string
	Status     *typex.SimpleStatus
	UserID     *int
}

CreateUserIdentityInput represents a mutation input for creating useridentities.

func (*CreateUserIdentityInput) Mutate

Mutate applies the CreateUserIdentityInput on the UserIdentityMutation builder.

type CreateUserInput

type CreateUserInput struct {
	PrincipalName  string
	DisplayName    string
	Email          *string
	Mobile         *string
	Status         *typex.SimpleStatus
	Comments       *string
	AvatarFileID   *int
	IdentityIDs    []int
	LoginProfileID *int
	PasswordIDs    []int
	DeviceIDs      []int
	OauthClientIDs []int
}

CreateUserInput represents a mutation input for creating users.

func (*CreateUserInput) Mutate

func (i *CreateUserInput) Mutate(m *UserMutation)

Mutate applies the CreateUserInput on the UserMutation builder.

type CreateUserLoginProfileInput

type CreateUserLoginProfileInput struct {
	CanLogin      *bool
	SetKind       userloginprofile.SetKind
	PasswordReset *bool
	VerifyDevice  bool
	UserID        *int
}

CreateUserLoginProfileInput represents a mutation input for creating userloginprofiles.

func (*CreateUserLoginProfileInput) Mutate

Mutate applies the CreateUserLoginProfileInput on the UserLoginProfileMutation builder.

type CreateUserPasswordInput

type CreateUserPasswordInput struct {
	Scene    userpassword.Scene
	Password *string
	Status   *typex.SimpleStatus
	UserID   *int
}

CreateUserPasswordInput represents a mutation input for creating userpasswords.

func (*CreateUserPasswordInput) Mutate

Mutate applies the CreateUserPasswordInput on the UserPasswordMutation builder.

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

type File

type File struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 文件名称
	Name string `json:"name,omitempty"`
	// 文件来源
	SourceID int `json:"source_id,omitempty"`
	// 租户ID
	TenantID int `json:"tenant_id,omitempty"`
	// 业务引用次数
	RefCount int `json:"ref_count,omitempty"`
	// 文件相对路径
	Path string `json:"path,omitempty"`
	// 文件大小,单位为B
	Size int `json:"size,omitempty"`
	// 媒体类型,如:image/png
	MineType string `json:"mine_type,omitempty"`
	// md5值
	Md5 string `json:"md5,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FileQuery when eager-loading is set.
	Edges FileEdges `json:"edges"`
	// contains filtered or unexported fields
}

File is the model entity for the File schema.

func (*File) GlobalID

func (f *File) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given File node.

func (*File) IsNode

func (*File) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*File) QuerySource

func (f *File) QuerySource() *FileSourceQuery

QuerySource queries the "source" edge of the File entity.

func (*File) Source

func (f *File) Source(ctx context.Context) (*FileSource, error)

func (*File) String

func (f *File) String() string

String implements the fmt.Stringer.

func (*File) ToEdge

func (f *File) ToEdge(order *FileOrder) *FileEdge

ToEdge converts File into FileEdge.

func (*File) Unwrap

func (f *File) Unwrap() *File

Unwrap unwraps the File entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*File) Update

func (f *File) Update() *FileUpdateOne

Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.

func (*File) Value

func (f *File) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the File. This includes values selected through modifiers, order, etc.

type FileClient

type FileClient struct {
	// contains filtered or unexported fields
}

FileClient is a client for the File schema.

func NewFileClient

func NewFileClient(c config) *FileClient

NewFileClient returns a client for the File from the given config.

func (*FileClient) Create

func (c *FileClient) Create() *FileCreate

Create returns a builder for creating a File entity.

func (*FileClient) CreateBulk

func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk

CreateBulk returns a builder for creating a bulk of File entities.

func (*FileClient) Delete

func (c *FileClient) Delete() *FileDelete

Delete returns a delete builder for File.

func (*FileClient) DeleteOne

func (c *FileClient) DeleteOne(f *File) *FileDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FileClient) DeleteOneID

func (c *FileClient) DeleteOneID(id int) *FileDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*FileClient) Get

func (c *FileClient) Get(ctx context.Context, id int) (*File, error)

Get returns a File entity by its id.

func (*FileClient) GetX

func (c *FileClient) GetX(ctx context.Context, id int) *File

GetX is like Get, but panics if an error occurs.

func (*FileClient) Hooks

func (c *FileClient) Hooks() []Hook

Hooks returns the client hooks.

func (*FileClient) Intercept

func (c *FileClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `file.Intercept(f(g(h())))`.

func (*FileClient) Interceptors

func (c *FileClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*FileClient) MapCreateBulk

func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*FileClient) Query

func (c *FileClient) Query() *FileQuery

Query returns a query builder for File.

func (*FileClient) QuerySource

func (c *FileClient) QuerySource(f *File) *FileSourceQuery

QuerySource queries the source edge of a File.

func (*FileClient) Update

func (c *FileClient) Update() *FileUpdate

Update returns an update builder for File.

func (*FileClient) UpdateOne

func (c *FileClient) UpdateOne(f *File) *FileUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FileClient) UpdateOneID

func (c *FileClient) UpdateOneID(id int) *FileUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FileClient) Use

func (c *FileClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.

type FileConnection

type FileConnection struct {
	Edges      []*FileEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

FileConnection is the connection containing edges to File.

type FileCreate

type FileCreate struct {
	// contains filtered or unexported fields
}

FileCreate is the builder for creating a File entity.

func (*FileCreate) Exec

func (fc *FileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileCreate) ExecX

func (fc *FileCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileCreate) Mutation

func (fc *FileCreate) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileCreate) OnConflict

func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.File.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FileUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*FileCreate) OnConflictColumns

func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.File.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileCreate) Save

func (fc *FileCreate) Save(ctx context.Context) (*File, error)

Save creates the File in the database.

func (*FileCreate) SaveX

func (fc *FileCreate) SaveX(ctx context.Context) *File

SaveX calls Save and panics if Save returns an error.

func (*FileCreate) SetCreatedAt

func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate

SetCreatedAt sets the "created_at" field.

func (*FileCreate) SetCreatedBy

func (fc *FileCreate) SetCreatedBy(i int) *FileCreate

SetCreatedBy sets the "created_by" field.

func (*FileCreate) SetID

func (fc *FileCreate) SetID(i int) *FileCreate

SetID sets the "id" field.

func (*FileCreate) SetMd5

func (fc *FileCreate) SetMd5(s string) *FileCreate

SetMd5 sets the "md5" field.

func (*FileCreate) SetMineType

func (fc *FileCreate) SetMineType(s string) *FileCreate

SetMineType sets the "mine_type" field.

func (*FileCreate) SetName

func (fc *FileCreate) SetName(s string) *FileCreate

SetName sets the "name" field.

func (*FileCreate) SetNillableCreatedAt

func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*FileCreate) SetNillableID

func (fc *FileCreate) SetNillableID(i *int) *FileCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*FileCreate) SetNillableMd5

func (fc *FileCreate) SetNillableMd5(s *string) *FileCreate

SetNillableMd5 sets the "md5" field if the given value is not nil.

func (*FileCreate) SetNillableMineType

func (fc *FileCreate) SetNillableMineType(s *string) *FileCreate

SetNillableMineType sets the "mine_type" field if the given value is not nil.

func (*FileCreate) SetNillableRefCount

func (fc *FileCreate) SetNillableRefCount(i *int) *FileCreate

SetNillableRefCount sets the "ref_count" field if the given value is not nil.

func (*FileCreate) SetNillableSize

func (fc *FileCreate) SetNillableSize(i *int) *FileCreate

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileCreate) SetNillableUpdatedAt

func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileCreate) SetNillableUpdatedBy

func (fc *FileCreate) SetNillableUpdatedBy(i *int) *FileCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileCreate) SetPath

func (fc *FileCreate) SetPath(s string) *FileCreate

SetPath sets the "path" field.

func (*FileCreate) SetRefCount

func (fc *FileCreate) SetRefCount(i int) *FileCreate

SetRefCount sets the "ref_count" field.

func (*FileCreate) SetSize

func (fc *FileCreate) SetSize(i int) *FileCreate

SetSize sets the "size" field.

func (*FileCreate) SetSource

func (fc *FileCreate) SetSource(f *FileSource) *FileCreate

SetSource sets the "source" edge to the FileSource entity.

func (*FileCreate) SetSourceID

func (fc *FileCreate) SetSourceID(i int) *FileCreate

SetSourceID sets the "source_id" field.

func (*FileCreate) SetTenantID

func (fc *FileCreate) SetTenantID(i int) *FileCreate

SetTenantID sets the "tenant_id" field.

func (*FileCreate) SetUpdatedAt

func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate

SetUpdatedAt sets the "updated_at" field.

func (*FileCreate) SetUpdatedBy

func (fc *FileCreate) SetUpdatedBy(i int) *FileCreate

SetUpdatedBy sets the "updated_by" field.

type FileCreateBulk

type FileCreateBulk struct {
	// contains filtered or unexported fields
}

FileCreateBulk is the builder for creating many File entities in bulk.

func (*FileCreateBulk) Exec

func (fcb *FileCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileCreateBulk) ExecX

func (fcb *FileCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileCreateBulk) OnConflict

func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.File.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FileUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*FileCreateBulk) OnConflictColumns

func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.File.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileCreateBulk) Save

func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)

Save creates the File entities in the database.

func (*FileCreateBulk) SaveX

func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File

SaveX is like Save, but panics if an error occurs.

type FileDelete

type FileDelete struct {
	// contains filtered or unexported fields
}

FileDelete is the builder for deleting a File entity.

func (*FileDelete) Exec

func (fd *FileDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*FileDelete) ExecX

func (fd *FileDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*FileDelete) Where

func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete

Where appends a list predicates to the FileDelete builder.

type FileDeleteOne

type FileDeleteOne struct {
	// contains filtered or unexported fields
}

FileDeleteOne is the builder for deleting a single File entity.

func (*FileDeleteOne) Exec

func (fdo *FileDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FileDeleteOne) ExecX

func (fdo *FileDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileDeleteOne) Where

func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne

Where appends a list predicates to the FileDelete builder.

type FileEdge

type FileEdge struct {
	Node   *File  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

FileEdge is the edge representation of File.

type FileEdges

type FileEdges struct {
	// 文件来源
	Source *FileSource `json:"source,omitempty"`
	// contains filtered or unexported fields
}

FileEdges holds the relations/edges for other nodes in the graph.

func (FileEdges) SourceOrErr

func (e FileEdges) SourceOrErr() (*FileSource, error)

SourceOrErr returns the Source value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type FileGroupBy

type FileGroupBy struct {
	// contains filtered or unexported fields
}

FileGroupBy is the group-by builder for File entities.

func (*FileGroupBy) Aggregate

func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*FileGroupBy) Bool

func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) BoolX

func (s *FileGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileGroupBy) Bools

func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) BoolsX

func (s *FileGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FileGroupBy) Float64

func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) Float64X

func (s *FileGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileGroupBy) Float64s

func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) Float64sX

func (s *FileGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileGroupBy) Int

func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) IntX

func (s *FileGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileGroupBy) Ints

func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) IntsX

func (s *FileGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FileGroupBy) Scan

func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileGroupBy) ScanX

func (s *FileGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileGroupBy) String

func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) StringX

func (s *FileGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileGroupBy) Strings

func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) StringsX

func (s *FileGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileMutation

type FileMutation struct {
	// contains filtered or unexported fields
}

FileMutation represents an operation that mutates the File nodes in the graph.

func (*FileMutation) AddCreatedBy

func (m *FileMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*FileMutation) AddField

func (m *FileMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*FileMutation) AddRefCount

func (m *FileMutation) AddRefCount(i int)

AddRefCount adds i to the "ref_count" field.

func (*FileMutation) AddSize

func (m *FileMutation) AddSize(i int)

AddSize adds i to the "size" field.

func (*FileMutation) AddTenantID

func (m *FileMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*FileMutation) AddUpdatedBy

func (m *FileMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*FileMutation) AddedCreatedBy

func (m *FileMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*FileMutation) AddedEdges

func (m *FileMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*FileMutation) AddedField

func (m *FileMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*FileMutation) AddedFields

func (m *FileMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*FileMutation) AddedIDs

func (m *FileMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*FileMutation) AddedRefCount

func (m *FileMutation) AddedRefCount() (r int, exists bool)

AddedRefCount returns the value that was added to the "ref_count" field in this mutation.

func (*FileMutation) AddedSize

func (m *FileMutation) AddedSize() (r int, exists bool)

AddedSize returns the value that was added to the "size" field in this mutation.

func (*FileMutation) AddedTenantID

func (m *FileMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*FileMutation) AddedUpdatedBy

func (m *FileMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*FileMutation) ClearEdge

func (m *FileMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*FileMutation) ClearField

func (m *FileMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*FileMutation) ClearMd5

func (m *FileMutation) ClearMd5()

ClearMd5 clears the value of the "md5" field.

func (*FileMutation) ClearMineType

func (m *FileMutation) ClearMineType()

ClearMineType clears the value of the "mine_type" field.

func (*FileMutation) ClearRefCount

func (m *FileMutation) ClearRefCount()

ClearRefCount clears the value of the "ref_count" field.

func (*FileMutation) ClearSize

func (m *FileMutation) ClearSize()

ClearSize clears the value of the "size" field.

func (*FileMutation) ClearSource

func (m *FileMutation) ClearSource()

ClearSource clears the "source" edge to the FileSource entity.

func (*FileMutation) ClearUpdatedAt

func (m *FileMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileMutation) ClearUpdatedBy

func (m *FileMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileMutation) ClearedEdges

func (m *FileMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*FileMutation) ClearedFields

func (m *FileMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (FileMutation) Client

func (m FileMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*FileMutation) CreatedAt

func (m *FileMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*FileMutation) CreatedBy

func (m *FileMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*FileMutation) EdgeCleared

func (m *FileMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*FileMutation) Field

func (m *FileMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*FileMutation) FieldCleared

func (m *FileMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*FileMutation) Fields

func (m *FileMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*FileMutation) ID

func (m *FileMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*FileMutation) IDs

func (m *FileMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*FileMutation) Md5

func (m *FileMutation) Md5() (r string, exists bool)

Md5 returns the value of the "md5" field in the mutation.

func (*FileMutation) Md5Cleared

func (m *FileMutation) Md5Cleared() bool

Md5Cleared returns if the "md5" field was cleared in this mutation.

func (*FileMutation) MineType

func (m *FileMutation) MineType() (r string, exists bool)

MineType returns the value of the "mine_type" field in the mutation.

func (*FileMutation) MineTypeCleared

func (m *FileMutation) MineTypeCleared() bool

MineTypeCleared returns if the "mine_type" field was cleared in this mutation.

func (*FileMutation) Name

func (m *FileMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*FileMutation) OldCreatedAt

func (m *FileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldCreatedBy

func (m *FileMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldField

func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*FileMutation) OldMd5

func (m *FileMutation) OldMd5(ctx context.Context) (v string, err error)

OldMd5 returns the old "md5" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldMineType

func (m *FileMutation) OldMineType(ctx context.Context) (v string, err error)

OldMineType returns the old "mine_type" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldName

func (m *FileMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldPath

func (m *FileMutation) OldPath(ctx context.Context) (v string, err error)

OldPath returns the old "path" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldRefCount

func (m *FileMutation) OldRefCount(ctx context.Context) (v int, err error)

OldRefCount returns the old "ref_count" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldSize

func (m *FileMutation) OldSize(ctx context.Context) (v int, err error)

OldSize returns the old "size" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldSourceID

func (m *FileMutation) OldSourceID(ctx context.Context) (v int, err error)

OldSourceID returns the old "source_id" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldTenantID

func (m *FileMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldUpdatedAt

func (m *FileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldUpdatedBy

func (m *FileMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) Op

func (m *FileMutation) Op() Op

Op returns the operation name.

func (*FileMutation) Path

func (m *FileMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*FileMutation) RefCount

func (m *FileMutation) RefCount() (r int, exists bool)

RefCount returns the value of the "ref_count" field in the mutation.

func (*FileMutation) RefCountCleared

func (m *FileMutation) RefCountCleared() bool

RefCountCleared returns if the "ref_count" field was cleared in this mutation.

func (*FileMutation) RemovedEdges

func (m *FileMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*FileMutation) RemovedIDs

func (m *FileMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*FileMutation) ResetCreatedAt

func (m *FileMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FileMutation) ResetCreatedBy

func (m *FileMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*FileMutation) ResetEdge

func (m *FileMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*FileMutation) ResetField

func (m *FileMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*FileMutation) ResetMd5

func (m *FileMutation) ResetMd5()

ResetMd5 resets all changes to the "md5" field.

func (*FileMutation) ResetMineType

func (m *FileMutation) ResetMineType()

ResetMineType resets all changes to the "mine_type" field.

func (*FileMutation) ResetName

func (m *FileMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*FileMutation) ResetPath

func (m *FileMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*FileMutation) ResetRefCount

func (m *FileMutation) ResetRefCount()

ResetRefCount resets all changes to the "ref_count" field.

func (*FileMutation) ResetSize

func (m *FileMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*FileMutation) ResetSource

func (m *FileMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*FileMutation) ResetSourceID

func (m *FileMutation) ResetSourceID()

ResetSourceID resets all changes to the "source_id" field.

func (*FileMutation) ResetTenantID

func (m *FileMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*FileMutation) ResetUpdatedAt

func (m *FileMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FileMutation) ResetUpdatedBy

func (m *FileMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*FileMutation) SetCreatedAt

func (m *FileMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*FileMutation) SetCreatedBy

func (m *FileMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*FileMutation) SetField

func (m *FileMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*FileMutation) SetID

func (m *FileMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of File entities.

func (*FileMutation) SetMd5

func (m *FileMutation) SetMd5(s string)

SetMd5 sets the "md5" field.

func (*FileMutation) SetMineType

func (m *FileMutation) SetMineType(s string)

SetMineType sets the "mine_type" field.

func (*FileMutation) SetName

func (m *FileMutation) SetName(s string)

SetName sets the "name" field.

func (*FileMutation) SetOp

func (m *FileMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FileMutation) SetPath

func (m *FileMutation) SetPath(s string)

SetPath sets the "path" field.

func (*FileMutation) SetRefCount

func (m *FileMutation) SetRefCount(i int)

SetRefCount sets the "ref_count" field.

func (*FileMutation) SetSize

func (m *FileMutation) SetSize(i int)

SetSize sets the "size" field.

func (*FileMutation) SetSourceID

func (m *FileMutation) SetSourceID(i int)

SetSourceID sets the "source_id" field.

func (*FileMutation) SetTenantID

func (m *FileMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*FileMutation) SetUpdatedAt

func (m *FileMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*FileMutation) SetUpdatedBy

func (m *FileMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*FileMutation) Size

func (m *FileMutation) Size() (r int, exists bool)

Size returns the value of the "size" field in the mutation.

func (*FileMutation) SizeCleared

func (m *FileMutation) SizeCleared() bool

SizeCleared returns if the "size" field was cleared in this mutation.

func (*FileMutation) SourceCleared

func (m *FileMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the FileSource entity was cleared.

func (*FileMutation) SourceID

func (m *FileMutation) SourceID() (r int, exists bool)

SourceID returns the value of the "source_id" field in the mutation.

func (*FileMutation) SourceIDs

func (m *FileMutation) SourceIDs() (ids []int)

SourceIDs returns the "source" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceID instead. It exists only for internal usage by the builders.

func (*FileMutation) TenantID

func (m *FileMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (FileMutation) Tx

func (m FileMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*FileMutation) Type

func (m *FileMutation) Type() string

Type returns the node type of this mutation (File).

func (*FileMutation) UpdatedAt

func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*FileMutation) UpdatedAtCleared

func (m *FileMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*FileMutation) UpdatedBy

func (m *FileMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*FileMutation) UpdatedByCleared

func (m *FileMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*FileMutation) Where

func (m *FileMutation) Where(ps ...predicate.File)

Where appends a list predicates to the FileMutation builder.

func (*FileMutation) WhereP

func (m *FileMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the FileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type FileOrder

type FileOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *FileOrderField `json:"field"`
}

FileOrder defines the ordering of File.

type FileOrderField

type FileOrderField struct {
	// Value extracts the ordering value from the given File.
	Value func(*File) (ent.Value, error)
	// contains filtered or unexported fields
}

FileOrderField defines the ordering field of File.

func (FileOrderField) MarshalGQL

func (f FileOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (FileOrderField) String

func (f FileOrderField) String() string

String implement fmt.Stringer interface.

func (*FileOrderField) UnmarshalGQL

func (f *FileOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type FilePaginateOption

type FilePaginateOption func(*filePager) error

FilePaginateOption enables pagination customization.

func WithFileFilter

func WithFileFilter(filter func(*FileQuery) (*FileQuery, error)) FilePaginateOption

WithFileFilter configures pagination filter.

func WithFileOrder

func WithFileOrder(order *FileOrder) FilePaginateOption

WithFileOrder configures pagination ordering.

type FileQuery

type FileQuery struct {
	// contains filtered or unexported fields
}

FileQuery is the builder for querying File entities.

func (*FileQuery) Aggregate

func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect

Aggregate returns a FileSelect configured with the given aggregations.

func (*FileQuery) All

func (fq *FileQuery) All(ctx context.Context) ([]*File, error)

All executes the query and returns a list of Files.

func (*FileQuery) AllX

func (fq *FileQuery) AllX(ctx context.Context) []*File

AllX is like All, but panics if an error occurs.

func (*FileQuery) Clone

func (fq *FileQuery) Clone() *FileQuery

Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*FileQuery) CollectFields

func (f *FileQuery) CollectFields(ctx context.Context, satisfies ...string) (*FileQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*FileQuery) Count

func (fq *FileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FileQuery) CountX

func (fq *FileQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*FileQuery) Exist

func (fq *FileQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*FileQuery) ExistX

func (fq *FileQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*FileQuery) First

func (fq *FileQuery) First(ctx context.Context) (*File, error)

First returns the first File entity from the query. Returns a *NotFoundError when no File was found.

func (*FileQuery) FirstID

func (fq *FileQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.

func (*FileQuery) FirstIDX

func (fq *FileQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*FileQuery) FirstX

func (fq *FileQuery) FirstX(ctx context.Context) *File

FirstX is like First, but panics if an error occurs.

func (*FileQuery) GroupBy

func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.File.Query().
	GroupBy(file.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FileQuery) IDs

func (fq *FileQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of File IDs.

func (*FileQuery) IDsX

func (fq *FileQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*FileQuery) Limit

func (fq *FileQuery) Limit(limit int) *FileQuery

Limit the number of records to be returned by this query.

func (*FileQuery) Offset

func (fq *FileQuery) Offset(offset int) *FileQuery

Offset to start from.

func (*FileQuery) Only

func (fq *FileQuery) Only(ctx context.Context) (*File, error)

Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.

func (*FileQuery) OnlyID

func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.

func (*FileQuery) OnlyIDX

func (fq *FileQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*FileQuery) OnlyX

func (fq *FileQuery) OnlyX(ctx context.Context) *File

OnlyX is like Only, but panics if an error occurs.

func (*FileQuery) Order

func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery

Order specifies how the records should be ordered.

func (*FileQuery) Paginate

func (f *FileQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...FilePaginateOption,
) (*FileConnection, error)

Paginate executes the query and returns a relay based cursor connection to File.

func (*FileQuery) QuerySource

func (fq *FileQuery) QuerySource() *FileSourceQuery

QuerySource chains the current query on the "source" edge.

func (*FileQuery) Select

func (fq *FileQuery) Select(fields ...string) *FileSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.File.Query().
	Select(file.FieldCreatedBy).
	Scan(ctx, &v)

func (*FileQuery) Unique

func (fq *FileQuery) Unique(unique bool) *FileQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*FileQuery) Where

func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery

Where adds a new predicate for the FileQuery builder.

func (*FileQuery) WithSource

func (fq *FileQuery) WithSource(opts ...func(*FileSourceQuery)) *FileQuery

WithSource tells the query-builder to eager-load the nodes that are connected to the "source" edge. The optional arguments are used to configure the query builder of the edge.

type FileSelect

type FileSelect struct {
	*FileQuery
	// contains filtered or unexported fields
}

FileSelect is the builder for selecting fields of File entities.

func (*FileSelect) Aggregate

func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FileSelect) Bool

func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileSelect) BoolX

func (s *FileSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileSelect) Bools

func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileSelect) BoolsX

func (s *FileSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FileSelect) Float64

func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileSelect) Float64X

func (s *FileSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileSelect) Float64s

func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileSelect) Float64sX

func (s *FileSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileSelect) Int

func (s *FileSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileSelect) IntX

func (s *FileSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileSelect) Ints

func (s *FileSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileSelect) IntsX

func (s *FileSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FileSelect) Scan

func (fs *FileSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileSelect) ScanX

func (s *FileSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileSelect) String

func (s *FileSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileSelect) StringX

func (s *FileSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileSelect) Strings

func (s *FileSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileSelect) StringsX

func (s *FileSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileSource

type FileSource struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 文件来源
	Kind filesource.Kind `json:"kind,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 对外服务的访问域名
	Endpoint string `json:"endpoint,omitempty"`
	// 地域,数据存储的物理位置。本地存储为:localhost
	Region string `json:"region,omitempty"`
	// 文件存储空间。本地存储为:local
	Bucket string `json:"bucket,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FileSourceQuery when eager-loading is set.
	Edges FileSourceEdges `json:"edges"`
	// contains filtered or unexported fields
}

FileSource is the model entity for the FileSource schema.

func (*FileSource) Files

func (fs *FileSource) Files(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *FileOrder, where *FileWhereInput,
) (*FileConnection, error)

func (*FileSource) GlobalID

func (fs *FileSource) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given FileSource node.

func (*FileSource) IsNode

func (*FileSource) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*FileSource) NamedFiles

func (fs *FileSource) NamedFiles(name string) ([]*File, error)

NamedFiles returns the Files named value or an error if the edge was not loaded in eager-loading with this name.

func (*FileSource) QueryFiles

func (fs *FileSource) QueryFiles() *FileQuery

QueryFiles queries the "files" edge of the FileSource entity.

func (*FileSource) String

func (fs *FileSource) String() string

String implements the fmt.Stringer.

func (*FileSource) ToEdge

func (fs *FileSource) ToEdge(order *FileSourceOrder) *FileSourceEdge

ToEdge converts FileSource into FileSourceEdge.

func (*FileSource) Unwrap

func (fs *FileSource) Unwrap() *FileSource

Unwrap unwraps the FileSource entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*FileSource) Update

func (fs *FileSource) Update() *FileSourceUpdateOne

Update returns a builder for updating this FileSource. Note that you need to call FileSource.Unwrap() before calling this method if this FileSource was returned from a transaction, and the transaction was committed or rolled back.

func (*FileSource) Value

func (fs *FileSource) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the FileSource. This includes values selected through modifiers, order, etc.

type FileSourceClient

type FileSourceClient struct {
	// contains filtered or unexported fields
}

FileSourceClient is a client for the FileSource schema.

func NewFileSourceClient

func NewFileSourceClient(c config) *FileSourceClient

NewFileSourceClient returns a client for the FileSource from the given config.

func (*FileSourceClient) Create

func (c *FileSourceClient) Create() *FileSourceCreate

Create returns a builder for creating a FileSource entity.

func (*FileSourceClient) CreateBulk

func (c *FileSourceClient) CreateBulk(builders ...*FileSourceCreate) *FileSourceCreateBulk

CreateBulk returns a builder for creating a bulk of FileSource entities.

func (*FileSourceClient) Delete

func (c *FileSourceClient) Delete() *FileSourceDelete

Delete returns a delete builder for FileSource.

func (*FileSourceClient) DeleteOne

func (c *FileSourceClient) DeleteOne(fs *FileSource) *FileSourceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FileSourceClient) DeleteOneID

func (c *FileSourceClient) DeleteOneID(id int) *FileSourceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*FileSourceClient) Get

func (c *FileSourceClient) Get(ctx context.Context, id int) (*FileSource, error)

Get returns a FileSource entity by its id.

func (*FileSourceClient) GetX

func (c *FileSourceClient) GetX(ctx context.Context, id int) *FileSource

GetX is like Get, but panics if an error occurs.

func (*FileSourceClient) Hooks

func (c *FileSourceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*FileSourceClient) Intercept

func (c *FileSourceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `filesource.Intercept(f(g(h())))`.

func (*FileSourceClient) Interceptors

func (c *FileSourceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*FileSourceClient) MapCreateBulk

func (c *FileSourceClient) MapCreateBulk(slice any, setFunc func(*FileSourceCreate, int)) *FileSourceCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*FileSourceClient) Query

func (c *FileSourceClient) Query() *FileSourceQuery

Query returns a query builder for FileSource.

func (*FileSourceClient) QueryFiles

func (c *FileSourceClient) QueryFiles(fs *FileSource) *FileQuery

QueryFiles queries the files edge of a FileSource.

func (*FileSourceClient) Update

func (c *FileSourceClient) Update() *FileSourceUpdate

Update returns an update builder for FileSource.

func (*FileSourceClient) UpdateOne

func (c *FileSourceClient) UpdateOne(fs *FileSource) *FileSourceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FileSourceClient) UpdateOneID

func (c *FileSourceClient) UpdateOneID(id int) *FileSourceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FileSourceClient) Use

func (c *FileSourceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `filesource.Hooks(f(g(h())))`.

type FileSourceConnection

type FileSourceConnection struct {
	Edges      []*FileSourceEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

FileSourceConnection is the connection containing edges to FileSource.

type FileSourceCreate

type FileSourceCreate struct {
	// contains filtered or unexported fields
}

FileSourceCreate is the builder for creating a FileSource entity.

func (*FileSourceCreate) AddFileIDs

func (fsc *FileSourceCreate) AddFileIDs(ids ...int) *FileSourceCreate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*FileSourceCreate) AddFiles

func (fsc *FileSourceCreate) AddFiles(f ...*File) *FileSourceCreate

AddFiles adds the "files" edges to the File entity.

func (*FileSourceCreate) Exec

func (fsc *FileSourceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileSourceCreate) ExecX

func (fsc *FileSourceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceCreate) Mutation

func (fsc *FileSourceCreate) Mutation() *FileSourceMutation

Mutation returns the FileSourceMutation object of the builder.

func (*FileSourceCreate) OnConflict

func (fsc *FileSourceCreate) OnConflict(opts ...sql.ConflictOption) *FileSourceUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.FileSource.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FileSourceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*FileSourceCreate) OnConflictColumns

func (fsc *FileSourceCreate) OnConflictColumns(columns ...string) *FileSourceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.FileSource.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileSourceCreate) Save

func (fsc *FileSourceCreate) Save(ctx context.Context) (*FileSource, error)

Save creates the FileSource in the database.

func (*FileSourceCreate) SaveX

func (fsc *FileSourceCreate) SaveX(ctx context.Context) *FileSource

SaveX calls Save and panics if Save returns an error.

func (*FileSourceCreate) SetBucket

func (fsc *FileSourceCreate) SetBucket(s string) *FileSourceCreate

SetBucket sets the "bucket" field.

func (*FileSourceCreate) SetComments

func (fsc *FileSourceCreate) SetComments(s string) *FileSourceCreate

SetComments sets the "comments" field.

func (*FileSourceCreate) SetCreatedAt

func (fsc *FileSourceCreate) SetCreatedAt(t time.Time) *FileSourceCreate

SetCreatedAt sets the "created_at" field.

func (*FileSourceCreate) SetCreatedBy

func (fsc *FileSourceCreate) SetCreatedBy(i int) *FileSourceCreate

SetCreatedBy sets the "created_by" field.

func (*FileSourceCreate) SetEndpoint

func (fsc *FileSourceCreate) SetEndpoint(s string) *FileSourceCreate

SetEndpoint sets the "endpoint" field.

func (*FileSourceCreate) SetID

func (fsc *FileSourceCreate) SetID(i int) *FileSourceCreate

SetID sets the "id" field.

func (*FileSourceCreate) SetInput

SetInput applies the change-set in the CreateFileSourceInput on the FileSourceCreate builder.

func (*FileSourceCreate) SetKind

SetKind sets the "kind" field.

func (*FileSourceCreate) SetNillableBucket

func (fsc *FileSourceCreate) SetNillableBucket(s *string) *FileSourceCreate

SetNillableBucket sets the "bucket" field if the given value is not nil.

func (*FileSourceCreate) SetNillableComments

func (fsc *FileSourceCreate) SetNillableComments(s *string) *FileSourceCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*FileSourceCreate) SetNillableCreatedAt

func (fsc *FileSourceCreate) SetNillableCreatedAt(t *time.Time) *FileSourceCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*FileSourceCreate) SetNillableEndpoint

func (fsc *FileSourceCreate) SetNillableEndpoint(s *string) *FileSourceCreate

SetNillableEndpoint sets the "endpoint" field if the given value is not nil.

func (*FileSourceCreate) SetNillableRegion

func (fsc *FileSourceCreate) SetNillableRegion(s *string) *FileSourceCreate

SetNillableRegion sets the "region" field if the given value is not nil.

func (*FileSourceCreate) SetNillableUpdatedAt

func (fsc *FileSourceCreate) SetNillableUpdatedAt(t *time.Time) *FileSourceCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileSourceCreate) SetNillableUpdatedBy

func (fsc *FileSourceCreate) SetNillableUpdatedBy(i *int) *FileSourceCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileSourceCreate) SetRegion

func (fsc *FileSourceCreate) SetRegion(s string) *FileSourceCreate

SetRegion sets the "region" field.

func (*FileSourceCreate) SetUpdatedAt

func (fsc *FileSourceCreate) SetUpdatedAt(t time.Time) *FileSourceCreate

SetUpdatedAt sets the "updated_at" field.

func (*FileSourceCreate) SetUpdatedBy

func (fsc *FileSourceCreate) SetUpdatedBy(i int) *FileSourceCreate

SetUpdatedBy sets the "updated_by" field.

type FileSourceCreateBulk

type FileSourceCreateBulk struct {
	// contains filtered or unexported fields
}

FileSourceCreateBulk is the builder for creating many FileSource entities in bulk.

func (*FileSourceCreateBulk) Exec

func (fscb *FileSourceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileSourceCreateBulk) ExecX

func (fscb *FileSourceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceCreateBulk) OnConflict

func (fscb *FileSourceCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileSourceUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.FileSource.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FileSourceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*FileSourceCreateBulk) OnConflictColumns

func (fscb *FileSourceCreateBulk) OnConflictColumns(columns ...string) *FileSourceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.FileSource.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileSourceCreateBulk) Save

func (fscb *FileSourceCreateBulk) Save(ctx context.Context) ([]*FileSource, error)

Save creates the FileSource entities in the database.

func (*FileSourceCreateBulk) SaveX

func (fscb *FileSourceCreateBulk) SaveX(ctx context.Context) []*FileSource

SaveX is like Save, but panics if an error occurs.

type FileSourceDelete

type FileSourceDelete struct {
	// contains filtered or unexported fields
}

FileSourceDelete is the builder for deleting a FileSource entity.

func (*FileSourceDelete) Exec

func (fsd *FileSourceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*FileSourceDelete) ExecX

func (fsd *FileSourceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceDelete) Where

Where appends a list predicates to the FileSourceDelete builder.

type FileSourceDeleteOne

type FileSourceDeleteOne struct {
	// contains filtered or unexported fields
}

FileSourceDeleteOne is the builder for deleting a single FileSource entity.

func (*FileSourceDeleteOne) Exec

func (fsdo *FileSourceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FileSourceDeleteOne) ExecX

func (fsdo *FileSourceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceDeleteOne) Where

Where appends a list predicates to the FileSourceDelete builder.

type FileSourceEdge

type FileSourceEdge struct {
	Node   *FileSource `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

FileSourceEdge is the edge representation of FileSource.

type FileSourceEdges

type FileSourceEdges struct {
	// 所有文件
	Files []*File `json:"files,omitempty"`
	// contains filtered or unexported fields
}

FileSourceEdges holds the relations/edges for other nodes in the graph.

func (FileSourceEdges) FilesOrErr

func (e FileSourceEdges) FilesOrErr() ([]*File, error)

FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.

type FileSourceGroupBy

type FileSourceGroupBy struct {
	// contains filtered or unexported fields
}

FileSourceGroupBy is the group-by builder for FileSource entities.

func (*FileSourceGroupBy) Aggregate

func (fsgb *FileSourceGroupBy) Aggregate(fns ...AggregateFunc) *FileSourceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*FileSourceGroupBy) Bool

func (s *FileSourceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) BoolX

func (s *FileSourceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileSourceGroupBy) Bools

func (s *FileSourceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) BoolsX

func (s *FileSourceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FileSourceGroupBy) Float64

func (s *FileSourceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) Float64X

func (s *FileSourceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileSourceGroupBy) Float64s

func (s *FileSourceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) Float64sX

func (s *FileSourceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileSourceGroupBy) Int

func (s *FileSourceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) IntX

func (s *FileSourceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileSourceGroupBy) Ints

func (s *FileSourceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) IntsX

func (s *FileSourceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FileSourceGroupBy) Scan

func (fsgb *FileSourceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileSourceGroupBy) ScanX

func (s *FileSourceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileSourceGroupBy) String

func (s *FileSourceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) StringX

func (s *FileSourceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileSourceGroupBy) Strings

func (s *FileSourceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileSourceGroupBy) StringsX

func (s *FileSourceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileSourceMutation

type FileSourceMutation struct {
	// contains filtered or unexported fields
}

FileSourceMutation represents an operation that mutates the FileSource nodes in the graph.

func (*FileSourceMutation) AddCreatedBy

func (m *FileSourceMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*FileSourceMutation) AddField

func (m *FileSourceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*FileSourceMutation) AddFileIDs

func (m *FileSourceMutation) AddFileIDs(ids ...int)

AddFileIDs adds the "files" edge to the File entity by ids.

func (*FileSourceMutation) AddUpdatedBy

func (m *FileSourceMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*FileSourceMutation) AddedCreatedBy

func (m *FileSourceMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*FileSourceMutation) AddedEdges

func (m *FileSourceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*FileSourceMutation) AddedField

func (m *FileSourceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*FileSourceMutation) AddedFields

func (m *FileSourceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*FileSourceMutation) AddedIDs

func (m *FileSourceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*FileSourceMutation) AddedUpdatedBy

func (m *FileSourceMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*FileSourceMutation) Bucket

func (m *FileSourceMutation) Bucket() (r string, exists bool)

Bucket returns the value of the "bucket" field in the mutation.

func (*FileSourceMutation) BucketCleared

func (m *FileSourceMutation) BucketCleared() bool

BucketCleared returns if the "bucket" field was cleared in this mutation.

func (*FileSourceMutation) ClearBucket

func (m *FileSourceMutation) ClearBucket()

ClearBucket clears the value of the "bucket" field.

func (*FileSourceMutation) ClearComments

func (m *FileSourceMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*FileSourceMutation) ClearEdge

func (m *FileSourceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*FileSourceMutation) ClearEndpoint

func (m *FileSourceMutation) ClearEndpoint()

ClearEndpoint clears the value of the "endpoint" field.

func (*FileSourceMutation) ClearField

func (m *FileSourceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*FileSourceMutation) ClearFiles

func (m *FileSourceMutation) ClearFiles()

ClearFiles clears the "files" edge to the File entity.

func (*FileSourceMutation) ClearRegion

func (m *FileSourceMutation) ClearRegion()

ClearRegion clears the value of the "region" field.

func (*FileSourceMutation) ClearUpdatedAt

func (m *FileSourceMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileSourceMutation) ClearUpdatedBy

func (m *FileSourceMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileSourceMutation) ClearedEdges

func (m *FileSourceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*FileSourceMutation) ClearedFields

func (m *FileSourceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (FileSourceMutation) Client

func (m FileSourceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*FileSourceMutation) Comments

func (m *FileSourceMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*FileSourceMutation) CommentsCleared

func (m *FileSourceMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*FileSourceMutation) CreatedAt

func (m *FileSourceMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*FileSourceMutation) CreatedBy

func (m *FileSourceMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*FileSourceMutation) EdgeCleared

func (m *FileSourceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*FileSourceMutation) Endpoint

func (m *FileSourceMutation) Endpoint() (r string, exists bool)

Endpoint returns the value of the "endpoint" field in the mutation.

func (*FileSourceMutation) EndpointCleared

func (m *FileSourceMutation) EndpointCleared() bool

EndpointCleared returns if the "endpoint" field was cleared in this mutation.

func (*FileSourceMutation) Field

func (m *FileSourceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*FileSourceMutation) FieldCleared

func (m *FileSourceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*FileSourceMutation) Fields

func (m *FileSourceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*FileSourceMutation) FilesCleared

func (m *FileSourceMutation) FilesCleared() bool

FilesCleared reports if the "files" edge to the File entity was cleared.

func (*FileSourceMutation) FilesIDs

func (m *FileSourceMutation) FilesIDs() (ids []int)

FilesIDs returns the "files" edge IDs in the mutation.

func (*FileSourceMutation) ID

func (m *FileSourceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*FileSourceMutation) IDs

func (m *FileSourceMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*FileSourceMutation) Kind

func (m *FileSourceMutation) Kind() (r filesource.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*FileSourceMutation) OldBucket

func (m *FileSourceMutation) OldBucket(ctx context.Context) (v string, err error)

OldBucket returns the old "bucket" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldComments

func (m *FileSourceMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldCreatedAt

func (m *FileSourceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldCreatedBy

func (m *FileSourceMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldEndpoint

func (m *FileSourceMutation) OldEndpoint(ctx context.Context) (v string, err error)

OldEndpoint returns the old "endpoint" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldField

func (m *FileSourceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*FileSourceMutation) OldKind

func (m *FileSourceMutation) OldKind(ctx context.Context) (v filesource.Kind, err error)

OldKind returns the old "kind" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldRegion

func (m *FileSourceMutation) OldRegion(ctx context.Context) (v string, err error)

OldRegion returns the old "region" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldUpdatedAt

func (m *FileSourceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) OldUpdatedBy

func (m *FileSourceMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the FileSource entity. If the FileSource object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileSourceMutation) Op

func (m *FileSourceMutation) Op() Op

Op returns the operation name.

func (*FileSourceMutation) Region

func (m *FileSourceMutation) Region() (r string, exists bool)

Region returns the value of the "region" field in the mutation.

func (*FileSourceMutation) RegionCleared

func (m *FileSourceMutation) RegionCleared() bool

RegionCleared returns if the "region" field was cleared in this mutation.

func (*FileSourceMutation) RemoveFileIDs

func (m *FileSourceMutation) RemoveFileIDs(ids ...int)

RemoveFileIDs removes the "files" edge to the File entity by IDs.

func (*FileSourceMutation) RemovedEdges

func (m *FileSourceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*FileSourceMutation) RemovedFilesIDs

func (m *FileSourceMutation) RemovedFilesIDs() (ids []int)

RemovedFiles returns the removed IDs of the "files" edge to the File entity.

func (*FileSourceMutation) RemovedIDs

func (m *FileSourceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*FileSourceMutation) ResetBucket

func (m *FileSourceMutation) ResetBucket()

ResetBucket resets all changes to the "bucket" field.

func (*FileSourceMutation) ResetComments

func (m *FileSourceMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*FileSourceMutation) ResetCreatedAt

func (m *FileSourceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FileSourceMutation) ResetCreatedBy

func (m *FileSourceMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*FileSourceMutation) ResetEdge

func (m *FileSourceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*FileSourceMutation) ResetEndpoint

func (m *FileSourceMutation) ResetEndpoint()

ResetEndpoint resets all changes to the "endpoint" field.

func (*FileSourceMutation) ResetField

func (m *FileSourceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*FileSourceMutation) ResetFiles

func (m *FileSourceMutation) ResetFiles()

ResetFiles resets all changes to the "files" edge.

func (*FileSourceMutation) ResetKind

func (m *FileSourceMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*FileSourceMutation) ResetRegion

func (m *FileSourceMutation) ResetRegion()

ResetRegion resets all changes to the "region" field.

func (*FileSourceMutation) ResetUpdatedAt

func (m *FileSourceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FileSourceMutation) ResetUpdatedBy

func (m *FileSourceMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*FileSourceMutation) SetBucket

func (m *FileSourceMutation) SetBucket(s string)

SetBucket sets the "bucket" field.

func (*FileSourceMutation) SetComments

func (m *FileSourceMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*FileSourceMutation) SetCreatedAt

func (m *FileSourceMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*FileSourceMutation) SetCreatedBy

func (m *FileSourceMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*FileSourceMutation) SetEndpoint

func (m *FileSourceMutation) SetEndpoint(s string)

SetEndpoint sets the "endpoint" field.

func (*FileSourceMutation) SetField

func (m *FileSourceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*FileSourceMutation) SetID

func (m *FileSourceMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of FileSource entities.

func (*FileSourceMutation) SetKind

func (m *FileSourceMutation) SetKind(f filesource.Kind)

SetKind sets the "kind" field.

func (*FileSourceMutation) SetOp

func (m *FileSourceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FileSourceMutation) SetRegion

func (m *FileSourceMutation) SetRegion(s string)

SetRegion sets the "region" field.

func (*FileSourceMutation) SetUpdatedAt

func (m *FileSourceMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*FileSourceMutation) SetUpdatedBy

func (m *FileSourceMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (FileSourceMutation) Tx

func (m FileSourceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*FileSourceMutation) Type

func (m *FileSourceMutation) Type() string

Type returns the node type of this mutation (FileSource).

func (*FileSourceMutation) UpdatedAt

func (m *FileSourceMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*FileSourceMutation) UpdatedAtCleared

func (m *FileSourceMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*FileSourceMutation) UpdatedBy

func (m *FileSourceMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*FileSourceMutation) UpdatedByCleared

func (m *FileSourceMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*FileSourceMutation) Where

func (m *FileSourceMutation) Where(ps ...predicate.FileSource)

Where appends a list predicates to the FileSourceMutation builder.

func (*FileSourceMutation) WhereP

func (m *FileSourceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the FileSourceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type FileSourceOrder

type FileSourceOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *FileSourceOrderField `json:"field"`
}

FileSourceOrder defines the ordering of FileSource.

type FileSourceOrderField

type FileSourceOrderField struct {
	// Value extracts the ordering value from the given FileSource.
	Value func(*FileSource) (ent.Value, error)
	// contains filtered or unexported fields
}

FileSourceOrderField defines the ordering field of FileSource.

func (FileSourceOrderField) MarshalGQL

func (f FileSourceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (FileSourceOrderField) String

func (f FileSourceOrderField) String() string

String implement fmt.Stringer interface.

func (*FileSourceOrderField) UnmarshalGQL

func (f *FileSourceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type FileSourcePaginateOption

type FileSourcePaginateOption func(*filesourcePager) error

FileSourcePaginateOption enables pagination customization.

func WithFileSourceFilter

func WithFileSourceFilter(filter func(*FileSourceQuery) (*FileSourceQuery, error)) FileSourcePaginateOption

WithFileSourceFilter configures pagination filter.

func WithFileSourceOrder

func WithFileSourceOrder(order *FileSourceOrder) FileSourcePaginateOption

WithFileSourceOrder configures pagination ordering.

type FileSourceQuery

type FileSourceQuery struct {
	// contains filtered or unexported fields
}

FileSourceQuery is the builder for querying FileSource entities.

func (*FileSourceQuery) Aggregate

func (fsq *FileSourceQuery) Aggregate(fns ...AggregateFunc) *FileSourceSelect

Aggregate returns a FileSourceSelect configured with the given aggregations.

func (*FileSourceQuery) All

func (fsq *FileSourceQuery) All(ctx context.Context) ([]*FileSource, error)

All executes the query and returns a list of FileSources.

func (*FileSourceQuery) AllX

func (fsq *FileSourceQuery) AllX(ctx context.Context) []*FileSource

AllX is like All, but panics if an error occurs.

func (*FileSourceQuery) Clone

func (fsq *FileSourceQuery) Clone() *FileSourceQuery

Clone returns a duplicate of the FileSourceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*FileSourceQuery) CollectFields

func (fs *FileSourceQuery) CollectFields(ctx context.Context, satisfies ...string) (*FileSourceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*FileSourceQuery) Count

func (fsq *FileSourceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FileSourceQuery) CountX

func (fsq *FileSourceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*FileSourceQuery) Exist

func (fsq *FileSourceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*FileSourceQuery) ExistX

func (fsq *FileSourceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*FileSourceQuery) First

func (fsq *FileSourceQuery) First(ctx context.Context) (*FileSource, error)

First returns the first FileSource entity from the query. Returns a *NotFoundError when no FileSource was found.

func (*FileSourceQuery) FirstID

func (fsq *FileSourceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first FileSource ID from the query. Returns a *NotFoundError when no FileSource ID was found.

func (*FileSourceQuery) FirstIDX

func (fsq *FileSourceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*FileSourceQuery) FirstX

func (fsq *FileSourceQuery) FirstX(ctx context.Context) *FileSource

FirstX is like First, but panics if an error occurs.

func (*FileSourceQuery) GroupBy

func (fsq *FileSourceQuery) GroupBy(field string, fields ...string) *FileSourceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.FileSource.Query().
	GroupBy(filesource.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FileSourceQuery) IDs

func (fsq *FileSourceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of FileSource IDs.

func (*FileSourceQuery) IDsX

func (fsq *FileSourceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*FileSourceQuery) Limit

func (fsq *FileSourceQuery) Limit(limit int) *FileSourceQuery

Limit the number of records to be returned by this query.

func (*FileSourceQuery) Offset

func (fsq *FileSourceQuery) Offset(offset int) *FileSourceQuery

Offset to start from.

func (*FileSourceQuery) Only

func (fsq *FileSourceQuery) Only(ctx context.Context) (*FileSource, error)

Only returns a single FileSource entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one FileSource entity is found. Returns a *NotFoundError when no FileSource entities are found.

func (*FileSourceQuery) OnlyID

func (fsq *FileSourceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only FileSource ID in the query. Returns a *NotSingularError when more than one FileSource ID is found. Returns a *NotFoundError when no entities are found.

func (*FileSourceQuery) OnlyIDX

func (fsq *FileSourceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*FileSourceQuery) OnlyX

func (fsq *FileSourceQuery) OnlyX(ctx context.Context) *FileSource

OnlyX is like Only, but panics if an error occurs.

func (*FileSourceQuery) Order

Order specifies how the records should be ordered.

func (*FileSourceQuery) Paginate

func (fs *FileSourceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...FileSourcePaginateOption,
) (*FileSourceConnection, error)

Paginate executes the query and returns a relay based cursor connection to FileSource.

func (*FileSourceQuery) QueryFiles

func (fsq *FileSourceQuery) QueryFiles() *FileQuery

QueryFiles chains the current query on the "files" edge.

func (*FileSourceQuery) Select

func (fsq *FileSourceQuery) Select(fields ...string) *FileSourceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.FileSource.Query().
	Select(filesource.FieldCreatedBy).
	Scan(ctx, &v)

func (*FileSourceQuery) Unique

func (fsq *FileSourceQuery) Unique(unique bool) *FileSourceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*FileSourceQuery) Where

Where adds a new predicate for the FileSourceQuery builder.

func (*FileSourceQuery) WithFiles

func (fsq *FileSourceQuery) WithFiles(opts ...func(*FileQuery)) *FileSourceQuery

WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.

func (*FileSourceQuery) WithNamedFiles

func (fsq *FileSourceQuery) WithNamedFiles(name string, opts ...func(*FileQuery)) *FileSourceQuery

WithNamedFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type FileSourceSelect

type FileSourceSelect struct {
	*FileSourceQuery
	// contains filtered or unexported fields
}

FileSourceSelect is the builder for selecting fields of FileSource entities.

func (*FileSourceSelect) Aggregate

func (fss *FileSourceSelect) Aggregate(fns ...AggregateFunc) *FileSourceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FileSourceSelect) Bool

func (s *FileSourceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) BoolX

func (s *FileSourceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileSourceSelect) Bools

func (s *FileSourceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) BoolsX

func (s *FileSourceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FileSourceSelect) Float64

func (s *FileSourceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) Float64X

func (s *FileSourceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileSourceSelect) Float64s

func (s *FileSourceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) Float64sX

func (s *FileSourceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileSourceSelect) Int

func (s *FileSourceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) IntX

func (s *FileSourceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileSourceSelect) Ints

func (s *FileSourceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) IntsX

func (s *FileSourceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FileSourceSelect) Scan

func (fss *FileSourceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileSourceSelect) ScanX

func (s *FileSourceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileSourceSelect) String

func (s *FileSourceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) StringX

func (s *FileSourceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileSourceSelect) Strings

func (s *FileSourceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileSourceSelect) StringsX

func (s *FileSourceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileSourceUpdate

type FileSourceUpdate struct {
	// contains filtered or unexported fields
}

FileSourceUpdate is the builder for updating FileSource entities.

func (*FileSourceUpdate) AddFileIDs

func (fsu *FileSourceUpdate) AddFileIDs(ids ...int) *FileSourceUpdate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*FileSourceUpdate) AddFiles

func (fsu *FileSourceUpdate) AddFiles(f ...*File) *FileSourceUpdate

AddFiles adds the "files" edges to the File entity.

func (*FileSourceUpdate) AddUpdatedBy

func (fsu *FileSourceUpdate) AddUpdatedBy(i int) *FileSourceUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*FileSourceUpdate) ClearBucket

func (fsu *FileSourceUpdate) ClearBucket() *FileSourceUpdate

ClearBucket clears the value of the "bucket" field.

func (*FileSourceUpdate) ClearComments

func (fsu *FileSourceUpdate) ClearComments() *FileSourceUpdate

ClearComments clears the value of the "comments" field.

func (*FileSourceUpdate) ClearEndpoint

func (fsu *FileSourceUpdate) ClearEndpoint() *FileSourceUpdate

ClearEndpoint clears the value of the "endpoint" field.

func (*FileSourceUpdate) ClearFiles

func (fsu *FileSourceUpdate) ClearFiles() *FileSourceUpdate

ClearFiles clears all "files" edges to the File entity.

func (*FileSourceUpdate) ClearRegion

func (fsu *FileSourceUpdate) ClearRegion() *FileSourceUpdate

ClearRegion clears the value of the "region" field.

func (*FileSourceUpdate) ClearUpdatedAt

func (fsu *FileSourceUpdate) ClearUpdatedAt() *FileSourceUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileSourceUpdate) ClearUpdatedBy

func (fsu *FileSourceUpdate) ClearUpdatedBy() *FileSourceUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileSourceUpdate) Exec

func (fsu *FileSourceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileSourceUpdate) ExecX

func (fsu *FileSourceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceUpdate) Mutation

func (fsu *FileSourceUpdate) Mutation() *FileSourceMutation

Mutation returns the FileSourceMutation object of the builder.

func (*FileSourceUpdate) RemoveFileIDs

func (fsu *FileSourceUpdate) RemoveFileIDs(ids ...int) *FileSourceUpdate

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*FileSourceUpdate) RemoveFiles

func (fsu *FileSourceUpdate) RemoveFiles(f ...*File) *FileSourceUpdate

RemoveFiles removes "files" edges to File entities.

func (*FileSourceUpdate) Save

func (fsu *FileSourceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*FileSourceUpdate) SaveX

func (fsu *FileSourceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*FileSourceUpdate) SetBucket

func (fsu *FileSourceUpdate) SetBucket(s string) *FileSourceUpdate

SetBucket sets the "bucket" field.

func (*FileSourceUpdate) SetComments

func (fsu *FileSourceUpdate) SetComments(s string) *FileSourceUpdate

SetComments sets the "comments" field.

func (*FileSourceUpdate) SetEndpoint

func (fsu *FileSourceUpdate) SetEndpoint(s string) *FileSourceUpdate

SetEndpoint sets the "endpoint" field.

func (*FileSourceUpdate) SetInput

SetInput applies the change-set in the UpdateFileSourceInput on the FileSourceUpdate builder.

func (*FileSourceUpdate) SetKind

SetKind sets the "kind" field.

func (*FileSourceUpdate) SetNillableBucket

func (fsu *FileSourceUpdate) SetNillableBucket(s *string) *FileSourceUpdate

SetNillableBucket sets the "bucket" field if the given value is not nil.

func (*FileSourceUpdate) SetNillableComments

func (fsu *FileSourceUpdate) SetNillableComments(s *string) *FileSourceUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*FileSourceUpdate) SetNillableEndpoint

func (fsu *FileSourceUpdate) SetNillableEndpoint(s *string) *FileSourceUpdate

SetNillableEndpoint sets the "endpoint" field if the given value is not nil.

func (*FileSourceUpdate) SetNillableRegion

func (fsu *FileSourceUpdate) SetNillableRegion(s *string) *FileSourceUpdate

SetNillableRegion sets the "region" field if the given value is not nil.

func (*FileSourceUpdate) SetNillableUpdatedAt

func (fsu *FileSourceUpdate) SetNillableUpdatedAt(t *time.Time) *FileSourceUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileSourceUpdate) SetNillableUpdatedBy

func (fsu *FileSourceUpdate) SetNillableUpdatedBy(i *int) *FileSourceUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileSourceUpdate) SetRegion

func (fsu *FileSourceUpdate) SetRegion(s string) *FileSourceUpdate

SetRegion sets the "region" field.

func (*FileSourceUpdate) SetUpdatedAt

func (fsu *FileSourceUpdate) SetUpdatedAt(t time.Time) *FileSourceUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FileSourceUpdate) SetUpdatedBy

func (fsu *FileSourceUpdate) SetUpdatedBy(i int) *FileSourceUpdate

SetUpdatedBy sets the "updated_by" field.

func (*FileSourceUpdate) Where

Where appends a list predicates to the FileSourceUpdate builder.

type FileSourceUpdateOne

type FileSourceUpdateOne struct {
	// contains filtered or unexported fields
}

FileSourceUpdateOne is the builder for updating a single FileSource entity.

func (*FileSourceUpdateOne) AddFileIDs

func (fsuo *FileSourceUpdateOne) AddFileIDs(ids ...int) *FileSourceUpdateOne

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*FileSourceUpdateOne) AddFiles

func (fsuo *FileSourceUpdateOne) AddFiles(f ...*File) *FileSourceUpdateOne

AddFiles adds the "files" edges to the File entity.

func (*FileSourceUpdateOne) AddUpdatedBy

func (fsuo *FileSourceUpdateOne) AddUpdatedBy(i int) *FileSourceUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*FileSourceUpdateOne) ClearBucket

func (fsuo *FileSourceUpdateOne) ClearBucket() *FileSourceUpdateOne

ClearBucket clears the value of the "bucket" field.

func (*FileSourceUpdateOne) ClearComments

func (fsuo *FileSourceUpdateOne) ClearComments() *FileSourceUpdateOne

ClearComments clears the value of the "comments" field.

func (*FileSourceUpdateOne) ClearEndpoint

func (fsuo *FileSourceUpdateOne) ClearEndpoint() *FileSourceUpdateOne

ClearEndpoint clears the value of the "endpoint" field.

func (*FileSourceUpdateOne) ClearFiles

func (fsuo *FileSourceUpdateOne) ClearFiles() *FileSourceUpdateOne

ClearFiles clears all "files" edges to the File entity.

func (*FileSourceUpdateOne) ClearRegion

func (fsuo *FileSourceUpdateOne) ClearRegion() *FileSourceUpdateOne

ClearRegion clears the value of the "region" field.

func (*FileSourceUpdateOne) ClearUpdatedAt

func (fsuo *FileSourceUpdateOne) ClearUpdatedAt() *FileSourceUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileSourceUpdateOne) ClearUpdatedBy

func (fsuo *FileSourceUpdateOne) ClearUpdatedBy() *FileSourceUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileSourceUpdateOne) Exec

func (fsuo *FileSourceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FileSourceUpdateOne) ExecX

func (fsuo *FileSourceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceUpdateOne) Mutation

func (fsuo *FileSourceUpdateOne) Mutation() *FileSourceMutation

Mutation returns the FileSourceMutation object of the builder.

func (*FileSourceUpdateOne) RemoveFileIDs

func (fsuo *FileSourceUpdateOne) RemoveFileIDs(ids ...int) *FileSourceUpdateOne

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*FileSourceUpdateOne) RemoveFiles

func (fsuo *FileSourceUpdateOne) RemoveFiles(f ...*File) *FileSourceUpdateOne

RemoveFiles removes "files" edges to File entities.

func (*FileSourceUpdateOne) Save

func (fsuo *FileSourceUpdateOne) Save(ctx context.Context) (*FileSource, error)

Save executes the query and returns the updated FileSource entity.

func (*FileSourceUpdateOne) SaveX

func (fsuo *FileSourceUpdateOne) SaveX(ctx context.Context) *FileSource

SaveX is like Save, but panics if an error occurs.

func (*FileSourceUpdateOne) Select

func (fsuo *FileSourceUpdateOne) Select(field string, fields ...string) *FileSourceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*FileSourceUpdateOne) SetBucket

func (fsuo *FileSourceUpdateOne) SetBucket(s string) *FileSourceUpdateOne

SetBucket sets the "bucket" field.

func (*FileSourceUpdateOne) SetComments

func (fsuo *FileSourceUpdateOne) SetComments(s string) *FileSourceUpdateOne

SetComments sets the "comments" field.

func (*FileSourceUpdateOne) SetEndpoint

func (fsuo *FileSourceUpdateOne) SetEndpoint(s string) *FileSourceUpdateOne

SetEndpoint sets the "endpoint" field.

func (*FileSourceUpdateOne) SetInput

SetInput applies the change-set in the UpdateFileSourceInput on the FileSourceUpdateOne builder.

func (*FileSourceUpdateOne) SetKind

SetKind sets the "kind" field.

func (*FileSourceUpdateOne) SetNillableBucket

func (fsuo *FileSourceUpdateOne) SetNillableBucket(s *string) *FileSourceUpdateOne

SetNillableBucket sets the "bucket" field if the given value is not nil.

func (*FileSourceUpdateOne) SetNillableComments

func (fsuo *FileSourceUpdateOne) SetNillableComments(s *string) *FileSourceUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*FileSourceUpdateOne) SetNillableEndpoint

func (fsuo *FileSourceUpdateOne) SetNillableEndpoint(s *string) *FileSourceUpdateOne

SetNillableEndpoint sets the "endpoint" field if the given value is not nil.

func (*FileSourceUpdateOne) SetNillableRegion

func (fsuo *FileSourceUpdateOne) SetNillableRegion(s *string) *FileSourceUpdateOne

SetNillableRegion sets the "region" field if the given value is not nil.

func (*FileSourceUpdateOne) SetNillableUpdatedAt

func (fsuo *FileSourceUpdateOne) SetNillableUpdatedAt(t *time.Time) *FileSourceUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileSourceUpdateOne) SetNillableUpdatedBy

func (fsuo *FileSourceUpdateOne) SetNillableUpdatedBy(i *int) *FileSourceUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileSourceUpdateOne) SetRegion

func (fsuo *FileSourceUpdateOne) SetRegion(s string) *FileSourceUpdateOne

SetRegion sets the "region" field.

func (*FileSourceUpdateOne) SetUpdatedAt

func (fsuo *FileSourceUpdateOne) SetUpdatedAt(t time.Time) *FileSourceUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FileSourceUpdateOne) SetUpdatedBy

func (fsuo *FileSourceUpdateOne) SetUpdatedBy(i int) *FileSourceUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*FileSourceUpdateOne) Where

Where appends a list predicates to the FileSourceUpdate builder.

type FileSourceUpsert

type FileSourceUpsert struct {
	*sql.UpdateSet
}

FileSourceUpsert is the "OnConflict" setter.

func (*FileSourceUpsert) AddUpdatedBy

func (u *FileSourceUpsert) AddUpdatedBy(v int) *FileSourceUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*FileSourceUpsert) ClearBucket

func (u *FileSourceUpsert) ClearBucket() *FileSourceUpsert

ClearBucket clears the value of the "bucket" field.

func (*FileSourceUpsert) ClearComments

func (u *FileSourceUpsert) ClearComments() *FileSourceUpsert

ClearComments clears the value of the "comments" field.

func (*FileSourceUpsert) ClearEndpoint

func (u *FileSourceUpsert) ClearEndpoint() *FileSourceUpsert

ClearEndpoint clears the value of the "endpoint" field.

func (*FileSourceUpsert) ClearRegion

func (u *FileSourceUpsert) ClearRegion() *FileSourceUpsert

ClearRegion clears the value of the "region" field.

func (*FileSourceUpsert) ClearUpdatedAt

func (u *FileSourceUpsert) ClearUpdatedAt() *FileSourceUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileSourceUpsert) ClearUpdatedBy

func (u *FileSourceUpsert) ClearUpdatedBy() *FileSourceUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileSourceUpsert) SetBucket

func (u *FileSourceUpsert) SetBucket(v string) *FileSourceUpsert

SetBucket sets the "bucket" field.

func (*FileSourceUpsert) SetComments

func (u *FileSourceUpsert) SetComments(v string) *FileSourceUpsert

SetComments sets the "comments" field.

func (*FileSourceUpsert) SetEndpoint

func (u *FileSourceUpsert) SetEndpoint(v string) *FileSourceUpsert

SetEndpoint sets the "endpoint" field.

func (*FileSourceUpsert) SetKind

SetKind sets the "kind" field.

func (*FileSourceUpsert) SetRegion

func (u *FileSourceUpsert) SetRegion(v string) *FileSourceUpsert

SetRegion sets the "region" field.

func (*FileSourceUpsert) SetUpdatedAt

func (u *FileSourceUpsert) SetUpdatedAt(v time.Time) *FileSourceUpsert

SetUpdatedAt sets the "updated_at" field.

func (*FileSourceUpsert) SetUpdatedBy

func (u *FileSourceUpsert) SetUpdatedBy(v int) *FileSourceUpsert

SetUpdatedBy sets the "updated_by" field.

func (*FileSourceUpsert) UpdateBucket

func (u *FileSourceUpsert) UpdateBucket() *FileSourceUpsert

UpdateBucket sets the "bucket" field to the value that was provided on create.

func (*FileSourceUpsert) UpdateComments

func (u *FileSourceUpsert) UpdateComments() *FileSourceUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*FileSourceUpsert) UpdateEndpoint

func (u *FileSourceUpsert) UpdateEndpoint() *FileSourceUpsert

UpdateEndpoint sets the "endpoint" field to the value that was provided on create.

func (*FileSourceUpsert) UpdateKind

func (u *FileSourceUpsert) UpdateKind() *FileSourceUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*FileSourceUpsert) UpdateRegion

func (u *FileSourceUpsert) UpdateRegion() *FileSourceUpsert

UpdateRegion sets the "region" field to the value that was provided on create.

func (*FileSourceUpsert) UpdateUpdatedAt

func (u *FileSourceUpsert) UpdateUpdatedAt() *FileSourceUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileSourceUpsert) UpdateUpdatedBy

func (u *FileSourceUpsert) UpdateUpdatedBy() *FileSourceUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileSourceUpsertBulk

type FileSourceUpsertBulk struct {
	// contains filtered or unexported fields
}

FileSourceUpsertBulk is the builder for "upsert"-ing a bulk of FileSource nodes.

func (*FileSourceUpsertBulk) AddUpdatedBy

func (u *FileSourceUpsertBulk) AddUpdatedBy(v int) *FileSourceUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*FileSourceUpsertBulk) ClearBucket

func (u *FileSourceUpsertBulk) ClearBucket() *FileSourceUpsertBulk

ClearBucket clears the value of the "bucket" field.

func (*FileSourceUpsertBulk) ClearComments

func (u *FileSourceUpsertBulk) ClearComments() *FileSourceUpsertBulk

ClearComments clears the value of the "comments" field.

func (*FileSourceUpsertBulk) ClearEndpoint

func (u *FileSourceUpsertBulk) ClearEndpoint() *FileSourceUpsertBulk

ClearEndpoint clears the value of the "endpoint" field.

func (*FileSourceUpsertBulk) ClearRegion

func (u *FileSourceUpsertBulk) ClearRegion() *FileSourceUpsertBulk

ClearRegion clears the value of the "region" field.

func (*FileSourceUpsertBulk) ClearUpdatedAt

func (u *FileSourceUpsertBulk) ClearUpdatedAt() *FileSourceUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileSourceUpsertBulk) ClearUpdatedBy

func (u *FileSourceUpsertBulk) ClearUpdatedBy() *FileSourceUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileSourceUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileSourceUpsertBulk) Exec

Exec executes the query.

func (*FileSourceUpsertBulk) ExecX

func (u *FileSourceUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.FileSource.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*FileSourceUpsertBulk) SetBucket

SetBucket sets the "bucket" field.

func (*FileSourceUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*FileSourceUpsertBulk) SetEndpoint

SetEndpoint sets the "endpoint" field.

func (*FileSourceUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*FileSourceUpsertBulk) SetRegion

SetRegion sets the "region" field.

func (*FileSourceUpsertBulk) SetUpdatedAt

func (u *FileSourceUpsertBulk) SetUpdatedAt(v time.Time) *FileSourceUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*FileSourceUpsertBulk) SetUpdatedBy

func (u *FileSourceUpsertBulk) SetUpdatedBy(v int) *FileSourceUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*FileSourceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the FileSourceCreateBulk.OnConflict documentation for more info.

func (*FileSourceUpsertBulk) UpdateBucket

func (u *FileSourceUpsertBulk) UpdateBucket() *FileSourceUpsertBulk

UpdateBucket sets the "bucket" field to the value that was provided on create.

func (*FileSourceUpsertBulk) UpdateComments

func (u *FileSourceUpsertBulk) UpdateComments() *FileSourceUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*FileSourceUpsertBulk) UpdateEndpoint

func (u *FileSourceUpsertBulk) UpdateEndpoint() *FileSourceUpsertBulk

UpdateEndpoint sets the "endpoint" field to the value that was provided on create.

func (*FileSourceUpsertBulk) UpdateKind

func (u *FileSourceUpsertBulk) UpdateKind() *FileSourceUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*FileSourceUpsertBulk) UpdateNewValues

func (u *FileSourceUpsertBulk) UpdateNewValues() *FileSourceUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.FileSource.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(filesource.FieldID)
		}),
	).
	Exec(ctx)

func (*FileSourceUpsertBulk) UpdateRegion

func (u *FileSourceUpsertBulk) UpdateRegion() *FileSourceUpsertBulk

UpdateRegion sets the "region" field to the value that was provided on create.

func (*FileSourceUpsertBulk) UpdateUpdatedAt

func (u *FileSourceUpsertBulk) UpdateUpdatedAt() *FileSourceUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileSourceUpsertBulk) UpdateUpdatedBy

func (u *FileSourceUpsertBulk) UpdateUpdatedBy() *FileSourceUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileSourceUpsertOne

type FileSourceUpsertOne struct {
	// contains filtered or unexported fields
}

FileSourceUpsertOne is the builder for "upsert"-ing

one FileSource node.

func (*FileSourceUpsertOne) AddUpdatedBy

func (u *FileSourceUpsertOne) AddUpdatedBy(v int) *FileSourceUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*FileSourceUpsertOne) ClearBucket

func (u *FileSourceUpsertOne) ClearBucket() *FileSourceUpsertOne

ClearBucket clears the value of the "bucket" field.

func (*FileSourceUpsertOne) ClearComments

func (u *FileSourceUpsertOne) ClearComments() *FileSourceUpsertOne

ClearComments clears the value of the "comments" field.

func (*FileSourceUpsertOne) ClearEndpoint

func (u *FileSourceUpsertOne) ClearEndpoint() *FileSourceUpsertOne

ClearEndpoint clears the value of the "endpoint" field.

func (*FileSourceUpsertOne) ClearRegion

func (u *FileSourceUpsertOne) ClearRegion() *FileSourceUpsertOne

ClearRegion clears the value of the "region" field.

func (*FileSourceUpsertOne) ClearUpdatedAt

func (u *FileSourceUpsertOne) ClearUpdatedAt() *FileSourceUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileSourceUpsertOne) ClearUpdatedBy

func (u *FileSourceUpsertOne) ClearUpdatedBy() *FileSourceUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileSourceUpsertOne) DoNothing

func (u *FileSourceUpsertOne) DoNothing() *FileSourceUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileSourceUpsertOne) Exec

Exec executes the query.

func (*FileSourceUpsertOne) ExecX

func (u *FileSourceUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceUpsertOne) ID

func (u *FileSourceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*FileSourceUpsertOne) IDX

func (u *FileSourceUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*FileSourceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.FileSource.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*FileSourceUpsertOne) SetBucket

SetBucket sets the "bucket" field.

func (*FileSourceUpsertOne) SetComments

func (u *FileSourceUpsertOne) SetComments(v string) *FileSourceUpsertOne

SetComments sets the "comments" field.

func (*FileSourceUpsertOne) SetEndpoint

func (u *FileSourceUpsertOne) SetEndpoint(v string) *FileSourceUpsertOne

SetEndpoint sets the "endpoint" field.

func (*FileSourceUpsertOne) SetKind

SetKind sets the "kind" field.

func (*FileSourceUpsertOne) SetRegion

SetRegion sets the "region" field.

func (*FileSourceUpsertOne) SetUpdatedAt

func (u *FileSourceUpsertOne) SetUpdatedAt(v time.Time) *FileSourceUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*FileSourceUpsertOne) SetUpdatedBy

func (u *FileSourceUpsertOne) SetUpdatedBy(v int) *FileSourceUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*FileSourceUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the FileSourceCreate.OnConflict documentation for more info.

func (*FileSourceUpsertOne) UpdateBucket

func (u *FileSourceUpsertOne) UpdateBucket() *FileSourceUpsertOne

UpdateBucket sets the "bucket" field to the value that was provided on create.

func (*FileSourceUpsertOne) UpdateComments

func (u *FileSourceUpsertOne) UpdateComments() *FileSourceUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*FileSourceUpsertOne) UpdateEndpoint

func (u *FileSourceUpsertOne) UpdateEndpoint() *FileSourceUpsertOne

UpdateEndpoint sets the "endpoint" field to the value that was provided on create.

func (*FileSourceUpsertOne) UpdateKind

func (u *FileSourceUpsertOne) UpdateKind() *FileSourceUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*FileSourceUpsertOne) UpdateNewValues

func (u *FileSourceUpsertOne) UpdateNewValues() *FileSourceUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.FileSource.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(filesource.FieldID)
		}),
	).
	Exec(ctx)

func (*FileSourceUpsertOne) UpdateRegion

func (u *FileSourceUpsertOne) UpdateRegion() *FileSourceUpsertOne

UpdateRegion sets the "region" field to the value that was provided on create.

func (*FileSourceUpsertOne) UpdateUpdatedAt

func (u *FileSourceUpsertOne) UpdateUpdatedAt() *FileSourceUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileSourceUpsertOne) UpdateUpdatedBy

func (u *FileSourceUpsertOne) UpdateUpdatedBy() *FileSourceUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileSourceWhereInput

type FileSourceWhereInput struct {
	Predicates []predicate.FileSource  `json:"-"`
	Not        *FileSourceWhereInput   `json:"not,omitempty"`
	Or         []*FileSourceWhereInput `json:"or,omitempty"`
	And        []*FileSourceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "kind" field predicates.
	Kind      *filesource.Kind  `json:"kind,omitempty"`
	KindNEQ   *filesource.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []filesource.Kind `json:"kindIn,omitempty"`
	KindNotIn []filesource.Kind `json:"kindNotIn,omitempty"`

	// "endpoint" field predicates.
	Endpoint             *string  `json:"endpoint,omitempty"`
	EndpointNEQ          *string  `json:"endpointNEQ,omitempty"`
	EndpointIn           []string `json:"endpointIn,omitempty"`
	EndpointNotIn        []string `json:"endpointNotIn,omitempty"`
	EndpointGT           *string  `json:"endpointGT,omitempty"`
	EndpointGTE          *string  `json:"endpointGTE,omitempty"`
	EndpointLT           *string  `json:"endpointLT,omitempty"`
	EndpointLTE          *string  `json:"endpointLTE,omitempty"`
	EndpointContains     *string  `json:"endpointContains,omitempty"`
	EndpointHasPrefix    *string  `json:"endpointHasPrefix,omitempty"`
	EndpointHasSuffix    *string  `json:"endpointHasSuffix,omitempty"`
	EndpointIsNil        bool     `json:"endpointIsNil,omitempty"`
	EndpointNotNil       bool     `json:"endpointNotNil,omitempty"`
	EndpointEqualFold    *string  `json:"endpointEqualFold,omitempty"`
	EndpointContainsFold *string  `json:"endpointContainsFold,omitempty"`

	// "region" field predicates.
	Region             *string  `json:"region,omitempty"`
	RegionNEQ          *string  `json:"regionNEQ,omitempty"`
	RegionIn           []string `json:"regionIn,omitempty"`
	RegionNotIn        []string `json:"regionNotIn,omitempty"`
	RegionGT           *string  `json:"regionGT,omitempty"`
	RegionGTE          *string  `json:"regionGTE,omitempty"`
	RegionLT           *string  `json:"regionLT,omitempty"`
	RegionLTE          *string  `json:"regionLTE,omitempty"`
	RegionContains     *string  `json:"regionContains,omitempty"`
	RegionHasPrefix    *string  `json:"regionHasPrefix,omitempty"`
	RegionHasSuffix    *string  `json:"regionHasSuffix,omitempty"`
	RegionIsNil        bool     `json:"regionIsNil,omitempty"`
	RegionNotNil       bool     `json:"regionNotNil,omitempty"`
	RegionEqualFold    *string  `json:"regionEqualFold,omitempty"`
	RegionContainsFold *string  `json:"regionContainsFold,omitempty"`

	// "bucket" field predicates.
	Bucket             *string  `json:"bucket,omitempty"`
	BucketNEQ          *string  `json:"bucketNEQ,omitempty"`
	BucketIn           []string `json:"bucketIn,omitempty"`
	BucketNotIn        []string `json:"bucketNotIn,omitempty"`
	BucketGT           *string  `json:"bucketGT,omitempty"`
	BucketGTE          *string  `json:"bucketGTE,omitempty"`
	BucketLT           *string  `json:"bucketLT,omitempty"`
	BucketLTE          *string  `json:"bucketLTE,omitempty"`
	BucketContains     *string  `json:"bucketContains,omitempty"`
	BucketHasPrefix    *string  `json:"bucketHasPrefix,omitempty"`
	BucketHasSuffix    *string  `json:"bucketHasSuffix,omitempty"`
	BucketIsNil        bool     `json:"bucketIsNil,omitempty"`
	BucketNotNil       bool     `json:"bucketNotNil,omitempty"`
	BucketEqualFold    *string  `json:"bucketEqualFold,omitempty"`
	BucketContainsFold *string  `json:"bucketContainsFold,omitempty"`

	// "files" edge predicates.
	HasFiles     *bool             `json:"hasFiles,omitempty"`
	HasFilesWith []*FileWhereInput `json:"hasFilesWith,omitempty"`
}

FileSourceWhereInput represents a where input for filtering FileSource queries.

func (*FileSourceWhereInput) AddPredicates

func (i *FileSourceWhereInput) AddPredicates(predicates ...predicate.FileSource)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*FileSourceWhereInput) Filter

Filter applies the FileSourceWhereInput filter on the FileSourceQuery builder.

func (*FileSourceWhereInput) P

P returns a predicate for filtering filesources. An error is returned if the input is empty or invalid.

type FileSources

type FileSources []*FileSource

FileSources is a parsable slice of FileSource.

type FileUpdate

type FileUpdate struct {
	// contains filtered or unexported fields
}

FileUpdate is the builder for updating File entities.

func (*FileUpdate) AddRefCount

func (fu *FileUpdate) AddRefCount(i int) *FileUpdate

AddRefCount adds i to the "ref_count" field.

func (*FileUpdate) AddSize

func (fu *FileUpdate) AddSize(i int) *FileUpdate

AddSize adds i to the "size" field.

func (*FileUpdate) AddTenantID

func (fu *FileUpdate) AddTenantID(i int) *FileUpdate

AddTenantID adds i to the "tenant_id" field.

func (*FileUpdate) AddUpdatedBy

func (fu *FileUpdate) AddUpdatedBy(i int) *FileUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*FileUpdate) ClearMd5

func (fu *FileUpdate) ClearMd5() *FileUpdate

ClearMd5 clears the value of the "md5" field.

func (*FileUpdate) ClearMineType

func (fu *FileUpdate) ClearMineType() *FileUpdate

ClearMineType clears the value of the "mine_type" field.

func (*FileUpdate) ClearRefCount

func (fu *FileUpdate) ClearRefCount() *FileUpdate

ClearRefCount clears the value of the "ref_count" field.

func (*FileUpdate) ClearSize

func (fu *FileUpdate) ClearSize() *FileUpdate

ClearSize clears the value of the "size" field.

func (*FileUpdate) ClearSource

func (fu *FileUpdate) ClearSource() *FileUpdate

ClearSource clears the "source" edge to the FileSource entity.

func (*FileUpdate) ClearUpdatedAt

func (fu *FileUpdate) ClearUpdatedAt() *FileUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileUpdate) ClearUpdatedBy

func (fu *FileUpdate) ClearUpdatedBy() *FileUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileUpdate) Exec

func (fu *FileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpdate) ExecX

func (fu *FileUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpdate) Mutation

func (fu *FileUpdate) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileUpdate) Save

func (fu *FileUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*FileUpdate) SaveX

func (fu *FileUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*FileUpdate) SetMd5

func (fu *FileUpdate) SetMd5(s string) *FileUpdate

SetMd5 sets the "md5" field.

func (*FileUpdate) SetMineType

func (fu *FileUpdate) SetMineType(s string) *FileUpdate

SetMineType sets the "mine_type" field.

func (*FileUpdate) SetName

func (fu *FileUpdate) SetName(s string) *FileUpdate

SetName sets the "name" field.

func (*FileUpdate) SetNillableMd5

func (fu *FileUpdate) SetNillableMd5(s *string) *FileUpdate

SetNillableMd5 sets the "md5" field if the given value is not nil.

func (*FileUpdate) SetNillableMineType

func (fu *FileUpdate) SetNillableMineType(s *string) *FileUpdate

SetNillableMineType sets the "mine_type" field if the given value is not nil.

func (*FileUpdate) SetNillableRefCount

func (fu *FileUpdate) SetNillableRefCount(i *int) *FileUpdate

SetNillableRefCount sets the "ref_count" field if the given value is not nil.

func (*FileUpdate) SetNillableSize

func (fu *FileUpdate) SetNillableSize(i *int) *FileUpdate

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileUpdate) SetNillableUpdatedAt

func (fu *FileUpdate) SetNillableUpdatedAt(t *time.Time) *FileUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileUpdate) SetNillableUpdatedBy

func (fu *FileUpdate) SetNillableUpdatedBy(i *int) *FileUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileUpdate) SetPath

func (fu *FileUpdate) SetPath(s string) *FileUpdate

SetPath sets the "path" field.

func (*FileUpdate) SetRefCount

func (fu *FileUpdate) SetRefCount(i int) *FileUpdate

SetRefCount sets the "ref_count" field.

func (*FileUpdate) SetSize

func (fu *FileUpdate) SetSize(i int) *FileUpdate

SetSize sets the "size" field.

func (*FileUpdate) SetSource

func (fu *FileUpdate) SetSource(f *FileSource) *FileUpdate

SetSource sets the "source" edge to the FileSource entity.

func (*FileUpdate) SetSourceID

func (fu *FileUpdate) SetSourceID(i int) *FileUpdate

SetSourceID sets the "source_id" field.

func (*FileUpdate) SetTenantID

func (fu *FileUpdate) SetTenantID(i int) *FileUpdate

SetTenantID sets the "tenant_id" field.

func (*FileUpdate) SetUpdatedAt

func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FileUpdate) SetUpdatedBy

func (fu *FileUpdate) SetUpdatedBy(i int) *FileUpdate

SetUpdatedBy sets the "updated_by" field.

func (*FileUpdate) Where

func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate

Where appends a list predicates to the FileUpdate builder.

type FileUpdateOne

type FileUpdateOne struct {
	// contains filtered or unexported fields
}

FileUpdateOne is the builder for updating a single File entity.

func (*FileUpdateOne) AddRefCount

func (fuo *FileUpdateOne) AddRefCount(i int) *FileUpdateOne

AddRefCount adds i to the "ref_count" field.

func (*FileUpdateOne) AddSize

func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne

AddSize adds i to the "size" field.

func (*FileUpdateOne) AddTenantID

func (fuo *FileUpdateOne) AddTenantID(i int) *FileUpdateOne

AddTenantID adds i to the "tenant_id" field.

func (*FileUpdateOne) AddUpdatedBy

func (fuo *FileUpdateOne) AddUpdatedBy(i int) *FileUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*FileUpdateOne) ClearMd5

func (fuo *FileUpdateOne) ClearMd5() *FileUpdateOne

ClearMd5 clears the value of the "md5" field.

func (*FileUpdateOne) ClearMineType

func (fuo *FileUpdateOne) ClearMineType() *FileUpdateOne

ClearMineType clears the value of the "mine_type" field.

func (*FileUpdateOne) ClearRefCount

func (fuo *FileUpdateOne) ClearRefCount() *FileUpdateOne

ClearRefCount clears the value of the "ref_count" field.

func (*FileUpdateOne) ClearSize

func (fuo *FileUpdateOne) ClearSize() *FileUpdateOne

ClearSize clears the value of the "size" field.

func (*FileUpdateOne) ClearSource

func (fuo *FileUpdateOne) ClearSource() *FileUpdateOne

ClearSource clears the "source" edge to the FileSource entity.

func (*FileUpdateOne) ClearUpdatedAt

func (fuo *FileUpdateOne) ClearUpdatedAt() *FileUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileUpdateOne) ClearUpdatedBy

func (fuo *FileUpdateOne) ClearUpdatedBy() *FileUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileUpdateOne) Exec

func (fuo *FileUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FileUpdateOne) ExecX

func (fuo *FileUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpdateOne) Mutation

func (fuo *FileUpdateOne) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileUpdateOne) Save

func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)

Save executes the query and returns the updated File entity.

func (*FileUpdateOne) SaveX

func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File

SaveX is like Save, but panics if an error occurs.

func (*FileUpdateOne) Select

func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*FileUpdateOne) SetMd5

func (fuo *FileUpdateOne) SetMd5(s string) *FileUpdateOne

SetMd5 sets the "md5" field.

func (*FileUpdateOne) SetMineType

func (fuo *FileUpdateOne) SetMineType(s string) *FileUpdateOne

SetMineType sets the "mine_type" field.

func (*FileUpdateOne) SetName

func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne

SetName sets the "name" field.

func (*FileUpdateOne) SetNillableMd5

func (fuo *FileUpdateOne) SetNillableMd5(s *string) *FileUpdateOne

SetNillableMd5 sets the "md5" field if the given value is not nil.

func (*FileUpdateOne) SetNillableMineType

func (fuo *FileUpdateOne) SetNillableMineType(s *string) *FileUpdateOne

SetNillableMineType sets the "mine_type" field if the given value is not nil.

func (*FileUpdateOne) SetNillableRefCount

func (fuo *FileUpdateOne) SetNillableRefCount(i *int) *FileUpdateOne

SetNillableRefCount sets the "ref_count" field if the given value is not nil.

func (*FileUpdateOne) SetNillableSize

func (fuo *FileUpdateOne) SetNillableSize(i *int) *FileUpdateOne

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileUpdateOne) SetNillableUpdatedAt

func (fuo *FileUpdateOne) SetNillableUpdatedAt(t *time.Time) *FileUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileUpdateOne) SetNillableUpdatedBy

func (fuo *FileUpdateOne) SetNillableUpdatedBy(i *int) *FileUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileUpdateOne) SetPath

func (fuo *FileUpdateOne) SetPath(s string) *FileUpdateOne

SetPath sets the "path" field.

func (*FileUpdateOne) SetRefCount

func (fuo *FileUpdateOne) SetRefCount(i int) *FileUpdateOne

SetRefCount sets the "ref_count" field.

func (*FileUpdateOne) SetSize

func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne

SetSize sets the "size" field.

func (*FileUpdateOne) SetSource

func (fuo *FileUpdateOne) SetSource(f *FileSource) *FileUpdateOne

SetSource sets the "source" edge to the FileSource entity.

func (*FileUpdateOne) SetSourceID

func (fuo *FileUpdateOne) SetSourceID(i int) *FileUpdateOne

SetSourceID sets the "source_id" field.

func (*FileUpdateOne) SetTenantID

func (fuo *FileUpdateOne) SetTenantID(i int) *FileUpdateOne

SetTenantID sets the "tenant_id" field.

func (*FileUpdateOne) SetUpdatedAt

func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FileUpdateOne) SetUpdatedBy

func (fuo *FileUpdateOne) SetUpdatedBy(i int) *FileUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*FileUpdateOne) Where

func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne

Where appends a list predicates to the FileUpdate builder.

type FileUpsert

type FileUpsert struct {
	*sql.UpdateSet
}

FileUpsert is the "OnConflict" setter.

func (*FileUpsert) AddRefCount

func (u *FileUpsert) AddRefCount(v int) *FileUpsert

AddRefCount adds v to the "ref_count" field.

func (*FileUpsert) AddSize

func (u *FileUpsert) AddSize(v int) *FileUpsert

AddSize adds v to the "size" field.

func (*FileUpsert) AddTenantID

func (u *FileUpsert) AddTenantID(v int) *FileUpsert

AddTenantID adds v to the "tenant_id" field.

func (*FileUpsert) AddUpdatedBy

func (u *FileUpsert) AddUpdatedBy(v int) *FileUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*FileUpsert) ClearMd5

func (u *FileUpsert) ClearMd5() *FileUpsert

ClearMd5 clears the value of the "md5" field.

func (*FileUpsert) ClearMineType

func (u *FileUpsert) ClearMineType() *FileUpsert

ClearMineType clears the value of the "mine_type" field.

func (*FileUpsert) ClearRefCount

func (u *FileUpsert) ClearRefCount() *FileUpsert

ClearRefCount clears the value of the "ref_count" field.

func (*FileUpsert) ClearSize

func (u *FileUpsert) ClearSize() *FileUpsert

ClearSize clears the value of the "size" field.

func (*FileUpsert) ClearUpdatedAt

func (u *FileUpsert) ClearUpdatedAt() *FileUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileUpsert) ClearUpdatedBy

func (u *FileUpsert) ClearUpdatedBy() *FileUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileUpsert) SetMd5

func (u *FileUpsert) SetMd5(v string) *FileUpsert

SetMd5 sets the "md5" field.

func (*FileUpsert) SetMineType

func (u *FileUpsert) SetMineType(v string) *FileUpsert

SetMineType sets the "mine_type" field.

func (*FileUpsert) SetName

func (u *FileUpsert) SetName(v string) *FileUpsert

SetName sets the "name" field.

func (*FileUpsert) SetPath

func (u *FileUpsert) SetPath(v string) *FileUpsert

SetPath sets the "path" field.

func (*FileUpsert) SetRefCount

func (u *FileUpsert) SetRefCount(v int) *FileUpsert

SetRefCount sets the "ref_count" field.

func (*FileUpsert) SetSize

func (u *FileUpsert) SetSize(v int) *FileUpsert

SetSize sets the "size" field.

func (*FileUpsert) SetSourceID

func (u *FileUpsert) SetSourceID(v int) *FileUpsert

SetSourceID sets the "source_id" field.

func (*FileUpsert) SetTenantID

func (u *FileUpsert) SetTenantID(v int) *FileUpsert

SetTenantID sets the "tenant_id" field.

func (*FileUpsert) SetUpdatedAt

func (u *FileUpsert) SetUpdatedAt(v time.Time) *FileUpsert

SetUpdatedAt sets the "updated_at" field.

func (*FileUpsert) SetUpdatedBy

func (u *FileUpsert) SetUpdatedBy(v int) *FileUpsert

SetUpdatedBy sets the "updated_by" field.

func (*FileUpsert) UpdateMd5

func (u *FileUpsert) UpdateMd5() *FileUpsert

UpdateMd5 sets the "md5" field to the value that was provided on create.

func (*FileUpsert) UpdateMineType

func (u *FileUpsert) UpdateMineType() *FileUpsert

UpdateMineType sets the "mine_type" field to the value that was provided on create.

func (*FileUpsert) UpdateName

func (u *FileUpsert) UpdateName() *FileUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*FileUpsert) UpdatePath

func (u *FileUpsert) UpdatePath() *FileUpsert

UpdatePath sets the "path" field to the value that was provided on create.

func (*FileUpsert) UpdateRefCount

func (u *FileUpsert) UpdateRefCount() *FileUpsert

UpdateRefCount sets the "ref_count" field to the value that was provided on create.

func (*FileUpsert) UpdateSize

func (u *FileUpsert) UpdateSize() *FileUpsert

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsert) UpdateSourceID

func (u *FileUpsert) UpdateSourceID() *FileUpsert

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*FileUpsert) UpdateTenantID

func (u *FileUpsert) UpdateTenantID() *FileUpsert

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*FileUpsert) UpdateUpdatedAt

func (u *FileUpsert) UpdateUpdatedAt() *FileUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileUpsert) UpdateUpdatedBy

func (u *FileUpsert) UpdateUpdatedBy() *FileUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileUpsertBulk

type FileUpsertBulk struct {
	// contains filtered or unexported fields
}

FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.

func (*FileUpsertBulk) AddRefCount

func (u *FileUpsertBulk) AddRefCount(v int) *FileUpsertBulk

AddRefCount adds v to the "ref_count" field.

func (*FileUpsertBulk) AddSize

func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk

AddSize adds v to the "size" field.

func (*FileUpsertBulk) AddTenantID

func (u *FileUpsertBulk) AddTenantID(v int) *FileUpsertBulk

AddTenantID adds v to the "tenant_id" field.

func (*FileUpsertBulk) AddUpdatedBy

func (u *FileUpsertBulk) AddUpdatedBy(v int) *FileUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*FileUpsertBulk) ClearMd5

func (u *FileUpsertBulk) ClearMd5() *FileUpsertBulk

ClearMd5 clears the value of the "md5" field.

func (*FileUpsertBulk) ClearMineType

func (u *FileUpsertBulk) ClearMineType() *FileUpsertBulk

ClearMineType clears the value of the "mine_type" field.

func (*FileUpsertBulk) ClearRefCount

func (u *FileUpsertBulk) ClearRefCount() *FileUpsertBulk

ClearRefCount clears the value of the "ref_count" field.

func (*FileUpsertBulk) ClearSize

func (u *FileUpsertBulk) ClearSize() *FileUpsertBulk

ClearSize clears the value of the "size" field.

func (*FileUpsertBulk) ClearUpdatedAt

func (u *FileUpsertBulk) ClearUpdatedAt() *FileUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileUpsertBulk) ClearUpdatedBy

func (u *FileUpsertBulk) ClearUpdatedBy() *FileUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileUpsertBulk) DoNothing

func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileUpsertBulk) Exec

func (u *FileUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpsertBulk) ExecX

func (u *FileUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpsertBulk) Ignore

func (u *FileUpsertBulk) Ignore() *FileUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.File.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*FileUpsertBulk) SetMd5

func (u *FileUpsertBulk) SetMd5(v string) *FileUpsertBulk

SetMd5 sets the "md5" field.

func (*FileUpsertBulk) SetMineType

func (u *FileUpsertBulk) SetMineType(v string) *FileUpsertBulk

SetMineType sets the "mine_type" field.

func (*FileUpsertBulk) SetName

func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk

SetName sets the "name" field.

func (*FileUpsertBulk) SetPath

func (u *FileUpsertBulk) SetPath(v string) *FileUpsertBulk

SetPath sets the "path" field.

func (*FileUpsertBulk) SetRefCount

func (u *FileUpsertBulk) SetRefCount(v int) *FileUpsertBulk

SetRefCount sets the "ref_count" field.

func (*FileUpsertBulk) SetSize

func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk

SetSize sets the "size" field.

func (*FileUpsertBulk) SetSourceID

func (u *FileUpsertBulk) SetSourceID(v int) *FileUpsertBulk

SetSourceID sets the "source_id" field.

func (*FileUpsertBulk) SetTenantID

func (u *FileUpsertBulk) SetTenantID(v int) *FileUpsertBulk

SetTenantID sets the "tenant_id" field.

func (*FileUpsertBulk) SetUpdatedAt

func (u *FileUpsertBulk) SetUpdatedAt(v time.Time) *FileUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*FileUpsertBulk) SetUpdatedBy

func (u *FileUpsertBulk) SetUpdatedBy(v int) *FileUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*FileUpsertBulk) Update

func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk

Update allows overriding fields `UPDATE` values. See the FileCreateBulk.OnConflict documentation for more info.

func (*FileUpsertBulk) UpdateMd5

func (u *FileUpsertBulk) UpdateMd5() *FileUpsertBulk

UpdateMd5 sets the "md5" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateMineType

func (u *FileUpsertBulk) UpdateMineType() *FileUpsertBulk

UpdateMineType sets the "mine_type" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateName

func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateNewValues

func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.File.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(file.FieldID)
		}),
	).
	Exec(ctx)

func (*FileUpsertBulk) UpdatePath

func (u *FileUpsertBulk) UpdatePath() *FileUpsertBulk

UpdatePath sets the "path" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateRefCount

func (u *FileUpsertBulk) UpdateRefCount() *FileUpsertBulk

UpdateRefCount sets the "ref_count" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateSize

func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateSourceID

func (u *FileUpsertBulk) UpdateSourceID() *FileUpsertBulk

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateTenantID

func (u *FileUpsertBulk) UpdateTenantID() *FileUpsertBulk

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateUpdatedAt

func (u *FileUpsertBulk) UpdateUpdatedAt() *FileUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateUpdatedBy

func (u *FileUpsertBulk) UpdateUpdatedBy() *FileUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileUpsertOne

type FileUpsertOne struct {
	// contains filtered or unexported fields
}

FileUpsertOne is the builder for "upsert"-ing

one File node.

func (*FileUpsertOne) AddRefCount

func (u *FileUpsertOne) AddRefCount(v int) *FileUpsertOne

AddRefCount adds v to the "ref_count" field.

func (*FileUpsertOne) AddSize

func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne

AddSize adds v to the "size" field.

func (*FileUpsertOne) AddTenantID

func (u *FileUpsertOne) AddTenantID(v int) *FileUpsertOne

AddTenantID adds v to the "tenant_id" field.

func (*FileUpsertOne) AddUpdatedBy

func (u *FileUpsertOne) AddUpdatedBy(v int) *FileUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*FileUpsertOne) ClearMd5

func (u *FileUpsertOne) ClearMd5() *FileUpsertOne

ClearMd5 clears the value of the "md5" field.

func (*FileUpsertOne) ClearMineType

func (u *FileUpsertOne) ClearMineType() *FileUpsertOne

ClearMineType clears the value of the "mine_type" field.

func (*FileUpsertOne) ClearRefCount

func (u *FileUpsertOne) ClearRefCount() *FileUpsertOne

ClearRefCount clears the value of the "ref_count" field.

func (*FileUpsertOne) ClearSize

func (u *FileUpsertOne) ClearSize() *FileUpsertOne

ClearSize clears the value of the "size" field.

func (*FileUpsertOne) ClearUpdatedAt

func (u *FileUpsertOne) ClearUpdatedAt() *FileUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileUpsertOne) ClearUpdatedBy

func (u *FileUpsertOne) ClearUpdatedBy() *FileUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileUpsertOne) DoNothing

func (u *FileUpsertOne) DoNothing() *FileUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileUpsertOne) Exec

func (u *FileUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpsertOne) ExecX

func (u *FileUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpsertOne) ID

func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*FileUpsertOne) IDX

func (u *FileUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*FileUpsertOne) Ignore

func (u *FileUpsertOne) Ignore() *FileUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.File.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*FileUpsertOne) SetMd5

func (u *FileUpsertOne) SetMd5(v string) *FileUpsertOne

SetMd5 sets the "md5" field.

func (*FileUpsertOne) SetMineType

func (u *FileUpsertOne) SetMineType(v string) *FileUpsertOne

SetMineType sets the "mine_type" field.

func (*FileUpsertOne) SetName

func (u *FileUpsertOne) SetName(v string) *FileUpsertOne

SetName sets the "name" field.

func (*FileUpsertOne) SetPath

func (u *FileUpsertOne) SetPath(v string) *FileUpsertOne

SetPath sets the "path" field.

func (*FileUpsertOne) SetRefCount

func (u *FileUpsertOne) SetRefCount(v int) *FileUpsertOne

SetRefCount sets the "ref_count" field.

func (*FileUpsertOne) SetSize

func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne

SetSize sets the "size" field.

func (*FileUpsertOne) SetSourceID

func (u *FileUpsertOne) SetSourceID(v int) *FileUpsertOne

SetSourceID sets the "source_id" field.

func (*FileUpsertOne) SetTenantID

func (u *FileUpsertOne) SetTenantID(v int) *FileUpsertOne

SetTenantID sets the "tenant_id" field.

func (*FileUpsertOne) SetUpdatedAt

func (u *FileUpsertOne) SetUpdatedAt(v time.Time) *FileUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*FileUpsertOne) SetUpdatedBy

func (u *FileUpsertOne) SetUpdatedBy(v int) *FileUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*FileUpsertOne) Update

func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne

Update allows overriding fields `UPDATE` values. See the FileCreate.OnConflict documentation for more info.

func (*FileUpsertOne) UpdateMd5

func (u *FileUpsertOne) UpdateMd5() *FileUpsertOne

UpdateMd5 sets the "md5" field to the value that was provided on create.

func (*FileUpsertOne) UpdateMineType

func (u *FileUpsertOne) UpdateMineType() *FileUpsertOne

UpdateMineType sets the "mine_type" field to the value that was provided on create.

func (*FileUpsertOne) UpdateName

func (u *FileUpsertOne) UpdateName() *FileUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*FileUpsertOne) UpdateNewValues

func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.File.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(file.FieldID)
		}),
	).
	Exec(ctx)

func (*FileUpsertOne) UpdatePath

func (u *FileUpsertOne) UpdatePath() *FileUpsertOne

UpdatePath sets the "path" field to the value that was provided on create.

func (*FileUpsertOne) UpdateRefCount

func (u *FileUpsertOne) UpdateRefCount() *FileUpsertOne

UpdateRefCount sets the "ref_count" field to the value that was provided on create.

func (*FileUpsertOne) UpdateSize

func (u *FileUpsertOne) UpdateSize() *FileUpsertOne

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsertOne) UpdateSourceID

func (u *FileUpsertOne) UpdateSourceID() *FileUpsertOne

UpdateSourceID sets the "source_id" field to the value that was provided on create.

func (*FileUpsertOne) UpdateTenantID

func (u *FileUpsertOne) UpdateTenantID() *FileUpsertOne

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*FileUpsertOne) UpdateUpdatedAt

func (u *FileUpsertOne) UpdateUpdatedAt() *FileUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileUpsertOne) UpdateUpdatedBy

func (u *FileUpsertOne) UpdateUpdatedBy() *FileUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileWhereInput

type FileWhereInput struct {
	Predicates []predicate.File  `json:"-"`
	Not        *FileWhereInput   `json:"not,omitempty"`
	Or         []*FileWhereInput `json:"or,omitempty"`
	And        []*FileWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "source_id" field predicates.
	SourceID      *int  `json:"sourceID,omitempty"`
	SourceIDNEQ   *int  `json:"sourceIDNEQ,omitempty"`
	SourceIDIn    []int `json:"sourceIDIn,omitempty"`
	SourceIDNotIn []int `json:"sourceIDNotIn,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "path" field predicates.
	Path             *string  `json:"path,omitempty"`
	PathNEQ          *string  `json:"pathNEQ,omitempty"`
	PathIn           []string `json:"pathIn,omitempty"`
	PathNotIn        []string `json:"pathNotIn,omitempty"`
	PathGT           *string  `json:"pathGT,omitempty"`
	PathGTE          *string  `json:"pathGTE,omitempty"`
	PathLT           *string  `json:"pathLT,omitempty"`
	PathLTE          *string  `json:"pathLTE,omitempty"`
	PathContains     *string  `json:"pathContains,omitempty"`
	PathHasPrefix    *string  `json:"pathHasPrefix,omitempty"`
	PathHasSuffix    *string  `json:"pathHasSuffix,omitempty"`
	PathEqualFold    *string  `json:"pathEqualFold,omitempty"`
	PathContainsFold *string  `json:"pathContainsFold,omitempty"`

	// "size" field predicates.
	Size       *int  `json:"size,omitempty"`
	SizeNEQ    *int  `json:"sizeNEQ,omitempty"`
	SizeIn     []int `json:"sizeIn,omitempty"`
	SizeNotIn  []int `json:"sizeNotIn,omitempty"`
	SizeGT     *int  `json:"sizeGT,omitempty"`
	SizeGTE    *int  `json:"sizeGTE,omitempty"`
	SizeLT     *int  `json:"sizeLT,omitempty"`
	SizeLTE    *int  `json:"sizeLTE,omitempty"`
	SizeIsNil  bool  `json:"sizeIsNil,omitempty"`
	SizeNotNil bool  `json:"sizeNotNil,omitempty"`

	// "source" edge predicates.
	HasSource     *bool                   `json:"hasSource,omitempty"`
	HasSourceWith []*FileSourceWhereInput `json:"hasSourceWith,omitempty"`
}

FileWhereInput represents a where input for filtering File queries.

func (*FileWhereInput) AddPredicates

func (i *FileWhereInput) AddPredicates(predicates ...predicate.File)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*FileWhereInput) Filter

func (i *FileWhereInput) Filter(q *FileQuery) (*FileQuery, error)

Filter applies the FileWhereInput filter on the FileQuery builder.

func (*FileWhereInput) P

func (i *FileWhereInput) P() (predicate.File, error)

P returns a predicate for filtering files. An error is returned if the input is empty or invalid.

type Files

type Files []*File

Files is a parsable slice of File.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type OauthClient

type OauthClient struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// id
	ClientID string `json:"client_id,omitempty"`
	// 密钥
	ClientSecret string `json:"client_secret,omitempty"`
	// 授权类型
	GrantTypes oauthclient.GrantTypes `json:"grant_types,omitempty"`
	// 关联用户id
	UserID int `json:"user_id,omitempty"`
	// 最后认证时间
	LastAuthAt time.Time `json:"last_auth_at,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OauthClientQuery when eager-loading is set.
	Edges OauthClientEdges `json:"edges"`
	// contains filtered or unexported fields
}

OauthClient is the model entity for the OauthClient schema.

func (*OauthClient) GlobalID

func (oc *OauthClient) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given OauthClient node.

func (*OauthClient) IsNode

func (*OauthClient) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*OauthClient) QueryUser

func (oc *OauthClient) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OauthClient entity.

func (*OauthClient) String

func (oc *OauthClient) String() string

String implements the fmt.Stringer.

func (*OauthClient) ToEdge

func (oc *OauthClient) ToEdge(order *OauthClientOrder) *OauthClientEdge

ToEdge converts OauthClient into OauthClientEdge.

func (*OauthClient) Unwrap

func (oc *OauthClient) Unwrap() *OauthClient

Unwrap unwraps the OauthClient entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OauthClient) Update

func (oc *OauthClient) Update() *OauthClientUpdateOne

Update returns a builder for updating this OauthClient. Note that you need to call OauthClient.Unwrap() before calling this method if this OauthClient was returned from a transaction, and the transaction was committed or rolled back.

func (*OauthClient) User

func (oc *OauthClient) User(ctx context.Context) (*User, error)

func (*OauthClient) Value

func (oc *OauthClient) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OauthClient. This includes values selected through modifiers, order, etc.

type OauthClientClient

type OauthClientClient struct {
	// contains filtered or unexported fields
}

OauthClientClient is a client for the OauthClient schema.

func NewOauthClientClient

func NewOauthClientClient(c config) *OauthClientClient

NewOauthClientClient returns a client for the OauthClient from the given config.

func (*OauthClientClient) Create

func (c *OauthClientClient) Create() *OauthClientCreate

Create returns a builder for creating a OauthClient entity.

func (*OauthClientClient) CreateBulk

func (c *OauthClientClient) CreateBulk(builders ...*OauthClientCreate) *OauthClientCreateBulk

CreateBulk returns a builder for creating a bulk of OauthClient entities.

func (*OauthClientClient) Delete

func (c *OauthClientClient) Delete() *OauthClientDelete

Delete returns a delete builder for OauthClient.

func (*OauthClientClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OauthClientClient) DeleteOneID

func (c *OauthClientClient) DeleteOneID(id int) *OauthClientDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OauthClientClient) Get

func (c *OauthClientClient) Get(ctx context.Context, id int) (*OauthClient, error)

Get returns a OauthClient entity by its id.

func (*OauthClientClient) GetX

func (c *OauthClientClient) GetX(ctx context.Context, id int) *OauthClient

GetX is like Get, but panics if an error occurs.

func (*OauthClientClient) Hooks

func (c *OauthClientClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OauthClientClient) Intercept

func (c *OauthClientClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthclient.Intercept(f(g(h())))`.

func (*OauthClientClient) Interceptors

func (c *OauthClientClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OauthClientClient) MapCreateBulk

func (c *OauthClientClient) MapCreateBulk(slice any, setFunc func(*OauthClientCreate, int)) *OauthClientCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OauthClientClient) Query

func (c *OauthClientClient) Query() *OauthClientQuery

Query returns a query builder for OauthClient.

func (*OauthClientClient) QueryUser

func (c *OauthClientClient) QueryUser(oc *OauthClient) *UserQuery

QueryUser queries the user edge of a OauthClient.

func (*OauthClientClient) Update

func (c *OauthClientClient) Update() *OauthClientUpdate

Update returns an update builder for OauthClient.

func (*OauthClientClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OauthClientClient) UpdateOneID

func (c *OauthClientClient) UpdateOneID(id int) *OauthClientUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OauthClientClient) Use

func (c *OauthClientClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthclient.Hooks(f(g(h())))`.

type OauthClientConnection

type OauthClientConnection struct {
	Edges      []*OauthClientEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

OauthClientConnection is the connection containing edges to OauthClient.

type OauthClientCreate

type OauthClientCreate struct {
	// contains filtered or unexported fields
}

OauthClientCreate is the builder for creating a OauthClient entity.

func (*OauthClientCreate) Exec

func (occ *OauthClientCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OauthClientCreate) ExecX

func (occ *OauthClientCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientCreate) Mutation

func (occ *OauthClientCreate) Mutation() *OauthClientMutation

Mutation returns the OauthClientMutation object of the builder.

func (*OauthClientCreate) OnConflict

func (occ *OauthClientCreate) OnConflict(opts ...sql.ConflictOption) *OauthClientUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OauthClient.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OauthClientUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OauthClientCreate) OnConflictColumns

func (occ *OauthClientCreate) OnConflictColumns(columns ...string) *OauthClientUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OauthClient.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OauthClientCreate) Save

func (occ *OauthClientCreate) Save(ctx context.Context) (*OauthClient, error)

Save creates the OauthClient in the database.

func (*OauthClientCreate) SaveX

func (occ *OauthClientCreate) SaveX(ctx context.Context) *OauthClient

SaveX calls Save and panics if Save returns an error.

func (*OauthClientCreate) SetClientID

func (occ *OauthClientCreate) SetClientID(s string) *OauthClientCreate

SetClientID sets the "client_id" field.

func (*OauthClientCreate) SetClientSecret

func (occ *OauthClientCreate) SetClientSecret(s string) *OauthClientCreate

SetClientSecret sets the "client_secret" field.

func (*OauthClientCreate) SetCreatedAt

func (occ *OauthClientCreate) SetCreatedAt(t time.Time) *OauthClientCreate

SetCreatedAt sets the "created_at" field.

func (*OauthClientCreate) SetCreatedBy

func (occ *OauthClientCreate) SetCreatedBy(i int) *OauthClientCreate

SetCreatedBy sets the "created_by" field.

func (*OauthClientCreate) SetGrantTypes

SetGrantTypes sets the "grant_types" field.

func (*OauthClientCreate) SetID

func (occ *OauthClientCreate) SetID(i int) *OauthClientCreate

SetID sets the "id" field.

func (*OauthClientCreate) SetInput

SetInput applies the change-set in the CreateOauthClientInput on the OauthClientCreate builder.

func (*OauthClientCreate) SetLastAuthAt

func (occ *OauthClientCreate) SetLastAuthAt(t time.Time) *OauthClientCreate

SetLastAuthAt sets the "last_auth_at" field.

func (*OauthClientCreate) SetName

func (occ *OauthClientCreate) SetName(s string) *OauthClientCreate

SetName sets the "name" field.

func (*OauthClientCreate) SetNillableCreatedAt

func (occ *OauthClientCreate) SetNillableCreatedAt(t *time.Time) *OauthClientCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OauthClientCreate) SetNillableID

func (occ *OauthClientCreate) SetNillableID(i *int) *OauthClientCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OauthClientCreate) SetNillableLastAuthAt

func (occ *OauthClientCreate) SetNillableLastAuthAt(t *time.Time) *OauthClientCreate

SetNillableLastAuthAt sets the "last_auth_at" field if the given value is not nil.

func (*OauthClientCreate) SetNillableStatus

func (occ *OauthClientCreate) SetNillableStatus(ts *typex.SimpleStatus) *OauthClientCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OauthClientCreate) SetNillableUpdatedAt

func (occ *OauthClientCreate) SetNillableUpdatedAt(t *time.Time) *OauthClientCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OauthClientCreate) SetNillableUpdatedBy

func (occ *OauthClientCreate) SetNillableUpdatedBy(i *int) *OauthClientCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OauthClientCreate) SetStatus

SetStatus sets the "status" field.

func (*OauthClientCreate) SetUpdatedAt

func (occ *OauthClientCreate) SetUpdatedAt(t time.Time) *OauthClientCreate

SetUpdatedAt sets the "updated_at" field.

func (*OauthClientCreate) SetUpdatedBy

func (occ *OauthClientCreate) SetUpdatedBy(i int) *OauthClientCreate

SetUpdatedBy sets the "updated_by" field.

func (*OauthClientCreate) SetUser

func (occ *OauthClientCreate) SetUser(u *User) *OauthClientCreate

SetUser sets the "user" edge to the User entity.

func (*OauthClientCreate) SetUserID

func (occ *OauthClientCreate) SetUserID(i int) *OauthClientCreate

SetUserID sets the "user_id" field.

type OauthClientCreateBulk

type OauthClientCreateBulk struct {
	// contains filtered or unexported fields
}

OauthClientCreateBulk is the builder for creating many OauthClient entities in bulk.

func (*OauthClientCreateBulk) Exec

func (occb *OauthClientCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OauthClientCreateBulk) ExecX

func (occb *OauthClientCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OauthClient.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OauthClientUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OauthClientCreateBulk) OnConflictColumns

func (occb *OauthClientCreateBulk) OnConflictColumns(columns ...string) *OauthClientUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OauthClient.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OauthClientCreateBulk) Save

func (occb *OauthClientCreateBulk) Save(ctx context.Context) ([]*OauthClient, error)

Save creates the OauthClient entities in the database.

func (*OauthClientCreateBulk) SaveX

func (occb *OauthClientCreateBulk) SaveX(ctx context.Context) []*OauthClient

SaveX is like Save, but panics if an error occurs.

type OauthClientDelete

type OauthClientDelete struct {
	// contains filtered or unexported fields
}

OauthClientDelete is the builder for deleting a OauthClient entity.

func (*OauthClientDelete) Exec

func (ocd *OauthClientDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OauthClientDelete) ExecX

func (ocd *OauthClientDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientDelete) Where

Where appends a list predicates to the OauthClientDelete builder.

type OauthClientDeleteOne

type OauthClientDeleteOne struct {
	// contains filtered or unexported fields
}

OauthClientDeleteOne is the builder for deleting a single OauthClient entity.

func (*OauthClientDeleteOne) Exec

func (ocdo *OauthClientDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OauthClientDeleteOne) ExecX

func (ocdo *OauthClientDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientDeleteOne) Where

Where appends a list predicates to the OauthClientDelete builder.

type OauthClientEdge

type OauthClientEdge struct {
	Node   *OauthClient `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

OauthClientEdge is the edge representation of OauthClient.

type OauthClientEdges

type OauthClientEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

OauthClientEdges holds the relations/edges for other nodes in the graph.

func (OauthClientEdges) UserOrErr

func (e OauthClientEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OauthClientGroupBy

type OauthClientGroupBy struct {
	// contains filtered or unexported fields
}

OauthClientGroupBy is the group-by builder for OauthClient entities.

func (*OauthClientGroupBy) Aggregate

func (ocgb *OauthClientGroupBy) Aggregate(fns ...AggregateFunc) *OauthClientGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OauthClientGroupBy) Bool

func (s *OauthClientGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) BoolX

func (s *OauthClientGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OauthClientGroupBy) Bools

func (s *OauthClientGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) BoolsX

func (s *OauthClientGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OauthClientGroupBy) Float64

func (s *OauthClientGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) Float64X

func (s *OauthClientGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OauthClientGroupBy) Float64s

func (s *OauthClientGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) Float64sX

func (s *OauthClientGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OauthClientGroupBy) Int

func (s *OauthClientGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) IntX

func (s *OauthClientGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OauthClientGroupBy) Ints

func (s *OauthClientGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) IntsX

func (s *OauthClientGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OauthClientGroupBy) Scan

func (ocgb *OauthClientGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OauthClientGroupBy) ScanX

func (s *OauthClientGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OauthClientGroupBy) String

func (s *OauthClientGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) StringX

func (s *OauthClientGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OauthClientGroupBy) Strings

func (s *OauthClientGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OauthClientGroupBy) StringsX

func (s *OauthClientGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OauthClientMutation

type OauthClientMutation struct {
	// contains filtered or unexported fields
}

OauthClientMutation represents an operation that mutates the OauthClient nodes in the graph.

func (*OauthClientMutation) AddCreatedBy

func (m *OauthClientMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OauthClientMutation) AddField

func (m *OauthClientMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OauthClientMutation) AddUpdatedBy

func (m *OauthClientMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OauthClientMutation) AddedCreatedBy

func (m *OauthClientMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OauthClientMutation) AddedEdges

func (m *OauthClientMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OauthClientMutation) AddedField

func (m *OauthClientMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OauthClientMutation) AddedFields

func (m *OauthClientMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OauthClientMutation) AddedIDs

func (m *OauthClientMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OauthClientMutation) AddedUpdatedBy

func (m *OauthClientMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OauthClientMutation) ClearEdge

func (m *OauthClientMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OauthClientMutation) ClearField

func (m *OauthClientMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OauthClientMutation) ClearLastAuthAt

func (m *OauthClientMutation) ClearLastAuthAt()

ClearLastAuthAt clears the value of the "last_auth_at" field.

func (*OauthClientMutation) ClearUpdatedAt

func (m *OauthClientMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OauthClientMutation) ClearUpdatedBy

func (m *OauthClientMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OauthClientMutation) ClearUser

func (m *OauthClientMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OauthClientMutation) ClearedEdges

func (m *OauthClientMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OauthClientMutation) ClearedFields

func (m *OauthClientMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OauthClientMutation) Client

func (m OauthClientMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OauthClientMutation) ClientID

func (m *OauthClientMutation) ClientID() (r string, exists bool)

ClientID returns the value of the "client_id" field in the mutation.

func (*OauthClientMutation) ClientSecret

func (m *OauthClientMutation) ClientSecret() (r string, exists bool)

ClientSecret returns the value of the "client_secret" field in the mutation.

func (*OauthClientMutation) CreatedAt

func (m *OauthClientMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OauthClientMutation) CreatedBy

func (m *OauthClientMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OauthClientMutation) EdgeCleared

func (m *OauthClientMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OauthClientMutation) Field

func (m *OauthClientMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OauthClientMutation) FieldCleared

func (m *OauthClientMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OauthClientMutation) Fields

func (m *OauthClientMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OauthClientMutation) GrantTypes

func (m *OauthClientMutation) GrantTypes() (r oauthclient.GrantTypes, exists bool)

GrantTypes returns the value of the "grant_types" field in the mutation.

func (*OauthClientMutation) ID

func (m *OauthClientMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OauthClientMutation) IDs

func (m *OauthClientMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OauthClientMutation) LastAuthAt

func (m *OauthClientMutation) LastAuthAt() (r time.Time, exists bool)

LastAuthAt returns the value of the "last_auth_at" field in the mutation.

func (*OauthClientMutation) LastAuthAtCleared

func (m *OauthClientMutation) LastAuthAtCleared() bool

LastAuthAtCleared returns if the "last_auth_at" field was cleared in this mutation.

func (*OauthClientMutation) Name

func (m *OauthClientMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OauthClientMutation) OldClientID

func (m *OauthClientMutation) OldClientID(ctx context.Context) (v string, err error)

OldClientID returns the old "client_id" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldClientSecret

func (m *OauthClientMutation) OldClientSecret(ctx context.Context) (v string, err error)

OldClientSecret returns the old "client_secret" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldCreatedAt

func (m *OauthClientMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldCreatedBy

func (m *OauthClientMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldField

func (m *OauthClientMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OauthClientMutation) OldGrantTypes

func (m *OauthClientMutation) OldGrantTypes(ctx context.Context) (v oauthclient.GrantTypes, err error)

OldGrantTypes returns the old "grant_types" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldLastAuthAt

func (m *OauthClientMutation) OldLastAuthAt(ctx context.Context) (v time.Time, err error)

OldLastAuthAt returns the old "last_auth_at" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldName

func (m *OauthClientMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldStatus

func (m *OauthClientMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldUpdatedAt

func (m *OauthClientMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldUpdatedBy

func (m *OauthClientMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) OldUserID

func (m *OauthClientMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the OauthClient entity. If the OauthClient object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OauthClientMutation) Op

func (m *OauthClientMutation) Op() Op

Op returns the operation name.

func (*OauthClientMutation) RemovedEdges

func (m *OauthClientMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OauthClientMutation) RemovedIDs

func (m *OauthClientMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OauthClientMutation) ResetClientID

func (m *OauthClientMutation) ResetClientID()

ResetClientID resets all changes to the "client_id" field.

func (*OauthClientMutation) ResetClientSecret

func (m *OauthClientMutation) ResetClientSecret()

ResetClientSecret resets all changes to the "client_secret" field.

func (*OauthClientMutation) ResetCreatedAt

func (m *OauthClientMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OauthClientMutation) ResetCreatedBy

func (m *OauthClientMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OauthClientMutation) ResetEdge

func (m *OauthClientMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OauthClientMutation) ResetField

func (m *OauthClientMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OauthClientMutation) ResetGrantTypes

func (m *OauthClientMutation) ResetGrantTypes()

ResetGrantTypes resets all changes to the "grant_types" field.

func (*OauthClientMutation) ResetLastAuthAt

func (m *OauthClientMutation) ResetLastAuthAt()

ResetLastAuthAt resets all changes to the "last_auth_at" field.

func (*OauthClientMutation) ResetName

func (m *OauthClientMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OauthClientMutation) ResetStatus

func (m *OauthClientMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*OauthClientMutation) ResetUpdatedAt

func (m *OauthClientMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OauthClientMutation) ResetUpdatedBy

func (m *OauthClientMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OauthClientMutation) ResetUser

func (m *OauthClientMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OauthClientMutation) ResetUserID

func (m *OauthClientMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OauthClientMutation) SetClientID

func (m *OauthClientMutation) SetClientID(s string)

SetClientID sets the "client_id" field.

func (*OauthClientMutation) SetClientSecret

func (m *OauthClientMutation) SetClientSecret(s string)

SetClientSecret sets the "client_secret" field.

func (*OauthClientMutation) SetCreatedAt

func (m *OauthClientMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OauthClientMutation) SetCreatedBy

func (m *OauthClientMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OauthClientMutation) SetField

func (m *OauthClientMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OauthClientMutation) SetGrantTypes

func (m *OauthClientMutation) SetGrantTypes(ot oauthclient.GrantTypes)

SetGrantTypes sets the "grant_types" field.

func (*OauthClientMutation) SetID

func (m *OauthClientMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OauthClient entities.

func (*OauthClientMutation) SetLastAuthAt

func (m *OauthClientMutation) SetLastAuthAt(t time.Time)

SetLastAuthAt sets the "last_auth_at" field.

func (*OauthClientMutation) SetName

func (m *OauthClientMutation) SetName(s string)

SetName sets the "name" field.

func (*OauthClientMutation) SetOp

func (m *OauthClientMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OauthClientMutation) SetStatus

func (m *OauthClientMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*OauthClientMutation) SetUpdatedAt

func (m *OauthClientMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OauthClientMutation) SetUpdatedBy

func (m *OauthClientMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*OauthClientMutation) SetUserID

func (m *OauthClientMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*OauthClientMutation) Status

func (m *OauthClientMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (OauthClientMutation) Tx

func (m OauthClientMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OauthClientMutation) Type

func (m *OauthClientMutation) Type() string

Type returns the node type of this mutation (OauthClient).

func (*OauthClientMutation) UpdatedAt

func (m *OauthClientMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OauthClientMutation) UpdatedAtCleared

func (m *OauthClientMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OauthClientMutation) UpdatedBy

func (m *OauthClientMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OauthClientMutation) UpdatedByCleared

func (m *OauthClientMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OauthClientMutation) UserCleared

func (m *OauthClientMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OauthClientMutation) UserID

func (m *OauthClientMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OauthClientMutation) UserIDs

func (m *OauthClientMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OauthClientMutation) Where

func (m *OauthClientMutation) Where(ps ...predicate.OauthClient)

Where appends a list predicates to the OauthClientMutation builder.

func (*OauthClientMutation) WhereP

func (m *OauthClientMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OauthClientMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OauthClientOrder

type OauthClientOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *OauthClientOrderField `json:"field"`
}

OauthClientOrder defines the ordering of OauthClient.

type OauthClientOrderField

type OauthClientOrderField struct {
	// Value extracts the ordering value from the given OauthClient.
	Value func(*OauthClient) (ent.Value, error)
	// contains filtered or unexported fields
}

OauthClientOrderField defines the ordering field of OauthClient.

func (OauthClientOrderField) MarshalGQL

func (f OauthClientOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OauthClientOrderField) String

func (f OauthClientOrderField) String() string

String implement fmt.Stringer interface.

func (*OauthClientOrderField) UnmarshalGQL

func (f *OauthClientOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OauthClientPaginateOption

type OauthClientPaginateOption func(*oauthclientPager) error

OauthClientPaginateOption enables pagination customization.

func WithOauthClientFilter

func WithOauthClientFilter(filter func(*OauthClientQuery) (*OauthClientQuery, error)) OauthClientPaginateOption

WithOauthClientFilter configures pagination filter.

func WithOauthClientOrder

func WithOauthClientOrder(order *OauthClientOrder) OauthClientPaginateOption

WithOauthClientOrder configures pagination ordering.

type OauthClientQuery

type OauthClientQuery struct {
	// contains filtered or unexported fields
}

OauthClientQuery is the builder for querying OauthClient entities.

func (*OauthClientQuery) Aggregate

func (ocq *OauthClientQuery) Aggregate(fns ...AggregateFunc) *OauthClientSelect

Aggregate returns a OauthClientSelect configured with the given aggregations.

func (*OauthClientQuery) All

func (ocq *OauthClientQuery) All(ctx context.Context) ([]*OauthClient, error)

All executes the query and returns a list of OauthClients.

func (*OauthClientQuery) AllX

func (ocq *OauthClientQuery) AllX(ctx context.Context) []*OauthClient

AllX is like All, but panics if an error occurs.

func (*OauthClientQuery) Clone

func (ocq *OauthClientQuery) Clone() *OauthClientQuery

Clone returns a duplicate of the OauthClientQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OauthClientQuery) CollectFields

func (oc *OauthClientQuery) CollectFields(ctx context.Context, satisfies ...string) (*OauthClientQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OauthClientQuery) Count

func (ocq *OauthClientQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OauthClientQuery) CountX

func (ocq *OauthClientQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OauthClientQuery) Exist

func (ocq *OauthClientQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OauthClientQuery) ExistX

func (ocq *OauthClientQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OauthClientQuery) First

func (ocq *OauthClientQuery) First(ctx context.Context) (*OauthClient, error)

First returns the first OauthClient entity from the query. Returns a *NotFoundError when no OauthClient was found.

func (*OauthClientQuery) FirstID

func (ocq *OauthClientQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OauthClient ID from the query. Returns a *NotFoundError when no OauthClient ID was found.

func (*OauthClientQuery) FirstIDX

func (ocq *OauthClientQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OauthClientQuery) FirstX

func (ocq *OauthClientQuery) FirstX(ctx context.Context) *OauthClient

FirstX is like First, but panics if an error occurs.

func (*OauthClientQuery) GroupBy

func (ocq *OauthClientQuery) GroupBy(field string, fields ...string) *OauthClientGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OauthClient.Query().
	GroupBy(oauthclient.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OauthClientQuery) IDs

func (ocq *OauthClientQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OauthClient IDs.

func (*OauthClientQuery) IDsX

func (ocq *OauthClientQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OauthClientQuery) Limit

func (ocq *OauthClientQuery) Limit(limit int) *OauthClientQuery

Limit the number of records to be returned by this query.

func (*OauthClientQuery) Offset

func (ocq *OauthClientQuery) Offset(offset int) *OauthClientQuery

Offset to start from.

func (*OauthClientQuery) Only

func (ocq *OauthClientQuery) Only(ctx context.Context) (*OauthClient, error)

Only returns a single OauthClient entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OauthClient entity is found. Returns a *NotFoundError when no OauthClient entities are found.

func (*OauthClientQuery) OnlyID

func (ocq *OauthClientQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OauthClient ID in the query. Returns a *NotSingularError when more than one OauthClient ID is found. Returns a *NotFoundError when no entities are found.

func (*OauthClientQuery) OnlyIDX

func (ocq *OauthClientQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OauthClientQuery) OnlyX

func (ocq *OauthClientQuery) OnlyX(ctx context.Context) *OauthClient

OnlyX is like Only, but panics if an error occurs.

func (*OauthClientQuery) Order

Order specifies how the records should be ordered.

func (*OauthClientQuery) Paginate

func (oc *OauthClientQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OauthClientPaginateOption,
) (*OauthClientConnection, error)

Paginate executes the query and returns a relay based cursor connection to OauthClient.

func (*OauthClientQuery) QueryUser

func (ocq *OauthClientQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OauthClientQuery) Select

func (ocq *OauthClientQuery) Select(fields ...string) *OauthClientSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.OauthClient.Query().
	Select(oauthclient.FieldCreatedBy).
	Scan(ctx, &v)

func (*OauthClientQuery) Unique

func (ocq *OauthClientQuery) Unique(unique bool) *OauthClientQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OauthClientQuery) Where

Where adds a new predicate for the OauthClientQuery builder.

func (*OauthClientQuery) WithUser

func (ocq *OauthClientQuery) WithUser(opts ...func(*UserQuery)) *OauthClientQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OauthClientSelect

type OauthClientSelect struct {
	*OauthClientQuery
	// contains filtered or unexported fields
}

OauthClientSelect is the builder for selecting fields of OauthClient entities.

func (*OauthClientSelect) Aggregate

func (ocs *OauthClientSelect) Aggregate(fns ...AggregateFunc) *OauthClientSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OauthClientSelect) Bool

func (s *OauthClientSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) BoolX

func (s *OauthClientSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OauthClientSelect) Bools

func (s *OauthClientSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) BoolsX

func (s *OauthClientSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OauthClientSelect) Float64

func (s *OauthClientSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) Float64X

func (s *OauthClientSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OauthClientSelect) Float64s

func (s *OauthClientSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) Float64sX

func (s *OauthClientSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OauthClientSelect) Int

func (s *OauthClientSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) IntX

func (s *OauthClientSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OauthClientSelect) Ints

func (s *OauthClientSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) IntsX

func (s *OauthClientSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OauthClientSelect) Scan

func (ocs *OauthClientSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OauthClientSelect) ScanX

func (s *OauthClientSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OauthClientSelect) String

func (s *OauthClientSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) StringX

func (s *OauthClientSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OauthClientSelect) Strings

func (s *OauthClientSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OauthClientSelect) StringsX

func (s *OauthClientSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OauthClientUpdate

type OauthClientUpdate struct {
	// contains filtered or unexported fields
}

OauthClientUpdate is the builder for updating OauthClient entities.

func (*OauthClientUpdate) AddUpdatedBy

func (ocu *OauthClientUpdate) AddUpdatedBy(i int) *OauthClientUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OauthClientUpdate) ClearLastAuthAt

func (ocu *OauthClientUpdate) ClearLastAuthAt() *OauthClientUpdate

ClearLastAuthAt clears the value of the "last_auth_at" field.

func (*OauthClientUpdate) ClearUpdatedAt

func (ocu *OauthClientUpdate) ClearUpdatedAt() *OauthClientUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OauthClientUpdate) ClearUpdatedBy

func (ocu *OauthClientUpdate) ClearUpdatedBy() *OauthClientUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OauthClientUpdate) ClearUser

func (ocu *OauthClientUpdate) ClearUser() *OauthClientUpdate

ClearUser clears the "user" edge to the User entity.

func (*OauthClientUpdate) Exec

func (ocu *OauthClientUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OauthClientUpdate) ExecX

func (ocu *OauthClientUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientUpdate) Mutation

func (ocu *OauthClientUpdate) Mutation() *OauthClientMutation

Mutation returns the OauthClientMutation object of the builder.

func (*OauthClientUpdate) Save

func (ocu *OauthClientUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OauthClientUpdate) SaveX

func (ocu *OauthClientUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OauthClientUpdate) SetGrantTypes

SetGrantTypes sets the "grant_types" field.

func (*OauthClientUpdate) SetInput

SetInput applies the change-set in the UpdateOauthClientInput on the OauthClientUpdate builder.

func (*OauthClientUpdate) SetLastAuthAt

func (ocu *OauthClientUpdate) SetLastAuthAt(t time.Time) *OauthClientUpdate

SetLastAuthAt sets the "last_auth_at" field.

func (*OauthClientUpdate) SetName

func (ocu *OauthClientUpdate) SetName(s string) *OauthClientUpdate

SetName sets the "name" field.

func (*OauthClientUpdate) SetNillableLastAuthAt

func (ocu *OauthClientUpdate) SetNillableLastAuthAt(t *time.Time) *OauthClientUpdate

SetNillableLastAuthAt sets the "last_auth_at" field if the given value is not nil.

func (*OauthClientUpdate) SetNillableStatus

func (ocu *OauthClientUpdate) SetNillableStatus(ts *typex.SimpleStatus) *OauthClientUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OauthClientUpdate) SetNillableUpdatedAt

func (ocu *OauthClientUpdate) SetNillableUpdatedAt(t *time.Time) *OauthClientUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OauthClientUpdate) SetNillableUpdatedBy

func (ocu *OauthClientUpdate) SetNillableUpdatedBy(i *int) *OauthClientUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OauthClientUpdate) SetStatus

SetStatus sets the "status" field.

func (*OauthClientUpdate) SetUpdatedAt

func (ocu *OauthClientUpdate) SetUpdatedAt(t time.Time) *OauthClientUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OauthClientUpdate) SetUpdatedBy

func (ocu *OauthClientUpdate) SetUpdatedBy(i int) *OauthClientUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OauthClientUpdate) SetUser

func (ocu *OauthClientUpdate) SetUser(u *User) *OauthClientUpdate

SetUser sets the "user" edge to the User entity.

func (*OauthClientUpdate) SetUserID

func (ocu *OauthClientUpdate) SetUserID(i int) *OauthClientUpdate

SetUserID sets the "user_id" field.

func (*OauthClientUpdate) Where

Where appends a list predicates to the OauthClientUpdate builder.

type OauthClientUpdateOne

type OauthClientUpdateOne struct {
	// contains filtered or unexported fields
}

OauthClientUpdateOne is the builder for updating a single OauthClient entity.

func (*OauthClientUpdateOne) AddUpdatedBy

func (ocuo *OauthClientUpdateOne) AddUpdatedBy(i int) *OauthClientUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*OauthClientUpdateOne) ClearLastAuthAt

func (ocuo *OauthClientUpdateOne) ClearLastAuthAt() *OauthClientUpdateOne

ClearLastAuthAt clears the value of the "last_auth_at" field.

func (*OauthClientUpdateOne) ClearUpdatedAt

func (ocuo *OauthClientUpdateOne) ClearUpdatedAt() *OauthClientUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OauthClientUpdateOne) ClearUpdatedBy

func (ocuo *OauthClientUpdateOne) ClearUpdatedBy() *OauthClientUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OauthClientUpdateOne) ClearUser

func (ocuo *OauthClientUpdateOne) ClearUser() *OauthClientUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*OauthClientUpdateOne) Exec

func (ocuo *OauthClientUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OauthClientUpdateOne) ExecX

func (ocuo *OauthClientUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientUpdateOne) Mutation

func (ocuo *OauthClientUpdateOne) Mutation() *OauthClientMutation

Mutation returns the OauthClientMutation object of the builder.

func (*OauthClientUpdateOne) Save

Save executes the query and returns the updated OauthClient entity.

func (*OauthClientUpdateOne) SaveX

func (ocuo *OauthClientUpdateOne) SaveX(ctx context.Context) *OauthClient

SaveX is like Save, but panics if an error occurs.

func (*OauthClientUpdateOne) Select

func (ocuo *OauthClientUpdateOne) Select(field string, fields ...string) *OauthClientUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OauthClientUpdateOne) SetGrantTypes

SetGrantTypes sets the "grant_types" field.

func (*OauthClientUpdateOne) SetInput

SetInput applies the change-set in the UpdateOauthClientInput on the OauthClientUpdateOne builder.

func (*OauthClientUpdateOne) SetLastAuthAt

func (ocuo *OauthClientUpdateOne) SetLastAuthAt(t time.Time) *OauthClientUpdateOne

SetLastAuthAt sets the "last_auth_at" field.

func (*OauthClientUpdateOne) SetName

SetName sets the "name" field.

func (*OauthClientUpdateOne) SetNillableLastAuthAt

func (ocuo *OauthClientUpdateOne) SetNillableLastAuthAt(t *time.Time) *OauthClientUpdateOne

SetNillableLastAuthAt sets the "last_auth_at" field if the given value is not nil.

func (*OauthClientUpdateOne) SetNillableStatus

func (ocuo *OauthClientUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *OauthClientUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OauthClientUpdateOne) SetNillableUpdatedAt

func (ocuo *OauthClientUpdateOne) SetNillableUpdatedAt(t *time.Time) *OauthClientUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OauthClientUpdateOne) SetNillableUpdatedBy

func (ocuo *OauthClientUpdateOne) SetNillableUpdatedBy(i *int) *OauthClientUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OauthClientUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*OauthClientUpdateOne) SetUpdatedAt

func (ocuo *OauthClientUpdateOne) SetUpdatedAt(t time.Time) *OauthClientUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OauthClientUpdateOne) SetUpdatedBy

func (ocuo *OauthClientUpdateOne) SetUpdatedBy(i int) *OauthClientUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*OauthClientUpdateOne) SetUser

func (ocuo *OauthClientUpdateOne) SetUser(u *User) *OauthClientUpdateOne

SetUser sets the "user" edge to the User entity.

func (*OauthClientUpdateOne) SetUserID

func (ocuo *OauthClientUpdateOne) SetUserID(i int) *OauthClientUpdateOne

SetUserID sets the "user_id" field.

func (*OauthClientUpdateOne) Where

Where appends a list predicates to the OauthClientUpdate builder.

type OauthClientUpsert

type OauthClientUpsert struct {
	*sql.UpdateSet
}

OauthClientUpsert is the "OnConflict" setter.

func (*OauthClientUpsert) AddUpdatedBy

func (u *OauthClientUpsert) AddUpdatedBy(v int) *OauthClientUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*OauthClientUpsert) ClearLastAuthAt

func (u *OauthClientUpsert) ClearLastAuthAt() *OauthClientUpsert

ClearLastAuthAt clears the value of the "last_auth_at" field.

func (*OauthClientUpsert) ClearUpdatedAt

func (u *OauthClientUpsert) ClearUpdatedAt() *OauthClientUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OauthClientUpsert) ClearUpdatedBy

func (u *OauthClientUpsert) ClearUpdatedBy() *OauthClientUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OauthClientUpsert) SetGrantTypes

SetGrantTypes sets the "grant_types" field.

func (*OauthClientUpsert) SetLastAuthAt

func (u *OauthClientUpsert) SetLastAuthAt(v time.Time) *OauthClientUpsert

SetLastAuthAt sets the "last_auth_at" field.

func (*OauthClientUpsert) SetName

SetName sets the "name" field.

func (*OauthClientUpsert) SetStatus

SetStatus sets the "status" field.

func (*OauthClientUpsert) SetUpdatedAt

func (u *OauthClientUpsert) SetUpdatedAt(v time.Time) *OauthClientUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OauthClientUpsert) SetUpdatedBy

func (u *OauthClientUpsert) SetUpdatedBy(v int) *OauthClientUpsert

SetUpdatedBy sets the "updated_by" field.

func (*OauthClientUpsert) SetUserID

func (u *OauthClientUpsert) SetUserID(v int) *OauthClientUpsert

SetUserID sets the "user_id" field.

func (*OauthClientUpsert) UpdateGrantTypes

func (u *OauthClientUpsert) UpdateGrantTypes() *OauthClientUpsert

UpdateGrantTypes sets the "grant_types" field to the value that was provided on create.

func (*OauthClientUpsert) UpdateLastAuthAt

func (u *OauthClientUpsert) UpdateLastAuthAt() *OauthClientUpsert

UpdateLastAuthAt sets the "last_auth_at" field to the value that was provided on create.

func (*OauthClientUpsert) UpdateName

func (u *OauthClientUpsert) UpdateName() *OauthClientUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*OauthClientUpsert) UpdateStatus

func (u *OauthClientUpsert) UpdateStatus() *OauthClientUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OauthClientUpsert) UpdateUpdatedAt

func (u *OauthClientUpsert) UpdateUpdatedAt() *OauthClientUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OauthClientUpsert) UpdateUpdatedBy

func (u *OauthClientUpsert) UpdateUpdatedBy() *OauthClientUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OauthClientUpsert) UpdateUserID

func (u *OauthClientUpsert) UpdateUserID() *OauthClientUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OauthClientUpsertBulk

type OauthClientUpsertBulk struct {
	// contains filtered or unexported fields
}

OauthClientUpsertBulk is the builder for "upsert"-ing a bulk of OauthClient nodes.

func (*OauthClientUpsertBulk) AddUpdatedBy

func (u *OauthClientUpsertBulk) AddUpdatedBy(v int) *OauthClientUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*OauthClientUpsertBulk) ClearLastAuthAt

func (u *OauthClientUpsertBulk) ClearLastAuthAt() *OauthClientUpsertBulk

ClearLastAuthAt clears the value of the "last_auth_at" field.

func (*OauthClientUpsertBulk) ClearUpdatedAt

func (u *OauthClientUpsertBulk) ClearUpdatedAt() *OauthClientUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OauthClientUpsertBulk) ClearUpdatedBy

func (u *OauthClientUpsertBulk) ClearUpdatedBy() *OauthClientUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OauthClientUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OauthClientUpsertBulk) Exec

Exec executes the query.

func (*OauthClientUpsertBulk) ExecX

func (u *OauthClientUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OauthClient.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OauthClientUpsertBulk) SetGrantTypes

SetGrantTypes sets the "grant_types" field.

func (*OauthClientUpsertBulk) SetLastAuthAt

SetLastAuthAt sets the "last_auth_at" field.

func (*OauthClientUpsertBulk) SetName

SetName sets the "name" field.

func (*OauthClientUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*OauthClientUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OauthClientUpsertBulk) SetUpdatedBy

func (u *OauthClientUpsertBulk) SetUpdatedBy(v int) *OauthClientUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*OauthClientUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OauthClientUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OauthClientCreateBulk.OnConflict documentation for more info.

func (*OauthClientUpsertBulk) UpdateGrantTypes

func (u *OauthClientUpsertBulk) UpdateGrantTypes() *OauthClientUpsertBulk

UpdateGrantTypes sets the "grant_types" field to the value that was provided on create.

func (*OauthClientUpsertBulk) UpdateLastAuthAt

func (u *OauthClientUpsertBulk) UpdateLastAuthAt() *OauthClientUpsertBulk

UpdateLastAuthAt sets the "last_auth_at" field to the value that was provided on create.

func (*OauthClientUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*OauthClientUpsertBulk) UpdateNewValues

func (u *OauthClientUpsertBulk) UpdateNewValues() *OauthClientUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OauthClient.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthclient.FieldID)
		}),
	).
	Exec(ctx)

func (*OauthClientUpsertBulk) UpdateStatus

func (u *OauthClientUpsertBulk) UpdateStatus() *OauthClientUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OauthClientUpsertBulk) UpdateUpdatedAt

func (u *OauthClientUpsertBulk) UpdateUpdatedAt() *OauthClientUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OauthClientUpsertBulk) UpdateUpdatedBy

func (u *OauthClientUpsertBulk) UpdateUpdatedBy() *OauthClientUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OauthClientUpsertBulk) UpdateUserID

func (u *OauthClientUpsertBulk) UpdateUserID() *OauthClientUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OauthClientUpsertOne

type OauthClientUpsertOne struct {
	// contains filtered or unexported fields
}

OauthClientUpsertOne is the builder for "upsert"-ing

one OauthClient node.

func (*OauthClientUpsertOne) AddUpdatedBy

func (u *OauthClientUpsertOne) AddUpdatedBy(v int) *OauthClientUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*OauthClientUpsertOne) ClearLastAuthAt

func (u *OauthClientUpsertOne) ClearLastAuthAt() *OauthClientUpsertOne

ClearLastAuthAt clears the value of the "last_auth_at" field.

func (*OauthClientUpsertOne) ClearUpdatedAt

func (u *OauthClientUpsertOne) ClearUpdatedAt() *OauthClientUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OauthClientUpsertOne) ClearUpdatedBy

func (u *OauthClientUpsertOne) ClearUpdatedBy() *OauthClientUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OauthClientUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OauthClientUpsertOne) Exec

Exec executes the query.

func (*OauthClientUpsertOne) ExecX

func (u *OauthClientUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientUpsertOne) ID

func (u *OauthClientUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OauthClientUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OauthClientUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OauthClient.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OauthClientUpsertOne) SetGrantTypes

SetGrantTypes sets the "grant_types" field.

func (*OauthClientUpsertOne) SetLastAuthAt

func (u *OauthClientUpsertOne) SetLastAuthAt(v time.Time) *OauthClientUpsertOne

SetLastAuthAt sets the "last_auth_at" field.

func (*OauthClientUpsertOne) SetName

SetName sets the "name" field.

func (*OauthClientUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*OauthClientUpsertOne) SetUpdatedAt

func (u *OauthClientUpsertOne) SetUpdatedAt(v time.Time) *OauthClientUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OauthClientUpsertOne) SetUpdatedBy

func (u *OauthClientUpsertOne) SetUpdatedBy(v int) *OauthClientUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*OauthClientUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OauthClientUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OauthClientCreate.OnConflict documentation for more info.

func (*OauthClientUpsertOne) UpdateGrantTypes

func (u *OauthClientUpsertOne) UpdateGrantTypes() *OauthClientUpsertOne

UpdateGrantTypes sets the "grant_types" field to the value that was provided on create.

func (*OauthClientUpsertOne) UpdateLastAuthAt

func (u *OauthClientUpsertOne) UpdateLastAuthAt() *OauthClientUpsertOne

UpdateLastAuthAt sets the "last_auth_at" field to the value that was provided on create.

func (*OauthClientUpsertOne) UpdateName

func (u *OauthClientUpsertOne) UpdateName() *OauthClientUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*OauthClientUpsertOne) UpdateNewValues

func (u *OauthClientUpsertOne) UpdateNewValues() *OauthClientUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OauthClient.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(oauthclient.FieldID)
		}),
	).
	Exec(ctx)

func (*OauthClientUpsertOne) UpdateStatus

func (u *OauthClientUpsertOne) UpdateStatus() *OauthClientUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OauthClientUpsertOne) UpdateUpdatedAt

func (u *OauthClientUpsertOne) UpdateUpdatedAt() *OauthClientUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OauthClientUpsertOne) UpdateUpdatedBy

func (u *OauthClientUpsertOne) UpdateUpdatedBy() *OauthClientUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OauthClientUpsertOne) UpdateUserID

func (u *OauthClientUpsertOne) UpdateUserID() *OauthClientUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OauthClientWhereInput

type OauthClientWhereInput struct {
	Predicates []predicate.OauthClient  `json:"-"`
	Not        *OauthClientWhereInput   `json:"not,omitempty"`
	Or         []*OauthClientWhereInput `json:"or,omitempty"`
	And        []*OauthClientWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "grant_types" field predicates.
	GrantTypes      *oauthclient.GrantTypes  `json:"grantTypes,omitempty"`
	GrantTypesNEQ   *oauthclient.GrantTypes  `json:"grantTypesNEQ,omitempty"`
	GrantTypesIn    []oauthclient.GrantTypes `json:"grantTypesIn,omitempty"`
	GrantTypesNotIn []oauthclient.GrantTypes `json:"grantTypesNotIn,omitempty"`

	// "user_id" field predicates.
	UserID      *int  `json:"userID,omitempty"`
	UserIDNEQ   *int  `json:"userIDNEQ,omitempty"`
	UserIDIn    []int `json:"userIDIn,omitempty"`
	UserIDNotIn []int `json:"userIDNotIn,omitempty"`

	// "status" field predicates.
	Status      *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ   *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn    []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn []typex.SimpleStatus `json:"statusNotIn,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`
}

OauthClientWhereInput represents a where input for filtering OauthClient queries.

func (*OauthClientWhereInput) AddPredicates

func (i *OauthClientWhereInput) AddPredicates(predicates ...predicate.OauthClient)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OauthClientWhereInput) Filter

Filter applies the OauthClientWhereInput filter on the OauthClientQuery builder.

func (*OauthClientWhereInput) P

P returns a predicate for filtering oauthclients. An error is returned if the input is empty or invalid.

type OauthClients

type OauthClients []*OauthClient

OauthClients is a parsable slice of OauthClient.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Org

type Org struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// 管理账户ID,如果设置则该组织将升级为根组织
	OwnerID *int `json:"owner_id,omitempty"`
	// 分类: 根节点,组织节点
	Kind org.Kind `json:"kind,omitempty"`
	// 父级ID,0为根组织.
	ParentID int `json:"parent_id,omitempty"`
	// 默认域名
	Domain string `json:"domain,omitempty"`
	// 系统代码
	Code string `json:"code,omitempty"`
	// 组织名称
	Name string `json:"name,omitempty"`
	// 简介
	Profile string `json:"profile,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 路径编码
	Path string `json:"path,omitempty"`
	// DisplaySort holds the value of the "display_sort" field.
	DisplaySort int32 `json:"display_sort,omitempty"`
	// 国家或地区2字码
	CountryCode string `json:"country_code,omitempty"`
	// 时区
	Timezone string `json:"timezone,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgQuery when eager-loading is set.
	Edges OrgEdges `json:"edges"`
	// contains filtered or unexported fields
}

Org is the model entity for the Org schema.

func (*Org) Apps

func (o *Org) Apps(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AppOrder, where *AppWhereInput,
) (*AppConnection, error)

func (*Org) Children

func (o *Org) Children(ctx context.Context) (result []*Org, err error)

func (*Org) GlobalID

func (o *Org) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Org node.

func (*Org) IsNode

func (*Org) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Org) NamedApps

func (o *Org) NamedApps(name string) ([]*App, error)

NamedApps returns the Apps named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) NamedChildren

func (o *Org) NamedChildren(name string) ([]*Org, error)

NamedChildren returns the Children named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) NamedOrgApp

func (o *Org) NamedOrgApp(name string) ([]*OrgApp, error)

NamedOrgApp returns the OrgApp named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) NamedOrgUser

func (o *Org) NamedOrgUser(name string) ([]*OrgUser, error)

NamedOrgUser returns the OrgUser named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) NamedPermissions

func (o *Org) NamedPermissions(name string) ([]*Permission, error)

NamedPermissions returns the Permissions named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) NamedPolicies

func (o *Org) NamedPolicies(name string) ([]*OrgPolicy, error)

NamedPolicies returns the Policies named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) NamedRolesAndGroups

func (o *Org) NamedRolesAndGroups(name string) ([]*OrgRole, error)

NamedRolesAndGroups returns the RolesAndGroups named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) NamedUsers

func (o *Org) NamedUsers(name string) ([]*User, error)

NamedUsers returns the Users named value or an error if the edge was not loaded in eager-loading with this name.

func (*Org) Owner

func (o *Org) Owner(ctx context.Context) (*User, error)

func (*Org) Parent

func (o *Org) Parent(ctx context.Context) (*Org, error)

func (*Org) Permissions

func (o *Org) Permissions(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *PermissionOrder, where *PermissionWhereInput,
) (*PermissionConnection, error)

func (*Org) Policies

func (o *Org) Policies(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *OrgPolicyOrder, where *OrgPolicyWhereInput,
) (*OrgPolicyConnection, error)

func (*Org) QueryApps

func (o *Org) QueryApps() *AppQuery

QueryApps queries the "apps" edge of the Org entity.

func (*Org) QueryChildren

func (o *Org) QueryChildren() *OrgQuery

QueryChildren queries the "children" edge of the Org entity.

func (*Org) QueryOrgApp

func (o *Org) QueryOrgApp() *OrgAppQuery

QueryOrgApp queries the "org_app" edge of the Org entity.

func (*Org) QueryOrgUser

func (o *Org) QueryOrgUser() *OrgUserQuery

QueryOrgUser queries the "org_user" edge of the Org entity.

func (*Org) QueryOwner

func (o *Org) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the Org entity.

func (*Org) QueryParent

func (o *Org) QueryParent() *OrgQuery

QueryParent queries the "parent" edge of the Org entity.

func (*Org) QueryPermissions

func (o *Org) QueryPermissions() *PermissionQuery

QueryPermissions queries the "permissions" edge of the Org entity.

func (*Org) QueryPolicies

func (o *Org) QueryPolicies() *OrgPolicyQuery

QueryPolicies queries the "policies" edge of the Org entity.

func (*Org) QueryRolesAndGroups

func (o *Org) QueryRolesAndGroups() *OrgRoleQuery

QueryRolesAndGroups queries the "roles_and_groups" edge of the Org entity.

func (*Org) QueryUsers

func (o *Org) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the Org entity.

func (*Org) String

func (o *Org) String() string

String implements the fmt.Stringer.

func (*Org) ToEdge

func (o *Org) ToEdge(order *OrgOrder) *OrgEdge

ToEdge converts Org into OrgEdge.

func (*Org) Unwrap

func (o *Org) Unwrap() *Org

Unwrap unwraps the Org entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Org) Update

func (o *Org) Update() *OrgUpdateOne

Update returns a builder for updating this Org. Note that you need to call Org.Unwrap() before calling this method if this Org was returned from a transaction, and the transaction was committed or rolled back.

func (*Org) Users

func (o *Org) Users(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *UserOrder, where *UserWhereInput,
) (*UserConnection, error)

func (*Org) Value

func (o *Org) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Org. This includes values selected through modifiers, order, etc.

type OrgApp

type OrgApp struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 应用ID
	AppID int `json:"app_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgAppQuery when eager-loading is set.
	Edges OrgAppEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgApp is the model entity for the OrgApp schema.

func (*OrgApp) QueryApp

func (oa *OrgApp) QueryApp() *AppQuery

QueryApp queries the "app" edge of the OrgApp entity.

func (*OrgApp) QueryOrg

func (oa *OrgApp) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the OrgApp entity.

func (*OrgApp) String

func (oa *OrgApp) String() string

String implements the fmt.Stringer.

func (*OrgApp) Unwrap

func (oa *OrgApp) Unwrap() *OrgApp

Unwrap unwraps the OrgApp entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgApp) Update

func (oa *OrgApp) Update() *OrgAppUpdateOne

Update returns a builder for updating this OrgApp. Note that you need to call OrgApp.Unwrap() before calling this method if this OrgApp was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgApp) Value

func (oa *OrgApp) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgApp. This includes values selected through modifiers, order, etc.

type OrgAppClient

type OrgAppClient struct {
	// contains filtered or unexported fields
}

OrgAppClient is a client for the OrgApp schema.

func NewOrgAppClient

func NewOrgAppClient(c config) *OrgAppClient

NewOrgAppClient returns a client for the OrgApp from the given config.

func (*OrgAppClient) Create

func (c *OrgAppClient) Create() *OrgAppCreate

Create returns a builder for creating a OrgApp entity.

func (*OrgAppClient) CreateBulk

func (c *OrgAppClient) CreateBulk(builders ...*OrgAppCreate) *OrgAppCreateBulk

CreateBulk returns a builder for creating a bulk of OrgApp entities.

func (*OrgAppClient) Delete

func (c *OrgAppClient) Delete() *OrgAppDelete

Delete returns a delete builder for OrgApp.

func (*OrgAppClient) DeleteOne

func (c *OrgAppClient) DeleteOne(oa *OrgApp) *OrgAppDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgAppClient) DeleteOneID

func (c *OrgAppClient) DeleteOneID(id int) *OrgAppDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgAppClient) Get

func (c *OrgAppClient) Get(ctx context.Context, id int) (*OrgApp, error)

Get returns a OrgApp entity by its id.

func (*OrgAppClient) GetX

func (c *OrgAppClient) GetX(ctx context.Context, id int) *OrgApp

GetX is like Get, but panics if an error occurs.

func (*OrgAppClient) Hooks

func (c *OrgAppClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgAppClient) Intercept

func (c *OrgAppClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgapp.Intercept(f(g(h())))`.

func (*OrgAppClient) Interceptors

func (c *OrgAppClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgAppClient) MapCreateBulk

func (c *OrgAppClient) MapCreateBulk(slice any, setFunc func(*OrgAppCreate, int)) *OrgAppCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgAppClient) Query

func (c *OrgAppClient) Query() *OrgAppQuery

Query returns a query builder for OrgApp.

func (*OrgAppClient) QueryApp

func (c *OrgAppClient) QueryApp(oa *OrgApp) *AppQuery

QueryApp queries the app edge of a OrgApp.

func (*OrgAppClient) QueryOrg

func (c *OrgAppClient) QueryOrg(oa *OrgApp) *OrgQuery

QueryOrg queries the org edge of a OrgApp.

func (*OrgAppClient) Update

func (c *OrgAppClient) Update() *OrgAppUpdate

Update returns an update builder for OrgApp.

func (*OrgAppClient) UpdateOne

func (c *OrgAppClient) UpdateOne(oa *OrgApp) *OrgAppUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgAppClient) UpdateOneID

func (c *OrgAppClient) UpdateOneID(id int) *OrgAppUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgAppClient) Use

func (c *OrgAppClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgapp.Hooks(f(g(h())))`.

type OrgAppCreate

type OrgAppCreate struct {
	// contains filtered or unexported fields
}

OrgAppCreate is the builder for creating a OrgApp entity.

func (*OrgAppCreate) Exec

func (oac *OrgAppCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppCreate) ExecX

func (oac *OrgAppCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppCreate) Mutation

func (oac *OrgAppCreate) Mutation() *OrgAppMutation

Mutation returns the OrgAppMutation object of the builder.

func (*OrgAppCreate) OnConflict

func (oac *OrgAppCreate) OnConflict(opts ...sql.ConflictOption) *OrgAppUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgApp.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgAppUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgAppCreate) OnConflictColumns

func (oac *OrgAppCreate) OnConflictColumns(columns ...string) *OrgAppUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgAppCreate) Save

func (oac *OrgAppCreate) Save(ctx context.Context) (*OrgApp, error)

Save creates the OrgApp in the database.

func (*OrgAppCreate) SaveX

func (oac *OrgAppCreate) SaveX(ctx context.Context) *OrgApp

SaveX calls Save and panics if Save returns an error.

func (*OrgAppCreate) SetApp

func (oac *OrgAppCreate) SetApp(a *App) *OrgAppCreate

SetApp sets the "app" edge to the App entity.

func (*OrgAppCreate) SetAppID

func (oac *OrgAppCreate) SetAppID(i int) *OrgAppCreate

SetAppID sets the "app_id" field.

func (*OrgAppCreate) SetCreatedAt

func (oac *OrgAppCreate) SetCreatedAt(t time.Time) *OrgAppCreate

SetCreatedAt sets the "created_at" field.

func (*OrgAppCreate) SetCreatedBy

func (oac *OrgAppCreate) SetCreatedBy(i int) *OrgAppCreate

SetCreatedBy sets the "created_by" field.

func (*OrgAppCreate) SetID

func (oac *OrgAppCreate) SetID(i int) *OrgAppCreate

SetID sets the "id" field.

func (*OrgAppCreate) SetNillableCreatedAt

func (oac *OrgAppCreate) SetNillableCreatedAt(t *time.Time) *OrgAppCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgAppCreate) SetNillableUpdatedAt

func (oac *OrgAppCreate) SetNillableUpdatedAt(t *time.Time) *OrgAppCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgAppCreate) SetNillableUpdatedBy

func (oac *OrgAppCreate) SetNillableUpdatedBy(i *int) *OrgAppCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgAppCreate) SetOrg

func (oac *OrgAppCreate) SetOrg(o *Org) *OrgAppCreate

SetOrg sets the "org" edge to the Org entity.

func (*OrgAppCreate) SetOrgID

func (oac *OrgAppCreate) SetOrgID(i int) *OrgAppCreate

SetOrgID sets the "org_id" field.

func (*OrgAppCreate) SetUpdatedAt

func (oac *OrgAppCreate) SetUpdatedAt(t time.Time) *OrgAppCreate

SetUpdatedAt sets the "updated_at" field.

func (*OrgAppCreate) SetUpdatedBy

func (oac *OrgAppCreate) SetUpdatedBy(i int) *OrgAppCreate

SetUpdatedBy sets the "updated_by" field.

type OrgAppCreateBulk

type OrgAppCreateBulk struct {
	// contains filtered or unexported fields
}

OrgAppCreateBulk is the builder for creating many OrgApp entities in bulk.

func (*OrgAppCreateBulk) Exec

func (oacb *OrgAppCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppCreateBulk) ExecX

func (oacb *OrgAppCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppCreateBulk) OnConflict

func (oacb *OrgAppCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgAppUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgApp.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgAppUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgAppCreateBulk) OnConflictColumns

func (oacb *OrgAppCreateBulk) OnConflictColumns(columns ...string) *OrgAppUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgAppCreateBulk) Save

func (oacb *OrgAppCreateBulk) Save(ctx context.Context) ([]*OrgApp, error)

Save creates the OrgApp entities in the database.

func (*OrgAppCreateBulk) SaveX

func (oacb *OrgAppCreateBulk) SaveX(ctx context.Context) []*OrgApp

SaveX is like Save, but panics if an error occurs.

type OrgAppDelete

type OrgAppDelete struct {
	// contains filtered or unexported fields
}

OrgAppDelete is the builder for deleting a OrgApp entity.

func (*OrgAppDelete) Exec

func (oad *OrgAppDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgAppDelete) ExecX

func (oad *OrgAppDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppDelete) Where

func (oad *OrgAppDelete) Where(ps ...predicate.OrgApp) *OrgAppDelete

Where appends a list predicates to the OrgAppDelete builder.

type OrgAppDeleteOne

type OrgAppDeleteOne struct {
	// contains filtered or unexported fields
}

OrgAppDeleteOne is the builder for deleting a single OrgApp entity.

func (*OrgAppDeleteOne) Exec

func (oado *OrgAppDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgAppDeleteOne) ExecX

func (oado *OrgAppDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppDeleteOne) Where

func (oado *OrgAppDeleteOne) Where(ps ...predicate.OrgApp) *OrgAppDeleteOne

Where appends a list predicates to the OrgAppDelete builder.

type OrgAppEdges

type OrgAppEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// contains filtered or unexported fields
}

OrgAppEdges holds the relations/edges for other nodes in the graph.

func (OrgAppEdges) AppOrErr

func (e OrgAppEdges) AppOrErr() (*App, error)

AppOrErr returns the App value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgAppEdges) OrgOrErr

func (e OrgAppEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OrgAppGroupBy

type OrgAppGroupBy struct {
	// contains filtered or unexported fields
}

OrgAppGroupBy is the group-by builder for OrgApp entities.

func (*OrgAppGroupBy) Aggregate

func (oagb *OrgAppGroupBy) Aggregate(fns ...AggregateFunc) *OrgAppGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgAppGroupBy) Bool

func (s *OrgAppGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) BoolX

func (s *OrgAppGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgAppGroupBy) Bools

func (s *OrgAppGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) BoolsX

func (s *OrgAppGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgAppGroupBy) Float64

func (s *OrgAppGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) Float64X

func (s *OrgAppGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgAppGroupBy) Float64s

func (s *OrgAppGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) Float64sX

func (s *OrgAppGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgAppGroupBy) Int

func (s *OrgAppGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) IntX

func (s *OrgAppGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgAppGroupBy) Ints

func (s *OrgAppGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) IntsX

func (s *OrgAppGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgAppGroupBy) Scan

func (oagb *OrgAppGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgAppGroupBy) ScanX

func (s *OrgAppGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgAppGroupBy) String

func (s *OrgAppGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) StringX

func (s *OrgAppGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgAppGroupBy) Strings

func (s *OrgAppGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgAppGroupBy) StringsX

func (s *OrgAppGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgAppMutation

type OrgAppMutation struct {
	// contains filtered or unexported fields
}

OrgAppMutation represents an operation that mutates the OrgApp nodes in the graph.

func (*OrgAppMutation) AddCreatedBy

func (m *OrgAppMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OrgAppMutation) AddField

func (m *OrgAppMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgAppMutation) AddUpdatedBy

func (m *OrgAppMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgAppMutation) AddedCreatedBy

func (m *OrgAppMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OrgAppMutation) AddedEdges

func (m *OrgAppMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgAppMutation) AddedField

func (m *OrgAppMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgAppMutation) AddedFields

func (m *OrgAppMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgAppMutation) AddedIDs

func (m *OrgAppMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgAppMutation) AddedUpdatedBy

func (m *OrgAppMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OrgAppMutation) AppCleared

func (m *OrgAppMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

func (*OrgAppMutation) AppID

func (m *OrgAppMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*OrgAppMutation) AppIDs

func (m *OrgAppMutation) AppIDs() (ids []int)

AppIDs returns the "app" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppID instead. It exists only for internal usage by the builders.

func (*OrgAppMutation) ClearApp

func (m *OrgAppMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*OrgAppMutation) ClearEdge

func (m *OrgAppMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgAppMutation) ClearField

func (m *OrgAppMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgAppMutation) ClearOrg

func (m *OrgAppMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*OrgAppMutation) ClearUpdatedAt

func (m *OrgAppMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgAppMutation) ClearUpdatedBy

func (m *OrgAppMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgAppMutation) ClearedEdges

func (m *OrgAppMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgAppMutation) ClearedFields

func (m *OrgAppMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgAppMutation) Client

func (m OrgAppMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgAppMutation) CreatedAt

func (m *OrgAppMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgAppMutation) CreatedBy

func (m *OrgAppMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OrgAppMutation) EdgeCleared

func (m *OrgAppMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgAppMutation) Field

func (m *OrgAppMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgAppMutation) FieldCleared

func (m *OrgAppMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgAppMutation) Fields

func (m *OrgAppMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgAppMutation) ID

func (m *OrgAppMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgAppMutation) IDs

func (m *OrgAppMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgAppMutation) OldAppID

func (m *OrgAppMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) OldCreatedAt

func (m *OrgAppMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) OldCreatedBy

func (m *OrgAppMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) OldField

func (m *OrgAppMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgAppMutation) OldOrgID

func (m *OrgAppMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) OldUpdatedAt

func (m *OrgAppMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) OldUpdatedBy

func (m *OrgAppMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the OrgApp entity. If the OrgApp object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgAppMutation) Op

func (m *OrgAppMutation) Op() Op

Op returns the operation name.

func (*OrgAppMutation) OrgCleared

func (m *OrgAppMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*OrgAppMutation) OrgID

func (m *OrgAppMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgAppMutation) OrgIDs

func (m *OrgAppMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*OrgAppMutation) RemovedEdges

func (m *OrgAppMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgAppMutation) RemovedIDs

func (m *OrgAppMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgAppMutation) ResetApp

func (m *OrgAppMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*OrgAppMutation) ResetAppID

func (m *OrgAppMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OrgAppMutation) ResetCreatedAt

func (m *OrgAppMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgAppMutation) ResetCreatedBy

func (m *OrgAppMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OrgAppMutation) ResetEdge

func (m *OrgAppMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgAppMutation) ResetField

func (m *OrgAppMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgAppMutation) ResetOrg

func (m *OrgAppMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*OrgAppMutation) ResetOrgID

func (m *OrgAppMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgAppMutation) ResetUpdatedAt

func (m *OrgAppMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrgAppMutation) ResetUpdatedBy

func (m *OrgAppMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OrgAppMutation) SetAppID

func (m *OrgAppMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*OrgAppMutation) SetCreatedAt

func (m *OrgAppMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgAppMutation) SetCreatedBy

func (m *OrgAppMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OrgAppMutation) SetField

func (m *OrgAppMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgAppMutation) SetID

func (m *OrgAppMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgApp entities.

func (*OrgAppMutation) SetOp

func (m *OrgAppMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgAppMutation) SetOrgID

func (m *OrgAppMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgAppMutation) SetUpdatedAt

func (m *OrgAppMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrgAppMutation) SetUpdatedBy

func (m *OrgAppMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (OrgAppMutation) Tx

func (m OrgAppMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgAppMutation) Type

func (m *OrgAppMutation) Type() string

Type returns the node type of this mutation (OrgApp).

func (*OrgAppMutation) UpdatedAt

func (m *OrgAppMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrgAppMutation) UpdatedAtCleared

func (m *OrgAppMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OrgAppMutation) UpdatedBy

func (m *OrgAppMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OrgAppMutation) UpdatedByCleared

func (m *OrgAppMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OrgAppMutation) Where

func (m *OrgAppMutation) Where(ps ...predicate.OrgApp)

Where appends a list predicates to the OrgAppMutation builder.

func (*OrgAppMutation) WhereP

func (m *OrgAppMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgAppMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgAppQuery

type OrgAppQuery struct {
	// contains filtered or unexported fields
}

OrgAppQuery is the builder for querying OrgApp entities.

func (*OrgAppQuery) Aggregate

func (oaq *OrgAppQuery) Aggregate(fns ...AggregateFunc) *OrgAppSelect

Aggregate returns a OrgAppSelect configured with the given aggregations.

func (*OrgAppQuery) All

func (oaq *OrgAppQuery) All(ctx context.Context) ([]*OrgApp, error)

All executes the query and returns a list of OrgApps.

func (*OrgAppQuery) AllX

func (oaq *OrgAppQuery) AllX(ctx context.Context) []*OrgApp

AllX is like All, but panics if an error occurs.

func (*OrgAppQuery) Clone

func (oaq *OrgAppQuery) Clone() *OrgAppQuery

Clone returns a duplicate of the OrgAppQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgAppQuery) Count

func (oaq *OrgAppQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgAppQuery) CountX

func (oaq *OrgAppQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgAppQuery) Exist

func (oaq *OrgAppQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgAppQuery) ExistX

func (oaq *OrgAppQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgAppQuery) First

func (oaq *OrgAppQuery) First(ctx context.Context) (*OrgApp, error)

First returns the first OrgApp entity from the query. Returns a *NotFoundError when no OrgApp was found.

func (*OrgAppQuery) FirstID

func (oaq *OrgAppQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgApp ID from the query. Returns a *NotFoundError when no OrgApp ID was found.

func (*OrgAppQuery) FirstIDX

func (oaq *OrgAppQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgAppQuery) FirstX

func (oaq *OrgAppQuery) FirstX(ctx context.Context) *OrgApp

FirstX is like First, but panics if an error occurs.

func (*OrgAppQuery) GroupBy

func (oaq *OrgAppQuery) GroupBy(field string, fields ...string) *OrgAppGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgApp.Query().
	GroupBy(orgapp.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgAppQuery) IDs

func (oaq *OrgAppQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgApp IDs.

func (*OrgAppQuery) IDsX

func (oaq *OrgAppQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgAppQuery) Limit

func (oaq *OrgAppQuery) Limit(limit int) *OrgAppQuery

Limit the number of records to be returned by this query.

func (*OrgAppQuery) Offset

func (oaq *OrgAppQuery) Offset(offset int) *OrgAppQuery

Offset to start from.

func (*OrgAppQuery) Only

func (oaq *OrgAppQuery) Only(ctx context.Context) (*OrgApp, error)

Only returns a single OrgApp entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgApp entity is found. Returns a *NotFoundError when no OrgApp entities are found.

func (*OrgAppQuery) OnlyID

func (oaq *OrgAppQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgApp ID in the query. Returns a *NotSingularError when more than one OrgApp ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgAppQuery) OnlyIDX

func (oaq *OrgAppQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgAppQuery) OnlyX

func (oaq *OrgAppQuery) OnlyX(ctx context.Context) *OrgApp

OnlyX is like Only, but panics if an error occurs.

func (*OrgAppQuery) Order

func (oaq *OrgAppQuery) Order(o ...orgapp.OrderOption) *OrgAppQuery

Order specifies how the records should be ordered.

func (*OrgAppQuery) QueryApp

func (oaq *OrgAppQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*OrgAppQuery) QueryOrg

func (oaq *OrgAppQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*OrgAppQuery) Select

func (oaq *OrgAppQuery) Select(fields ...string) *OrgAppSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.OrgApp.Query().
	Select(orgapp.FieldCreatedBy).
	Scan(ctx, &v)

func (*OrgAppQuery) Unique

func (oaq *OrgAppQuery) Unique(unique bool) *OrgAppQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgAppQuery) Where

func (oaq *OrgAppQuery) Where(ps ...predicate.OrgApp) *OrgAppQuery

Where adds a new predicate for the OrgAppQuery builder.

func (*OrgAppQuery) WithApp

func (oaq *OrgAppQuery) WithApp(opts ...func(*AppQuery)) *OrgAppQuery

WithApp tells the query-builder to eager-load the nodes that are connected to the "app" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgAppQuery) WithOrg

func (oaq *OrgAppQuery) WithOrg(opts ...func(*OrgQuery)) *OrgAppQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

type OrgAppSelect

type OrgAppSelect struct {
	*OrgAppQuery
	// contains filtered or unexported fields
}

OrgAppSelect is the builder for selecting fields of OrgApp entities.

func (*OrgAppSelect) Aggregate

func (oas *OrgAppSelect) Aggregate(fns ...AggregateFunc) *OrgAppSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgAppSelect) Bool

func (s *OrgAppSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) BoolX

func (s *OrgAppSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgAppSelect) Bools

func (s *OrgAppSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) BoolsX

func (s *OrgAppSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgAppSelect) Float64

func (s *OrgAppSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) Float64X

func (s *OrgAppSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgAppSelect) Float64s

func (s *OrgAppSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) Float64sX

func (s *OrgAppSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgAppSelect) Int

func (s *OrgAppSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) IntX

func (s *OrgAppSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgAppSelect) Ints

func (s *OrgAppSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) IntsX

func (s *OrgAppSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgAppSelect) Scan

func (oas *OrgAppSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgAppSelect) ScanX

func (s *OrgAppSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgAppSelect) String

func (s *OrgAppSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) StringX

func (s *OrgAppSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgAppSelect) Strings

func (s *OrgAppSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgAppSelect) StringsX

func (s *OrgAppSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgAppUpdate

type OrgAppUpdate struct {
	// contains filtered or unexported fields
}

OrgAppUpdate is the builder for updating OrgApp entities.

func (*OrgAppUpdate) AddUpdatedBy

func (oau *OrgAppUpdate) AddUpdatedBy(i int) *OrgAppUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgAppUpdate) ClearApp

func (oau *OrgAppUpdate) ClearApp() *OrgAppUpdate

ClearApp clears the "app" edge to the App entity.

func (*OrgAppUpdate) ClearOrg

func (oau *OrgAppUpdate) ClearOrg() *OrgAppUpdate

ClearOrg clears the "org" edge to the Org entity.

func (*OrgAppUpdate) ClearUpdatedAt

func (oau *OrgAppUpdate) ClearUpdatedAt() *OrgAppUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgAppUpdate) ClearUpdatedBy

func (oau *OrgAppUpdate) ClearUpdatedBy() *OrgAppUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgAppUpdate) Exec

func (oau *OrgAppUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppUpdate) ExecX

func (oau *OrgAppUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpdate) Mutation

func (oau *OrgAppUpdate) Mutation() *OrgAppMutation

Mutation returns the OrgAppMutation object of the builder.

func (*OrgAppUpdate) Save

func (oau *OrgAppUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgAppUpdate) SaveX

func (oau *OrgAppUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgAppUpdate) SetApp

func (oau *OrgAppUpdate) SetApp(a *App) *OrgAppUpdate

SetApp sets the "app" edge to the App entity.

func (*OrgAppUpdate) SetAppID

func (oau *OrgAppUpdate) SetAppID(i int) *OrgAppUpdate

SetAppID sets the "app_id" field.

func (*OrgAppUpdate) SetNillableUpdatedAt

func (oau *OrgAppUpdate) SetNillableUpdatedAt(t *time.Time) *OrgAppUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgAppUpdate) SetNillableUpdatedBy

func (oau *OrgAppUpdate) SetNillableUpdatedBy(i *int) *OrgAppUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgAppUpdate) SetOrg

func (oau *OrgAppUpdate) SetOrg(o *Org) *OrgAppUpdate

SetOrg sets the "org" edge to the Org entity.

func (*OrgAppUpdate) SetOrgID

func (oau *OrgAppUpdate) SetOrgID(i int) *OrgAppUpdate

SetOrgID sets the "org_id" field.

func (*OrgAppUpdate) SetUpdatedAt

func (oau *OrgAppUpdate) SetUpdatedAt(t time.Time) *OrgAppUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OrgAppUpdate) SetUpdatedBy

func (oau *OrgAppUpdate) SetUpdatedBy(i int) *OrgAppUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OrgAppUpdate) Where

func (oau *OrgAppUpdate) Where(ps ...predicate.OrgApp) *OrgAppUpdate

Where appends a list predicates to the OrgAppUpdate builder.

type OrgAppUpdateOne

type OrgAppUpdateOne struct {
	// contains filtered or unexported fields
}

OrgAppUpdateOne is the builder for updating a single OrgApp entity.

func (*OrgAppUpdateOne) AddUpdatedBy

func (oauo *OrgAppUpdateOne) AddUpdatedBy(i int) *OrgAppUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgAppUpdateOne) ClearApp

func (oauo *OrgAppUpdateOne) ClearApp() *OrgAppUpdateOne

ClearApp clears the "app" edge to the App entity.

func (*OrgAppUpdateOne) ClearOrg

func (oauo *OrgAppUpdateOne) ClearOrg() *OrgAppUpdateOne

ClearOrg clears the "org" edge to the Org entity.

func (*OrgAppUpdateOne) ClearUpdatedAt

func (oauo *OrgAppUpdateOne) ClearUpdatedAt() *OrgAppUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgAppUpdateOne) ClearUpdatedBy

func (oauo *OrgAppUpdateOne) ClearUpdatedBy() *OrgAppUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgAppUpdateOne) Exec

func (oauo *OrgAppUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgAppUpdateOne) ExecX

func (oauo *OrgAppUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpdateOne) Mutation

func (oauo *OrgAppUpdateOne) Mutation() *OrgAppMutation

Mutation returns the OrgAppMutation object of the builder.

func (*OrgAppUpdateOne) Save

func (oauo *OrgAppUpdateOne) Save(ctx context.Context) (*OrgApp, error)

Save executes the query and returns the updated OrgApp entity.

func (*OrgAppUpdateOne) SaveX

func (oauo *OrgAppUpdateOne) SaveX(ctx context.Context) *OrgApp

SaveX is like Save, but panics if an error occurs.

func (*OrgAppUpdateOne) Select

func (oauo *OrgAppUpdateOne) Select(field string, fields ...string) *OrgAppUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgAppUpdateOne) SetApp

func (oauo *OrgAppUpdateOne) SetApp(a *App) *OrgAppUpdateOne

SetApp sets the "app" edge to the App entity.

func (*OrgAppUpdateOne) SetAppID

func (oauo *OrgAppUpdateOne) SetAppID(i int) *OrgAppUpdateOne

SetAppID sets the "app_id" field.

func (*OrgAppUpdateOne) SetNillableUpdatedAt

func (oauo *OrgAppUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrgAppUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgAppUpdateOne) SetNillableUpdatedBy

func (oauo *OrgAppUpdateOne) SetNillableUpdatedBy(i *int) *OrgAppUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgAppUpdateOne) SetOrg

func (oauo *OrgAppUpdateOne) SetOrg(o *Org) *OrgAppUpdateOne

SetOrg sets the "org" edge to the Org entity.

func (*OrgAppUpdateOne) SetOrgID

func (oauo *OrgAppUpdateOne) SetOrgID(i int) *OrgAppUpdateOne

SetOrgID sets the "org_id" field.

func (*OrgAppUpdateOne) SetUpdatedAt

func (oauo *OrgAppUpdateOne) SetUpdatedAt(t time.Time) *OrgAppUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgAppUpdateOne) SetUpdatedBy

func (oauo *OrgAppUpdateOne) SetUpdatedBy(i int) *OrgAppUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgAppUpdateOne) Where

func (oauo *OrgAppUpdateOne) Where(ps ...predicate.OrgApp) *OrgAppUpdateOne

Where appends a list predicates to the OrgAppUpdate builder.

type OrgAppUpsert

type OrgAppUpsert struct {
	*sql.UpdateSet
}

OrgAppUpsert is the "OnConflict" setter.

func (*OrgAppUpsert) AddUpdatedBy

func (u *OrgAppUpsert) AddUpdatedBy(v int) *OrgAppUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgAppUpsert) ClearUpdatedAt

func (u *OrgAppUpsert) ClearUpdatedAt() *OrgAppUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgAppUpsert) ClearUpdatedBy

func (u *OrgAppUpsert) ClearUpdatedBy() *OrgAppUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgAppUpsert) SetAppID

func (u *OrgAppUpsert) SetAppID(v int) *OrgAppUpsert

SetAppID sets the "app_id" field.

func (*OrgAppUpsert) SetOrgID

func (u *OrgAppUpsert) SetOrgID(v int) *OrgAppUpsert

SetOrgID sets the "org_id" field.

func (*OrgAppUpsert) SetUpdatedAt

func (u *OrgAppUpsert) SetUpdatedAt(v time.Time) *OrgAppUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OrgAppUpsert) SetUpdatedBy

func (u *OrgAppUpsert) SetUpdatedBy(v int) *OrgAppUpsert

SetUpdatedBy sets the "updated_by" field.

func (*OrgAppUpsert) UpdateAppID

func (u *OrgAppUpsert) UpdateAppID() *OrgAppUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgAppUpsert) UpdateOrgID

func (u *OrgAppUpsert) UpdateOrgID() *OrgAppUpsert

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgAppUpsert) UpdateUpdatedAt

func (u *OrgAppUpsert) UpdateUpdatedAt() *OrgAppUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgAppUpsert) UpdateUpdatedBy

func (u *OrgAppUpsert) UpdateUpdatedBy() *OrgAppUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgAppUpsertBulk

type OrgAppUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgAppUpsertBulk is the builder for "upsert"-ing a bulk of OrgApp nodes.

func (*OrgAppUpsertBulk) AddUpdatedBy

func (u *OrgAppUpsertBulk) AddUpdatedBy(v int) *OrgAppUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgAppUpsertBulk) ClearUpdatedAt

func (u *OrgAppUpsertBulk) ClearUpdatedAt() *OrgAppUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgAppUpsertBulk) ClearUpdatedBy

func (u *OrgAppUpsertBulk) ClearUpdatedBy() *OrgAppUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgAppUpsertBulk) DoNothing

func (u *OrgAppUpsertBulk) DoNothing() *OrgAppUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgAppUpsertBulk) Exec

func (u *OrgAppUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppUpsertBulk) ExecX

func (u *OrgAppUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpsertBulk) Ignore

func (u *OrgAppUpsertBulk) Ignore() *OrgAppUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgAppUpsertBulk) SetAppID

func (u *OrgAppUpsertBulk) SetAppID(v int) *OrgAppUpsertBulk

SetAppID sets the "app_id" field.

func (*OrgAppUpsertBulk) SetOrgID

func (u *OrgAppUpsertBulk) SetOrgID(v int) *OrgAppUpsertBulk

SetOrgID sets the "org_id" field.

func (*OrgAppUpsertBulk) SetUpdatedAt

func (u *OrgAppUpsertBulk) SetUpdatedAt(v time.Time) *OrgAppUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*OrgAppUpsertBulk) SetUpdatedBy

func (u *OrgAppUpsertBulk) SetUpdatedBy(v int) *OrgAppUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*OrgAppUpsertBulk) Update

func (u *OrgAppUpsertBulk) Update(set func(*OrgAppUpsert)) *OrgAppUpsertBulk

Update allows overriding fields `UPDATE` values. See the OrgAppCreateBulk.OnConflict documentation for more info.

func (*OrgAppUpsertBulk) UpdateAppID

func (u *OrgAppUpsertBulk) UpdateAppID() *OrgAppUpsertBulk

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgAppUpsertBulk) UpdateNewValues

func (u *OrgAppUpsertBulk) UpdateNewValues() *OrgAppUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgapp.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgAppUpsertBulk) UpdateOrgID

func (u *OrgAppUpsertBulk) UpdateOrgID() *OrgAppUpsertBulk

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgAppUpsertBulk) UpdateUpdatedAt

func (u *OrgAppUpsertBulk) UpdateUpdatedAt() *OrgAppUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgAppUpsertBulk) UpdateUpdatedBy

func (u *OrgAppUpsertBulk) UpdateUpdatedBy() *OrgAppUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgAppUpsertOne

type OrgAppUpsertOne struct {
	// contains filtered or unexported fields
}

OrgAppUpsertOne is the builder for "upsert"-ing

one OrgApp node.

func (*OrgAppUpsertOne) AddUpdatedBy

func (u *OrgAppUpsertOne) AddUpdatedBy(v int) *OrgAppUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgAppUpsertOne) ClearUpdatedAt

func (u *OrgAppUpsertOne) ClearUpdatedAt() *OrgAppUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgAppUpsertOne) ClearUpdatedBy

func (u *OrgAppUpsertOne) ClearUpdatedBy() *OrgAppUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgAppUpsertOne) DoNothing

func (u *OrgAppUpsertOne) DoNothing() *OrgAppUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgAppUpsertOne) Exec

func (u *OrgAppUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgAppUpsertOne) ExecX

func (u *OrgAppUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppUpsertOne) ID

func (u *OrgAppUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgAppUpsertOne) IDX

func (u *OrgAppUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgAppUpsertOne) Ignore

func (u *OrgAppUpsertOne) Ignore() *OrgAppUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgApp.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgAppUpsertOne) SetAppID

func (u *OrgAppUpsertOne) SetAppID(v int) *OrgAppUpsertOne

SetAppID sets the "app_id" field.

func (*OrgAppUpsertOne) SetOrgID

func (u *OrgAppUpsertOne) SetOrgID(v int) *OrgAppUpsertOne

SetOrgID sets the "org_id" field.

func (*OrgAppUpsertOne) SetUpdatedAt

func (u *OrgAppUpsertOne) SetUpdatedAt(v time.Time) *OrgAppUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgAppUpsertOne) SetUpdatedBy

func (u *OrgAppUpsertOne) SetUpdatedBy(v int) *OrgAppUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgAppUpsertOne) Update

func (u *OrgAppUpsertOne) Update(set func(*OrgAppUpsert)) *OrgAppUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgAppCreate.OnConflict documentation for more info.

func (*OrgAppUpsertOne) UpdateAppID

func (u *OrgAppUpsertOne) UpdateAppID() *OrgAppUpsertOne

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgAppUpsertOne) UpdateNewValues

func (u *OrgAppUpsertOne) UpdateNewValues() *OrgAppUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgApp.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgapp.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgAppUpsertOne) UpdateOrgID

func (u *OrgAppUpsertOne) UpdateOrgID() *OrgAppUpsertOne

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgAppUpsertOne) UpdateUpdatedAt

func (u *OrgAppUpsertOne) UpdateUpdatedAt() *OrgAppUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgAppUpsertOne) UpdateUpdatedBy

func (u *OrgAppUpsertOne) UpdateUpdatedBy() *OrgAppUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgApps

type OrgApps []*OrgApp

OrgApps is a parsable slice of OrgApp.

type OrgClient

type OrgClient struct {
	// contains filtered or unexported fields
}

OrgClient is a client for the Org schema.

func NewOrgClient

func NewOrgClient(c config) *OrgClient

NewOrgClient returns a client for the Org from the given config.

func (*OrgClient) Create

func (c *OrgClient) Create() *OrgCreate

Create returns a builder for creating a Org entity.

func (*OrgClient) CreateBulk

func (c *OrgClient) CreateBulk(builders ...*OrgCreate) *OrgCreateBulk

CreateBulk returns a builder for creating a bulk of Org entities.

func (*OrgClient) Delete

func (c *OrgClient) Delete() *OrgDelete

Delete returns a delete builder for Org.

func (*OrgClient) DeleteOne

func (c *OrgClient) DeleteOne(o *Org) *OrgDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgClient) DeleteOneID

func (c *OrgClient) DeleteOneID(id int) *OrgDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgClient) Get

func (c *OrgClient) Get(ctx context.Context, id int) (*Org, error)

Get returns a Org entity by its id.

func (*OrgClient) GetX

func (c *OrgClient) GetX(ctx context.Context, id int) *Org

GetX is like Get, but panics if an error occurs.

func (*OrgClient) Hooks

func (c *OrgClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgClient) Intercept

func (c *OrgClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `org.Intercept(f(g(h())))`.

func (*OrgClient) Interceptors

func (c *OrgClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgClient) MapCreateBulk

func (c *OrgClient) MapCreateBulk(slice any, setFunc func(*OrgCreate, int)) *OrgCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgClient) Query

func (c *OrgClient) Query() *OrgQuery

Query returns a query builder for Org.

func (*OrgClient) QueryApps

func (c *OrgClient) QueryApps(o *Org) *AppQuery

QueryApps queries the apps edge of a Org.

func (*OrgClient) QueryChildren

func (c *OrgClient) QueryChildren(o *Org) *OrgQuery

QueryChildren queries the children edge of a Org.

func (*OrgClient) QueryOrgApp

func (c *OrgClient) QueryOrgApp(o *Org) *OrgAppQuery

QueryOrgApp queries the org_app edge of a Org.

func (*OrgClient) QueryOrgUser

func (c *OrgClient) QueryOrgUser(o *Org) *OrgUserQuery

QueryOrgUser queries the org_user edge of a Org.

func (*OrgClient) QueryOwner

func (c *OrgClient) QueryOwner(o *Org) *UserQuery

QueryOwner queries the owner edge of a Org.

func (*OrgClient) QueryParent

func (c *OrgClient) QueryParent(o *Org) *OrgQuery

QueryParent queries the parent edge of a Org.

func (*OrgClient) QueryPermissions

func (c *OrgClient) QueryPermissions(o *Org) *PermissionQuery

QueryPermissions queries the permissions edge of a Org.

func (*OrgClient) QueryPolicies

func (c *OrgClient) QueryPolicies(o *Org) *OrgPolicyQuery

QueryPolicies queries the policies edge of a Org.

func (*OrgClient) QueryRolesAndGroups

func (c *OrgClient) QueryRolesAndGroups(o *Org) *OrgRoleQuery

QueryRolesAndGroups queries the roles_and_groups edge of a Org.

func (*OrgClient) QueryUsers

func (c *OrgClient) QueryUsers(o *Org) *UserQuery

QueryUsers queries the users edge of a Org.

func (*OrgClient) Update

func (c *OrgClient) Update() *OrgUpdate

Update returns an update builder for Org.

func (*OrgClient) UpdateOne

func (c *OrgClient) UpdateOne(o *Org) *OrgUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgClient) UpdateOneID

func (c *OrgClient) UpdateOneID(id int) *OrgUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgClient) Use

func (c *OrgClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `org.Hooks(f(g(h())))`.

type OrgConnection

type OrgConnection struct {
	Edges      []*OrgEdge `json:"edges"`
	PageInfo   PageInfo   `json:"pageInfo"`
	TotalCount int        `json:"totalCount"`
}

OrgConnection is the connection containing edges to Org.

type OrgCreate

type OrgCreate struct {
	// contains filtered or unexported fields
}

OrgCreate is the builder for creating a Org entity.

func (*OrgCreate) AddAppIDs

func (oc *OrgCreate) AddAppIDs(ids ...int) *OrgCreate

AddAppIDs adds the "apps" edge to the App entity by IDs.

func (*OrgCreate) AddApps

func (oc *OrgCreate) AddApps(a ...*App) *OrgCreate

AddApps adds the "apps" edges to the App entity.

func (*OrgCreate) AddChildIDs

func (oc *OrgCreate) AddChildIDs(ids ...int) *OrgCreate

AddChildIDs adds the "children" edge to the Org entity by IDs.

func (*OrgCreate) AddChildren

func (oc *OrgCreate) AddChildren(o ...*Org) *OrgCreate

AddChildren adds the "children" edges to the Org entity.

func (*OrgCreate) AddOrgApp

func (oc *OrgCreate) AddOrgApp(o ...*OrgApp) *OrgCreate

AddOrgApp adds the "org_app" edges to the OrgApp entity.

func (*OrgCreate) AddOrgAppIDs

func (oc *OrgCreate) AddOrgAppIDs(ids ...int) *OrgCreate

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by IDs.

func (*OrgCreate) AddOrgUser

func (oc *OrgCreate) AddOrgUser(o ...*OrgUser) *OrgCreate

AddOrgUser adds the "org_user" edges to the OrgUser entity.

func (*OrgCreate) AddOrgUserIDs

func (oc *OrgCreate) AddOrgUserIDs(ids ...int) *OrgCreate

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by IDs.

func (*OrgCreate) AddPermissionIDs

func (oc *OrgCreate) AddPermissionIDs(ids ...int) *OrgCreate

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*OrgCreate) AddPermissions

func (oc *OrgCreate) AddPermissions(p ...*Permission) *OrgCreate

AddPermissions adds the "permissions" edges to the Permission entity.

func (*OrgCreate) AddPolicies

func (oc *OrgCreate) AddPolicies(o ...*OrgPolicy) *OrgCreate

AddPolicies adds the "policies" edges to the OrgPolicy entity.

func (*OrgCreate) AddPolicyIDs

func (oc *OrgCreate) AddPolicyIDs(ids ...int) *OrgCreate

AddPolicyIDs adds the "policies" edge to the OrgPolicy entity by IDs.

func (*OrgCreate) AddRolesAndGroupIDs

func (oc *OrgCreate) AddRolesAndGroupIDs(ids ...int) *OrgCreate

AddRolesAndGroupIDs adds the "roles_and_groups" edge to the OrgRole entity by IDs.

func (*OrgCreate) AddRolesAndGroups

func (oc *OrgCreate) AddRolesAndGroups(o ...*OrgRole) *OrgCreate

AddRolesAndGroups adds the "roles_and_groups" edges to the OrgRole entity.

func (*OrgCreate) AddUserIDs

func (oc *OrgCreate) AddUserIDs(ids ...int) *OrgCreate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*OrgCreate) AddUsers

func (oc *OrgCreate) AddUsers(u ...*User) *OrgCreate

AddUsers adds the "users" edges to the User entity.

func (*OrgCreate) Exec

func (oc *OrgCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgCreate) ExecX

func (oc *OrgCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgCreate) Mutation

func (oc *OrgCreate) Mutation() *OrgMutation

Mutation returns the OrgMutation object of the builder.

func (*OrgCreate) OnConflict

func (oc *OrgCreate) OnConflict(opts ...sql.ConflictOption) *OrgUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Org.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgCreate) OnConflictColumns

func (oc *OrgCreate) OnConflictColumns(columns ...string) *OrgUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Org.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgCreate) Save

func (oc *OrgCreate) Save(ctx context.Context) (*Org, error)

Save creates the Org in the database.

func (*OrgCreate) SaveX

func (oc *OrgCreate) SaveX(ctx context.Context) *Org

SaveX calls Save and panics if Save returns an error.

func (*OrgCreate) SetCode

func (oc *OrgCreate) SetCode(s string) *OrgCreate

SetCode sets the "code" field.

func (*OrgCreate) SetCountryCode

func (oc *OrgCreate) SetCountryCode(s string) *OrgCreate

SetCountryCode sets the "country_code" field.

func (*OrgCreate) SetCreatedAt

func (oc *OrgCreate) SetCreatedAt(t time.Time) *OrgCreate

SetCreatedAt sets the "created_at" field.

func (*OrgCreate) SetCreatedBy

func (oc *OrgCreate) SetCreatedBy(i int) *OrgCreate

SetCreatedBy sets the "created_by" field.

func (*OrgCreate) SetDeletedAt

func (oc *OrgCreate) SetDeletedAt(t time.Time) *OrgCreate

SetDeletedAt sets the "deleted_at" field.

func (*OrgCreate) SetDisplaySort

func (oc *OrgCreate) SetDisplaySort(i int32) *OrgCreate

SetDisplaySort sets the "display_sort" field.

func (*OrgCreate) SetDomain

func (oc *OrgCreate) SetDomain(s string) *OrgCreate

SetDomain sets the "domain" field.

func (*OrgCreate) SetID

func (oc *OrgCreate) SetID(i int) *OrgCreate

SetID sets the "id" field.

func (*OrgCreate) SetInput

func (c *OrgCreate) SetInput(i CreateOrgInput) *OrgCreate

SetInput applies the change-set in the CreateOrgInput on the OrgCreate builder.

func (*OrgCreate) SetKind

func (oc *OrgCreate) SetKind(o org.Kind) *OrgCreate

SetKind sets the "kind" field.

func (*OrgCreate) SetName

func (oc *OrgCreate) SetName(s string) *OrgCreate

SetName sets the "name" field.

func (*OrgCreate) SetNillableCode

func (oc *OrgCreate) SetNillableCode(s *string) *OrgCreate

SetNillableCode sets the "code" field if the given value is not nil.

func (*OrgCreate) SetNillableCountryCode

func (oc *OrgCreate) SetNillableCountryCode(s *string) *OrgCreate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*OrgCreate) SetNillableCreatedAt

func (oc *OrgCreate) SetNillableCreatedAt(t *time.Time) *OrgCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgCreate) SetNillableDeletedAt

func (oc *OrgCreate) SetNillableDeletedAt(t *time.Time) *OrgCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*OrgCreate) SetNillableDisplaySort

func (oc *OrgCreate) SetNillableDisplaySort(i *int32) *OrgCreate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*OrgCreate) SetNillableDomain

func (oc *OrgCreate) SetNillableDomain(s *string) *OrgCreate

SetNillableDomain sets the "domain" field if the given value is not nil.

func (*OrgCreate) SetNillableID

func (oc *OrgCreate) SetNillableID(i *int) *OrgCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OrgCreate) SetNillableKind

func (oc *OrgCreate) SetNillableKind(o *org.Kind) *OrgCreate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*OrgCreate) SetNillableOwnerID

func (oc *OrgCreate) SetNillableOwnerID(i *int) *OrgCreate

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*OrgCreate) SetNillableParentID

func (oc *OrgCreate) SetNillableParentID(i *int) *OrgCreate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*OrgCreate) SetNillablePath

func (oc *OrgCreate) SetNillablePath(s *string) *OrgCreate

SetNillablePath sets the "path" field if the given value is not nil.

func (*OrgCreate) SetNillableProfile

func (oc *OrgCreate) SetNillableProfile(s *string) *OrgCreate

SetNillableProfile sets the "profile" field if the given value is not nil.

func (*OrgCreate) SetNillableStatus

func (oc *OrgCreate) SetNillableStatus(ts *typex.SimpleStatus) *OrgCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrgCreate) SetNillableTimezone

func (oc *OrgCreate) SetNillableTimezone(s *string) *OrgCreate

SetNillableTimezone sets the "timezone" field if the given value is not nil.

func (*OrgCreate) SetNillableUpdatedAt

func (oc *OrgCreate) SetNillableUpdatedAt(t *time.Time) *OrgCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgCreate) SetNillableUpdatedBy

func (oc *OrgCreate) SetNillableUpdatedBy(i *int) *OrgCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgCreate) SetOwner

func (oc *OrgCreate) SetOwner(u *User) *OrgCreate

SetOwner sets the "owner" edge to the User entity.

func (*OrgCreate) SetOwnerID

func (oc *OrgCreate) SetOwnerID(i int) *OrgCreate

SetOwnerID sets the "owner_id" field.

func (*OrgCreate) SetParent

func (oc *OrgCreate) SetParent(o *Org) *OrgCreate

SetParent sets the "parent" edge to the Org entity.

func (*OrgCreate) SetParentID

func (oc *OrgCreate) SetParentID(i int) *OrgCreate

SetParentID sets the "parent_id" field.

func (*OrgCreate) SetPath

func (oc *OrgCreate) SetPath(s string) *OrgCreate

SetPath sets the "path" field.

func (*OrgCreate) SetProfile

func (oc *OrgCreate) SetProfile(s string) *OrgCreate

SetProfile sets the "profile" field.

func (*OrgCreate) SetStatus

func (oc *OrgCreate) SetStatus(ts typex.SimpleStatus) *OrgCreate

SetStatus sets the "status" field.

func (*OrgCreate) SetTimezone

func (oc *OrgCreate) SetTimezone(s string) *OrgCreate

SetTimezone sets the "timezone" field.

func (*OrgCreate) SetUpdatedAt

func (oc *OrgCreate) SetUpdatedAt(t time.Time) *OrgCreate

SetUpdatedAt sets the "updated_at" field.

func (*OrgCreate) SetUpdatedBy

func (oc *OrgCreate) SetUpdatedBy(i int) *OrgCreate

SetUpdatedBy sets the "updated_by" field.

type OrgCreateBulk

type OrgCreateBulk struct {
	// contains filtered or unexported fields
}

OrgCreateBulk is the builder for creating many Org entities in bulk.

func (*OrgCreateBulk) Exec

func (ocb *OrgCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgCreateBulk) ExecX

func (ocb *OrgCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgCreateBulk) OnConflict

func (ocb *OrgCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Org.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgCreateBulk) OnConflictColumns

func (ocb *OrgCreateBulk) OnConflictColumns(columns ...string) *OrgUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Org.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgCreateBulk) Save

func (ocb *OrgCreateBulk) Save(ctx context.Context) ([]*Org, error)

Save creates the Org entities in the database.

func (*OrgCreateBulk) SaveX

func (ocb *OrgCreateBulk) SaveX(ctx context.Context) []*Org

SaveX is like Save, but panics if an error occurs.

type OrgDelete

type OrgDelete struct {
	// contains filtered or unexported fields
}

OrgDelete is the builder for deleting a Org entity.

func (*OrgDelete) Exec

func (od *OrgDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgDelete) ExecX

func (od *OrgDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgDelete) Where

func (od *OrgDelete) Where(ps ...predicate.Org) *OrgDelete

Where appends a list predicates to the OrgDelete builder.

type OrgDeleteOne

type OrgDeleteOne struct {
	// contains filtered or unexported fields
}

OrgDeleteOne is the builder for deleting a single Org entity.

func (*OrgDeleteOne) Exec

func (odo *OrgDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgDeleteOne) ExecX

func (odo *OrgDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgDeleteOne) Where

func (odo *OrgDeleteOne) Where(ps ...predicate.Org) *OrgDeleteOne

Where appends a list predicates to the OrgDelete builder.

type OrgEdge

type OrgEdge struct {
	Node   *Org   `json:"node"`
	Cursor Cursor `json:"cursor"`
}

OrgEdge is the edge representation of Org.

type OrgEdges

type OrgEdges struct {
	// Parent holds the value of the parent edge.
	Parent *Org `json:"parent,omitempty"`
	// Children holds the value of the children edge.
	Children []*Org `json:"children,omitempty"`
	// 管理账户
	Owner *User `json:"owner,omitempty"`
	// 组织下用户
	Users []*User `json:"users,omitempty"`
	// 组织下角色及用户组.
	RolesAndGroups []*OrgRole `json:"roles_and_groups,omitempty"`
	// 组织授权信息
	Permissions []*Permission `json:"permissions,omitempty"`
	// 组织下权限策略
	Policies []*OrgPolicy `json:"policies,omitempty"`
	// 组织下应用
	Apps []*App `json:"apps,omitempty"`
	// OrgUser holds the value of the org_user edge.
	OrgUser []*OrgUser `json:"org_user,omitempty"`
	// OrgApp holds the value of the org_app edge.
	OrgApp []*OrgApp `json:"org_app,omitempty"`
	// contains filtered or unexported fields
}

OrgEdges holds the relations/edges for other nodes in the graph.

func (OrgEdges) AppsOrErr

func (e OrgEdges) AppsOrErr() ([]*App, error)

AppsOrErr returns the Apps value or an error if the edge was not loaded in eager-loading.

func (OrgEdges) ChildrenOrErr

func (e OrgEdges) ChildrenOrErr() ([]*Org, error)

ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.

func (OrgEdges) OrgAppOrErr

func (e OrgEdges) OrgAppOrErr() ([]*OrgApp, error)

OrgAppOrErr returns the OrgApp value or an error if the edge was not loaded in eager-loading.

func (OrgEdges) OrgUserOrErr

func (e OrgEdges) OrgUserOrErr() ([]*OrgUser, error)

OrgUserOrErr returns the OrgUser value or an error if the edge was not loaded in eager-loading.

func (OrgEdges) OwnerOrErr

func (e OrgEdges) OwnerOrErr() (*User, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgEdges) ParentOrErr

func (e OrgEdges) ParentOrErr() (*Org, error)

ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgEdges) PermissionsOrErr

func (e OrgEdges) PermissionsOrErr() ([]*Permission, error)

PermissionsOrErr returns the Permissions value or an error if the edge was not loaded in eager-loading.

func (OrgEdges) PoliciesOrErr

func (e OrgEdges) PoliciesOrErr() ([]*OrgPolicy, error)

PoliciesOrErr returns the Policies value or an error if the edge was not loaded in eager-loading.

func (OrgEdges) RolesAndGroupsOrErr

func (e OrgEdges) RolesAndGroupsOrErr() ([]*OrgRole, error)

RolesAndGroupsOrErr returns the RolesAndGroups value or an error if the edge was not loaded in eager-loading.

func (OrgEdges) UsersOrErr

func (e OrgEdges) UsersOrErr() ([]*User, error)

UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.

type OrgGroupBy

type OrgGroupBy struct {
	// contains filtered or unexported fields
}

OrgGroupBy is the group-by builder for Org entities.

func (*OrgGroupBy) Aggregate

func (ogb *OrgGroupBy) Aggregate(fns ...AggregateFunc) *OrgGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgGroupBy) Bool

func (s *OrgGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) BoolX

func (s *OrgGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgGroupBy) Bools

func (s *OrgGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) BoolsX

func (s *OrgGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgGroupBy) Float64

func (s *OrgGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) Float64X

func (s *OrgGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgGroupBy) Float64s

func (s *OrgGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) Float64sX

func (s *OrgGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgGroupBy) Int

func (s *OrgGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) IntX

func (s *OrgGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgGroupBy) Ints

func (s *OrgGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) IntsX

func (s *OrgGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgGroupBy) Scan

func (ogb *OrgGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgGroupBy) ScanX

func (s *OrgGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgGroupBy) String

func (s *OrgGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) StringX

func (s *OrgGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgGroupBy) Strings

func (s *OrgGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgGroupBy) StringsX

func (s *OrgGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgMutation

type OrgMutation struct {
	// contains filtered or unexported fields
}

OrgMutation represents an operation that mutates the Org nodes in the graph.

func (*OrgMutation) AddAppIDs

func (m *OrgMutation) AddAppIDs(ids ...int)

AddAppIDs adds the "apps" edge to the App entity by ids.

func (*OrgMutation) AddChildIDs

func (m *OrgMutation) AddChildIDs(ids ...int)

AddChildIDs adds the "children" edge to the Org entity by ids.

func (*OrgMutation) AddCreatedBy

func (m *OrgMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OrgMutation) AddDisplaySort

func (m *OrgMutation) AddDisplaySort(i int32)

AddDisplaySort adds i to the "display_sort" field.

func (*OrgMutation) AddField

func (m *OrgMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgMutation) AddOrgAppIDs

func (m *OrgMutation) AddOrgAppIDs(ids ...int)

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by ids.

func (*OrgMutation) AddOrgUserIDs

func (m *OrgMutation) AddOrgUserIDs(ids ...int)

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by ids.

func (*OrgMutation) AddPermissionIDs

func (m *OrgMutation) AddPermissionIDs(ids ...int)

AddPermissionIDs adds the "permissions" edge to the Permission entity by ids.

func (*OrgMutation) AddPolicyIDs

func (m *OrgMutation) AddPolicyIDs(ids ...int)

AddPolicyIDs adds the "policies" edge to the OrgPolicy entity by ids.

func (*OrgMutation) AddRolesAndGroupIDs

func (m *OrgMutation) AddRolesAndGroupIDs(ids ...int)

AddRolesAndGroupIDs adds the "roles_and_groups" edge to the OrgRole entity by ids.

func (*OrgMutation) AddUpdatedBy

func (m *OrgMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgMutation) AddUserIDs

func (m *OrgMutation) AddUserIDs(ids ...int)

AddUserIDs adds the "users" edge to the User entity by ids.

func (*OrgMutation) AddedCreatedBy

func (m *OrgMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OrgMutation) AddedDisplaySort

func (m *OrgMutation) AddedDisplaySort() (r int32, exists bool)

AddedDisplaySort returns the value that was added to the "display_sort" field in this mutation.

func (*OrgMutation) AddedEdges

func (m *OrgMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgMutation) AddedField

func (m *OrgMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgMutation) AddedFields

func (m *OrgMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgMutation) AddedIDs

func (m *OrgMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgMutation) AddedUpdatedBy

func (m *OrgMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OrgMutation) AppsCleared

func (m *OrgMutation) AppsCleared() bool

AppsCleared reports if the "apps" edge to the App entity was cleared.

func (*OrgMutation) AppsIDs

func (m *OrgMutation) AppsIDs() (ids []int)

AppsIDs returns the "apps" edge IDs in the mutation.

func (*OrgMutation) ChildrenCleared

func (m *OrgMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the Org entity was cleared.

func (*OrgMutation) ChildrenIDs

func (m *OrgMutation) ChildrenIDs() (ids []int)

ChildrenIDs returns the "children" edge IDs in the mutation.

func (*OrgMutation) ClearApps

func (m *OrgMutation) ClearApps()

ClearApps clears the "apps" edge to the App entity.

func (*OrgMutation) ClearChildren

func (m *OrgMutation) ClearChildren()

ClearChildren clears the "children" edge to the Org entity.

func (*OrgMutation) ClearCode

func (m *OrgMutation) ClearCode()

ClearCode clears the value of the "code" field.

func (*OrgMutation) ClearCountryCode

func (m *OrgMutation) ClearCountryCode()

ClearCountryCode clears the value of the "country_code" field.

func (*OrgMutation) ClearDeletedAt

func (m *OrgMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgMutation) ClearDisplaySort

func (m *OrgMutation) ClearDisplaySort()

ClearDisplaySort clears the value of the "display_sort" field.

func (*OrgMutation) ClearDomain

func (m *OrgMutation) ClearDomain()

ClearDomain clears the value of the "domain" field.

func (*OrgMutation) ClearEdge

func (m *OrgMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgMutation) ClearField

func (m *OrgMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgMutation) ClearOrgApp

func (m *OrgMutation) ClearOrgApp()

ClearOrgApp clears the "org_app" edge to the OrgApp entity.

func (*OrgMutation) ClearOrgUser

func (m *OrgMutation) ClearOrgUser()

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*OrgMutation) ClearOwner

func (m *OrgMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*OrgMutation) ClearOwnerID

func (m *OrgMutation) ClearOwnerID()

ClearOwnerID clears the value of the "owner_id" field.

func (*OrgMutation) ClearParent

func (m *OrgMutation) ClearParent()

ClearParent clears the "parent" edge to the Org entity.

func (*OrgMutation) ClearPath

func (m *OrgMutation) ClearPath()

ClearPath clears the value of the "path" field.

func (*OrgMutation) ClearPermissions

func (m *OrgMutation) ClearPermissions()

ClearPermissions clears the "permissions" edge to the Permission entity.

func (*OrgMutation) ClearPolicies

func (m *OrgMutation) ClearPolicies()

ClearPolicies clears the "policies" edge to the OrgPolicy entity.

func (*OrgMutation) ClearProfile

func (m *OrgMutation) ClearProfile()

ClearProfile clears the value of the "profile" field.

func (*OrgMutation) ClearRolesAndGroups

func (m *OrgMutation) ClearRolesAndGroups()

ClearRolesAndGroups clears the "roles_and_groups" edge to the OrgRole entity.

func (*OrgMutation) ClearStatus

func (m *OrgMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*OrgMutation) ClearTimezone

func (m *OrgMutation) ClearTimezone()

ClearTimezone clears the value of the "timezone" field.

func (*OrgMutation) ClearUpdatedAt

func (m *OrgMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgMutation) ClearUpdatedBy

func (m *OrgMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgMutation) ClearUsers

func (m *OrgMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*OrgMutation) ClearedEdges

func (m *OrgMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgMutation) ClearedFields

func (m *OrgMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgMutation) Client

func (m OrgMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgMutation) Code

func (m *OrgMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*OrgMutation) CodeCleared

func (m *OrgMutation) CodeCleared() bool

CodeCleared returns if the "code" field was cleared in this mutation.

func (*OrgMutation) CountryCode

func (m *OrgMutation) CountryCode() (r string, exists bool)

CountryCode returns the value of the "country_code" field in the mutation.

func (*OrgMutation) CountryCodeCleared

func (m *OrgMutation) CountryCodeCleared() bool

CountryCodeCleared returns if the "country_code" field was cleared in this mutation.

func (*OrgMutation) CreatedAt

func (m *OrgMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgMutation) CreatedBy

func (m *OrgMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OrgMutation) DeletedAt

func (m *OrgMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*OrgMutation) DeletedAtCleared

func (m *OrgMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*OrgMutation) DisplaySort

func (m *OrgMutation) DisplaySort() (r int32, exists bool)

DisplaySort returns the value of the "display_sort" field in the mutation.

func (*OrgMutation) DisplaySortCleared

func (m *OrgMutation) DisplaySortCleared() bool

DisplaySortCleared returns if the "display_sort" field was cleared in this mutation.

func (*OrgMutation) Domain

func (m *OrgMutation) Domain() (r string, exists bool)

Domain returns the value of the "domain" field in the mutation.

func (*OrgMutation) DomainCleared

func (m *OrgMutation) DomainCleared() bool

DomainCleared returns if the "domain" field was cleared in this mutation.

func (*OrgMutation) EdgeCleared

func (m *OrgMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgMutation) Field

func (m *OrgMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgMutation) FieldCleared

func (m *OrgMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgMutation) Fields

func (m *OrgMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgMutation) ID

func (m *OrgMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgMutation) IDs

func (m *OrgMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgMutation) Kind

func (m *OrgMutation) Kind() (r org.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*OrgMutation) Name

func (m *OrgMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OrgMutation) OldCode

func (m *OrgMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldCountryCode

func (m *OrgMutation) OldCountryCode(ctx context.Context) (v string, err error)

OldCountryCode returns the old "country_code" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldCreatedAt

func (m *OrgMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldCreatedBy

func (m *OrgMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldDeletedAt

func (m *OrgMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldDisplaySort

func (m *OrgMutation) OldDisplaySort(ctx context.Context) (v int32, err error)

OldDisplaySort returns the old "display_sort" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldDomain

func (m *OrgMutation) OldDomain(ctx context.Context) (v string, err error)

OldDomain returns the old "domain" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldField

func (m *OrgMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgMutation) OldKind

func (m *OrgMutation) OldKind(ctx context.Context) (v org.Kind, err error)

OldKind returns the old "kind" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldName

func (m *OrgMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldOwnerID

func (m *OrgMutation) OldOwnerID(ctx context.Context) (v *int, err error)

OldOwnerID returns the old "owner_id" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldParentID

func (m *OrgMutation) OldParentID(ctx context.Context) (v int, err error)

OldParentID returns the old "parent_id" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldPath

func (m *OrgMutation) OldPath(ctx context.Context) (v string, err error)

OldPath returns the old "path" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldProfile

func (m *OrgMutation) OldProfile(ctx context.Context) (v string, err error)

OldProfile returns the old "profile" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldStatus

func (m *OrgMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldTimezone

func (m *OrgMutation) OldTimezone(ctx context.Context) (v string, err error)

OldTimezone returns the old "timezone" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldUpdatedAt

func (m *OrgMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) OldUpdatedBy

func (m *OrgMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the Org entity. If the Org object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgMutation) Op

func (m *OrgMutation) Op() Op

Op returns the operation name.

func (*OrgMutation) OrgAppCleared

func (m *OrgMutation) OrgAppCleared() bool

OrgAppCleared reports if the "org_app" edge to the OrgApp entity was cleared.

func (*OrgMutation) OrgAppIDs

func (m *OrgMutation) OrgAppIDs() (ids []int)

OrgAppIDs returns the "org_app" edge IDs in the mutation.

func (*OrgMutation) OrgUserCleared

func (m *OrgMutation) OrgUserCleared() bool

OrgUserCleared reports if the "org_user" edge to the OrgUser entity was cleared.

func (*OrgMutation) OrgUserIDs

func (m *OrgMutation) OrgUserIDs() (ids []int)

OrgUserIDs returns the "org_user" edge IDs in the mutation.

func (*OrgMutation) OwnerCleared

func (m *OrgMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*OrgMutation) OwnerID

func (m *OrgMutation) OwnerID() (r int, exists bool)

OwnerID returns the value of the "owner_id" field in the mutation.

func (*OrgMutation) OwnerIDCleared

func (m *OrgMutation) OwnerIDCleared() bool

OwnerIDCleared returns if the "owner_id" field was cleared in this mutation.

func (*OrgMutation) OwnerIDs

func (m *OrgMutation) OwnerIDs() (ids []int)

OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*OrgMutation) ParentCleared

func (m *OrgMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the Org entity was cleared.

func (*OrgMutation) ParentID

func (m *OrgMutation) ParentID() (r int, exists bool)

ParentID returns the value of the "parent_id" field in the mutation.

func (*OrgMutation) ParentIDs

func (m *OrgMutation) ParentIDs() (ids []int)

ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.

func (*OrgMutation) Path

func (m *OrgMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*OrgMutation) PathCleared

func (m *OrgMutation) PathCleared() bool

PathCleared returns if the "path" field was cleared in this mutation.

func (*OrgMutation) PermissionsCleared

func (m *OrgMutation) PermissionsCleared() bool

PermissionsCleared reports if the "permissions" edge to the Permission entity was cleared.

func (*OrgMutation) PermissionsIDs

func (m *OrgMutation) PermissionsIDs() (ids []int)

PermissionsIDs returns the "permissions" edge IDs in the mutation.

func (*OrgMutation) PoliciesCleared

func (m *OrgMutation) PoliciesCleared() bool

PoliciesCleared reports if the "policies" edge to the OrgPolicy entity was cleared.

func (*OrgMutation) PoliciesIDs

func (m *OrgMutation) PoliciesIDs() (ids []int)

PoliciesIDs returns the "policies" edge IDs in the mutation.

func (*OrgMutation) Profile

func (m *OrgMutation) Profile() (r string, exists bool)

Profile returns the value of the "profile" field in the mutation.

func (*OrgMutation) ProfileCleared

func (m *OrgMutation) ProfileCleared() bool

ProfileCleared returns if the "profile" field was cleared in this mutation.

func (*OrgMutation) RemoveAppIDs

func (m *OrgMutation) RemoveAppIDs(ids ...int)

RemoveAppIDs removes the "apps" edge to the App entity by IDs.

func (*OrgMutation) RemoveChildIDs

func (m *OrgMutation) RemoveChildIDs(ids ...int)

RemoveChildIDs removes the "children" edge to the Org entity by IDs.

func (*OrgMutation) RemoveOrgAppIDs

func (m *OrgMutation) RemoveOrgAppIDs(ids ...int)

RemoveOrgAppIDs removes the "org_app" edge to the OrgApp entity by IDs.

func (*OrgMutation) RemoveOrgUserIDs

func (m *OrgMutation) RemoveOrgUserIDs(ids ...int)

RemoveOrgUserIDs removes the "org_user" edge to the OrgUser entity by IDs.

func (*OrgMutation) RemovePermissionIDs

func (m *OrgMutation) RemovePermissionIDs(ids ...int)

RemovePermissionIDs removes the "permissions" edge to the Permission entity by IDs.

func (*OrgMutation) RemovePolicyIDs

func (m *OrgMutation) RemovePolicyIDs(ids ...int)

RemovePolicyIDs removes the "policies" edge to the OrgPolicy entity by IDs.

func (*OrgMutation) RemoveRolesAndGroupIDs

func (m *OrgMutation) RemoveRolesAndGroupIDs(ids ...int)

RemoveRolesAndGroupIDs removes the "roles_and_groups" edge to the OrgRole entity by IDs.

func (*OrgMutation) RemoveUserIDs

func (m *OrgMutation) RemoveUserIDs(ids ...int)

RemoveUserIDs removes the "users" edge to the User entity by IDs.

func (*OrgMutation) RemovedAppsIDs

func (m *OrgMutation) RemovedAppsIDs() (ids []int)

RemovedApps returns the removed IDs of the "apps" edge to the App entity.

func (*OrgMutation) RemovedChildrenIDs

func (m *OrgMutation) RemovedChildrenIDs() (ids []int)

RemovedChildren returns the removed IDs of the "children" edge to the Org entity.

func (*OrgMutation) RemovedEdges

func (m *OrgMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgMutation) RemovedIDs

func (m *OrgMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgMutation) RemovedOrgAppIDs

func (m *OrgMutation) RemovedOrgAppIDs() (ids []int)

RemovedOrgApp returns the removed IDs of the "org_app" edge to the OrgApp entity.

func (*OrgMutation) RemovedOrgUserIDs

func (m *OrgMutation) RemovedOrgUserIDs() (ids []int)

RemovedOrgUser returns the removed IDs of the "org_user" edge to the OrgUser entity.

func (*OrgMutation) RemovedPermissionsIDs

func (m *OrgMutation) RemovedPermissionsIDs() (ids []int)

RemovedPermissions returns the removed IDs of the "permissions" edge to the Permission entity.

func (*OrgMutation) RemovedPoliciesIDs

func (m *OrgMutation) RemovedPoliciesIDs() (ids []int)

RemovedPolicies returns the removed IDs of the "policies" edge to the OrgPolicy entity.

func (*OrgMutation) RemovedRolesAndGroupsIDs

func (m *OrgMutation) RemovedRolesAndGroupsIDs() (ids []int)

RemovedRolesAndGroups returns the removed IDs of the "roles_and_groups" edge to the OrgRole entity.

func (*OrgMutation) RemovedUsersIDs

func (m *OrgMutation) RemovedUsersIDs() (ids []int)

RemovedUsers returns the removed IDs of the "users" edge to the User entity.

func (*OrgMutation) ResetApps

func (m *OrgMutation) ResetApps()

ResetApps resets all changes to the "apps" edge.

func (*OrgMutation) ResetChildren

func (m *OrgMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

func (*OrgMutation) ResetCode

func (m *OrgMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*OrgMutation) ResetCountryCode

func (m *OrgMutation) ResetCountryCode()

ResetCountryCode resets all changes to the "country_code" field.

func (*OrgMutation) ResetCreatedAt

func (m *OrgMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgMutation) ResetCreatedBy

func (m *OrgMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OrgMutation) ResetDeletedAt

func (m *OrgMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*OrgMutation) ResetDisplaySort

func (m *OrgMutation) ResetDisplaySort()

ResetDisplaySort resets all changes to the "display_sort" field.

func (*OrgMutation) ResetDomain

func (m *OrgMutation) ResetDomain()

ResetDomain resets all changes to the "domain" field.

func (*OrgMutation) ResetEdge

func (m *OrgMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgMutation) ResetField

func (m *OrgMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgMutation) ResetKind

func (m *OrgMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*OrgMutation) ResetName

func (m *OrgMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OrgMutation) ResetOrgApp

func (m *OrgMutation) ResetOrgApp()

ResetOrgApp resets all changes to the "org_app" edge.

func (*OrgMutation) ResetOrgUser

func (m *OrgMutation) ResetOrgUser()

ResetOrgUser resets all changes to the "org_user" edge.

func (*OrgMutation) ResetOwner

func (m *OrgMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*OrgMutation) ResetOwnerID

func (m *OrgMutation) ResetOwnerID()

ResetOwnerID resets all changes to the "owner_id" field.

func (*OrgMutation) ResetParent

func (m *OrgMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*OrgMutation) ResetParentID

func (m *OrgMutation) ResetParentID()

ResetParentID resets all changes to the "parent_id" field.

func (*OrgMutation) ResetPath

func (m *OrgMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*OrgMutation) ResetPermissions

func (m *OrgMutation) ResetPermissions()

ResetPermissions resets all changes to the "permissions" edge.

func (*OrgMutation) ResetPolicies

func (m *OrgMutation) ResetPolicies()

ResetPolicies resets all changes to the "policies" edge.

func (*OrgMutation) ResetProfile

func (m *OrgMutation) ResetProfile()

ResetProfile resets all changes to the "profile" field.

func (*OrgMutation) ResetRolesAndGroups

func (m *OrgMutation) ResetRolesAndGroups()

ResetRolesAndGroups resets all changes to the "roles_and_groups" edge.

func (*OrgMutation) ResetStatus

func (m *OrgMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*OrgMutation) ResetTimezone

func (m *OrgMutation) ResetTimezone()

ResetTimezone resets all changes to the "timezone" field.

func (*OrgMutation) ResetUpdatedAt

func (m *OrgMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrgMutation) ResetUpdatedBy

func (m *OrgMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OrgMutation) ResetUsers

func (m *OrgMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*OrgMutation) RolesAndGroupsCleared

func (m *OrgMutation) RolesAndGroupsCleared() bool

RolesAndGroupsCleared reports if the "roles_and_groups" edge to the OrgRole entity was cleared.

func (*OrgMutation) RolesAndGroupsIDs

func (m *OrgMutation) RolesAndGroupsIDs() (ids []int)

RolesAndGroupsIDs returns the "roles_and_groups" edge IDs in the mutation.

func (*OrgMutation) SetCode

func (m *OrgMutation) SetCode(s string)

SetCode sets the "code" field.

func (*OrgMutation) SetCountryCode

func (m *OrgMutation) SetCountryCode(s string)

SetCountryCode sets the "country_code" field.

func (*OrgMutation) SetCreatedAt

func (m *OrgMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgMutation) SetCreatedBy

func (m *OrgMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OrgMutation) SetDeletedAt

func (m *OrgMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*OrgMutation) SetDisplaySort

func (m *OrgMutation) SetDisplaySort(i int32)

SetDisplaySort sets the "display_sort" field.

func (*OrgMutation) SetDomain

func (m *OrgMutation) SetDomain(s string)

SetDomain sets the "domain" field.

func (*OrgMutation) SetField

func (m *OrgMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgMutation) SetID

func (m *OrgMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Org entities.

func (*OrgMutation) SetKind

func (m *OrgMutation) SetKind(o org.Kind)

SetKind sets the "kind" field.

func (*OrgMutation) SetName

func (m *OrgMutation) SetName(s string)

SetName sets the "name" field.

func (*OrgMutation) SetOp

func (m *OrgMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgMutation) SetOwnerID

func (m *OrgMutation) SetOwnerID(i int)

SetOwnerID sets the "owner_id" field.

func (*OrgMutation) SetParentID

func (m *OrgMutation) SetParentID(i int)

SetParentID sets the "parent_id" field.

func (*OrgMutation) SetPath

func (m *OrgMutation) SetPath(s string)

SetPath sets the "path" field.

func (*OrgMutation) SetProfile

func (m *OrgMutation) SetProfile(s string)

SetProfile sets the "profile" field.

func (*OrgMutation) SetStatus

func (m *OrgMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*OrgMutation) SetTimezone

func (m *OrgMutation) SetTimezone(s string)

SetTimezone sets the "timezone" field.

func (*OrgMutation) SetUpdatedAt

func (m *OrgMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrgMutation) SetUpdatedBy

func (m *OrgMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*OrgMutation) Status

func (m *OrgMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*OrgMutation) StatusCleared

func (m *OrgMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*OrgMutation) Timezone

func (m *OrgMutation) Timezone() (r string, exists bool)

Timezone returns the value of the "timezone" field in the mutation.

func (*OrgMutation) TimezoneCleared

func (m *OrgMutation) TimezoneCleared() bool

TimezoneCleared returns if the "timezone" field was cleared in this mutation.

func (OrgMutation) Tx

func (m OrgMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgMutation) Type

func (m *OrgMutation) Type() string

Type returns the node type of this mutation (Org).

func (*OrgMutation) UpdatedAt

func (m *OrgMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrgMutation) UpdatedAtCleared

func (m *OrgMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OrgMutation) UpdatedBy

func (m *OrgMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OrgMutation) UpdatedByCleared

func (m *OrgMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OrgMutation) UsersCleared

func (m *OrgMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*OrgMutation) UsersIDs

func (m *OrgMutation) UsersIDs() (ids []int)

UsersIDs returns the "users" edge IDs in the mutation.

func (*OrgMutation) Where

func (m *OrgMutation) Where(ps ...predicate.Org)

Where appends a list predicates to the OrgMutation builder.

func (*OrgMutation) WhereP

func (m *OrgMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgOrder

type OrgOrder struct {
	Direction OrderDirection `json:"direction"`
	Field     *OrgOrderField `json:"field"`
}

OrgOrder defines the ordering of Org.

type OrgOrderField

type OrgOrderField struct {
	// Value extracts the ordering value from the given Org.
	Value func(*Org) (ent.Value, error)
	// contains filtered or unexported fields
}

OrgOrderField defines the ordering field of Org.

func (OrgOrderField) MarshalGQL

func (f OrgOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OrgOrderField) String

func (f OrgOrderField) String() string

String implement fmt.Stringer interface.

func (*OrgOrderField) UnmarshalGQL

func (f *OrgOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrgPaginateOption

type OrgPaginateOption func(*orgPager) error

OrgPaginateOption enables pagination customization.

func WithOrgFilter

func WithOrgFilter(filter func(*OrgQuery) (*OrgQuery, error)) OrgPaginateOption

WithOrgFilter configures pagination filter.

func WithOrgOrder

func WithOrgOrder(order *OrgOrder) OrgPaginateOption

WithOrgOrder configures pagination ordering.

type OrgPolicies

type OrgPolicies []*OrgPolicy

OrgPolicies is a parsable slice of OrgPolicy.

type OrgPolicy

type OrgPolicy struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 所属应用
	AppID int `json:"app_id,omitempty"`
	// 所属应用策略,如果是自定义应用策略,则为空
	AppPolicyID int `json:"app_policy_id,omitempty"`
	// 策略名称
	Name string `json:"name,omitempty"`
	// 描述
	Comments string `json:"comments,omitempty"`
	// 策略规则
	Rules []*types.PolicyRule `json:"rules,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgPolicyQuery when eager-loading is set.
	Edges OrgPolicyEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgPolicy is the model entity for the OrgPolicy schema.

func (*OrgPolicy) GlobalID

func (op *OrgPolicy) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given OrgPolicy node.

func (*OrgPolicy) IsNode

func (*OrgPolicy) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*OrgPolicy) NamedPermissions

func (op *OrgPolicy) NamedPermissions(name string) ([]*Permission, error)

NamedPermissions returns the Permissions named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgPolicy) Org

func (op *OrgPolicy) Org(ctx context.Context) (*Org, error)

func (*OrgPolicy) Permissions

func (op *OrgPolicy) Permissions(ctx context.Context) (result []*Permission, err error)

func (*OrgPolicy) QueryOrg

func (op *OrgPolicy) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the OrgPolicy entity.

func (*OrgPolicy) QueryPermissions

func (op *OrgPolicy) QueryPermissions() *PermissionQuery

QueryPermissions queries the "permissions" edge of the OrgPolicy entity.

func (*OrgPolicy) String

func (op *OrgPolicy) String() string

String implements the fmt.Stringer.

func (*OrgPolicy) ToEdge

func (op *OrgPolicy) ToEdge(order *OrgPolicyOrder) *OrgPolicyEdge

ToEdge converts OrgPolicy into OrgPolicyEdge.

func (*OrgPolicy) Unwrap

func (op *OrgPolicy) Unwrap() *OrgPolicy

Unwrap unwraps the OrgPolicy entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgPolicy) Update

func (op *OrgPolicy) Update() *OrgPolicyUpdateOne

Update returns a builder for updating this OrgPolicy. Note that you need to call OrgPolicy.Unwrap() before calling this method if this OrgPolicy was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgPolicy) Value

func (op *OrgPolicy) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgPolicy. This includes values selected through modifiers, order, etc.

type OrgPolicyClient

type OrgPolicyClient struct {
	// contains filtered or unexported fields
}

OrgPolicyClient is a client for the OrgPolicy schema.

func NewOrgPolicyClient

func NewOrgPolicyClient(c config) *OrgPolicyClient

NewOrgPolicyClient returns a client for the OrgPolicy from the given config.

func (*OrgPolicyClient) Create

func (c *OrgPolicyClient) Create() *OrgPolicyCreate

Create returns a builder for creating a OrgPolicy entity.

func (*OrgPolicyClient) CreateBulk

func (c *OrgPolicyClient) CreateBulk(builders ...*OrgPolicyCreate) *OrgPolicyCreateBulk

CreateBulk returns a builder for creating a bulk of OrgPolicy entities.

func (*OrgPolicyClient) Delete

func (c *OrgPolicyClient) Delete() *OrgPolicyDelete

Delete returns a delete builder for OrgPolicy.

func (*OrgPolicyClient) DeleteOne

func (c *OrgPolicyClient) DeleteOne(op *OrgPolicy) *OrgPolicyDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgPolicyClient) DeleteOneID

func (c *OrgPolicyClient) DeleteOneID(id int) *OrgPolicyDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgPolicyClient) Get

func (c *OrgPolicyClient) Get(ctx context.Context, id int) (*OrgPolicy, error)

Get returns a OrgPolicy entity by its id.

func (*OrgPolicyClient) GetX

func (c *OrgPolicyClient) GetX(ctx context.Context, id int) *OrgPolicy

GetX is like Get, but panics if an error occurs.

func (*OrgPolicyClient) Hooks

func (c *OrgPolicyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgPolicyClient) Intercept

func (c *OrgPolicyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgpolicy.Intercept(f(g(h())))`.

func (*OrgPolicyClient) Interceptors

func (c *OrgPolicyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgPolicyClient) MapCreateBulk

func (c *OrgPolicyClient) MapCreateBulk(slice any, setFunc func(*OrgPolicyCreate, int)) *OrgPolicyCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgPolicyClient) Query

func (c *OrgPolicyClient) Query() *OrgPolicyQuery

Query returns a query builder for OrgPolicy.

func (*OrgPolicyClient) QueryOrg

func (c *OrgPolicyClient) QueryOrg(op *OrgPolicy) *OrgQuery

QueryOrg queries the org edge of a OrgPolicy.

func (*OrgPolicyClient) QueryPermissions

func (c *OrgPolicyClient) QueryPermissions(op *OrgPolicy) *PermissionQuery

QueryPermissions queries the permissions edge of a OrgPolicy.

func (*OrgPolicyClient) Update

func (c *OrgPolicyClient) Update() *OrgPolicyUpdate

Update returns an update builder for OrgPolicy.

func (*OrgPolicyClient) UpdateOne

func (c *OrgPolicyClient) UpdateOne(op *OrgPolicy) *OrgPolicyUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgPolicyClient) UpdateOneID

func (c *OrgPolicyClient) UpdateOneID(id int) *OrgPolicyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgPolicyClient) Use

func (c *OrgPolicyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgpolicy.Hooks(f(g(h())))`.

type OrgPolicyConnection

type OrgPolicyConnection struct {
	Edges      []*OrgPolicyEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

OrgPolicyConnection is the connection containing edges to OrgPolicy.

type OrgPolicyCreate

type OrgPolicyCreate struct {
	// contains filtered or unexported fields
}

OrgPolicyCreate is the builder for creating a OrgPolicy entity.

func (*OrgPolicyCreate) AddPermissionIDs

func (opc *OrgPolicyCreate) AddPermissionIDs(ids ...int) *OrgPolicyCreate

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*OrgPolicyCreate) AddPermissions

func (opc *OrgPolicyCreate) AddPermissions(p ...*Permission) *OrgPolicyCreate

AddPermissions adds the "permissions" edges to the Permission entity.

func (*OrgPolicyCreate) Exec

func (opc *OrgPolicyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgPolicyCreate) ExecX

func (opc *OrgPolicyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyCreate) Mutation

func (opc *OrgPolicyCreate) Mutation() *OrgPolicyMutation

Mutation returns the OrgPolicyMutation object of the builder.

func (*OrgPolicyCreate) OnConflict

func (opc *OrgPolicyCreate) OnConflict(opts ...sql.ConflictOption) *OrgPolicyUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgPolicy.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgPolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgPolicyCreate) OnConflictColumns

func (opc *OrgPolicyCreate) OnConflictColumns(columns ...string) *OrgPolicyUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgPolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgPolicyCreate) Save

func (opc *OrgPolicyCreate) Save(ctx context.Context) (*OrgPolicy, error)

Save creates the OrgPolicy in the database.

func (*OrgPolicyCreate) SaveX

func (opc *OrgPolicyCreate) SaveX(ctx context.Context) *OrgPolicy

SaveX calls Save and panics if Save returns an error.

func (*OrgPolicyCreate) SetAppID

func (opc *OrgPolicyCreate) SetAppID(i int) *OrgPolicyCreate

SetAppID sets the "app_id" field.

func (*OrgPolicyCreate) SetAppPolicyID

func (opc *OrgPolicyCreate) SetAppPolicyID(i int) *OrgPolicyCreate

SetAppPolicyID sets the "app_policy_id" field.

func (*OrgPolicyCreate) SetComments

func (opc *OrgPolicyCreate) SetComments(s string) *OrgPolicyCreate

SetComments sets the "comments" field.

func (*OrgPolicyCreate) SetCreatedAt

func (opc *OrgPolicyCreate) SetCreatedAt(t time.Time) *OrgPolicyCreate

SetCreatedAt sets the "created_at" field.

func (*OrgPolicyCreate) SetCreatedBy

func (opc *OrgPolicyCreate) SetCreatedBy(i int) *OrgPolicyCreate

SetCreatedBy sets the "created_by" field.

func (*OrgPolicyCreate) SetID

func (opc *OrgPolicyCreate) SetID(i int) *OrgPolicyCreate

SetID sets the "id" field.

func (*OrgPolicyCreate) SetInput

SetInput applies the change-set in the CreateOrgPolicyInput on the OrgPolicyCreate builder.

func (*OrgPolicyCreate) SetName

func (opc *OrgPolicyCreate) SetName(s string) *OrgPolicyCreate

SetName sets the "name" field.

func (*OrgPolicyCreate) SetNillableAppID

func (opc *OrgPolicyCreate) SetNillableAppID(i *int) *OrgPolicyCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OrgPolicyCreate) SetNillableAppPolicyID

func (opc *OrgPolicyCreate) SetNillableAppPolicyID(i *int) *OrgPolicyCreate

SetNillableAppPolicyID sets the "app_policy_id" field if the given value is not nil.

func (*OrgPolicyCreate) SetNillableComments

func (opc *OrgPolicyCreate) SetNillableComments(s *string) *OrgPolicyCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*OrgPolicyCreate) SetNillableCreatedAt

func (opc *OrgPolicyCreate) SetNillableCreatedAt(t *time.Time) *OrgPolicyCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgPolicyCreate) SetNillableID

func (opc *OrgPolicyCreate) SetNillableID(i *int) *OrgPolicyCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*OrgPolicyCreate) SetNillableOrgID

func (opc *OrgPolicyCreate) SetNillableOrgID(i *int) *OrgPolicyCreate

SetNillableOrgID sets the "org_id" field if the given value is not nil.

func (*OrgPolicyCreate) SetNillableUpdatedAt

func (opc *OrgPolicyCreate) SetNillableUpdatedAt(t *time.Time) *OrgPolicyCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgPolicyCreate) SetNillableUpdatedBy

func (opc *OrgPolicyCreate) SetNillableUpdatedBy(i *int) *OrgPolicyCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgPolicyCreate) SetOrg

func (opc *OrgPolicyCreate) SetOrg(o *Org) *OrgPolicyCreate

SetOrg sets the "org" edge to the Org entity.

func (*OrgPolicyCreate) SetOrgID

func (opc *OrgPolicyCreate) SetOrgID(i int) *OrgPolicyCreate

SetOrgID sets the "org_id" field.

func (*OrgPolicyCreate) SetRules

func (opc *OrgPolicyCreate) SetRules(tr []*types.PolicyRule) *OrgPolicyCreate

SetRules sets the "rules" field.

func (*OrgPolicyCreate) SetUpdatedAt

func (opc *OrgPolicyCreate) SetUpdatedAt(t time.Time) *OrgPolicyCreate

SetUpdatedAt sets the "updated_at" field.

func (*OrgPolicyCreate) SetUpdatedBy

func (opc *OrgPolicyCreate) SetUpdatedBy(i int) *OrgPolicyCreate

SetUpdatedBy sets the "updated_by" field.

type OrgPolicyCreateBulk

type OrgPolicyCreateBulk struct {
	// contains filtered or unexported fields
}

OrgPolicyCreateBulk is the builder for creating many OrgPolicy entities in bulk.

func (*OrgPolicyCreateBulk) Exec

func (opcb *OrgPolicyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgPolicyCreateBulk) ExecX

func (opcb *OrgPolicyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyCreateBulk) OnConflict

func (opcb *OrgPolicyCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgPolicyUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgPolicy.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgPolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgPolicyCreateBulk) OnConflictColumns

func (opcb *OrgPolicyCreateBulk) OnConflictColumns(columns ...string) *OrgPolicyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgPolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgPolicyCreateBulk) Save

func (opcb *OrgPolicyCreateBulk) Save(ctx context.Context) ([]*OrgPolicy, error)

Save creates the OrgPolicy entities in the database.

func (*OrgPolicyCreateBulk) SaveX

func (opcb *OrgPolicyCreateBulk) SaveX(ctx context.Context) []*OrgPolicy

SaveX is like Save, but panics if an error occurs.

type OrgPolicyDelete

type OrgPolicyDelete struct {
	// contains filtered or unexported fields
}

OrgPolicyDelete is the builder for deleting a OrgPolicy entity.

func (*OrgPolicyDelete) Exec

func (opd *OrgPolicyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgPolicyDelete) ExecX

func (opd *OrgPolicyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyDelete) Where

Where appends a list predicates to the OrgPolicyDelete builder.

type OrgPolicyDeleteOne

type OrgPolicyDeleteOne struct {
	// contains filtered or unexported fields
}

OrgPolicyDeleteOne is the builder for deleting a single OrgPolicy entity.

func (*OrgPolicyDeleteOne) Exec

func (opdo *OrgPolicyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgPolicyDeleteOne) ExecX

func (opdo *OrgPolicyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyDeleteOne) Where

Where appends a list predicates to the OrgPolicyDelete builder.

type OrgPolicyEdge

type OrgPolicyEdge struct {
	Node   *OrgPolicy `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

OrgPolicyEdge is the edge representation of OrgPolicy.

type OrgPolicyEdges

type OrgPolicyEdges struct {
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// Permissions holds the value of the permissions edge.
	Permissions []*Permission `json:"permissions,omitempty"`
	// contains filtered or unexported fields
}

OrgPolicyEdges holds the relations/edges for other nodes in the graph.

func (OrgPolicyEdges) OrgOrErr

func (e OrgPolicyEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgPolicyEdges) PermissionsOrErr

func (e OrgPolicyEdges) PermissionsOrErr() ([]*Permission, error)

PermissionsOrErr returns the Permissions value or an error if the edge was not loaded in eager-loading.

type OrgPolicyGroupBy

type OrgPolicyGroupBy struct {
	// contains filtered or unexported fields
}

OrgPolicyGroupBy is the group-by builder for OrgPolicy entities.

func (*OrgPolicyGroupBy) Aggregate

func (opgb *OrgPolicyGroupBy) Aggregate(fns ...AggregateFunc) *OrgPolicyGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgPolicyGroupBy) Bool

func (s *OrgPolicyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) BoolX

func (s *OrgPolicyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgPolicyGroupBy) Bools

func (s *OrgPolicyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) BoolsX

func (s *OrgPolicyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgPolicyGroupBy) Float64

func (s *OrgPolicyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) Float64X

func (s *OrgPolicyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgPolicyGroupBy) Float64s

func (s *OrgPolicyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) Float64sX

func (s *OrgPolicyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgPolicyGroupBy) Int

func (s *OrgPolicyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) IntX

func (s *OrgPolicyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgPolicyGroupBy) Ints

func (s *OrgPolicyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) IntsX

func (s *OrgPolicyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgPolicyGroupBy) Scan

func (opgb *OrgPolicyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgPolicyGroupBy) ScanX

func (s *OrgPolicyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgPolicyGroupBy) String

func (s *OrgPolicyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) StringX

func (s *OrgPolicyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgPolicyGroupBy) Strings

func (s *OrgPolicyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgPolicyGroupBy) StringsX

func (s *OrgPolicyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgPolicyMutation

type OrgPolicyMutation struct {
	// contains filtered or unexported fields
}

OrgPolicyMutation represents an operation that mutates the OrgPolicy nodes in the graph.

func (*OrgPolicyMutation) AddAppID

func (m *OrgPolicyMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*OrgPolicyMutation) AddAppPolicyID

func (m *OrgPolicyMutation) AddAppPolicyID(i int)

AddAppPolicyID adds i to the "app_policy_id" field.

func (*OrgPolicyMutation) AddCreatedBy

func (m *OrgPolicyMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OrgPolicyMutation) AddField

func (m *OrgPolicyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgPolicyMutation) AddPermissionIDs

func (m *OrgPolicyMutation) AddPermissionIDs(ids ...int)

AddPermissionIDs adds the "permissions" edge to the Permission entity by ids.

func (*OrgPolicyMutation) AddUpdatedBy

func (m *OrgPolicyMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgPolicyMutation) AddedAppID

func (m *OrgPolicyMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*OrgPolicyMutation) AddedAppPolicyID

func (m *OrgPolicyMutation) AddedAppPolicyID() (r int, exists bool)

AddedAppPolicyID returns the value that was added to the "app_policy_id" field in this mutation.

func (*OrgPolicyMutation) AddedCreatedBy

func (m *OrgPolicyMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OrgPolicyMutation) AddedEdges

func (m *OrgPolicyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgPolicyMutation) AddedField

func (m *OrgPolicyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgPolicyMutation) AddedFields

func (m *OrgPolicyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgPolicyMutation) AddedIDs

func (m *OrgPolicyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgPolicyMutation) AddedUpdatedBy

func (m *OrgPolicyMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OrgPolicyMutation) AppID

func (m *OrgPolicyMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*OrgPolicyMutation) AppIDCleared

func (m *OrgPolicyMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*OrgPolicyMutation) AppPolicyID

func (m *OrgPolicyMutation) AppPolicyID() (r int, exists bool)

AppPolicyID returns the value of the "app_policy_id" field in the mutation.

func (*OrgPolicyMutation) AppPolicyIDCleared

func (m *OrgPolicyMutation) AppPolicyIDCleared() bool

AppPolicyIDCleared returns if the "app_policy_id" field was cleared in this mutation.

func (*OrgPolicyMutation) AppendRules

func (m *OrgPolicyMutation) AppendRules(tr []*types.PolicyRule)

AppendRules adds tr to the "rules" field.

func (*OrgPolicyMutation) AppendedRules

func (m *OrgPolicyMutation) AppendedRules() ([]*types.PolicyRule, bool)

AppendedRules returns the list of values that were appended to the "rules" field in this mutation.

func (*OrgPolicyMutation) ClearAppID

func (m *OrgPolicyMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyMutation) ClearAppPolicyID

func (m *OrgPolicyMutation) ClearAppPolicyID()

ClearAppPolicyID clears the value of the "app_policy_id" field.

func (*OrgPolicyMutation) ClearComments

func (m *OrgPolicyMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*OrgPolicyMutation) ClearEdge

func (m *OrgPolicyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgPolicyMutation) ClearField

func (m *OrgPolicyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgPolicyMutation) ClearOrg

func (m *OrgPolicyMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*OrgPolicyMutation) ClearOrgID

func (m *OrgPolicyMutation) ClearOrgID()

ClearOrgID clears the value of the "org_id" field.

func (*OrgPolicyMutation) ClearPermissions

func (m *OrgPolicyMutation) ClearPermissions()

ClearPermissions clears the "permissions" edge to the Permission entity.

func (*OrgPolicyMutation) ClearUpdatedAt

func (m *OrgPolicyMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgPolicyMutation) ClearUpdatedBy

func (m *OrgPolicyMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgPolicyMutation) ClearedEdges

func (m *OrgPolicyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgPolicyMutation) ClearedFields

func (m *OrgPolicyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgPolicyMutation) Client

func (m OrgPolicyMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgPolicyMutation) Comments

func (m *OrgPolicyMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*OrgPolicyMutation) CommentsCleared

func (m *OrgPolicyMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*OrgPolicyMutation) CreatedAt

func (m *OrgPolicyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgPolicyMutation) CreatedBy

func (m *OrgPolicyMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OrgPolicyMutation) EdgeCleared

func (m *OrgPolicyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgPolicyMutation) Field

func (m *OrgPolicyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgPolicyMutation) FieldCleared

func (m *OrgPolicyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgPolicyMutation) Fields

func (m *OrgPolicyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgPolicyMutation) ID

func (m *OrgPolicyMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgPolicyMutation) IDs

func (m *OrgPolicyMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgPolicyMutation) Name

func (m *OrgPolicyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OrgPolicyMutation) OldAppID

func (m *OrgPolicyMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldAppPolicyID

func (m *OrgPolicyMutation) OldAppPolicyID(ctx context.Context) (v int, err error)

OldAppPolicyID returns the old "app_policy_id" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldComments

func (m *OrgPolicyMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldCreatedAt

func (m *OrgPolicyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldCreatedBy

func (m *OrgPolicyMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldField

func (m *OrgPolicyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgPolicyMutation) OldName

func (m *OrgPolicyMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldOrgID

func (m *OrgPolicyMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldRules

func (m *OrgPolicyMutation) OldRules(ctx context.Context) (v []*types.PolicyRule, err error)

OldRules returns the old "rules" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldUpdatedAt

func (m *OrgPolicyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) OldUpdatedBy

func (m *OrgPolicyMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the OrgPolicy entity. If the OrgPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgPolicyMutation) Op

func (m *OrgPolicyMutation) Op() Op

Op returns the operation name.

func (*OrgPolicyMutation) OrgCleared

func (m *OrgPolicyMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*OrgPolicyMutation) OrgID

func (m *OrgPolicyMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgPolicyMutation) OrgIDCleared

func (m *OrgPolicyMutation) OrgIDCleared() bool

OrgIDCleared returns if the "org_id" field was cleared in this mutation.

func (*OrgPolicyMutation) OrgIDs

func (m *OrgPolicyMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*OrgPolicyMutation) PermissionsCleared

func (m *OrgPolicyMutation) PermissionsCleared() bool

PermissionsCleared reports if the "permissions" edge to the Permission entity was cleared.

func (*OrgPolicyMutation) PermissionsIDs

func (m *OrgPolicyMutation) PermissionsIDs() (ids []int)

PermissionsIDs returns the "permissions" edge IDs in the mutation.

func (*OrgPolicyMutation) RemovePermissionIDs

func (m *OrgPolicyMutation) RemovePermissionIDs(ids ...int)

RemovePermissionIDs removes the "permissions" edge to the Permission entity by IDs.

func (*OrgPolicyMutation) RemovedEdges

func (m *OrgPolicyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgPolicyMutation) RemovedIDs

func (m *OrgPolicyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgPolicyMutation) RemovedPermissionsIDs

func (m *OrgPolicyMutation) RemovedPermissionsIDs() (ids []int)

RemovedPermissions returns the removed IDs of the "permissions" edge to the Permission entity.

func (*OrgPolicyMutation) ResetAppID

func (m *OrgPolicyMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OrgPolicyMutation) ResetAppPolicyID

func (m *OrgPolicyMutation) ResetAppPolicyID()

ResetAppPolicyID resets all changes to the "app_policy_id" field.

func (*OrgPolicyMutation) ResetComments

func (m *OrgPolicyMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*OrgPolicyMutation) ResetCreatedAt

func (m *OrgPolicyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgPolicyMutation) ResetCreatedBy

func (m *OrgPolicyMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OrgPolicyMutation) ResetEdge

func (m *OrgPolicyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgPolicyMutation) ResetField

func (m *OrgPolicyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgPolicyMutation) ResetName

func (m *OrgPolicyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OrgPolicyMutation) ResetOrg

func (m *OrgPolicyMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*OrgPolicyMutation) ResetOrgID

func (m *OrgPolicyMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgPolicyMutation) ResetPermissions

func (m *OrgPolicyMutation) ResetPermissions()

ResetPermissions resets all changes to the "permissions" edge.

func (*OrgPolicyMutation) ResetRules

func (m *OrgPolicyMutation) ResetRules()

ResetRules resets all changes to the "rules" field.

func (*OrgPolicyMutation) ResetUpdatedAt

func (m *OrgPolicyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrgPolicyMutation) ResetUpdatedBy

func (m *OrgPolicyMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OrgPolicyMutation) Rules

func (m *OrgPolicyMutation) Rules() (r []*types.PolicyRule, exists bool)

Rules returns the value of the "rules" field in the mutation.

func (*OrgPolicyMutation) SetAppID

func (m *OrgPolicyMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*OrgPolicyMutation) SetAppPolicyID

func (m *OrgPolicyMutation) SetAppPolicyID(i int)

SetAppPolicyID sets the "app_policy_id" field.

func (*OrgPolicyMutation) SetComments

func (m *OrgPolicyMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*OrgPolicyMutation) SetCreatedAt

func (m *OrgPolicyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgPolicyMutation) SetCreatedBy

func (m *OrgPolicyMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OrgPolicyMutation) SetField

func (m *OrgPolicyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgPolicyMutation) SetID

func (m *OrgPolicyMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgPolicy entities.

func (*OrgPolicyMutation) SetName

func (m *OrgPolicyMutation) SetName(s string)

SetName sets the "name" field.

func (*OrgPolicyMutation) SetOp

func (m *OrgPolicyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgPolicyMutation) SetOrgID

func (m *OrgPolicyMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgPolicyMutation) SetRules

func (m *OrgPolicyMutation) SetRules(tr []*types.PolicyRule)

SetRules sets the "rules" field.

func (*OrgPolicyMutation) SetUpdatedAt

func (m *OrgPolicyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrgPolicyMutation) SetUpdatedBy

func (m *OrgPolicyMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (OrgPolicyMutation) Tx

func (m OrgPolicyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgPolicyMutation) Type

func (m *OrgPolicyMutation) Type() string

Type returns the node type of this mutation (OrgPolicy).

func (*OrgPolicyMutation) UpdatedAt

func (m *OrgPolicyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrgPolicyMutation) UpdatedAtCleared

func (m *OrgPolicyMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OrgPolicyMutation) UpdatedBy

func (m *OrgPolicyMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OrgPolicyMutation) UpdatedByCleared

func (m *OrgPolicyMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OrgPolicyMutation) Where

func (m *OrgPolicyMutation) Where(ps ...predicate.OrgPolicy)

Where appends a list predicates to the OrgPolicyMutation builder.

func (*OrgPolicyMutation) WhereP

func (m *OrgPolicyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgPolicyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgPolicyOrder

type OrgPolicyOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *OrgPolicyOrderField `json:"field"`
}

OrgPolicyOrder defines the ordering of OrgPolicy.

type OrgPolicyOrderField

type OrgPolicyOrderField struct {
	// Value extracts the ordering value from the given OrgPolicy.
	Value func(*OrgPolicy) (ent.Value, error)
	// contains filtered or unexported fields
}

OrgPolicyOrderField defines the ordering field of OrgPolicy.

func (OrgPolicyOrderField) MarshalGQL

func (f OrgPolicyOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OrgPolicyOrderField) String

func (f OrgPolicyOrderField) String() string

String implement fmt.Stringer interface.

func (*OrgPolicyOrderField) UnmarshalGQL

func (f *OrgPolicyOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrgPolicyPaginateOption

type OrgPolicyPaginateOption func(*orgpolicyPager) error

OrgPolicyPaginateOption enables pagination customization.

func WithOrgPolicyFilter

func WithOrgPolicyFilter(filter func(*OrgPolicyQuery) (*OrgPolicyQuery, error)) OrgPolicyPaginateOption

WithOrgPolicyFilter configures pagination filter.

func WithOrgPolicyOrder

func WithOrgPolicyOrder(order *OrgPolicyOrder) OrgPolicyPaginateOption

WithOrgPolicyOrder configures pagination ordering.

type OrgPolicyQuery

type OrgPolicyQuery struct {
	// contains filtered or unexported fields
}

OrgPolicyQuery is the builder for querying OrgPolicy entities.

func (*OrgPolicyQuery) Aggregate

func (opq *OrgPolicyQuery) Aggregate(fns ...AggregateFunc) *OrgPolicySelect

Aggregate returns a OrgPolicySelect configured with the given aggregations.

func (*OrgPolicyQuery) All

func (opq *OrgPolicyQuery) All(ctx context.Context) ([]*OrgPolicy, error)

All executes the query and returns a list of OrgPolicies.

func (*OrgPolicyQuery) AllX

func (opq *OrgPolicyQuery) AllX(ctx context.Context) []*OrgPolicy

AllX is like All, but panics if an error occurs.

func (*OrgPolicyQuery) Clone

func (opq *OrgPolicyQuery) Clone() *OrgPolicyQuery

Clone returns a duplicate of the OrgPolicyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgPolicyQuery) CollectFields

func (op *OrgPolicyQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrgPolicyQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OrgPolicyQuery) Count

func (opq *OrgPolicyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgPolicyQuery) CountX

func (opq *OrgPolicyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgPolicyQuery) Exist

func (opq *OrgPolicyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgPolicyQuery) ExistX

func (opq *OrgPolicyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgPolicyQuery) First

func (opq *OrgPolicyQuery) First(ctx context.Context) (*OrgPolicy, error)

First returns the first OrgPolicy entity from the query. Returns a *NotFoundError when no OrgPolicy was found.

func (*OrgPolicyQuery) FirstID

func (opq *OrgPolicyQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgPolicy ID from the query. Returns a *NotFoundError when no OrgPolicy ID was found.

func (*OrgPolicyQuery) FirstIDX

func (opq *OrgPolicyQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgPolicyQuery) FirstX

func (opq *OrgPolicyQuery) FirstX(ctx context.Context) *OrgPolicy

FirstX is like First, but panics if an error occurs.

func (*OrgPolicyQuery) GroupBy

func (opq *OrgPolicyQuery) GroupBy(field string, fields ...string) *OrgPolicyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgPolicy.Query().
	GroupBy(orgpolicy.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgPolicyQuery) IDs

func (opq *OrgPolicyQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgPolicy IDs.

func (*OrgPolicyQuery) IDsX

func (opq *OrgPolicyQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgPolicyQuery) Limit

func (opq *OrgPolicyQuery) Limit(limit int) *OrgPolicyQuery

Limit the number of records to be returned by this query.

func (*OrgPolicyQuery) Offset

func (opq *OrgPolicyQuery) Offset(offset int) *OrgPolicyQuery

Offset to start from.

func (*OrgPolicyQuery) Only

func (opq *OrgPolicyQuery) Only(ctx context.Context) (*OrgPolicy, error)

Only returns a single OrgPolicy entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgPolicy entity is found. Returns a *NotFoundError when no OrgPolicy entities are found.

func (*OrgPolicyQuery) OnlyID

func (opq *OrgPolicyQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgPolicy ID in the query. Returns a *NotSingularError when more than one OrgPolicy ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgPolicyQuery) OnlyIDX

func (opq *OrgPolicyQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgPolicyQuery) OnlyX

func (opq *OrgPolicyQuery) OnlyX(ctx context.Context) *OrgPolicy

OnlyX is like Only, but panics if an error occurs.

func (*OrgPolicyQuery) Order

Order specifies how the records should be ordered.

func (*OrgPolicyQuery) Paginate

func (op *OrgPolicyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OrgPolicyPaginateOption,
) (*OrgPolicyConnection, error)

Paginate executes the query and returns a relay based cursor connection to OrgPolicy.

func (*OrgPolicyQuery) QueryOrg

func (opq *OrgPolicyQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*OrgPolicyQuery) QueryPermissions

func (opq *OrgPolicyQuery) QueryPermissions() *PermissionQuery

QueryPermissions chains the current query on the "permissions" edge.

func (*OrgPolicyQuery) Select

func (opq *OrgPolicyQuery) Select(fields ...string) *OrgPolicySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.OrgPolicy.Query().
	Select(orgpolicy.FieldCreatedBy).
	Scan(ctx, &v)

func (*OrgPolicyQuery) Unique

func (opq *OrgPolicyQuery) Unique(unique bool) *OrgPolicyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgPolicyQuery) Where

func (opq *OrgPolicyQuery) Where(ps ...predicate.OrgPolicy) *OrgPolicyQuery

Where adds a new predicate for the OrgPolicyQuery builder.

func (*OrgPolicyQuery) WithNamedPermissions

func (opq *OrgPolicyQuery) WithNamedPermissions(name string, opts ...func(*PermissionQuery)) *OrgPolicyQuery

WithNamedPermissions tells the query-builder to eager-load the nodes that are connected to the "permissions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgPolicyQuery) WithOrg

func (opq *OrgPolicyQuery) WithOrg(opts ...func(*OrgQuery)) *OrgPolicyQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgPolicyQuery) WithPermissions

func (opq *OrgPolicyQuery) WithPermissions(opts ...func(*PermissionQuery)) *OrgPolicyQuery

WithPermissions tells the query-builder to eager-load the nodes that are connected to the "permissions" edge. The optional arguments are used to configure the query builder of the edge.

type OrgPolicySelect

type OrgPolicySelect struct {
	*OrgPolicyQuery
	// contains filtered or unexported fields
}

OrgPolicySelect is the builder for selecting fields of OrgPolicy entities.

func (*OrgPolicySelect) Aggregate

func (ops *OrgPolicySelect) Aggregate(fns ...AggregateFunc) *OrgPolicySelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgPolicySelect) Bool

func (s *OrgPolicySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) BoolX

func (s *OrgPolicySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgPolicySelect) Bools

func (s *OrgPolicySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) BoolsX

func (s *OrgPolicySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgPolicySelect) Float64

func (s *OrgPolicySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) Float64X

func (s *OrgPolicySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgPolicySelect) Float64s

func (s *OrgPolicySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) Float64sX

func (s *OrgPolicySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgPolicySelect) Int

func (s *OrgPolicySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) IntX

func (s *OrgPolicySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgPolicySelect) Ints

func (s *OrgPolicySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) IntsX

func (s *OrgPolicySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgPolicySelect) Scan

func (ops *OrgPolicySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgPolicySelect) ScanX

func (s *OrgPolicySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgPolicySelect) String

func (s *OrgPolicySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) StringX

func (s *OrgPolicySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgPolicySelect) Strings

func (s *OrgPolicySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgPolicySelect) StringsX

func (s *OrgPolicySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgPolicyUpdate

type OrgPolicyUpdate struct {
	// contains filtered or unexported fields
}

OrgPolicyUpdate is the builder for updating OrgPolicy entities.

func (*OrgPolicyUpdate) AddAppID

func (opu *OrgPolicyUpdate) AddAppID(i int) *OrgPolicyUpdate

AddAppID adds i to the "app_id" field.

func (*OrgPolicyUpdate) AddAppPolicyID

func (opu *OrgPolicyUpdate) AddAppPolicyID(i int) *OrgPolicyUpdate

AddAppPolicyID adds i to the "app_policy_id" field.

func (*OrgPolicyUpdate) AddPermissionIDs

func (opu *OrgPolicyUpdate) AddPermissionIDs(ids ...int) *OrgPolicyUpdate

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*OrgPolicyUpdate) AddPermissions

func (opu *OrgPolicyUpdate) AddPermissions(p ...*Permission) *OrgPolicyUpdate

AddPermissions adds the "permissions" edges to the Permission entity.

func (*OrgPolicyUpdate) AddUpdatedBy

func (opu *OrgPolicyUpdate) AddUpdatedBy(i int) *OrgPolicyUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgPolicyUpdate) AppendRules

func (opu *OrgPolicyUpdate) AppendRules(tr []*types.PolicyRule) *OrgPolicyUpdate

AppendRules appends tr to the "rules" field.

func (*OrgPolicyUpdate) ClearAppID

func (opu *OrgPolicyUpdate) ClearAppID() *OrgPolicyUpdate

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyUpdate) ClearAppPolicyID

func (opu *OrgPolicyUpdate) ClearAppPolicyID() *OrgPolicyUpdate

ClearAppPolicyID clears the value of the "app_policy_id" field.

func (*OrgPolicyUpdate) ClearComments

func (opu *OrgPolicyUpdate) ClearComments() *OrgPolicyUpdate

ClearComments clears the value of the "comments" field.

func (*OrgPolicyUpdate) ClearPermissions

func (opu *OrgPolicyUpdate) ClearPermissions() *OrgPolicyUpdate

ClearPermissions clears all "permissions" edges to the Permission entity.

func (*OrgPolicyUpdate) ClearUpdatedAt

func (opu *OrgPolicyUpdate) ClearUpdatedAt() *OrgPolicyUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgPolicyUpdate) ClearUpdatedBy

func (opu *OrgPolicyUpdate) ClearUpdatedBy() *OrgPolicyUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgPolicyUpdate) Exec

func (opu *OrgPolicyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgPolicyUpdate) ExecX

func (opu *OrgPolicyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyUpdate) Mutation

func (opu *OrgPolicyUpdate) Mutation() *OrgPolicyMutation

Mutation returns the OrgPolicyMutation object of the builder.

func (*OrgPolicyUpdate) RemovePermissionIDs

func (opu *OrgPolicyUpdate) RemovePermissionIDs(ids ...int) *OrgPolicyUpdate

RemovePermissionIDs removes the "permissions" edge to Permission entities by IDs.

func (*OrgPolicyUpdate) RemovePermissions

func (opu *OrgPolicyUpdate) RemovePermissions(p ...*Permission) *OrgPolicyUpdate

RemovePermissions removes "permissions" edges to Permission entities.

func (*OrgPolicyUpdate) Save

func (opu *OrgPolicyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgPolicyUpdate) SaveX

func (opu *OrgPolicyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgPolicyUpdate) SetAppID

func (opu *OrgPolicyUpdate) SetAppID(i int) *OrgPolicyUpdate

SetAppID sets the "app_id" field.

func (*OrgPolicyUpdate) SetAppPolicyID

func (opu *OrgPolicyUpdate) SetAppPolicyID(i int) *OrgPolicyUpdate

SetAppPolicyID sets the "app_policy_id" field.

func (*OrgPolicyUpdate) SetComments

func (opu *OrgPolicyUpdate) SetComments(s string) *OrgPolicyUpdate

SetComments sets the "comments" field.

func (*OrgPolicyUpdate) SetInput

SetInput applies the change-set in the UpdateOrgPolicyInput on the OrgPolicyUpdate builder.

func (*OrgPolicyUpdate) SetName

func (opu *OrgPolicyUpdate) SetName(s string) *OrgPolicyUpdate

SetName sets the "name" field.

func (*OrgPolicyUpdate) SetNillableAppID

func (opu *OrgPolicyUpdate) SetNillableAppID(i *int) *OrgPolicyUpdate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OrgPolicyUpdate) SetNillableAppPolicyID

func (opu *OrgPolicyUpdate) SetNillableAppPolicyID(i *int) *OrgPolicyUpdate

SetNillableAppPolicyID sets the "app_policy_id" field if the given value is not nil.

func (*OrgPolicyUpdate) SetNillableComments

func (opu *OrgPolicyUpdate) SetNillableComments(s *string) *OrgPolicyUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*OrgPolicyUpdate) SetNillableUpdatedAt

func (opu *OrgPolicyUpdate) SetNillableUpdatedAt(t *time.Time) *OrgPolicyUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgPolicyUpdate) SetNillableUpdatedBy

func (opu *OrgPolicyUpdate) SetNillableUpdatedBy(i *int) *OrgPolicyUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgPolicyUpdate) SetRules

func (opu *OrgPolicyUpdate) SetRules(tr []*types.PolicyRule) *OrgPolicyUpdate

SetRules sets the "rules" field.

func (*OrgPolicyUpdate) SetUpdatedAt

func (opu *OrgPolicyUpdate) SetUpdatedAt(t time.Time) *OrgPolicyUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OrgPolicyUpdate) SetUpdatedBy

func (opu *OrgPolicyUpdate) SetUpdatedBy(i int) *OrgPolicyUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OrgPolicyUpdate) Where

Where appends a list predicates to the OrgPolicyUpdate builder.

type OrgPolicyUpdateOne

type OrgPolicyUpdateOne struct {
	// contains filtered or unexported fields
}

OrgPolicyUpdateOne is the builder for updating a single OrgPolicy entity.

func (*OrgPolicyUpdateOne) AddAppID

func (opuo *OrgPolicyUpdateOne) AddAppID(i int) *OrgPolicyUpdateOne

AddAppID adds i to the "app_id" field.

func (*OrgPolicyUpdateOne) AddAppPolicyID

func (opuo *OrgPolicyUpdateOne) AddAppPolicyID(i int) *OrgPolicyUpdateOne

AddAppPolicyID adds i to the "app_policy_id" field.

func (*OrgPolicyUpdateOne) AddPermissionIDs

func (opuo *OrgPolicyUpdateOne) AddPermissionIDs(ids ...int) *OrgPolicyUpdateOne

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*OrgPolicyUpdateOne) AddPermissions

func (opuo *OrgPolicyUpdateOne) AddPermissions(p ...*Permission) *OrgPolicyUpdateOne

AddPermissions adds the "permissions" edges to the Permission entity.

func (*OrgPolicyUpdateOne) AddUpdatedBy

func (opuo *OrgPolicyUpdateOne) AddUpdatedBy(i int) *OrgPolicyUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgPolicyUpdateOne) AppendRules

func (opuo *OrgPolicyUpdateOne) AppendRules(tr []*types.PolicyRule) *OrgPolicyUpdateOne

AppendRules appends tr to the "rules" field.

func (*OrgPolicyUpdateOne) ClearAppID

func (opuo *OrgPolicyUpdateOne) ClearAppID() *OrgPolicyUpdateOne

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyUpdateOne) ClearAppPolicyID

func (opuo *OrgPolicyUpdateOne) ClearAppPolicyID() *OrgPolicyUpdateOne

ClearAppPolicyID clears the value of the "app_policy_id" field.

func (*OrgPolicyUpdateOne) ClearComments

func (opuo *OrgPolicyUpdateOne) ClearComments() *OrgPolicyUpdateOne

ClearComments clears the value of the "comments" field.

func (*OrgPolicyUpdateOne) ClearPermissions

func (opuo *OrgPolicyUpdateOne) ClearPermissions() *OrgPolicyUpdateOne

ClearPermissions clears all "permissions" edges to the Permission entity.

func (*OrgPolicyUpdateOne) ClearUpdatedAt

func (opuo *OrgPolicyUpdateOne) ClearUpdatedAt() *OrgPolicyUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgPolicyUpdateOne) ClearUpdatedBy

func (opuo *OrgPolicyUpdateOne) ClearUpdatedBy() *OrgPolicyUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgPolicyUpdateOne) Exec

func (opuo *OrgPolicyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgPolicyUpdateOne) ExecX

func (opuo *OrgPolicyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyUpdateOne) Mutation

func (opuo *OrgPolicyUpdateOne) Mutation() *OrgPolicyMutation

Mutation returns the OrgPolicyMutation object of the builder.

func (*OrgPolicyUpdateOne) RemovePermissionIDs

func (opuo *OrgPolicyUpdateOne) RemovePermissionIDs(ids ...int) *OrgPolicyUpdateOne

RemovePermissionIDs removes the "permissions" edge to Permission entities by IDs.

func (*OrgPolicyUpdateOne) RemovePermissions

func (opuo *OrgPolicyUpdateOne) RemovePermissions(p ...*Permission) *OrgPolicyUpdateOne

RemovePermissions removes "permissions" edges to Permission entities.

func (*OrgPolicyUpdateOne) Save

func (opuo *OrgPolicyUpdateOne) Save(ctx context.Context) (*OrgPolicy, error)

Save executes the query and returns the updated OrgPolicy entity.

func (*OrgPolicyUpdateOne) SaveX

func (opuo *OrgPolicyUpdateOne) SaveX(ctx context.Context) *OrgPolicy

SaveX is like Save, but panics if an error occurs.

func (*OrgPolicyUpdateOne) Select

func (opuo *OrgPolicyUpdateOne) Select(field string, fields ...string) *OrgPolicyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgPolicyUpdateOne) SetAppID

func (opuo *OrgPolicyUpdateOne) SetAppID(i int) *OrgPolicyUpdateOne

SetAppID sets the "app_id" field.

func (*OrgPolicyUpdateOne) SetAppPolicyID

func (opuo *OrgPolicyUpdateOne) SetAppPolicyID(i int) *OrgPolicyUpdateOne

SetAppPolicyID sets the "app_policy_id" field.

func (*OrgPolicyUpdateOne) SetComments

func (opuo *OrgPolicyUpdateOne) SetComments(s string) *OrgPolicyUpdateOne

SetComments sets the "comments" field.

func (*OrgPolicyUpdateOne) SetInput

SetInput applies the change-set in the UpdateOrgPolicyInput on the OrgPolicyUpdateOne builder.

func (*OrgPolicyUpdateOne) SetName

func (opuo *OrgPolicyUpdateOne) SetName(s string) *OrgPolicyUpdateOne

SetName sets the "name" field.

func (*OrgPolicyUpdateOne) SetNillableAppID

func (opuo *OrgPolicyUpdateOne) SetNillableAppID(i *int) *OrgPolicyUpdateOne

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OrgPolicyUpdateOne) SetNillableAppPolicyID

func (opuo *OrgPolicyUpdateOne) SetNillableAppPolicyID(i *int) *OrgPolicyUpdateOne

SetNillableAppPolicyID sets the "app_policy_id" field if the given value is not nil.

func (*OrgPolicyUpdateOne) SetNillableComments

func (opuo *OrgPolicyUpdateOne) SetNillableComments(s *string) *OrgPolicyUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*OrgPolicyUpdateOne) SetNillableUpdatedAt

func (opuo *OrgPolicyUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrgPolicyUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgPolicyUpdateOne) SetNillableUpdatedBy

func (opuo *OrgPolicyUpdateOne) SetNillableUpdatedBy(i *int) *OrgPolicyUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgPolicyUpdateOne) SetRules

func (opuo *OrgPolicyUpdateOne) SetRules(tr []*types.PolicyRule) *OrgPolicyUpdateOne

SetRules sets the "rules" field.

func (*OrgPolicyUpdateOne) SetUpdatedAt

func (opuo *OrgPolicyUpdateOne) SetUpdatedAt(t time.Time) *OrgPolicyUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgPolicyUpdateOne) SetUpdatedBy

func (opuo *OrgPolicyUpdateOne) SetUpdatedBy(i int) *OrgPolicyUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgPolicyUpdateOne) Where

Where appends a list predicates to the OrgPolicyUpdate builder.

type OrgPolicyUpsert

type OrgPolicyUpsert struct {
	*sql.UpdateSet
}

OrgPolicyUpsert is the "OnConflict" setter.

func (*OrgPolicyUpsert) AddAppID

func (u *OrgPolicyUpsert) AddAppID(v int) *OrgPolicyUpsert

AddAppID adds v to the "app_id" field.

func (*OrgPolicyUpsert) AddAppPolicyID

func (u *OrgPolicyUpsert) AddAppPolicyID(v int) *OrgPolicyUpsert

AddAppPolicyID adds v to the "app_policy_id" field.

func (*OrgPolicyUpsert) AddUpdatedBy

func (u *OrgPolicyUpsert) AddUpdatedBy(v int) *OrgPolicyUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgPolicyUpsert) ClearAppID

func (u *OrgPolicyUpsert) ClearAppID() *OrgPolicyUpsert

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyUpsert) ClearAppPolicyID

func (u *OrgPolicyUpsert) ClearAppPolicyID() *OrgPolicyUpsert

ClearAppPolicyID clears the value of the "app_policy_id" field.

func (*OrgPolicyUpsert) ClearComments

func (u *OrgPolicyUpsert) ClearComments() *OrgPolicyUpsert

ClearComments clears the value of the "comments" field.

func (*OrgPolicyUpsert) ClearUpdatedAt

func (u *OrgPolicyUpsert) ClearUpdatedAt() *OrgPolicyUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgPolicyUpsert) ClearUpdatedBy

func (u *OrgPolicyUpsert) ClearUpdatedBy() *OrgPolicyUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgPolicyUpsert) SetAppID

func (u *OrgPolicyUpsert) SetAppID(v int) *OrgPolicyUpsert

SetAppID sets the "app_id" field.

func (*OrgPolicyUpsert) SetAppPolicyID

func (u *OrgPolicyUpsert) SetAppPolicyID(v int) *OrgPolicyUpsert

SetAppPolicyID sets the "app_policy_id" field.

func (*OrgPolicyUpsert) SetComments

func (u *OrgPolicyUpsert) SetComments(v string) *OrgPolicyUpsert

SetComments sets the "comments" field.

func (*OrgPolicyUpsert) SetName

func (u *OrgPolicyUpsert) SetName(v string) *OrgPolicyUpsert

SetName sets the "name" field.

func (*OrgPolicyUpsert) SetRules

func (u *OrgPolicyUpsert) SetRules(v []*types.PolicyRule) *OrgPolicyUpsert

SetRules sets the "rules" field.

func (*OrgPolicyUpsert) SetUpdatedAt

func (u *OrgPolicyUpsert) SetUpdatedAt(v time.Time) *OrgPolicyUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OrgPolicyUpsert) SetUpdatedBy

func (u *OrgPolicyUpsert) SetUpdatedBy(v int) *OrgPolicyUpsert

SetUpdatedBy sets the "updated_by" field.

func (*OrgPolicyUpsert) UpdateAppID

func (u *OrgPolicyUpsert) UpdateAppID() *OrgPolicyUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgPolicyUpsert) UpdateAppPolicyID

func (u *OrgPolicyUpsert) UpdateAppPolicyID() *OrgPolicyUpsert

UpdateAppPolicyID sets the "app_policy_id" field to the value that was provided on create.

func (*OrgPolicyUpsert) UpdateComments

func (u *OrgPolicyUpsert) UpdateComments() *OrgPolicyUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*OrgPolicyUpsert) UpdateName

func (u *OrgPolicyUpsert) UpdateName() *OrgPolicyUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgPolicyUpsert) UpdateRules

func (u *OrgPolicyUpsert) UpdateRules() *OrgPolicyUpsert

UpdateRules sets the "rules" field to the value that was provided on create.

func (*OrgPolicyUpsert) UpdateUpdatedAt

func (u *OrgPolicyUpsert) UpdateUpdatedAt() *OrgPolicyUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgPolicyUpsert) UpdateUpdatedBy

func (u *OrgPolicyUpsert) UpdateUpdatedBy() *OrgPolicyUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgPolicyUpsertBulk

type OrgPolicyUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgPolicyUpsertBulk is the builder for "upsert"-ing a bulk of OrgPolicy nodes.

func (*OrgPolicyUpsertBulk) AddAppID

AddAppID adds v to the "app_id" field.

func (*OrgPolicyUpsertBulk) AddAppPolicyID

func (u *OrgPolicyUpsertBulk) AddAppPolicyID(v int) *OrgPolicyUpsertBulk

AddAppPolicyID adds v to the "app_policy_id" field.

func (*OrgPolicyUpsertBulk) AddUpdatedBy

func (u *OrgPolicyUpsertBulk) AddUpdatedBy(v int) *OrgPolicyUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgPolicyUpsertBulk) ClearAppID

func (u *OrgPolicyUpsertBulk) ClearAppID() *OrgPolicyUpsertBulk

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyUpsertBulk) ClearAppPolicyID

func (u *OrgPolicyUpsertBulk) ClearAppPolicyID() *OrgPolicyUpsertBulk

ClearAppPolicyID clears the value of the "app_policy_id" field.

func (*OrgPolicyUpsertBulk) ClearComments

func (u *OrgPolicyUpsertBulk) ClearComments() *OrgPolicyUpsertBulk

ClearComments clears the value of the "comments" field.

func (*OrgPolicyUpsertBulk) ClearUpdatedAt

func (u *OrgPolicyUpsertBulk) ClearUpdatedAt() *OrgPolicyUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgPolicyUpsertBulk) ClearUpdatedBy

func (u *OrgPolicyUpsertBulk) ClearUpdatedBy() *OrgPolicyUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgPolicyUpsertBulk) DoNothing

func (u *OrgPolicyUpsertBulk) DoNothing() *OrgPolicyUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgPolicyUpsertBulk) Exec

Exec executes the query.

func (*OrgPolicyUpsertBulk) ExecX

func (u *OrgPolicyUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgPolicy.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgPolicyUpsertBulk) SetAppID

SetAppID sets the "app_id" field.

func (*OrgPolicyUpsertBulk) SetAppPolicyID

func (u *OrgPolicyUpsertBulk) SetAppPolicyID(v int) *OrgPolicyUpsertBulk

SetAppPolicyID sets the "app_policy_id" field.

func (*OrgPolicyUpsertBulk) SetComments

func (u *OrgPolicyUpsertBulk) SetComments(v string) *OrgPolicyUpsertBulk

SetComments sets the "comments" field.

func (*OrgPolicyUpsertBulk) SetName

SetName sets the "name" field.

func (*OrgPolicyUpsertBulk) SetRules

SetRules sets the "rules" field.

func (*OrgPolicyUpsertBulk) SetUpdatedAt

func (u *OrgPolicyUpsertBulk) SetUpdatedAt(v time.Time) *OrgPolicyUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*OrgPolicyUpsertBulk) SetUpdatedBy

func (u *OrgPolicyUpsertBulk) SetUpdatedBy(v int) *OrgPolicyUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*OrgPolicyUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OrgPolicyCreateBulk.OnConflict documentation for more info.

func (*OrgPolicyUpsertBulk) UpdateAppID

func (u *OrgPolicyUpsertBulk) UpdateAppID() *OrgPolicyUpsertBulk

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgPolicyUpsertBulk) UpdateAppPolicyID

func (u *OrgPolicyUpsertBulk) UpdateAppPolicyID() *OrgPolicyUpsertBulk

UpdateAppPolicyID sets the "app_policy_id" field to the value that was provided on create.

func (*OrgPolicyUpsertBulk) UpdateComments

func (u *OrgPolicyUpsertBulk) UpdateComments() *OrgPolicyUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*OrgPolicyUpsertBulk) UpdateName

func (u *OrgPolicyUpsertBulk) UpdateName() *OrgPolicyUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgPolicyUpsertBulk) UpdateNewValues

func (u *OrgPolicyUpsertBulk) UpdateNewValues() *OrgPolicyUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgPolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgpolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgPolicyUpsertBulk) UpdateRules

func (u *OrgPolicyUpsertBulk) UpdateRules() *OrgPolicyUpsertBulk

UpdateRules sets the "rules" field to the value that was provided on create.

func (*OrgPolicyUpsertBulk) UpdateUpdatedAt

func (u *OrgPolicyUpsertBulk) UpdateUpdatedAt() *OrgPolicyUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgPolicyUpsertBulk) UpdateUpdatedBy

func (u *OrgPolicyUpsertBulk) UpdateUpdatedBy() *OrgPolicyUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgPolicyUpsertOne

type OrgPolicyUpsertOne struct {
	// contains filtered or unexported fields
}

OrgPolicyUpsertOne is the builder for "upsert"-ing

one OrgPolicy node.

func (*OrgPolicyUpsertOne) AddAppID

func (u *OrgPolicyUpsertOne) AddAppID(v int) *OrgPolicyUpsertOne

AddAppID adds v to the "app_id" field.

func (*OrgPolicyUpsertOne) AddAppPolicyID

func (u *OrgPolicyUpsertOne) AddAppPolicyID(v int) *OrgPolicyUpsertOne

AddAppPolicyID adds v to the "app_policy_id" field.

func (*OrgPolicyUpsertOne) AddUpdatedBy

func (u *OrgPolicyUpsertOne) AddUpdatedBy(v int) *OrgPolicyUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgPolicyUpsertOne) ClearAppID

func (u *OrgPolicyUpsertOne) ClearAppID() *OrgPolicyUpsertOne

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyUpsertOne) ClearAppPolicyID

func (u *OrgPolicyUpsertOne) ClearAppPolicyID() *OrgPolicyUpsertOne

ClearAppPolicyID clears the value of the "app_policy_id" field.

func (*OrgPolicyUpsertOne) ClearComments

func (u *OrgPolicyUpsertOne) ClearComments() *OrgPolicyUpsertOne

ClearComments clears the value of the "comments" field.

func (*OrgPolicyUpsertOne) ClearUpdatedAt

func (u *OrgPolicyUpsertOne) ClearUpdatedAt() *OrgPolicyUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgPolicyUpsertOne) ClearUpdatedBy

func (u *OrgPolicyUpsertOne) ClearUpdatedBy() *OrgPolicyUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgPolicyUpsertOne) DoNothing

func (u *OrgPolicyUpsertOne) DoNothing() *OrgPolicyUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgPolicyUpsertOne) Exec

func (u *OrgPolicyUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgPolicyUpsertOne) ExecX

func (u *OrgPolicyUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyUpsertOne) ID

func (u *OrgPolicyUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgPolicyUpsertOne) IDX

func (u *OrgPolicyUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgPolicyUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgPolicy.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgPolicyUpsertOne) SetAppID

func (u *OrgPolicyUpsertOne) SetAppID(v int) *OrgPolicyUpsertOne

SetAppID sets the "app_id" field.

func (*OrgPolicyUpsertOne) SetAppPolicyID

func (u *OrgPolicyUpsertOne) SetAppPolicyID(v int) *OrgPolicyUpsertOne

SetAppPolicyID sets the "app_policy_id" field.

func (*OrgPolicyUpsertOne) SetComments

func (u *OrgPolicyUpsertOne) SetComments(v string) *OrgPolicyUpsertOne

SetComments sets the "comments" field.

func (*OrgPolicyUpsertOne) SetName

SetName sets the "name" field.

func (*OrgPolicyUpsertOne) SetRules

SetRules sets the "rules" field.

func (*OrgPolicyUpsertOne) SetUpdatedAt

func (u *OrgPolicyUpsertOne) SetUpdatedAt(v time.Time) *OrgPolicyUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgPolicyUpsertOne) SetUpdatedBy

func (u *OrgPolicyUpsertOne) SetUpdatedBy(v int) *OrgPolicyUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgPolicyUpsertOne) Update

func (u *OrgPolicyUpsertOne) Update(set func(*OrgPolicyUpsert)) *OrgPolicyUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgPolicyCreate.OnConflict documentation for more info.

func (*OrgPolicyUpsertOne) UpdateAppID

func (u *OrgPolicyUpsertOne) UpdateAppID() *OrgPolicyUpsertOne

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*OrgPolicyUpsertOne) UpdateAppPolicyID

func (u *OrgPolicyUpsertOne) UpdateAppPolicyID() *OrgPolicyUpsertOne

UpdateAppPolicyID sets the "app_policy_id" field to the value that was provided on create.

func (*OrgPolicyUpsertOne) UpdateComments

func (u *OrgPolicyUpsertOne) UpdateComments() *OrgPolicyUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*OrgPolicyUpsertOne) UpdateName

func (u *OrgPolicyUpsertOne) UpdateName() *OrgPolicyUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgPolicyUpsertOne) UpdateNewValues

func (u *OrgPolicyUpsertOne) UpdateNewValues() *OrgPolicyUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgPolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgpolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgPolicyUpsertOne) UpdateRules

func (u *OrgPolicyUpsertOne) UpdateRules() *OrgPolicyUpsertOne

UpdateRules sets the "rules" field to the value that was provided on create.

func (*OrgPolicyUpsertOne) UpdateUpdatedAt

func (u *OrgPolicyUpsertOne) UpdateUpdatedAt() *OrgPolicyUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgPolicyUpsertOne) UpdateUpdatedBy

func (u *OrgPolicyUpsertOne) UpdateUpdatedBy() *OrgPolicyUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgPolicyWhereInput

type OrgPolicyWhereInput struct {
	Predicates []predicate.OrgPolicy  `json:"-"`
	Not        *OrgPolicyWhereInput   `json:"not,omitempty"`
	Or         []*OrgPolicyWhereInput `json:"or,omitempty"`
	And        []*OrgPolicyWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "org_id" field predicates.
	OrgID       *int  `json:"orgID,omitempty"`
	OrgIDNEQ    *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn     []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn  []int `json:"orgIDNotIn,omitempty"`
	OrgIDIsNil  bool  `json:"orgIDIsNil,omitempty"`
	OrgIDNotNil bool  `json:"orgIDNotNil,omitempty"`

	// "app_policy_id" field predicates.
	AppPolicyID       *int  `json:"appPolicyID,omitempty"`
	AppPolicyIDNEQ    *int  `json:"appPolicyIDNEQ,omitempty"`
	AppPolicyIDIn     []int `json:"appPolicyIDIn,omitempty"`
	AppPolicyIDNotIn  []int `json:"appPolicyIDNotIn,omitempty"`
	AppPolicyIDGT     *int  `json:"appPolicyIDGT,omitempty"`
	AppPolicyIDGTE    *int  `json:"appPolicyIDGTE,omitempty"`
	AppPolicyIDLT     *int  `json:"appPolicyIDLT,omitempty"`
	AppPolicyIDLTE    *int  `json:"appPolicyIDLTE,omitempty"`
	AppPolicyIDIsNil  bool  `json:"appPolicyIDIsNil,omitempty"`
	AppPolicyIDNotNil bool  `json:"appPolicyIDNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "comments" field predicates.
	Comments             *string  `json:"comments,omitempty"`
	CommentsNEQ          *string  `json:"commentsNEQ,omitempty"`
	CommentsIn           []string `json:"commentsIn,omitempty"`
	CommentsNotIn        []string `json:"commentsNotIn,omitempty"`
	CommentsGT           *string  `json:"commentsGT,omitempty"`
	CommentsGTE          *string  `json:"commentsGTE,omitempty"`
	CommentsLT           *string  `json:"commentsLT,omitempty"`
	CommentsLTE          *string  `json:"commentsLTE,omitempty"`
	CommentsContains     *string  `json:"commentsContains,omitempty"`
	CommentsHasPrefix    *string  `json:"commentsHasPrefix,omitempty"`
	CommentsHasSuffix    *string  `json:"commentsHasSuffix,omitempty"`
	CommentsIsNil        bool     `json:"commentsIsNil,omitempty"`
	CommentsNotNil       bool     `json:"commentsNotNil,omitempty"`
	CommentsEqualFold    *string  `json:"commentsEqualFold,omitempty"`
	CommentsContainsFold *string  `json:"commentsContainsFold,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`

	// "permissions" edge predicates.
	HasPermissions     *bool                   `json:"hasPermissions,omitempty"`
	HasPermissionsWith []*PermissionWhereInput `json:"hasPermissionsWith,omitempty"`
}

OrgPolicyWhereInput represents a where input for filtering OrgPolicy queries.

func (*OrgPolicyWhereInput) AddPredicates

func (i *OrgPolicyWhereInput) AddPredicates(predicates ...predicate.OrgPolicy)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgPolicyWhereInput) Filter

Filter applies the OrgPolicyWhereInput filter on the OrgPolicyQuery builder.

func (*OrgPolicyWhereInput) P

P returns a predicate for filtering orgpolicies. An error is returned if the input is empty or invalid.

type OrgQuery

type OrgQuery struct {
	// contains filtered or unexported fields
}

OrgQuery is the builder for querying Org entities.

func (*OrgQuery) Aggregate

func (oq *OrgQuery) Aggregate(fns ...AggregateFunc) *OrgSelect

Aggregate returns a OrgSelect configured with the given aggregations.

func (*OrgQuery) All

func (oq *OrgQuery) All(ctx context.Context) ([]*Org, error)

All executes the query and returns a list of Orgs.

func (*OrgQuery) AllX

func (oq *OrgQuery) AllX(ctx context.Context) []*Org

AllX is like All, but panics if an error occurs.

func (*OrgQuery) Clone

func (oq *OrgQuery) Clone() *OrgQuery

Clone returns a duplicate of the OrgQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgQuery) CollectFields

func (o *OrgQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrgQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OrgQuery) Count

func (oq *OrgQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgQuery) CountX

func (oq *OrgQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgQuery) Exist

func (oq *OrgQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgQuery) ExistX

func (oq *OrgQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgQuery) First

func (oq *OrgQuery) First(ctx context.Context) (*Org, error)

First returns the first Org entity from the query. Returns a *NotFoundError when no Org was found.

func (*OrgQuery) FirstID

func (oq *OrgQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Org ID from the query. Returns a *NotFoundError when no Org ID was found.

func (*OrgQuery) FirstIDX

func (oq *OrgQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgQuery) FirstX

func (oq *OrgQuery) FirstX(ctx context.Context) *Org

FirstX is like First, but panics if an error occurs.

func (*OrgQuery) GroupBy

func (oq *OrgQuery) GroupBy(field string, fields ...string) *OrgGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Org.Query().
	GroupBy(org.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgQuery) IDs

func (oq *OrgQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Org IDs.

func (*OrgQuery) IDsX

func (oq *OrgQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgQuery) Limit

func (oq *OrgQuery) Limit(limit int) *OrgQuery

Limit the number of records to be returned by this query.

func (*OrgQuery) Offset

func (oq *OrgQuery) Offset(offset int) *OrgQuery

Offset to start from.

func (*OrgQuery) Only

func (oq *OrgQuery) Only(ctx context.Context) (*Org, error)

Only returns a single Org entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Org entity is found. Returns a *NotFoundError when no Org entities are found.

func (*OrgQuery) OnlyID

func (oq *OrgQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Org ID in the query. Returns a *NotSingularError when more than one Org ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgQuery) OnlyIDX

func (oq *OrgQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgQuery) OnlyX

func (oq *OrgQuery) OnlyX(ctx context.Context) *Org

OnlyX is like Only, but panics if an error occurs.

func (*OrgQuery) Order

func (oq *OrgQuery) Order(o ...org.OrderOption) *OrgQuery

Order specifies how the records should be ordered.

func (*OrgQuery) Paginate

func (o *OrgQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OrgPaginateOption,
) (*OrgConnection, error)

Paginate executes the query and returns a relay based cursor connection to Org.

func (*OrgQuery) QueryApps

func (oq *OrgQuery) QueryApps() *AppQuery

QueryApps chains the current query on the "apps" edge.

func (*OrgQuery) QueryChildren

func (oq *OrgQuery) QueryChildren() *OrgQuery

QueryChildren chains the current query on the "children" edge.

func (*OrgQuery) QueryOrgApp

func (oq *OrgQuery) QueryOrgApp() *OrgAppQuery

QueryOrgApp chains the current query on the "org_app" edge.

func (*OrgQuery) QueryOrgUser

func (oq *OrgQuery) QueryOrgUser() *OrgUserQuery

QueryOrgUser chains the current query on the "org_user" edge.

func (*OrgQuery) QueryOwner

func (oq *OrgQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*OrgQuery) QueryParent

func (oq *OrgQuery) QueryParent() *OrgQuery

QueryParent chains the current query on the "parent" edge.

func (*OrgQuery) QueryPermissions

func (oq *OrgQuery) QueryPermissions() *PermissionQuery

QueryPermissions chains the current query on the "permissions" edge.

func (*OrgQuery) QueryPolicies

func (oq *OrgQuery) QueryPolicies() *OrgPolicyQuery

QueryPolicies chains the current query on the "policies" edge.

func (*OrgQuery) QueryRolesAndGroups

func (oq *OrgQuery) QueryRolesAndGroups() *OrgRoleQuery

QueryRolesAndGroups chains the current query on the "roles_and_groups" edge.

func (*OrgQuery) QueryUsers

func (oq *OrgQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*OrgQuery) Select

func (oq *OrgQuery) Select(fields ...string) *OrgSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.Org.Query().
	Select(org.FieldCreatedBy).
	Scan(ctx, &v)

func (*OrgQuery) Unique

func (oq *OrgQuery) Unique(unique bool) *OrgQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgQuery) Where

func (oq *OrgQuery) Where(ps ...predicate.Org) *OrgQuery

Where adds a new predicate for the OrgQuery builder.

func (*OrgQuery) WithApps

func (oq *OrgQuery) WithApps(opts ...func(*AppQuery)) *OrgQuery

WithApps tells the query-builder to eager-load the nodes that are connected to the "apps" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithChildren

func (oq *OrgQuery) WithChildren(opts ...func(*OrgQuery)) *OrgQuery

WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedApps

func (oq *OrgQuery) WithNamedApps(name string, opts ...func(*AppQuery)) *OrgQuery

WithNamedApps tells the query-builder to eager-load the nodes that are connected to the "apps" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedChildren

func (oq *OrgQuery) WithNamedChildren(name string, opts ...func(*OrgQuery)) *OrgQuery

WithNamedChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedOrgApp

func (oq *OrgQuery) WithNamedOrgApp(name string, opts ...func(*OrgAppQuery)) *OrgQuery

WithNamedOrgApp tells the query-builder to eager-load the nodes that are connected to the "org_app" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedOrgUser

func (oq *OrgQuery) WithNamedOrgUser(name string, opts ...func(*OrgUserQuery)) *OrgQuery

WithNamedOrgUser tells the query-builder to eager-load the nodes that are connected to the "org_user" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedPermissions

func (oq *OrgQuery) WithNamedPermissions(name string, opts ...func(*PermissionQuery)) *OrgQuery

WithNamedPermissions tells the query-builder to eager-load the nodes that are connected to the "permissions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedPolicies

func (oq *OrgQuery) WithNamedPolicies(name string, opts ...func(*OrgPolicyQuery)) *OrgQuery

WithNamedPolicies tells the query-builder to eager-load the nodes that are connected to the "policies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedRolesAndGroups

func (oq *OrgQuery) WithNamedRolesAndGroups(name string, opts ...func(*OrgRoleQuery)) *OrgQuery

WithNamedRolesAndGroups tells the query-builder to eager-load the nodes that are connected to the "roles_and_groups" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithNamedUsers

func (oq *OrgQuery) WithNamedUsers(name string, opts ...func(*UserQuery)) *OrgQuery

WithNamedUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithOrgApp

func (oq *OrgQuery) WithOrgApp(opts ...func(*OrgAppQuery)) *OrgQuery

WithOrgApp tells the query-builder to eager-load the nodes that are connected to the "org_app" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithOrgUser

func (oq *OrgQuery) WithOrgUser(opts ...func(*OrgUserQuery)) *OrgQuery

WithOrgUser tells the query-builder to eager-load the nodes that are connected to the "org_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithOwner

func (oq *OrgQuery) WithOwner(opts ...func(*UserQuery)) *OrgQuery

WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithParent

func (oq *OrgQuery) WithParent(opts ...func(*OrgQuery)) *OrgQuery

WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithPermissions

func (oq *OrgQuery) WithPermissions(opts ...func(*PermissionQuery)) *OrgQuery

WithPermissions tells the query-builder to eager-load the nodes that are connected to the "permissions" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithPolicies

func (oq *OrgQuery) WithPolicies(opts ...func(*OrgPolicyQuery)) *OrgQuery

WithPolicies tells the query-builder to eager-load the nodes that are connected to the "policies" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithRolesAndGroups

func (oq *OrgQuery) WithRolesAndGroups(opts ...func(*OrgRoleQuery)) *OrgQuery

WithRolesAndGroups tells the query-builder to eager-load the nodes that are connected to the "roles_and_groups" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgQuery) WithUsers

func (oq *OrgQuery) WithUsers(opts ...func(*UserQuery)) *OrgQuery

WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.

type OrgRole

type OrgRole struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 类型,group:组,role:角色
	Kind orgrole.Kind `json:"kind,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// 角色ID,如有表示该角色来源于应用角色
	AppRoleID int `json:"app_role_id,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgRoleQuery when eager-loading is set.
	Edges OrgRoleEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgRole is the model entity for the OrgRole schema.

func (*OrgRole) GlobalID

func (or *OrgRole) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given OrgRole node.

func (*OrgRole) IsNode

func (*OrgRole) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*OrgRole) NamedOrgRoleUser

func (or *OrgRole) NamedOrgRoleUser(name string) ([]*OrgRoleUser, error)

NamedOrgRoleUser returns the OrgRoleUser named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgRole) NamedOrgUsers

func (or *OrgRole) NamedOrgUsers(name string) ([]*OrgUser, error)

NamedOrgUsers returns the OrgUsers named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgRole) QueryOrg

func (or *OrgRole) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the OrgRole entity.

func (*OrgRole) QueryOrgRoleUser

func (or *OrgRole) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser queries the "org_role_user" edge of the OrgRole entity.

func (*OrgRole) QueryOrgUsers

func (or *OrgRole) QueryOrgUsers() *OrgUserQuery

QueryOrgUsers queries the "org_users" edge of the OrgRole entity.

func (*OrgRole) String

func (or *OrgRole) String() string

String implements the fmt.Stringer.

func (*OrgRole) ToEdge

func (or *OrgRole) ToEdge(order *OrgRoleOrder) *OrgRoleEdge

ToEdge converts OrgRole into OrgRoleEdge.

func (*OrgRole) Unwrap

func (or *OrgRole) Unwrap() *OrgRole

Unwrap unwraps the OrgRole entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgRole) Update

func (or *OrgRole) Update() *OrgRoleUpdateOne

Update returns a builder for updating this OrgRole. Note that you need to call OrgRole.Unwrap() before calling this method if this OrgRole was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgRole) Value

func (or *OrgRole) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgRole. This includes values selected through modifiers, order, etc.

type OrgRoleClient

type OrgRoleClient struct {
	// contains filtered or unexported fields
}

OrgRoleClient is a client for the OrgRole schema.

func NewOrgRoleClient

func NewOrgRoleClient(c config) *OrgRoleClient

NewOrgRoleClient returns a client for the OrgRole from the given config.

func (*OrgRoleClient) Create

func (c *OrgRoleClient) Create() *OrgRoleCreate

Create returns a builder for creating a OrgRole entity.

func (*OrgRoleClient) CreateBulk

func (c *OrgRoleClient) CreateBulk(builders ...*OrgRoleCreate) *OrgRoleCreateBulk

CreateBulk returns a builder for creating a bulk of OrgRole entities.

func (*OrgRoleClient) Delete

func (c *OrgRoleClient) Delete() *OrgRoleDelete

Delete returns a delete builder for OrgRole.

func (*OrgRoleClient) DeleteOne

func (c *OrgRoleClient) DeleteOne(or *OrgRole) *OrgRoleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgRoleClient) DeleteOneID

func (c *OrgRoleClient) DeleteOneID(id int) *OrgRoleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgRoleClient) Get

func (c *OrgRoleClient) Get(ctx context.Context, id int) (*OrgRole, error)

Get returns a OrgRole entity by its id.

func (*OrgRoleClient) GetX

func (c *OrgRoleClient) GetX(ctx context.Context, id int) *OrgRole

GetX is like Get, but panics if an error occurs.

func (*OrgRoleClient) Hooks

func (c *OrgRoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgRoleClient) Intercept

func (c *OrgRoleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgrole.Intercept(f(g(h())))`.

func (*OrgRoleClient) Interceptors

func (c *OrgRoleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgRoleClient) MapCreateBulk

func (c *OrgRoleClient) MapCreateBulk(slice any, setFunc func(*OrgRoleCreate, int)) *OrgRoleCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgRoleClient) Query

func (c *OrgRoleClient) Query() *OrgRoleQuery

Query returns a query builder for OrgRole.

func (*OrgRoleClient) QueryOrg

func (c *OrgRoleClient) QueryOrg(or *OrgRole) *OrgQuery

QueryOrg queries the org edge of a OrgRole.

func (*OrgRoleClient) QueryOrgRoleUser

func (c *OrgRoleClient) QueryOrgRoleUser(or *OrgRole) *OrgRoleUserQuery

QueryOrgRoleUser queries the org_role_user edge of a OrgRole.

func (*OrgRoleClient) QueryOrgUsers

func (c *OrgRoleClient) QueryOrgUsers(or *OrgRole) *OrgUserQuery

QueryOrgUsers queries the org_users edge of a OrgRole.

func (*OrgRoleClient) Update

func (c *OrgRoleClient) Update() *OrgRoleUpdate

Update returns an update builder for OrgRole.

func (*OrgRoleClient) UpdateOne

func (c *OrgRoleClient) UpdateOne(or *OrgRole) *OrgRoleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgRoleClient) UpdateOneID

func (c *OrgRoleClient) UpdateOneID(id int) *OrgRoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgRoleClient) Use

func (c *OrgRoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgrole.Hooks(f(g(h())))`.

type OrgRoleConnection

type OrgRoleConnection struct {
	Edges      []*OrgRoleEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

OrgRoleConnection is the connection containing edges to OrgRole.

type OrgRoleCreate

type OrgRoleCreate struct {
	// contains filtered or unexported fields
}

OrgRoleCreate is the builder for creating a OrgRole entity.

func (*OrgRoleCreate) AddOrgRoleUser

func (orc *OrgRoleCreate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgRoleCreate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleCreate) AddOrgRoleUserIDs

func (orc *OrgRoleCreate) AddOrgRoleUserIDs(ids ...int) *OrgRoleCreate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleCreate) AddOrgUserIDs

func (orc *OrgRoleCreate) AddOrgUserIDs(ids ...int) *OrgRoleCreate

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleCreate) AddOrgUsers

func (orc *OrgRoleCreate) AddOrgUsers(o ...*OrgUser) *OrgRoleCreate

AddOrgUsers adds the "org_users" edges to the OrgUser entity.

func (*OrgRoleCreate) Exec

func (orc *OrgRoleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleCreate) ExecX

func (orc *OrgRoleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleCreate) Mutation

func (orc *OrgRoleCreate) Mutation() *OrgRoleMutation

Mutation returns the OrgRoleMutation object of the builder.

func (*OrgRoleCreate) OnConflict

func (orc *OrgRoleCreate) OnConflict(opts ...sql.ConflictOption) *OrgRoleUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRole.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgRoleCreate) OnConflictColumns

func (orc *OrgRoleCreate) OnConflictColumns(columns ...string) *OrgRoleUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleCreate) Save

func (orc *OrgRoleCreate) Save(ctx context.Context) (*OrgRole, error)

Save creates the OrgRole in the database.

func (*OrgRoleCreate) SaveX

func (orc *OrgRoleCreate) SaveX(ctx context.Context) *OrgRole

SaveX calls Save and panics if Save returns an error.

func (*OrgRoleCreate) SetAppRoleID

func (orc *OrgRoleCreate) SetAppRoleID(i int) *OrgRoleCreate

SetAppRoleID sets the "app_role_id" field.

func (*OrgRoleCreate) SetComments

func (orc *OrgRoleCreate) SetComments(s string) *OrgRoleCreate

SetComments sets the "comments" field.

func (*OrgRoleCreate) SetCreatedAt

func (orc *OrgRoleCreate) SetCreatedAt(t time.Time) *OrgRoleCreate

SetCreatedAt sets the "created_at" field.

func (*OrgRoleCreate) SetCreatedBy

func (orc *OrgRoleCreate) SetCreatedBy(i int) *OrgRoleCreate

SetCreatedBy sets the "created_by" field.

func (*OrgRoleCreate) SetID

func (orc *OrgRoleCreate) SetID(i int) *OrgRoleCreate

SetID sets the "id" field.

func (*OrgRoleCreate) SetInput

SetInput applies the change-set in the CreateOrgRoleInput on the OrgRoleCreate builder.

func (*OrgRoleCreate) SetKind

func (orc *OrgRoleCreate) SetKind(o orgrole.Kind) *OrgRoleCreate

SetKind sets the "kind" field.

func (*OrgRoleCreate) SetName

func (orc *OrgRoleCreate) SetName(s string) *OrgRoleCreate

SetName sets the "name" field.

func (*OrgRoleCreate) SetNillableAppRoleID

func (orc *OrgRoleCreate) SetNillableAppRoleID(i *int) *OrgRoleCreate

SetNillableAppRoleID sets the "app_role_id" field if the given value is not nil.

func (*OrgRoleCreate) SetNillableComments

func (orc *OrgRoleCreate) SetNillableComments(s *string) *OrgRoleCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*OrgRoleCreate) SetNillableCreatedAt

func (orc *OrgRoleCreate) SetNillableCreatedAt(t *time.Time) *OrgRoleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgRoleCreate) SetNillableOrgID

func (orc *OrgRoleCreate) SetNillableOrgID(i *int) *OrgRoleCreate

SetNillableOrgID sets the "org_id" field if the given value is not nil.

func (*OrgRoleCreate) SetNillableUpdatedAt

func (orc *OrgRoleCreate) SetNillableUpdatedAt(t *time.Time) *OrgRoleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgRoleCreate) SetNillableUpdatedBy

func (orc *OrgRoleCreate) SetNillableUpdatedBy(i *int) *OrgRoleCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgRoleCreate) SetOrg

func (orc *OrgRoleCreate) SetOrg(o *Org) *OrgRoleCreate

SetOrg sets the "org" edge to the Org entity.

func (*OrgRoleCreate) SetOrgID

func (orc *OrgRoleCreate) SetOrgID(i int) *OrgRoleCreate

SetOrgID sets the "org_id" field.

func (*OrgRoleCreate) SetUpdatedAt

func (orc *OrgRoleCreate) SetUpdatedAt(t time.Time) *OrgRoleCreate

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleCreate) SetUpdatedBy

func (orc *OrgRoleCreate) SetUpdatedBy(i int) *OrgRoleCreate

SetUpdatedBy sets the "updated_by" field.

type OrgRoleCreateBulk

type OrgRoleCreateBulk struct {
	// contains filtered or unexported fields
}

OrgRoleCreateBulk is the builder for creating many OrgRole entities in bulk.

func (*OrgRoleCreateBulk) Exec

func (orcb *OrgRoleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleCreateBulk) ExecX

func (orcb *OrgRoleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleCreateBulk) OnConflict

func (orcb *OrgRoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgRoleUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRole.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgRoleCreateBulk) OnConflictColumns

func (orcb *OrgRoleCreateBulk) OnConflictColumns(columns ...string) *OrgRoleUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleCreateBulk) Save

func (orcb *OrgRoleCreateBulk) Save(ctx context.Context) ([]*OrgRole, error)

Save creates the OrgRole entities in the database.

func (*OrgRoleCreateBulk) SaveX

func (orcb *OrgRoleCreateBulk) SaveX(ctx context.Context) []*OrgRole

SaveX is like Save, but panics if an error occurs.

type OrgRoleDelete

type OrgRoleDelete struct {
	// contains filtered or unexported fields
}

OrgRoleDelete is the builder for deleting a OrgRole entity.

func (*OrgRoleDelete) Exec

func (ord *OrgRoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgRoleDelete) ExecX

func (ord *OrgRoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleDelete) Where

func (ord *OrgRoleDelete) Where(ps ...predicate.OrgRole) *OrgRoleDelete

Where appends a list predicates to the OrgRoleDelete builder.

type OrgRoleDeleteOne

type OrgRoleDeleteOne struct {
	// contains filtered or unexported fields
}

OrgRoleDeleteOne is the builder for deleting a single OrgRole entity.

func (*OrgRoleDeleteOne) Exec

func (ordo *OrgRoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgRoleDeleteOne) ExecX

func (ordo *OrgRoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleDeleteOne) Where

func (ordo *OrgRoleDeleteOne) Where(ps ...predicate.OrgRole) *OrgRoleDeleteOne

Where appends a list predicates to the OrgRoleDelete builder.

type OrgRoleEdge

type OrgRoleEdge struct {
	Node   *OrgRole `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

OrgRoleEdge is the edge representation of OrgRole.

type OrgRoleEdges

type OrgRoleEdges struct {
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// 组用户
	OrgUsers []*OrgUser `json:"org_users,omitempty"`
	// OrgRoleUser holds the value of the org_role_user edge.
	OrgRoleUser []*OrgRoleUser `json:"org_role_user,omitempty"`
	// contains filtered or unexported fields
}

OrgRoleEdges holds the relations/edges for other nodes in the graph.

func (OrgRoleEdges) OrgOrErr

func (e OrgRoleEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgRoleEdges) OrgRoleUserOrErr

func (e OrgRoleEdges) OrgRoleUserOrErr() ([]*OrgRoleUser, error)

OrgRoleUserOrErr returns the OrgRoleUser value or an error if the edge was not loaded in eager-loading.

func (OrgRoleEdges) OrgUsersOrErr

func (e OrgRoleEdges) OrgUsersOrErr() ([]*OrgUser, error)

OrgUsersOrErr returns the OrgUsers value or an error if the edge was not loaded in eager-loading.

type OrgRoleGroupBy

type OrgRoleGroupBy struct {
	// contains filtered or unexported fields
}

OrgRoleGroupBy is the group-by builder for OrgRole entities.

func (*OrgRoleGroupBy) Aggregate

func (orgb *OrgRoleGroupBy) Aggregate(fns ...AggregateFunc) *OrgRoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgRoleGroupBy) Bool

func (s *OrgRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) BoolX

func (s *OrgRoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleGroupBy) Bools

func (s *OrgRoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) BoolsX

func (s *OrgRoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleGroupBy) Float64

func (s *OrgRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) Float64X

func (s *OrgRoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleGroupBy) Float64s

func (s *OrgRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) Float64sX

func (s *OrgRoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleGroupBy) Int

func (s *OrgRoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) IntX

func (s *OrgRoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleGroupBy) Ints

func (s *OrgRoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) IntsX

func (s *OrgRoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleGroupBy) Scan

func (orgb *OrgRoleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleGroupBy) ScanX

func (s *OrgRoleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleGroupBy) String

func (s *OrgRoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) StringX

func (s *OrgRoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleGroupBy) Strings

func (s *OrgRoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleGroupBy) StringsX

func (s *OrgRoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleMutation

type OrgRoleMutation struct {
	// contains filtered or unexported fields
}

OrgRoleMutation represents an operation that mutates the OrgRole nodes in the graph.

func (*OrgRoleMutation) AddAppRoleID

func (m *OrgRoleMutation) AddAppRoleID(i int)

AddAppRoleID adds i to the "app_role_id" field.

func (*OrgRoleMutation) AddCreatedBy

func (m *OrgRoleMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OrgRoleMutation) AddField

func (m *OrgRoleMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleMutation) AddOrgRoleUserIDs

func (m *OrgRoleMutation) AddOrgRoleUserIDs(ids ...int)

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by ids.

func (*OrgRoleMutation) AddOrgUserIDs

func (m *OrgRoleMutation) AddOrgUserIDs(ids ...int)

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by ids.

func (*OrgRoleMutation) AddUpdatedBy

func (m *OrgRoleMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgRoleMutation) AddedAppRoleID

func (m *OrgRoleMutation) AddedAppRoleID() (r int, exists bool)

AddedAppRoleID returns the value that was added to the "app_role_id" field in this mutation.

func (*OrgRoleMutation) AddedCreatedBy

func (m *OrgRoleMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OrgRoleMutation) AddedEdges

func (m *OrgRoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgRoleMutation) AddedField

func (m *OrgRoleMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleMutation) AddedFields

func (m *OrgRoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgRoleMutation) AddedIDs

func (m *OrgRoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgRoleMutation) AddedUpdatedBy

func (m *OrgRoleMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OrgRoleMutation) AppRoleID

func (m *OrgRoleMutation) AppRoleID() (r int, exists bool)

AppRoleID returns the value of the "app_role_id" field in the mutation.

func (*OrgRoleMutation) AppRoleIDCleared

func (m *OrgRoleMutation) AppRoleIDCleared() bool

AppRoleIDCleared returns if the "app_role_id" field was cleared in this mutation.

func (*OrgRoleMutation) ClearAppRoleID

func (m *OrgRoleMutation) ClearAppRoleID()

ClearAppRoleID clears the value of the "app_role_id" field.

func (*OrgRoleMutation) ClearComments

func (m *OrgRoleMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*OrgRoleMutation) ClearEdge

func (m *OrgRoleMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgRoleMutation) ClearField

func (m *OrgRoleMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleMutation) ClearOrg

func (m *OrgRoleMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*OrgRoleMutation) ClearOrgID

func (m *OrgRoleMutation) ClearOrgID()

ClearOrgID clears the value of the "org_id" field.

func (*OrgRoleMutation) ClearOrgRoleUser

func (m *OrgRoleMutation) ClearOrgRoleUser()

ClearOrgRoleUser clears the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgRoleMutation) ClearOrgUsers

func (m *OrgRoleMutation) ClearOrgUsers()

ClearOrgUsers clears the "org_users" edge to the OrgUser entity.

func (*OrgRoleMutation) ClearUpdatedAt

func (m *OrgRoleMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleMutation) ClearUpdatedBy

func (m *OrgRoleMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleMutation) ClearedEdges

func (m *OrgRoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgRoleMutation) ClearedFields

func (m *OrgRoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgRoleMutation) Client

func (m OrgRoleMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgRoleMutation) Comments

func (m *OrgRoleMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*OrgRoleMutation) CommentsCleared

func (m *OrgRoleMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*OrgRoleMutation) CreatedAt

func (m *OrgRoleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgRoleMutation) CreatedBy

func (m *OrgRoleMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OrgRoleMutation) EdgeCleared

func (m *OrgRoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgRoleMutation) Field

func (m *OrgRoleMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleMutation) FieldCleared

func (m *OrgRoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgRoleMutation) Fields

func (m *OrgRoleMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgRoleMutation) ID

func (m *OrgRoleMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgRoleMutation) IDs

func (m *OrgRoleMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgRoleMutation) Kind

func (m *OrgRoleMutation) Kind() (r orgrole.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*OrgRoleMutation) Name

func (m *OrgRoleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*OrgRoleMutation) OldAppRoleID

func (m *OrgRoleMutation) OldAppRoleID(ctx context.Context) (v int, err error)

OldAppRoleID returns the old "app_role_id" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldComments

func (m *OrgRoleMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldCreatedAt

func (m *OrgRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldCreatedBy

func (m *OrgRoleMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldField

func (m *OrgRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgRoleMutation) OldKind

func (m *OrgRoleMutation) OldKind(ctx context.Context) (v orgrole.Kind, err error)

OldKind returns the old "kind" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldName

func (m *OrgRoleMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldOrgID

func (m *OrgRoleMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldUpdatedAt

func (m *OrgRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) OldUpdatedBy

func (m *OrgRoleMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the OrgRole entity. If the OrgRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleMutation) Op

func (m *OrgRoleMutation) Op() Op

Op returns the operation name.

func (*OrgRoleMutation) OrgCleared

func (m *OrgRoleMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*OrgRoleMutation) OrgID

func (m *OrgRoleMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgRoleMutation) OrgIDCleared

func (m *OrgRoleMutation) OrgIDCleared() bool

OrgIDCleared returns if the "org_id" field was cleared in this mutation.

func (*OrgRoleMutation) OrgIDs

func (m *OrgRoleMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*OrgRoleMutation) OrgRoleUserCleared

func (m *OrgRoleMutation) OrgRoleUserCleared() bool

OrgRoleUserCleared reports if the "org_role_user" edge to the OrgRoleUser entity was cleared.

func (*OrgRoleMutation) OrgRoleUserIDs

func (m *OrgRoleMutation) OrgRoleUserIDs() (ids []int)

OrgRoleUserIDs returns the "org_role_user" edge IDs in the mutation.

func (*OrgRoleMutation) OrgUsersCleared

func (m *OrgRoleMutation) OrgUsersCleared() bool

OrgUsersCleared reports if the "org_users" edge to the OrgUser entity was cleared.

func (*OrgRoleMutation) OrgUsersIDs

func (m *OrgRoleMutation) OrgUsersIDs() (ids []int)

OrgUsersIDs returns the "org_users" edge IDs in the mutation.

func (*OrgRoleMutation) RemoveOrgRoleUserIDs

func (m *OrgRoleMutation) RemoveOrgRoleUserIDs(ids ...int)

RemoveOrgRoleUserIDs removes the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleMutation) RemoveOrgUserIDs

func (m *OrgRoleMutation) RemoveOrgUserIDs(ids ...int)

RemoveOrgUserIDs removes the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleMutation) RemovedEdges

func (m *OrgRoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgRoleMutation) RemovedIDs

func (m *OrgRoleMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgRoleMutation) RemovedOrgRoleUserIDs

func (m *OrgRoleMutation) RemovedOrgRoleUserIDs() (ids []int)

RemovedOrgRoleUser returns the removed IDs of the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgRoleMutation) RemovedOrgUsersIDs

func (m *OrgRoleMutation) RemovedOrgUsersIDs() (ids []int)

RemovedOrgUsers returns the removed IDs of the "org_users" edge to the OrgUser entity.

func (*OrgRoleMutation) ResetAppRoleID

func (m *OrgRoleMutation) ResetAppRoleID()

ResetAppRoleID resets all changes to the "app_role_id" field.

func (*OrgRoleMutation) ResetComments

func (m *OrgRoleMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*OrgRoleMutation) ResetCreatedAt

func (m *OrgRoleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgRoleMutation) ResetCreatedBy

func (m *OrgRoleMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OrgRoleMutation) ResetEdge

func (m *OrgRoleMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgRoleMutation) ResetField

func (m *OrgRoleMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleMutation) ResetKind

func (m *OrgRoleMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*OrgRoleMutation) ResetName

func (m *OrgRoleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*OrgRoleMutation) ResetOrg

func (m *OrgRoleMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*OrgRoleMutation) ResetOrgID

func (m *OrgRoleMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgRoleMutation) ResetOrgRoleUser

func (m *OrgRoleMutation) ResetOrgRoleUser()

ResetOrgRoleUser resets all changes to the "org_role_user" edge.

func (*OrgRoleMutation) ResetOrgUsers

func (m *OrgRoleMutation) ResetOrgUsers()

ResetOrgUsers resets all changes to the "org_users" edge.

func (*OrgRoleMutation) ResetUpdatedAt

func (m *OrgRoleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrgRoleMutation) ResetUpdatedBy

func (m *OrgRoleMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OrgRoleMutation) SetAppRoleID

func (m *OrgRoleMutation) SetAppRoleID(i int)

SetAppRoleID sets the "app_role_id" field.

func (*OrgRoleMutation) SetComments

func (m *OrgRoleMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*OrgRoleMutation) SetCreatedAt

func (m *OrgRoleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgRoleMutation) SetCreatedBy

func (m *OrgRoleMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OrgRoleMutation) SetField

func (m *OrgRoleMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleMutation) SetID

func (m *OrgRoleMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgRole entities.

func (*OrgRoleMutation) SetKind

func (m *OrgRoleMutation) SetKind(o orgrole.Kind)

SetKind sets the "kind" field.

func (*OrgRoleMutation) SetName

func (m *OrgRoleMutation) SetName(s string)

SetName sets the "name" field.

func (*OrgRoleMutation) SetOp

func (m *OrgRoleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgRoleMutation) SetOrgID

func (m *OrgRoleMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgRoleMutation) SetUpdatedAt

func (m *OrgRoleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleMutation) SetUpdatedBy

func (m *OrgRoleMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (OrgRoleMutation) Tx

func (m OrgRoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgRoleMutation) Type

func (m *OrgRoleMutation) Type() string

Type returns the node type of this mutation (OrgRole).

func (*OrgRoleMutation) UpdatedAt

func (m *OrgRoleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrgRoleMutation) UpdatedAtCleared

func (m *OrgRoleMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OrgRoleMutation) UpdatedBy

func (m *OrgRoleMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OrgRoleMutation) UpdatedByCleared

func (m *OrgRoleMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OrgRoleMutation) Where

func (m *OrgRoleMutation) Where(ps ...predicate.OrgRole)

Where appends a list predicates to the OrgRoleMutation builder.

func (*OrgRoleMutation) WhereP

func (m *OrgRoleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgRoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgRoleOrder

type OrgRoleOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *OrgRoleOrderField `json:"field"`
}

OrgRoleOrder defines the ordering of OrgRole.

type OrgRoleOrderField

type OrgRoleOrderField struct {
	// Value extracts the ordering value from the given OrgRole.
	Value func(*OrgRole) (ent.Value, error)
	// contains filtered or unexported fields
}

OrgRoleOrderField defines the ordering field of OrgRole.

func (OrgRoleOrderField) MarshalGQL

func (f OrgRoleOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OrgRoleOrderField) String

func (f OrgRoleOrderField) String() string

String implement fmt.Stringer interface.

func (*OrgRoleOrderField) UnmarshalGQL

func (f *OrgRoleOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrgRolePaginateOption

type OrgRolePaginateOption func(*orgrolePager) error

OrgRolePaginateOption enables pagination customization.

func WithOrgRoleFilter

func WithOrgRoleFilter(filter func(*OrgRoleQuery) (*OrgRoleQuery, error)) OrgRolePaginateOption

WithOrgRoleFilter configures pagination filter.

func WithOrgRoleOrder

func WithOrgRoleOrder(order *OrgRoleOrder) OrgRolePaginateOption

WithOrgRoleOrder configures pagination ordering.

type OrgRoleQuery

type OrgRoleQuery struct {
	// contains filtered or unexported fields
}

OrgRoleQuery is the builder for querying OrgRole entities.

func (*OrgRoleQuery) Aggregate

func (orq *OrgRoleQuery) Aggregate(fns ...AggregateFunc) *OrgRoleSelect

Aggregate returns a OrgRoleSelect configured with the given aggregations.

func (*OrgRoleQuery) All

func (orq *OrgRoleQuery) All(ctx context.Context) ([]*OrgRole, error)

All executes the query and returns a list of OrgRoles.

func (*OrgRoleQuery) AllX

func (orq *OrgRoleQuery) AllX(ctx context.Context) []*OrgRole

AllX is like All, but panics if an error occurs.

func (*OrgRoleQuery) Clone

func (orq *OrgRoleQuery) Clone() *OrgRoleQuery

Clone returns a duplicate of the OrgRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgRoleQuery) CollectFields

func (or *OrgRoleQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrgRoleQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OrgRoleQuery) Count

func (orq *OrgRoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgRoleQuery) CountX

func (orq *OrgRoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgRoleQuery) Exist

func (orq *OrgRoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgRoleQuery) ExistX

func (orq *OrgRoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgRoleQuery) First

func (orq *OrgRoleQuery) First(ctx context.Context) (*OrgRole, error)

First returns the first OrgRole entity from the query. Returns a *NotFoundError when no OrgRole was found.

func (*OrgRoleQuery) FirstID

func (orq *OrgRoleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgRole ID from the query. Returns a *NotFoundError when no OrgRole ID was found.

func (*OrgRoleQuery) FirstIDX

func (orq *OrgRoleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgRoleQuery) FirstX

func (orq *OrgRoleQuery) FirstX(ctx context.Context) *OrgRole

FirstX is like First, but panics if an error occurs.

func (*OrgRoleQuery) GroupBy

func (orq *OrgRoleQuery) GroupBy(field string, fields ...string) *OrgRoleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgRole.Query().
	GroupBy(orgrole.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgRoleQuery) IDs

func (orq *OrgRoleQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgRole IDs.

func (*OrgRoleQuery) IDsX

func (orq *OrgRoleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgRoleQuery) Limit

func (orq *OrgRoleQuery) Limit(limit int) *OrgRoleQuery

Limit the number of records to be returned by this query.

func (*OrgRoleQuery) Offset

func (orq *OrgRoleQuery) Offset(offset int) *OrgRoleQuery

Offset to start from.

func (*OrgRoleQuery) Only

func (orq *OrgRoleQuery) Only(ctx context.Context) (*OrgRole, error)

Only returns a single OrgRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgRole entity is found. Returns a *NotFoundError when no OrgRole entities are found.

func (*OrgRoleQuery) OnlyID

func (orq *OrgRoleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgRole ID in the query. Returns a *NotSingularError when more than one OrgRole ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgRoleQuery) OnlyIDX

func (orq *OrgRoleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgRoleQuery) OnlyX

func (orq *OrgRoleQuery) OnlyX(ctx context.Context) *OrgRole

OnlyX is like Only, but panics if an error occurs.

func (*OrgRoleQuery) Order

func (orq *OrgRoleQuery) Order(o ...orgrole.OrderOption) *OrgRoleQuery

Order specifies how the records should be ordered.

func (*OrgRoleQuery) Paginate

func (or *OrgRoleQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OrgRolePaginateOption,
) (*OrgRoleConnection, error)

Paginate executes the query and returns a relay based cursor connection to OrgRole.

func (*OrgRoleQuery) QueryOrg

func (orq *OrgRoleQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*OrgRoleQuery) QueryOrgRoleUser

func (orq *OrgRoleQuery) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser chains the current query on the "org_role_user" edge.

func (*OrgRoleQuery) QueryOrgUsers

func (orq *OrgRoleQuery) QueryOrgUsers() *OrgUserQuery

QueryOrgUsers chains the current query on the "org_users" edge.

func (*OrgRoleQuery) Select

func (orq *OrgRoleQuery) Select(fields ...string) *OrgRoleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.OrgRole.Query().
	Select(orgrole.FieldCreatedBy).
	Scan(ctx, &v)

func (*OrgRoleQuery) Unique

func (orq *OrgRoleQuery) Unique(unique bool) *OrgRoleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgRoleQuery) Where

func (orq *OrgRoleQuery) Where(ps ...predicate.OrgRole) *OrgRoleQuery

Where adds a new predicate for the OrgRoleQuery builder.

func (*OrgRoleQuery) WithNamedOrgRoleUser

func (orq *OrgRoleQuery) WithNamedOrgRoleUser(name string, opts ...func(*OrgRoleUserQuery)) *OrgRoleQuery

WithNamedOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleQuery) WithNamedOrgUsers

func (orq *OrgRoleQuery) WithNamedOrgUsers(name string, opts ...func(*OrgUserQuery)) *OrgRoleQuery

WithNamedOrgUsers tells the query-builder to eager-load the nodes that are connected to the "org_users" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleQuery) WithOrg

func (orq *OrgRoleQuery) WithOrg(opts ...func(*OrgQuery)) *OrgRoleQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleQuery) WithOrgRoleUser

func (orq *OrgRoleQuery) WithOrgRoleUser(opts ...func(*OrgRoleUserQuery)) *OrgRoleQuery

WithOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleQuery) WithOrgUsers

func (orq *OrgRoleQuery) WithOrgUsers(opts ...func(*OrgUserQuery)) *OrgRoleQuery

WithOrgUsers tells the query-builder to eager-load the nodes that are connected to the "org_users" edge. The optional arguments are used to configure the query builder of the edge.

type OrgRoleSelect

type OrgRoleSelect struct {
	*OrgRoleQuery
	// contains filtered or unexported fields
}

OrgRoleSelect is the builder for selecting fields of OrgRole entities.

func (*OrgRoleSelect) Aggregate

func (ors *OrgRoleSelect) Aggregate(fns ...AggregateFunc) *OrgRoleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgRoleSelect) Bool

func (s *OrgRoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) BoolX

func (s *OrgRoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleSelect) Bools

func (s *OrgRoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) BoolsX

func (s *OrgRoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleSelect) Float64

func (s *OrgRoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) Float64X

func (s *OrgRoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleSelect) Float64s

func (s *OrgRoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) Float64sX

func (s *OrgRoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleSelect) Int

func (s *OrgRoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) IntX

func (s *OrgRoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleSelect) Ints

func (s *OrgRoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) IntsX

func (s *OrgRoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleSelect) Scan

func (ors *OrgRoleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleSelect) ScanX

func (s *OrgRoleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleSelect) String

func (s *OrgRoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) StringX

func (s *OrgRoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleSelect) Strings

func (s *OrgRoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleSelect) StringsX

func (s *OrgRoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUpdate

type OrgRoleUpdate struct {
	// contains filtered or unexported fields
}

OrgRoleUpdate is the builder for updating OrgRole entities.

func (*OrgRoleUpdate) AddAppRoleID

func (oru *OrgRoleUpdate) AddAppRoleID(i int) *OrgRoleUpdate

AddAppRoleID adds i to the "app_role_id" field.

func (*OrgRoleUpdate) AddOrgRoleUser

func (oru *OrgRoleUpdate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdate) AddOrgRoleUserIDs

func (oru *OrgRoleUpdate) AddOrgRoleUserIDs(ids ...int) *OrgRoleUpdate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleUpdate) AddOrgUserIDs

func (oru *OrgRoleUpdate) AddOrgUserIDs(ids ...int) *OrgRoleUpdate

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleUpdate) AddOrgUsers

func (oru *OrgRoleUpdate) AddOrgUsers(o ...*OrgUser) *OrgRoleUpdate

AddOrgUsers adds the "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdate) AddUpdatedBy

func (oru *OrgRoleUpdate) AddUpdatedBy(i int) *OrgRoleUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgRoleUpdate) ClearAppRoleID

func (oru *OrgRoleUpdate) ClearAppRoleID() *OrgRoleUpdate

ClearAppRoleID clears the value of the "app_role_id" field.

func (*OrgRoleUpdate) ClearComments

func (oru *OrgRoleUpdate) ClearComments() *OrgRoleUpdate

ClearComments clears the value of the "comments" field.

func (*OrgRoleUpdate) ClearOrgRoleUser

func (oru *OrgRoleUpdate) ClearOrgRoleUser() *OrgRoleUpdate

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdate) ClearOrgUsers

func (oru *OrgRoleUpdate) ClearOrgUsers() *OrgRoleUpdate

ClearOrgUsers clears all "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdate) ClearUpdatedAt

func (oru *OrgRoleUpdate) ClearUpdatedAt() *OrgRoleUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUpdate) ClearUpdatedBy

func (oru *OrgRoleUpdate) ClearUpdatedBy() *OrgRoleUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUpdate) Exec

func (oru *OrgRoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUpdate) ExecX

func (oru *OrgRoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpdate) Mutation

func (oru *OrgRoleUpdate) Mutation() *OrgRoleMutation

Mutation returns the OrgRoleMutation object of the builder.

func (*OrgRoleUpdate) RemoveOrgRoleUser

func (oru *OrgRoleUpdate) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdate

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgRoleUpdate) RemoveOrgRoleUserIDs

func (oru *OrgRoleUpdate) RemoveOrgRoleUserIDs(ids ...int) *OrgRoleUpdate

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgRoleUpdate) RemoveOrgUserIDs

func (oru *OrgRoleUpdate) RemoveOrgUserIDs(ids ...int) *OrgRoleUpdate

RemoveOrgUserIDs removes the "org_users" edge to OrgUser entities by IDs.

func (*OrgRoleUpdate) RemoveOrgUsers

func (oru *OrgRoleUpdate) RemoveOrgUsers(o ...*OrgUser) *OrgRoleUpdate

RemoveOrgUsers removes "org_users" edges to OrgUser entities.

func (*OrgRoleUpdate) Save

func (oru *OrgRoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgRoleUpdate) SaveX

func (oru *OrgRoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUpdate) SetAppRoleID

func (oru *OrgRoleUpdate) SetAppRoleID(i int) *OrgRoleUpdate

SetAppRoleID sets the "app_role_id" field.

func (*OrgRoleUpdate) SetComments

func (oru *OrgRoleUpdate) SetComments(s string) *OrgRoleUpdate

SetComments sets the "comments" field.

func (*OrgRoleUpdate) SetInput

SetInput applies the change-set in the UpdateOrgRoleInput on the OrgRoleUpdate builder.

func (*OrgRoleUpdate) SetKind

func (oru *OrgRoleUpdate) SetKind(o orgrole.Kind) *OrgRoleUpdate

SetKind sets the "kind" field.

func (*OrgRoleUpdate) SetName

func (oru *OrgRoleUpdate) SetName(s string) *OrgRoleUpdate

SetName sets the "name" field.

func (*OrgRoleUpdate) SetNillableAppRoleID

func (oru *OrgRoleUpdate) SetNillableAppRoleID(i *int) *OrgRoleUpdate

SetNillableAppRoleID sets the "app_role_id" field if the given value is not nil.

func (*OrgRoleUpdate) SetNillableComments

func (oru *OrgRoleUpdate) SetNillableComments(s *string) *OrgRoleUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*OrgRoleUpdate) SetNillableUpdatedAt

func (oru *OrgRoleUpdate) SetNillableUpdatedAt(t *time.Time) *OrgRoleUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgRoleUpdate) SetNillableUpdatedBy

func (oru *OrgRoleUpdate) SetNillableUpdatedBy(i *int) *OrgRoleUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgRoleUpdate) SetUpdatedAt

func (oru *OrgRoleUpdate) SetUpdatedAt(t time.Time) *OrgRoleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUpdate) SetUpdatedBy

func (oru *OrgRoleUpdate) SetUpdatedBy(i int) *OrgRoleUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUpdate) Where

func (oru *OrgRoleUpdate) Where(ps ...predicate.OrgRole) *OrgRoleUpdate

Where appends a list predicates to the OrgRoleUpdate builder.

type OrgRoleUpdateOne

type OrgRoleUpdateOne struct {
	// contains filtered or unexported fields
}

OrgRoleUpdateOne is the builder for updating a single OrgRole entity.

func (*OrgRoleUpdateOne) AddAppRoleID

func (oruo *OrgRoleUpdateOne) AddAppRoleID(i int) *OrgRoleUpdateOne

AddAppRoleID adds i to the "app_role_id" field.

func (*OrgRoleUpdateOne) AddOrgRoleUser

func (oruo *OrgRoleUpdateOne) AddOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdateOne

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdateOne) AddOrgRoleUserIDs

func (oruo *OrgRoleUpdateOne) AddOrgRoleUserIDs(ids ...int) *OrgRoleUpdateOne

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgRoleUpdateOne) AddOrgUserIDs

func (oruo *OrgRoleUpdateOne) AddOrgUserIDs(ids ...int) *OrgRoleUpdateOne

AddOrgUserIDs adds the "org_users" edge to the OrgUser entity by IDs.

func (*OrgRoleUpdateOne) AddOrgUsers

func (oruo *OrgRoleUpdateOne) AddOrgUsers(o ...*OrgUser) *OrgRoleUpdateOne

AddOrgUsers adds the "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdateOne) AddUpdatedBy

func (oruo *OrgRoleUpdateOne) AddUpdatedBy(i int) *OrgRoleUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgRoleUpdateOne) ClearAppRoleID

func (oruo *OrgRoleUpdateOne) ClearAppRoleID() *OrgRoleUpdateOne

ClearAppRoleID clears the value of the "app_role_id" field.

func (*OrgRoleUpdateOne) ClearComments

func (oruo *OrgRoleUpdateOne) ClearComments() *OrgRoleUpdateOne

ClearComments clears the value of the "comments" field.

func (*OrgRoleUpdateOne) ClearOrgRoleUser

func (oruo *OrgRoleUpdateOne) ClearOrgRoleUser() *OrgRoleUpdateOne

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgRoleUpdateOne) ClearOrgUsers

func (oruo *OrgRoleUpdateOne) ClearOrgUsers() *OrgRoleUpdateOne

ClearOrgUsers clears all "org_users" edges to the OrgUser entity.

func (*OrgRoleUpdateOne) ClearUpdatedAt

func (oruo *OrgRoleUpdateOne) ClearUpdatedAt() *OrgRoleUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUpdateOne) ClearUpdatedBy

func (oruo *OrgRoleUpdateOne) ClearUpdatedBy() *OrgRoleUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUpdateOne) Exec

func (oruo *OrgRoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgRoleUpdateOne) ExecX

func (oruo *OrgRoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpdateOne) Mutation

func (oruo *OrgRoleUpdateOne) Mutation() *OrgRoleMutation

Mutation returns the OrgRoleMutation object of the builder.

func (*OrgRoleUpdateOne) RemoveOrgRoleUser

func (oruo *OrgRoleUpdateOne) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgRoleUpdateOne

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgRoleUpdateOne) RemoveOrgRoleUserIDs

func (oruo *OrgRoleUpdateOne) RemoveOrgRoleUserIDs(ids ...int) *OrgRoleUpdateOne

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgRoleUpdateOne) RemoveOrgUserIDs

func (oruo *OrgRoleUpdateOne) RemoveOrgUserIDs(ids ...int) *OrgRoleUpdateOne

RemoveOrgUserIDs removes the "org_users" edge to OrgUser entities by IDs.

func (*OrgRoleUpdateOne) RemoveOrgUsers

func (oruo *OrgRoleUpdateOne) RemoveOrgUsers(o ...*OrgUser) *OrgRoleUpdateOne

RemoveOrgUsers removes "org_users" edges to OrgUser entities.

func (*OrgRoleUpdateOne) Save

func (oruo *OrgRoleUpdateOne) Save(ctx context.Context) (*OrgRole, error)

Save executes the query and returns the updated OrgRole entity.

func (*OrgRoleUpdateOne) SaveX

func (oruo *OrgRoleUpdateOne) SaveX(ctx context.Context) *OrgRole

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUpdateOne) Select

func (oruo *OrgRoleUpdateOne) Select(field string, fields ...string) *OrgRoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgRoleUpdateOne) SetAppRoleID

func (oruo *OrgRoleUpdateOne) SetAppRoleID(i int) *OrgRoleUpdateOne

SetAppRoleID sets the "app_role_id" field.

func (*OrgRoleUpdateOne) SetComments

func (oruo *OrgRoleUpdateOne) SetComments(s string) *OrgRoleUpdateOne

SetComments sets the "comments" field.

func (*OrgRoleUpdateOne) SetInput

SetInput applies the change-set in the UpdateOrgRoleInput on the OrgRoleUpdateOne builder.

func (*OrgRoleUpdateOne) SetKind

func (oruo *OrgRoleUpdateOne) SetKind(o orgrole.Kind) *OrgRoleUpdateOne

SetKind sets the "kind" field.

func (*OrgRoleUpdateOne) SetName

func (oruo *OrgRoleUpdateOne) SetName(s string) *OrgRoleUpdateOne

SetName sets the "name" field.

func (*OrgRoleUpdateOne) SetNillableAppRoleID

func (oruo *OrgRoleUpdateOne) SetNillableAppRoleID(i *int) *OrgRoleUpdateOne

SetNillableAppRoleID sets the "app_role_id" field if the given value is not nil.

func (*OrgRoleUpdateOne) SetNillableComments

func (oruo *OrgRoleUpdateOne) SetNillableComments(s *string) *OrgRoleUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*OrgRoleUpdateOne) SetNillableUpdatedAt

func (oruo *OrgRoleUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrgRoleUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgRoleUpdateOne) SetNillableUpdatedBy

func (oruo *OrgRoleUpdateOne) SetNillableUpdatedBy(i *int) *OrgRoleUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgRoleUpdateOne) SetUpdatedAt

func (oruo *OrgRoleUpdateOne) SetUpdatedAt(t time.Time) *OrgRoleUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUpdateOne) SetUpdatedBy

func (oruo *OrgRoleUpdateOne) SetUpdatedBy(i int) *OrgRoleUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUpdateOne) Where

func (oruo *OrgRoleUpdateOne) Where(ps ...predicate.OrgRole) *OrgRoleUpdateOne

Where appends a list predicates to the OrgRoleUpdate builder.

type OrgRoleUpsert

type OrgRoleUpsert struct {
	*sql.UpdateSet
}

OrgRoleUpsert is the "OnConflict" setter.

func (*OrgRoleUpsert) AddAppRoleID

func (u *OrgRoleUpsert) AddAppRoleID(v int) *OrgRoleUpsert

AddAppRoleID adds v to the "app_role_id" field.

func (*OrgRoleUpsert) AddUpdatedBy

func (u *OrgRoleUpsert) AddUpdatedBy(v int) *OrgRoleUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgRoleUpsert) ClearAppRoleID

func (u *OrgRoleUpsert) ClearAppRoleID() *OrgRoleUpsert

ClearAppRoleID clears the value of the "app_role_id" field.

func (*OrgRoleUpsert) ClearComments

func (u *OrgRoleUpsert) ClearComments() *OrgRoleUpsert

ClearComments clears the value of the "comments" field.

func (*OrgRoleUpsert) ClearUpdatedAt

func (u *OrgRoleUpsert) ClearUpdatedAt() *OrgRoleUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUpsert) ClearUpdatedBy

func (u *OrgRoleUpsert) ClearUpdatedBy() *OrgRoleUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUpsert) SetAppRoleID

func (u *OrgRoleUpsert) SetAppRoleID(v int) *OrgRoleUpsert

SetAppRoleID sets the "app_role_id" field.

func (*OrgRoleUpsert) SetComments

func (u *OrgRoleUpsert) SetComments(v string) *OrgRoleUpsert

SetComments sets the "comments" field.

func (*OrgRoleUpsert) SetKind

func (u *OrgRoleUpsert) SetKind(v orgrole.Kind) *OrgRoleUpsert

SetKind sets the "kind" field.

func (*OrgRoleUpsert) SetName

func (u *OrgRoleUpsert) SetName(v string) *OrgRoleUpsert

SetName sets the "name" field.

func (*OrgRoleUpsert) SetUpdatedAt

func (u *OrgRoleUpsert) SetUpdatedAt(v time.Time) *OrgRoleUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUpsert) SetUpdatedBy

func (u *OrgRoleUpsert) SetUpdatedBy(v int) *OrgRoleUpsert

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUpsert) UpdateAppRoleID

func (u *OrgRoleUpsert) UpdateAppRoleID() *OrgRoleUpsert

UpdateAppRoleID sets the "app_role_id" field to the value that was provided on create.

func (*OrgRoleUpsert) UpdateComments

func (u *OrgRoleUpsert) UpdateComments() *OrgRoleUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*OrgRoleUpsert) UpdateKind

func (u *OrgRoleUpsert) UpdateKind() *OrgRoleUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgRoleUpsert) UpdateName

func (u *OrgRoleUpsert) UpdateName() *OrgRoleUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgRoleUpsert) UpdateUpdatedAt

func (u *OrgRoleUpsert) UpdateUpdatedAt() *OrgRoleUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgRoleUpsert) UpdateUpdatedBy

func (u *OrgRoleUpsert) UpdateUpdatedBy() *OrgRoleUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgRoleUpsertBulk

type OrgRoleUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUpsertBulk is the builder for "upsert"-ing a bulk of OrgRole nodes.

func (*OrgRoleUpsertBulk) AddAppRoleID

func (u *OrgRoleUpsertBulk) AddAppRoleID(v int) *OrgRoleUpsertBulk

AddAppRoleID adds v to the "app_role_id" field.

func (*OrgRoleUpsertBulk) AddUpdatedBy

func (u *OrgRoleUpsertBulk) AddUpdatedBy(v int) *OrgRoleUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgRoleUpsertBulk) ClearAppRoleID

func (u *OrgRoleUpsertBulk) ClearAppRoleID() *OrgRoleUpsertBulk

ClearAppRoleID clears the value of the "app_role_id" field.

func (*OrgRoleUpsertBulk) ClearComments

func (u *OrgRoleUpsertBulk) ClearComments() *OrgRoleUpsertBulk

ClearComments clears the value of the "comments" field.

func (*OrgRoleUpsertBulk) ClearUpdatedAt

func (u *OrgRoleUpsertBulk) ClearUpdatedAt() *OrgRoleUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUpsertBulk) ClearUpdatedBy

func (u *OrgRoleUpsertBulk) ClearUpdatedBy() *OrgRoleUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUpsertBulk) DoNothing

func (u *OrgRoleUpsertBulk) DoNothing() *OrgRoleUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUpsertBulk) Exec

func (u *OrgRoleUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUpsertBulk) ExecX

func (u *OrgRoleUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpsertBulk) Ignore

func (u *OrgRoleUpsertBulk) Ignore() *OrgRoleUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgRoleUpsertBulk) SetAppRoleID

func (u *OrgRoleUpsertBulk) SetAppRoleID(v int) *OrgRoleUpsertBulk

SetAppRoleID sets the "app_role_id" field.

func (*OrgRoleUpsertBulk) SetComments

func (u *OrgRoleUpsertBulk) SetComments(v string) *OrgRoleUpsertBulk

SetComments sets the "comments" field.

func (*OrgRoleUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*OrgRoleUpsertBulk) SetName

SetName sets the "name" field.

func (*OrgRoleUpsertBulk) SetUpdatedAt

func (u *OrgRoleUpsertBulk) SetUpdatedAt(v time.Time) *OrgRoleUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUpsertBulk) SetUpdatedBy

func (u *OrgRoleUpsertBulk) SetUpdatedBy(v int) *OrgRoleUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUpsertBulk) Update

func (u *OrgRoleUpsertBulk) Update(set func(*OrgRoleUpsert)) *OrgRoleUpsertBulk

Update allows overriding fields `UPDATE` values. See the OrgRoleCreateBulk.OnConflict documentation for more info.

func (*OrgRoleUpsertBulk) UpdateAppRoleID

func (u *OrgRoleUpsertBulk) UpdateAppRoleID() *OrgRoleUpsertBulk

UpdateAppRoleID sets the "app_role_id" field to the value that was provided on create.

func (*OrgRoleUpsertBulk) UpdateComments

func (u *OrgRoleUpsertBulk) UpdateComments() *OrgRoleUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*OrgRoleUpsertBulk) UpdateKind

func (u *OrgRoleUpsertBulk) UpdateKind() *OrgRoleUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgRoleUpsertBulk) UpdateName

func (u *OrgRoleUpsertBulk) UpdateName() *OrgRoleUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgRoleUpsertBulk) UpdateNewValues

func (u *OrgRoleUpsertBulk) UpdateNewValues() *OrgRoleUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgrole.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUpsertBulk) UpdateUpdatedAt

func (u *OrgRoleUpsertBulk) UpdateUpdatedAt() *OrgRoleUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgRoleUpsertBulk) UpdateUpdatedBy

func (u *OrgRoleUpsertBulk) UpdateUpdatedBy() *OrgRoleUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgRoleUpsertOne

type OrgRoleUpsertOne struct {
	// contains filtered or unexported fields
}

OrgRoleUpsertOne is the builder for "upsert"-ing

one OrgRole node.

func (*OrgRoleUpsertOne) AddAppRoleID

func (u *OrgRoleUpsertOne) AddAppRoleID(v int) *OrgRoleUpsertOne

AddAppRoleID adds v to the "app_role_id" field.

func (*OrgRoleUpsertOne) AddUpdatedBy

func (u *OrgRoleUpsertOne) AddUpdatedBy(v int) *OrgRoleUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgRoleUpsertOne) ClearAppRoleID

func (u *OrgRoleUpsertOne) ClearAppRoleID() *OrgRoleUpsertOne

ClearAppRoleID clears the value of the "app_role_id" field.

func (*OrgRoleUpsertOne) ClearComments

func (u *OrgRoleUpsertOne) ClearComments() *OrgRoleUpsertOne

ClearComments clears the value of the "comments" field.

func (*OrgRoleUpsertOne) ClearUpdatedAt

func (u *OrgRoleUpsertOne) ClearUpdatedAt() *OrgRoleUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUpsertOne) ClearUpdatedBy

func (u *OrgRoleUpsertOne) ClearUpdatedBy() *OrgRoleUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUpsertOne) DoNothing

func (u *OrgRoleUpsertOne) DoNothing() *OrgRoleUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUpsertOne) Exec

func (u *OrgRoleUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUpsertOne) ExecX

func (u *OrgRoleUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUpsertOne) ID

func (u *OrgRoleUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgRoleUpsertOne) IDX

func (u *OrgRoleUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgRoleUpsertOne) Ignore

func (u *OrgRoleUpsertOne) Ignore() *OrgRoleUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRole.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgRoleUpsertOne) SetAppRoleID

func (u *OrgRoleUpsertOne) SetAppRoleID(v int) *OrgRoleUpsertOne

SetAppRoleID sets the "app_role_id" field.

func (*OrgRoleUpsertOne) SetComments

func (u *OrgRoleUpsertOne) SetComments(v string) *OrgRoleUpsertOne

SetComments sets the "comments" field.

func (*OrgRoleUpsertOne) SetKind

SetKind sets the "kind" field.

func (*OrgRoleUpsertOne) SetName

func (u *OrgRoleUpsertOne) SetName(v string) *OrgRoleUpsertOne

SetName sets the "name" field.

func (*OrgRoleUpsertOne) SetUpdatedAt

func (u *OrgRoleUpsertOne) SetUpdatedAt(v time.Time) *OrgRoleUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUpsertOne) SetUpdatedBy

func (u *OrgRoleUpsertOne) SetUpdatedBy(v int) *OrgRoleUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUpsertOne) Update

func (u *OrgRoleUpsertOne) Update(set func(*OrgRoleUpsert)) *OrgRoleUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgRoleCreate.OnConflict documentation for more info.

func (*OrgRoleUpsertOne) UpdateAppRoleID

func (u *OrgRoleUpsertOne) UpdateAppRoleID() *OrgRoleUpsertOne

UpdateAppRoleID sets the "app_role_id" field to the value that was provided on create.

func (*OrgRoleUpsertOne) UpdateComments

func (u *OrgRoleUpsertOne) UpdateComments() *OrgRoleUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*OrgRoleUpsertOne) UpdateKind

func (u *OrgRoleUpsertOne) UpdateKind() *OrgRoleUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgRoleUpsertOne) UpdateName

func (u *OrgRoleUpsertOne) UpdateName() *OrgRoleUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgRoleUpsertOne) UpdateNewValues

func (u *OrgRoleUpsertOne) UpdateNewValues() *OrgRoleUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgRole.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgrole.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUpsertOne) UpdateUpdatedAt

func (u *OrgRoleUpsertOne) UpdateUpdatedAt() *OrgRoleUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgRoleUpsertOne) UpdateUpdatedBy

func (u *OrgRoleUpsertOne) UpdateUpdatedBy() *OrgRoleUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgRoleUser

type OrgRoleUser struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 组织角色ID
	OrgRoleID int `json:"org_role_id,omitempty"`
	// 组织用户ID
	OrgUserID int `json:"org_user_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgRoleUserQuery when eager-loading is set.
	Edges OrgRoleUserEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgRoleUser is the model entity for the OrgRoleUser schema.

func (*OrgRoleUser) QueryOrg

func (oru *OrgRoleUser) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the OrgRoleUser entity.

func (*OrgRoleUser) QueryOrgRole

func (oru *OrgRoleUser) QueryOrgRole() *OrgRoleQuery

QueryOrgRole queries the "org_role" edge of the OrgRoleUser entity.

func (*OrgRoleUser) QueryOrgUser

func (oru *OrgRoleUser) QueryOrgUser() *OrgUserQuery

QueryOrgUser queries the "org_user" edge of the OrgRoleUser entity.

func (*OrgRoleUser) QueryUser

func (oru *OrgRoleUser) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OrgRoleUser entity.

func (*OrgRoleUser) String

func (oru *OrgRoleUser) String() string

String implements the fmt.Stringer.

func (*OrgRoleUser) Unwrap

func (oru *OrgRoleUser) Unwrap() *OrgRoleUser

Unwrap unwraps the OrgRoleUser entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgRoleUser) Update

func (oru *OrgRoleUser) Update() *OrgRoleUserUpdateOne

Update returns a builder for updating this OrgRoleUser. Note that you need to call OrgRoleUser.Unwrap() before calling this method if this OrgRoleUser was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgRoleUser) Value

func (oru *OrgRoleUser) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgRoleUser. This includes values selected through modifiers, order, etc.

type OrgRoleUserClient

type OrgRoleUserClient struct {
	// contains filtered or unexported fields
}

OrgRoleUserClient is a client for the OrgRoleUser schema.

func NewOrgRoleUserClient

func NewOrgRoleUserClient(c config) *OrgRoleUserClient

NewOrgRoleUserClient returns a client for the OrgRoleUser from the given config.

func (*OrgRoleUserClient) Create

func (c *OrgRoleUserClient) Create() *OrgRoleUserCreate

Create returns a builder for creating a OrgRoleUser entity.

func (*OrgRoleUserClient) CreateBulk

func (c *OrgRoleUserClient) CreateBulk(builders ...*OrgRoleUserCreate) *OrgRoleUserCreateBulk

CreateBulk returns a builder for creating a bulk of OrgRoleUser entities.

func (*OrgRoleUserClient) Delete

func (c *OrgRoleUserClient) Delete() *OrgRoleUserDelete

Delete returns a delete builder for OrgRoleUser.

func (*OrgRoleUserClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgRoleUserClient) DeleteOneID

func (c *OrgRoleUserClient) DeleteOneID(id int) *OrgRoleUserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgRoleUserClient) Get

func (c *OrgRoleUserClient) Get(ctx context.Context, id int) (*OrgRoleUser, error)

Get returns a OrgRoleUser entity by its id.

func (*OrgRoleUserClient) GetX

func (c *OrgRoleUserClient) GetX(ctx context.Context, id int) *OrgRoleUser

GetX is like Get, but panics if an error occurs.

func (*OrgRoleUserClient) Hooks

func (c *OrgRoleUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgRoleUserClient) Intercept

func (c *OrgRoleUserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgroleuser.Intercept(f(g(h())))`.

func (*OrgRoleUserClient) Interceptors

func (c *OrgRoleUserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgRoleUserClient) MapCreateBulk

func (c *OrgRoleUserClient) MapCreateBulk(slice any, setFunc func(*OrgRoleUserCreate, int)) *OrgRoleUserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgRoleUserClient) Query

func (c *OrgRoleUserClient) Query() *OrgRoleUserQuery

Query returns a query builder for OrgRoleUser.

func (*OrgRoleUserClient) QueryOrg

func (c *OrgRoleUserClient) QueryOrg(oru *OrgRoleUser) *OrgQuery

QueryOrg queries the org edge of a OrgRoleUser.

func (*OrgRoleUserClient) QueryOrgRole

func (c *OrgRoleUserClient) QueryOrgRole(oru *OrgRoleUser) *OrgRoleQuery

QueryOrgRole queries the org_role edge of a OrgRoleUser.

func (*OrgRoleUserClient) QueryOrgUser

func (c *OrgRoleUserClient) QueryOrgUser(oru *OrgRoleUser) *OrgUserQuery

QueryOrgUser queries the org_user edge of a OrgRoleUser.

func (*OrgRoleUserClient) QueryUser

func (c *OrgRoleUserClient) QueryUser(oru *OrgRoleUser) *UserQuery

QueryUser queries the user edge of a OrgRoleUser.

func (*OrgRoleUserClient) Update

func (c *OrgRoleUserClient) Update() *OrgRoleUserUpdate

Update returns an update builder for OrgRoleUser.

func (*OrgRoleUserClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgRoleUserClient) UpdateOneID

func (c *OrgRoleUserClient) UpdateOneID(id int) *OrgRoleUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgRoleUserClient) Use

func (c *OrgRoleUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgroleuser.Hooks(f(g(h())))`.

type OrgRoleUserCreate

type OrgRoleUserCreate struct {
	// contains filtered or unexported fields
}

OrgRoleUserCreate is the builder for creating a OrgRoleUser entity.

func (*OrgRoleUserCreate) Exec

func (oruc *OrgRoleUserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserCreate) ExecX

func (oruc *OrgRoleUserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserCreate) Mutation

func (oruc *OrgRoleUserCreate) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserCreate) OnConflict

func (oruc *OrgRoleUserCreate) OnConflict(opts ...sql.ConflictOption) *OrgRoleUserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRoleUser.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUserUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgRoleUserCreate) OnConflictColumns

func (oruc *OrgRoleUserCreate) OnConflictColumns(columns ...string) *OrgRoleUserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleUserCreate) Save

func (oruc *OrgRoleUserCreate) Save(ctx context.Context) (*OrgRoleUser, error)

Save creates the OrgRoleUser in the database.

func (*OrgRoleUserCreate) SaveX

func (oruc *OrgRoleUserCreate) SaveX(ctx context.Context) *OrgRoleUser

SaveX calls Save and panics if Save returns an error.

func (*OrgRoleUserCreate) SetCreatedAt

func (oruc *OrgRoleUserCreate) SetCreatedAt(t time.Time) *OrgRoleUserCreate

SetCreatedAt sets the "created_at" field.

func (*OrgRoleUserCreate) SetCreatedBy

func (oruc *OrgRoleUserCreate) SetCreatedBy(i int) *OrgRoleUserCreate

SetCreatedBy sets the "created_by" field.

func (*OrgRoleUserCreate) SetID

func (oruc *OrgRoleUserCreate) SetID(i int) *OrgRoleUserCreate

SetID sets the "id" field.

func (*OrgRoleUserCreate) SetNillableCreatedAt

func (oruc *OrgRoleUserCreate) SetNillableCreatedAt(t *time.Time) *OrgRoleUserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgRoleUserCreate) SetNillableUpdatedAt

func (oruc *OrgRoleUserCreate) SetNillableUpdatedAt(t *time.Time) *OrgRoleUserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgRoleUserCreate) SetNillableUpdatedBy

func (oruc *OrgRoleUserCreate) SetNillableUpdatedBy(i *int) *OrgRoleUserCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgRoleUserCreate) SetOrg

func (oruc *OrgRoleUserCreate) SetOrg(o *Org) *OrgRoleUserCreate

SetOrg sets the "org" edge to the Org entity.

func (*OrgRoleUserCreate) SetOrgID

func (oruc *OrgRoleUserCreate) SetOrgID(i int) *OrgRoleUserCreate

SetOrgID sets the "org_id" field.

func (*OrgRoleUserCreate) SetOrgRole

func (oruc *OrgRoleUserCreate) SetOrgRole(o *OrgRole) *OrgRoleUserCreate

SetOrgRole sets the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserCreate) SetOrgRoleID

func (oruc *OrgRoleUserCreate) SetOrgRoleID(i int) *OrgRoleUserCreate

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserCreate) SetOrgUser

func (oruc *OrgRoleUserCreate) SetOrgUser(o *OrgUser) *OrgRoleUserCreate

SetOrgUser sets the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserCreate) SetOrgUserID

func (oruc *OrgRoleUserCreate) SetOrgUserID(i int) *OrgRoleUserCreate

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserCreate) SetUpdatedAt

func (oruc *OrgRoleUserCreate) SetUpdatedAt(t time.Time) *OrgRoleUserCreate

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUserCreate) SetUpdatedBy

func (oruc *OrgRoleUserCreate) SetUpdatedBy(i int) *OrgRoleUserCreate

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUserCreate) SetUser

func (oruc *OrgRoleUserCreate) SetUser(u *User) *OrgRoleUserCreate

SetUser sets the "user" edge to the User entity.

func (*OrgRoleUserCreate) SetUserID

func (oruc *OrgRoleUserCreate) SetUserID(i int) *OrgRoleUserCreate

SetUserID sets the "user_id" field.

type OrgRoleUserCreateBulk

type OrgRoleUserCreateBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUserCreateBulk is the builder for creating many OrgRoleUser entities in bulk.

func (*OrgRoleUserCreateBulk) Exec

func (orucb *OrgRoleUserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserCreateBulk) ExecX

func (orucb *OrgRoleUserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserCreateBulk) OnConflict

func (orucb *OrgRoleUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgRoleUserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRoleUser.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUserUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgRoleUserCreateBulk) OnConflictColumns

func (orucb *OrgRoleUserCreateBulk) OnConflictColumns(columns ...string) *OrgRoleUserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleUserCreateBulk) Save

func (orucb *OrgRoleUserCreateBulk) Save(ctx context.Context) ([]*OrgRoleUser, error)

Save creates the OrgRoleUser entities in the database.

func (*OrgRoleUserCreateBulk) SaveX

func (orucb *OrgRoleUserCreateBulk) SaveX(ctx context.Context) []*OrgRoleUser

SaveX is like Save, but panics if an error occurs.

type OrgRoleUserDelete

type OrgRoleUserDelete struct {
	// contains filtered or unexported fields
}

OrgRoleUserDelete is the builder for deleting a OrgRoleUser entity.

func (*OrgRoleUserDelete) Exec

func (orud *OrgRoleUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgRoleUserDelete) ExecX

func (orud *OrgRoleUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserDelete) Where

Where appends a list predicates to the OrgRoleUserDelete builder.

type OrgRoleUserDeleteOne

type OrgRoleUserDeleteOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserDeleteOne is the builder for deleting a single OrgRoleUser entity.

func (*OrgRoleUserDeleteOne) Exec

func (orudo *OrgRoleUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgRoleUserDeleteOne) ExecX

func (orudo *OrgRoleUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserDeleteOne) Where

Where appends a list predicates to the OrgRoleUserDelete builder.

type OrgRoleUserEdges

type OrgRoleUserEdges struct {
	// OrgRole holds the value of the org_role edge.
	OrgRole *OrgRole `json:"org_role,omitempty"`
	// OrgUser holds the value of the org_user edge.
	OrgUser *OrgUser `json:"org_user,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// contains filtered or unexported fields
}

OrgRoleUserEdges holds the relations/edges for other nodes in the graph.

func (OrgRoleUserEdges) OrgOrErr

func (e OrgRoleUserEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgRoleUserEdges) OrgRoleOrErr

func (e OrgRoleUserEdges) OrgRoleOrErr() (*OrgRole, error)

OrgRoleOrErr returns the OrgRole value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgRoleUserEdges) OrgUserOrErr

func (e OrgRoleUserEdges) OrgUserOrErr() (*OrgUser, error)

OrgUserOrErr returns the OrgUser value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgRoleUserEdges) UserOrErr

func (e OrgRoleUserEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OrgRoleUserGroupBy

type OrgRoleUserGroupBy struct {
	// contains filtered or unexported fields
}

OrgRoleUserGroupBy is the group-by builder for OrgRoleUser entities.

func (*OrgRoleUserGroupBy) Aggregate

func (orugb *OrgRoleUserGroupBy) Aggregate(fns ...AggregateFunc) *OrgRoleUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgRoleUserGroupBy) Bool

func (s *OrgRoleUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) BoolX

func (s *OrgRoleUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Bools

func (s *OrgRoleUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) BoolsX

func (s *OrgRoleUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Float64

func (s *OrgRoleUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) Float64X

func (s *OrgRoleUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Float64s

func (s *OrgRoleUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) Float64sX

func (s *OrgRoleUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Int

func (s *OrgRoleUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) IntX

func (s *OrgRoleUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Ints

func (s *OrgRoleUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) IntsX

func (s *OrgRoleUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Scan

func (orugb *OrgRoleUserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleUserGroupBy) ScanX

func (s *OrgRoleUserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleUserGroupBy) String

func (s *OrgRoleUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) StringX

func (s *OrgRoleUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Strings

func (s *OrgRoleUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) StringsX

func (s *OrgRoleUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUserMutation

type OrgRoleUserMutation struct {
	// contains filtered or unexported fields
}

OrgRoleUserMutation represents an operation that mutates the OrgRoleUser nodes in the graph.

func (*OrgRoleUserMutation) AddCreatedBy

func (m *OrgRoleUserMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OrgRoleUserMutation) AddField

func (m *OrgRoleUserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleUserMutation) AddUpdatedBy

func (m *OrgRoleUserMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgRoleUserMutation) AddedCreatedBy

func (m *OrgRoleUserMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OrgRoleUserMutation) AddedEdges

func (m *OrgRoleUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgRoleUserMutation) AddedField

func (m *OrgRoleUserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleUserMutation) AddedFields

func (m *OrgRoleUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgRoleUserMutation) AddedIDs

func (m *OrgRoleUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgRoleUserMutation) AddedUpdatedBy

func (m *OrgRoleUserMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OrgRoleUserMutation) ClearEdge

func (m *OrgRoleUserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgRoleUserMutation) ClearField

func (m *OrgRoleUserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleUserMutation) ClearOrg

func (m *OrgRoleUserMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*OrgRoleUserMutation) ClearOrgRole

func (m *OrgRoleUserMutation) ClearOrgRole()

ClearOrgRole clears the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserMutation) ClearOrgUser

func (m *OrgRoleUserMutation) ClearOrgUser()

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserMutation) ClearUpdatedAt

func (m *OrgRoleUserMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUserMutation) ClearUpdatedBy

func (m *OrgRoleUserMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUserMutation) ClearUser

func (m *OrgRoleUserMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OrgRoleUserMutation) ClearedEdges

func (m *OrgRoleUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgRoleUserMutation) ClearedFields

func (m *OrgRoleUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgRoleUserMutation) Client

func (m OrgRoleUserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgRoleUserMutation) CreatedAt

func (m *OrgRoleUserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgRoleUserMutation) CreatedBy

func (m *OrgRoleUserMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OrgRoleUserMutation) EdgeCleared

func (m *OrgRoleUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgRoleUserMutation) Field

func (m *OrgRoleUserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgRoleUserMutation) FieldCleared

func (m *OrgRoleUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgRoleUserMutation) Fields

func (m *OrgRoleUserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgRoleUserMutation) ID

func (m *OrgRoleUserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgRoleUserMutation) IDs

func (m *OrgRoleUserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgRoleUserMutation) OldCreatedAt

func (m *OrgRoleUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldCreatedBy

func (m *OrgRoleUserMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldField

func (m *OrgRoleUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgRoleUserMutation) OldOrgID

func (m *OrgRoleUserMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldOrgRoleID

func (m *OrgRoleUserMutation) OldOrgRoleID(ctx context.Context) (v int, err error)

OldOrgRoleID returns the old "org_role_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldOrgUserID

func (m *OrgRoleUserMutation) OldOrgUserID(ctx context.Context) (v int, err error)

OldOrgUserID returns the old "org_user_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldUpdatedAt

func (m *OrgRoleUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldUpdatedBy

func (m *OrgRoleUserMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldUserID

func (m *OrgRoleUserMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) Op

func (m *OrgRoleUserMutation) Op() Op

Op returns the operation name.

func (*OrgRoleUserMutation) OrgCleared

func (m *OrgRoleUserMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*OrgRoleUserMutation) OrgID

func (m *OrgRoleUserMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgRoleUserMutation) OrgIDs

func (m *OrgRoleUserMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*OrgRoleUserMutation) OrgRoleCleared

func (m *OrgRoleUserMutation) OrgRoleCleared() bool

OrgRoleCleared reports if the "org_role" edge to the OrgRole entity was cleared.

func (*OrgRoleUserMutation) OrgRoleID

func (m *OrgRoleUserMutation) OrgRoleID() (r int, exists bool)

OrgRoleID returns the value of the "org_role_id" field in the mutation.

func (*OrgRoleUserMutation) OrgRoleIDs

func (m *OrgRoleUserMutation) OrgRoleIDs() (ids []int)

OrgRoleIDs returns the "org_role" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgRoleID instead. It exists only for internal usage by the builders.

func (*OrgRoleUserMutation) OrgUserCleared

func (m *OrgRoleUserMutation) OrgUserCleared() bool

OrgUserCleared reports if the "org_user" edge to the OrgUser entity was cleared.

func (*OrgRoleUserMutation) OrgUserID

func (m *OrgRoleUserMutation) OrgUserID() (r int, exists bool)

OrgUserID returns the value of the "org_user_id" field in the mutation.

func (*OrgRoleUserMutation) OrgUserIDs

func (m *OrgRoleUserMutation) OrgUserIDs() (ids []int)

OrgUserIDs returns the "org_user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgUserID instead. It exists only for internal usage by the builders.

func (*OrgRoleUserMutation) RemovedEdges

func (m *OrgRoleUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgRoleUserMutation) RemovedIDs

func (m *OrgRoleUserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgRoleUserMutation) ResetCreatedAt

func (m *OrgRoleUserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgRoleUserMutation) ResetCreatedBy

func (m *OrgRoleUserMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OrgRoleUserMutation) ResetEdge

func (m *OrgRoleUserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgRoleUserMutation) ResetField

func (m *OrgRoleUserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgRoleUserMutation) ResetOrg

func (m *OrgRoleUserMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*OrgRoleUserMutation) ResetOrgID

func (m *OrgRoleUserMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgRoleUserMutation) ResetOrgRole

func (m *OrgRoleUserMutation) ResetOrgRole()

ResetOrgRole resets all changes to the "org_role" edge.

func (*OrgRoleUserMutation) ResetOrgRoleID

func (m *OrgRoleUserMutation) ResetOrgRoleID()

ResetOrgRoleID resets all changes to the "org_role_id" field.

func (*OrgRoleUserMutation) ResetOrgUser

func (m *OrgRoleUserMutation) ResetOrgUser()

ResetOrgUser resets all changes to the "org_user" edge.

func (*OrgRoleUserMutation) ResetOrgUserID

func (m *OrgRoleUserMutation) ResetOrgUserID()

ResetOrgUserID resets all changes to the "org_user_id" field.

func (*OrgRoleUserMutation) ResetUpdatedAt

func (m *OrgRoleUserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrgRoleUserMutation) ResetUpdatedBy

func (m *OrgRoleUserMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OrgRoleUserMutation) ResetUser

func (m *OrgRoleUserMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OrgRoleUserMutation) ResetUserID

func (m *OrgRoleUserMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OrgRoleUserMutation) SetCreatedAt

func (m *OrgRoleUserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgRoleUserMutation) SetCreatedBy

func (m *OrgRoleUserMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OrgRoleUserMutation) SetField

func (m *OrgRoleUserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgRoleUserMutation) SetID

func (m *OrgRoleUserMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgRoleUser entities.

func (*OrgRoleUserMutation) SetOp

func (m *OrgRoleUserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgRoleUserMutation) SetOrgID

func (m *OrgRoleUserMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgRoleUserMutation) SetOrgRoleID

func (m *OrgRoleUserMutation) SetOrgRoleID(i int)

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserMutation) SetOrgUserID

func (m *OrgRoleUserMutation) SetOrgUserID(i int)

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserMutation) SetUpdatedAt

func (m *OrgRoleUserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUserMutation) SetUpdatedBy

func (m *OrgRoleUserMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUserMutation) SetUserID

func (m *OrgRoleUserMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (OrgRoleUserMutation) Tx

func (m OrgRoleUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgRoleUserMutation) Type

func (m *OrgRoleUserMutation) Type() string

Type returns the node type of this mutation (OrgRoleUser).

func (*OrgRoleUserMutation) UpdatedAt

func (m *OrgRoleUserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrgRoleUserMutation) UpdatedAtCleared

func (m *OrgRoleUserMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OrgRoleUserMutation) UpdatedBy

func (m *OrgRoleUserMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OrgRoleUserMutation) UpdatedByCleared

func (m *OrgRoleUserMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OrgRoleUserMutation) UserCleared

func (m *OrgRoleUserMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OrgRoleUserMutation) UserID

func (m *OrgRoleUserMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OrgRoleUserMutation) UserIDs

func (m *OrgRoleUserMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OrgRoleUserMutation) Where

func (m *OrgRoleUserMutation) Where(ps ...predicate.OrgRoleUser)

Where appends a list predicates to the OrgRoleUserMutation builder.

func (*OrgRoleUserMutation) WhereP

func (m *OrgRoleUserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgRoleUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgRoleUserQuery

type OrgRoleUserQuery struct {
	// contains filtered or unexported fields
}

OrgRoleUserQuery is the builder for querying OrgRoleUser entities.

func (*OrgRoleUserQuery) Aggregate

func (oruq *OrgRoleUserQuery) Aggregate(fns ...AggregateFunc) *OrgRoleUserSelect

Aggregate returns a OrgRoleUserSelect configured with the given aggregations.

func (*OrgRoleUserQuery) All

func (oruq *OrgRoleUserQuery) All(ctx context.Context) ([]*OrgRoleUser, error)

All executes the query and returns a list of OrgRoleUsers.

func (*OrgRoleUserQuery) AllX

func (oruq *OrgRoleUserQuery) AllX(ctx context.Context) []*OrgRoleUser

AllX is like All, but panics if an error occurs.

func (*OrgRoleUserQuery) Clone

func (oruq *OrgRoleUserQuery) Clone() *OrgRoleUserQuery

Clone returns a duplicate of the OrgRoleUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgRoleUserQuery) Count

func (oruq *OrgRoleUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgRoleUserQuery) CountX

func (oruq *OrgRoleUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgRoleUserQuery) Exist

func (oruq *OrgRoleUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgRoleUserQuery) ExistX

func (oruq *OrgRoleUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgRoleUserQuery) First

func (oruq *OrgRoleUserQuery) First(ctx context.Context) (*OrgRoleUser, error)

First returns the first OrgRoleUser entity from the query. Returns a *NotFoundError when no OrgRoleUser was found.

func (*OrgRoleUserQuery) FirstID

func (oruq *OrgRoleUserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgRoleUser ID from the query. Returns a *NotFoundError when no OrgRoleUser ID was found.

func (*OrgRoleUserQuery) FirstIDX

func (oruq *OrgRoleUserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgRoleUserQuery) FirstX

func (oruq *OrgRoleUserQuery) FirstX(ctx context.Context) *OrgRoleUser

FirstX is like First, but panics if an error occurs.

func (*OrgRoleUserQuery) GroupBy

func (oruq *OrgRoleUserQuery) GroupBy(field string, fields ...string) *OrgRoleUserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgRoleUser.Query().
	GroupBy(orgroleuser.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgRoleUserQuery) IDs

func (oruq *OrgRoleUserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgRoleUser IDs.

func (*OrgRoleUserQuery) IDsX

func (oruq *OrgRoleUserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgRoleUserQuery) Limit

func (oruq *OrgRoleUserQuery) Limit(limit int) *OrgRoleUserQuery

Limit the number of records to be returned by this query.

func (*OrgRoleUserQuery) Offset

func (oruq *OrgRoleUserQuery) Offset(offset int) *OrgRoleUserQuery

Offset to start from.

func (*OrgRoleUserQuery) Only

func (oruq *OrgRoleUserQuery) Only(ctx context.Context) (*OrgRoleUser, error)

Only returns a single OrgRoleUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgRoleUser entity is found. Returns a *NotFoundError when no OrgRoleUser entities are found.

func (*OrgRoleUserQuery) OnlyID

func (oruq *OrgRoleUserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgRoleUser ID in the query. Returns a *NotSingularError when more than one OrgRoleUser ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgRoleUserQuery) OnlyIDX

func (oruq *OrgRoleUserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgRoleUserQuery) OnlyX

func (oruq *OrgRoleUserQuery) OnlyX(ctx context.Context) *OrgRoleUser

OnlyX is like Only, but panics if an error occurs.

func (*OrgRoleUserQuery) Order

Order specifies how the records should be ordered.

func (*OrgRoleUserQuery) QueryOrg

func (oruq *OrgRoleUserQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*OrgRoleUserQuery) QueryOrgRole

func (oruq *OrgRoleUserQuery) QueryOrgRole() *OrgRoleQuery

QueryOrgRole chains the current query on the "org_role" edge.

func (*OrgRoleUserQuery) QueryOrgUser

func (oruq *OrgRoleUserQuery) QueryOrgUser() *OrgUserQuery

QueryOrgUser chains the current query on the "org_user" edge.

func (*OrgRoleUserQuery) QueryUser

func (oruq *OrgRoleUserQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OrgRoleUserQuery) Select

func (oruq *OrgRoleUserQuery) Select(fields ...string) *OrgRoleUserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.OrgRoleUser.Query().
	Select(orgroleuser.FieldCreatedBy).
	Scan(ctx, &v)

func (*OrgRoleUserQuery) Unique

func (oruq *OrgRoleUserQuery) Unique(unique bool) *OrgRoleUserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgRoleUserQuery) Where

Where adds a new predicate for the OrgRoleUserQuery builder.

func (*OrgRoleUserQuery) WithOrg

func (oruq *OrgRoleUserQuery) WithOrg(opts ...func(*OrgQuery)) *OrgRoleUserQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleUserQuery) WithOrgRole

func (oruq *OrgRoleUserQuery) WithOrgRole(opts ...func(*OrgRoleQuery)) *OrgRoleUserQuery

WithOrgRole tells the query-builder to eager-load the nodes that are connected to the "org_role" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleUserQuery) WithOrgUser

func (oruq *OrgRoleUserQuery) WithOrgUser(opts ...func(*OrgUserQuery)) *OrgRoleUserQuery

WithOrgUser tells the query-builder to eager-load the nodes that are connected to the "org_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgRoleUserQuery) WithUser

func (oruq *OrgRoleUserQuery) WithUser(opts ...func(*UserQuery)) *OrgRoleUserQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OrgRoleUserSelect

type OrgRoleUserSelect struct {
	*OrgRoleUserQuery
	// contains filtered or unexported fields
}

OrgRoleUserSelect is the builder for selecting fields of OrgRoleUser entities.

func (*OrgRoleUserSelect) Aggregate

func (orus *OrgRoleUserSelect) Aggregate(fns ...AggregateFunc) *OrgRoleUserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgRoleUserSelect) Bool

func (s *OrgRoleUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) BoolX

func (s *OrgRoleUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleUserSelect) Bools

func (s *OrgRoleUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) BoolsX

func (s *OrgRoleUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleUserSelect) Float64

func (s *OrgRoleUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) Float64X

func (s *OrgRoleUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleUserSelect) Float64s

func (s *OrgRoleUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) Float64sX

func (s *OrgRoleUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleUserSelect) Int

func (s *OrgRoleUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) IntX

func (s *OrgRoleUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleUserSelect) Ints

func (s *OrgRoleUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) IntsX

func (s *OrgRoleUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleUserSelect) Scan

func (orus *OrgRoleUserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleUserSelect) ScanX

func (s *OrgRoleUserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleUserSelect) String

func (s *OrgRoleUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) StringX

func (s *OrgRoleUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleUserSelect) Strings

func (s *OrgRoleUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) StringsX

func (s *OrgRoleUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUserUpdate

type OrgRoleUserUpdate struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpdate is the builder for updating OrgRoleUser entities.

func (*OrgRoleUserUpdate) AddUpdatedBy

func (oruu *OrgRoleUserUpdate) AddUpdatedBy(i int) *OrgRoleUserUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgRoleUserUpdate) ClearOrg

func (oruu *OrgRoleUserUpdate) ClearOrg() *OrgRoleUserUpdate

ClearOrg clears the "org" edge to the Org entity.

func (*OrgRoleUserUpdate) ClearOrgRole

func (oruu *OrgRoleUserUpdate) ClearOrgRole() *OrgRoleUserUpdate

ClearOrgRole clears the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdate) ClearOrgUser

func (oruu *OrgRoleUserUpdate) ClearOrgUser() *OrgRoleUserUpdate

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdate) ClearUpdatedAt

func (oruu *OrgRoleUserUpdate) ClearUpdatedAt() *OrgRoleUserUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUserUpdate) ClearUpdatedBy

func (oruu *OrgRoleUserUpdate) ClearUpdatedBy() *OrgRoleUserUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUserUpdate) ClearUser

func (oruu *OrgRoleUserUpdate) ClearUser() *OrgRoleUserUpdate

ClearUser clears the "user" edge to the User entity.

func (*OrgRoleUserUpdate) Exec

func (oruu *OrgRoleUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserUpdate) ExecX

func (oruu *OrgRoleUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpdate) Mutation

func (oruu *OrgRoleUserUpdate) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserUpdate) Save

func (oruu *OrgRoleUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgRoleUserUpdate) SaveX

func (oruu *OrgRoleUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUserUpdate) SetNillableUpdatedAt

func (oruu *OrgRoleUserUpdate) SetNillableUpdatedAt(t *time.Time) *OrgRoleUserUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgRoleUserUpdate) SetNillableUpdatedBy

func (oruu *OrgRoleUserUpdate) SetNillableUpdatedBy(i *int) *OrgRoleUserUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgRoleUserUpdate) SetOrg

func (oruu *OrgRoleUserUpdate) SetOrg(o *Org) *OrgRoleUserUpdate

SetOrg sets the "org" edge to the Org entity.

func (*OrgRoleUserUpdate) SetOrgID

func (oruu *OrgRoleUserUpdate) SetOrgID(i int) *OrgRoleUserUpdate

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpdate) SetOrgRole

func (oruu *OrgRoleUserUpdate) SetOrgRole(o *OrgRole) *OrgRoleUserUpdate

SetOrgRole sets the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdate) SetOrgRoleID

func (oruu *OrgRoleUserUpdate) SetOrgRoleID(i int) *OrgRoleUserUpdate

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpdate) SetOrgUser

func (oruu *OrgRoleUserUpdate) SetOrgUser(o *OrgUser) *OrgRoleUserUpdate

SetOrgUser sets the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdate) SetOrgUserID

func (oruu *OrgRoleUserUpdate) SetOrgUserID(i int) *OrgRoleUserUpdate

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpdate) SetUpdatedAt

func (oruu *OrgRoleUserUpdate) SetUpdatedAt(t time.Time) *OrgRoleUserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUserUpdate) SetUpdatedBy

func (oruu *OrgRoleUserUpdate) SetUpdatedBy(i int) *OrgRoleUserUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUserUpdate) SetUser

func (oruu *OrgRoleUserUpdate) SetUser(u *User) *OrgRoleUserUpdate

SetUser sets the "user" edge to the User entity.

func (*OrgRoleUserUpdate) SetUserID

func (oruu *OrgRoleUserUpdate) SetUserID(i int) *OrgRoleUserUpdate

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpdate) Where

Where appends a list predicates to the OrgRoleUserUpdate builder.

type OrgRoleUserUpdateOne

type OrgRoleUserUpdateOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpdateOne is the builder for updating a single OrgRoleUser entity.

func (*OrgRoleUserUpdateOne) AddUpdatedBy

func (oruuo *OrgRoleUserUpdateOne) AddUpdatedBy(i int) *OrgRoleUserUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgRoleUserUpdateOne) ClearOrg

func (oruuo *OrgRoleUserUpdateOne) ClearOrg() *OrgRoleUserUpdateOne

ClearOrg clears the "org" edge to the Org entity.

func (*OrgRoleUserUpdateOne) ClearOrgRole

func (oruuo *OrgRoleUserUpdateOne) ClearOrgRole() *OrgRoleUserUpdateOne

ClearOrgRole clears the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdateOne) ClearOrgUser

func (oruuo *OrgRoleUserUpdateOne) ClearOrgUser() *OrgRoleUserUpdateOne

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdateOne) ClearUpdatedAt

func (oruuo *OrgRoleUserUpdateOne) ClearUpdatedAt() *OrgRoleUserUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUserUpdateOne) ClearUpdatedBy

func (oruuo *OrgRoleUserUpdateOne) ClearUpdatedBy() *OrgRoleUserUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUserUpdateOne) ClearUser

func (oruuo *OrgRoleUserUpdateOne) ClearUser() *OrgRoleUserUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*OrgRoleUserUpdateOne) Exec

func (oruuo *OrgRoleUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgRoleUserUpdateOne) ExecX

func (oruuo *OrgRoleUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpdateOne) Mutation

func (oruuo *OrgRoleUserUpdateOne) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserUpdateOne) Save

func (oruuo *OrgRoleUserUpdateOne) Save(ctx context.Context) (*OrgRoleUser, error)

Save executes the query and returns the updated OrgRoleUser entity.

func (*OrgRoleUserUpdateOne) SaveX

func (oruuo *OrgRoleUserUpdateOne) SaveX(ctx context.Context) *OrgRoleUser

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUserUpdateOne) Select

func (oruuo *OrgRoleUserUpdateOne) Select(field string, fields ...string) *OrgRoleUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgRoleUserUpdateOne) SetNillableUpdatedAt

func (oruuo *OrgRoleUserUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrgRoleUserUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgRoleUserUpdateOne) SetNillableUpdatedBy

func (oruuo *OrgRoleUserUpdateOne) SetNillableUpdatedBy(i *int) *OrgRoleUserUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgRoleUserUpdateOne) SetOrg

func (oruuo *OrgRoleUserUpdateOne) SetOrg(o *Org) *OrgRoleUserUpdateOne

SetOrg sets the "org" edge to the Org entity.

func (*OrgRoleUserUpdateOne) SetOrgID

func (oruuo *OrgRoleUserUpdateOne) SetOrgID(i int) *OrgRoleUserUpdateOne

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpdateOne) SetOrgRole

func (oruuo *OrgRoleUserUpdateOne) SetOrgRole(o *OrgRole) *OrgRoleUserUpdateOne

SetOrgRole sets the "org_role" edge to the OrgRole entity.

func (*OrgRoleUserUpdateOne) SetOrgRoleID

func (oruuo *OrgRoleUserUpdateOne) SetOrgRoleID(i int) *OrgRoleUserUpdateOne

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpdateOne) SetOrgUser

func (oruuo *OrgRoleUserUpdateOne) SetOrgUser(o *OrgUser) *OrgRoleUserUpdateOne

SetOrgUser sets the "org_user" edge to the OrgUser entity.

func (*OrgRoleUserUpdateOne) SetOrgUserID

func (oruuo *OrgRoleUserUpdateOne) SetOrgUserID(i int) *OrgRoleUserUpdateOne

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpdateOne) SetUpdatedAt

func (oruuo *OrgRoleUserUpdateOne) SetUpdatedAt(t time.Time) *OrgRoleUserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUserUpdateOne) SetUpdatedBy

func (oruuo *OrgRoleUserUpdateOne) SetUpdatedBy(i int) *OrgRoleUserUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUserUpdateOne) SetUser

func (oruuo *OrgRoleUserUpdateOne) SetUser(u *User) *OrgRoleUserUpdateOne

SetUser sets the "user" edge to the User entity.

func (*OrgRoleUserUpdateOne) SetUserID

func (oruuo *OrgRoleUserUpdateOne) SetUserID(i int) *OrgRoleUserUpdateOne

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpdateOne) Where

Where appends a list predicates to the OrgRoleUserUpdate builder.

type OrgRoleUserUpsert

type OrgRoleUserUpsert struct {
	*sql.UpdateSet
}

OrgRoleUserUpsert is the "OnConflict" setter.

func (*OrgRoleUserUpsert) AddUpdatedBy

func (u *OrgRoleUserUpsert) AddUpdatedBy(v int) *OrgRoleUserUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgRoleUserUpsert) ClearUpdatedAt

func (u *OrgRoleUserUpsert) ClearUpdatedAt() *OrgRoleUserUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUserUpsert) ClearUpdatedBy

func (u *OrgRoleUserUpsert) ClearUpdatedBy() *OrgRoleUserUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUserUpsert) SetOrgID

func (u *OrgRoleUserUpsert) SetOrgID(v int) *OrgRoleUserUpsert

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsert) SetOrgRoleID

func (u *OrgRoleUserUpsert) SetOrgRoleID(v int) *OrgRoleUserUpsert

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsert) SetOrgUserID

func (u *OrgRoleUserUpsert) SetOrgUserID(v int) *OrgRoleUserUpsert

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsert) SetUpdatedAt

func (u *OrgRoleUserUpsert) SetUpdatedAt(v time.Time) *OrgRoleUserUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUserUpsert) SetUpdatedBy

func (u *OrgRoleUserUpsert) SetUpdatedBy(v int) *OrgRoleUserUpsert

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUserUpsert) SetUserID

func (u *OrgRoleUserUpsert) SetUserID(v int) *OrgRoleUserUpsert

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsert) UpdateOrgID

func (u *OrgRoleUserUpsert) UpdateOrgID() *OrgRoleUserUpsert

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateOrgRoleID

func (u *OrgRoleUserUpsert) UpdateOrgRoleID() *OrgRoleUserUpsert

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateOrgUserID

func (u *OrgRoleUserUpsert) UpdateOrgUserID() *OrgRoleUserUpsert

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateUpdatedAt

func (u *OrgRoleUserUpsert) UpdateUpdatedAt() *OrgRoleUserUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateUpdatedBy

func (u *OrgRoleUserUpsert) UpdateUpdatedBy() *OrgRoleUserUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateUserID

func (u *OrgRoleUserUpsert) UpdateUserID() *OrgRoleUserUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUserUpsertBulk

type OrgRoleUserUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpsertBulk is the builder for "upsert"-ing a bulk of OrgRoleUser nodes.

func (*OrgRoleUserUpsertBulk) AddUpdatedBy

func (u *OrgRoleUserUpsertBulk) AddUpdatedBy(v int) *OrgRoleUserUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgRoleUserUpsertBulk) ClearUpdatedAt

func (u *OrgRoleUserUpsertBulk) ClearUpdatedAt() *OrgRoleUserUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUserUpsertBulk) ClearUpdatedBy

func (u *OrgRoleUserUpsertBulk) ClearUpdatedBy() *OrgRoleUserUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUserUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUserUpsertBulk) Exec

Exec executes the query.

func (*OrgRoleUserUpsertBulk) ExecX

func (u *OrgRoleUserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgRoleUserUpsertBulk) SetOrgID

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsertBulk) SetOrgRoleID

func (u *OrgRoleUserUpsertBulk) SetOrgRoleID(v int) *OrgRoleUserUpsertBulk

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsertBulk) SetOrgUserID

func (u *OrgRoleUserUpsertBulk) SetOrgUserID(v int) *OrgRoleUserUpsertBulk

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUserUpsertBulk) SetUpdatedBy

func (u *OrgRoleUserUpsertBulk) SetUpdatedBy(v int) *OrgRoleUserUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUserUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OrgRoleUserCreateBulk.OnConflict documentation for more info.

func (*OrgRoleUserUpsertBulk) UpdateNewValues

func (u *OrgRoleUserUpsertBulk) UpdateNewValues() *OrgRoleUserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgroleuser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUserUpsertBulk) UpdateOrgID

func (u *OrgRoleUserUpsertBulk) UpdateOrgID() *OrgRoleUserUpsertBulk

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateOrgRoleID

func (u *OrgRoleUserUpsertBulk) UpdateOrgRoleID() *OrgRoleUserUpsertBulk

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateOrgUserID

func (u *OrgRoleUserUpsertBulk) UpdateOrgUserID() *OrgRoleUserUpsertBulk

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateUpdatedAt

func (u *OrgRoleUserUpsertBulk) UpdateUpdatedAt() *OrgRoleUserUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateUpdatedBy

func (u *OrgRoleUserUpsertBulk) UpdateUpdatedBy() *OrgRoleUserUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateUserID

func (u *OrgRoleUserUpsertBulk) UpdateUserID() *OrgRoleUserUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUserUpsertOne

type OrgRoleUserUpsertOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpsertOne is the builder for "upsert"-ing

one OrgRoleUser node.

func (*OrgRoleUserUpsertOne) AddUpdatedBy

func (u *OrgRoleUserUpsertOne) AddUpdatedBy(v int) *OrgRoleUserUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgRoleUserUpsertOne) ClearUpdatedAt

func (u *OrgRoleUserUpsertOne) ClearUpdatedAt() *OrgRoleUserUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgRoleUserUpsertOne) ClearUpdatedBy

func (u *OrgRoleUserUpsertOne) ClearUpdatedBy() *OrgRoleUserUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgRoleUserUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUserUpsertOne) Exec

Exec executes the query.

func (*OrgRoleUserUpsertOne) ExecX

func (u *OrgRoleUserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpsertOne) ID

func (u *OrgRoleUserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgRoleUserUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OrgRoleUserUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRoleUser.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgRoleUserUpsertOne) SetOrgID

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsertOne) SetOrgRoleID

func (u *OrgRoleUserUpsertOne) SetOrgRoleID(v int) *OrgRoleUserUpsertOne

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsertOne) SetOrgUserID

func (u *OrgRoleUserUpsertOne) SetOrgUserID(v int) *OrgRoleUserUpsertOne

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsertOne) SetUpdatedAt

func (u *OrgRoleUserUpsertOne) SetUpdatedAt(v time.Time) *OrgRoleUserUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgRoleUserUpsertOne) SetUpdatedBy

func (u *OrgRoleUserUpsertOne) SetUpdatedBy(v int) *OrgRoleUserUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgRoleUserUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OrgRoleUserCreate.OnConflict documentation for more info.

func (*OrgRoleUserUpsertOne) UpdateNewValues

func (u *OrgRoleUserUpsertOne) UpdateNewValues() *OrgRoleUserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgroleuser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUserUpsertOne) UpdateOrgID

func (u *OrgRoleUserUpsertOne) UpdateOrgID() *OrgRoleUserUpsertOne

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateOrgRoleID

func (u *OrgRoleUserUpsertOne) UpdateOrgRoleID() *OrgRoleUserUpsertOne

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateOrgUserID

func (u *OrgRoleUserUpsertOne) UpdateOrgUserID() *OrgRoleUserUpsertOne

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateUpdatedAt

func (u *OrgRoleUserUpsertOne) UpdateUpdatedAt() *OrgRoleUserUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateUpdatedBy

func (u *OrgRoleUserUpsertOne) UpdateUpdatedBy() *OrgRoleUserUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateUserID

func (u *OrgRoleUserUpsertOne) UpdateUserID() *OrgRoleUserUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUserWhereInput

type OrgRoleUserWhereInput struct {
	Predicates []predicate.OrgRoleUser  `json:"-"`
	Not        *OrgRoleUserWhereInput   `json:"not,omitempty"`
	Or         []*OrgRoleUserWhereInput `json:"or,omitempty"`
	And        []*OrgRoleUserWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "org_role_id" field predicates.
	OrgRoleID      *int  `json:"orgRoleID,omitempty"`
	OrgRoleIDNEQ   *int  `json:"orgRoleIDNEQ,omitempty"`
	OrgRoleIDIn    []int `json:"orgRoleIDIn,omitempty"`
	OrgRoleIDNotIn []int `json:"orgRoleIDNotIn,omitempty"`

	// "org_user_id" field predicates.
	OrgUserID      *int  `json:"orgUserID,omitempty"`
	OrgUserIDNEQ   *int  `json:"orgUserIDNEQ,omitempty"`
	OrgUserIDIn    []int `json:"orgUserIDIn,omitempty"`
	OrgUserIDNotIn []int `json:"orgUserIDNotIn,omitempty"`

	// "user_id" field predicates.
	UserID      *int  `json:"userID,omitempty"`
	UserIDNEQ   *int  `json:"userIDNEQ,omitempty"`
	UserIDIn    []int `json:"userIDIn,omitempty"`
	UserIDNotIn []int `json:"userIDNotIn,omitempty"`

	// "org_id" field predicates.
	OrgID      *int  `json:"orgID,omitempty"`
	OrgIDNEQ   *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn    []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn []int `json:"orgIDNotIn,omitempty"`

	// "org_role" edge predicates.
	HasOrgRole     *bool                `json:"hasOrgRole,omitempty"`
	HasOrgRoleWith []*OrgRoleWhereInput `json:"hasOrgRoleWith,omitempty"`

	// "org_user" edge predicates.
	HasOrgUser     *bool                `json:"hasOrgUser,omitempty"`
	HasOrgUserWith []*OrgUserWhereInput `json:"hasOrgUserWith,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`
}

OrgRoleUserWhereInput represents a where input for filtering OrgRoleUser queries.

func (*OrgRoleUserWhereInput) AddPredicates

func (i *OrgRoleUserWhereInput) AddPredicates(predicates ...predicate.OrgRoleUser)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgRoleUserWhereInput) Filter

Filter applies the OrgRoleUserWhereInput filter on the OrgRoleUserQuery builder.

func (*OrgRoleUserWhereInput) P

P returns a predicate for filtering orgroleusers. An error is returned if the input is empty or invalid.

type OrgRoleUsers

type OrgRoleUsers []*OrgRoleUser

OrgRoleUsers is a parsable slice of OrgRoleUser.

type OrgRoleWhereInput

type OrgRoleWhereInput struct {
	Predicates []predicate.OrgRole  `json:"-"`
	Not        *OrgRoleWhereInput   `json:"not,omitempty"`
	Or         []*OrgRoleWhereInput `json:"or,omitempty"`
	And        []*OrgRoleWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "org_id" field predicates.
	OrgID       *int  `json:"orgID,omitempty"`
	OrgIDNEQ    *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn     []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn  []int `json:"orgIDNotIn,omitempty"`
	OrgIDIsNil  bool  `json:"orgIDIsNil,omitempty"`
	OrgIDNotNil bool  `json:"orgIDNotNil,omitempty"`

	// "kind" field predicates.
	Kind      *orgrole.Kind  `json:"kind,omitempty"`
	KindNEQ   *orgrole.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []orgrole.Kind `json:"kindIn,omitempty"`
	KindNotIn []orgrole.Kind `json:"kindNotIn,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "comments" field predicates.
	Comments             *string  `json:"comments,omitempty"`
	CommentsNEQ          *string  `json:"commentsNEQ,omitempty"`
	CommentsIn           []string `json:"commentsIn,omitempty"`
	CommentsNotIn        []string `json:"commentsNotIn,omitempty"`
	CommentsGT           *string  `json:"commentsGT,omitempty"`
	CommentsGTE          *string  `json:"commentsGTE,omitempty"`
	CommentsLT           *string  `json:"commentsLT,omitempty"`
	CommentsLTE          *string  `json:"commentsLTE,omitempty"`
	CommentsContains     *string  `json:"commentsContains,omitempty"`
	CommentsHasPrefix    *string  `json:"commentsHasPrefix,omitempty"`
	CommentsHasSuffix    *string  `json:"commentsHasSuffix,omitempty"`
	CommentsIsNil        bool     `json:"commentsIsNil,omitempty"`
	CommentsNotNil       bool     `json:"commentsNotNil,omitempty"`
	CommentsEqualFold    *string  `json:"commentsEqualFold,omitempty"`
	CommentsContainsFold *string  `json:"commentsContainsFold,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`
}

OrgRoleWhereInput represents a where input for filtering OrgRole queries.

func (*OrgRoleWhereInput) AddPredicates

func (i *OrgRoleWhereInput) AddPredicates(predicates ...predicate.OrgRole)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgRoleWhereInput) Filter

Filter applies the OrgRoleWhereInput filter on the OrgRoleQuery builder.

func (*OrgRoleWhereInput) P

P returns a predicate for filtering orgroles. An error is returned if the input is empty or invalid.

type OrgRoles

type OrgRoles []*OrgRole

OrgRoles is a parsable slice of OrgRole.

type OrgSelect

type OrgSelect struct {
	*OrgQuery
	// contains filtered or unexported fields
}

OrgSelect is the builder for selecting fields of Org entities.

func (*OrgSelect) Aggregate

func (os *OrgSelect) Aggregate(fns ...AggregateFunc) *OrgSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgSelect) Bool

func (s *OrgSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgSelect) BoolX

func (s *OrgSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgSelect) Bools

func (s *OrgSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgSelect) BoolsX

func (s *OrgSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgSelect) Float64

func (s *OrgSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgSelect) Float64X

func (s *OrgSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgSelect) Float64s

func (s *OrgSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgSelect) Float64sX

func (s *OrgSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgSelect) Int

func (s *OrgSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgSelect) IntX

func (s *OrgSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgSelect) Ints

func (s *OrgSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgSelect) IntsX

func (s *OrgSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgSelect) Scan

func (os *OrgSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgSelect) ScanX

func (s *OrgSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgSelect) String

func (s *OrgSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgSelect) StringX

func (s *OrgSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgSelect) Strings

func (s *OrgSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgSelect) StringsX

func (s *OrgSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgUpdate

type OrgUpdate struct {
	// contains filtered or unexported fields
}

OrgUpdate is the builder for updating Org entities.

func (*OrgUpdate) AddAppIDs

func (ou *OrgUpdate) AddAppIDs(ids ...int) *OrgUpdate

AddAppIDs adds the "apps" edge to the App entity by IDs.

func (*OrgUpdate) AddApps

func (ou *OrgUpdate) AddApps(a ...*App) *OrgUpdate

AddApps adds the "apps" edges to the App entity.

func (*OrgUpdate) AddChildIDs

func (ou *OrgUpdate) AddChildIDs(ids ...int) *OrgUpdate

AddChildIDs adds the "children" edge to the Org entity by IDs.

func (*OrgUpdate) AddChildren

func (ou *OrgUpdate) AddChildren(o ...*Org) *OrgUpdate

AddChildren adds the "children" edges to the Org entity.

func (*OrgUpdate) AddDisplaySort

func (ou *OrgUpdate) AddDisplaySort(i int32) *OrgUpdate

AddDisplaySort adds i to the "display_sort" field.

func (*OrgUpdate) AddOrgApp

func (ou *OrgUpdate) AddOrgApp(o ...*OrgApp) *OrgUpdate

AddOrgApp adds the "org_app" edges to the OrgApp entity.

func (*OrgUpdate) AddOrgAppIDs

func (ou *OrgUpdate) AddOrgAppIDs(ids ...int) *OrgUpdate

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by IDs.

func (*OrgUpdate) AddOrgUser

func (ou *OrgUpdate) AddOrgUser(o ...*OrgUser) *OrgUpdate

AddOrgUser adds the "org_user" edges to the OrgUser entity.

func (*OrgUpdate) AddOrgUserIDs

func (ou *OrgUpdate) AddOrgUserIDs(ids ...int) *OrgUpdate

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by IDs.

func (*OrgUpdate) AddPermissionIDs

func (ou *OrgUpdate) AddPermissionIDs(ids ...int) *OrgUpdate

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*OrgUpdate) AddPermissions

func (ou *OrgUpdate) AddPermissions(p ...*Permission) *OrgUpdate

AddPermissions adds the "permissions" edges to the Permission entity.

func (*OrgUpdate) AddPolicies

func (ou *OrgUpdate) AddPolicies(o ...*OrgPolicy) *OrgUpdate

AddPolicies adds the "policies" edges to the OrgPolicy entity.

func (*OrgUpdate) AddPolicyIDs

func (ou *OrgUpdate) AddPolicyIDs(ids ...int) *OrgUpdate

AddPolicyIDs adds the "policies" edge to the OrgPolicy entity by IDs.

func (*OrgUpdate) AddRolesAndGroupIDs

func (ou *OrgUpdate) AddRolesAndGroupIDs(ids ...int) *OrgUpdate

AddRolesAndGroupIDs adds the "roles_and_groups" edge to the OrgRole entity by IDs.

func (*OrgUpdate) AddRolesAndGroups

func (ou *OrgUpdate) AddRolesAndGroups(o ...*OrgRole) *OrgUpdate

AddRolesAndGroups adds the "roles_and_groups" edges to the OrgRole entity.

func (*OrgUpdate) AddUpdatedBy

func (ou *OrgUpdate) AddUpdatedBy(i int) *OrgUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUpdate) AddUserIDs

func (ou *OrgUpdate) AddUserIDs(ids ...int) *OrgUpdate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*OrgUpdate) AddUsers

func (ou *OrgUpdate) AddUsers(u ...*User) *OrgUpdate

AddUsers adds the "users" edges to the User entity.

func (*OrgUpdate) ClearApps

func (ou *OrgUpdate) ClearApps() *OrgUpdate

ClearApps clears all "apps" edges to the App entity.

func (*OrgUpdate) ClearChildren

func (ou *OrgUpdate) ClearChildren() *OrgUpdate

ClearChildren clears all "children" edges to the Org entity.

func (*OrgUpdate) ClearCode

func (ou *OrgUpdate) ClearCode() *OrgUpdate

ClearCode clears the value of the "code" field.

func (*OrgUpdate) ClearCountryCode

func (ou *OrgUpdate) ClearCountryCode() *OrgUpdate

ClearCountryCode clears the value of the "country_code" field.

func (*OrgUpdate) ClearDeletedAt

func (ou *OrgUpdate) ClearDeletedAt() *OrgUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgUpdate) ClearDisplaySort

func (ou *OrgUpdate) ClearDisplaySort() *OrgUpdate

ClearDisplaySort clears the value of the "display_sort" field.

func (*OrgUpdate) ClearDomain

func (ou *OrgUpdate) ClearDomain() *OrgUpdate

ClearDomain clears the value of the "domain" field.

func (*OrgUpdate) ClearOrgApp

func (ou *OrgUpdate) ClearOrgApp() *OrgUpdate

ClearOrgApp clears all "org_app" edges to the OrgApp entity.

func (*OrgUpdate) ClearOrgUser

func (ou *OrgUpdate) ClearOrgUser() *OrgUpdate

ClearOrgUser clears all "org_user" edges to the OrgUser entity.

func (*OrgUpdate) ClearOwner

func (ou *OrgUpdate) ClearOwner() *OrgUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*OrgUpdate) ClearOwnerID

func (ou *OrgUpdate) ClearOwnerID() *OrgUpdate

ClearOwnerID clears the value of the "owner_id" field.

func (*OrgUpdate) ClearParent

func (ou *OrgUpdate) ClearParent() *OrgUpdate

ClearParent clears the "parent" edge to the Org entity.

func (*OrgUpdate) ClearPath

func (ou *OrgUpdate) ClearPath() *OrgUpdate

ClearPath clears the value of the "path" field.

func (*OrgUpdate) ClearPermissions

func (ou *OrgUpdate) ClearPermissions() *OrgUpdate

ClearPermissions clears all "permissions" edges to the Permission entity.

func (*OrgUpdate) ClearPolicies

func (ou *OrgUpdate) ClearPolicies() *OrgUpdate

ClearPolicies clears all "policies" edges to the OrgPolicy entity.

func (*OrgUpdate) ClearProfile

func (ou *OrgUpdate) ClearProfile() *OrgUpdate

ClearProfile clears the value of the "profile" field.

func (*OrgUpdate) ClearRolesAndGroups

func (ou *OrgUpdate) ClearRolesAndGroups() *OrgUpdate

ClearRolesAndGroups clears all "roles_and_groups" edges to the OrgRole entity.

func (*OrgUpdate) ClearStatus

func (ou *OrgUpdate) ClearStatus() *OrgUpdate

ClearStatus clears the value of the "status" field.

func (*OrgUpdate) ClearTimezone

func (ou *OrgUpdate) ClearTimezone() *OrgUpdate

ClearTimezone clears the value of the "timezone" field.

func (*OrgUpdate) ClearUpdatedAt

func (ou *OrgUpdate) ClearUpdatedAt() *OrgUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUpdate) ClearUpdatedBy

func (ou *OrgUpdate) ClearUpdatedBy() *OrgUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUpdate) ClearUsers

func (ou *OrgUpdate) ClearUsers() *OrgUpdate

ClearUsers clears all "users" edges to the User entity.

func (*OrgUpdate) Exec

func (ou *OrgUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUpdate) ExecX

func (ou *OrgUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUpdate) Mutation

func (ou *OrgUpdate) Mutation() *OrgMutation

Mutation returns the OrgMutation object of the builder.

func (*OrgUpdate) RemoveAppIDs

func (ou *OrgUpdate) RemoveAppIDs(ids ...int) *OrgUpdate

RemoveAppIDs removes the "apps" edge to App entities by IDs.

func (*OrgUpdate) RemoveApps

func (ou *OrgUpdate) RemoveApps(a ...*App) *OrgUpdate

RemoveApps removes "apps" edges to App entities.

func (*OrgUpdate) RemoveChildIDs

func (ou *OrgUpdate) RemoveChildIDs(ids ...int) *OrgUpdate

RemoveChildIDs removes the "children" edge to Org entities by IDs.

func (*OrgUpdate) RemoveChildren

func (ou *OrgUpdate) RemoveChildren(o ...*Org) *OrgUpdate

RemoveChildren removes "children" edges to Org entities.

func (*OrgUpdate) RemoveOrgApp

func (ou *OrgUpdate) RemoveOrgApp(o ...*OrgApp) *OrgUpdate

RemoveOrgApp removes "org_app" edges to OrgApp entities.

func (*OrgUpdate) RemoveOrgAppIDs

func (ou *OrgUpdate) RemoveOrgAppIDs(ids ...int) *OrgUpdate

RemoveOrgAppIDs removes the "org_app" edge to OrgApp entities by IDs.

func (*OrgUpdate) RemoveOrgUser

func (ou *OrgUpdate) RemoveOrgUser(o ...*OrgUser) *OrgUpdate

RemoveOrgUser removes "org_user" edges to OrgUser entities.

func (*OrgUpdate) RemoveOrgUserIDs

func (ou *OrgUpdate) RemoveOrgUserIDs(ids ...int) *OrgUpdate

RemoveOrgUserIDs removes the "org_user" edge to OrgUser entities by IDs.

func (*OrgUpdate) RemovePermissionIDs

func (ou *OrgUpdate) RemovePermissionIDs(ids ...int) *OrgUpdate

RemovePermissionIDs removes the "permissions" edge to Permission entities by IDs.

func (*OrgUpdate) RemovePermissions

func (ou *OrgUpdate) RemovePermissions(p ...*Permission) *OrgUpdate

RemovePermissions removes "permissions" edges to Permission entities.

func (*OrgUpdate) RemovePolicies

func (ou *OrgUpdate) RemovePolicies(o ...*OrgPolicy) *OrgUpdate

RemovePolicies removes "policies" edges to OrgPolicy entities.

func (*OrgUpdate) RemovePolicyIDs

func (ou *OrgUpdate) RemovePolicyIDs(ids ...int) *OrgUpdate

RemovePolicyIDs removes the "policies" edge to OrgPolicy entities by IDs.

func (*OrgUpdate) RemoveRolesAndGroupIDs

func (ou *OrgUpdate) RemoveRolesAndGroupIDs(ids ...int) *OrgUpdate

RemoveRolesAndGroupIDs removes the "roles_and_groups" edge to OrgRole entities by IDs.

func (*OrgUpdate) RemoveRolesAndGroups

func (ou *OrgUpdate) RemoveRolesAndGroups(o ...*OrgRole) *OrgUpdate

RemoveRolesAndGroups removes "roles_and_groups" edges to OrgRole entities.

func (*OrgUpdate) RemoveUserIDs

func (ou *OrgUpdate) RemoveUserIDs(ids ...int) *OrgUpdate

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*OrgUpdate) RemoveUsers

func (ou *OrgUpdate) RemoveUsers(u ...*User) *OrgUpdate

RemoveUsers removes "users" edges to User entities.

func (*OrgUpdate) Save

func (ou *OrgUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgUpdate) SaveX

func (ou *OrgUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgUpdate) SetCode

func (ou *OrgUpdate) SetCode(s string) *OrgUpdate

SetCode sets the "code" field.

func (*OrgUpdate) SetCountryCode

func (ou *OrgUpdate) SetCountryCode(s string) *OrgUpdate

SetCountryCode sets the "country_code" field.

func (*OrgUpdate) SetDeletedAt

func (ou *OrgUpdate) SetDeletedAt(t time.Time) *OrgUpdate

SetDeletedAt sets the "deleted_at" field.

func (*OrgUpdate) SetDisplaySort

func (ou *OrgUpdate) SetDisplaySort(i int32) *OrgUpdate

SetDisplaySort sets the "display_sort" field.

func (*OrgUpdate) SetDomain

func (ou *OrgUpdate) SetDomain(s string) *OrgUpdate

SetDomain sets the "domain" field.

func (*OrgUpdate) SetInput

func (c *OrgUpdate) SetInput(i UpdateOrgInput) *OrgUpdate

SetInput applies the change-set in the UpdateOrgInput on the OrgUpdate builder.

func (*OrgUpdate) SetKind

func (ou *OrgUpdate) SetKind(o org.Kind) *OrgUpdate

SetKind sets the "kind" field.

func (*OrgUpdate) SetName

func (ou *OrgUpdate) SetName(s string) *OrgUpdate

SetName sets the "name" field.

func (*OrgUpdate) SetNillableCode

func (ou *OrgUpdate) SetNillableCode(s *string) *OrgUpdate

SetNillableCode sets the "code" field if the given value is not nil.

func (*OrgUpdate) SetNillableCountryCode

func (ou *OrgUpdate) SetNillableCountryCode(s *string) *OrgUpdate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*OrgUpdate) SetNillableDeletedAt

func (ou *OrgUpdate) SetNillableDeletedAt(t *time.Time) *OrgUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*OrgUpdate) SetNillableDisplaySort

func (ou *OrgUpdate) SetNillableDisplaySort(i *int32) *OrgUpdate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*OrgUpdate) SetNillableDomain

func (ou *OrgUpdate) SetNillableDomain(s *string) *OrgUpdate

SetNillableDomain sets the "domain" field if the given value is not nil.

func (*OrgUpdate) SetNillableKind

func (ou *OrgUpdate) SetNillableKind(o *org.Kind) *OrgUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*OrgUpdate) SetNillableOwnerID

func (ou *OrgUpdate) SetNillableOwnerID(i *int) *OrgUpdate

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*OrgUpdate) SetNillableParentID

func (ou *OrgUpdate) SetNillableParentID(i *int) *OrgUpdate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*OrgUpdate) SetNillablePath

func (ou *OrgUpdate) SetNillablePath(s *string) *OrgUpdate

SetNillablePath sets the "path" field if the given value is not nil.

func (*OrgUpdate) SetNillableProfile

func (ou *OrgUpdate) SetNillableProfile(s *string) *OrgUpdate

SetNillableProfile sets the "profile" field if the given value is not nil.

func (*OrgUpdate) SetNillableStatus

func (ou *OrgUpdate) SetNillableStatus(ts *typex.SimpleStatus) *OrgUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrgUpdate) SetNillableTimezone

func (ou *OrgUpdate) SetNillableTimezone(s *string) *OrgUpdate

SetNillableTimezone sets the "timezone" field if the given value is not nil.

func (*OrgUpdate) SetNillableUpdatedAt

func (ou *OrgUpdate) SetNillableUpdatedAt(t *time.Time) *OrgUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUpdate) SetNillableUpdatedBy

func (ou *OrgUpdate) SetNillableUpdatedBy(i *int) *OrgUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUpdate) SetOwner

func (ou *OrgUpdate) SetOwner(u *User) *OrgUpdate

SetOwner sets the "owner" edge to the User entity.

func (*OrgUpdate) SetOwnerID

func (ou *OrgUpdate) SetOwnerID(i int) *OrgUpdate

SetOwnerID sets the "owner_id" field.

func (*OrgUpdate) SetParent

func (ou *OrgUpdate) SetParent(o *Org) *OrgUpdate

SetParent sets the "parent" edge to the Org entity.

func (*OrgUpdate) SetParentID

func (ou *OrgUpdate) SetParentID(i int) *OrgUpdate

SetParentID sets the "parent_id" field.

func (*OrgUpdate) SetPath

func (ou *OrgUpdate) SetPath(s string) *OrgUpdate

SetPath sets the "path" field.

func (*OrgUpdate) SetProfile

func (ou *OrgUpdate) SetProfile(s string) *OrgUpdate

SetProfile sets the "profile" field.

func (*OrgUpdate) SetStatus

func (ou *OrgUpdate) SetStatus(ts typex.SimpleStatus) *OrgUpdate

SetStatus sets the "status" field.

func (*OrgUpdate) SetTimezone

func (ou *OrgUpdate) SetTimezone(s string) *OrgUpdate

SetTimezone sets the "timezone" field.

func (*OrgUpdate) SetUpdatedAt

func (ou *OrgUpdate) SetUpdatedAt(t time.Time) *OrgUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OrgUpdate) SetUpdatedBy

func (ou *OrgUpdate) SetUpdatedBy(i int) *OrgUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OrgUpdate) Where

func (ou *OrgUpdate) Where(ps ...predicate.Org) *OrgUpdate

Where appends a list predicates to the OrgUpdate builder.

type OrgUpdateOne

type OrgUpdateOne struct {
	// contains filtered or unexported fields
}

OrgUpdateOne is the builder for updating a single Org entity.

func (*OrgUpdateOne) AddAppIDs

func (ouo *OrgUpdateOne) AddAppIDs(ids ...int) *OrgUpdateOne

AddAppIDs adds the "apps" edge to the App entity by IDs.

func (*OrgUpdateOne) AddApps

func (ouo *OrgUpdateOne) AddApps(a ...*App) *OrgUpdateOne

AddApps adds the "apps" edges to the App entity.

func (*OrgUpdateOne) AddChildIDs

func (ouo *OrgUpdateOne) AddChildIDs(ids ...int) *OrgUpdateOne

AddChildIDs adds the "children" edge to the Org entity by IDs.

func (*OrgUpdateOne) AddChildren

func (ouo *OrgUpdateOne) AddChildren(o ...*Org) *OrgUpdateOne

AddChildren adds the "children" edges to the Org entity.

func (*OrgUpdateOne) AddDisplaySort

func (ouo *OrgUpdateOne) AddDisplaySort(i int32) *OrgUpdateOne

AddDisplaySort adds i to the "display_sort" field.

func (*OrgUpdateOne) AddOrgApp

func (ouo *OrgUpdateOne) AddOrgApp(o ...*OrgApp) *OrgUpdateOne

AddOrgApp adds the "org_app" edges to the OrgApp entity.

func (*OrgUpdateOne) AddOrgAppIDs

func (ouo *OrgUpdateOne) AddOrgAppIDs(ids ...int) *OrgUpdateOne

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by IDs.

func (*OrgUpdateOne) AddOrgUser

func (ouo *OrgUpdateOne) AddOrgUser(o ...*OrgUser) *OrgUpdateOne

AddOrgUser adds the "org_user" edges to the OrgUser entity.

func (*OrgUpdateOne) AddOrgUserIDs

func (ouo *OrgUpdateOne) AddOrgUserIDs(ids ...int) *OrgUpdateOne

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by IDs.

func (*OrgUpdateOne) AddPermissionIDs

func (ouo *OrgUpdateOne) AddPermissionIDs(ids ...int) *OrgUpdateOne

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*OrgUpdateOne) AddPermissions

func (ouo *OrgUpdateOne) AddPermissions(p ...*Permission) *OrgUpdateOne

AddPermissions adds the "permissions" edges to the Permission entity.

func (*OrgUpdateOne) AddPolicies

func (ouo *OrgUpdateOne) AddPolicies(o ...*OrgPolicy) *OrgUpdateOne

AddPolicies adds the "policies" edges to the OrgPolicy entity.

func (*OrgUpdateOne) AddPolicyIDs

func (ouo *OrgUpdateOne) AddPolicyIDs(ids ...int) *OrgUpdateOne

AddPolicyIDs adds the "policies" edge to the OrgPolicy entity by IDs.

func (*OrgUpdateOne) AddRolesAndGroupIDs

func (ouo *OrgUpdateOne) AddRolesAndGroupIDs(ids ...int) *OrgUpdateOne

AddRolesAndGroupIDs adds the "roles_and_groups" edge to the OrgRole entity by IDs.

func (*OrgUpdateOne) AddRolesAndGroups

func (ouo *OrgUpdateOne) AddRolesAndGroups(o ...*OrgRole) *OrgUpdateOne

AddRolesAndGroups adds the "roles_and_groups" edges to the OrgRole entity.

func (*OrgUpdateOne) AddUpdatedBy

func (ouo *OrgUpdateOne) AddUpdatedBy(i int) *OrgUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUpdateOne) AddUserIDs

func (ouo *OrgUpdateOne) AddUserIDs(ids ...int) *OrgUpdateOne

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*OrgUpdateOne) AddUsers

func (ouo *OrgUpdateOne) AddUsers(u ...*User) *OrgUpdateOne

AddUsers adds the "users" edges to the User entity.

func (*OrgUpdateOne) ClearApps

func (ouo *OrgUpdateOne) ClearApps() *OrgUpdateOne

ClearApps clears all "apps" edges to the App entity.

func (*OrgUpdateOne) ClearChildren

func (ouo *OrgUpdateOne) ClearChildren() *OrgUpdateOne

ClearChildren clears all "children" edges to the Org entity.

func (*OrgUpdateOne) ClearCode

func (ouo *OrgUpdateOne) ClearCode() *OrgUpdateOne

ClearCode clears the value of the "code" field.

func (*OrgUpdateOne) ClearCountryCode

func (ouo *OrgUpdateOne) ClearCountryCode() *OrgUpdateOne

ClearCountryCode clears the value of the "country_code" field.

func (*OrgUpdateOne) ClearDeletedAt

func (ouo *OrgUpdateOne) ClearDeletedAt() *OrgUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgUpdateOne) ClearDisplaySort

func (ouo *OrgUpdateOne) ClearDisplaySort() *OrgUpdateOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*OrgUpdateOne) ClearDomain

func (ouo *OrgUpdateOne) ClearDomain() *OrgUpdateOne

ClearDomain clears the value of the "domain" field.

func (*OrgUpdateOne) ClearOrgApp

func (ouo *OrgUpdateOne) ClearOrgApp() *OrgUpdateOne

ClearOrgApp clears all "org_app" edges to the OrgApp entity.

func (*OrgUpdateOne) ClearOrgUser

func (ouo *OrgUpdateOne) ClearOrgUser() *OrgUpdateOne

ClearOrgUser clears all "org_user" edges to the OrgUser entity.

func (*OrgUpdateOne) ClearOwner

func (ouo *OrgUpdateOne) ClearOwner() *OrgUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*OrgUpdateOne) ClearOwnerID

func (ouo *OrgUpdateOne) ClearOwnerID() *OrgUpdateOne

ClearOwnerID clears the value of the "owner_id" field.

func (*OrgUpdateOne) ClearParent

func (ouo *OrgUpdateOne) ClearParent() *OrgUpdateOne

ClearParent clears the "parent" edge to the Org entity.

func (*OrgUpdateOne) ClearPath

func (ouo *OrgUpdateOne) ClearPath() *OrgUpdateOne

ClearPath clears the value of the "path" field.

func (*OrgUpdateOne) ClearPermissions

func (ouo *OrgUpdateOne) ClearPermissions() *OrgUpdateOne

ClearPermissions clears all "permissions" edges to the Permission entity.

func (*OrgUpdateOne) ClearPolicies

func (ouo *OrgUpdateOne) ClearPolicies() *OrgUpdateOne

ClearPolicies clears all "policies" edges to the OrgPolicy entity.

func (*OrgUpdateOne) ClearProfile

func (ouo *OrgUpdateOne) ClearProfile() *OrgUpdateOne

ClearProfile clears the value of the "profile" field.

func (*OrgUpdateOne) ClearRolesAndGroups

func (ouo *OrgUpdateOne) ClearRolesAndGroups() *OrgUpdateOne

ClearRolesAndGroups clears all "roles_and_groups" edges to the OrgRole entity.

func (*OrgUpdateOne) ClearStatus

func (ouo *OrgUpdateOne) ClearStatus() *OrgUpdateOne

ClearStatus clears the value of the "status" field.

func (*OrgUpdateOne) ClearTimezone

func (ouo *OrgUpdateOne) ClearTimezone() *OrgUpdateOne

ClearTimezone clears the value of the "timezone" field.

func (*OrgUpdateOne) ClearUpdatedAt

func (ouo *OrgUpdateOne) ClearUpdatedAt() *OrgUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUpdateOne) ClearUpdatedBy

func (ouo *OrgUpdateOne) ClearUpdatedBy() *OrgUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUpdateOne) ClearUsers

func (ouo *OrgUpdateOne) ClearUsers() *OrgUpdateOne

ClearUsers clears all "users" edges to the User entity.

func (*OrgUpdateOne) Exec

func (ouo *OrgUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgUpdateOne) ExecX

func (ouo *OrgUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUpdateOne) Mutation

func (ouo *OrgUpdateOne) Mutation() *OrgMutation

Mutation returns the OrgMutation object of the builder.

func (*OrgUpdateOne) RemoveAppIDs

func (ouo *OrgUpdateOne) RemoveAppIDs(ids ...int) *OrgUpdateOne

RemoveAppIDs removes the "apps" edge to App entities by IDs.

func (*OrgUpdateOne) RemoveApps

func (ouo *OrgUpdateOne) RemoveApps(a ...*App) *OrgUpdateOne

RemoveApps removes "apps" edges to App entities.

func (*OrgUpdateOne) RemoveChildIDs

func (ouo *OrgUpdateOne) RemoveChildIDs(ids ...int) *OrgUpdateOne

RemoveChildIDs removes the "children" edge to Org entities by IDs.

func (*OrgUpdateOne) RemoveChildren

func (ouo *OrgUpdateOne) RemoveChildren(o ...*Org) *OrgUpdateOne

RemoveChildren removes "children" edges to Org entities.

func (*OrgUpdateOne) RemoveOrgApp

func (ouo *OrgUpdateOne) RemoveOrgApp(o ...*OrgApp) *OrgUpdateOne

RemoveOrgApp removes "org_app" edges to OrgApp entities.

func (*OrgUpdateOne) RemoveOrgAppIDs

func (ouo *OrgUpdateOne) RemoveOrgAppIDs(ids ...int) *OrgUpdateOne

RemoveOrgAppIDs removes the "org_app" edge to OrgApp entities by IDs.

func (*OrgUpdateOne) RemoveOrgUser

func (ouo *OrgUpdateOne) RemoveOrgUser(o ...*OrgUser) *OrgUpdateOne

RemoveOrgUser removes "org_user" edges to OrgUser entities.

func (*OrgUpdateOne) RemoveOrgUserIDs

func (ouo *OrgUpdateOne) RemoveOrgUserIDs(ids ...int) *OrgUpdateOne

RemoveOrgUserIDs removes the "org_user" edge to OrgUser entities by IDs.

func (*OrgUpdateOne) RemovePermissionIDs

func (ouo *OrgUpdateOne) RemovePermissionIDs(ids ...int) *OrgUpdateOne

RemovePermissionIDs removes the "permissions" edge to Permission entities by IDs.

func (*OrgUpdateOne) RemovePermissions

func (ouo *OrgUpdateOne) RemovePermissions(p ...*Permission) *OrgUpdateOne

RemovePermissions removes "permissions" edges to Permission entities.

func (*OrgUpdateOne) RemovePolicies

func (ouo *OrgUpdateOne) RemovePolicies(o ...*OrgPolicy) *OrgUpdateOne

RemovePolicies removes "policies" edges to OrgPolicy entities.

func (*OrgUpdateOne) RemovePolicyIDs

func (ouo *OrgUpdateOne) RemovePolicyIDs(ids ...int) *OrgUpdateOne

RemovePolicyIDs removes the "policies" edge to OrgPolicy entities by IDs.

func (*OrgUpdateOne) RemoveRolesAndGroupIDs

func (ouo *OrgUpdateOne) RemoveRolesAndGroupIDs(ids ...int) *OrgUpdateOne

RemoveRolesAndGroupIDs removes the "roles_and_groups" edge to OrgRole entities by IDs.

func (*OrgUpdateOne) RemoveRolesAndGroups

func (ouo *OrgUpdateOne) RemoveRolesAndGroups(o ...*OrgRole) *OrgUpdateOne

RemoveRolesAndGroups removes "roles_and_groups" edges to OrgRole entities.

func (*OrgUpdateOne) RemoveUserIDs

func (ouo *OrgUpdateOne) RemoveUserIDs(ids ...int) *OrgUpdateOne

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*OrgUpdateOne) RemoveUsers

func (ouo *OrgUpdateOne) RemoveUsers(u ...*User) *OrgUpdateOne

RemoveUsers removes "users" edges to User entities.

func (*OrgUpdateOne) Save

func (ouo *OrgUpdateOne) Save(ctx context.Context) (*Org, error)

Save executes the query and returns the updated Org entity.

func (*OrgUpdateOne) SaveX

func (ouo *OrgUpdateOne) SaveX(ctx context.Context) *Org

SaveX is like Save, but panics if an error occurs.

func (*OrgUpdateOne) Select

func (ouo *OrgUpdateOne) Select(field string, fields ...string) *OrgUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgUpdateOne) SetCode

func (ouo *OrgUpdateOne) SetCode(s string) *OrgUpdateOne

SetCode sets the "code" field.

func (*OrgUpdateOne) SetCountryCode

func (ouo *OrgUpdateOne) SetCountryCode(s string) *OrgUpdateOne

SetCountryCode sets the "country_code" field.

func (*OrgUpdateOne) SetDeletedAt

func (ouo *OrgUpdateOne) SetDeletedAt(t time.Time) *OrgUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*OrgUpdateOne) SetDisplaySort

func (ouo *OrgUpdateOne) SetDisplaySort(i int32) *OrgUpdateOne

SetDisplaySort sets the "display_sort" field.

func (*OrgUpdateOne) SetDomain

func (ouo *OrgUpdateOne) SetDomain(s string) *OrgUpdateOne

SetDomain sets the "domain" field.

func (*OrgUpdateOne) SetInput

func (c *OrgUpdateOne) SetInput(i UpdateOrgInput) *OrgUpdateOne

SetInput applies the change-set in the UpdateOrgInput on the OrgUpdateOne builder.

func (*OrgUpdateOne) SetKind

func (ouo *OrgUpdateOne) SetKind(o org.Kind) *OrgUpdateOne

SetKind sets the "kind" field.

func (*OrgUpdateOne) SetName

func (ouo *OrgUpdateOne) SetName(s string) *OrgUpdateOne

SetName sets the "name" field.

func (*OrgUpdateOne) SetNillableCode

func (ouo *OrgUpdateOne) SetNillableCode(s *string) *OrgUpdateOne

SetNillableCode sets the "code" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableCountryCode

func (ouo *OrgUpdateOne) SetNillableCountryCode(s *string) *OrgUpdateOne

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableDeletedAt

func (ouo *OrgUpdateOne) SetNillableDeletedAt(t *time.Time) *OrgUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableDisplaySort

func (ouo *OrgUpdateOne) SetNillableDisplaySort(i *int32) *OrgUpdateOne

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableDomain

func (ouo *OrgUpdateOne) SetNillableDomain(s *string) *OrgUpdateOne

SetNillableDomain sets the "domain" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableKind

func (ouo *OrgUpdateOne) SetNillableKind(o *org.Kind) *OrgUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableOwnerID

func (ouo *OrgUpdateOne) SetNillableOwnerID(i *int) *OrgUpdateOne

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableParentID

func (ouo *OrgUpdateOne) SetNillableParentID(i *int) *OrgUpdateOne

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*OrgUpdateOne) SetNillablePath

func (ouo *OrgUpdateOne) SetNillablePath(s *string) *OrgUpdateOne

SetNillablePath sets the "path" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableProfile

func (ouo *OrgUpdateOne) SetNillableProfile(s *string) *OrgUpdateOne

SetNillableProfile sets the "profile" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableStatus

func (ouo *OrgUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *OrgUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableTimezone

func (ouo *OrgUpdateOne) SetNillableTimezone(s *string) *OrgUpdateOne

SetNillableTimezone sets the "timezone" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableUpdatedAt

func (ouo *OrgUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrgUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableUpdatedBy

func (ouo *OrgUpdateOne) SetNillableUpdatedBy(i *int) *OrgUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUpdateOne) SetOwner

func (ouo *OrgUpdateOne) SetOwner(u *User) *OrgUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*OrgUpdateOne) SetOwnerID

func (ouo *OrgUpdateOne) SetOwnerID(i int) *OrgUpdateOne

SetOwnerID sets the "owner_id" field.

func (*OrgUpdateOne) SetParent

func (ouo *OrgUpdateOne) SetParent(o *Org) *OrgUpdateOne

SetParent sets the "parent" edge to the Org entity.

func (*OrgUpdateOne) SetParentID

func (ouo *OrgUpdateOne) SetParentID(i int) *OrgUpdateOne

SetParentID sets the "parent_id" field.

func (*OrgUpdateOne) SetPath

func (ouo *OrgUpdateOne) SetPath(s string) *OrgUpdateOne

SetPath sets the "path" field.

func (*OrgUpdateOne) SetProfile

func (ouo *OrgUpdateOne) SetProfile(s string) *OrgUpdateOne

SetProfile sets the "profile" field.

func (*OrgUpdateOne) SetStatus

func (ouo *OrgUpdateOne) SetStatus(ts typex.SimpleStatus) *OrgUpdateOne

SetStatus sets the "status" field.

func (*OrgUpdateOne) SetTimezone

func (ouo *OrgUpdateOne) SetTimezone(s string) *OrgUpdateOne

SetTimezone sets the "timezone" field.

func (*OrgUpdateOne) SetUpdatedAt

func (ouo *OrgUpdateOne) SetUpdatedAt(t time.Time) *OrgUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgUpdateOne) SetUpdatedBy

func (ouo *OrgUpdateOne) SetUpdatedBy(i int) *OrgUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgUpdateOne) Where

func (ouo *OrgUpdateOne) Where(ps ...predicate.Org) *OrgUpdateOne

Where appends a list predicates to the OrgUpdate builder.

type OrgUpsert

type OrgUpsert struct {
	*sql.UpdateSet
}

OrgUpsert is the "OnConflict" setter.

func (*OrgUpsert) AddDisplaySort

func (u *OrgUpsert) AddDisplaySort(v int32) *OrgUpsert

AddDisplaySort adds v to the "display_sort" field.

func (*OrgUpsert) AddUpdatedBy

func (u *OrgUpsert) AddUpdatedBy(v int) *OrgUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUpsert) ClearCode

func (u *OrgUpsert) ClearCode() *OrgUpsert

ClearCode clears the value of the "code" field.

func (*OrgUpsert) ClearCountryCode

func (u *OrgUpsert) ClearCountryCode() *OrgUpsert

ClearCountryCode clears the value of the "country_code" field.

func (*OrgUpsert) ClearDeletedAt

func (u *OrgUpsert) ClearDeletedAt() *OrgUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgUpsert) ClearDisplaySort

func (u *OrgUpsert) ClearDisplaySort() *OrgUpsert

ClearDisplaySort clears the value of the "display_sort" field.

func (*OrgUpsert) ClearDomain

func (u *OrgUpsert) ClearDomain() *OrgUpsert

ClearDomain clears the value of the "domain" field.

func (*OrgUpsert) ClearOwnerID

func (u *OrgUpsert) ClearOwnerID() *OrgUpsert

ClearOwnerID clears the value of the "owner_id" field.

func (*OrgUpsert) ClearPath

func (u *OrgUpsert) ClearPath() *OrgUpsert

ClearPath clears the value of the "path" field.

func (*OrgUpsert) ClearProfile

func (u *OrgUpsert) ClearProfile() *OrgUpsert

ClearProfile clears the value of the "profile" field.

func (*OrgUpsert) ClearStatus

func (u *OrgUpsert) ClearStatus() *OrgUpsert

ClearStatus clears the value of the "status" field.

func (*OrgUpsert) ClearTimezone

func (u *OrgUpsert) ClearTimezone() *OrgUpsert

ClearTimezone clears the value of the "timezone" field.

func (*OrgUpsert) ClearUpdatedAt

func (u *OrgUpsert) ClearUpdatedAt() *OrgUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUpsert) ClearUpdatedBy

func (u *OrgUpsert) ClearUpdatedBy() *OrgUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUpsert) SetCode

func (u *OrgUpsert) SetCode(v string) *OrgUpsert

SetCode sets the "code" field.

func (*OrgUpsert) SetCountryCode

func (u *OrgUpsert) SetCountryCode(v string) *OrgUpsert

SetCountryCode sets the "country_code" field.

func (*OrgUpsert) SetDeletedAt

func (u *OrgUpsert) SetDeletedAt(v time.Time) *OrgUpsert

SetDeletedAt sets the "deleted_at" field.

func (*OrgUpsert) SetDisplaySort

func (u *OrgUpsert) SetDisplaySort(v int32) *OrgUpsert

SetDisplaySort sets the "display_sort" field.

func (*OrgUpsert) SetDomain

func (u *OrgUpsert) SetDomain(v string) *OrgUpsert

SetDomain sets the "domain" field.

func (*OrgUpsert) SetKind

func (u *OrgUpsert) SetKind(v org.Kind) *OrgUpsert

SetKind sets the "kind" field.

func (*OrgUpsert) SetName

func (u *OrgUpsert) SetName(v string) *OrgUpsert

SetName sets the "name" field.

func (*OrgUpsert) SetOwnerID

func (u *OrgUpsert) SetOwnerID(v int) *OrgUpsert

SetOwnerID sets the "owner_id" field.

func (*OrgUpsert) SetParentID

func (u *OrgUpsert) SetParentID(v int) *OrgUpsert

SetParentID sets the "parent_id" field.

func (*OrgUpsert) SetPath

func (u *OrgUpsert) SetPath(v string) *OrgUpsert

SetPath sets the "path" field.

func (*OrgUpsert) SetProfile

func (u *OrgUpsert) SetProfile(v string) *OrgUpsert

SetProfile sets the "profile" field.

func (*OrgUpsert) SetStatus

func (u *OrgUpsert) SetStatus(v typex.SimpleStatus) *OrgUpsert

SetStatus sets the "status" field.

func (*OrgUpsert) SetTimezone

func (u *OrgUpsert) SetTimezone(v string) *OrgUpsert

SetTimezone sets the "timezone" field.

func (*OrgUpsert) SetUpdatedAt

func (u *OrgUpsert) SetUpdatedAt(v time.Time) *OrgUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OrgUpsert) SetUpdatedBy

func (u *OrgUpsert) SetUpdatedBy(v int) *OrgUpsert

SetUpdatedBy sets the "updated_by" field.

func (*OrgUpsert) UpdateCode

func (u *OrgUpsert) UpdateCode() *OrgUpsert

UpdateCode sets the "code" field to the value that was provided on create.

func (*OrgUpsert) UpdateCountryCode

func (u *OrgUpsert) UpdateCountryCode() *OrgUpsert

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*OrgUpsert) UpdateDeletedAt

func (u *OrgUpsert) UpdateDeletedAt() *OrgUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*OrgUpsert) UpdateDisplaySort

func (u *OrgUpsert) UpdateDisplaySort() *OrgUpsert

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*OrgUpsert) UpdateDomain

func (u *OrgUpsert) UpdateDomain() *OrgUpsert

UpdateDomain sets the "domain" field to the value that was provided on create.

func (*OrgUpsert) UpdateKind

func (u *OrgUpsert) UpdateKind() *OrgUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgUpsert) UpdateName

func (u *OrgUpsert) UpdateName() *OrgUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgUpsert) UpdateOwnerID

func (u *OrgUpsert) UpdateOwnerID() *OrgUpsert

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*OrgUpsert) UpdateParentID

func (u *OrgUpsert) UpdateParentID() *OrgUpsert

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*OrgUpsert) UpdatePath

func (u *OrgUpsert) UpdatePath() *OrgUpsert

UpdatePath sets the "path" field to the value that was provided on create.

func (*OrgUpsert) UpdateProfile

func (u *OrgUpsert) UpdateProfile() *OrgUpsert

UpdateProfile sets the "profile" field to the value that was provided on create.

func (*OrgUpsert) UpdateStatus

func (u *OrgUpsert) UpdateStatus() *OrgUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OrgUpsert) UpdateTimezone

func (u *OrgUpsert) UpdateTimezone() *OrgUpsert

UpdateTimezone sets the "timezone" field to the value that was provided on create.

func (*OrgUpsert) UpdateUpdatedAt

func (u *OrgUpsert) UpdateUpdatedAt() *OrgUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUpsert) UpdateUpdatedBy

func (u *OrgUpsert) UpdateUpdatedBy() *OrgUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgUpsertBulk

type OrgUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgUpsertBulk is the builder for "upsert"-ing a bulk of Org nodes.

func (*OrgUpsertBulk) AddDisplaySort

func (u *OrgUpsertBulk) AddDisplaySort(v int32) *OrgUpsertBulk

AddDisplaySort adds v to the "display_sort" field.

func (*OrgUpsertBulk) AddUpdatedBy

func (u *OrgUpsertBulk) AddUpdatedBy(v int) *OrgUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUpsertBulk) ClearCode

func (u *OrgUpsertBulk) ClearCode() *OrgUpsertBulk

ClearCode clears the value of the "code" field.

func (*OrgUpsertBulk) ClearCountryCode

func (u *OrgUpsertBulk) ClearCountryCode() *OrgUpsertBulk

ClearCountryCode clears the value of the "country_code" field.

func (*OrgUpsertBulk) ClearDeletedAt

func (u *OrgUpsertBulk) ClearDeletedAt() *OrgUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgUpsertBulk) ClearDisplaySort

func (u *OrgUpsertBulk) ClearDisplaySort() *OrgUpsertBulk

ClearDisplaySort clears the value of the "display_sort" field.

func (*OrgUpsertBulk) ClearDomain

func (u *OrgUpsertBulk) ClearDomain() *OrgUpsertBulk

ClearDomain clears the value of the "domain" field.

func (*OrgUpsertBulk) ClearOwnerID

func (u *OrgUpsertBulk) ClearOwnerID() *OrgUpsertBulk

ClearOwnerID clears the value of the "owner_id" field.

func (*OrgUpsertBulk) ClearPath

func (u *OrgUpsertBulk) ClearPath() *OrgUpsertBulk

ClearPath clears the value of the "path" field.

func (*OrgUpsertBulk) ClearProfile

func (u *OrgUpsertBulk) ClearProfile() *OrgUpsertBulk

ClearProfile clears the value of the "profile" field.

func (*OrgUpsertBulk) ClearStatus

func (u *OrgUpsertBulk) ClearStatus() *OrgUpsertBulk

ClearStatus clears the value of the "status" field.

func (*OrgUpsertBulk) ClearTimezone

func (u *OrgUpsertBulk) ClearTimezone() *OrgUpsertBulk

ClearTimezone clears the value of the "timezone" field.

func (*OrgUpsertBulk) ClearUpdatedAt

func (u *OrgUpsertBulk) ClearUpdatedAt() *OrgUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUpsertBulk) ClearUpdatedBy

func (u *OrgUpsertBulk) ClearUpdatedBy() *OrgUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUpsertBulk) DoNothing

func (u *OrgUpsertBulk) DoNothing() *OrgUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUpsertBulk) Exec

func (u *OrgUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUpsertBulk) ExecX

func (u *OrgUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUpsertBulk) Ignore

func (u *OrgUpsertBulk) Ignore() *OrgUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Org.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgUpsertBulk) SetCode

func (u *OrgUpsertBulk) SetCode(v string) *OrgUpsertBulk

SetCode sets the "code" field.

func (*OrgUpsertBulk) SetCountryCode

func (u *OrgUpsertBulk) SetCountryCode(v string) *OrgUpsertBulk

SetCountryCode sets the "country_code" field.

func (*OrgUpsertBulk) SetDeletedAt

func (u *OrgUpsertBulk) SetDeletedAt(v time.Time) *OrgUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*OrgUpsertBulk) SetDisplaySort

func (u *OrgUpsertBulk) SetDisplaySort(v int32) *OrgUpsertBulk

SetDisplaySort sets the "display_sort" field.

func (*OrgUpsertBulk) SetDomain

func (u *OrgUpsertBulk) SetDomain(v string) *OrgUpsertBulk

SetDomain sets the "domain" field.

func (*OrgUpsertBulk) SetKind

func (u *OrgUpsertBulk) SetKind(v org.Kind) *OrgUpsertBulk

SetKind sets the "kind" field.

func (*OrgUpsertBulk) SetName

func (u *OrgUpsertBulk) SetName(v string) *OrgUpsertBulk

SetName sets the "name" field.

func (*OrgUpsertBulk) SetOwnerID

func (u *OrgUpsertBulk) SetOwnerID(v int) *OrgUpsertBulk

SetOwnerID sets the "owner_id" field.

func (*OrgUpsertBulk) SetParentID

func (u *OrgUpsertBulk) SetParentID(v int) *OrgUpsertBulk

SetParentID sets the "parent_id" field.

func (*OrgUpsertBulk) SetPath

func (u *OrgUpsertBulk) SetPath(v string) *OrgUpsertBulk

SetPath sets the "path" field.

func (*OrgUpsertBulk) SetProfile

func (u *OrgUpsertBulk) SetProfile(v string) *OrgUpsertBulk

SetProfile sets the "profile" field.

func (*OrgUpsertBulk) SetStatus

func (u *OrgUpsertBulk) SetStatus(v typex.SimpleStatus) *OrgUpsertBulk

SetStatus sets the "status" field.

func (*OrgUpsertBulk) SetTimezone

func (u *OrgUpsertBulk) SetTimezone(v string) *OrgUpsertBulk

SetTimezone sets the "timezone" field.

func (*OrgUpsertBulk) SetUpdatedAt

func (u *OrgUpsertBulk) SetUpdatedAt(v time.Time) *OrgUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*OrgUpsertBulk) SetUpdatedBy

func (u *OrgUpsertBulk) SetUpdatedBy(v int) *OrgUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*OrgUpsertBulk) Update

func (u *OrgUpsertBulk) Update(set func(*OrgUpsert)) *OrgUpsertBulk

Update allows overriding fields `UPDATE` values. See the OrgCreateBulk.OnConflict documentation for more info.

func (*OrgUpsertBulk) UpdateCode

func (u *OrgUpsertBulk) UpdateCode() *OrgUpsertBulk

UpdateCode sets the "code" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateCountryCode

func (u *OrgUpsertBulk) UpdateCountryCode() *OrgUpsertBulk

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateDeletedAt

func (u *OrgUpsertBulk) UpdateDeletedAt() *OrgUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateDisplaySort

func (u *OrgUpsertBulk) UpdateDisplaySort() *OrgUpsertBulk

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateDomain

func (u *OrgUpsertBulk) UpdateDomain() *OrgUpsertBulk

UpdateDomain sets the "domain" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateKind

func (u *OrgUpsertBulk) UpdateKind() *OrgUpsertBulk

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateName

func (u *OrgUpsertBulk) UpdateName() *OrgUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateNewValues

func (u *OrgUpsertBulk) UpdateNewValues() *OrgUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Org.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(org.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUpsertBulk) UpdateOwnerID

func (u *OrgUpsertBulk) UpdateOwnerID() *OrgUpsertBulk

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateParentID

func (u *OrgUpsertBulk) UpdateParentID() *OrgUpsertBulk

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdatePath

func (u *OrgUpsertBulk) UpdatePath() *OrgUpsertBulk

UpdatePath sets the "path" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateProfile

func (u *OrgUpsertBulk) UpdateProfile() *OrgUpsertBulk

UpdateProfile sets the "profile" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateStatus

func (u *OrgUpsertBulk) UpdateStatus() *OrgUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateTimezone

func (u *OrgUpsertBulk) UpdateTimezone() *OrgUpsertBulk

UpdateTimezone sets the "timezone" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateUpdatedAt

func (u *OrgUpsertBulk) UpdateUpdatedAt() *OrgUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUpsertBulk) UpdateUpdatedBy

func (u *OrgUpsertBulk) UpdateUpdatedBy() *OrgUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgUpsertOne

type OrgUpsertOne struct {
	// contains filtered or unexported fields
}

OrgUpsertOne is the builder for "upsert"-ing

one Org node.

func (*OrgUpsertOne) AddDisplaySort

func (u *OrgUpsertOne) AddDisplaySort(v int32) *OrgUpsertOne

AddDisplaySort adds v to the "display_sort" field.

func (*OrgUpsertOne) AddUpdatedBy

func (u *OrgUpsertOne) AddUpdatedBy(v int) *OrgUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUpsertOne) ClearCode

func (u *OrgUpsertOne) ClearCode() *OrgUpsertOne

ClearCode clears the value of the "code" field.

func (*OrgUpsertOne) ClearCountryCode

func (u *OrgUpsertOne) ClearCountryCode() *OrgUpsertOne

ClearCountryCode clears the value of the "country_code" field.

func (*OrgUpsertOne) ClearDeletedAt

func (u *OrgUpsertOne) ClearDeletedAt() *OrgUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*OrgUpsertOne) ClearDisplaySort

func (u *OrgUpsertOne) ClearDisplaySort() *OrgUpsertOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*OrgUpsertOne) ClearDomain

func (u *OrgUpsertOne) ClearDomain() *OrgUpsertOne

ClearDomain clears the value of the "domain" field.

func (*OrgUpsertOne) ClearOwnerID

func (u *OrgUpsertOne) ClearOwnerID() *OrgUpsertOne

ClearOwnerID clears the value of the "owner_id" field.

func (*OrgUpsertOne) ClearPath

func (u *OrgUpsertOne) ClearPath() *OrgUpsertOne

ClearPath clears the value of the "path" field.

func (*OrgUpsertOne) ClearProfile

func (u *OrgUpsertOne) ClearProfile() *OrgUpsertOne

ClearProfile clears the value of the "profile" field.

func (*OrgUpsertOne) ClearStatus

func (u *OrgUpsertOne) ClearStatus() *OrgUpsertOne

ClearStatus clears the value of the "status" field.

func (*OrgUpsertOne) ClearTimezone

func (u *OrgUpsertOne) ClearTimezone() *OrgUpsertOne

ClearTimezone clears the value of the "timezone" field.

func (*OrgUpsertOne) ClearUpdatedAt

func (u *OrgUpsertOne) ClearUpdatedAt() *OrgUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUpsertOne) ClearUpdatedBy

func (u *OrgUpsertOne) ClearUpdatedBy() *OrgUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUpsertOne) DoNothing

func (u *OrgUpsertOne) DoNothing() *OrgUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUpsertOne) Exec

func (u *OrgUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUpsertOne) ExecX

func (u *OrgUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUpsertOne) ID

func (u *OrgUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgUpsertOne) IDX

func (u *OrgUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgUpsertOne) Ignore

func (u *OrgUpsertOne) Ignore() *OrgUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Org.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgUpsertOne) SetCode

func (u *OrgUpsertOne) SetCode(v string) *OrgUpsertOne

SetCode sets the "code" field.

func (*OrgUpsertOne) SetCountryCode

func (u *OrgUpsertOne) SetCountryCode(v string) *OrgUpsertOne

SetCountryCode sets the "country_code" field.

func (*OrgUpsertOne) SetDeletedAt

func (u *OrgUpsertOne) SetDeletedAt(v time.Time) *OrgUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*OrgUpsertOne) SetDisplaySort

func (u *OrgUpsertOne) SetDisplaySort(v int32) *OrgUpsertOne

SetDisplaySort sets the "display_sort" field.

func (*OrgUpsertOne) SetDomain

func (u *OrgUpsertOne) SetDomain(v string) *OrgUpsertOne

SetDomain sets the "domain" field.

func (*OrgUpsertOne) SetKind

func (u *OrgUpsertOne) SetKind(v org.Kind) *OrgUpsertOne

SetKind sets the "kind" field.

func (*OrgUpsertOne) SetName

func (u *OrgUpsertOne) SetName(v string) *OrgUpsertOne

SetName sets the "name" field.

func (*OrgUpsertOne) SetOwnerID

func (u *OrgUpsertOne) SetOwnerID(v int) *OrgUpsertOne

SetOwnerID sets the "owner_id" field.

func (*OrgUpsertOne) SetParentID

func (u *OrgUpsertOne) SetParentID(v int) *OrgUpsertOne

SetParentID sets the "parent_id" field.

func (*OrgUpsertOne) SetPath

func (u *OrgUpsertOne) SetPath(v string) *OrgUpsertOne

SetPath sets the "path" field.

func (*OrgUpsertOne) SetProfile

func (u *OrgUpsertOne) SetProfile(v string) *OrgUpsertOne

SetProfile sets the "profile" field.

func (*OrgUpsertOne) SetStatus

func (u *OrgUpsertOne) SetStatus(v typex.SimpleStatus) *OrgUpsertOne

SetStatus sets the "status" field.

func (*OrgUpsertOne) SetTimezone

func (u *OrgUpsertOne) SetTimezone(v string) *OrgUpsertOne

SetTimezone sets the "timezone" field.

func (*OrgUpsertOne) SetUpdatedAt

func (u *OrgUpsertOne) SetUpdatedAt(v time.Time) *OrgUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgUpsertOne) SetUpdatedBy

func (u *OrgUpsertOne) SetUpdatedBy(v int) *OrgUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgUpsertOne) Update

func (u *OrgUpsertOne) Update(set func(*OrgUpsert)) *OrgUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgCreate.OnConflict documentation for more info.

func (*OrgUpsertOne) UpdateCode

func (u *OrgUpsertOne) UpdateCode() *OrgUpsertOne

UpdateCode sets the "code" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateCountryCode

func (u *OrgUpsertOne) UpdateCountryCode() *OrgUpsertOne

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateDeletedAt

func (u *OrgUpsertOne) UpdateDeletedAt() *OrgUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateDisplaySort

func (u *OrgUpsertOne) UpdateDisplaySort() *OrgUpsertOne

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateDomain

func (u *OrgUpsertOne) UpdateDomain() *OrgUpsertOne

UpdateDomain sets the "domain" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateKind

func (u *OrgUpsertOne) UpdateKind() *OrgUpsertOne

UpdateKind sets the "kind" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateName

func (u *OrgUpsertOne) UpdateName() *OrgUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateNewValues

func (u *OrgUpsertOne) UpdateNewValues() *OrgUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Org.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(org.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUpsertOne) UpdateOwnerID

func (u *OrgUpsertOne) UpdateOwnerID() *OrgUpsertOne

UpdateOwnerID sets the "owner_id" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateParentID

func (u *OrgUpsertOne) UpdateParentID() *OrgUpsertOne

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*OrgUpsertOne) UpdatePath

func (u *OrgUpsertOne) UpdatePath() *OrgUpsertOne

UpdatePath sets the "path" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateProfile

func (u *OrgUpsertOne) UpdateProfile() *OrgUpsertOne

UpdateProfile sets the "profile" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateStatus

func (u *OrgUpsertOne) UpdateStatus() *OrgUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateTimezone

func (u *OrgUpsertOne) UpdateTimezone() *OrgUpsertOne

UpdateTimezone sets the "timezone" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateUpdatedAt

func (u *OrgUpsertOne) UpdateUpdatedAt() *OrgUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUpsertOne) UpdateUpdatedBy

func (u *OrgUpsertOne) UpdateUpdatedBy() *OrgUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type OrgUser

type OrgUser struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// 加入时间
	JoinedAt time.Time `json:"joined_at,omitempty"`
	// 在组织内的显示名称
	DisplayName string `json:"display_name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgUserQuery when eager-loading is set.
	Edges OrgUserEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgUser is the model entity for the OrgUser schema.

func (*OrgUser) NamedOrgRoleUser

func (ou *OrgUser) NamedOrgRoleUser(name string) ([]*OrgRoleUser, error)

NamedOrgRoleUser returns the OrgRoleUser named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgUser) NamedOrgRoles

func (ou *OrgUser) NamedOrgRoles(name string) ([]*OrgRole, error)

NamedOrgRoles returns the OrgRoles named value or an error if the edge was not loaded in eager-loading with this name.

func (*OrgUser) QueryOrg

func (ou *OrgUser) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the OrgUser entity.

func (*OrgUser) QueryOrgRoleUser

func (ou *OrgUser) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser queries the "org_role_user" edge of the OrgUser entity.

func (*OrgUser) QueryOrgRoles

func (ou *OrgUser) QueryOrgRoles() *OrgRoleQuery

QueryOrgRoles queries the "org_roles" edge of the OrgUser entity.

func (*OrgUser) QueryUser

func (ou *OrgUser) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OrgUser entity.

func (*OrgUser) String

func (ou *OrgUser) String() string

String implements the fmt.Stringer.

func (*OrgUser) Unwrap

func (ou *OrgUser) Unwrap() *OrgUser

Unwrap unwraps the OrgUser entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgUser) Update

func (ou *OrgUser) Update() *OrgUserUpdateOne

Update returns a builder for updating this OrgUser. Note that you need to call OrgUser.Unwrap() before calling this method if this OrgUser was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgUser) Value

func (ou *OrgUser) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgUser. This includes values selected through modifiers, order, etc.

type OrgUserClient

type OrgUserClient struct {
	// contains filtered or unexported fields
}

OrgUserClient is a client for the OrgUser schema.

func NewOrgUserClient

func NewOrgUserClient(c config) *OrgUserClient

NewOrgUserClient returns a client for the OrgUser from the given config.

func (*OrgUserClient) Create

func (c *OrgUserClient) Create() *OrgUserCreate

Create returns a builder for creating a OrgUser entity.

func (*OrgUserClient) CreateBulk

func (c *OrgUserClient) CreateBulk(builders ...*OrgUserCreate) *OrgUserCreateBulk

CreateBulk returns a builder for creating a bulk of OrgUser entities.

func (*OrgUserClient) Delete

func (c *OrgUserClient) Delete() *OrgUserDelete

Delete returns a delete builder for OrgUser.

func (*OrgUserClient) DeleteOne

func (c *OrgUserClient) DeleteOne(ou *OrgUser) *OrgUserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgUserClient) DeleteOneID

func (c *OrgUserClient) DeleteOneID(id int) *OrgUserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgUserClient) Get

func (c *OrgUserClient) Get(ctx context.Context, id int) (*OrgUser, error)

Get returns a OrgUser entity by its id.

func (*OrgUserClient) GetX

func (c *OrgUserClient) GetX(ctx context.Context, id int) *OrgUser

GetX is like Get, but panics if an error occurs.

func (*OrgUserClient) Hooks

func (c *OrgUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgUserClient) Intercept

func (c *OrgUserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orguser.Intercept(f(g(h())))`.

func (*OrgUserClient) Interceptors

func (c *OrgUserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgUserClient) MapCreateBulk

func (c *OrgUserClient) MapCreateBulk(slice any, setFunc func(*OrgUserCreate, int)) *OrgUserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgUserClient) Query

func (c *OrgUserClient) Query() *OrgUserQuery

Query returns a query builder for OrgUser.

func (*OrgUserClient) QueryOrg

func (c *OrgUserClient) QueryOrg(ou *OrgUser) *OrgQuery

QueryOrg queries the org edge of a OrgUser.

func (*OrgUserClient) QueryOrgRoleUser

func (c *OrgUserClient) QueryOrgRoleUser(ou *OrgUser) *OrgRoleUserQuery

QueryOrgRoleUser queries the org_role_user edge of a OrgUser.

func (*OrgUserClient) QueryOrgRoles

func (c *OrgUserClient) QueryOrgRoles(ou *OrgUser) *OrgRoleQuery

QueryOrgRoles queries the org_roles edge of a OrgUser.

func (*OrgUserClient) QueryUser

func (c *OrgUserClient) QueryUser(ou *OrgUser) *UserQuery

QueryUser queries the user edge of a OrgUser.

func (*OrgUserClient) Update

func (c *OrgUserClient) Update() *OrgUserUpdate

Update returns an update builder for OrgUser.

func (*OrgUserClient) UpdateOne

func (c *OrgUserClient) UpdateOne(ou *OrgUser) *OrgUserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgUserClient) UpdateOneID

func (c *OrgUserClient) UpdateOneID(id int) *OrgUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgUserClient) Use

func (c *OrgUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orguser.Hooks(f(g(h())))`.

type OrgUserCreate

type OrgUserCreate struct {
	// contains filtered or unexported fields
}

OrgUserCreate is the builder for creating a OrgUser entity.

func (*OrgUserCreate) AddOrgRoleIDs

func (ouc *OrgUserCreate) AddOrgRoleIDs(ids ...int) *OrgUserCreate

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserCreate) AddOrgRoleUser

func (ouc *OrgUserCreate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgUserCreate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserCreate) AddOrgRoleUserIDs

func (ouc *OrgUserCreate) AddOrgRoleUserIDs(ids ...int) *OrgUserCreate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserCreate) AddOrgRoles

func (ouc *OrgUserCreate) AddOrgRoles(o ...*OrgRole) *OrgUserCreate

AddOrgRoles adds the "org_roles" edges to the OrgRole entity.

func (*OrgUserCreate) Exec

func (ouc *OrgUserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserCreate) ExecX

func (ouc *OrgUserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserCreate) Mutation

func (ouc *OrgUserCreate) Mutation() *OrgUserMutation

Mutation returns the OrgUserMutation object of the builder.

func (*OrgUserCreate) OnConflict

func (ouc *OrgUserCreate) OnConflict(opts ...sql.ConflictOption) *OrgUserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgUser.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUserUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgUserCreate) OnConflictColumns

func (ouc *OrgUserCreate) OnConflictColumns(columns ...string) *OrgUserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgUserCreate) Save

func (ouc *OrgUserCreate) Save(ctx context.Context) (*OrgUser, error)

Save creates the OrgUser in the database.

func (*OrgUserCreate) SaveX

func (ouc *OrgUserCreate) SaveX(ctx context.Context) *OrgUser

SaveX calls Save and panics if Save returns an error.

func (*OrgUserCreate) SetCreatedAt

func (ouc *OrgUserCreate) SetCreatedAt(t time.Time) *OrgUserCreate

SetCreatedAt sets the "created_at" field.

func (*OrgUserCreate) SetCreatedBy

func (ouc *OrgUserCreate) SetCreatedBy(i int) *OrgUserCreate

SetCreatedBy sets the "created_by" field.

func (*OrgUserCreate) SetDisplayName

func (ouc *OrgUserCreate) SetDisplayName(s string) *OrgUserCreate

SetDisplayName sets the "display_name" field.

func (*OrgUserCreate) SetID

func (ouc *OrgUserCreate) SetID(i int) *OrgUserCreate

SetID sets the "id" field.

func (*OrgUserCreate) SetInput

SetInput applies the change-set in the CreateOrgUserInput on the OrgUserCreate builder.

func (*OrgUserCreate) SetJoinedAt

func (ouc *OrgUserCreate) SetJoinedAt(t time.Time) *OrgUserCreate

SetJoinedAt sets the "joined_at" field.

func (*OrgUserCreate) SetNillableCreatedAt

func (ouc *OrgUserCreate) SetNillableCreatedAt(t *time.Time) *OrgUserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgUserCreate) SetNillableJoinedAt

func (ouc *OrgUserCreate) SetNillableJoinedAt(t *time.Time) *OrgUserCreate

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*OrgUserCreate) SetNillableUpdatedAt

func (ouc *OrgUserCreate) SetNillableUpdatedAt(t *time.Time) *OrgUserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUserCreate) SetNillableUpdatedBy

func (ouc *OrgUserCreate) SetNillableUpdatedBy(i *int) *OrgUserCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUserCreate) SetOrg

func (ouc *OrgUserCreate) SetOrg(o *Org) *OrgUserCreate

SetOrg sets the "org" edge to the Org entity.

func (*OrgUserCreate) SetOrgID

func (ouc *OrgUserCreate) SetOrgID(i int) *OrgUserCreate

SetOrgID sets the "org_id" field.

func (*OrgUserCreate) SetUpdatedAt

func (ouc *OrgUserCreate) SetUpdatedAt(t time.Time) *OrgUserCreate

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserCreate) SetUpdatedBy

func (ouc *OrgUserCreate) SetUpdatedBy(i int) *OrgUserCreate

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserCreate) SetUser

func (ouc *OrgUserCreate) SetUser(u *User) *OrgUserCreate

SetUser sets the "user" edge to the User entity.

func (*OrgUserCreate) SetUserID

func (ouc *OrgUserCreate) SetUserID(i int) *OrgUserCreate

SetUserID sets the "user_id" field.

type OrgUserCreateBulk

type OrgUserCreateBulk struct {
	// contains filtered or unexported fields
}

OrgUserCreateBulk is the builder for creating many OrgUser entities in bulk.

func (*OrgUserCreateBulk) Exec

func (oucb *OrgUserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserCreateBulk) ExecX

func (oucb *OrgUserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserCreateBulk) OnConflict

func (oucb *OrgUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgUserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgUser.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUserUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgUserCreateBulk) OnConflictColumns

func (oucb *OrgUserCreateBulk) OnConflictColumns(columns ...string) *OrgUserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgUserCreateBulk) Save

func (oucb *OrgUserCreateBulk) Save(ctx context.Context) ([]*OrgUser, error)

Save creates the OrgUser entities in the database.

func (*OrgUserCreateBulk) SaveX

func (oucb *OrgUserCreateBulk) SaveX(ctx context.Context) []*OrgUser

SaveX is like Save, but panics if an error occurs.

type OrgUserDelete

type OrgUserDelete struct {
	// contains filtered or unexported fields
}

OrgUserDelete is the builder for deleting a OrgUser entity.

func (*OrgUserDelete) Exec

func (oud *OrgUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgUserDelete) ExecX

func (oud *OrgUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserDelete) Where

func (oud *OrgUserDelete) Where(ps ...predicate.OrgUser) *OrgUserDelete

Where appends a list predicates to the OrgUserDelete builder.

type OrgUserDeleteOne

type OrgUserDeleteOne struct {
	// contains filtered or unexported fields
}

OrgUserDeleteOne is the builder for deleting a single OrgUser entity.

func (*OrgUserDeleteOne) Exec

func (oudo *OrgUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgUserDeleteOne) ExecX

func (oudo *OrgUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserDeleteOne) Where

func (oudo *OrgUserDeleteOne) Where(ps ...predicate.OrgUser) *OrgUserDeleteOne

Where appends a list predicates to the OrgUserDelete builder.

type OrgUserEdges

type OrgUserEdges struct {
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// OrgRoles holds the value of the org_roles edge.
	OrgRoles []*OrgRole `json:"org_roles,omitempty"`
	// OrgRoleUser holds the value of the org_role_user edge.
	OrgRoleUser []*OrgRoleUser `json:"org_role_user,omitempty"`
	// contains filtered or unexported fields
}

OrgUserEdges holds the relations/edges for other nodes in the graph.

func (OrgUserEdges) OrgOrErr

func (e OrgUserEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgUserEdges) OrgRoleUserOrErr

func (e OrgUserEdges) OrgRoleUserOrErr() ([]*OrgRoleUser, error)

OrgRoleUserOrErr returns the OrgRoleUser value or an error if the edge was not loaded in eager-loading.

func (OrgUserEdges) OrgRolesOrErr

func (e OrgUserEdges) OrgRolesOrErr() ([]*OrgRole, error)

OrgRolesOrErr returns the OrgRoles value or an error if the edge was not loaded in eager-loading.

func (OrgUserEdges) UserOrErr

func (e OrgUserEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OrgUserGroupBy

type OrgUserGroupBy struct {
	// contains filtered or unexported fields
}

OrgUserGroupBy is the group-by builder for OrgUser entities.

func (*OrgUserGroupBy) Aggregate

func (ougb *OrgUserGroupBy) Aggregate(fns ...AggregateFunc) *OrgUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgUserGroupBy) Bool

func (s *OrgUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) BoolX

func (s *OrgUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgUserGroupBy) Bools

func (s *OrgUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) BoolsX

func (s *OrgUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgUserGroupBy) Float64

func (s *OrgUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) Float64X

func (s *OrgUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgUserGroupBy) Float64s

func (s *OrgUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) Float64sX

func (s *OrgUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgUserGroupBy) Int

func (s *OrgUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) IntX

func (s *OrgUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgUserGroupBy) Ints

func (s *OrgUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) IntsX

func (s *OrgUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgUserGroupBy) Scan

func (ougb *OrgUserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgUserGroupBy) ScanX

func (s *OrgUserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgUserGroupBy) String

func (s *OrgUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) StringX

func (s *OrgUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgUserGroupBy) Strings

func (s *OrgUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgUserGroupBy) StringsX

func (s *OrgUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgUserMutation

type OrgUserMutation struct {
	// contains filtered or unexported fields
}

OrgUserMutation represents an operation that mutates the OrgUser nodes in the graph.

func (*OrgUserMutation) AddCreatedBy

func (m *OrgUserMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OrgUserMutation) AddField

func (m *OrgUserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgUserMutation) AddOrgRoleIDs

func (m *OrgUserMutation) AddOrgRoleIDs(ids ...int)

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by ids.

func (*OrgUserMutation) AddOrgRoleUserIDs

func (m *OrgUserMutation) AddOrgRoleUserIDs(ids ...int)

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by ids.

func (*OrgUserMutation) AddUpdatedBy

func (m *OrgUserMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUserMutation) AddedCreatedBy

func (m *OrgUserMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OrgUserMutation) AddedEdges

func (m *OrgUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgUserMutation) AddedField

func (m *OrgUserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgUserMutation) AddedFields

func (m *OrgUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgUserMutation) AddedIDs

func (m *OrgUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgUserMutation) AddedUpdatedBy

func (m *OrgUserMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OrgUserMutation) ClearEdge

func (m *OrgUserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgUserMutation) ClearField

func (m *OrgUserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgUserMutation) ClearOrg

func (m *OrgUserMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*OrgUserMutation) ClearOrgRoleUser

func (m *OrgUserMutation) ClearOrgRoleUser()

ClearOrgRoleUser clears the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgUserMutation) ClearOrgRoles

func (m *OrgUserMutation) ClearOrgRoles()

ClearOrgRoles clears the "org_roles" edge to the OrgRole entity.

func (*OrgUserMutation) ClearUpdatedAt

func (m *OrgUserMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserMutation) ClearUpdatedBy

func (m *OrgUserMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserMutation) ClearUser

func (m *OrgUserMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OrgUserMutation) ClearedEdges

func (m *OrgUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgUserMutation) ClearedFields

func (m *OrgUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgUserMutation) Client

func (m OrgUserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgUserMutation) CreatedAt

func (m *OrgUserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgUserMutation) CreatedBy

func (m *OrgUserMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OrgUserMutation) DisplayName

func (m *OrgUserMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*OrgUserMutation) EdgeCleared

func (m *OrgUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgUserMutation) Field

func (m *OrgUserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgUserMutation) FieldCleared

func (m *OrgUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgUserMutation) Fields

func (m *OrgUserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgUserMutation) ID

func (m *OrgUserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgUserMutation) IDs

func (m *OrgUserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgUserMutation) JoinedAt

func (m *OrgUserMutation) JoinedAt() (r time.Time, exists bool)

JoinedAt returns the value of the "joined_at" field in the mutation.

func (*OrgUserMutation) OldCreatedAt

func (m *OrgUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldCreatedBy

func (m *OrgUserMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldDisplayName

func (m *OrgUserMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldField

func (m *OrgUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgUserMutation) OldJoinedAt

func (m *OrgUserMutation) OldJoinedAt(ctx context.Context) (v time.Time, err error)

OldJoinedAt returns the old "joined_at" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldOrgID

func (m *OrgUserMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldUpdatedAt

func (m *OrgUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldUpdatedBy

func (m *OrgUserMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) OldUserID

func (m *OrgUserMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the OrgUser entity. If the OrgUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserMutation) Op

func (m *OrgUserMutation) Op() Op

Op returns the operation name.

func (*OrgUserMutation) OrgCleared

func (m *OrgUserMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*OrgUserMutation) OrgID

func (m *OrgUserMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgUserMutation) OrgIDs

func (m *OrgUserMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*OrgUserMutation) OrgRoleUserCleared

func (m *OrgUserMutation) OrgRoleUserCleared() bool

OrgRoleUserCleared reports if the "org_role_user" edge to the OrgRoleUser entity was cleared.

func (*OrgUserMutation) OrgRoleUserIDs

func (m *OrgUserMutation) OrgRoleUserIDs() (ids []int)

OrgRoleUserIDs returns the "org_role_user" edge IDs in the mutation.

func (*OrgUserMutation) OrgRolesCleared

func (m *OrgUserMutation) OrgRolesCleared() bool

OrgRolesCleared reports if the "org_roles" edge to the OrgRole entity was cleared.

func (*OrgUserMutation) OrgRolesIDs

func (m *OrgUserMutation) OrgRolesIDs() (ids []int)

OrgRolesIDs returns the "org_roles" edge IDs in the mutation.

func (*OrgUserMutation) RemoveOrgRoleIDs

func (m *OrgUserMutation) RemoveOrgRoleIDs(ids ...int)

RemoveOrgRoleIDs removes the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserMutation) RemoveOrgRoleUserIDs

func (m *OrgUserMutation) RemoveOrgRoleUserIDs(ids ...int)

RemoveOrgRoleUserIDs removes the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserMutation) RemovedEdges

func (m *OrgUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgUserMutation) RemovedIDs

func (m *OrgUserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgUserMutation) RemovedOrgRoleUserIDs

func (m *OrgUserMutation) RemovedOrgRoleUserIDs() (ids []int)

RemovedOrgRoleUser returns the removed IDs of the "org_role_user" edge to the OrgRoleUser entity.

func (*OrgUserMutation) RemovedOrgRolesIDs

func (m *OrgUserMutation) RemovedOrgRolesIDs() (ids []int)

RemovedOrgRoles returns the removed IDs of the "org_roles" edge to the OrgRole entity.

func (*OrgUserMutation) ResetCreatedAt

func (m *OrgUserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgUserMutation) ResetCreatedBy

func (m *OrgUserMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OrgUserMutation) ResetDisplayName

func (m *OrgUserMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*OrgUserMutation) ResetEdge

func (m *OrgUserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgUserMutation) ResetField

func (m *OrgUserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgUserMutation) ResetJoinedAt

func (m *OrgUserMutation) ResetJoinedAt()

ResetJoinedAt resets all changes to the "joined_at" field.

func (*OrgUserMutation) ResetOrg

func (m *OrgUserMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*OrgUserMutation) ResetOrgID

func (m *OrgUserMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgUserMutation) ResetOrgRoleUser

func (m *OrgUserMutation) ResetOrgRoleUser()

ResetOrgRoleUser resets all changes to the "org_role_user" edge.

func (*OrgUserMutation) ResetOrgRoles

func (m *OrgUserMutation) ResetOrgRoles()

ResetOrgRoles resets all changes to the "org_roles" edge.

func (*OrgUserMutation) ResetUpdatedAt

func (m *OrgUserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrgUserMutation) ResetUpdatedBy

func (m *OrgUserMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OrgUserMutation) ResetUser

func (m *OrgUserMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OrgUserMutation) ResetUserID

func (m *OrgUserMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OrgUserMutation) SetCreatedAt

func (m *OrgUserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgUserMutation) SetCreatedBy

func (m *OrgUserMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OrgUserMutation) SetDisplayName

func (m *OrgUserMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*OrgUserMutation) SetField

func (m *OrgUserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgUserMutation) SetID

func (m *OrgUserMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgUser entities.

func (*OrgUserMutation) SetJoinedAt

func (m *OrgUserMutation) SetJoinedAt(t time.Time)

SetJoinedAt sets the "joined_at" field.

func (*OrgUserMutation) SetOp

func (m *OrgUserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgUserMutation) SetOrgID

func (m *OrgUserMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgUserMutation) SetUpdatedAt

func (m *OrgUserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserMutation) SetUpdatedBy

func (m *OrgUserMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserMutation) SetUserID

func (m *OrgUserMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (OrgUserMutation) Tx

func (m OrgUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgUserMutation) Type

func (m *OrgUserMutation) Type() string

Type returns the node type of this mutation (OrgUser).

func (*OrgUserMutation) UpdatedAt

func (m *OrgUserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrgUserMutation) UpdatedAtCleared

func (m *OrgUserMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OrgUserMutation) UpdatedBy

func (m *OrgUserMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OrgUserMutation) UpdatedByCleared

func (m *OrgUserMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OrgUserMutation) UserCleared

func (m *OrgUserMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OrgUserMutation) UserID

func (m *OrgUserMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OrgUserMutation) UserIDs

func (m *OrgUserMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OrgUserMutation) Where

func (m *OrgUserMutation) Where(ps ...predicate.OrgUser)

Where appends a list predicates to the OrgUserMutation builder.

func (*OrgUserMutation) WhereP

func (m *OrgUserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgUserPreference

type OrgUserPreference struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 用户id
	UserID int `json:"user_id,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 用户收藏菜单
	MenuFavorite []int `json:"menu_favorite,omitempty"`
	// 用户最近访问菜单
	MenuRecent []int `json:"menu_recent,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OrgUserPreferenceQuery when eager-loading is set.
	Edges OrgUserPreferenceEdges `json:"edges"`
	// contains filtered or unexported fields
}

OrgUserPreference is the model entity for the OrgUserPreference schema.

func (*OrgUserPreference) GlobalID

func (oup *OrgUserPreference) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given OrgUserPreference node.

func (*OrgUserPreference) IsNode

func (*OrgUserPreference) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*OrgUserPreference) Org

func (oup *OrgUserPreference) Org(ctx context.Context) (*Org, error)

func (*OrgUserPreference) QueryOrg

func (oup *OrgUserPreference) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the OrgUserPreference entity.

func (*OrgUserPreference) QueryUser

func (oup *OrgUserPreference) QueryUser() *UserQuery

QueryUser queries the "user" edge of the OrgUserPreference entity.

func (*OrgUserPreference) String

func (oup *OrgUserPreference) String() string

String implements the fmt.Stringer.

func (*OrgUserPreference) ToEdge

ToEdge converts OrgUserPreference into OrgUserPreferenceEdge.

func (*OrgUserPreference) Unwrap

func (oup *OrgUserPreference) Unwrap() *OrgUserPreference

Unwrap unwraps the OrgUserPreference entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*OrgUserPreference) Update

Update returns a builder for updating this OrgUserPreference. Note that you need to call OrgUserPreference.Unwrap() before calling this method if this OrgUserPreference was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgUserPreference) User

func (oup *OrgUserPreference) User(ctx context.Context) (*User, error)

func (*OrgUserPreference) Value

func (oup *OrgUserPreference) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgUserPreference. This includes values selected through modifiers, order, etc.

type OrgUserPreferenceClient

type OrgUserPreferenceClient struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceClient is a client for the OrgUserPreference schema.

func NewOrgUserPreferenceClient

func NewOrgUserPreferenceClient(c config) *OrgUserPreferenceClient

NewOrgUserPreferenceClient returns a client for the OrgUserPreference from the given config.

func (*OrgUserPreferenceClient) Create

Create returns a builder for creating a OrgUserPreference entity.

func (*OrgUserPreferenceClient) CreateBulk

CreateBulk returns a builder for creating a bulk of OrgUserPreference entities.

func (*OrgUserPreferenceClient) Delete

Delete returns a delete builder for OrgUserPreference.

func (*OrgUserPreferenceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgUserPreferenceClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgUserPreferenceClient) Get

Get returns a OrgUserPreference entity by its id.

func (*OrgUserPreferenceClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OrgUserPreferenceClient) Hooks

func (c *OrgUserPreferenceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgUserPreferenceClient) Intercept

func (c *OrgUserPreferenceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orguserpreference.Intercept(f(g(h())))`.

func (*OrgUserPreferenceClient) Interceptors

func (c *OrgUserPreferenceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgUserPreferenceClient) MapCreateBulk

func (c *OrgUserPreferenceClient) MapCreateBulk(slice any, setFunc func(*OrgUserPreferenceCreate, int)) *OrgUserPreferenceCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgUserPreferenceClient) Query

Query returns a query builder for OrgUserPreference.

func (*OrgUserPreferenceClient) QueryOrg

QueryOrg queries the org edge of a OrgUserPreference.

func (*OrgUserPreferenceClient) QueryUser

QueryUser queries the user edge of a OrgUserPreference.

func (*OrgUserPreferenceClient) Update

Update returns an update builder for OrgUserPreference.

func (*OrgUserPreferenceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgUserPreferenceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OrgUserPreferenceClient) Use

func (c *OrgUserPreferenceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orguserpreference.Hooks(f(g(h())))`.

type OrgUserPreferenceConnection

type OrgUserPreferenceConnection struct {
	Edges      []*OrgUserPreferenceEdge `json:"edges"`
	PageInfo   PageInfo                 `json:"pageInfo"`
	TotalCount int                      `json:"totalCount"`
}

OrgUserPreferenceConnection is the connection containing edges to OrgUserPreference.

type OrgUserPreferenceCreate

type OrgUserPreferenceCreate struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceCreate is the builder for creating a OrgUserPreference entity.

func (*OrgUserPreferenceCreate) Exec

func (oupc *OrgUserPreferenceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserPreferenceCreate) ExecX

func (oupc *OrgUserPreferenceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceCreate) Mutation

Mutation returns the OrgUserPreferenceMutation object of the builder.

func (*OrgUserPreferenceCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgUserPreference.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUserPreferenceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgUserPreferenceCreate) OnConflictColumns

func (oupc *OrgUserPreferenceCreate) OnConflictColumns(columns ...string) *OrgUserPreferenceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgUserPreference.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgUserPreferenceCreate) Save

Save creates the OrgUserPreference in the database.

func (*OrgUserPreferenceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OrgUserPreferenceCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*OrgUserPreferenceCreate) SetCreatedBy

func (oupc *OrgUserPreferenceCreate) SetCreatedBy(i int) *OrgUserPreferenceCreate

SetCreatedBy sets the "created_by" field.

func (*OrgUserPreferenceCreate) SetID

SetID sets the "id" field.

func (*OrgUserPreferenceCreate) SetInput

SetInput applies the change-set in the CreateOrgUserPreferenceInput on the OrgUserPreferenceCreate builder.

func (*OrgUserPreferenceCreate) SetMenuFavorite

func (oupc *OrgUserPreferenceCreate) SetMenuFavorite(i []int) *OrgUserPreferenceCreate

SetMenuFavorite sets the "menu_favorite" field.

func (*OrgUserPreferenceCreate) SetMenuRecent

func (oupc *OrgUserPreferenceCreate) SetMenuRecent(i []int) *OrgUserPreferenceCreate

SetMenuRecent sets the "menu_recent" field.

func (*OrgUserPreferenceCreate) SetNillableCreatedAt

func (oupc *OrgUserPreferenceCreate) SetNillableCreatedAt(t *time.Time) *OrgUserPreferenceCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*OrgUserPreferenceCreate) SetNillableUpdatedAt

func (oupc *OrgUserPreferenceCreate) SetNillableUpdatedAt(t *time.Time) *OrgUserPreferenceCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUserPreferenceCreate) SetNillableUpdatedBy

func (oupc *OrgUserPreferenceCreate) SetNillableUpdatedBy(i *int) *OrgUserPreferenceCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUserPreferenceCreate) SetOrg

SetOrg sets the "org" edge to the Org entity.

func (*OrgUserPreferenceCreate) SetOrgID

SetOrgID sets the "org_id" field.

func (*OrgUserPreferenceCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserPreferenceCreate) SetUpdatedBy

func (oupc *OrgUserPreferenceCreate) SetUpdatedBy(i int) *OrgUserPreferenceCreate

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserPreferenceCreate) SetUser

SetUser sets the "user" edge to the User entity.

func (*OrgUserPreferenceCreate) SetUserID

SetUserID sets the "user_id" field.

type OrgUserPreferenceCreateBulk

type OrgUserPreferenceCreateBulk struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceCreateBulk is the builder for creating many OrgUserPreference entities in bulk.

func (*OrgUserPreferenceCreateBulk) Exec

Exec executes the query.

func (*OrgUserPreferenceCreateBulk) ExecX

func (oupcb *OrgUserPreferenceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgUserPreference.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgUserPreferenceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*OrgUserPreferenceCreateBulk) OnConflictColumns

func (oupcb *OrgUserPreferenceCreateBulk) OnConflictColumns(columns ...string) *OrgUserPreferenceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgUserPreference.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgUserPreferenceCreateBulk) Save

Save creates the OrgUserPreference entities in the database.

func (*OrgUserPreferenceCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OrgUserPreferenceDelete

type OrgUserPreferenceDelete struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceDelete is the builder for deleting a OrgUserPreference entity.

func (*OrgUserPreferenceDelete) Exec

func (oupd *OrgUserPreferenceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgUserPreferenceDelete) ExecX

func (oupd *OrgUserPreferenceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceDelete) Where

Where appends a list predicates to the OrgUserPreferenceDelete builder.

type OrgUserPreferenceDeleteOne

type OrgUserPreferenceDeleteOne struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceDeleteOne is the builder for deleting a single OrgUserPreference entity.

func (*OrgUserPreferenceDeleteOne) Exec

Exec executes the deletion query.

func (*OrgUserPreferenceDeleteOne) ExecX

func (oupdo *OrgUserPreferenceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceDeleteOne) Where

Where appends a list predicates to the OrgUserPreferenceDelete builder.

type OrgUserPreferenceEdge

type OrgUserPreferenceEdge struct {
	Node   *OrgUserPreference `json:"node"`
	Cursor Cursor             `json:"cursor"`
}

OrgUserPreferenceEdge is the edge representation of OrgUserPreference.

type OrgUserPreferenceEdges

type OrgUserPreferenceEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// contains filtered or unexported fields
}

OrgUserPreferenceEdges holds the relations/edges for other nodes in the graph.

func (OrgUserPreferenceEdges) OrgOrErr

func (e OrgUserPreferenceEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (OrgUserPreferenceEdges) UserOrErr

func (e OrgUserPreferenceEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OrgUserPreferenceGroupBy

type OrgUserPreferenceGroupBy struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceGroupBy is the group-by builder for OrgUserPreference entities.

func (*OrgUserPreferenceGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgUserPreferenceGroupBy) Bool

func (s *OrgUserPreferenceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) BoolX

func (s *OrgUserPreferenceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) Bools

func (s *OrgUserPreferenceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) BoolsX

func (s *OrgUserPreferenceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) Float64

func (s *OrgUserPreferenceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) Float64X

func (s *OrgUserPreferenceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) Float64s

func (s *OrgUserPreferenceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) Float64sX

func (s *OrgUserPreferenceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) Int

func (s *OrgUserPreferenceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) IntX

func (s *OrgUserPreferenceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) Ints

func (s *OrgUserPreferenceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) IntsX

func (s *OrgUserPreferenceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) Scan

func (oupgb *OrgUserPreferenceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgUserPreferenceGroupBy) ScanX

func (s *OrgUserPreferenceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) String

func (s *OrgUserPreferenceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) StringX

func (s *OrgUserPreferenceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgUserPreferenceGroupBy) Strings

func (s *OrgUserPreferenceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceGroupBy) StringsX

func (s *OrgUserPreferenceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgUserPreferenceMutation

type OrgUserPreferenceMutation struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceMutation represents an operation that mutates the OrgUserPreference nodes in the graph.

func (*OrgUserPreferenceMutation) AddCreatedBy

func (m *OrgUserPreferenceMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*OrgUserPreferenceMutation) AddField

func (m *OrgUserPreferenceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgUserPreferenceMutation) AddUpdatedBy

func (m *OrgUserPreferenceMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUserPreferenceMutation) AddedCreatedBy

func (m *OrgUserPreferenceMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*OrgUserPreferenceMutation) AddedEdges

func (m *OrgUserPreferenceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgUserPreferenceMutation) AddedField

func (m *OrgUserPreferenceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgUserPreferenceMutation) AddedFields

func (m *OrgUserPreferenceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgUserPreferenceMutation) AddedIDs

func (m *OrgUserPreferenceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgUserPreferenceMutation) AddedUpdatedBy

func (m *OrgUserPreferenceMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*OrgUserPreferenceMutation) AppendMenuFavorite

func (m *OrgUserPreferenceMutation) AppendMenuFavorite(i []int)

AppendMenuFavorite adds i to the "menu_favorite" field.

func (*OrgUserPreferenceMutation) AppendMenuRecent

func (m *OrgUserPreferenceMutation) AppendMenuRecent(i []int)

AppendMenuRecent adds i to the "menu_recent" field.

func (*OrgUserPreferenceMutation) AppendedMenuFavorite

func (m *OrgUserPreferenceMutation) AppendedMenuFavorite() ([]int, bool)

AppendedMenuFavorite returns the list of values that were appended to the "menu_favorite" field in this mutation.

func (*OrgUserPreferenceMutation) AppendedMenuRecent

func (m *OrgUserPreferenceMutation) AppendedMenuRecent() ([]int, bool)

AppendedMenuRecent returns the list of values that were appended to the "menu_recent" field in this mutation.

func (*OrgUserPreferenceMutation) ClearEdge

func (m *OrgUserPreferenceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*OrgUserPreferenceMutation) ClearField

func (m *OrgUserPreferenceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgUserPreferenceMutation) ClearMenuFavorite

func (m *OrgUserPreferenceMutation) ClearMenuFavorite()

ClearMenuFavorite clears the value of the "menu_favorite" field.

func (*OrgUserPreferenceMutation) ClearMenuRecent

func (m *OrgUserPreferenceMutation) ClearMenuRecent()

ClearMenuRecent clears the value of the "menu_recent" field.

func (*OrgUserPreferenceMutation) ClearOrg

func (m *OrgUserPreferenceMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*OrgUserPreferenceMutation) ClearUpdatedAt

func (m *OrgUserPreferenceMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserPreferenceMutation) ClearUpdatedBy

func (m *OrgUserPreferenceMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserPreferenceMutation) ClearUser

func (m *OrgUserPreferenceMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*OrgUserPreferenceMutation) ClearedEdges

func (m *OrgUserPreferenceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgUserPreferenceMutation) ClearedFields

func (m *OrgUserPreferenceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgUserPreferenceMutation) Client

func (m OrgUserPreferenceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*OrgUserPreferenceMutation) CreatedAt

func (m *OrgUserPreferenceMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*OrgUserPreferenceMutation) CreatedBy

func (m *OrgUserPreferenceMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*OrgUserPreferenceMutation) EdgeCleared

func (m *OrgUserPreferenceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgUserPreferenceMutation) Field

func (m *OrgUserPreferenceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*OrgUserPreferenceMutation) FieldCleared

func (m *OrgUserPreferenceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgUserPreferenceMutation) Fields

func (m *OrgUserPreferenceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*OrgUserPreferenceMutation) ID

func (m *OrgUserPreferenceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgUserPreferenceMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgUserPreferenceMutation) MenuFavorite

func (m *OrgUserPreferenceMutation) MenuFavorite() (r []int, exists bool)

MenuFavorite returns the value of the "menu_favorite" field in the mutation.

func (*OrgUserPreferenceMutation) MenuFavoriteCleared

func (m *OrgUserPreferenceMutation) MenuFavoriteCleared() bool

MenuFavoriteCleared returns if the "menu_favorite" field was cleared in this mutation.

func (*OrgUserPreferenceMutation) MenuRecent

func (m *OrgUserPreferenceMutation) MenuRecent() (r []int, exists bool)

MenuRecent returns the value of the "menu_recent" field in the mutation.

func (*OrgUserPreferenceMutation) MenuRecentCleared

func (m *OrgUserPreferenceMutation) MenuRecentCleared() bool

MenuRecentCleared returns if the "menu_recent" field was cleared in this mutation.

func (*OrgUserPreferenceMutation) OldCreatedAt

func (m *OrgUserPreferenceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) OldCreatedBy

func (m *OrgUserPreferenceMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) OldField

func (m *OrgUserPreferenceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*OrgUserPreferenceMutation) OldMenuFavorite

func (m *OrgUserPreferenceMutation) OldMenuFavorite(ctx context.Context) (v []int, err error)

OldMenuFavorite returns the old "menu_favorite" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) OldMenuRecent

func (m *OrgUserPreferenceMutation) OldMenuRecent(ctx context.Context) (v []int, err error)

OldMenuRecent returns the old "menu_recent" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) OldOrgID

func (m *OrgUserPreferenceMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) OldUpdatedAt

func (m *OrgUserPreferenceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) OldUpdatedBy

func (m *OrgUserPreferenceMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) OldUserID

func (m *OrgUserPreferenceMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the OrgUserPreference entity. If the OrgUserPreference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgUserPreferenceMutation) Op

func (m *OrgUserPreferenceMutation) Op() Op

Op returns the operation name.

func (*OrgUserPreferenceMutation) OrgCleared

func (m *OrgUserPreferenceMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*OrgUserPreferenceMutation) OrgID

func (m *OrgUserPreferenceMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgUserPreferenceMutation) OrgIDs

func (m *OrgUserPreferenceMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*OrgUserPreferenceMutation) RemovedEdges

func (m *OrgUserPreferenceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgUserPreferenceMutation) RemovedIDs

func (m *OrgUserPreferenceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*OrgUserPreferenceMutation) ResetCreatedAt

func (m *OrgUserPreferenceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*OrgUserPreferenceMutation) ResetCreatedBy

func (m *OrgUserPreferenceMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*OrgUserPreferenceMutation) ResetEdge

func (m *OrgUserPreferenceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*OrgUserPreferenceMutation) ResetField

func (m *OrgUserPreferenceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*OrgUserPreferenceMutation) ResetMenuFavorite

func (m *OrgUserPreferenceMutation) ResetMenuFavorite()

ResetMenuFavorite resets all changes to the "menu_favorite" field.

func (*OrgUserPreferenceMutation) ResetMenuRecent

func (m *OrgUserPreferenceMutation) ResetMenuRecent()

ResetMenuRecent resets all changes to the "menu_recent" field.

func (*OrgUserPreferenceMutation) ResetOrg

func (m *OrgUserPreferenceMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*OrgUserPreferenceMutation) ResetOrgID

func (m *OrgUserPreferenceMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgUserPreferenceMutation) ResetUpdatedAt

func (m *OrgUserPreferenceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*OrgUserPreferenceMutation) ResetUpdatedBy

func (m *OrgUserPreferenceMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*OrgUserPreferenceMutation) ResetUser

func (m *OrgUserPreferenceMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*OrgUserPreferenceMutation) ResetUserID

func (m *OrgUserPreferenceMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OrgUserPreferenceMutation) SetCreatedAt

func (m *OrgUserPreferenceMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*OrgUserPreferenceMutation) SetCreatedBy

func (m *OrgUserPreferenceMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*OrgUserPreferenceMutation) SetField

func (m *OrgUserPreferenceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*OrgUserPreferenceMutation) SetID

func (m *OrgUserPreferenceMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgUserPreference entities.

func (*OrgUserPreferenceMutation) SetMenuFavorite

func (m *OrgUserPreferenceMutation) SetMenuFavorite(i []int)

SetMenuFavorite sets the "menu_favorite" field.

func (*OrgUserPreferenceMutation) SetMenuRecent

func (m *OrgUserPreferenceMutation) SetMenuRecent(i []int)

SetMenuRecent sets the "menu_recent" field.

func (*OrgUserPreferenceMutation) SetOp

func (m *OrgUserPreferenceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgUserPreferenceMutation) SetOrgID

func (m *OrgUserPreferenceMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgUserPreferenceMutation) SetUpdatedAt

func (m *OrgUserPreferenceMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserPreferenceMutation) SetUpdatedBy

func (m *OrgUserPreferenceMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserPreferenceMutation) SetUserID

func (m *OrgUserPreferenceMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (OrgUserPreferenceMutation) Tx

func (m OrgUserPreferenceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgUserPreferenceMutation) Type

Type returns the node type of this mutation (OrgUserPreference).

func (*OrgUserPreferenceMutation) UpdatedAt

func (m *OrgUserPreferenceMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*OrgUserPreferenceMutation) UpdatedAtCleared

func (m *OrgUserPreferenceMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*OrgUserPreferenceMutation) UpdatedBy

func (m *OrgUserPreferenceMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*OrgUserPreferenceMutation) UpdatedByCleared

func (m *OrgUserPreferenceMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*OrgUserPreferenceMutation) UserCleared

func (m *OrgUserPreferenceMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*OrgUserPreferenceMutation) UserID

func (m *OrgUserPreferenceMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OrgUserPreferenceMutation) UserIDs

func (m *OrgUserPreferenceMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*OrgUserPreferenceMutation) Where

Where appends a list predicates to the OrgUserPreferenceMutation builder.

func (*OrgUserPreferenceMutation) WhereP

func (m *OrgUserPreferenceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgUserPreferenceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgUserPreferenceOrder

type OrgUserPreferenceOrder struct {
	Direction OrderDirection               `json:"direction"`
	Field     *OrgUserPreferenceOrderField `json:"field"`
}

OrgUserPreferenceOrder defines the ordering of OrgUserPreference.

type OrgUserPreferenceOrderField

type OrgUserPreferenceOrderField struct {
	// Value extracts the ordering value from the given OrgUserPreference.
	Value func(*OrgUserPreference) (ent.Value, error)
	// contains filtered or unexported fields
}

OrgUserPreferenceOrderField defines the ordering field of OrgUserPreference.

func (OrgUserPreferenceOrderField) MarshalGQL

func (f OrgUserPreferenceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (OrgUserPreferenceOrderField) String

String implement fmt.Stringer interface.

func (*OrgUserPreferenceOrderField) UnmarshalGQL

func (f *OrgUserPreferenceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrgUserPreferencePaginateOption

type OrgUserPreferencePaginateOption func(*orguserpreferencePager) error

OrgUserPreferencePaginateOption enables pagination customization.

func WithOrgUserPreferenceFilter

func WithOrgUserPreferenceFilter(filter func(*OrgUserPreferenceQuery) (*OrgUserPreferenceQuery, error)) OrgUserPreferencePaginateOption

WithOrgUserPreferenceFilter configures pagination filter.

func WithOrgUserPreferenceOrder

func WithOrgUserPreferenceOrder(order *OrgUserPreferenceOrder) OrgUserPreferencePaginateOption

WithOrgUserPreferenceOrder configures pagination ordering.

type OrgUserPreferenceQuery

type OrgUserPreferenceQuery struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceQuery is the builder for querying OrgUserPreference entities.

func (*OrgUserPreferenceQuery) Aggregate

Aggregate returns a OrgUserPreferenceSelect configured with the given aggregations.

func (*OrgUserPreferenceQuery) All

All executes the query and returns a list of OrgUserPreferences.

func (*OrgUserPreferenceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*OrgUserPreferenceQuery) Clone

Clone returns a duplicate of the OrgUserPreferenceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgUserPreferenceQuery) CollectFields

func (oup *OrgUserPreferenceQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrgUserPreferenceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*OrgUserPreferenceQuery) Count

func (oupq *OrgUserPreferenceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgUserPreferenceQuery) CountX

func (oupq *OrgUserPreferenceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgUserPreferenceQuery) Exist

func (oupq *OrgUserPreferenceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgUserPreferenceQuery) ExistX

func (oupq *OrgUserPreferenceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgUserPreferenceQuery) First

First returns the first OrgUserPreference entity from the query. Returns a *NotFoundError when no OrgUserPreference was found.

func (*OrgUserPreferenceQuery) FirstID

func (oupq *OrgUserPreferenceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgUserPreference ID from the query. Returns a *NotFoundError when no OrgUserPreference ID was found.

func (*OrgUserPreferenceQuery) FirstIDX

func (oupq *OrgUserPreferenceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgUserPreferenceQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*OrgUserPreferenceQuery) GroupBy

func (oupq *OrgUserPreferenceQuery) GroupBy(field string, fields ...string) *OrgUserPreferenceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgUserPreference.Query().
	GroupBy(orguserpreference.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgUserPreferenceQuery) IDs

func (oupq *OrgUserPreferenceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgUserPreference IDs.

func (*OrgUserPreferenceQuery) IDsX

func (oupq *OrgUserPreferenceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgUserPreferenceQuery) Limit

Limit the number of records to be returned by this query.

func (*OrgUserPreferenceQuery) Offset

func (oupq *OrgUserPreferenceQuery) Offset(offset int) *OrgUserPreferenceQuery

Offset to start from.

func (*OrgUserPreferenceQuery) Only

Only returns a single OrgUserPreference entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgUserPreference entity is found. Returns a *NotFoundError when no OrgUserPreference entities are found.

func (*OrgUserPreferenceQuery) OnlyID

func (oupq *OrgUserPreferenceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgUserPreference ID in the query. Returns a *NotSingularError when more than one OrgUserPreference ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgUserPreferenceQuery) OnlyIDX

func (oupq *OrgUserPreferenceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgUserPreferenceQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OrgUserPreferenceQuery) Order

Order specifies how the records should be ordered.

func (*OrgUserPreferenceQuery) Paginate

func (oup *OrgUserPreferenceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...OrgUserPreferencePaginateOption,
) (*OrgUserPreferenceConnection, error)

Paginate executes the query and returns a relay based cursor connection to OrgUserPreference.

func (*OrgUserPreferenceQuery) QueryOrg

func (oupq *OrgUserPreferenceQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*OrgUserPreferenceQuery) QueryUser

func (oupq *OrgUserPreferenceQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OrgUserPreferenceQuery) Select

func (oupq *OrgUserPreferenceQuery) Select(fields ...string) *OrgUserPreferenceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.OrgUserPreference.Query().
	Select(orguserpreference.FieldCreatedBy).
	Scan(ctx, &v)

func (*OrgUserPreferenceQuery) Unique

func (oupq *OrgUserPreferenceQuery) Unique(unique bool) *OrgUserPreferenceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgUserPreferenceQuery) Where

Where adds a new predicate for the OrgUserPreferenceQuery builder.

func (*OrgUserPreferenceQuery) WithOrg

func (oupq *OrgUserPreferenceQuery) WithOrg(opts ...func(*OrgQuery)) *OrgUserPreferenceQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserPreferenceQuery) WithUser

func (oupq *OrgUserPreferenceQuery) WithUser(opts ...func(*UserQuery)) *OrgUserPreferenceQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OrgUserPreferenceSelect

type OrgUserPreferenceSelect struct {
	*OrgUserPreferenceQuery
	// contains filtered or unexported fields
}

OrgUserPreferenceSelect is the builder for selecting fields of OrgUserPreference entities.

func (*OrgUserPreferenceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*OrgUserPreferenceSelect) Bool

func (s *OrgUserPreferenceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) BoolX

func (s *OrgUserPreferenceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgUserPreferenceSelect) Bools

func (s *OrgUserPreferenceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) BoolsX

func (s *OrgUserPreferenceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgUserPreferenceSelect) Float64

func (s *OrgUserPreferenceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) Float64X

func (s *OrgUserPreferenceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgUserPreferenceSelect) Float64s

func (s *OrgUserPreferenceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) Float64sX

func (s *OrgUserPreferenceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgUserPreferenceSelect) Int

func (s *OrgUserPreferenceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) IntX

func (s *OrgUserPreferenceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgUserPreferenceSelect) Ints

func (s *OrgUserPreferenceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) IntsX

func (s *OrgUserPreferenceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgUserPreferenceSelect) Scan

func (oups *OrgUserPreferenceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgUserPreferenceSelect) ScanX

func (s *OrgUserPreferenceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgUserPreferenceSelect) String

func (s *OrgUserPreferenceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) StringX

func (s *OrgUserPreferenceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgUserPreferenceSelect) Strings

func (s *OrgUserPreferenceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgUserPreferenceSelect) StringsX

func (s *OrgUserPreferenceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgUserPreferenceUpdate

type OrgUserPreferenceUpdate struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceUpdate is the builder for updating OrgUserPreference entities.

func (*OrgUserPreferenceUpdate) AddUpdatedBy

func (oupu *OrgUserPreferenceUpdate) AddUpdatedBy(i int) *OrgUserPreferenceUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUserPreferenceUpdate) AppendMenuFavorite

func (oupu *OrgUserPreferenceUpdate) AppendMenuFavorite(i []int) *OrgUserPreferenceUpdate

AppendMenuFavorite appends i to the "menu_favorite" field.

func (*OrgUserPreferenceUpdate) AppendMenuRecent

func (oupu *OrgUserPreferenceUpdate) AppendMenuRecent(i []int) *OrgUserPreferenceUpdate

AppendMenuRecent appends i to the "menu_recent" field.

func (*OrgUserPreferenceUpdate) ClearMenuFavorite

func (oupu *OrgUserPreferenceUpdate) ClearMenuFavorite() *OrgUserPreferenceUpdate

ClearMenuFavorite clears the value of the "menu_favorite" field.

func (*OrgUserPreferenceUpdate) ClearMenuRecent

func (oupu *OrgUserPreferenceUpdate) ClearMenuRecent() *OrgUserPreferenceUpdate

ClearMenuRecent clears the value of the "menu_recent" field.

func (*OrgUserPreferenceUpdate) ClearUpdatedAt

func (oupu *OrgUserPreferenceUpdate) ClearUpdatedAt() *OrgUserPreferenceUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserPreferenceUpdate) ClearUpdatedBy

func (oupu *OrgUserPreferenceUpdate) ClearUpdatedBy() *OrgUserPreferenceUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserPreferenceUpdate) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*OrgUserPreferenceUpdate) Exec

func (oupu *OrgUserPreferenceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserPreferenceUpdate) ExecX

func (oupu *OrgUserPreferenceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceUpdate) Mutation

Mutation returns the OrgUserPreferenceMutation object of the builder.

func (*OrgUserPreferenceUpdate) Save

func (oupu *OrgUserPreferenceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgUserPreferenceUpdate) SaveX

func (oupu *OrgUserPreferenceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgUserPreferenceUpdate) SetInput

SetInput applies the change-set in the UpdateOrgUserPreferenceInput on the OrgUserPreferenceUpdate builder.

func (*OrgUserPreferenceUpdate) SetMenuFavorite

func (oupu *OrgUserPreferenceUpdate) SetMenuFavorite(i []int) *OrgUserPreferenceUpdate

SetMenuFavorite sets the "menu_favorite" field.

func (*OrgUserPreferenceUpdate) SetMenuRecent

func (oupu *OrgUserPreferenceUpdate) SetMenuRecent(i []int) *OrgUserPreferenceUpdate

SetMenuRecent sets the "menu_recent" field.

func (*OrgUserPreferenceUpdate) SetNillableUpdatedAt

func (oupu *OrgUserPreferenceUpdate) SetNillableUpdatedAt(t *time.Time) *OrgUserPreferenceUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUserPreferenceUpdate) SetNillableUpdatedBy

func (oupu *OrgUserPreferenceUpdate) SetNillableUpdatedBy(i *int) *OrgUserPreferenceUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUserPreferenceUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserPreferenceUpdate) SetUpdatedBy

func (oupu *OrgUserPreferenceUpdate) SetUpdatedBy(i int) *OrgUserPreferenceUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserPreferenceUpdate) SetUser

SetUser sets the "user" edge to the User entity.

func (*OrgUserPreferenceUpdate) SetUserID

SetUserID sets the "user_id" field.

func (*OrgUserPreferenceUpdate) Where

Where appends a list predicates to the OrgUserPreferenceUpdate builder.

type OrgUserPreferenceUpdateOne

type OrgUserPreferenceUpdateOne struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceUpdateOne is the builder for updating a single OrgUserPreference entity.

func (*OrgUserPreferenceUpdateOne) AddUpdatedBy

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUserPreferenceUpdateOne) AppendMenuFavorite

func (oupuo *OrgUserPreferenceUpdateOne) AppendMenuFavorite(i []int) *OrgUserPreferenceUpdateOne

AppendMenuFavorite appends i to the "menu_favorite" field.

func (*OrgUserPreferenceUpdateOne) AppendMenuRecent

func (oupuo *OrgUserPreferenceUpdateOne) AppendMenuRecent(i []int) *OrgUserPreferenceUpdateOne

AppendMenuRecent appends i to the "menu_recent" field.

func (*OrgUserPreferenceUpdateOne) ClearMenuFavorite

func (oupuo *OrgUserPreferenceUpdateOne) ClearMenuFavorite() *OrgUserPreferenceUpdateOne

ClearMenuFavorite clears the value of the "menu_favorite" field.

func (*OrgUserPreferenceUpdateOne) ClearMenuRecent

func (oupuo *OrgUserPreferenceUpdateOne) ClearMenuRecent() *OrgUserPreferenceUpdateOne

ClearMenuRecent clears the value of the "menu_recent" field.

func (*OrgUserPreferenceUpdateOne) ClearUpdatedAt

func (oupuo *OrgUserPreferenceUpdateOne) ClearUpdatedAt() *OrgUserPreferenceUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserPreferenceUpdateOne) ClearUpdatedBy

func (oupuo *OrgUserPreferenceUpdateOne) ClearUpdatedBy() *OrgUserPreferenceUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserPreferenceUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*OrgUserPreferenceUpdateOne) Exec

Exec executes the query on the entity.

func (*OrgUserPreferenceUpdateOne) ExecX

func (oupuo *OrgUserPreferenceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceUpdateOne) Mutation

Mutation returns the OrgUserPreferenceMutation object of the builder.

func (*OrgUserPreferenceUpdateOne) Save

Save executes the query and returns the updated OrgUserPreference entity.

func (*OrgUserPreferenceUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OrgUserPreferenceUpdateOne) Select

func (oupuo *OrgUserPreferenceUpdateOne) Select(field string, fields ...string) *OrgUserPreferenceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgUserPreferenceUpdateOne) SetInput

SetInput applies the change-set in the UpdateOrgUserPreferenceInput on the OrgUserPreferenceUpdateOne builder.

func (*OrgUserPreferenceUpdateOne) SetMenuFavorite

func (oupuo *OrgUserPreferenceUpdateOne) SetMenuFavorite(i []int) *OrgUserPreferenceUpdateOne

SetMenuFavorite sets the "menu_favorite" field.

func (*OrgUserPreferenceUpdateOne) SetMenuRecent

func (oupuo *OrgUserPreferenceUpdateOne) SetMenuRecent(i []int) *OrgUserPreferenceUpdateOne

SetMenuRecent sets the "menu_recent" field.

func (*OrgUserPreferenceUpdateOne) SetNillableUpdatedAt

func (oupuo *OrgUserPreferenceUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrgUserPreferenceUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUserPreferenceUpdateOne) SetNillableUpdatedBy

func (oupuo *OrgUserPreferenceUpdateOne) SetNillableUpdatedBy(i *int) *OrgUserPreferenceUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUserPreferenceUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserPreferenceUpdateOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserPreferenceUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*OrgUserPreferenceUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*OrgUserPreferenceUpdateOne) Where

Where appends a list predicates to the OrgUserPreferenceUpdate builder.

type OrgUserPreferenceUpsert

type OrgUserPreferenceUpsert struct {
	*sql.UpdateSet
}

OrgUserPreferenceUpsert is the "OnConflict" setter.

func (*OrgUserPreferenceUpsert) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUserPreferenceUpsert) ClearMenuFavorite

func (u *OrgUserPreferenceUpsert) ClearMenuFavorite() *OrgUserPreferenceUpsert

ClearMenuFavorite clears the value of the "menu_favorite" field.

func (*OrgUserPreferenceUpsert) ClearMenuRecent

func (u *OrgUserPreferenceUpsert) ClearMenuRecent() *OrgUserPreferenceUpsert

ClearMenuRecent clears the value of the "menu_recent" field.

func (*OrgUserPreferenceUpsert) ClearUpdatedAt

func (u *OrgUserPreferenceUpsert) ClearUpdatedAt() *OrgUserPreferenceUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserPreferenceUpsert) ClearUpdatedBy

func (u *OrgUserPreferenceUpsert) ClearUpdatedBy() *OrgUserPreferenceUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserPreferenceUpsert) SetMenuFavorite

func (u *OrgUserPreferenceUpsert) SetMenuFavorite(v []int) *OrgUserPreferenceUpsert

SetMenuFavorite sets the "menu_favorite" field.

func (*OrgUserPreferenceUpsert) SetMenuRecent

func (u *OrgUserPreferenceUpsert) SetMenuRecent(v []int) *OrgUserPreferenceUpsert

SetMenuRecent sets the "menu_recent" field.

func (*OrgUserPreferenceUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserPreferenceUpsert) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserPreferenceUpsert) SetUserID

SetUserID sets the "user_id" field.

func (*OrgUserPreferenceUpsert) UpdateMenuFavorite

func (u *OrgUserPreferenceUpsert) UpdateMenuFavorite() *OrgUserPreferenceUpsert

UpdateMenuFavorite sets the "menu_favorite" field to the value that was provided on create.

func (*OrgUserPreferenceUpsert) UpdateMenuRecent

func (u *OrgUserPreferenceUpsert) UpdateMenuRecent() *OrgUserPreferenceUpsert

UpdateMenuRecent sets the "menu_recent" field to the value that was provided on create.

func (*OrgUserPreferenceUpsert) UpdateUpdatedAt

func (u *OrgUserPreferenceUpsert) UpdateUpdatedAt() *OrgUserPreferenceUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUserPreferenceUpsert) UpdateUpdatedBy

func (u *OrgUserPreferenceUpsert) UpdateUpdatedBy() *OrgUserPreferenceUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgUserPreferenceUpsert) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserPreferenceUpsertBulk

type OrgUserPreferenceUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceUpsertBulk is the builder for "upsert"-ing a bulk of OrgUserPreference nodes.

func (*OrgUserPreferenceUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUserPreferenceUpsertBulk) ClearMenuFavorite

ClearMenuFavorite clears the value of the "menu_favorite" field.

func (*OrgUserPreferenceUpsertBulk) ClearMenuRecent

ClearMenuRecent clears the value of the "menu_recent" field.

func (*OrgUserPreferenceUpsertBulk) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserPreferenceUpsertBulk) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserPreferenceUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUserPreferenceUpsertBulk) Exec

Exec executes the query.

func (*OrgUserPreferenceUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgUserPreference.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgUserPreferenceUpsertBulk) SetMenuFavorite

SetMenuFavorite sets the "menu_favorite" field.

func (*OrgUserPreferenceUpsertBulk) SetMenuRecent

SetMenuRecent sets the "menu_recent" field.

func (*OrgUserPreferenceUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserPreferenceUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserPreferenceUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OrgUserPreferenceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OrgUserPreferenceCreateBulk.OnConflict documentation for more info.

func (*OrgUserPreferenceUpsertBulk) UpdateMenuFavorite

UpdateMenuFavorite sets the "menu_favorite" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertBulk) UpdateMenuRecent

UpdateMenuRecent sets the "menu_recent" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgUserPreference.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orguserpreference.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUserPreferenceUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertBulk) UpdateUpdatedBy

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserPreferenceUpsertOne

type OrgUserPreferenceUpsertOne struct {
	// contains filtered or unexported fields
}

OrgUserPreferenceUpsertOne is the builder for "upsert"-ing

one OrgUserPreference node.

func (*OrgUserPreferenceUpsertOne) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUserPreferenceUpsertOne) ClearMenuFavorite

ClearMenuFavorite clears the value of the "menu_favorite" field.

func (*OrgUserPreferenceUpsertOne) ClearMenuRecent

ClearMenuRecent clears the value of the "menu_recent" field.

func (*OrgUserPreferenceUpsertOne) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserPreferenceUpsertOne) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserPreferenceUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUserPreferenceUpsertOne) Exec

Exec executes the query.

func (*OrgUserPreferenceUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceUpsertOne) ID

func (u *OrgUserPreferenceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgUserPreferenceUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OrgUserPreferenceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgUserPreference.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgUserPreferenceUpsertOne) SetMenuFavorite

SetMenuFavorite sets the "menu_favorite" field.

func (*OrgUserPreferenceUpsertOne) SetMenuRecent

SetMenuRecent sets the "menu_recent" field.

func (*OrgUserPreferenceUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserPreferenceUpsertOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserPreferenceUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OrgUserPreferenceUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OrgUserPreferenceCreate.OnConflict documentation for more info.

func (*OrgUserPreferenceUpsertOne) UpdateMenuFavorite

func (u *OrgUserPreferenceUpsertOne) UpdateMenuFavorite() *OrgUserPreferenceUpsertOne

UpdateMenuFavorite sets the "menu_favorite" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertOne) UpdateMenuRecent

UpdateMenuRecent sets the "menu_recent" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgUserPreference.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orguserpreference.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUserPreferenceUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertOne) UpdateUpdatedBy

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgUserPreferenceUpsertOne) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserPreferenceWhereInput

type OrgUserPreferenceWhereInput struct {
	Predicates []predicate.OrgUserPreference  `json:"-"`
	Not        *OrgUserPreferenceWhereInput   `json:"not,omitempty"`
	Or         []*OrgUserPreferenceWhereInput `json:"or,omitempty"`
	And        []*OrgUserPreferenceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "user_id" field predicates.
	UserID      *int  `json:"userID,omitempty"`
	UserIDNEQ   *int  `json:"userIDNEQ,omitempty"`
	UserIDIn    []int `json:"userIDIn,omitempty"`
	UserIDNotIn []int `json:"userIDNotIn,omitempty"`

	// "org_id" field predicates.
	OrgID      *int  `json:"orgID,omitempty"`
	OrgIDNEQ   *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn    []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn []int `json:"orgIDNotIn,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`
}

OrgUserPreferenceWhereInput represents a where input for filtering OrgUserPreference queries.

func (*OrgUserPreferenceWhereInput) AddPredicates

func (i *OrgUserPreferenceWhereInput) AddPredicates(predicates ...predicate.OrgUserPreference)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgUserPreferenceWhereInput) Filter

Filter applies the OrgUserPreferenceWhereInput filter on the OrgUserPreferenceQuery builder.

func (*OrgUserPreferenceWhereInput) P

P returns a predicate for filtering orguserpreferences. An error is returned if the input is empty or invalid.

type OrgUserPreferences

type OrgUserPreferences []*OrgUserPreference

OrgUserPreferences is a parsable slice of OrgUserPreference.

type OrgUserQuery

type OrgUserQuery struct {
	// contains filtered or unexported fields
}

OrgUserQuery is the builder for querying OrgUser entities.

func (*OrgUserQuery) Aggregate

func (ouq *OrgUserQuery) Aggregate(fns ...AggregateFunc) *OrgUserSelect

Aggregate returns a OrgUserSelect configured with the given aggregations.

func (*OrgUserQuery) All

func (ouq *OrgUserQuery) All(ctx context.Context) ([]*OrgUser, error)

All executes the query and returns a list of OrgUsers.

func (*OrgUserQuery) AllX

func (ouq *OrgUserQuery) AllX(ctx context.Context) []*OrgUser

AllX is like All, but panics if an error occurs.

func (*OrgUserQuery) Clone

func (ouq *OrgUserQuery) Clone() *OrgUserQuery

Clone returns a duplicate of the OrgUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgUserQuery) Count

func (ouq *OrgUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgUserQuery) CountX

func (ouq *OrgUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgUserQuery) Exist

func (ouq *OrgUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgUserQuery) ExistX

func (ouq *OrgUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgUserQuery) First

func (ouq *OrgUserQuery) First(ctx context.Context) (*OrgUser, error)

First returns the first OrgUser entity from the query. Returns a *NotFoundError when no OrgUser was found.

func (*OrgUserQuery) FirstID

func (ouq *OrgUserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgUser ID from the query. Returns a *NotFoundError when no OrgUser ID was found.

func (*OrgUserQuery) FirstIDX

func (ouq *OrgUserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgUserQuery) FirstX

func (ouq *OrgUserQuery) FirstX(ctx context.Context) *OrgUser

FirstX is like First, but panics if an error occurs.

func (*OrgUserQuery) GroupBy

func (ouq *OrgUserQuery) GroupBy(field string, fields ...string) *OrgUserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgUser.Query().
	GroupBy(orguser.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgUserQuery) IDs

func (ouq *OrgUserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgUser IDs.

func (*OrgUserQuery) IDsX

func (ouq *OrgUserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgUserQuery) Limit

func (ouq *OrgUserQuery) Limit(limit int) *OrgUserQuery

Limit the number of records to be returned by this query.

func (*OrgUserQuery) Offset

func (ouq *OrgUserQuery) Offset(offset int) *OrgUserQuery

Offset to start from.

func (*OrgUserQuery) Only

func (ouq *OrgUserQuery) Only(ctx context.Context) (*OrgUser, error)

Only returns a single OrgUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgUser entity is found. Returns a *NotFoundError when no OrgUser entities are found.

func (*OrgUserQuery) OnlyID

func (ouq *OrgUserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgUser ID in the query. Returns a *NotSingularError when more than one OrgUser ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgUserQuery) OnlyIDX

func (ouq *OrgUserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgUserQuery) OnlyX

func (ouq *OrgUserQuery) OnlyX(ctx context.Context) *OrgUser

OnlyX is like Only, but panics if an error occurs.

func (*OrgUserQuery) Order

func (ouq *OrgUserQuery) Order(o ...orguser.OrderOption) *OrgUserQuery

Order specifies how the records should be ordered.

func (*OrgUserQuery) QueryOrg

func (ouq *OrgUserQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*OrgUserQuery) QueryOrgRoleUser

func (ouq *OrgUserQuery) QueryOrgRoleUser() *OrgRoleUserQuery

QueryOrgRoleUser chains the current query on the "org_role_user" edge.

func (*OrgUserQuery) QueryOrgRoles

func (ouq *OrgUserQuery) QueryOrgRoles() *OrgRoleQuery

QueryOrgRoles chains the current query on the "org_roles" edge.

func (*OrgUserQuery) QueryUser

func (ouq *OrgUserQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*OrgUserQuery) Select

func (ouq *OrgUserQuery) Select(fields ...string) *OrgUserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.OrgUser.Query().
	Select(orguser.FieldCreatedBy).
	Scan(ctx, &v)

func (*OrgUserQuery) Unique

func (ouq *OrgUserQuery) Unique(unique bool) *OrgUserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*OrgUserQuery) Where

func (ouq *OrgUserQuery) Where(ps ...predicate.OrgUser) *OrgUserQuery

Where adds a new predicate for the OrgUserQuery builder.

func (*OrgUserQuery) WithNamedOrgRoleUser

func (ouq *OrgUserQuery) WithNamedOrgRoleUser(name string, opts ...func(*OrgRoleUserQuery)) *OrgUserQuery

WithNamedOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithNamedOrgRoles

func (ouq *OrgUserQuery) WithNamedOrgRoles(name string, opts ...func(*OrgRoleQuery)) *OrgUserQuery

WithNamedOrgRoles tells the query-builder to eager-load the nodes that are connected to the "org_roles" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithOrg

func (ouq *OrgUserQuery) WithOrg(opts ...func(*OrgQuery)) *OrgUserQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithOrgRoleUser

func (ouq *OrgUserQuery) WithOrgRoleUser(opts ...func(*OrgRoleUserQuery)) *OrgUserQuery

WithOrgRoleUser tells the query-builder to eager-load the nodes that are connected to the "org_role_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithOrgRoles

func (ouq *OrgUserQuery) WithOrgRoles(opts ...func(*OrgRoleQuery)) *OrgUserQuery

WithOrgRoles tells the query-builder to eager-load the nodes that are connected to the "org_roles" edge. The optional arguments are used to configure the query builder of the edge.

func (*OrgUserQuery) WithUser

func (ouq *OrgUserQuery) WithUser(opts ...func(*UserQuery)) *OrgUserQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type OrgUserSelect

type OrgUserSelect struct {
	*OrgUserQuery
	// contains filtered or unexported fields
}

OrgUserSelect is the builder for selecting fields of OrgUser entities.

func (*OrgUserSelect) Aggregate

func (ous *OrgUserSelect) Aggregate(fns ...AggregateFunc) *OrgUserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgUserSelect) Bool

func (s *OrgUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) BoolX

func (s *OrgUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgUserSelect) Bools

func (s *OrgUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) BoolsX

func (s *OrgUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgUserSelect) Float64

func (s *OrgUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) Float64X

func (s *OrgUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgUserSelect) Float64s

func (s *OrgUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) Float64sX

func (s *OrgUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgUserSelect) Int

func (s *OrgUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) IntX

func (s *OrgUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgUserSelect) Ints

func (s *OrgUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) IntsX

func (s *OrgUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgUserSelect) Scan

func (ous *OrgUserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgUserSelect) ScanX

func (s *OrgUserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgUserSelect) String

func (s *OrgUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) StringX

func (s *OrgUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgUserSelect) Strings

func (s *OrgUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgUserSelect) StringsX

func (s *OrgUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgUserUpdate

type OrgUserUpdate struct {
	// contains filtered or unexported fields
}

OrgUserUpdate is the builder for updating OrgUser entities.

func (*OrgUserUpdate) AddOrgRoleIDs

func (ouu *OrgUserUpdate) AddOrgRoleIDs(ids ...int) *OrgUserUpdate

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserUpdate) AddOrgRoleUser

func (ouu *OrgUserUpdate) AddOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdate

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdate) AddOrgRoleUserIDs

func (ouu *OrgUserUpdate) AddOrgRoleUserIDs(ids ...int) *OrgUserUpdate

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserUpdate) AddOrgRoles

func (ouu *OrgUserUpdate) AddOrgRoles(o ...*OrgRole) *OrgUserUpdate

AddOrgRoles adds the "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdate) AddUpdatedBy

func (ouu *OrgUserUpdate) AddUpdatedBy(i int) *OrgUserUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUserUpdate) ClearOrg

func (ouu *OrgUserUpdate) ClearOrg() *OrgUserUpdate

ClearOrg clears the "org" edge to the Org entity.

func (*OrgUserUpdate) ClearOrgRoleUser

func (ouu *OrgUserUpdate) ClearOrgRoleUser() *OrgUserUpdate

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdate) ClearOrgRoles

func (ouu *OrgUserUpdate) ClearOrgRoles() *OrgUserUpdate

ClearOrgRoles clears all "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdate) ClearUpdatedAt

func (ouu *OrgUserUpdate) ClearUpdatedAt() *OrgUserUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserUpdate) ClearUpdatedBy

func (ouu *OrgUserUpdate) ClearUpdatedBy() *OrgUserUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserUpdate) ClearUser

func (ouu *OrgUserUpdate) ClearUser() *OrgUserUpdate

ClearUser clears the "user" edge to the User entity.

func (*OrgUserUpdate) Exec

func (ouu *OrgUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserUpdate) ExecX

func (ouu *OrgUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpdate) Mutation

func (ouu *OrgUserUpdate) Mutation() *OrgUserMutation

Mutation returns the OrgUserMutation object of the builder.

func (*OrgUserUpdate) RemoveOrgRoleIDs

func (ouu *OrgUserUpdate) RemoveOrgRoleIDs(ids ...int) *OrgUserUpdate

RemoveOrgRoleIDs removes the "org_roles" edge to OrgRole entities by IDs.

func (*OrgUserUpdate) RemoveOrgRoleUser

func (ouu *OrgUserUpdate) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdate

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgUserUpdate) RemoveOrgRoleUserIDs

func (ouu *OrgUserUpdate) RemoveOrgRoleUserIDs(ids ...int) *OrgUserUpdate

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgUserUpdate) RemoveOrgRoles

func (ouu *OrgUserUpdate) RemoveOrgRoles(o ...*OrgRole) *OrgUserUpdate

RemoveOrgRoles removes "org_roles" edges to OrgRole entities.

func (*OrgUserUpdate) Save

func (ouu *OrgUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgUserUpdate) SaveX

func (ouu *OrgUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgUserUpdate) SetDisplayName

func (ouu *OrgUserUpdate) SetDisplayName(s string) *OrgUserUpdate

SetDisplayName sets the "display_name" field.

func (*OrgUserUpdate) SetInput

SetInput applies the change-set in the UpdateOrgUserInput on the OrgUserUpdate builder.

func (*OrgUserUpdate) SetJoinedAt

func (ouu *OrgUserUpdate) SetJoinedAt(t time.Time) *OrgUserUpdate

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpdate) SetNillableJoinedAt

func (ouu *OrgUserUpdate) SetNillableJoinedAt(t *time.Time) *OrgUserUpdate

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*OrgUserUpdate) SetNillableUpdatedAt

func (ouu *OrgUserUpdate) SetNillableUpdatedAt(t *time.Time) *OrgUserUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUserUpdate) SetNillableUpdatedBy

func (ouu *OrgUserUpdate) SetNillableUpdatedBy(i *int) *OrgUserUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUserUpdate) SetOrg

func (ouu *OrgUserUpdate) SetOrg(o *Org) *OrgUserUpdate

SetOrg sets the "org" edge to the Org entity.

func (*OrgUserUpdate) SetOrgID

func (ouu *OrgUserUpdate) SetOrgID(i int) *OrgUserUpdate

SetOrgID sets the "org_id" field.

func (*OrgUserUpdate) SetUpdatedAt

func (ouu *OrgUserUpdate) SetUpdatedAt(t time.Time) *OrgUserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserUpdate) SetUpdatedBy

func (ouu *OrgUserUpdate) SetUpdatedBy(i int) *OrgUserUpdate

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserUpdate) SetUser

func (ouu *OrgUserUpdate) SetUser(u *User) *OrgUserUpdate

SetUser sets the "user" edge to the User entity.

func (*OrgUserUpdate) SetUserID

func (ouu *OrgUserUpdate) SetUserID(i int) *OrgUserUpdate

SetUserID sets the "user_id" field.

func (*OrgUserUpdate) Where

func (ouu *OrgUserUpdate) Where(ps ...predicate.OrgUser) *OrgUserUpdate

Where appends a list predicates to the OrgUserUpdate builder.

type OrgUserUpdateOne

type OrgUserUpdateOne struct {
	// contains filtered or unexported fields
}

OrgUserUpdateOne is the builder for updating a single OrgUser entity.

func (*OrgUserUpdateOne) AddOrgRoleIDs

func (ouuo *OrgUserUpdateOne) AddOrgRoleIDs(ids ...int) *OrgUserUpdateOne

AddOrgRoleIDs adds the "org_roles" edge to the OrgRole entity by IDs.

func (*OrgUserUpdateOne) AddOrgRoleUser

func (ouuo *OrgUserUpdateOne) AddOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdateOne

AddOrgRoleUser adds the "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdateOne) AddOrgRoleUserIDs

func (ouuo *OrgUserUpdateOne) AddOrgRoleUserIDs(ids ...int) *OrgUserUpdateOne

AddOrgRoleUserIDs adds the "org_role_user" edge to the OrgRoleUser entity by IDs.

func (*OrgUserUpdateOne) AddOrgRoles

func (ouuo *OrgUserUpdateOne) AddOrgRoles(o ...*OrgRole) *OrgUserUpdateOne

AddOrgRoles adds the "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdateOne) AddUpdatedBy

func (ouuo *OrgUserUpdateOne) AddUpdatedBy(i int) *OrgUserUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*OrgUserUpdateOne) ClearOrg

func (ouuo *OrgUserUpdateOne) ClearOrg() *OrgUserUpdateOne

ClearOrg clears the "org" edge to the Org entity.

func (*OrgUserUpdateOne) ClearOrgRoleUser

func (ouuo *OrgUserUpdateOne) ClearOrgRoleUser() *OrgUserUpdateOne

ClearOrgRoleUser clears all "org_role_user" edges to the OrgRoleUser entity.

func (*OrgUserUpdateOne) ClearOrgRoles

func (ouuo *OrgUserUpdateOne) ClearOrgRoles() *OrgUserUpdateOne

ClearOrgRoles clears all "org_roles" edges to the OrgRole entity.

func (*OrgUserUpdateOne) ClearUpdatedAt

func (ouuo *OrgUserUpdateOne) ClearUpdatedAt() *OrgUserUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserUpdateOne) ClearUpdatedBy

func (ouuo *OrgUserUpdateOne) ClearUpdatedBy() *OrgUserUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserUpdateOne) ClearUser

func (ouuo *OrgUserUpdateOne) ClearUser() *OrgUserUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*OrgUserUpdateOne) Exec

func (ouuo *OrgUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgUserUpdateOne) ExecX

func (ouuo *OrgUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpdateOne) Mutation

func (ouuo *OrgUserUpdateOne) Mutation() *OrgUserMutation

Mutation returns the OrgUserMutation object of the builder.

func (*OrgUserUpdateOne) RemoveOrgRoleIDs

func (ouuo *OrgUserUpdateOne) RemoveOrgRoleIDs(ids ...int) *OrgUserUpdateOne

RemoveOrgRoleIDs removes the "org_roles" edge to OrgRole entities by IDs.

func (*OrgUserUpdateOne) RemoveOrgRoleUser

func (ouuo *OrgUserUpdateOne) RemoveOrgRoleUser(o ...*OrgRoleUser) *OrgUserUpdateOne

RemoveOrgRoleUser removes "org_role_user" edges to OrgRoleUser entities.

func (*OrgUserUpdateOne) RemoveOrgRoleUserIDs

func (ouuo *OrgUserUpdateOne) RemoveOrgRoleUserIDs(ids ...int) *OrgUserUpdateOne

RemoveOrgRoleUserIDs removes the "org_role_user" edge to OrgRoleUser entities by IDs.

func (*OrgUserUpdateOne) RemoveOrgRoles

func (ouuo *OrgUserUpdateOne) RemoveOrgRoles(o ...*OrgRole) *OrgUserUpdateOne

RemoveOrgRoles removes "org_roles" edges to OrgRole entities.

func (*OrgUserUpdateOne) Save

func (ouuo *OrgUserUpdateOne) Save(ctx context.Context) (*OrgUser, error)

Save executes the query and returns the updated OrgUser entity.

func (*OrgUserUpdateOne) SaveX

func (ouuo *OrgUserUpdateOne) SaveX(ctx context.Context) *OrgUser

SaveX is like Save, but panics if an error occurs.

func (*OrgUserUpdateOne) Select

func (ouuo *OrgUserUpdateOne) Select(field string, fields ...string) *OrgUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgUserUpdateOne) SetDisplayName

func (ouuo *OrgUserUpdateOne) SetDisplayName(s string) *OrgUserUpdateOne

SetDisplayName sets the "display_name" field.

func (*OrgUserUpdateOne) SetInput

SetInput applies the change-set in the UpdateOrgUserInput on the OrgUserUpdateOne builder.

func (*OrgUserUpdateOne) SetJoinedAt

func (ouuo *OrgUserUpdateOne) SetJoinedAt(t time.Time) *OrgUserUpdateOne

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpdateOne) SetNillableJoinedAt

func (ouuo *OrgUserUpdateOne) SetNillableJoinedAt(t *time.Time) *OrgUserUpdateOne

SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.

func (*OrgUserUpdateOne) SetNillableUpdatedAt

func (ouuo *OrgUserUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrgUserUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*OrgUserUpdateOne) SetNillableUpdatedBy

func (ouuo *OrgUserUpdateOne) SetNillableUpdatedBy(i *int) *OrgUserUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*OrgUserUpdateOne) SetOrg

func (ouuo *OrgUserUpdateOne) SetOrg(o *Org) *OrgUserUpdateOne

SetOrg sets the "org" edge to the Org entity.

func (*OrgUserUpdateOne) SetOrgID

func (ouuo *OrgUserUpdateOne) SetOrgID(i int) *OrgUserUpdateOne

SetOrgID sets the "org_id" field.

func (*OrgUserUpdateOne) SetUpdatedAt

func (ouuo *OrgUserUpdateOne) SetUpdatedAt(t time.Time) *OrgUserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserUpdateOne) SetUpdatedBy

func (ouuo *OrgUserUpdateOne) SetUpdatedBy(i int) *OrgUserUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserUpdateOne) SetUser

func (ouuo *OrgUserUpdateOne) SetUser(u *User) *OrgUserUpdateOne

SetUser sets the "user" edge to the User entity.

func (*OrgUserUpdateOne) SetUserID

func (ouuo *OrgUserUpdateOne) SetUserID(i int) *OrgUserUpdateOne

SetUserID sets the "user_id" field.

func (*OrgUserUpdateOne) Where

func (ouuo *OrgUserUpdateOne) Where(ps ...predicate.OrgUser) *OrgUserUpdateOne

Where appends a list predicates to the OrgUserUpdate builder.

type OrgUserUpsert

type OrgUserUpsert struct {
	*sql.UpdateSet
}

OrgUserUpsert is the "OnConflict" setter.

func (*OrgUserUpsert) AddUpdatedBy

func (u *OrgUserUpsert) AddUpdatedBy(v int) *OrgUserUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUserUpsert) ClearUpdatedAt

func (u *OrgUserUpsert) ClearUpdatedAt() *OrgUserUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserUpsert) ClearUpdatedBy

func (u *OrgUserUpsert) ClearUpdatedBy() *OrgUserUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserUpsert) SetDisplayName

func (u *OrgUserUpsert) SetDisplayName(v string) *OrgUserUpsert

SetDisplayName sets the "display_name" field.

func (*OrgUserUpsert) SetJoinedAt

func (u *OrgUserUpsert) SetJoinedAt(v time.Time) *OrgUserUpsert

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpsert) SetOrgID

func (u *OrgUserUpsert) SetOrgID(v int) *OrgUserUpsert

SetOrgID sets the "org_id" field.

func (*OrgUserUpsert) SetUpdatedAt

func (u *OrgUserUpsert) SetUpdatedAt(v time.Time) *OrgUserUpsert

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserUpsert) SetUpdatedBy

func (u *OrgUserUpsert) SetUpdatedBy(v int) *OrgUserUpsert

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserUpsert) SetUserID

func (u *OrgUserUpsert) SetUserID(v int) *OrgUserUpsert

SetUserID sets the "user_id" field.

func (*OrgUserUpsert) UpdateDisplayName

func (u *OrgUserUpsert) UpdateDisplayName() *OrgUserUpsert

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateJoinedAt

func (u *OrgUserUpsert) UpdateJoinedAt() *OrgUserUpsert

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateOrgID

func (u *OrgUserUpsert) UpdateOrgID() *OrgUserUpsert

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateUpdatedAt

func (u *OrgUserUpsert) UpdateUpdatedAt() *OrgUserUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateUpdatedBy

func (u *OrgUserUpsert) UpdateUpdatedBy() *OrgUserUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgUserUpsert) UpdateUserID

func (u *OrgUserUpsert) UpdateUserID() *OrgUserUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserUpsertBulk

type OrgUserUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgUserUpsertBulk is the builder for "upsert"-ing a bulk of OrgUser nodes.

func (*OrgUserUpsertBulk) AddUpdatedBy

func (u *OrgUserUpsertBulk) AddUpdatedBy(v int) *OrgUserUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUserUpsertBulk) ClearUpdatedAt

func (u *OrgUserUpsertBulk) ClearUpdatedAt() *OrgUserUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserUpsertBulk) ClearUpdatedBy

func (u *OrgUserUpsertBulk) ClearUpdatedBy() *OrgUserUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserUpsertBulk) DoNothing

func (u *OrgUserUpsertBulk) DoNothing() *OrgUserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUserUpsertBulk) Exec

func (u *OrgUserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserUpsertBulk) ExecX

func (u *OrgUserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpsertBulk) Ignore

func (u *OrgUserUpsertBulk) Ignore() *OrgUserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgUserUpsertBulk) SetDisplayName

func (u *OrgUserUpsertBulk) SetDisplayName(v string) *OrgUserUpsertBulk

SetDisplayName sets the "display_name" field.

func (*OrgUserUpsertBulk) SetJoinedAt

func (u *OrgUserUpsertBulk) SetJoinedAt(v time.Time) *OrgUserUpsertBulk

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpsertBulk) SetOrgID

func (u *OrgUserUpsertBulk) SetOrgID(v int) *OrgUserUpsertBulk

SetOrgID sets the "org_id" field.

func (*OrgUserUpsertBulk) SetUpdatedAt

func (u *OrgUserUpsertBulk) SetUpdatedAt(v time.Time) *OrgUserUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserUpsertBulk) SetUpdatedBy

func (u *OrgUserUpsertBulk) SetUpdatedBy(v int) *OrgUserUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserUpsertBulk) SetUserID

func (u *OrgUserUpsertBulk) SetUserID(v int) *OrgUserUpsertBulk

SetUserID sets the "user_id" field.

func (*OrgUserUpsertBulk) Update

func (u *OrgUserUpsertBulk) Update(set func(*OrgUserUpsert)) *OrgUserUpsertBulk

Update allows overriding fields `UPDATE` values. See the OrgUserCreateBulk.OnConflict documentation for more info.

func (*OrgUserUpsertBulk) UpdateDisplayName

func (u *OrgUserUpsertBulk) UpdateDisplayName() *OrgUserUpsertBulk

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateJoinedAt

func (u *OrgUserUpsertBulk) UpdateJoinedAt() *OrgUserUpsertBulk

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateNewValues

func (u *OrgUserUpsertBulk) UpdateNewValues() *OrgUserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orguser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUserUpsertBulk) UpdateOrgID

func (u *OrgUserUpsertBulk) UpdateOrgID() *OrgUserUpsertBulk

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateUpdatedAt

func (u *OrgUserUpsertBulk) UpdateUpdatedAt() *OrgUserUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateUpdatedBy

func (u *OrgUserUpsertBulk) UpdateUpdatedBy() *OrgUserUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgUserUpsertBulk) UpdateUserID

func (u *OrgUserUpsertBulk) UpdateUserID() *OrgUserUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserUpsertOne

type OrgUserUpsertOne struct {
	// contains filtered or unexported fields
}

OrgUserUpsertOne is the builder for "upsert"-ing

one OrgUser node.

func (*OrgUserUpsertOne) AddUpdatedBy

func (u *OrgUserUpsertOne) AddUpdatedBy(v int) *OrgUserUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*OrgUserUpsertOne) ClearUpdatedAt

func (u *OrgUserUpsertOne) ClearUpdatedAt() *OrgUserUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*OrgUserUpsertOne) ClearUpdatedBy

func (u *OrgUserUpsertOne) ClearUpdatedBy() *OrgUserUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*OrgUserUpsertOne) DoNothing

func (u *OrgUserUpsertOne) DoNothing() *OrgUserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgUserUpsertOne) Exec

func (u *OrgUserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgUserUpsertOne) ExecX

func (u *OrgUserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserUpsertOne) ID

func (u *OrgUserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgUserUpsertOne) IDX

func (u *OrgUserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*OrgUserUpsertOne) Ignore

func (u *OrgUserUpsertOne) Ignore() *OrgUserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgUser.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgUserUpsertOne) SetDisplayName

func (u *OrgUserUpsertOne) SetDisplayName(v string) *OrgUserUpsertOne

SetDisplayName sets the "display_name" field.

func (*OrgUserUpsertOne) SetJoinedAt

func (u *OrgUserUpsertOne) SetJoinedAt(v time.Time) *OrgUserUpsertOne

SetJoinedAt sets the "joined_at" field.

func (*OrgUserUpsertOne) SetOrgID

func (u *OrgUserUpsertOne) SetOrgID(v int) *OrgUserUpsertOne

SetOrgID sets the "org_id" field.

func (*OrgUserUpsertOne) SetUpdatedAt

func (u *OrgUserUpsertOne) SetUpdatedAt(v time.Time) *OrgUserUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*OrgUserUpsertOne) SetUpdatedBy

func (u *OrgUserUpsertOne) SetUpdatedBy(v int) *OrgUserUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*OrgUserUpsertOne) SetUserID

func (u *OrgUserUpsertOne) SetUserID(v int) *OrgUserUpsertOne

SetUserID sets the "user_id" field.

func (*OrgUserUpsertOne) Update

func (u *OrgUserUpsertOne) Update(set func(*OrgUserUpsert)) *OrgUserUpsertOne

Update allows overriding fields `UPDATE` values. See the OrgUserCreate.OnConflict documentation for more info.

func (*OrgUserUpsertOne) UpdateDisplayName

func (u *OrgUserUpsertOne) UpdateDisplayName() *OrgUserUpsertOne

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateJoinedAt

func (u *OrgUserUpsertOne) UpdateJoinedAt() *OrgUserUpsertOne

UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateNewValues

func (u *OrgUserUpsertOne) UpdateNewValues() *OrgUserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orguser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgUserUpsertOne) UpdateOrgID

func (u *OrgUserUpsertOne) UpdateOrgID() *OrgUserUpsertOne

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateUpdatedAt

func (u *OrgUserUpsertOne) UpdateUpdatedAt() *OrgUserUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateUpdatedBy

func (u *OrgUserUpsertOne) UpdateUpdatedBy() *OrgUserUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*OrgUserUpsertOne) UpdateUserID

func (u *OrgUserUpsertOne) UpdateUserID() *OrgUserUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgUserWhereInput

type OrgUserWhereInput struct {
	Predicates []predicate.OrgUser  `json:"-"`
	Not        *OrgUserWhereInput   `json:"not,omitempty"`
	Or         []*OrgUserWhereInput `json:"or,omitempty"`
	And        []*OrgUserWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "org_id" field predicates.
	OrgID      *int  `json:"orgID,omitempty"`
	OrgIDNEQ   *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn    []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn []int `json:"orgIDNotIn,omitempty"`

	// "user_id" field predicates.
	UserID      *int  `json:"userID,omitempty"`
	UserIDNEQ   *int  `json:"userIDNEQ,omitempty"`
	UserIDIn    []int `json:"userIDIn,omitempty"`
	UserIDNotIn []int `json:"userIDNotIn,omitempty"`

	// "joined_at" field predicates.
	JoinedAt      *time.Time  `json:"joinedAt,omitempty"`
	JoinedAtNEQ   *time.Time  `json:"joinedAtNEQ,omitempty"`
	JoinedAtIn    []time.Time `json:"joinedAtIn,omitempty"`
	JoinedAtNotIn []time.Time `json:"joinedAtNotIn,omitempty"`
	JoinedAtGT    *time.Time  `json:"joinedAtGT,omitempty"`
	JoinedAtGTE   *time.Time  `json:"joinedAtGTE,omitempty"`
	JoinedAtLT    *time.Time  `json:"joinedAtLT,omitempty"`
	JoinedAtLTE   *time.Time  `json:"joinedAtLTE,omitempty"`

	// "display_name" field predicates.
	DisplayName             *string  `json:"displayName,omitempty"`
	DisplayNameNEQ          *string  `json:"displayNameNEQ,omitempty"`
	DisplayNameIn           []string `json:"displayNameIn,omitempty"`
	DisplayNameNotIn        []string `json:"displayNameNotIn,omitempty"`
	DisplayNameGT           *string  `json:"displayNameGT,omitempty"`
	DisplayNameGTE          *string  `json:"displayNameGTE,omitempty"`
	DisplayNameLT           *string  `json:"displayNameLT,omitempty"`
	DisplayNameLTE          *string  `json:"displayNameLTE,omitempty"`
	DisplayNameContains     *string  `json:"displayNameContains,omitempty"`
	DisplayNameHasPrefix    *string  `json:"displayNameHasPrefix,omitempty"`
	DisplayNameHasSuffix    *string  `json:"displayNameHasSuffix,omitempty"`
	DisplayNameEqualFold    *string  `json:"displayNameEqualFold,omitempty"`
	DisplayNameContainsFold *string  `json:"displayNameContainsFold,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`
}

OrgUserWhereInput represents a where input for filtering OrgUser queries.

func (*OrgUserWhereInput) AddPredicates

func (i *OrgUserWhereInput) AddPredicates(predicates ...predicate.OrgUser)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgUserWhereInput) Filter

Filter applies the OrgUserWhereInput filter on the OrgUserQuery builder.

func (*OrgUserWhereInput) P

P returns a predicate for filtering orgusers. An error is returned if the input is empty or invalid.

type OrgUsers

type OrgUsers []*OrgUser

OrgUsers is a parsable slice of OrgUser.

type OrgWhereInput

type OrgWhereInput struct {
	Predicates []predicate.Org  `json:"-"`
	Not        *OrgWhereInput   `json:"not,omitempty"`
	Or         []*OrgWhereInput `json:"or,omitempty"`
	And        []*OrgWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "owner_id" field predicates.
	OwnerID       *int  `json:"ownerID,omitempty"`
	OwnerIDNEQ    *int  `json:"ownerIDNEQ,omitempty"`
	OwnerIDIn     []int `json:"ownerIDIn,omitempty"`
	OwnerIDNotIn  []int `json:"ownerIDNotIn,omitempty"`
	OwnerIDIsNil  bool  `json:"ownerIDIsNil,omitempty"`
	OwnerIDNotNil bool  `json:"ownerIDNotNil,omitempty"`

	// "kind" field predicates.
	Kind      *org.Kind  `json:"kind,omitempty"`
	KindNEQ   *org.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []org.Kind `json:"kindIn,omitempty"`
	KindNotIn []org.Kind `json:"kindNotIn,omitempty"`

	// "parent_id" field predicates.
	ParentID      *int  `json:"parentID,omitempty"`
	ParentIDNEQ   *int  `json:"parentIDNEQ,omitempty"`
	ParentIDIn    []int `json:"parentIDIn,omitempty"`
	ParentIDNotIn []int `json:"parentIDNotIn,omitempty"`

	// "domain" field predicates.
	Domain             *string  `json:"domain,omitempty"`
	DomainNEQ          *string  `json:"domainNEQ,omitempty"`
	DomainIn           []string `json:"domainIn,omitempty"`
	DomainNotIn        []string `json:"domainNotIn,omitempty"`
	DomainGT           *string  `json:"domainGT,omitempty"`
	DomainGTE          *string  `json:"domainGTE,omitempty"`
	DomainLT           *string  `json:"domainLT,omitempty"`
	DomainLTE          *string  `json:"domainLTE,omitempty"`
	DomainContains     *string  `json:"domainContains,omitempty"`
	DomainHasPrefix    *string  `json:"domainHasPrefix,omitempty"`
	DomainHasSuffix    *string  `json:"domainHasSuffix,omitempty"`
	DomainIsNil        bool     `json:"domainIsNil,omitempty"`
	DomainNotNil       bool     `json:"domainNotNil,omitempty"`
	DomainEqualFold    *string  `json:"domainEqualFold,omitempty"`
	DomainContainsFold *string  `json:"domainContainsFold,omitempty"`

	// "code" field predicates.
	Code             *string  `json:"code,omitempty"`
	CodeNEQ          *string  `json:"codeNEQ,omitempty"`
	CodeIn           []string `json:"codeIn,omitempty"`
	CodeNotIn        []string `json:"codeNotIn,omitempty"`
	CodeGT           *string  `json:"codeGT,omitempty"`
	CodeGTE          *string  `json:"codeGTE,omitempty"`
	CodeLT           *string  `json:"codeLT,omitempty"`
	CodeLTE          *string  `json:"codeLTE,omitempty"`
	CodeContains     *string  `json:"codeContains,omitempty"`
	CodeHasPrefix    *string  `json:"codeHasPrefix,omitempty"`
	CodeHasSuffix    *string  `json:"codeHasSuffix,omitempty"`
	CodeIsNil        bool     `json:"codeIsNil,omitempty"`
	CodeNotNil       bool     `json:"codeNotNil,omitempty"`
	CodeEqualFold    *string  `json:"codeEqualFold,omitempty"`
	CodeContainsFold *string  `json:"codeContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "path" field predicates.
	Path             *string  `json:"path,omitempty"`
	PathNEQ          *string  `json:"pathNEQ,omitempty"`
	PathIn           []string `json:"pathIn,omitempty"`
	PathNotIn        []string `json:"pathNotIn,omitempty"`
	PathGT           *string  `json:"pathGT,omitempty"`
	PathGTE          *string  `json:"pathGTE,omitempty"`
	PathLT           *string  `json:"pathLT,omitempty"`
	PathLTE          *string  `json:"pathLTE,omitempty"`
	PathContains     *string  `json:"pathContains,omitempty"`
	PathHasPrefix    *string  `json:"pathHasPrefix,omitempty"`
	PathHasSuffix    *string  `json:"pathHasSuffix,omitempty"`
	PathIsNil        bool     `json:"pathIsNil,omitempty"`
	PathNotNil       bool     `json:"pathNotNil,omitempty"`
	PathEqualFold    *string  `json:"pathEqualFold,omitempty"`
	PathContainsFold *string  `json:"pathContainsFold,omitempty"`

	// "country_code" field predicates.
	CountryCode             *string  `json:"countryCode,omitempty"`
	CountryCodeNEQ          *string  `json:"countryCodeNEQ,omitempty"`
	CountryCodeIn           []string `json:"countryCodeIn,omitempty"`
	CountryCodeNotIn        []string `json:"countryCodeNotIn,omitempty"`
	CountryCodeGT           *string  `json:"countryCodeGT,omitempty"`
	CountryCodeGTE          *string  `json:"countryCodeGTE,omitempty"`
	CountryCodeLT           *string  `json:"countryCodeLT,omitempty"`
	CountryCodeLTE          *string  `json:"countryCodeLTE,omitempty"`
	CountryCodeContains     *string  `json:"countryCodeContains,omitempty"`
	CountryCodeHasPrefix    *string  `json:"countryCodeHasPrefix,omitempty"`
	CountryCodeHasSuffix    *string  `json:"countryCodeHasSuffix,omitempty"`
	CountryCodeIsNil        bool     `json:"countryCodeIsNil,omitempty"`
	CountryCodeNotNil       bool     `json:"countryCodeNotNil,omitempty"`
	CountryCodeEqualFold    *string  `json:"countryCodeEqualFold,omitempty"`
	CountryCodeContainsFold *string  `json:"countryCodeContainsFold,omitempty"`

	// "timezone" field predicates.
	Timezone             *string  `json:"timezone,omitempty"`
	TimezoneNEQ          *string  `json:"timezoneNEQ,omitempty"`
	TimezoneIn           []string `json:"timezoneIn,omitempty"`
	TimezoneNotIn        []string `json:"timezoneNotIn,omitempty"`
	TimezoneGT           *string  `json:"timezoneGT,omitempty"`
	TimezoneGTE          *string  `json:"timezoneGTE,omitempty"`
	TimezoneLT           *string  `json:"timezoneLT,omitempty"`
	TimezoneLTE          *string  `json:"timezoneLTE,omitempty"`
	TimezoneContains     *string  `json:"timezoneContains,omitempty"`
	TimezoneHasPrefix    *string  `json:"timezoneHasPrefix,omitempty"`
	TimezoneHasSuffix    *string  `json:"timezoneHasSuffix,omitempty"`
	TimezoneIsNil        bool     `json:"timezoneIsNil,omitempty"`
	TimezoneNotNil       bool     `json:"timezoneNotNil,omitempty"`
	TimezoneEqualFold    *string  `json:"timezoneEqualFold,omitempty"`
	TimezoneContainsFold *string  `json:"timezoneContainsFold,omitempty"`

	// "parent" edge predicates.
	HasParent     *bool            `json:"hasParent,omitempty"`
	HasParentWith []*OrgWhereInput `json:"hasParentWith,omitempty"`

	// "children" edge predicates.
	HasChildren     *bool            `json:"hasChildren,omitempty"`
	HasChildrenWith []*OrgWhereInput `json:"hasChildrenWith,omitempty"`

	// "owner" edge predicates.
	HasOwner     *bool             `json:"hasOwner,omitempty"`
	HasOwnerWith []*UserWhereInput `json:"hasOwnerWith,omitempty"`

	// "users" edge predicates.
	HasUsers     *bool             `json:"hasUsers,omitempty"`
	HasUsersWith []*UserWhereInput `json:"hasUsersWith,omitempty"`

	// "roles_and_groups" edge predicates.
	HasRolesAndGroups     *bool                `json:"hasRolesAndGroups,omitempty"`
	HasRolesAndGroupsWith []*OrgRoleWhereInput `json:"hasRolesAndGroupsWith,omitempty"`

	// "permissions" edge predicates.
	HasPermissions     *bool                   `json:"hasPermissions,omitempty"`
	HasPermissionsWith []*PermissionWhereInput `json:"hasPermissionsWith,omitempty"`

	// "policies" edge predicates.
	HasPolicies     *bool                  `json:"hasPolicies,omitempty"`
	HasPoliciesWith []*OrgPolicyWhereInput `json:"hasPoliciesWith,omitempty"`

	// "apps" edge predicates.
	HasApps     *bool            `json:"hasApps,omitempty"`
	HasAppsWith []*AppWhereInput `json:"hasAppsWith,omitempty"`

	// "org_user" edge predicates.
	HasOrgUser     *bool                `json:"hasOrgUser,omitempty"`
	HasOrgUserWith []*OrgUserWhereInput `json:"hasOrgUserWith,omitempty"`
}

OrgWhereInput represents a where input for filtering Org queries.

func (*OrgWhereInput) AddPredicates

func (i *OrgWhereInput) AddPredicates(predicates ...predicate.Org)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*OrgWhereInput) Filter

func (i *OrgWhereInput) Filter(q *OrgQuery) (*OrgQuery, error)

Filter applies the OrgWhereInput filter on the OrgQuery builder.

func (*OrgWhereInput) P

func (i *OrgWhereInput) P() (predicate.Org, error)

P returns a predicate for filtering orgs. An error is returned if the input is empty or invalid.

type Orgs

type Orgs []*Org

Orgs is a parsable slice of Org.

type PageInfo

type PageInfo = entgql.PageInfo[int]

Common entgql types.

type Permission

type Permission struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 授权的域根组织
	OrgID int `json:"org_id,omitempty"`
	// 授权类型:角色,用户
	PrincipalKind permission.PrincipalKind `json:"principal_kind,omitempty"`
	// 授权类型为用户的ID
	UserID int `json:"user_id,omitempty"`
	// 授权类型为角色或用户组的ID
	RoleID int `json:"role_id,omitempty"`
	// 策略
	OrgPolicyID int `json:"org_policy_id,omitempty"`
	// 生效开始时间
	StartAt time.Time `json:"start_at,omitempty"`
	// 生效结束时间
	EndAt time.Time `json:"end_at,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PermissionQuery when eager-loading is set.
	Edges PermissionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Permission is the model entity for the Permission schema.

func (*Permission) GlobalID

func (pe *Permission) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Permission node.

func (*Permission) IsNode

func (*Permission) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Permission) Org

func (pe *Permission) Org(ctx context.Context) (*Org, error)

func (*Permission) OrgPolicy

func (pe *Permission) OrgPolicy(ctx context.Context) (*OrgPolicy, error)

func (*Permission) QueryOrg

func (pe *Permission) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the Permission entity.

func (*Permission) QueryOrgPolicy

func (pe *Permission) QueryOrgPolicy() *OrgPolicyQuery

QueryOrgPolicy queries the "org_policy" edge of the Permission entity.

func (*Permission) QueryRole

func (pe *Permission) QueryRole() *OrgRoleQuery

QueryRole queries the "role" edge of the Permission entity.

func (*Permission) QueryUser

func (pe *Permission) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Permission entity.

func (*Permission) Role

func (pe *Permission) Role(ctx context.Context) (*OrgRole, error)

func (*Permission) String

func (pe *Permission) String() string

String implements the fmt.Stringer.

func (*Permission) ToEdge

func (pe *Permission) ToEdge(order *PermissionOrder) *PermissionEdge

ToEdge converts Permission into PermissionEdge.

func (*Permission) Unwrap

func (pe *Permission) Unwrap() *Permission

Unwrap unwraps the Permission entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Permission) Update

func (pe *Permission) Update() *PermissionUpdateOne

Update returns a builder for updating this Permission. Note that you need to call Permission.Unwrap() before calling this method if this Permission was returned from a transaction, and the transaction was committed or rolled back.

func (*Permission) User

func (pe *Permission) User(ctx context.Context) (*User, error)

func (*Permission) Value

func (pe *Permission) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Permission. This includes values selected through modifiers, order, etc.

type PermissionClient

type PermissionClient struct {
	// contains filtered or unexported fields
}

PermissionClient is a client for the Permission schema.

func NewPermissionClient

func NewPermissionClient(c config) *PermissionClient

NewPermissionClient returns a client for the Permission from the given config.

func (*PermissionClient) Create

func (c *PermissionClient) Create() *PermissionCreate

Create returns a builder for creating a Permission entity.

func (*PermissionClient) CreateBulk

func (c *PermissionClient) CreateBulk(builders ...*PermissionCreate) *PermissionCreateBulk

CreateBulk returns a builder for creating a bulk of Permission entities.

func (*PermissionClient) Delete

func (c *PermissionClient) Delete() *PermissionDelete

Delete returns a delete builder for Permission.

func (*PermissionClient) DeleteOne

func (c *PermissionClient) DeleteOne(pe *Permission) *PermissionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PermissionClient) DeleteOneID

func (c *PermissionClient) DeleteOneID(id int) *PermissionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PermissionClient) Get

func (c *PermissionClient) Get(ctx context.Context, id int) (*Permission, error)

Get returns a Permission entity by its id.

func (*PermissionClient) GetX

func (c *PermissionClient) GetX(ctx context.Context, id int) *Permission

GetX is like Get, but panics if an error occurs.

func (*PermissionClient) Hooks

func (c *PermissionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PermissionClient) Intercept

func (c *PermissionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `permission.Intercept(f(g(h())))`.

func (*PermissionClient) Interceptors

func (c *PermissionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PermissionClient) MapCreateBulk

func (c *PermissionClient) MapCreateBulk(slice any, setFunc func(*PermissionCreate, int)) *PermissionCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*PermissionClient) Query

func (c *PermissionClient) Query() *PermissionQuery

Query returns a query builder for Permission.

func (*PermissionClient) QueryOrg

func (c *PermissionClient) QueryOrg(pe *Permission) *OrgQuery

QueryOrg queries the org edge of a Permission.

func (*PermissionClient) QueryOrgPolicy

func (c *PermissionClient) QueryOrgPolicy(pe *Permission) *OrgPolicyQuery

QueryOrgPolicy queries the org_policy edge of a Permission.

func (*PermissionClient) QueryRole

func (c *PermissionClient) QueryRole(pe *Permission) *OrgRoleQuery

QueryRole queries the role edge of a Permission.

func (*PermissionClient) QueryUser

func (c *PermissionClient) QueryUser(pe *Permission) *UserQuery

QueryUser queries the user edge of a Permission.

func (*PermissionClient) Update

func (c *PermissionClient) Update() *PermissionUpdate

Update returns an update builder for Permission.

func (*PermissionClient) UpdateOne

func (c *PermissionClient) UpdateOne(pe *Permission) *PermissionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PermissionClient) UpdateOneID

func (c *PermissionClient) UpdateOneID(id int) *PermissionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PermissionClient) Use

func (c *PermissionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `permission.Hooks(f(g(h())))`.

type PermissionConnection

type PermissionConnection struct {
	Edges      []*PermissionEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

PermissionConnection is the connection containing edges to Permission.

type PermissionCreate

type PermissionCreate struct {
	// contains filtered or unexported fields
}

PermissionCreate is the builder for creating a Permission entity.

func (*PermissionCreate) Exec

func (pc *PermissionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PermissionCreate) ExecX

func (pc *PermissionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionCreate) Mutation

func (pc *PermissionCreate) Mutation() *PermissionMutation

Mutation returns the PermissionMutation object of the builder.

func (*PermissionCreate) OnConflict

func (pc *PermissionCreate) OnConflict(opts ...sql.ConflictOption) *PermissionUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Permission.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PermissionUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*PermissionCreate) OnConflictColumns

func (pc *PermissionCreate) OnConflictColumns(columns ...string) *PermissionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Permission.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PermissionCreate) Save

func (pc *PermissionCreate) Save(ctx context.Context) (*Permission, error)

Save creates the Permission in the database.

func (*PermissionCreate) SaveX

func (pc *PermissionCreate) SaveX(ctx context.Context) *Permission

SaveX calls Save and panics if Save returns an error.

func (*PermissionCreate) SetCreatedAt

func (pc *PermissionCreate) SetCreatedAt(t time.Time) *PermissionCreate

SetCreatedAt sets the "created_at" field.

func (*PermissionCreate) SetCreatedBy

func (pc *PermissionCreate) SetCreatedBy(i int) *PermissionCreate

SetCreatedBy sets the "created_by" field.

func (*PermissionCreate) SetEndAt

func (pc *PermissionCreate) SetEndAt(t time.Time) *PermissionCreate

SetEndAt sets the "end_at" field.

func (*PermissionCreate) SetID

func (pc *PermissionCreate) SetID(i int) *PermissionCreate

SetID sets the "id" field.

func (*PermissionCreate) SetInput

SetInput applies the change-set in the CreatePermissionInput on the PermissionCreate builder.

func (*PermissionCreate) SetNillableCreatedAt

func (pc *PermissionCreate) SetNillableCreatedAt(t *time.Time) *PermissionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PermissionCreate) SetNillableEndAt

func (pc *PermissionCreate) SetNillableEndAt(t *time.Time) *PermissionCreate

SetNillableEndAt sets the "end_at" field if the given value is not nil.

func (*PermissionCreate) SetNillableID

func (pc *PermissionCreate) SetNillableID(i *int) *PermissionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PermissionCreate) SetNillableRoleID

func (pc *PermissionCreate) SetNillableRoleID(i *int) *PermissionCreate

SetNillableRoleID sets the "role_id" field if the given value is not nil.

func (*PermissionCreate) SetNillableStartAt

func (pc *PermissionCreate) SetNillableStartAt(t *time.Time) *PermissionCreate

SetNillableStartAt sets the "start_at" field if the given value is not nil.

func (*PermissionCreate) SetNillableStatus

func (pc *PermissionCreate) SetNillableStatus(ts *typex.SimpleStatus) *PermissionCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PermissionCreate) SetNillableUpdatedAt

func (pc *PermissionCreate) SetNillableUpdatedAt(t *time.Time) *PermissionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PermissionCreate) SetNillableUpdatedBy

func (pc *PermissionCreate) SetNillableUpdatedBy(i *int) *PermissionCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*PermissionCreate) SetNillableUserID

func (pc *PermissionCreate) SetNillableUserID(i *int) *PermissionCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*PermissionCreate) SetOrg

func (pc *PermissionCreate) SetOrg(o *Org) *PermissionCreate

SetOrg sets the "org" edge to the Org entity.

func (*PermissionCreate) SetOrgID

func (pc *PermissionCreate) SetOrgID(i int) *PermissionCreate

SetOrgID sets the "org_id" field.

func (*PermissionCreate) SetOrgPolicy

func (pc *PermissionCreate) SetOrgPolicy(o *OrgPolicy) *PermissionCreate

SetOrgPolicy sets the "org_policy" edge to the OrgPolicy entity.

func (*PermissionCreate) SetOrgPolicyID

func (pc *PermissionCreate) SetOrgPolicyID(i int) *PermissionCreate

SetOrgPolicyID sets the "org_policy_id" field.

func (*PermissionCreate) SetPrincipalKind

func (pc *PermissionCreate) SetPrincipalKind(pk permission.PrincipalKind) *PermissionCreate

SetPrincipalKind sets the "principal_kind" field.

func (*PermissionCreate) SetRole

func (pc *PermissionCreate) SetRole(o *OrgRole) *PermissionCreate

SetRole sets the "role" edge to the OrgRole entity.

func (*PermissionCreate) SetRoleID

func (pc *PermissionCreate) SetRoleID(i int) *PermissionCreate

SetRoleID sets the "role_id" field.

func (*PermissionCreate) SetStartAt

func (pc *PermissionCreate) SetStartAt(t time.Time) *PermissionCreate

SetStartAt sets the "start_at" field.

func (*PermissionCreate) SetStatus

SetStatus sets the "status" field.

func (*PermissionCreate) SetUpdatedAt

func (pc *PermissionCreate) SetUpdatedAt(t time.Time) *PermissionCreate

SetUpdatedAt sets the "updated_at" field.

func (*PermissionCreate) SetUpdatedBy

func (pc *PermissionCreate) SetUpdatedBy(i int) *PermissionCreate

SetUpdatedBy sets the "updated_by" field.

func (*PermissionCreate) SetUser

func (pc *PermissionCreate) SetUser(u *User) *PermissionCreate

SetUser sets the "user" edge to the User entity.

func (*PermissionCreate) SetUserID

func (pc *PermissionCreate) SetUserID(i int) *PermissionCreate

SetUserID sets the "user_id" field.

type PermissionCreateBulk

type PermissionCreateBulk struct {
	// contains filtered or unexported fields
}

PermissionCreateBulk is the builder for creating many Permission entities in bulk.

func (*PermissionCreateBulk) Exec

func (pcb *PermissionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PermissionCreateBulk) ExecX

func (pcb *PermissionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionCreateBulk) OnConflict

func (pcb *PermissionCreateBulk) OnConflict(opts ...sql.ConflictOption) *PermissionUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Permission.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PermissionUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*PermissionCreateBulk) OnConflictColumns

func (pcb *PermissionCreateBulk) OnConflictColumns(columns ...string) *PermissionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Permission.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PermissionCreateBulk) Save

func (pcb *PermissionCreateBulk) Save(ctx context.Context) ([]*Permission, error)

Save creates the Permission entities in the database.

func (*PermissionCreateBulk) SaveX

func (pcb *PermissionCreateBulk) SaveX(ctx context.Context) []*Permission

SaveX is like Save, but panics if an error occurs.

type PermissionDelete

type PermissionDelete struct {
	// contains filtered or unexported fields
}

PermissionDelete is the builder for deleting a Permission entity.

func (*PermissionDelete) Exec

func (pd *PermissionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PermissionDelete) ExecX

func (pd *PermissionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PermissionDelete) Where

Where appends a list predicates to the PermissionDelete builder.

type PermissionDeleteOne

type PermissionDeleteOne struct {
	// contains filtered or unexported fields
}

PermissionDeleteOne is the builder for deleting a single Permission entity.

func (*PermissionDeleteOne) Exec

func (pdo *PermissionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PermissionDeleteOne) ExecX

func (pdo *PermissionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionDeleteOne) Where

Where appends a list predicates to the PermissionDelete builder.

type PermissionEdge

type PermissionEdge struct {
	Node   *Permission `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

PermissionEdge is the edge representation of Permission.

type PermissionEdges

type PermissionEdges struct {
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Role holds the value of the role edge.
	Role *OrgRole `json:"role,omitempty"`
	// OrgPolicy holds the value of the org_policy edge.
	OrgPolicy *OrgPolicy `json:"org_policy,omitempty"`
	// contains filtered or unexported fields
}

PermissionEdges holds the relations/edges for other nodes in the graph.

func (PermissionEdges) OrgOrErr

func (e PermissionEdges) OrgOrErr() (*Org, error)

OrgOrErr returns the Org value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PermissionEdges) OrgPolicyOrErr

func (e PermissionEdges) OrgPolicyOrErr() (*OrgPolicy, error)

OrgPolicyOrErr returns the OrgPolicy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PermissionEdges) RoleOrErr

func (e PermissionEdges) RoleOrErr() (*OrgRole, error)

RoleOrErr returns the Role value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PermissionEdges) UserOrErr

func (e PermissionEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PermissionGroupBy

type PermissionGroupBy struct {
	// contains filtered or unexported fields
}

PermissionGroupBy is the group-by builder for Permission entities.

func (*PermissionGroupBy) Aggregate

func (pgb *PermissionGroupBy) Aggregate(fns ...AggregateFunc) *PermissionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PermissionGroupBy) Bool

func (s *PermissionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) BoolX

func (s *PermissionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PermissionGroupBy) Bools

func (s *PermissionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) BoolsX

func (s *PermissionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PermissionGroupBy) Float64

func (s *PermissionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) Float64X

func (s *PermissionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PermissionGroupBy) Float64s

func (s *PermissionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) Float64sX

func (s *PermissionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PermissionGroupBy) Int

func (s *PermissionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) IntX

func (s *PermissionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PermissionGroupBy) Ints

func (s *PermissionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) IntsX

func (s *PermissionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PermissionGroupBy) Scan

func (pgb *PermissionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PermissionGroupBy) ScanX

func (s *PermissionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PermissionGroupBy) String

func (s *PermissionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) StringX

func (s *PermissionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PermissionGroupBy) Strings

func (s *PermissionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PermissionGroupBy) StringsX

func (s *PermissionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PermissionMutation

type PermissionMutation struct {
	// contains filtered or unexported fields
}

PermissionMutation represents an operation that mutates the Permission nodes in the graph.

func (*PermissionMutation) AddCreatedBy

func (m *PermissionMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*PermissionMutation) AddField

func (m *PermissionMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PermissionMutation) AddUpdatedBy

func (m *PermissionMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*PermissionMutation) AddedCreatedBy

func (m *PermissionMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*PermissionMutation) AddedEdges

func (m *PermissionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PermissionMutation) AddedField

func (m *PermissionMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PermissionMutation) AddedFields

func (m *PermissionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PermissionMutation) AddedIDs

func (m *PermissionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PermissionMutation) AddedUpdatedBy

func (m *PermissionMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*PermissionMutation) ClearEdge

func (m *PermissionMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PermissionMutation) ClearEndAt

func (m *PermissionMutation) ClearEndAt()

ClearEndAt clears the value of the "end_at" field.

func (*PermissionMutation) ClearField

func (m *PermissionMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PermissionMutation) ClearOrg

func (m *PermissionMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*PermissionMutation) ClearOrgPolicy

func (m *PermissionMutation) ClearOrgPolicy()

ClearOrgPolicy clears the "org_policy" edge to the OrgPolicy entity.

func (*PermissionMutation) ClearRole

func (m *PermissionMutation) ClearRole()

ClearRole clears the "role" edge to the OrgRole entity.

func (*PermissionMutation) ClearRoleID

func (m *PermissionMutation) ClearRoleID()

ClearRoleID clears the value of the "role_id" field.

func (*PermissionMutation) ClearStartAt

func (m *PermissionMutation) ClearStartAt()

ClearStartAt clears the value of the "start_at" field.

func (*PermissionMutation) ClearStatus

func (m *PermissionMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*PermissionMutation) ClearUpdatedAt

func (m *PermissionMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PermissionMutation) ClearUpdatedBy

func (m *PermissionMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*PermissionMutation) ClearUser

func (m *PermissionMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*PermissionMutation) ClearUserID

func (m *PermissionMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*PermissionMutation) ClearedEdges

func (m *PermissionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PermissionMutation) ClearedFields

func (m *PermissionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PermissionMutation) Client

func (m PermissionMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PermissionMutation) CreatedAt

func (m *PermissionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PermissionMutation) CreatedBy

func (m *PermissionMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*PermissionMutation) EdgeCleared

func (m *PermissionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PermissionMutation) EndAt

func (m *PermissionMutation) EndAt() (r time.Time, exists bool)

EndAt returns the value of the "end_at" field in the mutation.

func (*PermissionMutation) EndAtCleared

func (m *PermissionMutation) EndAtCleared() bool

EndAtCleared returns if the "end_at" field was cleared in this mutation.

func (*PermissionMutation) Field

func (m *PermissionMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PermissionMutation) FieldCleared

func (m *PermissionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PermissionMutation) Fields

func (m *PermissionMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PermissionMutation) ID

func (m *PermissionMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PermissionMutation) IDs

func (m *PermissionMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PermissionMutation) OldCreatedAt

func (m *PermissionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldCreatedBy

func (m *PermissionMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldEndAt

func (m *PermissionMutation) OldEndAt(ctx context.Context) (v time.Time, err error)

OldEndAt returns the old "end_at" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldField

func (m *PermissionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PermissionMutation) OldOrgID

func (m *PermissionMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldOrgPolicyID

func (m *PermissionMutation) OldOrgPolicyID(ctx context.Context) (v int, err error)

OldOrgPolicyID returns the old "org_policy_id" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldPrincipalKind

func (m *PermissionMutation) OldPrincipalKind(ctx context.Context) (v permission.PrincipalKind, err error)

OldPrincipalKind returns the old "principal_kind" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldRoleID

func (m *PermissionMutation) OldRoleID(ctx context.Context) (v int, err error)

OldRoleID returns the old "role_id" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldStartAt

func (m *PermissionMutation) OldStartAt(ctx context.Context) (v time.Time, err error)

OldStartAt returns the old "start_at" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldStatus

func (m *PermissionMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldUpdatedAt

func (m *PermissionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldUpdatedBy

func (m *PermissionMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) OldUserID

func (m *PermissionMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the Permission entity. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionMutation) Op

func (m *PermissionMutation) Op() Op

Op returns the operation name.

func (*PermissionMutation) OrgCleared

func (m *PermissionMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*PermissionMutation) OrgID

func (m *PermissionMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*PermissionMutation) OrgIDs

func (m *PermissionMutation) OrgIDs() (ids []int)

OrgIDs returns the "org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgID instead. It exists only for internal usage by the builders.

func (*PermissionMutation) OrgPolicyCleared

func (m *PermissionMutation) OrgPolicyCleared() bool

OrgPolicyCleared reports if the "org_policy" edge to the OrgPolicy entity was cleared.

func (*PermissionMutation) OrgPolicyID

func (m *PermissionMutation) OrgPolicyID() (r int, exists bool)

OrgPolicyID returns the value of the "org_policy_id" field in the mutation.

func (*PermissionMutation) OrgPolicyIDs

func (m *PermissionMutation) OrgPolicyIDs() (ids []int)

OrgPolicyIDs returns the "org_policy" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrgPolicyID instead. It exists only for internal usage by the builders.

func (*PermissionMutation) PrincipalKind

func (m *PermissionMutation) PrincipalKind() (r permission.PrincipalKind, exists bool)

PrincipalKind returns the value of the "principal_kind" field in the mutation.

func (*PermissionMutation) RemovedEdges

func (m *PermissionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PermissionMutation) RemovedIDs

func (m *PermissionMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PermissionMutation) ResetCreatedAt

func (m *PermissionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PermissionMutation) ResetCreatedBy

func (m *PermissionMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*PermissionMutation) ResetEdge

func (m *PermissionMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PermissionMutation) ResetEndAt

func (m *PermissionMutation) ResetEndAt()

ResetEndAt resets all changes to the "end_at" field.

func (*PermissionMutation) ResetField

func (m *PermissionMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PermissionMutation) ResetOrg

func (m *PermissionMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*PermissionMutation) ResetOrgID

func (m *PermissionMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*PermissionMutation) ResetOrgPolicy

func (m *PermissionMutation) ResetOrgPolicy()

ResetOrgPolicy resets all changes to the "org_policy" edge.

func (*PermissionMutation) ResetOrgPolicyID

func (m *PermissionMutation) ResetOrgPolicyID()

ResetOrgPolicyID resets all changes to the "org_policy_id" field.

func (*PermissionMutation) ResetPrincipalKind

func (m *PermissionMutation) ResetPrincipalKind()

ResetPrincipalKind resets all changes to the "principal_kind" field.

func (*PermissionMutation) ResetRole

func (m *PermissionMutation) ResetRole()

ResetRole resets all changes to the "role" edge.

func (*PermissionMutation) ResetRoleID

func (m *PermissionMutation) ResetRoleID()

ResetRoleID resets all changes to the "role_id" field.

func (*PermissionMutation) ResetStartAt

func (m *PermissionMutation) ResetStartAt()

ResetStartAt resets all changes to the "start_at" field.

func (*PermissionMutation) ResetStatus

func (m *PermissionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*PermissionMutation) ResetUpdatedAt

func (m *PermissionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PermissionMutation) ResetUpdatedBy

func (m *PermissionMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*PermissionMutation) ResetUser

func (m *PermissionMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*PermissionMutation) ResetUserID

func (m *PermissionMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*PermissionMutation) RoleCleared

func (m *PermissionMutation) RoleCleared() bool

RoleCleared reports if the "role" edge to the OrgRole entity was cleared.

func (*PermissionMutation) RoleID

func (m *PermissionMutation) RoleID() (r int, exists bool)

RoleID returns the value of the "role_id" field in the mutation.

func (*PermissionMutation) RoleIDCleared

func (m *PermissionMutation) RoleIDCleared() bool

RoleIDCleared returns if the "role_id" field was cleared in this mutation.

func (*PermissionMutation) RoleIDs

func (m *PermissionMutation) RoleIDs() (ids []int)

RoleIDs returns the "role" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoleID instead. It exists only for internal usage by the builders.

func (*PermissionMutation) SetCreatedAt

func (m *PermissionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PermissionMutation) SetCreatedBy

func (m *PermissionMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*PermissionMutation) SetEndAt

func (m *PermissionMutation) SetEndAt(t time.Time)

SetEndAt sets the "end_at" field.

func (*PermissionMutation) SetField

func (m *PermissionMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PermissionMutation) SetID

func (m *PermissionMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Permission entities.

func (*PermissionMutation) SetOp

func (m *PermissionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PermissionMutation) SetOrgID

func (m *PermissionMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*PermissionMutation) SetOrgPolicyID

func (m *PermissionMutation) SetOrgPolicyID(i int)

SetOrgPolicyID sets the "org_policy_id" field.

func (*PermissionMutation) SetPrincipalKind

func (m *PermissionMutation) SetPrincipalKind(pk permission.PrincipalKind)

SetPrincipalKind sets the "principal_kind" field.

func (*PermissionMutation) SetRoleID

func (m *PermissionMutation) SetRoleID(i int)

SetRoleID sets the "role_id" field.

func (*PermissionMutation) SetStartAt

func (m *PermissionMutation) SetStartAt(t time.Time)

SetStartAt sets the "start_at" field.

func (*PermissionMutation) SetStatus

func (m *PermissionMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*PermissionMutation) SetUpdatedAt

func (m *PermissionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*PermissionMutation) SetUpdatedBy

func (m *PermissionMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*PermissionMutation) SetUserID

func (m *PermissionMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*PermissionMutation) StartAt

func (m *PermissionMutation) StartAt() (r time.Time, exists bool)

StartAt returns the value of the "start_at" field in the mutation.

func (*PermissionMutation) StartAtCleared

func (m *PermissionMutation) StartAtCleared() bool

StartAtCleared returns if the "start_at" field was cleared in this mutation.

func (*PermissionMutation) Status

func (m *PermissionMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*PermissionMutation) StatusCleared

func (m *PermissionMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (PermissionMutation) Tx

func (m PermissionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PermissionMutation) Type

func (m *PermissionMutation) Type() string

Type returns the node type of this mutation (Permission).

func (*PermissionMutation) UpdatedAt

func (m *PermissionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PermissionMutation) UpdatedAtCleared

func (m *PermissionMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*PermissionMutation) UpdatedBy

func (m *PermissionMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*PermissionMutation) UpdatedByCleared

func (m *PermissionMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*PermissionMutation) UserCleared

func (m *PermissionMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*PermissionMutation) UserID

func (m *PermissionMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*PermissionMutation) UserIDCleared

func (m *PermissionMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*PermissionMutation) UserIDs

func (m *PermissionMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*PermissionMutation) Where

func (m *PermissionMutation) Where(ps ...predicate.Permission)

Where appends a list predicates to the PermissionMutation builder.

func (*PermissionMutation) WhereP

func (m *PermissionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PermissionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PermissionOrder

type PermissionOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *PermissionOrderField `json:"field"`
}

PermissionOrder defines the ordering of Permission.

type PermissionOrderField

type PermissionOrderField struct {
	// Value extracts the ordering value from the given Permission.
	Value func(*Permission) (ent.Value, error)
	// contains filtered or unexported fields
}

PermissionOrderField defines the ordering field of Permission.

func (PermissionOrderField) MarshalGQL

func (f PermissionOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (PermissionOrderField) String

func (f PermissionOrderField) String() string

String implement fmt.Stringer interface.

func (*PermissionOrderField) UnmarshalGQL

func (f *PermissionOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type PermissionPaginateOption

type PermissionPaginateOption func(*permissionPager) error

PermissionPaginateOption enables pagination customization.

func WithPermissionFilter

func WithPermissionFilter(filter func(*PermissionQuery) (*PermissionQuery, error)) PermissionPaginateOption

WithPermissionFilter configures pagination filter.

func WithPermissionOrder

func WithPermissionOrder(order *PermissionOrder) PermissionPaginateOption

WithPermissionOrder configures pagination ordering.

type PermissionQuery

type PermissionQuery struct {
	// contains filtered or unexported fields
}

PermissionQuery is the builder for querying Permission entities.

func (*PermissionQuery) Aggregate

func (pq *PermissionQuery) Aggregate(fns ...AggregateFunc) *PermissionSelect

Aggregate returns a PermissionSelect configured with the given aggregations.

func (*PermissionQuery) All

func (pq *PermissionQuery) All(ctx context.Context) ([]*Permission, error)

All executes the query and returns a list of Permissions.

func (*PermissionQuery) AllX

func (pq *PermissionQuery) AllX(ctx context.Context) []*Permission

AllX is like All, but panics if an error occurs.

func (*PermissionQuery) Clone

func (pq *PermissionQuery) Clone() *PermissionQuery

Clone returns a duplicate of the PermissionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PermissionQuery) CollectFields

func (pe *PermissionQuery) CollectFields(ctx context.Context, satisfies ...string) (*PermissionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*PermissionQuery) Count

func (pq *PermissionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PermissionQuery) CountX

func (pq *PermissionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PermissionQuery) Exist

func (pq *PermissionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PermissionQuery) ExistX

func (pq *PermissionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PermissionQuery) First

func (pq *PermissionQuery) First(ctx context.Context) (*Permission, error)

First returns the first Permission entity from the query. Returns a *NotFoundError when no Permission was found.

func (*PermissionQuery) FirstID

func (pq *PermissionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Permission ID from the query. Returns a *NotFoundError when no Permission ID was found.

func (*PermissionQuery) FirstIDX

func (pq *PermissionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PermissionQuery) FirstX

func (pq *PermissionQuery) FirstX(ctx context.Context) *Permission

FirstX is like First, but panics if an error occurs.

func (*PermissionQuery) GroupBy

func (pq *PermissionQuery) GroupBy(field string, fields ...string) *PermissionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Permission.Query().
	GroupBy(permission.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PermissionQuery) IDs

func (pq *PermissionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Permission IDs.

func (*PermissionQuery) IDsX

func (pq *PermissionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PermissionQuery) Limit

func (pq *PermissionQuery) Limit(limit int) *PermissionQuery

Limit the number of records to be returned by this query.

func (*PermissionQuery) Offset

func (pq *PermissionQuery) Offset(offset int) *PermissionQuery

Offset to start from.

func (*PermissionQuery) Only

func (pq *PermissionQuery) Only(ctx context.Context) (*Permission, error)

Only returns a single Permission entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Permission entity is found. Returns a *NotFoundError when no Permission entities are found.

func (*PermissionQuery) OnlyID

func (pq *PermissionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Permission ID in the query. Returns a *NotSingularError when more than one Permission ID is found. Returns a *NotFoundError when no entities are found.

func (*PermissionQuery) OnlyIDX

func (pq *PermissionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PermissionQuery) OnlyX

func (pq *PermissionQuery) OnlyX(ctx context.Context) *Permission

OnlyX is like Only, but panics if an error occurs.

func (*PermissionQuery) Order

Order specifies how the records should be ordered.

func (*PermissionQuery) Paginate

func (pe *PermissionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...PermissionPaginateOption,
) (*PermissionConnection, error)

Paginate executes the query and returns a relay based cursor connection to Permission.

func (*PermissionQuery) QueryOrg

func (pq *PermissionQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*PermissionQuery) QueryOrgPolicy

func (pq *PermissionQuery) QueryOrgPolicy() *OrgPolicyQuery

QueryOrgPolicy chains the current query on the "org_policy" edge.

func (*PermissionQuery) QueryRole

func (pq *PermissionQuery) QueryRole() *OrgRoleQuery

QueryRole chains the current query on the "role" edge.

func (*PermissionQuery) QueryUser

func (pq *PermissionQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*PermissionQuery) Select

func (pq *PermissionQuery) Select(fields ...string) *PermissionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.Permission.Query().
	Select(permission.FieldCreatedBy).
	Scan(ctx, &v)

func (*PermissionQuery) Unique

func (pq *PermissionQuery) Unique(unique bool) *PermissionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PermissionQuery) Where

Where adds a new predicate for the PermissionQuery builder.

func (*PermissionQuery) WithOrg

func (pq *PermissionQuery) WithOrg(opts ...func(*OrgQuery)) *PermissionQuery

WithOrg tells the query-builder to eager-load the nodes that are connected to the "org" edge. The optional arguments are used to configure the query builder of the edge.

func (*PermissionQuery) WithOrgPolicy

func (pq *PermissionQuery) WithOrgPolicy(opts ...func(*OrgPolicyQuery)) *PermissionQuery

WithOrgPolicy tells the query-builder to eager-load the nodes that are connected to the "org_policy" edge. The optional arguments are used to configure the query builder of the edge.

func (*PermissionQuery) WithRole

func (pq *PermissionQuery) WithRole(opts ...func(*OrgRoleQuery)) *PermissionQuery

WithRole tells the query-builder to eager-load the nodes that are connected to the "role" edge. The optional arguments are used to configure the query builder of the edge.

func (*PermissionQuery) WithUser

func (pq *PermissionQuery) WithUser(opts ...func(*UserQuery)) *PermissionQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type PermissionSelect

type PermissionSelect struct {
	*PermissionQuery
	// contains filtered or unexported fields
}

PermissionSelect is the builder for selecting fields of Permission entities.

func (*PermissionSelect) Aggregate

func (ps *PermissionSelect) Aggregate(fns ...AggregateFunc) *PermissionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PermissionSelect) Bool

func (s *PermissionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) BoolX

func (s *PermissionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PermissionSelect) Bools

func (s *PermissionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) BoolsX

func (s *PermissionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PermissionSelect) Float64

func (s *PermissionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) Float64X

func (s *PermissionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PermissionSelect) Float64s

func (s *PermissionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) Float64sX

func (s *PermissionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PermissionSelect) Int

func (s *PermissionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) IntX

func (s *PermissionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PermissionSelect) Ints

func (s *PermissionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) IntsX

func (s *PermissionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PermissionSelect) Scan

func (ps *PermissionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PermissionSelect) ScanX

func (s *PermissionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PermissionSelect) String

func (s *PermissionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) StringX

func (s *PermissionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PermissionSelect) Strings

func (s *PermissionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) StringsX

func (s *PermissionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PermissionUpdate

type PermissionUpdate struct {
	// contains filtered or unexported fields
}

PermissionUpdate is the builder for updating Permission entities.

func (*PermissionUpdate) AddUpdatedBy

func (pu *PermissionUpdate) AddUpdatedBy(i int) *PermissionUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*PermissionUpdate) ClearEndAt

func (pu *PermissionUpdate) ClearEndAt() *PermissionUpdate

ClearEndAt clears the value of the "end_at" field.

func (*PermissionUpdate) ClearStartAt

func (pu *PermissionUpdate) ClearStartAt() *PermissionUpdate

ClearStartAt clears the value of the "start_at" field.

func (*PermissionUpdate) ClearStatus

func (pu *PermissionUpdate) ClearStatus() *PermissionUpdate

ClearStatus clears the value of the "status" field.

func (*PermissionUpdate) ClearUpdatedAt

func (pu *PermissionUpdate) ClearUpdatedAt() *PermissionUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PermissionUpdate) ClearUpdatedBy

func (pu *PermissionUpdate) ClearUpdatedBy() *PermissionUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*PermissionUpdate) Exec

func (pu *PermissionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PermissionUpdate) ExecX

func (pu *PermissionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionUpdate) Mutation

func (pu *PermissionUpdate) Mutation() *PermissionMutation

Mutation returns the PermissionMutation object of the builder.

func (*PermissionUpdate) Save

func (pu *PermissionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PermissionUpdate) SaveX

func (pu *PermissionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PermissionUpdate) SetEndAt

func (pu *PermissionUpdate) SetEndAt(t time.Time) *PermissionUpdate

SetEndAt sets the "end_at" field.

func (*PermissionUpdate) SetInput

SetInput applies the change-set in the UpdatePermissionInput on the PermissionUpdate builder.

func (*PermissionUpdate) SetNillableEndAt

func (pu *PermissionUpdate) SetNillableEndAt(t *time.Time) *PermissionUpdate

SetNillableEndAt sets the "end_at" field if the given value is not nil.

func (*PermissionUpdate) SetNillableStartAt

func (pu *PermissionUpdate) SetNillableStartAt(t *time.Time) *PermissionUpdate

SetNillableStartAt sets the "start_at" field if the given value is not nil.

func (*PermissionUpdate) SetNillableStatus

func (pu *PermissionUpdate) SetNillableStatus(ts *typex.SimpleStatus) *PermissionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PermissionUpdate) SetNillableUpdatedAt

func (pu *PermissionUpdate) SetNillableUpdatedAt(t *time.Time) *PermissionUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PermissionUpdate) SetNillableUpdatedBy

func (pu *PermissionUpdate) SetNillableUpdatedBy(i *int) *PermissionUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*PermissionUpdate) SetStartAt

func (pu *PermissionUpdate) SetStartAt(t time.Time) *PermissionUpdate

SetStartAt sets the "start_at" field.

func (*PermissionUpdate) SetStatus

SetStatus sets the "status" field.

func (*PermissionUpdate) SetUpdatedAt

func (pu *PermissionUpdate) SetUpdatedAt(t time.Time) *PermissionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PermissionUpdate) SetUpdatedBy

func (pu *PermissionUpdate) SetUpdatedBy(i int) *PermissionUpdate

SetUpdatedBy sets the "updated_by" field.

func (*PermissionUpdate) Where

Where appends a list predicates to the PermissionUpdate builder.

type PermissionUpdateOne

type PermissionUpdateOne struct {
	// contains filtered or unexported fields
}

PermissionUpdateOne is the builder for updating a single Permission entity.

func (*PermissionUpdateOne) AddUpdatedBy

func (puo *PermissionUpdateOne) AddUpdatedBy(i int) *PermissionUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*PermissionUpdateOne) ClearEndAt

func (puo *PermissionUpdateOne) ClearEndAt() *PermissionUpdateOne

ClearEndAt clears the value of the "end_at" field.

func (*PermissionUpdateOne) ClearStartAt

func (puo *PermissionUpdateOne) ClearStartAt() *PermissionUpdateOne

ClearStartAt clears the value of the "start_at" field.

func (*PermissionUpdateOne) ClearStatus

func (puo *PermissionUpdateOne) ClearStatus() *PermissionUpdateOne

ClearStatus clears the value of the "status" field.

func (*PermissionUpdateOne) ClearUpdatedAt

func (puo *PermissionUpdateOne) ClearUpdatedAt() *PermissionUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PermissionUpdateOne) ClearUpdatedBy

func (puo *PermissionUpdateOne) ClearUpdatedBy() *PermissionUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*PermissionUpdateOne) Exec

func (puo *PermissionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PermissionUpdateOne) ExecX

func (puo *PermissionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionUpdateOne) Mutation

func (puo *PermissionUpdateOne) Mutation() *PermissionMutation

Mutation returns the PermissionMutation object of the builder.

func (*PermissionUpdateOne) Save

func (puo *PermissionUpdateOne) Save(ctx context.Context) (*Permission, error)

Save executes the query and returns the updated Permission entity.

func (*PermissionUpdateOne) SaveX

func (puo *PermissionUpdateOne) SaveX(ctx context.Context) *Permission

SaveX is like Save, but panics if an error occurs.

func (*PermissionUpdateOne) Select

func (puo *PermissionUpdateOne) Select(field string, fields ...string) *PermissionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PermissionUpdateOne) SetEndAt

SetEndAt sets the "end_at" field.

func (*PermissionUpdateOne) SetInput

SetInput applies the change-set in the UpdatePermissionInput on the PermissionUpdateOne builder.

func (*PermissionUpdateOne) SetNillableEndAt

func (puo *PermissionUpdateOne) SetNillableEndAt(t *time.Time) *PermissionUpdateOne

SetNillableEndAt sets the "end_at" field if the given value is not nil.

func (*PermissionUpdateOne) SetNillableStartAt

func (puo *PermissionUpdateOne) SetNillableStartAt(t *time.Time) *PermissionUpdateOne

SetNillableStartAt sets the "start_at" field if the given value is not nil.

func (*PermissionUpdateOne) SetNillableStatus

func (puo *PermissionUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *PermissionUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PermissionUpdateOne) SetNillableUpdatedAt

func (puo *PermissionUpdateOne) SetNillableUpdatedAt(t *time.Time) *PermissionUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PermissionUpdateOne) SetNillableUpdatedBy

func (puo *PermissionUpdateOne) SetNillableUpdatedBy(i *int) *PermissionUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*PermissionUpdateOne) SetStartAt

func (puo *PermissionUpdateOne) SetStartAt(t time.Time) *PermissionUpdateOne

SetStartAt sets the "start_at" field.

func (*PermissionUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*PermissionUpdateOne) SetUpdatedAt

func (puo *PermissionUpdateOne) SetUpdatedAt(t time.Time) *PermissionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PermissionUpdateOne) SetUpdatedBy

func (puo *PermissionUpdateOne) SetUpdatedBy(i int) *PermissionUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*PermissionUpdateOne) Where

Where appends a list predicates to the PermissionUpdate builder.

type PermissionUpsert

type PermissionUpsert struct {
	*sql.UpdateSet
}

PermissionUpsert is the "OnConflict" setter.

func (*PermissionUpsert) AddUpdatedBy

func (u *PermissionUpsert) AddUpdatedBy(v int) *PermissionUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*PermissionUpsert) ClearEndAt

func (u *PermissionUpsert) ClearEndAt() *PermissionUpsert

ClearEndAt clears the value of the "end_at" field.

func (*PermissionUpsert) ClearStartAt

func (u *PermissionUpsert) ClearStartAt() *PermissionUpsert

ClearStartAt clears the value of the "start_at" field.

func (*PermissionUpsert) ClearStatus

func (u *PermissionUpsert) ClearStatus() *PermissionUpsert

ClearStatus clears the value of the "status" field.

func (*PermissionUpsert) ClearUpdatedAt

func (u *PermissionUpsert) ClearUpdatedAt() *PermissionUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PermissionUpsert) ClearUpdatedBy

func (u *PermissionUpsert) ClearUpdatedBy() *PermissionUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*PermissionUpsert) SetEndAt

func (u *PermissionUpsert) SetEndAt(v time.Time) *PermissionUpsert

SetEndAt sets the "end_at" field.

func (*PermissionUpsert) SetStartAt

func (u *PermissionUpsert) SetStartAt(v time.Time) *PermissionUpsert

SetStartAt sets the "start_at" field.

func (*PermissionUpsert) SetStatus

SetStatus sets the "status" field.

func (*PermissionUpsert) SetUpdatedAt

func (u *PermissionUpsert) SetUpdatedAt(v time.Time) *PermissionUpsert

SetUpdatedAt sets the "updated_at" field.

func (*PermissionUpsert) SetUpdatedBy

func (u *PermissionUpsert) SetUpdatedBy(v int) *PermissionUpsert

SetUpdatedBy sets the "updated_by" field.

func (*PermissionUpsert) UpdateEndAt

func (u *PermissionUpsert) UpdateEndAt() *PermissionUpsert

UpdateEndAt sets the "end_at" field to the value that was provided on create.

func (*PermissionUpsert) UpdateStartAt

func (u *PermissionUpsert) UpdateStartAt() *PermissionUpsert

UpdateStartAt sets the "start_at" field to the value that was provided on create.

func (*PermissionUpsert) UpdateStatus

func (u *PermissionUpsert) UpdateStatus() *PermissionUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*PermissionUpsert) UpdateUpdatedAt

func (u *PermissionUpsert) UpdateUpdatedAt() *PermissionUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*PermissionUpsert) UpdateUpdatedBy

func (u *PermissionUpsert) UpdateUpdatedBy() *PermissionUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type PermissionUpsertBulk

type PermissionUpsertBulk struct {
	// contains filtered or unexported fields
}

PermissionUpsertBulk is the builder for "upsert"-ing a bulk of Permission nodes.

func (*PermissionUpsertBulk) AddUpdatedBy

func (u *PermissionUpsertBulk) AddUpdatedBy(v int) *PermissionUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*PermissionUpsertBulk) ClearEndAt

func (u *PermissionUpsertBulk) ClearEndAt() *PermissionUpsertBulk

ClearEndAt clears the value of the "end_at" field.

func (*PermissionUpsertBulk) ClearStartAt

func (u *PermissionUpsertBulk) ClearStartAt() *PermissionUpsertBulk

ClearStartAt clears the value of the "start_at" field.

func (*PermissionUpsertBulk) ClearStatus

func (u *PermissionUpsertBulk) ClearStatus() *PermissionUpsertBulk

ClearStatus clears the value of the "status" field.

func (*PermissionUpsertBulk) ClearUpdatedAt

func (u *PermissionUpsertBulk) ClearUpdatedAt() *PermissionUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PermissionUpsertBulk) ClearUpdatedBy

func (u *PermissionUpsertBulk) ClearUpdatedBy() *PermissionUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*PermissionUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PermissionUpsertBulk) Exec

Exec executes the query.

func (*PermissionUpsertBulk) ExecX

func (u *PermissionUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Permission.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PermissionUpsertBulk) SetEndAt

SetEndAt sets the "end_at" field.

func (*PermissionUpsertBulk) SetStartAt

SetStartAt sets the "start_at" field.

func (*PermissionUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*PermissionUpsertBulk) SetUpdatedAt

func (u *PermissionUpsertBulk) SetUpdatedAt(v time.Time) *PermissionUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*PermissionUpsertBulk) SetUpdatedBy

func (u *PermissionUpsertBulk) SetUpdatedBy(v int) *PermissionUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*PermissionUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PermissionCreateBulk.OnConflict documentation for more info.

func (*PermissionUpsertBulk) UpdateEndAt

func (u *PermissionUpsertBulk) UpdateEndAt() *PermissionUpsertBulk

UpdateEndAt sets the "end_at" field to the value that was provided on create.

func (*PermissionUpsertBulk) UpdateNewValues

func (u *PermissionUpsertBulk) UpdateNewValues() *PermissionUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Permission.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(permission.FieldID)
		}),
	).
	Exec(ctx)

func (*PermissionUpsertBulk) UpdateStartAt

func (u *PermissionUpsertBulk) UpdateStartAt() *PermissionUpsertBulk

UpdateStartAt sets the "start_at" field to the value that was provided on create.

func (*PermissionUpsertBulk) UpdateStatus

func (u *PermissionUpsertBulk) UpdateStatus() *PermissionUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*PermissionUpsertBulk) UpdateUpdatedAt

func (u *PermissionUpsertBulk) UpdateUpdatedAt() *PermissionUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*PermissionUpsertBulk) UpdateUpdatedBy

func (u *PermissionUpsertBulk) UpdateUpdatedBy() *PermissionUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type PermissionUpsertOne

type PermissionUpsertOne struct {
	// contains filtered or unexported fields
}

PermissionUpsertOne is the builder for "upsert"-ing

one Permission node.

func (*PermissionUpsertOne) AddUpdatedBy

func (u *PermissionUpsertOne) AddUpdatedBy(v int) *PermissionUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*PermissionUpsertOne) ClearEndAt

func (u *PermissionUpsertOne) ClearEndAt() *PermissionUpsertOne

ClearEndAt clears the value of the "end_at" field.

func (*PermissionUpsertOne) ClearStartAt

func (u *PermissionUpsertOne) ClearStartAt() *PermissionUpsertOne

ClearStartAt clears the value of the "start_at" field.

func (*PermissionUpsertOne) ClearStatus

func (u *PermissionUpsertOne) ClearStatus() *PermissionUpsertOne

ClearStatus clears the value of the "status" field.

func (*PermissionUpsertOne) ClearUpdatedAt

func (u *PermissionUpsertOne) ClearUpdatedAt() *PermissionUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PermissionUpsertOne) ClearUpdatedBy

func (u *PermissionUpsertOne) ClearUpdatedBy() *PermissionUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*PermissionUpsertOne) DoNothing

func (u *PermissionUpsertOne) DoNothing() *PermissionUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PermissionUpsertOne) Exec

Exec executes the query.

func (*PermissionUpsertOne) ExecX

func (u *PermissionUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionUpsertOne) ID

func (u *PermissionUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PermissionUpsertOne) IDX

func (u *PermissionUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*PermissionUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Permission.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PermissionUpsertOne) SetEndAt

SetEndAt sets the "end_at" field.

func (*PermissionUpsertOne) SetStartAt

SetStartAt sets the "start_at" field.

func (*PermissionUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*PermissionUpsertOne) SetUpdatedAt

func (u *PermissionUpsertOne) SetUpdatedAt(v time.Time) *PermissionUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*PermissionUpsertOne) SetUpdatedBy

func (u *PermissionUpsertOne) SetUpdatedBy(v int) *PermissionUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*PermissionUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PermissionCreate.OnConflict documentation for more info.

func (*PermissionUpsertOne) UpdateEndAt

func (u *PermissionUpsertOne) UpdateEndAt() *PermissionUpsertOne

UpdateEndAt sets the "end_at" field to the value that was provided on create.

func (*PermissionUpsertOne) UpdateNewValues

func (u *PermissionUpsertOne) UpdateNewValues() *PermissionUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Permission.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(permission.FieldID)
		}),
	).
	Exec(ctx)

func (*PermissionUpsertOne) UpdateStartAt

func (u *PermissionUpsertOne) UpdateStartAt() *PermissionUpsertOne

UpdateStartAt sets the "start_at" field to the value that was provided on create.

func (*PermissionUpsertOne) UpdateStatus

func (u *PermissionUpsertOne) UpdateStatus() *PermissionUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*PermissionUpsertOne) UpdateUpdatedAt

func (u *PermissionUpsertOne) UpdateUpdatedAt() *PermissionUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*PermissionUpsertOne) UpdateUpdatedBy

func (u *PermissionUpsertOne) UpdateUpdatedBy() *PermissionUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type PermissionWhereInput

type PermissionWhereInput struct {
	Predicates []predicate.Permission  `json:"-"`
	Not        *PermissionWhereInput   `json:"not,omitempty"`
	Or         []*PermissionWhereInput `json:"or,omitempty"`
	And        []*PermissionWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "org_id" field predicates.
	OrgID      *int  `json:"orgID,omitempty"`
	OrgIDNEQ   *int  `json:"orgIDNEQ,omitempty"`
	OrgIDIn    []int `json:"orgIDIn,omitempty"`
	OrgIDNotIn []int `json:"orgIDNotIn,omitempty"`

	// "principal_kind" field predicates.
	PrincipalKind      *permission.PrincipalKind  `json:"principalKind,omitempty"`
	PrincipalKindNEQ   *permission.PrincipalKind  `json:"principalKindNEQ,omitempty"`
	PrincipalKindIn    []permission.PrincipalKind `json:"principalKindIn,omitempty"`
	PrincipalKindNotIn []permission.PrincipalKind `json:"principalKindNotIn,omitempty"`

	// "user_id" field predicates.
	UserID       *int  `json:"userID,omitempty"`
	UserIDNEQ    *int  `json:"userIDNEQ,omitempty"`
	UserIDIn     []int `json:"userIDIn,omitempty"`
	UserIDNotIn  []int `json:"userIDNotIn,omitempty"`
	UserIDIsNil  bool  `json:"userIDIsNil,omitempty"`
	UserIDNotNil bool  `json:"userIDNotNil,omitempty"`

	// "role_id" field predicates.
	RoleID       *int  `json:"roleID,omitempty"`
	RoleIDNEQ    *int  `json:"roleIDNEQ,omitempty"`
	RoleIDIn     []int `json:"roleIDIn,omitempty"`
	RoleIDNotIn  []int `json:"roleIDNotIn,omitempty"`
	RoleIDIsNil  bool  `json:"roleIDIsNil,omitempty"`
	RoleIDNotNil bool  `json:"roleIDNotNil,omitempty"`

	// "org_policy_id" field predicates.
	OrgPolicyID      *int  `json:"orgPolicyID,omitempty"`
	OrgPolicyIDNEQ   *int  `json:"orgPolicyIDNEQ,omitempty"`
	OrgPolicyIDIn    []int `json:"orgPolicyIDIn,omitempty"`
	OrgPolicyIDNotIn []int `json:"orgPolicyIDNotIn,omitempty"`

	// "start_at" field predicates.
	StartAt       *time.Time  `json:"startAt,omitempty"`
	StartAtNEQ    *time.Time  `json:"startAtNEQ,omitempty"`
	StartAtIn     []time.Time `json:"startAtIn,omitempty"`
	StartAtNotIn  []time.Time `json:"startAtNotIn,omitempty"`
	StartAtGT     *time.Time  `json:"startAtGT,omitempty"`
	StartAtGTE    *time.Time  `json:"startAtGTE,omitempty"`
	StartAtLT     *time.Time  `json:"startAtLT,omitempty"`
	StartAtLTE    *time.Time  `json:"startAtLTE,omitempty"`
	StartAtIsNil  bool        `json:"startAtIsNil,omitempty"`
	StartAtNotNil bool        `json:"startAtNotNil,omitempty"`

	// "end_at" field predicates.
	EndAt       *time.Time  `json:"endAt,omitempty"`
	EndAtNEQ    *time.Time  `json:"endAtNEQ,omitempty"`
	EndAtIn     []time.Time `json:"endAtIn,omitempty"`
	EndAtNotIn  []time.Time `json:"endAtNotIn,omitempty"`
	EndAtGT     *time.Time  `json:"endAtGT,omitempty"`
	EndAtGTE    *time.Time  `json:"endAtGTE,omitempty"`
	EndAtLT     *time.Time  `json:"endAtLT,omitempty"`
	EndAtLTE    *time.Time  `json:"endAtLTE,omitempty"`
	EndAtIsNil  bool        `json:"endAtIsNil,omitempty"`
	EndAtNotNil bool        `json:"endAtNotNil,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`

	// "role" edge predicates.
	HasRole     *bool                `json:"hasRole,omitempty"`
	HasRoleWith []*OrgRoleWhereInput `json:"hasRoleWith,omitempty"`

	// "org_policy" edge predicates.
	HasOrgPolicy     *bool                  `json:"hasOrgPolicy,omitempty"`
	HasOrgPolicyWith []*OrgPolicyWhereInput `json:"hasOrgPolicyWith,omitempty"`
}

PermissionWhereInput represents a where input for filtering Permission queries.

func (*PermissionWhereInput) AddPredicates

func (i *PermissionWhereInput) AddPredicates(predicates ...predicate.Permission)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*PermissionWhereInput) Filter

Filter applies the PermissionWhereInput filter on the PermissionQuery builder.

func (*PermissionWhereInput) P

P returns a predicate for filtering permissions. An error is returned if the input is empty or invalid.

type Permissions

type Permissions []*Permission

Permissions is a parsable slice of Permission.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type ResolvedGlobal

type ResolvedGlobal struct{ Type, ID string }

func FromGlobalID

func FromGlobalID(s string) (*ResolvedGlobal, error)

func (*ResolvedGlobal) Int

func (r *ResolvedGlobal) Int() (int, error)

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type SimplePagination

type SimplePagination struct {
	CurrentIndex int
	PageIndex    int
}

func NewSimplePagination

func NewSimplePagination(p, c string) (sp *SimplePagination, err error)

NewSimplePagination creates a new SimplePagination from the given page and count. If both are empty, it returns nil.

func SimplePaginationFromContext

func SimplePaginationFromContext(ctx context.Context) (*SimplePagination, bool)

SimplePaginationFromContext returns the SimplePagination from the given context.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// App is the client for interacting with the App builders.
	App *AppClient
	// AppAction is the client for interacting with the AppAction builders.
	AppAction *AppActionClient
	// AppDict is the client for interacting with the AppDict builders.
	AppDict *AppDictClient
	// AppDictItem is the client for interacting with the AppDictItem builders.
	AppDictItem *AppDictItemClient
	// AppMenu is the client for interacting with the AppMenu builders.
	AppMenu *AppMenuClient
	// AppPolicy is the client for interacting with the AppPolicy builders.
	AppPolicy *AppPolicyClient
	// AppRes is the client for interacting with the AppRes builders.
	AppRes *AppResClient
	// AppRole is the client for interacting with the AppRole builders.
	AppRole *AppRoleClient
	// AppRolePolicy is the client for interacting with the AppRolePolicy builders.
	AppRolePolicy *AppRolePolicyClient
	// File is the client for interacting with the File builders.
	File *FileClient
	// FileSource is the client for interacting with the FileSource builders.
	FileSource *FileSourceClient
	// OauthClient is the client for interacting with the OauthClient builders.
	OauthClient *OauthClientClient
	// Org is the client for interacting with the Org builders.
	Org *OrgClient
	// OrgApp is the client for interacting with the OrgApp builders.
	OrgApp *OrgAppClient
	// OrgPolicy is the client for interacting with the OrgPolicy builders.
	OrgPolicy *OrgPolicyClient
	// OrgRole is the client for interacting with the OrgRole builders.
	OrgRole *OrgRoleClient
	// OrgRoleUser is the client for interacting with the OrgRoleUser builders.
	OrgRoleUser *OrgRoleUserClient
	// OrgUser is the client for interacting with the OrgUser builders.
	OrgUser *OrgUserClient
	// OrgUserPreference is the client for interacting with the OrgUserPreference builders.
	OrgUserPreference *OrgUserPreferenceClient
	// Permission is the client for interacting with the Permission builders.
	Permission *PermissionClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserDevice is the client for interacting with the UserDevice builders.
	UserDevice *UserDeviceClient
	// UserIdentity is the client for interacting with the UserIdentity builders.
	UserIdentity *UserIdentityClient
	// UserLoginProfile is the client for interacting with the UserLoginProfile builders.
	UserLoginProfile *UserLoginProfileClient
	// UserPassword is the client for interacting with the UserPassword builders.
	UserPassword *UserPasswordClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type UpdateAppActionInput

type UpdateAppActionInput struct {
	Name          *string
	Kind          *appaction.Kind
	Method        *appaction.Method
	ClearComments bool
	Comments      *string
	ClearMenus    bool
	AddMenuIDs    []int
	RemoveMenuIDs []int
}

UpdateAppActionInput represents a mutation input for updating appactions.

func (*UpdateAppActionInput) Mutate

Mutate applies the UpdateAppActionInput on the AppActionMutation builder.

type UpdateAppDictInput

type UpdateAppDictInput struct {
	Name          *string
	ClearComments bool
	Comments      *string
	ClearItems    bool
	AddItemIDs    []int
	RemoveItemIDs []int
}

UpdateAppDictInput represents a mutation input for updating appdicts.

func (*UpdateAppDictInput) Mutate

func (i *UpdateAppDictInput) Mutate(m *AppDictMutation)

Mutate applies the UpdateAppDictInput on the AppDictMutation builder.

type UpdateAppDictItemInput

type UpdateAppDictItemInput struct {
	Name          *string
	ClearComments bool
	Comments      *string
	ClearStatus   bool
	Status        *typex.SimpleStatus
}

UpdateAppDictItemInput represents a mutation input for updating appdictitems.

func (*UpdateAppDictItemInput) Mutate

Mutate applies the UpdateAppDictItemInput on the AppDictItemMutation builder.

type UpdateAppInput

type UpdateAppInput struct {
	Name                      *string
	Kind                      *app.Kind
	ClearRedirectURI          bool
	RedirectURI               *string
	ClearAppKey               bool
	AppKey                    *string
	ClearAppSecret            bool
	AppSecret                 *string
	ClearScopes               bool
	Scopes                    *string
	ClearTokenValidity        bool
	TokenValidity             *int32
	ClearRefreshTokenValidity bool
	RefreshTokenValidity      *int32
	ClearLogoFileID           bool
	LogoFileID                *int
	ClearComments             bool
	Comments                  *string
	ClearStatus               bool
	Status                    *typex.SimpleStatus
	ClearMenus                bool
	AddMenuIDs                []int
	RemoveMenuIDs             []int
	ClearActions              bool
	AddActionIDs              []int
	RemoveActionIDs           []int
	ClearResources            bool
	AddResourceIDs            []int
	RemoveResourceIDs         []int
	ClearRoles                bool
	AddRoleIDs                []int
	RemoveRoleIDs             []int
	ClearPolicies             bool
	AddPolicyIDs              []int
	RemovePolicyIDs           []int
	ClearDicts                bool
	AddDictIDs                []int
	RemoveDictIDs             []int
}

UpdateAppInput represents a mutation input for updating apps.

func (*UpdateAppInput) Mutate

func (i *UpdateAppInput) Mutate(m *AppMutation)

Mutate applies the UpdateAppInput on the AppMutation builder.

type UpdateAppMenuInput

type UpdateAppMenuInput struct {
	ParentID      *int
	Kind          *appmenu.Kind
	Name          *string
	ClearIcon     bool
	Icon          *string
	ClearRoute    bool
	Route         *string
	ClearComments bool
	Comments      *string
	ClearAction   bool
	ActionID      *int
}

UpdateAppMenuInput represents a mutation input for updating appmenus.

func (*UpdateAppMenuInput) Mutate

func (i *UpdateAppMenuInput) Mutate(m *AppMenuMutation)

Mutate applies the UpdateAppMenuInput on the AppMenuMutation builder.

type UpdateAppPolicyInput

type UpdateAppPolicyInput struct {
	Name          *string
	ClearComments bool
	Comments      *string
	Rules         []*types.PolicyRule
	AppendRules   []*types.PolicyRule
	AutoGrant     *bool
	ClearStatus   bool
	Status        *typex.SimpleStatus
	ClearRoles    bool
	AddRoleIDs    []int
	RemoveRoleIDs []int
}

UpdateAppPolicyInput represents a mutation input for updating apppolicies.

func (*UpdateAppPolicyInput) Mutate

Mutate applies the UpdateAppPolicyInput on the AppPolicyMutation builder.

type UpdateAppResInput

type UpdateAppResInput struct {
	Name *string
}

UpdateAppResInput represents a mutation input for updating appresslice.

func (*UpdateAppResInput) Mutate

func (i *UpdateAppResInput) Mutate(m *AppResMutation)

Mutate applies the UpdateAppResInput on the AppResMutation builder.

type UpdateAppRoleInput

type UpdateAppRoleInput struct {
	Name          *string
	ClearComments bool
	Comments      *string
	AutoGrant     *bool
	Editable      *bool
}

UpdateAppRoleInput represents a mutation input for updating approles.

func (*UpdateAppRoleInput) Mutate

func (i *UpdateAppRoleInput) Mutate(m *AppRoleMutation)

Mutate applies the UpdateAppRoleInput on the AppRoleMutation builder.

type UpdateFileSourceInput

type UpdateFileSourceInput struct {
	Kind          *filesource.Kind
	ClearComments bool
	Comments      *string
	ClearEndpoint bool
	Endpoint      *string
	ClearRegion   bool
	Region        *string
	ClearBucket   bool
	Bucket        *string
	ClearFiles    bool
	AddFileIDs    []int
	RemoveFileIDs []int
}

UpdateFileSourceInput represents a mutation input for updating filesources.

func (*UpdateFileSourceInput) Mutate

Mutate applies the UpdateFileSourceInput on the FileSourceMutation builder.

type UpdateOauthClientInput

type UpdateOauthClientInput struct {
	Name       *string
	GrantTypes *oauthclient.GrantTypes
	UserID     *int
}

UpdateOauthClientInput represents a mutation input for updating oauthclients.

func (*UpdateOauthClientInput) Mutate

Mutate applies the UpdateOauthClientInput on the OauthClientMutation builder.

type UpdateOrgInput

type UpdateOrgInput struct {
	ClearDomain            bool
	Domain                 *string
	Name                   *string
	ClearProfile           bool
	Profile                *string
	ClearStatus            bool
	Status                 *typex.SimpleStatus
	ClearCountryCode       bool
	CountryCode            *string
	ClearTimezone          bool
	Timezone               *string
	ParentID               *int
	ClearChildren          bool
	AddChildIDs            []int
	RemoveChildIDs         []int
	ClearOwner             bool
	OwnerID                *int
	ClearUsers             bool
	AddUserIDs             []int
	RemoveUserIDs          []int
	ClearRolesAndGroups    bool
	AddRolesAndGroupIDs    []int
	RemoveRolesAndGroupIDs []int
	ClearPermissions       bool
	AddPermissionIDs       []int
	RemovePermissionIDs    []int
	ClearPolicies          bool
	AddPolicyIDs           []int
	RemovePolicyIDs        []int
	ClearApps              bool
	AddAppIDs              []int
	RemoveAppIDs           []int
}

UpdateOrgInput represents a mutation input for updating orgs.

func (*UpdateOrgInput) Mutate

func (i *UpdateOrgInput) Mutate(m *OrgMutation)

Mutate applies the UpdateOrgInput on the OrgMutation builder.

type UpdateOrgPolicyInput

type UpdateOrgPolicyInput struct {
	ClearAppPolicyID    bool
	AppPolicyID         *int
	Name                *string
	ClearComments       bool
	Comments            *string
	Rules               []*types.PolicyRule
	AppendRules         []*types.PolicyRule
	ClearPermissions    bool
	AddPermissionIDs    []int
	RemovePermissionIDs []int
}

UpdateOrgPolicyInput represents a mutation input for updating orgpolicies.

func (*UpdateOrgPolicyInput) Mutate

Mutate applies the UpdateOrgPolicyInput on the OrgPolicyMutation builder.

type UpdateOrgRoleInput

type UpdateOrgRoleInput struct {
	Kind          *orgrole.Kind
	Name          *string
	ClearComments bool
	Comments      *string
}

UpdateOrgRoleInput represents a mutation input for updating orgroles.

func (*UpdateOrgRoleInput) Mutate

func (i *UpdateOrgRoleInput) Mutate(m *OrgRoleMutation)

Mutate applies the UpdateOrgRoleInput on the OrgRoleMutation builder.

type UpdateOrgUserInput

type UpdateOrgUserInput struct {
	JoinedAt    *time.Time
	DisplayName *string
	OrgID       *int
	UserID      *int
}

UpdateOrgUserInput represents a mutation input for updating orgusers.

func (*UpdateOrgUserInput) Mutate

func (i *UpdateOrgUserInput) Mutate(m *OrgUserMutation)

Mutate applies the UpdateOrgUserInput on the OrgUserMutation builder.

type UpdateOrgUserPreferenceInput

type UpdateOrgUserPreferenceInput struct {
	ClearMenuFavorite  bool
	MenuFavorite       []int
	AppendMenuFavorite []int
	ClearMenuRecent    bool
	MenuRecent         []int
	AppendMenuRecent   []int
}

UpdateOrgUserPreferenceInput represents a mutation input for updating orguserpreferences.

func (*UpdateOrgUserPreferenceInput) Mutate

Mutate applies the UpdateOrgUserPreferenceInput on the OrgUserPreferenceMutation builder.

type UpdatePermissionInput

type UpdatePermissionInput struct {
	ClearStartAt bool
	StartAt      *time.Time
	ClearEndAt   bool
	EndAt        *time.Time
	ClearStatus  bool
	Status       *typex.SimpleStatus
}

UpdatePermissionInput represents a mutation input for updating permissions.

func (*UpdatePermissionInput) Mutate

Mutate applies the UpdatePermissionInput on the PermissionMutation builder.

type UpdateUserIdentityInput

type UpdateUserIdentityInput struct {
	Kind            *useridentity.Kind
	ClearCode       bool
	Code            *string
	ClearCodeExtend bool
	CodeExtend      *string
	ClearStatus     bool
	Status          *typex.SimpleStatus
}

UpdateUserIdentityInput represents a mutation input for updating useridentities.

func (*UpdateUserIdentityInput) Mutate

Mutate applies the UpdateUserIdentityInput on the UserIdentityMutation builder.

type UpdateUserInput

type UpdateUserInput struct {
	PrincipalName     *string
	DisplayName       *string
	ClearEmail        bool
	Email             *string
	ClearMobile       bool
	Mobile            *string
	ClearComments     bool
	Comments          *string
	ClearAvatarFileID bool
	AvatarFileID      *int
}

UpdateUserInput represents a mutation input for updating users.

func (*UpdateUserInput) Mutate

func (i *UpdateUserInput) Mutate(m *UserMutation)

Mutate applies the UpdateUserInput on the UserMutation builder.

type UpdateUserLoginProfileInput

type UpdateUserLoginProfileInput struct {
	ClearCanLogin      bool
	CanLogin           *bool
	SetKind            *userloginprofile.SetKind
	ClearPasswordReset bool
	PasswordReset      *bool
	VerifyDevice       *bool
}

UpdateUserLoginProfileInput represents a mutation input for updating userloginprofiles.

func (*UpdateUserLoginProfileInput) Mutate

Mutate applies the UpdateUserLoginProfileInput on the UserLoginProfileMutation builder.

type UpdateUserPasswordInput

type UpdateUserPasswordInput struct {
	Scene         *userpassword.Scene
	ClearPassword bool
	Password      *string
	ClearStatus   bool
	Status        *typex.SimpleStatus
}

UpdateUserPasswordInput represents a mutation input for updating userpasswords.

func (*UpdateUserPasswordInput) Mutate

Mutate applies the UpdateUserPasswordInput on the UserPasswordMutation builder.

type User

type User struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// 登陆名称
	PrincipalName string `json:"principal_name,omitempty"`
	// 显示名
	DisplayName string `json:"display_name,omitempty"`
	// 邮箱
	Email string `json:"email,omitempty"`
	// 手机
	Mobile string `json:"mobile,omitempty"`
	// 用户类型
	UserType user.UserType `json:"user_type,omitempty"`
	// 创建类型,邀请,注册,手工创建
	CreationType user.CreationType `json:"creation_type,omitempty"`
	// 注册时IP
	RegisterIP *string `json:"register_ip,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 头像,存储路规则:/{appcode}/{tid}/xxx
	AvatarFileID int `json:"avatar_file_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) Devices

func (u *User) Devices(ctx context.Context) (result []*UserDevice, err error)

func (*User) GlobalID

func (u *User) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given User node.

func (*User) Identities

func (u *User) Identities(ctx context.Context) (result []*UserIdentity, err error)

func (*User) IsNode

func (*User) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*User) LoginProfile

func (u *User) LoginProfile(ctx context.Context) (*UserLoginProfile, error)

func (*User) NamedDevices

func (u *User) NamedDevices(name string) ([]*UserDevice, error)

NamedDevices returns the Devices named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) NamedIdentities

func (u *User) NamedIdentities(name string) ([]*UserIdentity, error)

NamedIdentities returns the Identities named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) NamedOauthClients

func (u *User) NamedOauthClients(name string) ([]*OauthClient, error)

NamedOauthClients returns the OauthClients named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) NamedOrgUser

func (u *User) NamedOrgUser(name string) ([]*OrgUser, error)

NamedOrgUser returns the OrgUser named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) NamedOrgs

func (u *User) NamedOrgs(name string) ([]*Org, error)

NamedOrgs returns the Orgs named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) NamedPasswords

func (u *User) NamedPasswords(name string) ([]*UserPassword, error)

NamedPasswords returns the Passwords named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) NamedPermissions

func (u *User) NamedPermissions(name string) ([]*Permission, error)

NamedPermissions returns the Permissions named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) OauthClients

func (u *User) OauthClients(ctx context.Context) (result []*OauthClient, err error)

func (*User) Permissions

func (u *User) Permissions(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *PermissionOrder, where *PermissionWhereInput,
) (*PermissionConnection, error)

func (*User) QueryDevices

func (u *User) QueryDevices() *UserDeviceQuery

QueryDevices queries the "devices" edge of the User entity.

func (*User) QueryIdentities

func (u *User) QueryIdentities() *UserIdentityQuery

QueryIdentities queries the "identities" edge of the User entity.

func (*User) QueryLoginProfile

func (u *User) QueryLoginProfile() *UserLoginProfileQuery

QueryLoginProfile queries the "login_profile" edge of the User entity.

func (*User) QueryOauthClients

func (u *User) QueryOauthClients() *OauthClientQuery

QueryOauthClients queries the "oauth_clients" edge of the User entity.

func (*User) QueryOrgUser

func (u *User) QueryOrgUser() *OrgUserQuery

QueryOrgUser queries the "org_user" edge of the User entity.

func (*User) QueryOrgs

func (u *User) QueryOrgs() *OrgQuery

QueryOrgs queries the "orgs" edge of the User entity.

func (*User) QueryPasswords

func (u *User) QueryPasswords() *UserPasswordQuery

QueryPasswords queries the "passwords" edge of the User entity.

func (*User) QueryPermissions

func (u *User) QueryPermissions() *PermissionQuery

QueryPermissions queries the "permissions" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) ToEdge

func (u *User) ToEdge(order *UserOrder) *UserEdge

ToEdge converts User into UserEdge.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryDevices

func (c *UserClient) QueryDevices(u *User) *UserDeviceQuery

QueryDevices queries the devices edge of a User.

func (*UserClient) QueryIdentities

func (c *UserClient) QueryIdentities(u *User) *UserIdentityQuery

QueryIdentities queries the identities edge of a User.

func (*UserClient) QueryLoginProfile

func (c *UserClient) QueryLoginProfile(u *User) *UserLoginProfileQuery

QueryLoginProfile queries the login_profile edge of a User.

func (*UserClient) QueryOauthClients

func (c *UserClient) QueryOauthClients(u *User) *OauthClientQuery

QueryOauthClients queries the oauth_clients edge of a User.

func (*UserClient) QueryOrgUser

func (c *UserClient) QueryOrgUser(u *User) *OrgUserQuery

QueryOrgUser queries the org_user edge of a User.

func (*UserClient) QueryOrgs

func (c *UserClient) QueryOrgs(u *User) *OrgQuery

QueryOrgs queries the orgs edge of a User.

func (*UserClient) QueryPasswords

func (c *UserClient) QueryPasswords(u *User) *UserPasswordQuery

QueryPasswords queries the passwords edge of a User.

func (*UserClient) QueryPermissions

func (c *UserClient) QueryPermissions(u *User) *PermissionQuery

QueryPermissions queries the permissions edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserConnection

type UserConnection struct {
	Edges      []*UserEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

UserConnection is the connection containing edges to User.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddDeviceIDs

func (uc *UserCreate) AddDeviceIDs(ids ...int) *UserCreate

AddDeviceIDs adds the "devices" edge to the UserDevice entity by IDs.

func (*UserCreate) AddDevices

func (uc *UserCreate) AddDevices(u ...*UserDevice) *UserCreate

AddDevices adds the "devices" edges to the UserDevice entity.

func (*UserCreate) AddIdentities

func (uc *UserCreate) AddIdentities(u ...*UserIdentity) *UserCreate

AddIdentities adds the "identities" edges to the UserIdentity entity.

func (*UserCreate) AddIdentityIDs

func (uc *UserCreate) AddIdentityIDs(ids ...int) *UserCreate

AddIdentityIDs adds the "identities" edge to the UserIdentity entity by IDs.

func (*UserCreate) AddOauthClientIDs

func (uc *UserCreate) AddOauthClientIDs(ids ...int) *UserCreate

AddOauthClientIDs adds the "oauth_clients" edge to the OauthClient entity by IDs.

func (*UserCreate) AddOauthClients

func (uc *UserCreate) AddOauthClients(o ...*OauthClient) *UserCreate

AddOauthClients adds the "oauth_clients" edges to the OauthClient entity.

func (*UserCreate) AddOrgIDs

func (uc *UserCreate) AddOrgIDs(ids ...int) *UserCreate

AddOrgIDs adds the "orgs" edge to the Org entity by IDs.

func (*UserCreate) AddOrgUser

func (uc *UserCreate) AddOrgUser(o ...*OrgUser) *UserCreate

AddOrgUser adds the "org_user" edges to the OrgUser entity.

func (*UserCreate) AddOrgUserIDs

func (uc *UserCreate) AddOrgUserIDs(ids ...int) *UserCreate

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by IDs.

func (*UserCreate) AddOrgs

func (uc *UserCreate) AddOrgs(o ...*Org) *UserCreate

AddOrgs adds the "orgs" edges to the Org entity.

func (*UserCreate) AddPasswordIDs

func (uc *UserCreate) AddPasswordIDs(ids ...int) *UserCreate

AddPasswordIDs adds the "passwords" edge to the UserPassword entity by IDs.

func (*UserCreate) AddPasswords

func (uc *UserCreate) AddPasswords(u ...*UserPassword) *UserCreate

AddPasswords adds the "passwords" edges to the UserPassword entity.

func (*UserCreate) AddPermissionIDs

func (uc *UserCreate) AddPermissionIDs(ids ...int) *UserCreate

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*UserCreate) AddPermissions

func (uc *UserCreate) AddPermissions(p ...*Permission) *UserCreate

AddPermissions adds the "permissions" edges to the Permission entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetAvatarFileID

func (uc *UserCreate) SetAvatarFileID(i int) *UserCreate

SetAvatarFileID sets the "avatar_file_id" field.

func (*UserCreate) SetComments

func (uc *UserCreate) SetComments(s string) *UserCreate

SetComments sets the "comments" field.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetCreatedBy

func (uc *UserCreate) SetCreatedBy(i int) *UserCreate

SetCreatedBy sets the "created_by" field.

func (*UserCreate) SetCreationType

func (uc *UserCreate) SetCreationType(ut user.CreationType) *UserCreate

SetCreationType sets the "creation_type" field.

func (*UserCreate) SetDeletedAt

func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate

SetDeletedAt sets the "deleted_at" field.

func (*UserCreate) SetDisplayName

func (uc *UserCreate) SetDisplayName(s string) *UserCreate

SetDisplayName sets the "display_name" field.

func (*UserCreate) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(i int) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetInput

func (c *UserCreate) SetInput(i CreateUserInput) *UserCreate

SetInput applies the change-set in the CreateUserInput on the UserCreate builder.

func (*UserCreate) SetLoginProfile

func (uc *UserCreate) SetLoginProfile(u *UserLoginProfile) *UserCreate

SetLoginProfile sets the "login_profile" edge to the UserLoginProfile entity.

func (*UserCreate) SetLoginProfileID

func (uc *UserCreate) SetLoginProfileID(id int) *UserCreate

SetLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by ID.

func (*UserCreate) SetMobile

func (uc *UserCreate) SetMobile(s string) *UserCreate

SetMobile sets the "mobile" field.

func (*UserCreate) SetNillableAvatarFileID

func (uc *UserCreate) SetNillableAvatarFileID(i *int) *UserCreate

SetNillableAvatarFileID sets the "avatar_file_id" field if the given value is not nil.

func (*UserCreate) SetNillableComments

func (uc *UserCreate) SetNillableComments(s *string) *UserCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableDeletedAt

func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*UserCreate) SetNillableEmail

func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserCreate) SetNillableID

func (uc *UserCreate) SetNillableID(i *int) *UserCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UserCreate) SetNillableLoginProfileID

func (uc *UserCreate) SetNillableLoginProfileID(id *int) *UserCreate

SetNillableLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by ID if the given value is not nil.

func (*UserCreate) SetNillableMobile

func (uc *UserCreate) SetNillableMobile(s *string) *UserCreate

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserCreate) SetNillableStatus

func (uc *UserCreate) SetNillableStatus(ts *typex.SimpleStatus) *UserCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedBy

func (uc *UserCreate) SetNillableUpdatedBy(i *int) *UserCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserCreate) SetPrincipalName

func (uc *UserCreate) SetPrincipalName(s string) *UserCreate

SetPrincipalName sets the "principal_name" field.

func (*UserCreate) SetRegisterIP

func (uc *UserCreate) SetRegisterIP(s string) *UserCreate

SetRegisterIP sets the "register_ip" field.

func (*UserCreate) SetStatus

func (uc *UserCreate) SetStatus(ts typex.SimpleStatus) *UserCreate

SetStatus sets the "status" field.

func (*UserCreate) SetUpdatedAt

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserCreate) SetUpdatedBy

func (uc *UserCreate) SetUpdatedBy(i int) *UserCreate

SetUpdatedBy sets the "updated_by" field.

func (*UserCreate) SetUserType

func (uc *UserCreate) SetUserType(ut user.UserType) *UserCreate

SetUserType sets the "user_type" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserDevice

type UserDevice struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID int `json:"user_id,omitempty"`
	// 设备唯一ID
	DeviceUID string `json:"device_uid,omitempty"`
	// DeviceName holds the value of the "device_name" field.
	DeviceName string `json:"device_name,omitempty"`
	// SystemName holds the value of the "system_name" field.
	SystemName string `json:"system_name,omitempty"`
	// SystemVersion holds the value of the "system_version" field.
	SystemVersion string `json:"system_version,omitempty"`
	// AppVersion holds the value of the "app_version" field.
	AppVersion string `json:"app_version,omitempty"`
	// DeviceModel holds the value of the "device_model" field.
	DeviceModel string `json:"device_model,omitempty"`
	// 状态,可用或不可用及其他待确认状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserDeviceQuery when eager-loading is set.
	Edges UserDeviceEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserDevice is the model entity for the UserDevice schema.

func (*UserDevice) GlobalID

func (ud *UserDevice) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given UserDevice node.

func (*UserDevice) IsNode

func (*UserDevice) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*UserDevice) QueryUser

func (ud *UserDevice) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserDevice entity.

func (*UserDevice) String

func (ud *UserDevice) String() string

String implements the fmt.Stringer.

func (*UserDevice) ToEdge

func (ud *UserDevice) ToEdge(order *UserDeviceOrder) *UserDeviceEdge

ToEdge converts UserDevice into UserDeviceEdge.

func (*UserDevice) Unwrap

func (ud *UserDevice) Unwrap() *UserDevice

Unwrap unwraps the UserDevice entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*UserDevice) Update

func (ud *UserDevice) Update() *UserDeviceUpdateOne

Update returns a builder for updating this UserDevice. Note that you need to call UserDevice.Unwrap() before calling this method if this UserDevice was returned from a transaction, and the transaction was committed or rolled back.

func (*UserDevice) User

func (ud *UserDevice) User(ctx context.Context) (*User, error)

func (*UserDevice) Value

func (ud *UserDevice) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserDevice. This includes values selected through modifiers, order, etc.

type UserDeviceClient

type UserDeviceClient struct {
	// contains filtered or unexported fields
}

UserDeviceClient is a client for the UserDevice schema.

func NewUserDeviceClient

func NewUserDeviceClient(c config) *UserDeviceClient

NewUserDeviceClient returns a client for the UserDevice from the given config.

func (*UserDeviceClient) Create

func (c *UserDeviceClient) Create() *UserDeviceCreate

Create returns a builder for creating a UserDevice entity.

func (*UserDeviceClient) CreateBulk

func (c *UserDeviceClient) CreateBulk(builders ...*UserDeviceCreate) *UserDeviceCreateBulk

CreateBulk returns a builder for creating a bulk of UserDevice entities.

func (*UserDeviceClient) Delete

func (c *UserDeviceClient) Delete() *UserDeviceDelete

Delete returns a delete builder for UserDevice.

func (*UserDeviceClient) DeleteOne

func (c *UserDeviceClient) DeleteOne(ud *UserDevice) *UserDeviceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserDeviceClient) DeleteOneID

func (c *UserDeviceClient) DeleteOneID(id int) *UserDeviceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserDeviceClient) Get

func (c *UserDeviceClient) Get(ctx context.Context, id int) (*UserDevice, error)

Get returns a UserDevice entity by its id.

func (*UserDeviceClient) GetX

func (c *UserDeviceClient) GetX(ctx context.Context, id int) *UserDevice

GetX is like Get, but panics if an error occurs.

func (*UserDeviceClient) Hooks

func (c *UserDeviceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserDeviceClient) Intercept

func (c *UserDeviceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userdevice.Intercept(f(g(h())))`.

func (*UserDeviceClient) Interceptors

func (c *UserDeviceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserDeviceClient) MapCreateBulk

func (c *UserDeviceClient) MapCreateBulk(slice any, setFunc func(*UserDeviceCreate, int)) *UserDeviceCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserDeviceClient) Query

func (c *UserDeviceClient) Query() *UserDeviceQuery

Query returns a query builder for UserDevice.

func (*UserDeviceClient) QueryUser

func (c *UserDeviceClient) QueryUser(ud *UserDevice) *UserQuery

QueryUser queries the user edge of a UserDevice.

func (*UserDeviceClient) Update

func (c *UserDeviceClient) Update() *UserDeviceUpdate

Update returns an update builder for UserDevice.

func (*UserDeviceClient) UpdateOne

func (c *UserDeviceClient) UpdateOne(ud *UserDevice) *UserDeviceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserDeviceClient) UpdateOneID

func (c *UserDeviceClient) UpdateOneID(id int) *UserDeviceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserDeviceClient) Use

func (c *UserDeviceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userdevice.Hooks(f(g(h())))`.

type UserDeviceConnection

type UserDeviceConnection struct {
	Edges      []*UserDeviceEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

UserDeviceConnection is the connection containing edges to UserDevice.

type UserDeviceCreate

type UserDeviceCreate struct {
	// contains filtered or unexported fields
}

UserDeviceCreate is the builder for creating a UserDevice entity.

func (*UserDeviceCreate) Exec

func (udc *UserDeviceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserDeviceCreate) ExecX

func (udc *UserDeviceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceCreate) Mutation

func (udc *UserDeviceCreate) Mutation() *UserDeviceMutation

Mutation returns the UserDeviceMutation object of the builder.

func (*UserDeviceCreate) OnConflict

func (udc *UserDeviceCreate) OnConflict(opts ...sql.ConflictOption) *UserDeviceUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserDevice.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserDeviceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserDeviceCreate) OnConflictColumns

func (udc *UserDeviceCreate) OnConflictColumns(columns ...string) *UserDeviceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserDevice.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserDeviceCreate) Save

func (udc *UserDeviceCreate) Save(ctx context.Context) (*UserDevice, error)

Save creates the UserDevice in the database.

func (*UserDeviceCreate) SaveX

func (udc *UserDeviceCreate) SaveX(ctx context.Context) *UserDevice

SaveX calls Save and panics if Save returns an error.

func (*UserDeviceCreate) SetAppVersion

func (udc *UserDeviceCreate) SetAppVersion(s string) *UserDeviceCreate

SetAppVersion sets the "app_version" field.

func (*UserDeviceCreate) SetComments

func (udc *UserDeviceCreate) SetComments(s string) *UserDeviceCreate

SetComments sets the "comments" field.

func (*UserDeviceCreate) SetCreatedAt

func (udc *UserDeviceCreate) SetCreatedAt(t time.Time) *UserDeviceCreate

SetCreatedAt sets the "created_at" field.

func (*UserDeviceCreate) SetCreatedBy

func (udc *UserDeviceCreate) SetCreatedBy(i int) *UserDeviceCreate

SetCreatedBy sets the "created_by" field.

func (*UserDeviceCreate) SetDeviceModel

func (udc *UserDeviceCreate) SetDeviceModel(s string) *UserDeviceCreate

SetDeviceModel sets the "device_model" field.

func (*UserDeviceCreate) SetDeviceName

func (udc *UserDeviceCreate) SetDeviceName(s string) *UserDeviceCreate

SetDeviceName sets the "device_name" field.

func (*UserDeviceCreate) SetDeviceUID

func (udc *UserDeviceCreate) SetDeviceUID(s string) *UserDeviceCreate

SetDeviceUID sets the "device_uid" field.

func (*UserDeviceCreate) SetID

func (udc *UserDeviceCreate) SetID(i int) *UserDeviceCreate

SetID sets the "id" field.

func (*UserDeviceCreate) SetNillableAppVersion

func (udc *UserDeviceCreate) SetNillableAppVersion(s *string) *UserDeviceCreate

SetNillableAppVersion sets the "app_version" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableComments

func (udc *UserDeviceCreate) SetNillableComments(s *string) *UserDeviceCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableCreatedAt

func (udc *UserDeviceCreate) SetNillableCreatedAt(t *time.Time) *UserDeviceCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableDeviceModel

func (udc *UserDeviceCreate) SetNillableDeviceModel(s *string) *UserDeviceCreate

SetNillableDeviceModel sets the "device_model" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableDeviceName

func (udc *UserDeviceCreate) SetNillableDeviceName(s *string) *UserDeviceCreate

SetNillableDeviceName sets the "device_name" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableStatus

func (udc *UserDeviceCreate) SetNillableStatus(ts *typex.SimpleStatus) *UserDeviceCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableSystemName

func (udc *UserDeviceCreate) SetNillableSystemName(s *string) *UserDeviceCreate

SetNillableSystemName sets the "system_name" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableSystemVersion

func (udc *UserDeviceCreate) SetNillableSystemVersion(s *string) *UserDeviceCreate

SetNillableSystemVersion sets the "system_version" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableUpdatedAt

func (udc *UserDeviceCreate) SetNillableUpdatedAt(t *time.Time) *UserDeviceCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableUpdatedBy

func (udc *UserDeviceCreate) SetNillableUpdatedBy(i *int) *UserDeviceCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserDeviceCreate) SetNillableUserID

func (udc *UserDeviceCreate) SetNillableUserID(i *int) *UserDeviceCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*UserDeviceCreate) SetStatus

SetStatus sets the "status" field.

func (*UserDeviceCreate) SetSystemName

func (udc *UserDeviceCreate) SetSystemName(s string) *UserDeviceCreate

SetSystemName sets the "system_name" field.

func (*UserDeviceCreate) SetSystemVersion

func (udc *UserDeviceCreate) SetSystemVersion(s string) *UserDeviceCreate

SetSystemVersion sets the "system_version" field.

func (*UserDeviceCreate) SetUpdatedAt

func (udc *UserDeviceCreate) SetUpdatedAt(t time.Time) *UserDeviceCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserDeviceCreate) SetUpdatedBy

func (udc *UserDeviceCreate) SetUpdatedBy(i int) *UserDeviceCreate

SetUpdatedBy sets the "updated_by" field.

func (*UserDeviceCreate) SetUser

func (udc *UserDeviceCreate) SetUser(u *User) *UserDeviceCreate

SetUser sets the "user" edge to the User entity.

func (*UserDeviceCreate) SetUserID

func (udc *UserDeviceCreate) SetUserID(i int) *UserDeviceCreate

SetUserID sets the "user_id" field.

type UserDeviceCreateBulk

type UserDeviceCreateBulk struct {
	// contains filtered or unexported fields
}

UserDeviceCreateBulk is the builder for creating many UserDevice entities in bulk.

func (*UserDeviceCreateBulk) Exec

func (udcb *UserDeviceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserDeviceCreateBulk) ExecX

func (udcb *UserDeviceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceCreateBulk) OnConflict

func (udcb *UserDeviceCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserDeviceUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserDevice.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserDeviceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserDeviceCreateBulk) OnConflictColumns

func (udcb *UserDeviceCreateBulk) OnConflictColumns(columns ...string) *UserDeviceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserDevice.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserDeviceCreateBulk) Save

func (udcb *UserDeviceCreateBulk) Save(ctx context.Context) ([]*UserDevice, error)

Save creates the UserDevice entities in the database.

func (*UserDeviceCreateBulk) SaveX

func (udcb *UserDeviceCreateBulk) SaveX(ctx context.Context) []*UserDevice

SaveX is like Save, but panics if an error occurs.

type UserDeviceDelete

type UserDeviceDelete struct {
	// contains filtered or unexported fields
}

UserDeviceDelete is the builder for deleting a UserDevice entity.

func (*UserDeviceDelete) Exec

func (udd *UserDeviceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDeviceDelete) ExecX

func (udd *UserDeviceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceDelete) Where

Where appends a list predicates to the UserDeviceDelete builder.

type UserDeviceDeleteOne

type UserDeviceDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeviceDeleteOne is the builder for deleting a single UserDevice entity.

func (*UserDeviceDeleteOne) Exec

func (uddo *UserDeviceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeviceDeleteOne) ExecX

func (uddo *UserDeviceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceDeleteOne) Where

Where appends a list predicates to the UserDeviceDelete builder.

type UserDeviceEdge

type UserDeviceEdge struct {
	Node   *UserDevice `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

UserDeviceEdge is the edge representation of UserDevice.

type UserDeviceEdges

type UserDeviceEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

UserDeviceEdges holds the relations/edges for other nodes in the graph.

func (UserDeviceEdges) UserOrErr

func (e UserDeviceEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserDeviceGroupBy

type UserDeviceGroupBy struct {
	// contains filtered or unexported fields
}

UserDeviceGroupBy is the group-by builder for UserDevice entities.

func (*UserDeviceGroupBy) Aggregate

func (udgb *UserDeviceGroupBy) Aggregate(fns ...AggregateFunc) *UserDeviceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserDeviceGroupBy) Bool

func (s *UserDeviceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) BoolX

func (s *UserDeviceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserDeviceGroupBy) Bools

func (s *UserDeviceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) BoolsX

func (s *UserDeviceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserDeviceGroupBy) Float64

func (s *UserDeviceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) Float64X

func (s *UserDeviceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserDeviceGroupBy) Float64s

func (s *UserDeviceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) Float64sX

func (s *UserDeviceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserDeviceGroupBy) Int

func (s *UserDeviceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) IntX

func (s *UserDeviceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserDeviceGroupBy) Ints

func (s *UserDeviceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) IntsX

func (s *UserDeviceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserDeviceGroupBy) Scan

func (udgb *UserDeviceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserDeviceGroupBy) ScanX

func (s *UserDeviceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserDeviceGroupBy) String

func (s *UserDeviceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) StringX

func (s *UserDeviceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserDeviceGroupBy) Strings

func (s *UserDeviceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserDeviceGroupBy) StringsX

func (s *UserDeviceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserDeviceMutation

type UserDeviceMutation struct {
	// contains filtered or unexported fields
}

UserDeviceMutation represents an operation that mutates the UserDevice nodes in the graph.

func (*UserDeviceMutation) AddCreatedBy

func (m *UserDeviceMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*UserDeviceMutation) AddField

func (m *UserDeviceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserDeviceMutation) AddUpdatedBy

func (m *UserDeviceMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*UserDeviceMutation) AddedCreatedBy

func (m *UserDeviceMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*UserDeviceMutation) AddedEdges

func (m *UserDeviceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserDeviceMutation) AddedField

func (m *UserDeviceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserDeviceMutation) AddedFields

func (m *UserDeviceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserDeviceMutation) AddedIDs

func (m *UserDeviceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserDeviceMutation) AddedUpdatedBy

func (m *UserDeviceMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*UserDeviceMutation) AppVersion

func (m *UserDeviceMutation) AppVersion() (r string, exists bool)

AppVersion returns the value of the "app_version" field in the mutation.

func (*UserDeviceMutation) AppVersionCleared

func (m *UserDeviceMutation) AppVersionCleared() bool

AppVersionCleared returns if the "app_version" field was cleared in this mutation.

func (*UserDeviceMutation) ClearAppVersion

func (m *UserDeviceMutation) ClearAppVersion()

ClearAppVersion clears the value of the "app_version" field.

func (*UserDeviceMutation) ClearComments

func (m *UserDeviceMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*UserDeviceMutation) ClearDeviceModel

func (m *UserDeviceMutation) ClearDeviceModel()

ClearDeviceModel clears the value of the "device_model" field.

func (*UserDeviceMutation) ClearDeviceName

func (m *UserDeviceMutation) ClearDeviceName()

ClearDeviceName clears the value of the "device_name" field.

func (*UserDeviceMutation) ClearEdge

func (m *UserDeviceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserDeviceMutation) ClearField

func (m *UserDeviceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserDeviceMutation) ClearStatus

func (m *UserDeviceMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*UserDeviceMutation) ClearSystemName

func (m *UserDeviceMutation) ClearSystemName()

ClearSystemName clears the value of the "system_name" field.

func (*UserDeviceMutation) ClearSystemVersion

func (m *UserDeviceMutation) ClearSystemVersion()

ClearSystemVersion clears the value of the "system_version" field.

func (*UserDeviceMutation) ClearUpdatedAt

func (m *UserDeviceMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserDeviceMutation) ClearUpdatedBy

func (m *UserDeviceMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserDeviceMutation) ClearUser

func (m *UserDeviceMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserDeviceMutation) ClearUserID

func (m *UserDeviceMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*UserDeviceMutation) ClearedEdges

func (m *UserDeviceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserDeviceMutation) ClearedFields

func (m *UserDeviceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserDeviceMutation) Client

func (m UserDeviceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserDeviceMutation) Comments

func (m *UserDeviceMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*UserDeviceMutation) CommentsCleared

func (m *UserDeviceMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*UserDeviceMutation) CreatedAt

func (m *UserDeviceMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserDeviceMutation) CreatedBy

func (m *UserDeviceMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*UserDeviceMutation) DeviceModel

func (m *UserDeviceMutation) DeviceModel() (r string, exists bool)

DeviceModel returns the value of the "device_model" field in the mutation.

func (*UserDeviceMutation) DeviceModelCleared

func (m *UserDeviceMutation) DeviceModelCleared() bool

DeviceModelCleared returns if the "device_model" field was cleared in this mutation.

func (*UserDeviceMutation) DeviceName

func (m *UserDeviceMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "device_name" field in the mutation.

func (*UserDeviceMutation) DeviceNameCleared

func (m *UserDeviceMutation) DeviceNameCleared() bool

DeviceNameCleared returns if the "device_name" field was cleared in this mutation.

func (*UserDeviceMutation) DeviceUID

func (m *UserDeviceMutation) DeviceUID() (r string, exists bool)

DeviceUID returns the value of the "device_uid" field in the mutation.

func (*UserDeviceMutation) EdgeCleared

func (m *UserDeviceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserDeviceMutation) Field

func (m *UserDeviceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserDeviceMutation) FieldCleared

func (m *UserDeviceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserDeviceMutation) Fields

func (m *UserDeviceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserDeviceMutation) ID

func (m *UserDeviceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserDeviceMutation) IDs

func (m *UserDeviceMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserDeviceMutation) OldAppVersion

func (m *UserDeviceMutation) OldAppVersion(ctx context.Context) (v string, err error)

OldAppVersion returns the old "app_version" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldComments

func (m *UserDeviceMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldCreatedAt

func (m *UserDeviceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldCreatedBy

func (m *UserDeviceMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldDeviceModel

func (m *UserDeviceMutation) OldDeviceModel(ctx context.Context) (v string, err error)

OldDeviceModel returns the old "device_model" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldDeviceName

func (m *UserDeviceMutation) OldDeviceName(ctx context.Context) (v string, err error)

OldDeviceName returns the old "device_name" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldDeviceUID

func (m *UserDeviceMutation) OldDeviceUID(ctx context.Context) (v string, err error)

OldDeviceUID returns the old "device_uid" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldField

func (m *UserDeviceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserDeviceMutation) OldStatus

func (m *UserDeviceMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldSystemName

func (m *UserDeviceMutation) OldSystemName(ctx context.Context) (v string, err error)

OldSystemName returns the old "system_name" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldSystemVersion

func (m *UserDeviceMutation) OldSystemVersion(ctx context.Context) (v string, err error)

OldSystemVersion returns the old "system_version" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldUpdatedAt

func (m *UserDeviceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldUpdatedBy

func (m *UserDeviceMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) OldUserID

func (m *UserDeviceMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the UserDevice entity. If the UserDevice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserDeviceMutation) Op

func (m *UserDeviceMutation) Op() Op

Op returns the operation name.

func (*UserDeviceMutation) RemovedEdges

func (m *UserDeviceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserDeviceMutation) RemovedIDs

func (m *UserDeviceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserDeviceMutation) ResetAppVersion

func (m *UserDeviceMutation) ResetAppVersion()

ResetAppVersion resets all changes to the "app_version" field.

func (*UserDeviceMutation) ResetComments

func (m *UserDeviceMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*UserDeviceMutation) ResetCreatedAt

func (m *UserDeviceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserDeviceMutation) ResetCreatedBy

func (m *UserDeviceMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*UserDeviceMutation) ResetDeviceModel

func (m *UserDeviceMutation) ResetDeviceModel()

ResetDeviceModel resets all changes to the "device_model" field.

func (*UserDeviceMutation) ResetDeviceName

func (m *UserDeviceMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "device_name" field.

func (*UserDeviceMutation) ResetDeviceUID

func (m *UserDeviceMutation) ResetDeviceUID()

ResetDeviceUID resets all changes to the "device_uid" field.

func (*UserDeviceMutation) ResetEdge

func (m *UserDeviceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserDeviceMutation) ResetField

func (m *UserDeviceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserDeviceMutation) ResetStatus

func (m *UserDeviceMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*UserDeviceMutation) ResetSystemName

func (m *UserDeviceMutation) ResetSystemName()

ResetSystemName resets all changes to the "system_name" field.

func (*UserDeviceMutation) ResetSystemVersion

func (m *UserDeviceMutation) ResetSystemVersion()

ResetSystemVersion resets all changes to the "system_version" field.

func (*UserDeviceMutation) ResetUpdatedAt

func (m *UserDeviceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserDeviceMutation) ResetUpdatedBy

func (m *UserDeviceMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*UserDeviceMutation) ResetUser

func (m *UserDeviceMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserDeviceMutation) ResetUserID

func (m *UserDeviceMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UserDeviceMutation) SetAppVersion

func (m *UserDeviceMutation) SetAppVersion(s string)

SetAppVersion sets the "app_version" field.

func (*UserDeviceMutation) SetComments

func (m *UserDeviceMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*UserDeviceMutation) SetCreatedAt

func (m *UserDeviceMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserDeviceMutation) SetCreatedBy

func (m *UserDeviceMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*UserDeviceMutation) SetDeviceModel

func (m *UserDeviceMutation) SetDeviceModel(s string)

SetDeviceModel sets the "device_model" field.

func (*UserDeviceMutation) SetDeviceName

func (m *UserDeviceMutation) SetDeviceName(s string)

SetDeviceName sets the "device_name" field.

func (*UserDeviceMutation) SetDeviceUID

func (m *UserDeviceMutation) SetDeviceUID(s string)

SetDeviceUID sets the "device_uid" field.

func (*UserDeviceMutation) SetField

func (m *UserDeviceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserDeviceMutation) SetID

func (m *UserDeviceMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UserDevice entities.

func (*UserDeviceMutation) SetOp

func (m *UserDeviceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserDeviceMutation) SetStatus

func (m *UserDeviceMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*UserDeviceMutation) SetSystemName

func (m *UserDeviceMutation) SetSystemName(s string)

SetSystemName sets the "system_name" field.

func (*UserDeviceMutation) SetSystemVersion

func (m *UserDeviceMutation) SetSystemVersion(s string)

SetSystemVersion sets the "system_version" field.

func (*UserDeviceMutation) SetUpdatedAt

func (m *UserDeviceMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserDeviceMutation) SetUpdatedBy

func (m *UserDeviceMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*UserDeviceMutation) SetUserID

func (m *UserDeviceMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*UserDeviceMutation) Status

func (m *UserDeviceMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*UserDeviceMutation) StatusCleared

func (m *UserDeviceMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*UserDeviceMutation) SystemName

func (m *UserDeviceMutation) SystemName() (r string, exists bool)

SystemName returns the value of the "system_name" field in the mutation.

func (*UserDeviceMutation) SystemNameCleared

func (m *UserDeviceMutation) SystemNameCleared() bool

SystemNameCleared returns if the "system_name" field was cleared in this mutation.

func (*UserDeviceMutation) SystemVersion

func (m *UserDeviceMutation) SystemVersion() (r string, exists bool)

SystemVersion returns the value of the "system_version" field in the mutation.

func (*UserDeviceMutation) SystemVersionCleared

func (m *UserDeviceMutation) SystemVersionCleared() bool

SystemVersionCleared returns if the "system_version" field was cleared in this mutation.

func (UserDeviceMutation) Tx

func (m UserDeviceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserDeviceMutation) Type

func (m *UserDeviceMutation) Type() string

Type returns the node type of this mutation (UserDevice).

func (*UserDeviceMutation) UpdatedAt

func (m *UserDeviceMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserDeviceMutation) UpdatedAtCleared

func (m *UserDeviceMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*UserDeviceMutation) UpdatedBy

func (m *UserDeviceMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*UserDeviceMutation) UpdatedByCleared

func (m *UserDeviceMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*UserDeviceMutation) UserCleared

func (m *UserDeviceMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserDeviceMutation) UserID

func (m *UserDeviceMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UserDeviceMutation) UserIDCleared

func (m *UserDeviceMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*UserDeviceMutation) UserIDs

func (m *UserDeviceMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserDeviceMutation) Where

func (m *UserDeviceMutation) Where(ps ...predicate.UserDevice)

Where appends a list predicates to the UserDeviceMutation builder.

func (*UserDeviceMutation) WhereP

func (m *UserDeviceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserDeviceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserDeviceOrder

type UserDeviceOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *UserDeviceOrderField `json:"field"`
}

UserDeviceOrder defines the ordering of UserDevice.

type UserDeviceOrderField

type UserDeviceOrderField struct {
	// Value extracts the ordering value from the given UserDevice.
	Value func(*UserDevice) (ent.Value, error)
	// contains filtered or unexported fields
}

UserDeviceOrderField defines the ordering field of UserDevice.

func (UserDeviceOrderField) MarshalGQL

func (f UserDeviceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserDeviceOrderField) String

func (f UserDeviceOrderField) String() string

String implement fmt.Stringer interface.

func (*UserDeviceOrderField) UnmarshalGQL

func (f *UserDeviceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserDevicePaginateOption

type UserDevicePaginateOption func(*userdevicePager) error

UserDevicePaginateOption enables pagination customization.

func WithUserDeviceFilter

func WithUserDeviceFilter(filter func(*UserDeviceQuery) (*UserDeviceQuery, error)) UserDevicePaginateOption

WithUserDeviceFilter configures pagination filter.

func WithUserDeviceOrder

func WithUserDeviceOrder(order *UserDeviceOrder) UserDevicePaginateOption

WithUserDeviceOrder configures pagination ordering.

type UserDeviceQuery

type UserDeviceQuery struct {
	// contains filtered or unexported fields
}

UserDeviceQuery is the builder for querying UserDevice entities.

func (*UserDeviceQuery) Aggregate

func (udq *UserDeviceQuery) Aggregate(fns ...AggregateFunc) *UserDeviceSelect

Aggregate returns a UserDeviceSelect configured with the given aggregations.

func (*UserDeviceQuery) All

func (udq *UserDeviceQuery) All(ctx context.Context) ([]*UserDevice, error)

All executes the query and returns a list of UserDevices.

func (*UserDeviceQuery) AllX

func (udq *UserDeviceQuery) AllX(ctx context.Context) []*UserDevice

AllX is like All, but panics if an error occurs.

func (*UserDeviceQuery) Clone

func (udq *UserDeviceQuery) Clone() *UserDeviceQuery

Clone returns a duplicate of the UserDeviceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserDeviceQuery) CollectFields

func (ud *UserDeviceQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserDeviceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserDeviceQuery) Count

func (udq *UserDeviceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserDeviceQuery) CountX

func (udq *UserDeviceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserDeviceQuery) Exist

func (udq *UserDeviceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserDeviceQuery) ExistX

func (udq *UserDeviceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserDeviceQuery) First

func (udq *UserDeviceQuery) First(ctx context.Context) (*UserDevice, error)

First returns the first UserDevice entity from the query. Returns a *NotFoundError when no UserDevice was found.

func (*UserDeviceQuery) FirstID

func (udq *UserDeviceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserDevice ID from the query. Returns a *NotFoundError when no UserDevice ID was found.

func (*UserDeviceQuery) FirstIDX

func (udq *UserDeviceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserDeviceQuery) FirstX

func (udq *UserDeviceQuery) FirstX(ctx context.Context) *UserDevice

FirstX is like First, but panics if an error occurs.

func (*UserDeviceQuery) GroupBy

func (udq *UserDeviceQuery) GroupBy(field string, fields ...string) *UserDeviceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserDevice.Query().
	GroupBy(userdevice.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserDeviceQuery) IDs

func (udq *UserDeviceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserDevice IDs.

func (*UserDeviceQuery) IDsX

func (udq *UserDeviceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserDeviceQuery) Limit

func (udq *UserDeviceQuery) Limit(limit int) *UserDeviceQuery

Limit the number of records to be returned by this query.

func (*UserDeviceQuery) Offset

func (udq *UserDeviceQuery) Offset(offset int) *UserDeviceQuery

Offset to start from.

func (*UserDeviceQuery) Only

func (udq *UserDeviceQuery) Only(ctx context.Context) (*UserDevice, error)

Only returns a single UserDevice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserDevice entity is found. Returns a *NotFoundError when no UserDevice entities are found.

func (*UserDeviceQuery) OnlyID

func (udq *UserDeviceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserDevice ID in the query. Returns a *NotSingularError when more than one UserDevice ID is found. Returns a *NotFoundError when no entities are found.

func (*UserDeviceQuery) OnlyIDX

func (udq *UserDeviceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserDeviceQuery) OnlyX

func (udq *UserDeviceQuery) OnlyX(ctx context.Context) *UserDevice

OnlyX is like Only, but panics if an error occurs.

func (*UserDeviceQuery) Order

Order specifies how the records should be ordered.

func (*UserDeviceQuery) Paginate

func (ud *UserDeviceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserDevicePaginateOption,
) (*UserDeviceConnection, error)

Paginate executes the query and returns a relay based cursor connection to UserDevice.

func (*UserDeviceQuery) QueryUser

func (udq *UserDeviceQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserDeviceQuery) Select

func (udq *UserDeviceQuery) Select(fields ...string) *UserDeviceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.UserDevice.Query().
	Select(userdevice.FieldCreatedBy).
	Scan(ctx, &v)

func (*UserDeviceQuery) Unique

func (udq *UserDeviceQuery) Unique(unique bool) *UserDeviceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserDeviceQuery) Where

Where adds a new predicate for the UserDeviceQuery builder.

func (*UserDeviceQuery) WithUser

func (udq *UserDeviceQuery) WithUser(opts ...func(*UserQuery)) *UserDeviceQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserDeviceSelect

type UserDeviceSelect struct {
	*UserDeviceQuery
	// contains filtered or unexported fields
}

UserDeviceSelect is the builder for selecting fields of UserDevice entities.

func (*UserDeviceSelect) Aggregate

func (uds *UserDeviceSelect) Aggregate(fns ...AggregateFunc) *UserDeviceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserDeviceSelect) Bool

func (s *UserDeviceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) BoolX

func (s *UserDeviceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserDeviceSelect) Bools

func (s *UserDeviceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) BoolsX

func (s *UserDeviceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserDeviceSelect) Float64

func (s *UserDeviceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) Float64X

func (s *UserDeviceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserDeviceSelect) Float64s

func (s *UserDeviceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) Float64sX

func (s *UserDeviceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserDeviceSelect) Int

func (s *UserDeviceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) IntX

func (s *UserDeviceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserDeviceSelect) Ints

func (s *UserDeviceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) IntsX

func (s *UserDeviceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserDeviceSelect) Scan

func (uds *UserDeviceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserDeviceSelect) ScanX

func (s *UserDeviceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserDeviceSelect) String

func (s *UserDeviceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) StringX

func (s *UserDeviceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserDeviceSelect) Strings

func (s *UserDeviceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserDeviceSelect) StringsX

func (s *UserDeviceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserDeviceUpdate

type UserDeviceUpdate struct {
	// contains filtered or unexported fields
}

UserDeviceUpdate is the builder for updating UserDevice entities.

func (*UserDeviceUpdate) AddUpdatedBy

func (udu *UserDeviceUpdate) AddUpdatedBy(i int) *UserDeviceUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*UserDeviceUpdate) ClearAppVersion

func (udu *UserDeviceUpdate) ClearAppVersion() *UserDeviceUpdate

ClearAppVersion clears the value of the "app_version" field.

func (*UserDeviceUpdate) ClearComments

func (udu *UserDeviceUpdate) ClearComments() *UserDeviceUpdate

ClearComments clears the value of the "comments" field.

func (*UserDeviceUpdate) ClearDeviceModel

func (udu *UserDeviceUpdate) ClearDeviceModel() *UserDeviceUpdate

ClearDeviceModel clears the value of the "device_model" field.

func (*UserDeviceUpdate) ClearDeviceName

func (udu *UserDeviceUpdate) ClearDeviceName() *UserDeviceUpdate

ClearDeviceName clears the value of the "device_name" field.

func (*UserDeviceUpdate) ClearStatus

func (udu *UserDeviceUpdate) ClearStatus() *UserDeviceUpdate

ClearStatus clears the value of the "status" field.

func (*UserDeviceUpdate) ClearSystemName

func (udu *UserDeviceUpdate) ClearSystemName() *UserDeviceUpdate

ClearSystemName clears the value of the "system_name" field.

func (*UserDeviceUpdate) ClearSystemVersion

func (udu *UserDeviceUpdate) ClearSystemVersion() *UserDeviceUpdate

ClearSystemVersion clears the value of the "system_version" field.

func (*UserDeviceUpdate) ClearUpdatedAt

func (udu *UserDeviceUpdate) ClearUpdatedAt() *UserDeviceUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserDeviceUpdate) ClearUpdatedBy

func (udu *UserDeviceUpdate) ClearUpdatedBy() *UserDeviceUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserDeviceUpdate) Exec

func (udu *UserDeviceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserDeviceUpdate) ExecX

func (udu *UserDeviceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceUpdate) Mutation

func (udu *UserDeviceUpdate) Mutation() *UserDeviceMutation

Mutation returns the UserDeviceMutation object of the builder.

func (*UserDeviceUpdate) Save

func (udu *UserDeviceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserDeviceUpdate) SaveX

func (udu *UserDeviceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserDeviceUpdate) SetAppVersion

func (udu *UserDeviceUpdate) SetAppVersion(s string) *UserDeviceUpdate

SetAppVersion sets the "app_version" field.

func (*UserDeviceUpdate) SetComments

func (udu *UserDeviceUpdate) SetComments(s string) *UserDeviceUpdate

SetComments sets the "comments" field.

func (*UserDeviceUpdate) SetDeviceModel

func (udu *UserDeviceUpdate) SetDeviceModel(s string) *UserDeviceUpdate

SetDeviceModel sets the "device_model" field.

func (*UserDeviceUpdate) SetDeviceName

func (udu *UserDeviceUpdate) SetDeviceName(s string) *UserDeviceUpdate

SetDeviceName sets the "device_name" field.

func (*UserDeviceUpdate) SetDeviceUID

func (udu *UserDeviceUpdate) SetDeviceUID(s string) *UserDeviceUpdate

SetDeviceUID sets the "device_uid" field.

func (*UserDeviceUpdate) SetNillableAppVersion

func (udu *UserDeviceUpdate) SetNillableAppVersion(s *string) *UserDeviceUpdate

SetNillableAppVersion sets the "app_version" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableComments

func (udu *UserDeviceUpdate) SetNillableComments(s *string) *UserDeviceUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableDeviceModel

func (udu *UserDeviceUpdate) SetNillableDeviceModel(s *string) *UserDeviceUpdate

SetNillableDeviceModel sets the "device_model" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableDeviceName

func (udu *UserDeviceUpdate) SetNillableDeviceName(s *string) *UserDeviceUpdate

SetNillableDeviceName sets the "device_name" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableStatus

func (udu *UserDeviceUpdate) SetNillableStatus(ts *typex.SimpleStatus) *UserDeviceUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableSystemName

func (udu *UserDeviceUpdate) SetNillableSystemName(s *string) *UserDeviceUpdate

SetNillableSystemName sets the "system_name" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableSystemVersion

func (udu *UserDeviceUpdate) SetNillableSystemVersion(s *string) *UserDeviceUpdate

SetNillableSystemVersion sets the "system_version" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableUpdatedAt

func (udu *UserDeviceUpdate) SetNillableUpdatedAt(t *time.Time) *UserDeviceUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserDeviceUpdate) SetNillableUpdatedBy

func (udu *UserDeviceUpdate) SetNillableUpdatedBy(i *int) *UserDeviceUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserDeviceUpdate) SetStatus

SetStatus sets the "status" field.

func (*UserDeviceUpdate) SetSystemName

func (udu *UserDeviceUpdate) SetSystemName(s string) *UserDeviceUpdate

SetSystemName sets the "system_name" field.

func (*UserDeviceUpdate) SetSystemVersion

func (udu *UserDeviceUpdate) SetSystemVersion(s string) *UserDeviceUpdate

SetSystemVersion sets the "system_version" field.

func (*UserDeviceUpdate) SetUpdatedAt

func (udu *UserDeviceUpdate) SetUpdatedAt(t time.Time) *UserDeviceUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserDeviceUpdate) SetUpdatedBy

func (udu *UserDeviceUpdate) SetUpdatedBy(i int) *UserDeviceUpdate

SetUpdatedBy sets the "updated_by" field.

func (*UserDeviceUpdate) Where

Where appends a list predicates to the UserDeviceUpdate builder.

type UserDeviceUpdateOne

type UserDeviceUpdateOne struct {
	// contains filtered or unexported fields
}

UserDeviceUpdateOne is the builder for updating a single UserDevice entity.

func (*UserDeviceUpdateOne) AddUpdatedBy

func (uduo *UserDeviceUpdateOne) AddUpdatedBy(i int) *UserDeviceUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*UserDeviceUpdateOne) ClearAppVersion

func (uduo *UserDeviceUpdateOne) ClearAppVersion() *UserDeviceUpdateOne

ClearAppVersion clears the value of the "app_version" field.

func (*UserDeviceUpdateOne) ClearComments

func (uduo *UserDeviceUpdateOne) ClearComments() *UserDeviceUpdateOne

ClearComments clears the value of the "comments" field.

func (*UserDeviceUpdateOne) ClearDeviceModel

func (uduo *UserDeviceUpdateOne) ClearDeviceModel() *UserDeviceUpdateOne

ClearDeviceModel clears the value of the "device_model" field.

func (*UserDeviceUpdateOne) ClearDeviceName

func (uduo *UserDeviceUpdateOne) ClearDeviceName() *UserDeviceUpdateOne

ClearDeviceName clears the value of the "device_name" field.

func (*UserDeviceUpdateOne) ClearStatus

func (uduo *UserDeviceUpdateOne) ClearStatus() *UserDeviceUpdateOne

ClearStatus clears the value of the "status" field.

func (*UserDeviceUpdateOne) ClearSystemName

func (uduo *UserDeviceUpdateOne) ClearSystemName() *UserDeviceUpdateOne

ClearSystemName clears the value of the "system_name" field.

func (*UserDeviceUpdateOne) ClearSystemVersion

func (uduo *UserDeviceUpdateOne) ClearSystemVersion() *UserDeviceUpdateOne

ClearSystemVersion clears the value of the "system_version" field.

func (*UserDeviceUpdateOne) ClearUpdatedAt

func (uduo *UserDeviceUpdateOne) ClearUpdatedAt() *UserDeviceUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserDeviceUpdateOne) ClearUpdatedBy

func (uduo *UserDeviceUpdateOne) ClearUpdatedBy() *UserDeviceUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserDeviceUpdateOne) Exec

func (uduo *UserDeviceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserDeviceUpdateOne) ExecX

func (uduo *UserDeviceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceUpdateOne) Mutation

func (uduo *UserDeviceUpdateOne) Mutation() *UserDeviceMutation

Mutation returns the UserDeviceMutation object of the builder.

func (*UserDeviceUpdateOne) Save

func (uduo *UserDeviceUpdateOne) Save(ctx context.Context) (*UserDevice, error)

Save executes the query and returns the updated UserDevice entity.

func (*UserDeviceUpdateOne) SaveX

func (uduo *UserDeviceUpdateOne) SaveX(ctx context.Context) *UserDevice

SaveX is like Save, but panics if an error occurs.

func (*UserDeviceUpdateOne) Select

func (uduo *UserDeviceUpdateOne) Select(field string, fields ...string) *UserDeviceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserDeviceUpdateOne) SetAppVersion

func (uduo *UserDeviceUpdateOne) SetAppVersion(s string) *UserDeviceUpdateOne

SetAppVersion sets the "app_version" field.

func (*UserDeviceUpdateOne) SetComments

func (uduo *UserDeviceUpdateOne) SetComments(s string) *UserDeviceUpdateOne

SetComments sets the "comments" field.

func (*UserDeviceUpdateOne) SetDeviceModel

func (uduo *UserDeviceUpdateOne) SetDeviceModel(s string) *UserDeviceUpdateOne

SetDeviceModel sets the "device_model" field.

func (*UserDeviceUpdateOne) SetDeviceName

func (uduo *UserDeviceUpdateOne) SetDeviceName(s string) *UserDeviceUpdateOne

SetDeviceName sets the "device_name" field.

func (*UserDeviceUpdateOne) SetDeviceUID

func (uduo *UserDeviceUpdateOne) SetDeviceUID(s string) *UserDeviceUpdateOne

SetDeviceUID sets the "device_uid" field.

func (*UserDeviceUpdateOne) SetNillableAppVersion

func (uduo *UserDeviceUpdateOne) SetNillableAppVersion(s *string) *UserDeviceUpdateOne

SetNillableAppVersion sets the "app_version" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableComments

func (uduo *UserDeviceUpdateOne) SetNillableComments(s *string) *UserDeviceUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableDeviceModel

func (uduo *UserDeviceUpdateOne) SetNillableDeviceModel(s *string) *UserDeviceUpdateOne

SetNillableDeviceModel sets the "device_model" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableDeviceName

func (uduo *UserDeviceUpdateOne) SetNillableDeviceName(s *string) *UserDeviceUpdateOne

SetNillableDeviceName sets the "device_name" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableStatus

func (uduo *UserDeviceUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *UserDeviceUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableSystemName

func (uduo *UserDeviceUpdateOne) SetNillableSystemName(s *string) *UserDeviceUpdateOne

SetNillableSystemName sets the "system_name" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableSystemVersion

func (uduo *UserDeviceUpdateOne) SetNillableSystemVersion(s *string) *UserDeviceUpdateOne

SetNillableSystemVersion sets the "system_version" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableUpdatedAt

func (uduo *UserDeviceUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserDeviceUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetNillableUpdatedBy

func (uduo *UserDeviceUpdateOne) SetNillableUpdatedBy(i *int) *UserDeviceUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserDeviceUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*UserDeviceUpdateOne) SetSystemName

func (uduo *UserDeviceUpdateOne) SetSystemName(s string) *UserDeviceUpdateOne

SetSystemName sets the "system_name" field.

func (*UserDeviceUpdateOne) SetSystemVersion

func (uduo *UserDeviceUpdateOne) SetSystemVersion(s string) *UserDeviceUpdateOne

SetSystemVersion sets the "system_version" field.

func (*UserDeviceUpdateOne) SetUpdatedAt

func (uduo *UserDeviceUpdateOne) SetUpdatedAt(t time.Time) *UserDeviceUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserDeviceUpdateOne) SetUpdatedBy

func (uduo *UserDeviceUpdateOne) SetUpdatedBy(i int) *UserDeviceUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*UserDeviceUpdateOne) Where

Where appends a list predicates to the UserDeviceUpdate builder.

type UserDeviceUpsert

type UserDeviceUpsert struct {
	*sql.UpdateSet
}

UserDeviceUpsert is the "OnConflict" setter.

func (*UserDeviceUpsert) AddUpdatedBy

func (u *UserDeviceUpsert) AddUpdatedBy(v int) *UserDeviceUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*UserDeviceUpsert) ClearAppVersion

func (u *UserDeviceUpsert) ClearAppVersion() *UserDeviceUpsert

ClearAppVersion clears the value of the "app_version" field.

func (*UserDeviceUpsert) ClearComments

func (u *UserDeviceUpsert) ClearComments() *UserDeviceUpsert

ClearComments clears the value of the "comments" field.

func (*UserDeviceUpsert) ClearDeviceModel

func (u *UserDeviceUpsert) ClearDeviceModel() *UserDeviceUpsert

ClearDeviceModel clears the value of the "device_model" field.

func (*UserDeviceUpsert) ClearDeviceName

func (u *UserDeviceUpsert) ClearDeviceName() *UserDeviceUpsert

ClearDeviceName clears the value of the "device_name" field.

func (*UserDeviceUpsert) ClearStatus

func (u *UserDeviceUpsert) ClearStatus() *UserDeviceUpsert

ClearStatus clears the value of the "status" field.

func (*UserDeviceUpsert) ClearSystemName

func (u *UserDeviceUpsert) ClearSystemName() *UserDeviceUpsert

ClearSystemName clears the value of the "system_name" field.

func (*UserDeviceUpsert) ClearSystemVersion

func (u *UserDeviceUpsert) ClearSystemVersion() *UserDeviceUpsert

ClearSystemVersion clears the value of the "system_version" field.

func (*UserDeviceUpsert) ClearUpdatedAt

func (u *UserDeviceUpsert) ClearUpdatedAt() *UserDeviceUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserDeviceUpsert) ClearUpdatedBy

func (u *UserDeviceUpsert) ClearUpdatedBy() *UserDeviceUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserDeviceUpsert) SetAppVersion

func (u *UserDeviceUpsert) SetAppVersion(v string) *UserDeviceUpsert

SetAppVersion sets the "app_version" field.

func (*UserDeviceUpsert) SetComments

func (u *UserDeviceUpsert) SetComments(v string) *UserDeviceUpsert

SetComments sets the "comments" field.

func (*UserDeviceUpsert) SetDeviceModel

func (u *UserDeviceUpsert) SetDeviceModel(v string) *UserDeviceUpsert

SetDeviceModel sets the "device_model" field.

func (*UserDeviceUpsert) SetDeviceName

func (u *UserDeviceUpsert) SetDeviceName(v string) *UserDeviceUpsert

SetDeviceName sets the "device_name" field.

func (*UserDeviceUpsert) SetDeviceUID

func (u *UserDeviceUpsert) SetDeviceUID(v string) *UserDeviceUpsert

SetDeviceUID sets the "device_uid" field.

func (*UserDeviceUpsert) SetStatus

SetStatus sets the "status" field.

func (*UserDeviceUpsert) SetSystemName

func (u *UserDeviceUpsert) SetSystemName(v string) *UserDeviceUpsert

SetSystemName sets the "system_name" field.

func (*UserDeviceUpsert) SetSystemVersion

func (u *UserDeviceUpsert) SetSystemVersion(v string) *UserDeviceUpsert

SetSystemVersion sets the "system_version" field.

func (*UserDeviceUpsert) SetUpdatedAt

func (u *UserDeviceUpsert) SetUpdatedAt(v time.Time) *UserDeviceUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserDeviceUpsert) SetUpdatedBy

func (u *UserDeviceUpsert) SetUpdatedBy(v int) *UserDeviceUpsert

SetUpdatedBy sets the "updated_by" field.

func (*UserDeviceUpsert) UpdateAppVersion

func (u *UserDeviceUpsert) UpdateAppVersion() *UserDeviceUpsert

UpdateAppVersion sets the "app_version" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateComments

func (u *UserDeviceUpsert) UpdateComments() *UserDeviceUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateDeviceModel

func (u *UserDeviceUpsert) UpdateDeviceModel() *UserDeviceUpsert

UpdateDeviceModel sets the "device_model" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateDeviceName

func (u *UserDeviceUpsert) UpdateDeviceName() *UserDeviceUpsert

UpdateDeviceName sets the "device_name" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateDeviceUID

func (u *UserDeviceUpsert) UpdateDeviceUID() *UserDeviceUpsert

UpdateDeviceUID sets the "device_uid" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateStatus

func (u *UserDeviceUpsert) UpdateStatus() *UserDeviceUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateSystemName

func (u *UserDeviceUpsert) UpdateSystemName() *UserDeviceUpsert

UpdateSystemName sets the "system_name" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateSystemVersion

func (u *UserDeviceUpsert) UpdateSystemVersion() *UserDeviceUpsert

UpdateSystemVersion sets the "system_version" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateUpdatedAt

func (u *UserDeviceUpsert) UpdateUpdatedAt() *UserDeviceUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserDeviceUpsert) UpdateUpdatedBy

func (u *UserDeviceUpsert) UpdateUpdatedBy() *UserDeviceUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserDeviceUpsertBulk

type UserDeviceUpsertBulk struct {
	// contains filtered or unexported fields
}

UserDeviceUpsertBulk is the builder for "upsert"-ing a bulk of UserDevice nodes.

func (*UserDeviceUpsertBulk) AddUpdatedBy

func (u *UserDeviceUpsertBulk) AddUpdatedBy(v int) *UserDeviceUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*UserDeviceUpsertBulk) ClearAppVersion

func (u *UserDeviceUpsertBulk) ClearAppVersion() *UserDeviceUpsertBulk

ClearAppVersion clears the value of the "app_version" field.

func (*UserDeviceUpsertBulk) ClearComments

func (u *UserDeviceUpsertBulk) ClearComments() *UserDeviceUpsertBulk

ClearComments clears the value of the "comments" field.

func (*UserDeviceUpsertBulk) ClearDeviceModel

func (u *UserDeviceUpsertBulk) ClearDeviceModel() *UserDeviceUpsertBulk

ClearDeviceModel clears the value of the "device_model" field.

func (*UserDeviceUpsertBulk) ClearDeviceName

func (u *UserDeviceUpsertBulk) ClearDeviceName() *UserDeviceUpsertBulk

ClearDeviceName clears the value of the "device_name" field.

func (*UserDeviceUpsertBulk) ClearStatus

func (u *UserDeviceUpsertBulk) ClearStatus() *UserDeviceUpsertBulk

ClearStatus clears the value of the "status" field.

func (*UserDeviceUpsertBulk) ClearSystemName

func (u *UserDeviceUpsertBulk) ClearSystemName() *UserDeviceUpsertBulk

ClearSystemName clears the value of the "system_name" field.

func (*UserDeviceUpsertBulk) ClearSystemVersion

func (u *UserDeviceUpsertBulk) ClearSystemVersion() *UserDeviceUpsertBulk

ClearSystemVersion clears the value of the "system_version" field.

func (*UserDeviceUpsertBulk) ClearUpdatedAt

func (u *UserDeviceUpsertBulk) ClearUpdatedAt() *UserDeviceUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserDeviceUpsertBulk) ClearUpdatedBy

func (u *UserDeviceUpsertBulk) ClearUpdatedBy() *UserDeviceUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserDeviceUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserDeviceUpsertBulk) Exec

Exec executes the query.

func (*UserDeviceUpsertBulk) ExecX

func (u *UserDeviceUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserDevice.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserDeviceUpsertBulk) SetAppVersion

func (u *UserDeviceUpsertBulk) SetAppVersion(v string) *UserDeviceUpsertBulk

SetAppVersion sets the "app_version" field.

func (*UserDeviceUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*UserDeviceUpsertBulk) SetDeviceModel

func (u *UserDeviceUpsertBulk) SetDeviceModel(v string) *UserDeviceUpsertBulk

SetDeviceModel sets the "device_model" field.

func (*UserDeviceUpsertBulk) SetDeviceName

func (u *UserDeviceUpsertBulk) SetDeviceName(v string) *UserDeviceUpsertBulk

SetDeviceName sets the "device_name" field.

func (*UserDeviceUpsertBulk) SetDeviceUID

func (u *UserDeviceUpsertBulk) SetDeviceUID(v string) *UserDeviceUpsertBulk

SetDeviceUID sets the "device_uid" field.

func (*UserDeviceUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*UserDeviceUpsertBulk) SetSystemName

func (u *UserDeviceUpsertBulk) SetSystemName(v string) *UserDeviceUpsertBulk

SetSystemName sets the "system_name" field.

func (*UserDeviceUpsertBulk) SetSystemVersion

func (u *UserDeviceUpsertBulk) SetSystemVersion(v string) *UserDeviceUpsertBulk

SetSystemVersion sets the "system_version" field.

func (*UserDeviceUpsertBulk) SetUpdatedAt

func (u *UserDeviceUpsertBulk) SetUpdatedAt(v time.Time) *UserDeviceUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*UserDeviceUpsertBulk) SetUpdatedBy

func (u *UserDeviceUpsertBulk) SetUpdatedBy(v int) *UserDeviceUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*UserDeviceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserDeviceCreateBulk.OnConflict documentation for more info.

func (*UserDeviceUpsertBulk) UpdateAppVersion

func (u *UserDeviceUpsertBulk) UpdateAppVersion() *UserDeviceUpsertBulk

UpdateAppVersion sets the "app_version" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateComments

func (u *UserDeviceUpsertBulk) UpdateComments() *UserDeviceUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateDeviceModel

func (u *UserDeviceUpsertBulk) UpdateDeviceModel() *UserDeviceUpsertBulk

UpdateDeviceModel sets the "device_model" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateDeviceName

func (u *UserDeviceUpsertBulk) UpdateDeviceName() *UserDeviceUpsertBulk

UpdateDeviceName sets the "device_name" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateDeviceUID

func (u *UserDeviceUpsertBulk) UpdateDeviceUID() *UserDeviceUpsertBulk

UpdateDeviceUID sets the "device_uid" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateNewValues

func (u *UserDeviceUpsertBulk) UpdateNewValues() *UserDeviceUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserDevice.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userdevice.FieldID)
		}),
	).
	Exec(ctx)

func (*UserDeviceUpsertBulk) UpdateStatus

func (u *UserDeviceUpsertBulk) UpdateStatus() *UserDeviceUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateSystemName

func (u *UserDeviceUpsertBulk) UpdateSystemName() *UserDeviceUpsertBulk

UpdateSystemName sets the "system_name" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateSystemVersion

func (u *UserDeviceUpsertBulk) UpdateSystemVersion() *UserDeviceUpsertBulk

UpdateSystemVersion sets the "system_version" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateUpdatedAt

func (u *UserDeviceUpsertBulk) UpdateUpdatedAt() *UserDeviceUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserDeviceUpsertBulk) UpdateUpdatedBy

func (u *UserDeviceUpsertBulk) UpdateUpdatedBy() *UserDeviceUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserDeviceUpsertOne

type UserDeviceUpsertOne struct {
	// contains filtered or unexported fields
}

UserDeviceUpsertOne is the builder for "upsert"-ing

one UserDevice node.

func (*UserDeviceUpsertOne) AddUpdatedBy

func (u *UserDeviceUpsertOne) AddUpdatedBy(v int) *UserDeviceUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*UserDeviceUpsertOne) ClearAppVersion

func (u *UserDeviceUpsertOne) ClearAppVersion() *UserDeviceUpsertOne

ClearAppVersion clears the value of the "app_version" field.

func (*UserDeviceUpsertOne) ClearComments

func (u *UserDeviceUpsertOne) ClearComments() *UserDeviceUpsertOne

ClearComments clears the value of the "comments" field.

func (*UserDeviceUpsertOne) ClearDeviceModel

func (u *UserDeviceUpsertOne) ClearDeviceModel() *UserDeviceUpsertOne

ClearDeviceModel clears the value of the "device_model" field.

func (*UserDeviceUpsertOne) ClearDeviceName

func (u *UserDeviceUpsertOne) ClearDeviceName() *UserDeviceUpsertOne

ClearDeviceName clears the value of the "device_name" field.

func (*UserDeviceUpsertOne) ClearStatus

func (u *UserDeviceUpsertOne) ClearStatus() *UserDeviceUpsertOne

ClearStatus clears the value of the "status" field.

func (*UserDeviceUpsertOne) ClearSystemName

func (u *UserDeviceUpsertOne) ClearSystemName() *UserDeviceUpsertOne

ClearSystemName clears the value of the "system_name" field.

func (*UserDeviceUpsertOne) ClearSystemVersion

func (u *UserDeviceUpsertOne) ClearSystemVersion() *UserDeviceUpsertOne

ClearSystemVersion clears the value of the "system_version" field.

func (*UserDeviceUpsertOne) ClearUpdatedAt

func (u *UserDeviceUpsertOne) ClearUpdatedAt() *UserDeviceUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserDeviceUpsertOne) ClearUpdatedBy

func (u *UserDeviceUpsertOne) ClearUpdatedBy() *UserDeviceUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserDeviceUpsertOne) DoNothing

func (u *UserDeviceUpsertOne) DoNothing() *UserDeviceUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserDeviceUpsertOne) Exec

Exec executes the query.

func (*UserDeviceUpsertOne) ExecX

func (u *UserDeviceUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceUpsertOne) ID

func (u *UserDeviceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserDeviceUpsertOne) IDX

func (u *UserDeviceUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserDeviceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserDevice.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserDeviceUpsertOne) SetAppVersion

func (u *UserDeviceUpsertOne) SetAppVersion(v string) *UserDeviceUpsertOne

SetAppVersion sets the "app_version" field.

func (*UserDeviceUpsertOne) SetComments

func (u *UserDeviceUpsertOne) SetComments(v string) *UserDeviceUpsertOne

SetComments sets the "comments" field.

func (*UserDeviceUpsertOne) SetDeviceModel

func (u *UserDeviceUpsertOne) SetDeviceModel(v string) *UserDeviceUpsertOne

SetDeviceModel sets the "device_model" field.

func (*UserDeviceUpsertOne) SetDeviceName

func (u *UserDeviceUpsertOne) SetDeviceName(v string) *UserDeviceUpsertOne

SetDeviceName sets the "device_name" field.

func (*UserDeviceUpsertOne) SetDeviceUID

func (u *UserDeviceUpsertOne) SetDeviceUID(v string) *UserDeviceUpsertOne

SetDeviceUID sets the "device_uid" field.

func (*UserDeviceUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*UserDeviceUpsertOne) SetSystemName

func (u *UserDeviceUpsertOne) SetSystemName(v string) *UserDeviceUpsertOne

SetSystemName sets the "system_name" field.

func (*UserDeviceUpsertOne) SetSystemVersion

func (u *UserDeviceUpsertOne) SetSystemVersion(v string) *UserDeviceUpsertOne

SetSystemVersion sets the "system_version" field.

func (*UserDeviceUpsertOne) SetUpdatedAt

func (u *UserDeviceUpsertOne) SetUpdatedAt(v time.Time) *UserDeviceUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*UserDeviceUpsertOne) SetUpdatedBy

func (u *UserDeviceUpsertOne) SetUpdatedBy(v int) *UserDeviceUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*UserDeviceUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserDeviceCreate.OnConflict documentation for more info.

func (*UserDeviceUpsertOne) UpdateAppVersion

func (u *UserDeviceUpsertOne) UpdateAppVersion() *UserDeviceUpsertOne

UpdateAppVersion sets the "app_version" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateComments

func (u *UserDeviceUpsertOne) UpdateComments() *UserDeviceUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateDeviceModel

func (u *UserDeviceUpsertOne) UpdateDeviceModel() *UserDeviceUpsertOne

UpdateDeviceModel sets the "device_model" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateDeviceName

func (u *UserDeviceUpsertOne) UpdateDeviceName() *UserDeviceUpsertOne

UpdateDeviceName sets the "device_name" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateDeviceUID

func (u *UserDeviceUpsertOne) UpdateDeviceUID() *UserDeviceUpsertOne

UpdateDeviceUID sets the "device_uid" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateNewValues

func (u *UserDeviceUpsertOne) UpdateNewValues() *UserDeviceUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.UserDevice.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userdevice.FieldID)
		}),
	).
	Exec(ctx)

func (*UserDeviceUpsertOne) UpdateStatus

func (u *UserDeviceUpsertOne) UpdateStatus() *UserDeviceUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateSystemName

func (u *UserDeviceUpsertOne) UpdateSystemName() *UserDeviceUpsertOne

UpdateSystemName sets the "system_name" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateSystemVersion

func (u *UserDeviceUpsertOne) UpdateSystemVersion() *UserDeviceUpsertOne

UpdateSystemVersion sets the "system_version" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateUpdatedAt

func (u *UserDeviceUpsertOne) UpdateUpdatedAt() *UserDeviceUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserDeviceUpsertOne) UpdateUpdatedBy

func (u *UserDeviceUpsertOne) UpdateUpdatedBy() *UserDeviceUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserDeviceWhereInput

type UserDeviceWhereInput struct {
	Predicates []predicate.UserDevice  `json:"-"`
	Not        *UserDeviceWhereInput   `json:"not,omitempty"`
	Or         []*UserDeviceWhereInput `json:"or,omitempty"`
	And        []*UserDeviceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "user_id" field predicates.
	UserID       *int  `json:"userID,omitempty"`
	UserIDNEQ    *int  `json:"userIDNEQ,omitempty"`
	UserIDIn     []int `json:"userIDIn,omitempty"`
	UserIDNotIn  []int `json:"userIDNotIn,omitempty"`
	UserIDIsNil  bool  `json:"userIDIsNil,omitempty"`
	UserIDNotNil bool  `json:"userIDNotNil,omitempty"`

	// "device_uid" field predicates.
	DeviceUID             *string  `json:"deviceUID,omitempty"`
	DeviceUIDNEQ          *string  `json:"deviceUIDNEQ,omitempty"`
	DeviceUIDIn           []string `json:"deviceUIDIn,omitempty"`
	DeviceUIDNotIn        []string `json:"deviceUIDNotIn,omitempty"`
	DeviceUIDGT           *string  `json:"deviceUIDGT,omitempty"`
	DeviceUIDGTE          *string  `json:"deviceUIDGTE,omitempty"`
	DeviceUIDLT           *string  `json:"deviceUIDLT,omitempty"`
	DeviceUIDLTE          *string  `json:"deviceUIDLTE,omitempty"`
	DeviceUIDContains     *string  `json:"deviceUIDContains,omitempty"`
	DeviceUIDHasPrefix    *string  `json:"deviceUIDHasPrefix,omitempty"`
	DeviceUIDHasSuffix    *string  `json:"deviceUIDHasSuffix,omitempty"`
	DeviceUIDEqualFold    *string  `json:"deviceUIDEqualFold,omitempty"`
	DeviceUIDContainsFold *string  `json:"deviceUIDContainsFold,omitempty"`

	// "device_name" field predicates.
	DeviceName             *string  `json:"deviceName,omitempty"`
	DeviceNameNEQ          *string  `json:"deviceNameNEQ,omitempty"`
	DeviceNameIn           []string `json:"deviceNameIn,omitempty"`
	DeviceNameNotIn        []string `json:"deviceNameNotIn,omitempty"`
	DeviceNameGT           *string  `json:"deviceNameGT,omitempty"`
	DeviceNameGTE          *string  `json:"deviceNameGTE,omitempty"`
	DeviceNameLT           *string  `json:"deviceNameLT,omitempty"`
	DeviceNameLTE          *string  `json:"deviceNameLTE,omitempty"`
	DeviceNameContains     *string  `json:"deviceNameContains,omitempty"`
	DeviceNameHasPrefix    *string  `json:"deviceNameHasPrefix,omitempty"`
	DeviceNameHasSuffix    *string  `json:"deviceNameHasSuffix,omitempty"`
	DeviceNameIsNil        bool     `json:"deviceNameIsNil,omitempty"`
	DeviceNameNotNil       bool     `json:"deviceNameNotNil,omitempty"`
	DeviceNameEqualFold    *string  `json:"deviceNameEqualFold,omitempty"`
	DeviceNameContainsFold *string  `json:"deviceNameContainsFold,omitempty"`

	// "system_name" field predicates.
	SystemName             *string  `json:"systemName,omitempty"`
	SystemNameNEQ          *string  `json:"systemNameNEQ,omitempty"`
	SystemNameIn           []string `json:"systemNameIn,omitempty"`
	SystemNameNotIn        []string `json:"systemNameNotIn,omitempty"`
	SystemNameGT           *string  `json:"systemNameGT,omitempty"`
	SystemNameGTE          *string  `json:"systemNameGTE,omitempty"`
	SystemNameLT           *string  `json:"systemNameLT,omitempty"`
	SystemNameLTE          *string  `json:"systemNameLTE,omitempty"`
	SystemNameContains     *string  `json:"systemNameContains,omitempty"`
	SystemNameHasPrefix    *string  `json:"systemNameHasPrefix,omitempty"`
	SystemNameHasSuffix    *string  `json:"systemNameHasSuffix,omitempty"`
	SystemNameIsNil        bool     `json:"systemNameIsNil,omitempty"`
	SystemNameNotNil       bool     `json:"systemNameNotNil,omitempty"`
	SystemNameEqualFold    *string  `json:"systemNameEqualFold,omitempty"`
	SystemNameContainsFold *string  `json:"systemNameContainsFold,omitempty"`

	// "system_version" field predicates.
	SystemVersion             *string  `json:"systemVersion,omitempty"`
	SystemVersionNEQ          *string  `json:"systemVersionNEQ,omitempty"`
	SystemVersionIn           []string `json:"systemVersionIn,omitempty"`
	SystemVersionNotIn        []string `json:"systemVersionNotIn,omitempty"`
	SystemVersionGT           *string  `json:"systemVersionGT,omitempty"`
	SystemVersionGTE          *string  `json:"systemVersionGTE,omitempty"`
	SystemVersionLT           *string  `json:"systemVersionLT,omitempty"`
	SystemVersionLTE          *string  `json:"systemVersionLTE,omitempty"`
	SystemVersionContains     *string  `json:"systemVersionContains,omitempty"`
	SystemVersionHasPrefix    *string  `json:"systemVersionHasPrefix,omitempty"`
	SystemVersionHasSuffix    *string  `json:"systemVersionHasSuffix,omitempty"`
	SystemVersionIsNil        bool     `json:"systemVersionIsNil,omitempty"`
	SystemVersionNotNil       bool     `json:"systemVersionNotNil,omitempty"`
	SystemVersionEqualFold    *string  `json:"systemVersionEqualFold,omitempty"`
	SystemVersionContainsFold *string  `json:"systemVersionContainsFold,omitempty"`

	// "app_version" field predicates.
	AppVersion             *string  `json:"appVersion,omitempty"`
	AppVersionNEQ          *string  `json:"appVersionNEQ,omitempty"`
	AppVersionIn           []string `json:"appVersionIn,omitempty"`
	AppVersionNotIn        []string `json:"appVersionNotIn,omitempty"`
	AppVersionGT           *string  `json:"appVersionGT,omitempty"`
	AppVersionGTE          *string  `json:"appVersionGTE,omitempty"`
	AppVersionLT           *string  `json:"appVersionLT,omitempty"`
	AppVersionLTE          *string  `json:"appVersionLTE,omitempty"`
	AppVersionContains     *string  `json:"appVersionContains,omitempty"`
	AppVersionHasPrefix    *string  `json:"appVersionHasPrefix,omitempty"`
	AppVersionHasSuffix    *string  `json:"appVersionHasSuffix,omitempty"`
	AppVersionIsNil        bool     `json:"appVersionIsNil,omitempty"`
	AppVersionNotNil       bool     `json:"appVersionNotNil,omitempty"`
	AppVersionEqualFold    *string  `json:"appVersionEqualFold,omitempty"`
	AppVersionContainsFold *string  `json:"appVersionContainsFold,omitempty"`

	// "device_model" field predicates.
	DeviceModel             *string  `json:"deviceModel,omitempty"`
	DeviceModelNEQ          *string  `json:"deviceModelNEQ,omitempty"`
	DeviceModelIn           []string `json:"deviceModelIn,omitempty"`
	DeviceModelNotIn        []string `json:"deviceModelNotIn,omitempty"`
	DeviceModelGT           *string  `json:"deviceModelGT,omitempty"`
	DeviceModelGTE          *string  `json:"deviceModelGTE,omitempty"`
	DeviceModelLT           *string  `json:"deviceModelLT,omitempty"`
	DeviceModelLTE          *string  `json:"deviceModelLTE,omitempty"`
	DeviceModelContains     *string  `json:"deviceModelContains,omitempty"`
	DeviceModelHasPrefix    *string  `json:"deviceModelHasPrefix,omitempty"`
	DeviceModelHasSuffix    *string  `json:"deviceModelHasSuffix,omitempty"`
	DeviceModelIsNil        bool     `json:"deviceModelIsNil,omitempty"`
	DeviceModelNotNil       bool     `json:"deviceModelNotNil,omitempty"`
	DeviceModelEqualFold    *string  `json:"deviceModelEqualFold,omitempty"`
	DeviceModelContainsFold *string  `json:"deviceModelContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`
}

UserDeviceWhereInput represents a where input for filtering UserDevice queries.

func (*UserDeviceWhereInput) AddPredicates

func (i *UserDeviceWhereInput) AddPredicates(predicates ...predicate.UserDevice)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserDeviceWhereInput) Filter

Filter applies the UserDeviceWhereInput filter on the UserDeviceQuery builder.

func (*UserDeviceWhereInput) P

P returns a predicate for filtering userdevices. An error is returned if the input is empty or invalid.

type UserDevices

type UserDevices []*UserDevice

UserDevices is a parsable slice of UserDevice.

type UserEdge

type UserEdge struct {
	Node   *User  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

UserEdge is the edge representation of User.

type UserEdges

type UserEdges struct {
	// 用户身份标识
	Identities []*UserIdentity `json:"identities,omitempty"`
	// 登陆设置
	LoginProfile *UserLoginProfile `json:"login_profile,omitempty"`
	// 用户密码
	Passwords []*UserPassword `json:"passwords,omitempty"`
	// 用户设备
	Devices []*UserDevice `json:"devices,omitempty"`
	// 用户所属组织
	Orgs []*Org `json:"orgs,omitempty"`
	// 用户权限
	Permissions []*Permission `json:"permissions,omitempty"`
	// 用户AccessKey
	OauthClients []*OauthClient `json:"oauth_clients,omitempty"`
	// OrgUser holds the value of the org_user edge.
	OrgUser []*OrgUser `json:"org_user,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) DevicesOrErr

func (e UserEdges) DevicesOrErr() ([]*UserDevice, error)

DevicesOrErr returns the Devices value or an error if the edge was not loaded in eager-loading.

func (UserEdges) IdentitiesOrErr

func (e UserEdges) IdentitiesOrErr() ([]*UserIdentity, error)

IdentitiesOrErr returns the Identities value or an error if the edge was not loaded in eager-loading.

func (UserEdges) LoginProfileOrErr

func (e UserEdges) LoginProfileOrErr() (*UserLoginProfile, error)

LoginProfileOrErr returns the LoginProfile value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserEdges) OauthClientsOrErr

func (e UserEdges) OauthClientsOrErr() ([]*OauthClient, error)

OauthClientsOrErr returns the OauthClients value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OrgUserOrErr

func (e UserEdges) OrgUserOrErr() ([]*OrgUser, error)

OrgUserOrErr returns the OrgUser value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OrgsOrErr

func (e UserEdges) OrgsOrErr() ([]*Org, error)

OrgsOrErr returns the Orgs value or an error if the edge was not loaded in eager-loading.

func (UserEdges) PasswordsOrErr

func (e UserEdges) PasswordsOrErr() ([]*UserPassword, error)

PasswordsOrErr returns the Passwords value or an error if the edge was not loaded in eager-loading.

func (UserEdges) PermissionsOrErr

func (e UserEdges) PermissionsOrErr() ([]*Permission, error)

PermissionsOrErr returns the Permissions value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserIdentities

type UserIdentities []*UserIdentity

UserIdentities is a parsable slice of UserIdentity.

type UserIdentity

type UserIdentity struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID int `json:"user_id,omitempty"`
	// 身份标识类型 手机、邮箱、用户名、微信、qq
	Kind useridentity.Kind `json:"kind,omitempty"`
	// 用户名、邮箱、手机、unionid、qq
	Code string `json:"code,omitempty"`
	// 扩展标识码,比如微信的openID
	CodeExtend string `json:"code_extend,omitempty"`
	// 状态,部分登陆方式需要验证通过才可启用
	Status typex.SimpleStatus `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserIdentityQuery when eager-loading is set.
	Edges UserIdentityEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserIdentity is the model entity for the UserIdentity schema.

func (*UserIdentity) GlobalID

func (ui *UserIdentity) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given UserIdentity node.

func (*UserIdentity) IsNode

func (*UserIdentity) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*UserIdentity) QueryUser

func (ui *UserIdentity) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserIdentity entity.

func (*UserIdentity) String

func (ui *UserIdentity) String() string

String implements the fmt.Stringer.

func (*UserIdentity) ToEdge

func (ui *UserIdentity) ToEdge(order *UserIdentityOrder) *UserIdentityEdge

ToEdge converts UserIdentity into UserIdentityEdge.

func (*UserIdentity) Unwrap

func (ui *UserIdentity) Unwrap() *UserIdentity

Unwrap unwraps the UserIdentity entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*UserIdentity) Update

func (ui *UserIdentity) Update() *UserIdentityUpdateOne

Update returns a builder for updating this UserIdentity. Note that you need to call UserIdentity.Unwrap() before calling this method if this UserIdentity was returned from a transaction, and the transaction was committed or rolled back.

func (*UserIdentity) User

func (ui *UserIdentity) User(ctx context.Context) (*User, error)

func (*UserIdentity) Value

func (ui *UserIdentity) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserIdentity. This includes values selected through modifiers, order, etc.

type UserIdentityClient

type UserIdentityClient struct {
	// contains filtered or unexported fields
}

UserIdentityClient is a client for the UserIdentity schema.

func NewUserIdentityClient

func NewUserIdentityClient(c config) *UserIdentityClient

NewUserIdentityClient returns a client for the UserIdentity from the given config.

func (*UserIdentityClient) Create

Create returns a builder for creating a UserIdentity entity.

func (*UserIdentityClient) CreateBulk

func (c *UserIdentityClient) CreateBulk(builders ...*UserIdentityCreate) *UserIdentityCreateBulk

CreateBulk returns a builder for creating a bulk of UserIdentity entities.

func (*UserIdentityClient) Delete

Delete returns a delete builder for UserIdentity.

func (*UserIdentityClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserIdentityClient) DeleteOneID

func (c *UserIdentityClient) DeleteOneID(id int) *UserIdentityDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserIdentityClient) Get

Get returns a UserIdentity entity by its id.

func (*UserIdentityClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserIdentityClient) Hooks

func (c *UserIdentityClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserIdentityClient) Intercept

func (c *UserIdentityClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `useridentity.Intercept(f(g(h())))`.

func (*UserIdentityClient) Interceptors

func (c *UserIdentityClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserIdentityClient) MapCreateBulk

func (c *UserIdentityClient) MapCreateBulk(slice any, setFunc func(*UserIdentityCreate, int)) *UserIdentityCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserIdentityClient) Query

Query returns a query builder for UserIdentity.

func (*UserIdentityClient) QueryUser

func (c *UserIdentityClient) QueryUser(ui *UserIdentity) *UserQuery

QueryUser queries the user edge of a UserIdentity.

func (*UserIdentityClient) Update

Update returns an update builder for UserIdentity.

func (*UserIdentityClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserIdentityClient) UpdateOneID

func (c *UserIdentityClient) UpdateOneID(id int) *UserIdentityUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserIdentityClient) Use

func (c *UserIdentityClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `useridentity.Hooks(f(g(h())))`.

type UserIdentityConnection

type UserIdentityConnection struct {
	Edges      []*UserIdentityEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

UserIdentityConnection is the connection containing edges to UserIdentity.

type UserIdentityCreate

type UserIdentityCreate struct {
	// contains filtered or unexported fields
}

UserIdentityCreate is the builder for creating a UserIdentity entity.

func (*UserIdentityCreate) Exec

func (uic *UserIdentityCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserIdentityCreate) ExecX

func (uic *UserIdentityCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityCreate) Mutation

func (uic *UserIdentityCreate) Mutation() *UserIdentityMutation

Mutation returns the UserIdentityMutation object of the builder.

func (*UserIdentityCreate) OnConflict

func (uic *UserIdentityCreate) OnConflict(opts ...sql.ConflictOption) *UserIdentityUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserIdentity.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserIdentityUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserIdentityCreate) OnConflictColumns

func (uic *UserIdentityCreate) OnConflictColumns(columns ...string) *UserIdentityUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserIdentity.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserIdentityCreate) Save

Save creates the UserIdentity in the database.

func (*UserIdentityCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserIdentityCreate) SetCode

func (uic *UserIdentityCreate) SetCode(s string) *UserIdentityCreate

SetCode sets the "code" field.

func (*UserIdentityCreate) SetCodeExtend

func (uic *UserIdentityCreate) SetCodeExtend(s string) *UserIdentityCreate

SetCodeExtend sets the "code_extend" field.

func (*UserIdentityCreate) SetCreatedAt

func (uic *UserIdentityCreate) SetCreatedAt(t time.Time) *UserIdentityCreate

SetCreatedAt sets the "created_at" field.

func (*UserIdentityCreate) SetCreatedBy

func (uic *UserIdentityCreate) SetCreatedBy(i int) *UserIdentityCreate

SetCreatedBy sets the "created_by" field.

func (*UserIdentityCreate) SetID

func (uic *UserIdentityCreate) SetID(i int) *UserIdentityCreate

SetID sets the "id" field.

func (*UserIdentityCreate) SetInput

SetInput applies the change-set in the CreateUserIdentityInput on the UserIdentityCreate builder.

func (*UserIdentityCreate) SetKind

SetKind sets the "kind" field.

func (*UserIdentityCreate) SetNillableCode

func (uic *UserIdentityCreate) SetNillableCode(s *string) *UserIdentityCreate

SetNillableCode sets the "code" field if the given value is not nil.

func (*UserIdentityCreate) SetNillableCodeExtend

func (uic *UserIdentityCreate) SetNillableCodeExtend(s *string) *UserIdentityCreate

SetNillableCodeExtend sets the "code_extend" field if the given value is not nil.

func (*UserIdentityCreate) SetNillableCreatedAt

func (uic *UserIdentityCreate) SetNillableCreatedAt(t *time.Time) *UserIdentityCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserIdentityCreate) SetNillableStatus

func (uic *UserIdentityCreate) SetNillableStatus(ts *typex.SimpleStatus) *UserIdentityCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserIdentityCreate) SetNillableUpdatedAt

func (uic *UserIdentityCreate) SetNillableUpdatedAt(t *time.Time) *UserIdentityCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserIdentityCreate) SetNillableUpdatedBy

func (uic *UserIdentityCreate) SetNillableUpdatedBy(i *int) *UserIdentityCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserIdentityCreate) SetNillableUserID

func (uic *UserIdentityCreate) SetNillableUserID(i *int) *UserIdentityCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*UserIdentityCreate) SetStatus

SetStatus sets the "status" field.

func (*UserIdentityCreate) SetUpdatedAt

func (uic *UserIdentityCreate) SetUpdatedAt(t time.Time) *UserIdentityCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserIdentityCreate) SetUpdatedBy

func (uic *UserIdentityCreate) SetUpdatedBy(i int) *UserIdentityCreate

SetUpdatedBy sets the "updated_by" field.

func (*UserIdentityCreate) SetUser

func (uic *UserIdentityCreate) SetUser(u *User) *UserIdentityCreate

SetUser sets the "user" edge to the User entity.

func (*UserIdentityCreate) SetUserID

func (uic *UserIdentityCreate) SetUserID(i int) *UserIdentityCreate

SetUserID sets the "user_id" field.

type UserIdentityCreateBulk

type UserIdentityCreateBulk struct {
	// contains filtered or unexported fields
}

UserIdentityCreateBulk is the builder for creating many UserIdentity entities in bulk.

func (*UserIdentityCreateBulk) Exec

func (uicb *UserIdentityCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserIdentityCreateBulk) ExecX

func (uicb *UserIdentityCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserIdentity.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserIdentityUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserIdentityCreateBulk) OnConflictColumns

func (uicb *UserIdentityCreateBulk) OnConflictColumns(columns ...string) *UserIdentityUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserIdentity.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserIdentityCreateBulk) Save

Save creates the UserIdentity entities in the database.

func (*UserIdentityCreateBulk) SaveX

func (uicb *UserIdentityCreateBulk) SaveX(ctx context.Context) []*UserIdentity

SaveX is like Save, but panics if an error occurs.

type UserIdentityDelete

type UserIdentityDelete struct {
	// contains filtered or unexported fields
}

UserIdentityDelete is the builder for deleting a UserIdentity entity.

func (*UserIdentityDelete) Exec

func (uid *UserIdentityDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserIdentityDelete) ExecX

func (uid *UserIdentityDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityDelete) Where

Where appends a list predicates to the UserIdentityDelete builder.

type UserIdentityDeleteOne

type UserIdentityDeleteOne struct {
	// contains filtered or unexported fields
}

UserIdentityDeleteOne is the builder for deleting a single UserIdentity entity.

func (*UserIdentityDeleteOne) Exec

func (uido *UserIdentityDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserIdentityDeleteOne) ExecX

func (uido *UserIdentityDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityDeleteOne) Where

Where appends a list predicates to the UserIdentityDelete builder.

type UserIdentityEdge

type UserIdentityEdge struct {
	Node   *UserIdentity `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

UserIdentityEdge is the edge representation of UserIdentity.

type UserIdentityEdges

type UserIdentityEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

UserIdentityEdges holds the relations/edges for other nodes in the graph.

func (UserIdentityEdges) UserOrErr

func (e UserIdentityEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserIdentityGroupBy

type UserIdentityGroupBy struct {
	// contains filtered or unexported fields
}

UserIdentityGroupBy is the group-by builder for UserIdentity entities.

func (*UserIdentityGroupBy) Aggregate

func (uigb *UserIdentityGroupBy) Aggregate(fns ...AggregateFunc) *UserIdentityGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserIdentityGroupBy) Bool

func (s *UserIdentityGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) BoolX

func (s *UserIdentityGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserIdentityGroupBy) Bools

func (s *UserIdentityGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) BoolsX

func (s *UserIdentityGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserIdentityGroupBy) Float64

func (s *UserIdentityGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) Float64X

func (s *UserIdentityGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserIdentityGroupBy) Float64s

func (s *UserIdentityGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) Float64sX

func (s *UserIdentityGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserIdentityGroupBy) Int

func (s *UserIdentityGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) IntX

func (s *UserIdentityGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserIdentityGroupBy) Ints

func (s *UserIdentityGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) IntsX

func (s *UserIdentityGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserIdentityGroupBy) Scan

func (uigb *UserIdentityGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserIdentityGroupBy) ScanX

func (s *UserIdentityGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserIdentityGroupBy) String

func (s *UserIdentityGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) StringX

func (s *UserIdentityGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserIdentityGroupBy) Strings

func (s *UserIdentityGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserIdentityGroupBy) StringsX

func (s *UserIdentityGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserIdentityMutation

type UserIdentityMutation struct {
	// contains filtered or unexported fields
}

UserIdentityMutation represents an operation that mutates the UserIdentity nodes in the graph.

func (*UserIdentityMutation) AddCreatedBy

func (m *UserIdentityMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*UserIdentityMutation) AddField

func (m *UserIdentityMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserIdentityMutation) AddUpdatedBy

func (m *UserIdentityMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*UserIdentityMutation) AddedCreatedBy

func (m *UserIdentityMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*UserIdentityMutation) AddedEdges

func (m *UserIdentityMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserIdentityMutation) AddedField

func (m *UserIdentityMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserIdentityMutation) AddedFields

func (m *UserIdentityMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserIdentityMutation) AddedIDs

func (m *UserIdentityMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserIdentityMutation) AddedUpdatedBy

func (m *UserIdentityMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*UserIdentityMutation) ClearCode

func (m *UserIdentityMutation) ClearCode()

ClearCode clears the value of the "code" field.

func (*UserIdentityMutation) ClearCodeExtend

func (m *UserIdentityMutation) ClearCodeExtend()

ClearCodeExtend clears the value of the "code_extend" field.

func (*UserIdentityMutation) ClearEdge

func (m *UserIdentityMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserIdentityMutation) ClearField

func (m *UserIdentityMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserIdentityMutation) ClearStatus

func (m *UserIdentityMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*UserIdentityMutation) ClearUpdatedAt

func (m *UserIdentityMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserIdentityMutation) ClearUpdatedBy

func (m *UserIdentityMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserIdentityMutation) ClearUser

func (m *UserIdentityMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserIdentityMutation) ClearUserID

func (m *UserIdentityMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*UserIdentityMutation) ClearedEdges

func (m *UserIdentityMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserIdentityMutation) ClearedFields

func (m *UserIdentityMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserIdentityMutation) Client

func (m UserIdentityMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserIdentityMutation) Code

func (m *UserIdentityMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*UserIdentityMutation) CodeCleared

func (m *UserIdentityMutation) CodeCleared() bool

CodeCleared returns if the "code" field was cleared in this mutation.

func (*UserIdentityMutation) CodeExtend

func (m *UserIdentityMutation) CodeExtend() (r string, exists bool)

CodeExtend returns the value of the "code_extend" field in the mutation.

func (*UserIdentityMutation) CodeExtendCleared

func (m *UserIdentityMutation) CodeExtendCleared() bool

CodeExtendCleared returns if the "code_extend" field was cleared in this mutation.

func (*UserIdentityMutation) CreatedAt

func (m *UserIdentityMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserIdentityMutation) CreatedBy

func (m *UserIdentityMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*UserIdentityMutation) EdgeCleared

func (m *UserIdentityMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserIdentityMutation) Field

func (m *UserIdentityMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserIdentityMutation) FieldCleared

func (m *UserIdentityMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserIdentityMutation) Fields

func (m *UserIdentityMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserIdentityMutation) ID

func (m *UserIdentityMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserIdentityMutation) IDs

func (m *UserIdentityMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserIdentityMutation) Kind

func (m *UserIdentityMutation) Kind() (r useridentity.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*UserIdentityMutation) OldCode

func (m *UserIdentityMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldCodeExtend

func (m *UserIdentityMutation) OldCodeExtend(ctx context.Context) (v string, err error)

OldCodeExtend returns the old "code_extend" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldCreatedAt

func (m *UserIdentityMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldCreatedBy

func (m *UserIdentityMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldField

func (m *UserIdentityMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserIdentityMutation) OldKind

func (m *UserIdentityMutation) OldKind(ctx context.Context) (v useridentity.Kind, err error)

OldKind returns the old "kind" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldStatus

func (m *UserIdentityMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldUpdatedAt

func (m *UserIdentityMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldUpdatedBy

func (m *UserIdentityMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) OldUserID

func (m *UserIdentityMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the UserIdentity entity. If the UserIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserIdentityMutation) Op

func (m *UserIdentityMutation) Op() Op

Op returns the operation name.

func (*UserIdentityMutation) RemovedEdges

func (m *UserIdentityMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserIdentityMutation) RemovedIDs

func (m *UserIdentityMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserIdentityMutation) ResetCode

func (m *UserIdentityMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*UserIdentityMutation) ResetCodeExtend

func (m *UserIdentityMutation) ResetCodeExtend()

ResetCodeExtend resets all changes to the "code_extend" field.

func (*UserIdentityMutation) ResetCreatedAt

func (m *UserIdentityMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserIdentityMutation) ResetCreatedBy

func (m *UserIdentityMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*UserIdentityMutation) ResetEdge

func (m *UserIdentityMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserIdentityMutation) ResetField

func (m *UserIdentityMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserIdentityMutation) ResetKind

func (m *UserIdentityMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*UserIdentityMutation) ResetStatus

func (m *UserIdentityMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*UserIdentityMutation) ResetUpdatedAt

func (m *UserIdentityMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserIdentityMutation) ResetUpdatedBy

func (m *UserIdentityMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*UserIdentityMutation) ResetUser

func (m *UserIdentityMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserIdentityMutation) ResetUserID

func (m *UserIdentityMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UserIdentityMutation) SetCode

func (m *UserIdentityMutation) SetCode(s string)

SetCode sets the "code" field.

func (*UserIdentityMutation) SetCodeExtend

func (m *UserIdentityMutation) SetCodeExtend(s string)

SetCodeExtend sets the "code_extend" field.

func (*UserIdentityMutation) SetCreatedAt

func (m *UserIdentityMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserIdentityMutation) SetCreatedBy

func (m *UserIdentityMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*UserIdentityMutation) SetField

func (m *UserIdentityMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserIdentityMutation) SetID

func (m *UserIdentityMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UserIdentity entities.

func (*UserIdentityMutation) SetKind

func (m *UserIdentityMutation) SetKind(u useridentity.Kind)

SetKind sets the "kind" field.

func (*UserIdentityMutation) SetOp

func (m *UserIdentityMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserIdentityMutation) SetStatus

func (m *UserIdentityMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*UserIdentityMutation) SetUpdatedAt

func (m *UserIdentityMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserIdentityMutation) SetUpdatedBy

func (m *UserIdentityMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*UserIdentityMutation) SetUserID

func (m *UserIdentityMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*UserIdentityMutation) Status

func (m *UserIdentityMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*UserIdentityMutation) StatusCleared

func (m *UserIdentityMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (UserIdentityMutation) Tx

func (m UserIdentityMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserIdentityMutation) Type

func (m *UserIdentityMutation) Type() string

Type returns the node type of this mutation (UserIdentity).

func (*UserIdentityMutation) UpdatedAt

func (m *UserIdentityMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserIdentityMutation) UpdatedAtCleared

func (m *UserIdentityMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*UserIdentityMutation) UpdatedBy

func (m *UserIdentityMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*UserIdentityMutation) UpdatedByCleared

func (m *UserIdentityMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*UserIdentityMutation) UserCleared

func (m *UserIdentityMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserIdentityMutation) UserID

func (m *UserIdentityMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UserIdentityMutation) UserIDCleared

func (m *UserIdentityMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*UserIdentityMutation) UserIDs

func (m *UserIdentityMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserIdentityMutation) Where

Where appends a list predicates to the UserIdentityMutation builder.

func (*UserIdentityMutation) WhereP

func (m *UserIdentityMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserIdentityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserIdentityOrder

type UserIdentityOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *UserIdentityOrderField `json:"field"`
}

UserIdentityOrder defines the ordering of UserIdentity.

type UserIdentityOrderField

type UserIdentityOrderField struct {
	// Value extracts the ordering value from the given UserIdentity.
	Value func(*UserIdentity) (ent.Value, error)
	// contains filtered or unexported fields
}

UserIdentityOrderField defines the ordering field of UserIdentity.

func (UserIdentityOrderField) MarshalGQL

func (f UserIdentityOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserIdentityOrderField) String

func (f UserIdentityOrderField) String() string

String implement fmt.Stringer interface.

func (*UserIdentityOrderField) UnmarshalGQL

func (f *UserIdentityOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserIdentityPaginateOption

type UserIdentityPaginateOption func(*useridentityPager) error

UserIdentityPaginateOption enables pagination customization.

func WithUserIdentityFilter

func WithUserIdentityFilter(filter func(*UserIdentityQuery) (*UserIdentityQuery, error)) UserIdentityPaginateOption

WithUserIdentityFilter configures pagination filter.

func WithUserIdentityOrder

func WithUserIdentityOrder(order *UserIdentityOrder) UserIdentityPaginateOption

WithUserIdentityOrder configures pagination ordering.

type UserIdentityQuery

type UserIdentityQuery struct {
	// contains filtered or unexported fields
}

UserIdentityQuery is the builder for querying UserIdentity entities.

func (*UserIdentityQuery) Aggregate

func (uiq *UserIdentityQuery) Aggregate(fns ...AggregateFunc) *UserIdentitySelect

Aggregate returns a UserIdentitySelect configured with the given aggregations.

func (*UserIdentityQuery) All

func (uiq *UserIdentityQuery) All(ctx context.Context) ([]*UserIdentity, error)

All executes the query and returns a list of UserIdentities.

func (*UserIdentityQuery) AllX

func (uiq *UserIdentityQuery) AllX(ctx context.Context) []*UserIdentity

AllX is like All, but panics if an error occurs.

func (*UserIdentityQuery) Clone

func (uiq *UserIdentityQuery) Clone() *UserIdentityQuery

Clone returns a duplicate of the UserIdentityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserIdentityQuery) CollectFields

func (ui *UserIdentityQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserIdentityQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserIdentityQuery) Count

func (uiq *UserIdentityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserIdentityQuery) CountX

func (uiq *UserIdentityQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserIdentityQuery) Exist

func (uiq *UserIdentityQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserIdentityQuery) ExistX

func (uiq *UserIdentityQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserIdentityQuery) First

func (uiq *UserIdentityQuery) First(ctx context.Context) (*UserIdentity, error)

First returns the first UserIdentity entity from the query. Returns a *NotFoundError when no UserIdentity was found.

func (*UserIdentityQuery) FirstID

func (uiq *UserIdentityQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserIdentity ID from the query. Returns a *NotFoundError when no UserIdentity ID was found.

func (*UserIdentityQuery) FirstIDX

func (uiq *UserIdentityQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserIdentityQuery) FirstX

func (uiq *UserIdentityQuery) FirstX(ctx context.Context) *UserIdentity

FirstX is like First, but panics if an error occurs.

func (*UserIdentityQuery) GroupBy

func (uiq *UserIdentityQuery) GroupBy(field string, fields ...string) *UserIdentityGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserIdentity.Query().
	GroupBy(useridentity.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserIdentityQuery) IDs

func (uiq *UserIdentityQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserIdentity IDs.

func (*UserIdentityQuery) IDsX

func (uiq *UserIdentityQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserIdentityQuery) Limit

func (uiq *UserIdentityQuery) Limit(limit int) *UserIdentityQuery

Limit the number of records to be returned by this query.

func (*UserIdentityQuery) Offset

func (uiq *UserIdentityQuery) Offset(offset int) *UserIdentityQuery

Offset to start from.

func (*UserIdentityQuery) Only

func (uiq *UserIdentityQuery) Only(ctx context.Context) (*UserIdentity, error)

Only returns a single UserIdentity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserIdentity entity is found. Returns a *NotFoundError when no UserIdentity entities are found.

func (*UserIdentityQuery) OnlyID

func (uiq *UserIdentityQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserIdentity ID in the query. Returns a *NotSingularError when more than one UserIdentity ID is found. Returns a *NotFoundError when no entities are found.

func (*UserIdentityQuery) OnlyIDX

func (uiq *UserIdentityQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserIdentityQuery) OnlyX

func (uiq *UserIdentityQuery) OnlyX(ctx context.Context) *UserIdentity

OnlyX is like Only, but panics if an error occurs.

func (*UserIdentityQuery) Order

Order specifies how the records should be ordered.

func (*UserIdentityQuery) Paginate

func (ui *UserIdentityQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserIdentityPaginateOption,
) (*UserIdentityConnection, error)

Paginate executes the query and returns a relay based cursor connection to UserIdentity.

func (*UserIdentityQuery) QueryUser

func (uiq *UserIdentityQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserIdentityQuery) Select

func (uiq *UserIdentityQuery) Select(fields ...string) *UserIdentitySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.UserIdentity.Query().
	Select(useridentity.FieldCreatedBy).
	Scan(ctx, &v)

func (*UserIdentityQuery) Unique

func (uiq *UserIdentityQuery) Unique(unique bool) *UserIdentityQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserIdentityQuery) Where

Where adds a new predicate for the UserIdentityQuery builder.

func (*UserIdentityQuery) WithUser

func (uiq *UserIdentityQuery) WithUser(opts ...func(*UserQuery)) *UserIdentityQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserIdentitySelect

type UserIdentitySelect struct {
	*UserIdentityQuery
	// contains filtered or unexported fields
}

UserIdentitySelect is the builder for selecting fields of UserIdentity entities.

func (*UserIdentitySelect) Aggregate

func (uis *UserIdentitySelect) Aggregate(fns ...AggregateFunc) *UserIdentitySelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserIdentitySelect) Bool

func (s *UserIdentitySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) BoolX

func (s *UserIdentitySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserIdentitySelect) Bools

func (s *UserIdentitySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) BoolsX

func (s *UserIdentitySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserIdentitySelect) Float64

func (s *UserIdentitySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) Float64X

func (s *UserIdentitySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserIdentitySelect) Float64s

func (s *UserIdentitySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) Float64sX

func (s *UserIdentitySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserIdentitySelect) Int

func (s *UserIdentitySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) IntX

func (s *UserIdentitySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserIdentitySelect) Ints

func (s *UserIdentitySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) IntsX

func (s *UserIdentitySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserIdentitySelect) Scan

func (uis *UserIdentitySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserIdentitySelect) ScanX

func (s *UserIdentitySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserIdentitySelect) String

func (s *UserIdentitySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) StringX

func (s *UserIdentitySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserIdentitySelect) Strings

func (s *UserIdentitySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserIdentitySelect) StringsX

func (s *UserIdentitySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserIdentityUpdate

type UserIdentityUpdate struct {
	// contains filtered or unexported fields
}

UserIdentityUpdate is the builder for updating UserIdentity entities.

func (*UserIdentityUpdate) AddUpdatedBy

func (uiu *UserIdentityUpdate) AddUpdatedBy(i int) *UserIdentityUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*UserIdentityUpdate) ClearCode

func (uiu *UserIdentityUpdate) ClearCode() *UserIdentityUpdate

ClearCode clears the value of the "code" field.

func (*UserIdentityUpdate) ClearCodeExtend

func (uiu *UserIdentityUpdate) ClearCodeExtend() *UserIdentityUpdate

ClearCodeExtend clears the value of the "code_extend" field.

func (*UserIdentityUpdate) ClearStatus

func (uiu *UserIdentityUpdate) ClearStatus() *UserIdentityUpdate

ClearStatus clears the value of the "status" field.

func (*UserIdentityUpdate) ClearUpdatedAt

func (uiu *UserIdentityUpdate) ClearUpdatedAt() *UserIdentityUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserIdentityUpdate) ClearUpdatedBy

func (uiu *UserIdentityUpdate) ClearUpdatedBy() *UserIdentityUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserIdentityUpdate) Exec

func (uiu *UserIdentityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserIdentityUpdate) ExecX

func (uiu *UserIdentityUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityUpdate) Mutation

func (uiu *UserIdentityUpdate) Mutation() *UserIdentityMutation

Mutation returns the UserIdentityMutation object of the builder.

func (*UserIdentityUpdate) Save

func (uiu *UserIdentityUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserIdentityUpdate) SaveX

func (uiu *UserIdentityUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserIdentityUpdate) SetCode

func (uiu *UserIdentityUpdate) SetCode(s string) *UserIdentityUpdate

SetCode sets the "code" field.

func (*UserIdentityUpdate) SetCodeExtend

func (uiu *UserIdentityUpdate) SetCodeExtend(s string) *UserIdentityUpdate

SetCodeExtend sets the "code_extend" field.

func (*UserIdentityUpdate) SetInput

SetInput applies the change-set in the UpdateUserIdentityInput on the UserIdentityUpdate builder.

func (*UserIdentityUpdate) SetKind

SetKind sets the "kind" field.

func (*UserIdentityUpdate) SetNillableCode

func (uiu *UserIdentityUpdate) SetNillableCode(s *string) *UserIdentityUpdate

SetNillableCode sets the "code" field if the given value is not nil.

func (*UserIdentityUpdate) SetNillableCodeExtend

func (uiu *UserIdentityUpdate) SetNillableCodeExtend(s *string) *UserIdentityUpdate

SetNillableCodeExtend sets the "code_extend" field if the given value is not nil.

func (*UserIdentityUpdate) SetNillableStatus

func (uiu *UserIdentityUpdate) SetNillableStatus(ts *typex.SimpleStatus) *UserIdentityUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserIdentityUpdate) SetNillableUpdatedAt

func (uiu *UserIdentityUpdate) SetNillableUpdatedAt(t *time.Time) *UserIdentityUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserIdentityUpdate) SetNillableUpdatedBy

func (uiu *UserIdentityUpdate) SetNillableUpdatedBy(i *int) *UserIdentityUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserIdentityUpdate) SetStatus

SetStatus sets the "status" field.

func (*UserIdentityUpdate) SetUpdatedAt

func (uiu *UserIdentityUpdate) SetUpdatedAt(t time.Time) *UserIdentityUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserIdentityUpdate) SetUpdatedBy

func (uiu *UserIdentityUpdate) SetUpdatedBy(i int) *UserIdentityUpdate

SetUpdatedBy sets the "updated_by" field.

func (*UserIdentityUpdate) Where

Where appends a list predicates to the UserIdentityUpdate builder.

type UserIdentityUpdateOne

type UserIdentityUpdateOne struct {
	// contains filtered or unexported fields
}

UserIdentityUpdateOne is the builder for updating a single UserIdentity entity.

func (*UserIdentityUpdateOne) AddUpdatedBy

func (uiuo *UserIdentityUpdateOne) AddUpdatedBy(i int) *UserIdentityUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*UserIdentityUpdateOne) ClearCode

func (uiuo *UserIdentityUpdateOne) ClearCode() *UserIdentityUpdateOne

ClearCode clears the value of the "code" field.

func (*UserIdentityUpdateOne) ClearCodeExtend

func (uiuo *UserIdentityUpdateOne) ClearCodeExtend() *UserIdentityUpdateOne

ClearCodeExtend clears the value of the "code_extend" field.

func (*UserIdentityUpdateOne) ClearStatus

func (uiuo *UserIdentityUpdateOne) ClearStatus() *UserIdentityUpdateOne

ClearStatus clears the value of the "status" field.

func (*UserIdentityUpdateOne) ClearUpdatedAt

func (uiuo *UserIdentityUpdateOne) ClearUpdatedAt() *UserIdentityUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserIdentityUpdateOne) ClearUpdatedBy

func (uiuo *UserIdentityUpdateOne) ClearUpdatedBy() *UserIdentityUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserIdentityUpdateOne) Exec

func (uiuo *UserIdentityUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserIdentityUpdateOne) ExecX

func (uiuo *UserIdentityUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityUpdateOne) Mutation

func (uiuo *UserIdentityUpdateOne) Mutation() *UserIdentityMutation

Mutation returns the UserIdentityMutation object of the builder.

func (*UserIdentityUpdateOne) Save

Save executes the query and returns the updated UserIdentity entity.

func (*UserIdentityUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserIdentityUpdateOne) Select

func (uiuo *UserIdentityUpdateOne) Select(field string, fields ...string) *UserIdentityUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserIdentityUpdateOne) SetCode

SetCode sets the "code" field.

func (*UserIdentityUpdateOne) SetCodeExtend

func (uiuo *UserIdentityUpdateOne) SetCodeExtend(s string) *UserIdentityUpdateOne

SetCodeExtend sets the "code_extend" field.

func (*UserIdentityUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserIdentityInput on the UserIdentityUpdateOne builder.

func (*UserIdentityUpdateOne) SetKind

SetKind sets the "kind" field.

func (*UserIdentityUpdateOne) SetNillableCode

func (uiuo *UserIdentityUpdateOne) SetNillableCode(s *string) *UserIdentityUpdateOne

SetNillableCode sets the "code" field if the given value is not nil.

func (*UserIdentityUpdateOne) SetNillableCodeExtend

func (uiuo *UserIdentityUpdateOne) SetNillableCodeExtend(s *string) *UserIdentityUpdateOne

SetNillableCodeExtend sets the "code_extend" field if the given value is not nil.

func (*UserIdentityUpdateOne) SetNillableStatus

func (uiuo *UserIdentityUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *UserIdentityUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserIdentityUpdateOne) SetNillableUpdatedAt

func (uiuo *UserIdentityUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserIdentityUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserIdentityUpdateOne) SetNillableUpdatedBy

func (uiuo *UserIdentityUpdateOne) SetNillableUpdatedBy(i *int) *UserIdentityUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserIdentityUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*UserIdentityUpdateOne) SetUpdatedAt

func (uiuo *UserIdentityUpdateOne) SetUpdatedAt(t time.Time) *UserIdentityUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserIdentityUpdateOne) SetUpdatedBy

func (uiuo *UserIdentityUpdateOne) SetUpdatedBy(i int) *UserIdentityUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*UserIdentityUpdateOne) Where

Where appends a list predicates to the UserIdentityUpdate builder.

type UserIdentityUpsert

type UserIdentityUpsert struct {
	*sql.UpdateSet
}

UserIdentityUpsert is the "OnConflict" setter.

func (*UserIdentityUpsert) AddUpdatedBy

func (u *UserIdentityUpsert) AddUpdatedBy(v int) *UserIdentityUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*UserIdentityUpsert) ClearCode

func (u *UserIdentityUpsert) ClearCode() *UserIdentityUpsert

ClearCode clears the value of the "code" field.

func (*UserIdentityUpsert) ClearCodeExtend

func (u *UserIdentityUpsert) ClearCodeExtend() *UserIdentityUpsert

ClearCodeExtend clears the value of the "code_extend" field.

func (*UserIdentityUpsert) ClearStatus

func (u *UserIdentityUpsert) ClearStatus() *UserIdentityUpsert

ClearStatus clears the value of the "status" field.

func (*UserIdentityUpsert) ClearUpdatedAt

func (u *UserIdentityUpsert) ClearUpdatedAt() *UserIdentityUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserIdentityUpsert) ClearUpdatedBy

func (u *UserIdentityUpsert) ClearUpdatedBy() *UserIdentityUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserIdentityUpsert) SetCode

SetCode sets the "code" field.

func (*UserIdentityUpsert) SetCodeExtend

func (u *UserIdentityUpsert) SetCodeExtend(v string) *UserIdentityUpsert

SetCodeExtend sets the "code_extend" field.

func (*UserIdentityUpsert) SetKind

SetKind sets the "kind" field.

func (*UserIdentityUpsert) SetStatus

SetStatus sets the "status" field.

func (*UserIdentityUpsert) SetUpdatedAt

func (u *UserIdentityUpsert) SetUpdatedAt(v time.Time) *UserIdentityUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserIdentityUpsert) SetUpdatedBy

func (u *UserIdentityUpsert) SetUpdatedBy(v int) *UserIdentityUpsert

SetUpdatedBy sets the "updated_by" field.

func (*UserIdentityUpsert) UpdateCode

func (u *UserIdentityUpsert) UpdateCode() *UserIdentityUpsert

UpdateCode sets the "code" field to the value that was provided on create.

func (*UserIdentityUpsert) UpdateCodeExtend

func (u *UserIdentityUpsert) UpdateCodeExtend() *UserIdentityUpsert

UpdateCodeExtend sets the "code_extend" field to the value that was provided on create.

func (*UserIdentityUpsert) UpdateKind

func (u *UserIdentityUpsert) UpdateKind() *UserIdentityUpsert

UpdateKind sets the "kind" field to the value that was provided on create.

func (*UserIdentityUpsert) UpdateStatus

func (u *UserIdentityUpsert) UpdateStatus() *UserIdentityUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserIdentityUpsert) UpdateUpdatedAt

func (u *UserIdentityUpsert) UpdateUpdatedAt() *UserIdentityUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserIdentityUpsert) UpdateUpdatedBy

func (u *UserIdentityUpsert) UpdateUpdatedBy() *UserIdentityUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserIdentityUpsertBulk

type UserIdentityUpsertBulk struct {
	// contains filtered or unexported fields
}

UserIdentityUpsertBulk is the builder for "upsert"-ing a bulk of UserIdentity nodes.

func (*UserIdentityUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserIdentityUpsertBulk) ClearCode

ClearCode clears the value of the "code" field.

func (*UserIdentityUpsertBulk) ClearCodeExtend

func (u *UserIdentityUpsertBulk) ClearCodeExtend() *UserIdentityUpsertBulk

ClearCodeExtend clears the value of the "code_extend" field.

func (*UserIdentityUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*UserIdentityUpsertBulk) ClearUpdatedAt

func (u *UserIdentityUpsertBulk) ClearUpdatedAt() *UserIdentityUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserIdentityUpsertBulk) ClearUpdatedBy

func (u *UserIdentityUpsertBulk) ClearUpdatedBy() *UserIdentityUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserIdentityUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserIdentityUpsertBulk) Exec

Exec executes the query.

func (*UserIdentityUpsertBulk) ExecX

func (u *UserIdentityUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserIdentity.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserIdentityUpsertBulk) SetCode

SetCode sets the "code" field.

func (*UserIdentityUpsertBulk) SetCodeExtend

SetCodeExtend sets the "code_extend" field.

func (*UserIdentityUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*UserIdentityUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*UserIdentityUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserIdentityUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserIdentityUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserIdentityCreateBulk.OnConflict documentation for more info.

func (*UserIdentityUpsertBulk) UpdateCode

UpdateCode sets the "code" field to the value that was provided on create.

func (*UserIdentityUpsertBulk) UpdateCodeExtend

func (u *UserIdentityUpsertBulk) UpdateCodeExtend() *UserIdentityUpsertBulk

UpdateCodeExtend sets the "code_extend" field to the value that was provided on create.

func (*UserIdentityUpsertBulk) UpdateKind

UpdateKind sets the "kind" field to the value that was provided on create.

func (*UserIdentityUpsertBulk) UpdateNewValues

func (u *UserIdentityUpsertBulk) UpdateNewValues() *UserIdentityUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserIdentity.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(useridentity.FieldID)
		}),
	).
	Exec(ctx)

func (*UserIdentityUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserIdentityUpsertBulk) UpdateUpdatedAt

func (u *UserIdentityUpsertBulk) UpdateUpdatedAt() *UserIdentityUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserIdentityUpsertBulk) UpdateUpdatedBy

func (u *UserIdentityUpsertBulk) UpdateUpdatedBy() *UserIdentityUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserIdentityUpsertOne

type UserIdentityUpsertOne struct {
	// contains filtered or unexported fields
}

UserIdentityUpsertOne is the builder for "upsert"-ing

one UserIdentity node.

func (*UserIdentityUpsertOne) AddUpdatedBy

func (u *UserIdentityUpsertOne) AddUpdatedBy(v int) *UserIdentityUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*UserIdentityUpsertOne) ClearCode

ClearCode clears the value of the "code" field.

func (*UserIdentityUpsertOne) ClearCodeExtend

func (u *UserIdentityUpsertOne) ClearCodeExtend() *UserIdentityUpsertOne

ClearCodeExtend clears the value of the "code_extend" field.

func (*UserIdentityUpsertOne) ClearStatus

func (u *UserIdentityUpsertOne) ClearStatus() *UserIdentityUpsertOne

ClearStatus clears the value of the "status" field.

func (*UserIdentityUpsertOne) ClearUpdatedAt

func (u *UserIdentityUpsertOne) ClearUpdatedAt() *UserIdentityUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserIdentityUpsertOne) ClearUpdatedBy

func (u *UserIdentityUpsertOne) ClearUpdatedBy() *UserIdentityUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserIdentityUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserIdentityUpsertOne) Exec

Exec executes the query.

func (*UserIdentityUpsertOne) ExecX

func (u *UserIdentityUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityUpsertOne) ID

func (u *UserIdentityUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserIdentityUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserIdentityUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserIdentity.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserIdentityUpsertOne) SetCode

SetCode sets the "code" field.

func (*UserIdentityUpsertOne) SetCodeExtend

func (u *UserIdentityUpsertOne) SetCodeExtend(v string) *UserIdentityUpsertOne

SetCodeExtend sets the "code_extend" field.

func (*UserIdentityUpsertOne) SetKind

SetKind sets the "kind" field.

func (*UserIdentityUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*UserIdentityUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserIdentityUpsertOne) SetUpdatedBy

func (u *UserIdentityUpsertOne) SetUpdatedBy(v int) *UserIdentityUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*UserIdentityUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserIdentityCreate.OnConflict documentation for more info.

func (*UserIdentityUpsertOne) UpdateCode

UpdateCode sets the "code" field to the value that was provided on create.

func (*UserIdentityUpsertOne) UpdateCodeExtend

func (u *UserIdentityUpsertOne) UpdateCodeExtend() *UserIdentityUpsertOne

UpdateCodeExtend sets the "code_extend" field to the value that was provided on create.

func (*UserIdentityUpsertOne) UpdateKind

UpdateKind sets the "kind" field to the value that was provided on create.

func (*UserIdentityUpsertOne) UpdateNewValues

func (u *UserIdentityUpsertOne) UpdateNewValues() *UserIdentityUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.UserIdentity.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(useridentity.FieldID)
		}),
	).
	Exec(ctx)

func (*UserIdentityUpsertOne) UpdateStatus

func (u *UserIdentityUpsertOne) UpdateStatus() *UserIdentityUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserIdentityUpsertOne) UpdateUpdatedAt

func (u *UserIdentityUpsertOne) UpdateUpdatedAt() *UserIdentityUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserIdentityUpsertOne) UpdateUpdatedBy

func (u *UserIdentityUpsertOne) UpdateUpdatedBy() *UserIdentityUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserIdentityWhereInput

type UserIdentityWhereInput struct {
	Predicates []predicate.UserIdentity  `json:"-"`
	Not        *UserIdentityWhereInput   `json:"not,omitempty"`
	Or         []*UserIdentityWhereInput `json:"or,omitempty"`
	And        []*UserIdentityWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "user_id" field predicates.
	UserID       *int  `json:"userID,omitempty"`
	UserIDNEQ    *int  `json:"userIDNEQ,omitempty"`
	UserIDIn     []int `json:"userIDIn,omitempty"`
	UserIDNotIn  []int `json:"userIDNotIn,omitempty"`
	UserIDIsNil  bool  `json:"userIDIsNil,omitempty"`
	UserIDNotNil bool  `json:"userIDNotNil,omitempty"`

	// "kind" field predicates.
	Kind      *useridentity.Kind  `json:"kind,omitempty"`
	KindNEQ   *useridentity.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []useridentity.Kind `json:"kindIn,omitempty"`
	KindNotIn []useridentity.Kind `json:"kindNotIn,omitempty"`

	// "code" field predicates.
	Code             *string  `json:"code,omitempty"`
	CodeNEQ          *string  `json:"codeNEQ,omitempty"`
	CodeIn           []string `json:"codeIn,omitempty"`
	CodeNotIn        []string `json:"codeNotIn,omitempty"`
	CodeGT           *string  `json:"codeGT,omitempty"`
	CodeGTE          *string  `json:"codeGTE,omitempty"`
	CodeLT           *string  `json:"codeLT,omitempty"`
	CodeLTE          *string  `json:"codeLTE,omitempty"`
	CodeContains     *string  `json:"codeContains,omitempty"`
	CodeHasPrefix    *string  `json:"codeHasPrefix,omitempty"`
	CodeHasSuffix    *string  `json:"codeHasSuffix,omitempty"`
	CodeIsNil        bool     `json:"codeIsNil,omitempty"`
	CodeNotNil       bool     `json:"codeNotNil,omitempty"`
	CodeEqualFold    *string  `json:"codeEqualFold,omitempty"`
	CodeContainsFold *string  `json:"codeContainsFold,omitempty"`

	// "code_extend" field predicates.
	CodeExtend             *string  `json:"codeExtend,omitempty"`
	CodeExtendNEQ          *string  `json:"codeExtendNEQ,omitempty"`
	CodeExtendIn           []string `json:"codeExtendIn,omitempty"`
	CodeExtendNotIn        []string `json:"codeExtendNotIn,omitempty"`
	CodeExtendGT           *string  `json:"codeExtendGT,omitempty"`
	CodeExtendGTE          *string  `json:"codeExtendGTE,omitempty"`
	CodeExtendLT           *string  `json:"codeExtendLT,omitempty"`
	CodeExtendLTE          *string  `json:"codeExtendLTE,omitempty"`
	CodeExtendContains     *string  `json:"codeExtendContains,omitempty"`
	CodeExtendHasPrefix    *string  `json:"codeExtendHasPrefix,omitempty"`
	CodeExtendHasSuffix    *string  `json:"codeExtendHasSuffix,omitempty"`
	CodeExtendIsNil        bool     `json:"codeExtendIsNil,omitempty"`
	CodeExtendNotNil       bool     `json:"codeExtendNotNil,omitempty"`
	CodeExtendEqualFold    *string  `json:"codeExtendEqualFold,omitempty"`
	CodeExtendContainsFold *string  `json:"codeExtendContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`
}

UserIdentityWhereInput represents a where input for filtering UserIdentity queries.

func (*UserIdentityWhereInput) AddPredicates

func (i *UserIdentityWhereInput) AddPredicates(predicates ...predicate.UserIdentity)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserIdentityWhereInput) Filter

Filter applies the UserIdentityWhereInput filter on the UserIdentityQuery builder.

func (*UserIdentityWhereInput) P

P returns a predicate for filtering useridentities. An error is returned if the input is empty or invalid.

type UserLoginProfile

type UserLoginProfile struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID int `json:"user_id,omitempty"`
	// LastLoginIP holds the value of the "last_login_ip" field.
	LastLoginIP string `json:"last_login_ip,omitempty"`
	// 最后登陆时间
	LastLoginAt time.Time `json:"last_login_at,omitempty"`
	// 是否允许使用密码登陆控制台
	CanLogin bool `json:"can_login,omitempty"`
	// 设置密码:keep-保持不变,customer-客户自行设置,auto-自动生成
	SetKind userloginprofile.SetKind `json:"set_kind,omitempty"`
	// 下次登陆时需要重置密码
	PasswordReset bool `json:"password_reset,omitempty"`
	// 是否开启设备认证
	VerifyDevice bool `json:"verify_device,omitempty"`
	// 是否开启多因素验证
	MfaEnabled bool `json:"mfa_enabled,omitempty"`
	// 多因素验证密钥BASE32
	MfaSecret string `json:"-"`
	// 多因素验证状态
	MfaStatus typex.SimpleStatus `json:"mfa_status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserLoginProfileQuery when eager-loading is set.
	Edges UserLoginProfileEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserLoginProfile is the model entity for the UserLoginProfile schema.

func (*UserLoginProfile) GlobalID

func (ulp *UserLoginProfile) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given UserLoginProfile node.

func (*UserLoginProfile) IsNode

func (*UserLoginProfile) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*UserLoginProfile) QueryUser

func (ulp *UserLoginProfile) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserLoginProfile entity.

func (*UserLoginProfile) String

func (ulp *UserLoginProfile) String() string

String implements the fmt.Stringer.

func (*UserLoginProfile) ToEdge

ToEdge converts UserLoginProfile into UserLoginProfileEdge.

func (*UserLoginProfile) Unwrap

func (ulp *UserLoginProfile) Unwrap() *UserLoginProfile

Unwrap unwraps the UserLoginProfile entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*UserLoginProfile) Update

Update returns a builder for updating this UserLoginProfile. Note that you need to call UserLoginProfile.Unwrap() before calling this method if this UserLoginProfile was returned from a transaction, and the transaction was committed or rolled back.

func (*UserLoginProfile) User

func (ulp *UserLoginProfile) User(ctx context.Context) (*User, error)

func (*UserLoginProfile) Value

func (ulp *UserLoginProfile) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserLoginProfile. This includes values selected through modifiers, order, etc.

type UserLoginProfileClient

type UserLoginProfileClient struct {
	// contains filtered or unexported fields
}

UserLoginProfileClient is a client for the UserLoginProfile schema.

func NewUserLoginProfileClient

func NewUserLoginProfileClient(c config) *UserLoginProfileClient

NewUserLoginProfileClient returns a client for the UserLoginProfile from the given config.

func (*UserLoginProfileClient) Create

Create returns a builder for creating a UserLoginProfile entity.

func (*UserLoginProfileClient) CreateBulk

CreateBulk returns a builder for creating a bulk of UserLoginProfile entities.

func (*UserLoginProfileClient) Delete

Delete returns a delete builder for UserLoginProfile.

func (*UserLoginProfileClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserLoginProfileClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserLoginProfileClient) Get

Get returns a UserLoginProfile entity by its id.

func (*UserLoginProfileClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserLoginProfileClient) Hooks

func (c *UserLoginProfileClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserLoginProfileClient) Intercept

func (c *UserLoginProfileClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userloginprofile.Intercept(f(g(h())))`.

func (*UserLoginProfileClient) Interceptors

func (c *UserLoginProfileClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserLoginProfileClient) MapCreateBulk

func (c *UserLoginProfileClient) MapCreateBulk(slice any, setFunc func(*UserLoginProfileCreate, int)) *UserLoginProfileCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserLoginProfileClient) Query

Query returns a query builder for UserLoginProfile.

func (*UserLoginProfileClient) QueryUser

QueryUser queries the user edge of a UserLoginProfile.

func (*UserLoginProfileClient) Update

Update returns an update builder for UserLoginProfile.

func (*UserLoginProfileClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserLoginProfileClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*UserLoginProfileClient) Use

func (c *UserLoginProfileClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userloginprofile.Hooks(f(g(h())))`.

type UserLoginProfileConnection

type UserLoginProfileConnection struct {
	Edges      []*UserLoginProfileEdge `json:"edges"`
	PageInfo   PageInfo                `json:"pageInfo"`
	TotalCount int                     `json:"totalCount"`
}

UserLoginProfileConnection is the connection containing edges to UserLoginProfile.

type UserLoginProfileCreate

type UserLoginProfileCreate struct {
	// contains filtered or unexported fields
}

UserLoginProfileCreate is the builder for creating a UserLoginProfile entity.

func (*UserLoginProfileCreate) Exec

func (ulpc *UserLoginProfileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserLoginProfileCreate) ExecX

func (ulpc *UserLoginProfileCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileCreate) Mutation

Mutation returns the UserLoginProfileMutation object of the builder.

func (*UserLoginProfileCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserLoginProfile.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserLoginProfileUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserLoginProfileCreate) OnConflictColumns

func (ulpc *UserLoginProfileCreate) OnConflictColumns(columns ...string) *UserLoginProfileUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserLoginProfile.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserLoginProfileCreate) Save

Save creates the UserLoginProfile in the database.

func (*UserLoginProfileCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserLoginProfileCreate) SetCanLogin

func (ulpc *UserLoginProfileCreate) SetCanLogin(b bool) *UserLoginProfileCreate

SetCanLogin sets the "can_login" field.

func (*UserLoginProfileCreate) SetCreatedAt

func (ulpc *UserLoginProfileCreate) SetCreatedAt(t time.Time) *UserLoginProfileCreate

SetCreatedAt sets the "created_at" field.

func (*UserLoginProfileCreate) SetCreatedBy

func (ulpc *UserLoginProfileCreate) SetCreatedBy(i int) *UserLoginProfileCreate

SetCreatedBy sets the "created_by" field.

func (*UserLoginProfileCreate) SetID

SetID sets the "id" field.

func (*UserLoginProfileCreate) SetInput

SetInput applies the change-set in the CreateUserLoginProfileInput on the UserLoginProfileCreate builder.

func (*UserLoginProfileCreate) SetLastLoginAt

func (ulpc *UserLoginProfileCreate) SetLastLoginAt(t time.Time) *UserLoginProfileCreate

SetLastLoginAt sets the "last_login_at" field.

func (*UserLoginProfileCreate) SetLastLoginIP

func (ulpc *UserLoginProfileCreate) SetLastLoginIP(s string) *UserLoginProfileCreate

SetLastLoginIP sets the "last_login_ip" field.

func (*UserLoginProfileCreate) SetMfaEnabled

func (ulpc *UserLoginProfileCreate) SetMfaEnabled(b bool) *UserLoginProfileCreate

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserLoginProfileCreate) SetMfaSecret

func (ulpc *UserLoginProfileCreate) SetMfaSecret(s string) *UserLoginProfileCreate

SetMfaSecret sets the "mfa_secret" field.

func (*UserLoginProfileCreate) SetMfaStatus

SetMfaStatus sets the "mfa_status" field.

func (*UserLoginProfileCreate) SetNillableCanLogin

func (ulpc *UserLoginProfileCreate) SetNillableCanLogin(b *bool) *UserLoginProfileCreate

SetNillableCanLogin sets the "can_login" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableCreatedAt

func (ulpc *UserLoginProfileCreate) SetNillableCreatedAt(t *time.Time) *UserLoginProfileCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableLastLoginAt

func (ulpc *UserLoginProfileCreate) SetNillableLastLoginAt(t *time.Time) *UserLoginProfileCreate

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableLastLoginIP

func (ulpc *UserLoginProfileCreate) SetNillableLastLoginIP(s *string) *UserLoginProfileCreate

SetNillableLastLoginIP sets the "last_login_ip" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableMfaEnabled

func (ulpc *UserLoginProfileCreate) SetNillableMfaEnabled(b *bool) *UserLoginProfileCreate

SetNillableMfaEnabled sets the "mfa_enabled" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableMfaSecret

func (ulpc *UserLoginProfileCreate) SetNillableMfaSecret(s *string) *UserLoginProfileCreate

SetNillableMfaSecret sets the "mfa_secret" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableMfaStatus

func (ulpc *UserLoginProfileCreate) SetNillableMfaStatus(ts *typex.SimpleStatus) *UserLoginProfileCreate

SetNillableMfaStatus sets the "mfa_status" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillablePasswordReset

func (ulpc *UserLoginProfileCreate) SetNillablePasswordReset(b *bool) *UserLoginProfileCreate

SetNillablePasswordReset sets the "password_reset" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableUpdatedAt

func (ulpc *UserLoginProfileCreate) SetNillableUpdatedAt(t *time.Time) *UserLoginProfileCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableUpdatedBy

func (ulpc *UserLoginProfileCreate) SetNillableUpdatedBy(i *int) *UserLoginProfileCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserLoginProfileCreate) SetNillableUserID

func (ulpc *UserLoginProfileCreate) SetNillableUserID(i *int) *UserLoginProfileCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*UserLoginProfileCreate) SetPasswordReset

func (ulpc *UserLoginProfileCreate) SetPasswordReset(b bool) *UserLoginProfileCreate

SetPasswordReset sets the "password_reset" field.

func (*UserLoginProfileCreate) SetSetKind

SetSetKind sets the "set_kind" field.

func (*UserLoginProfileCreate) SetUpdatedAt

func (ulpc *UserLoginProfileCreate) SetUpdatedAt(t time.Time) *UserLoginProfileCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserLoginProfileCreate) SetUpdatedBy

func (ulpc *UserLoginProfileCreate) SetUpdatedBy(i int) *UserLoginProfileCreate

SetUpdatedBy sets the "updated_by" field.

func (*UserLoginProfileCreate) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserLoginProfileCreate) SetUserID

SetUserID sets the "user_id" field.

func (*UserLoginProfileCreate) SetVerifyDevice

func (ulpc *UserLoginProfileCreate) SetVerifyDevice(b bool) *UserLoginProfileCreate

SetVerifyDevice sets the "verify_device" field.

type UserLoginProfileCreateBulk

type UserLoginProfileCreateBulk struct {
	// contains filtered or unexported fields
}

UserLoginProfileCreateBulk is the builder for creating many UserLoginProfile entities in bulk.

func (*UserLoginProfileCreateBulk) Exec

Exec executes the query.

func (*UserLoginProfileCreateBulk) ExecX

func (ulpcb *UserLoginProfileCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserLoginProfile.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserLoginProfileUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserLoginProfileCreateBulk) OnConflictColumns

func (ulpcb *UserLoginProfileCreateBulk) OnConflictColumns(columns ...string) *UserLoginProfileUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserLoginProfile.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserLoginProfileCreateBulk) Save

Save creates the UserLoginProfile entities in the database.

func (*UserLoginProfileCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type UserLoginProfileDelete

type UserLoginProfileDelete struct {
	// contains filtered or unexported fields
}

UserLoginProfileDelete is the builder for deleting a UserLoginProfile entity.

func (*UserLoginProfileDelete) Exec

func (ulpd *UserLoginProfileDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserLoginProfileDelete) ExecX

func (ulpd *UserLoginProfileDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileDelete) Where

Where appends a list predicates to the UserLoginProfileDelete builder.

type UserLoginProfileDeleteOne

type UserLoginProfileDeleteOne struct {
	// contains filtered or unexported fields
}

UserLoginProfileDeleteOne is the builder for deleting a single UserLoginProfile entity.

func (*UserLoginProfileDeleteOne) Exec

Exec executes the deletion query.

func (*UserLoginProfileDeleteOne) ExecX

func (ulpdo *UserLoginProfileDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileDeleteOne) Where

Where appends a list predicates to the UserLoginProfileDelete builder.

type UserLoginProfileEdge

type UserLoginProfileEdge struct {
	Node   *UserLoginProfile `json:"node"`
	Cursor Cursor            `json:"cursor"`
}

UserLoginProfileEdge is the edge representation of UserLoginProfile.

type UserLoginProfileEdges

type UserLoginProfileEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

UserLoginProfileEdges holds the relations/edges for other nodes in the graph.

func (UserLoginProfileEdges) UserOrErr

func (e UserLoginProfileEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserLoginProfileGroupBy

type UserLoginProfileGroupBy struct {
	// contains filtered or unexported fields
}

UserLoginProfileGroupBy is the group-by builder for UserLoginProfile entities.

func (*UserLoginProfileGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*UserLoginProfileGroupBy) Bool

func (s *UserLoginProfileGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) BoolX

func (s *UserLoginProfileGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserLoginProfileGroupBy) Bools

func (s *UserLoginProfileGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) BoolsX

func (s *UserLoginProfileGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserLoginProfileGroupBy) Float64

func (s *UserLoginProfileGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) Float64X

func (s *UserLoginProfileGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserLoginProfileGroupBy) Float64s

func (s *UserLoginProfileGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) Float64sX

func (s *UserLoginProfileGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserLoginProfileGroupBy) Int

func (s *UserLoginProfileGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) IntX

func (s *UserLoginProfileGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserLoginProfileGroupBy) Ints

func (s *UserLoginProfileGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) IntsX

func (s *UserLoginProfileGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserLoginProfileGroupBy) Scan

func (ulpgb *UserLoginProfileGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserLoginProfileGroupBy) ScanX

func (s *UserLoginProfileGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserLoginProfileGroupBy) String

func (s *UserLoginProfileGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) StringX

func (s *UserLoginProfileGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserLoginProfileGroupBy) Strings

func (s *UserLoginProfileGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileGroupBy) StringsX

func (s *UserLoginProfileGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserLoginProfileMutation

type UserLoginProfileMutation struct {
	// contains filtered or unexported fields
}

UserLoginProfileMutation represents an operation that mutates the UserLoginProfile nodes in the graph.

func (*UserLoginProfileMutation) AddCreatedBy

func (m *UserLoginProfileMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*UserLoginProfileMutation) AddField

func (m *UserLoginProfileMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserLoginProfileMutation) AddUpdatedBy

func (m *UserLoginProfileMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*UserLoginProfileMutation) AddedCreatedBy

func (m *UserLoginProfileMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*UserLoginProfileMutation) AddedEdges

func (m *UserLoginProfileMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserLoginProfileMutation) AddedField

func (m *UserLoginProfileMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserLoginProfileMutation) AddedFields

func (m *UserLoginProfileMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserLoginProfileMutation) AddedIDs

func (m *UserLoginProfileMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserLoginProfileMutation) AddedUpdatedBy

func (m *UserLoginProfileMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*UserLoginProfileMutation) CanLogin

func (m *UserLoginProfileMutation) CanLogin() (r bool, exists bool)

CanLogin returns the value of the "can_login" field in the mutation.

func (*UserLoginProfileMutation) CanLoginCleared

func (m *UserLoginProfileMutation) CanLoginCleared() bool

CanLoginCleared returns if the "can_login" field was cleared in this mutation.

func (*UserLoginProfileMutation) ClearCanLogin

func (m *UserLoginProfileMutation) ClearCanLogin()

ClearCanLogin clears the value of the "can_login" field.

func (*UserLoginProfileMutation) ClearEdge

func (m *UserLoginProfileMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserLoginProfileMutation) ClearField

func (m *UserLoginProfileMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserLoginProfileMutation) ClearLastLoginAt

func (m *UserLoginProfileMutation) ClearLastLoginAt()

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserLoginProfileMutation) ClearLastLoginIP

func (m *UserLoginProfileMutation) ClearLastLoginIP()

ClearLastLoginIP clears the value of the "last_login_ip" field.

func (*UserLoginProfileMutation) ClearMfaEnabled

func (m *UserLoginProfileMutation) ClearMfaEnabled()

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserLoginProfileMutation) ClearMfaSecret

func (m *UserLoginProfileMutation) ClearMfaSecret()

ClearMfaSecret clears the value of the "mfa_secret" field.

func (*UserLoginProfileMutation) ClearMfaStatus

func (m *UserLoginProfileMutation) ClearMfaStatus()

ClearMfaStatus clears the value of the "mfa_status" field.

func (*UserLoginProfileMutation) ClearPasswordReset

func (m *UserLoginProfileMutation) ClearPasswordReset()

ClearPasswordReset clears the value of the "password_reset" field.

func (*UserLoginProfileMutation) ClearUpdatedAt

func (m *UserLoginProfileMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserLoginProfileMutation) ClearUpdatedBy

func (m *UserLoginProfileMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserLoginProfileMutation) ClearUser

func (m *UserLoginProfileMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserLoginProfileMutation) ClearUserID

func (m *UserLoginProfileMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*UserLoginProfileMutation) ClearedEdges

func (m *UserLoginProfileMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserLoginProfileMutation) ClearedFields

func (m *UserLoginProfileMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserLoginProfileMutation) Client

func (m UserLoginProfileMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserLoginProfileMutation) CreatedAt

func (m *UserLoginProfileMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserLoginProfileMutation) CreatedBy

func (m *UserLoginProfileMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*UserLoginProfileMutation) EdgeCleared

func (m *UserLoginProfileMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserLoginProfileMutation) Field

func (m *UserLoginProfileMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserLoginProfileMutation) FieldCleared

func (m *UserLoginProfileMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserLoginProfileMutation) Fields

func (m *UserLoginProfileMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserLoginProfileMutation) ID

func (m *UserLoginProfileMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserLoginProfileMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserLoginProfileMutation) LastLoginAt

func (m *UserLoginProfileMutation) LastLoginAt() (r time.Time, exists bool)

LastLoginAt returns the value of the "last_login_at" field in the mutation.

func (*UserLoginProfileMutation) LastLoginAtCleared

func (m *UserLoginProfileMutation) LastLoginAtCleared() bool

LastLoginAtCleared returns if the "last_login_at" field was cleared in this mutation.

func (*UserLoginProfileMutation) LastLoginIP

func (m *UserLoginProfileMutation) LastLoginIP() (r string, exists bool)

LastLoginIP returns the value of the "last_login_ip" field in the mutation.

func (*UserLoginProfileMutation) LastLoginIPCleared

func (m *UserLoginProfileMutation) LastLoginIPCleared() bool

LastLoginIPCleared returns if the "last_login_ip" field was cleared in this mutation.

func (*UserLoginProfileMutation) MfaEnabled

func (m *UserLoginProfileMutation) MfaEnabled() (r bool, exists bool)

MfaEnabled returns the value of the "mfa_enabled" field in the mutation.

func (*UserLoginProfileMutation) MfaEnabledCleared

func (m *UserLoginProfileMutation) MfaEnabledCleared() bool

MfaEnabledCleared returns if the "mfa_enabled" field was cleared in this mutation.

func (*UserLoginProfileMutation) MfaSecret

func (m *UserLoginProfileMutation) MfaSecret() (r string, exists bool)

MfaSecret returns the value of the "mfa_secret" field in the mutation.

func (*UserLoginProfileMutation) MfaSecretCleared

func (m *UserLoginProfileMutation) MfaSecretCleared() bool

MfaSecretCleared returns if the "mfa_secret" field was cleared in this mutation.

func (*UserLoginProfileMutation) MfaStatus

func (m *UserLoginProfileMutation) MfaStatus() (r typex.SimpleStatus, exists bool)

MfaStatus returns the value of the "mfa_status" field in the mutation.

func (*UserLoginProfileMutation) MfaStatusCleared

func (m *UserLoginProfileMutation) MfaStatusCleared() bool

MfaStatusCleared returns if the "mfa_status" field was cleared in this mutation.

func (*UserLoginProfileMutation) OldCanLogin

func (m *UserLoginProfileMutation) OldCanLogin(ctx context.Context) (v bool, err error)

OldCanLogin returns the old "can_login" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldCreatedAt

func (m *UserLoginProfileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldCreatedBy

func (m *UserLoginProfileMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldField

func (m *UserLoginProfileMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserLoginProfileMutation) OldLastLoginAt

func (m *UserLoginProfileMutation) OldLastLoginAt(ctx context.Context) (v time.Time, err error)

OldLastLoginAt returns the old "last_login_at" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldLastLoginIP

func (m *UserLoginProfileMutation) OldLastLoginIP(ctx context.Context) (v string, err error)

OldLastLoginIP returns the old "last_login_ip" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldMfaEnabled

func (m *UserLoginProfileMutation) OldMfaEnabled(ctx context.Context) (v bool, err error)

OldMfaEnabled returns the old "mfa_enabled" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldMfaSecret

func (m *UserLoginProfileMutation) OldMfaSecret(ctx context.Context) (v string, err error)

OldMfaSecret returns the old "mfa_secret" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldMfaStatus

func (m *UserLoginProfileMutation) OldMfaStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldMfaStatus returns the old "mfa_status" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldPasswordReset

func (m *UserLoginProfileMutation) OldPasswordReset(ctx context.Context) (v bool, err error)

OldPasswordReset returns the old "password_reset" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldSetKind

OldSetKind returns the old "set_kind" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldUpdatedAt

func (m *UserLoginProfileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldUpdatedBy

func (m *UserLoginProfileMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldUserID

func (m *UserLoginProfileMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) OldVerifyDevice

func (m *UserLoginProfileMutation) OldVerifyDevice(ctx context.Context) (v bool, err error)

OldVerifyDevice returns the old "verify_device" field's value of the UserLoginProfile entity. If the UserLoginProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserLoginProfileMutation) Op

func (m *UserLoginProfileMutation) Op() Op

Op returns the operation name.

func (*UserLoginProfileMutation) PasswordReset

func (m *UserLoginProfileMutation) PasswordReset() (r bool, exists bool)

PasswordReset returns the value of the "password_reset" field in the mutation.

func (*UserLoginProfileMutation) PasswordResetCleared

func (m *UserLoginProfileMutation) PasswordResetCleared() bool

PasswordResetCleared returns if the "password_reset" field was cleared in this mutation.

func (*UserLoginProfileMutation) RemovedEdges

func (m *UserLoginProfileMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserLoginProfileMutation) RemovedIDs

func (m *UserLoginProfileMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserLoginProfileMutation) ResetCanLogin

func (m *UserLoginProfileMutation) ResetCanLogin()

ResetCanLogin resets all changes to the "can_login" field.

func (*UserLoginProfileMutation) ResetCreatedAt

func (m *UserLoginProfileMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserLoginProfileMutation) ResetCreatedBy

func (m *UserLoginProfileMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*UserLoginProfileMutation) ResetEdge

func (m *UserLoginProfileMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserLoginProfileMutation) ResetField

func (m *UserLoginProfileMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserLoginProfileMutation) ResetLastLoginAt

func (m *UserLoginProfileMutation) ResetLastLoginAt()

ResetLastLoginAt resets all changes to the "last_login_at" field.

func (*UserLoginProfileMutation) ResetLastLoginIP

func (m *UserLoginProfileMutation) ResetLastLoginIP()

ResetLastLoginIP resets all changes to the "last_login_ip" field.

func (*UserLoginProfileMutation) ResetMfaEnabled

func (m *UserLoginProfileMutation) ResetMfaEnabled()

ResetMfaEnabled resets all changes to the "mfa_enabled" field.

func (*UserLoginProfileMutation) ResetMfaSecret

func (m *UserLoginProfileMutation) ResetMfaSecret()

ResetMfaSecret resets all changes to the "mfa_secret" field.

func (*UserLoginProfileMutation) ResetMfaStatus

func (m *UserLoginProfileMutation) ResetMfaStatus()

ResetMfaStatus resets all changes to the "mfa_status" field.

func (*UserLoginProfileMutation) ResetPasswordReset

func (m *UserLoginProfileMutation) ResetPasswordReset()

ResetPasswordReset resets all changes to the "password_reset" field.

func (*UserLoginProfileMutation) ResetSetKind

func (m *UserLoginProfileMutation) ResetSetKind()

ResetSetKind resets all changes to the "set_kind" field.

func (*UserLoginProfileMutation) ResetUpdatedAt

func (m *UserLoginProfileMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserLoginProfileMutation) ResetUpdatedBy

func (m *UserLoginProfileMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*UserLoginProfileMutation) ResetUser

func (m *UserLoginProfileMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserLoginProfileMutation) ResetUserID

func (m *UserLoginProfileMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UserLoginProfileMutation) ResetVerifyDevice

func (m *UserLoginProfileMutation) ResetVerifyDevice()

ResetVerifyDevice resets all changes to the "verify_device" field.

func (*UserLoginProfileMutation) SetCanLogin

func (m *UserLoginProfileMutation) SetCanLogin(b bool)

SetCanLogin sets the "can_login" field.

func (*UserLoginProfileMutation) SetCreatedAt

func (m *UserLoginProfileMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserLoginProfileMutation) SetCreatedBy

func (m *UserLoginProfileMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*UserLoginProfileMutation) SetField

func (m *UserLoginProfileMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserLoginProfileMutation) SetID

func (m *UserLoginProfileMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UserLoginProfile entities.

func (*UserLoginProfileMutation) SetKind

func (m *UserLoginProfileMutation) SetKind() (r userloginprofile.SetKind, exists bool)

SetKind returns the value of the "set_kind" field in the mutation.

func (*UserLoginProfileMutation) SetLastLoginAt

func (m *UserLoginProfileMutation) SetLastLoginAt(t time.Time)

SetLastLoginAt sets the "last_login_at" field.

func (*UserLoginProfileMutation) SetLastLoginIP

func (m *UserLoginProfileMutation) SetLastLoginIP(s string)

SetLastLoginIP sets the "last_login_ip" field.

func (*UserLoginProfileMutation) SetMfaEnabled

func (m *UserLoginProfileMutation) SetMfaEnabled(b bool)

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserLoginProfileMutation) SetMfaSecret

func (m *UserLoginProfileMutation) SetMfaSecret(s string)

SetMfaSecret sets the "mfa_secret" field.

func (*UserLoginProfileMutation) SetMfaStatus

func (m *UserLoginProfileMutation) SetMfaStatus(ts typex.SimpleStatus)

SetMfaStatus sets the "mfa_status" field.

func (*UserLoginProfileMutation) SetOp

func (m *UserLoginProfileMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserLoginProfileMutation) SetPasswordReset

func (m *UserLoginProfileMutation) SetPasswordReset(b bool)

SetPasswordReset sets the "password_reset" field.

func (*UserLoginProfileMutation) SetSetKind

SetSetKind sets the "set_kind" field.

func (*UserLoginProfileMutation) SetUpdatedAt

func (m *UserLoginProfileMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserLoginProfileMutation) SetUpdatedBy

func (m *UserLoginProfileMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*UserLoginProfileMutation) SetUserID

func (m *UserLoginProfileMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*UserLoginProfileMutation) SetVerifyDevice

func (m *UserLoginProfileMutation) SetVerifyDevice(b bool)

SetVerifyDevice sets the "verify_device" field.

func (UserLoginProfileMutation) Tx

func (m UserLoginProfileMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserLoginProfileMutation) Type

func (m *UserLoginProfileMutation) Type() string

Type returns the node type of this mutation (UserLoginProfile).

func (*UserLoginProfileMutation) UpdatedAt

func (m *UserLoginProfileMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserLoginProfileMutation) UpdatedAtCleared

func (m *UserLoginProfileMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*UserLoginProfileMutation) UpdatedBy

func (m *UserLoginProfileMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*UserLoginProfileMutation) UpdatedByCleared

func (m *UserLoginProfileMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*UserLoginProfileMutation) UserCleared

func (m *UserLoginProfileMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserLoginProfileMutation) UserID

func (m *UserLoginProfileMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UserLoginProfileMutation) UserIDCleared

func (m *UserLoginProfileMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*UserLoginProfileMutation) UserIDs

func (m *UserLoginProfileMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserLoginProfileMutation) VerifyDevice

func (m *UserLoginProfileMutation) VerifyDevice() (r bool, exists bool)

VerifyDevice returns the value of the "verify_device" field in the mutation.

func (*UserLoginProfileMutation) Where

Where appends a list predicates to the UserLoginProfileMutation builder.

func (*UserLoginProfileMutation) WhereP

func (m *UserLoginProfileMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserLoginProfileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserLoginProfileOrder

type UserLoginProfileOrder struct {
	Direction OrderDirection              `json:"direction"`
	Field     *UserLoginProfileOrderField `json:"field"`
}

UserLoginProfileOrder defines the ordering of UserLoginProfile.

type UserLoginProfileOrderField

type UserLoginProfileOrderField struct {
	// Value extracts the ordering value from the given UserLoginProfile.
	Value func(*UserLoginProfile) (ent.Value, error)
	// contains filtered or unexported fields
}

UserLoginProfileOrderField defines the ordering field of UserLoginProfile.

func (UserLoginProfileOrderField) MarshalGQL

func (f UserLoginProfileOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserLoginProfileOrderField) String

String implement fmt.Stringer interface.

func (*UserLoginProfileOrderField) UnmarshalGQL

func (f *UserLoginProfileOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserLoginProfilePaginateOption

type UserLoginProfilePaginateOption func(*userloginprofilePager) error

UserLoginProfilePaginateOption enables pagination customization.

func WithUserLoginProfileFilter

func WithUserLoginProfileFilter(filter func(*UserLoginProfileQuery) (*UserLoginProfileQuery, error)) UserLoginProfilePaginateOption

WithUserLoginProfileFilter configures pagination filter.

func WithUserLoginProfileOrder

func WithUserLoginProfileOrder(order *UserLoginProfileOrder) UserLoginProfilePaginateOption

WithUserLoginProfileOrder configures pagination ordering.

type UserLoginProfileQuery

type UserLoginProfileQuery struct {
	// contains filtered or unexported fields
}

UserLoginProfileQuery is the builder for querying UserLoginProfile entities.

func (*UserLoginProfileQuery) Aggregate

Aggregate returns a UserLoginProfileSelect configured with the given aggregations.

func (*UserLoginProfileQuery) All

All executes the query and returns a list of UserLoginProfiles.

func (*UserLoginProfileQuery) AllX

AllX is like All, but panics if an error occurs.

func (*UserLoginProfileQuery) Clone

Clone returns a duplicate of the UserLoginProfileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserLoginProfileQuery) CollectFields

func (ulp *UserLoginProfileQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserLoginProfileQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserLoginProfileQuery) Count

func (ulpq *UserLoginProfileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserLoginProfileQuery) CountX

func (ulpq *UserLoginProfileQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserLoginProfileQuery) Exist

func (ulpq *UserLoginProfileQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserLoginProfileQuery) ExistX

func (ulpq *UserLoginProfileQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserLoginProfileQuery) First

First returns the first UserLoginProfile entity from the query. Returns a *NotFoundError when no UserLoginProfile was found.

func (*UserLoginProfileQuery) FirstID

func (ulpq *UserLoginProfileQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserLoginProfile ID from the query. Returns a *NotFoundError when no UserLoginProfile ID was found.

func (*UserLoginProfileQuery) FirstIDX

func (ulpq *UserLoginProfileQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserLoginProfileQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*UserLoginProfileQuery) GroupBy

func (ulpq *UserLoginProfileQuery) GroupBy(field string, fields ...string) *UserLoginProfileGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserLoginProfile.Query().
	GroupBy(userloginprofile.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserLoginProfileQuery) IDs

func (ulpq *UserLoginProfileQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserLoginProfile IDs.

func (*UserLoginProfileQuery) IDsX

func (ulpq *UserLoginProfileQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserLoginProfileQuery) Limit

func (ulpq *UserLoginProfileQuery) Limit(limit int) *UserLoginProfileQuery

Limit the number of records to be returned by this query.

func (*UserLoginProfileQuery) Offset

func (ulpq *UserLoginProfileQuery) Offset(offset int) *UserLoginProfileQuery

Offset to start from.

func (*UserLoginProfileQuery) Only

Only returns a single UserLoginProfile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserLoginProfile entity is found. Returns a *NotFoundError when no UserLoginProfile entities are found.

func (*UserLoginProfileQuery) OnlyID

func (ulpq *UserLoginProfileQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserLoginProfile ID in the query. Returns a *NotSingularError when more than one UserLoginProfile ID is found. Returns a *NotFoundError when no entities are found.

func (*UserLoginProfileQuery) OnlyIDX

func (ulpq *UserLoginProfileQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserLoginProfileQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*UserLoginProfileQuery) Order

Order specifies how the records should be ordered.

func (*UserLoginProfileQuery) Paginate

func (ulp *UserLoginProfileQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserLoginProfilePaginateOption,
) (*UserLoginProfileConnection, error)

Paginate executes the query and returns a relay based cursor connection to UserLoginProfile.

func (*UserLoginProfileQuery) QueryUser

func (ulpq *UserLoginProfileQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserLoginProfileQuery) Select

func (ulpq *UserLoginProfileQuery) Select(fields ...string) *UserLoginProfileSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.UserLoginProfile.Query().
	Select(userloginprofile.FieldCreatedBy).
	Scan(ctx, &v)

func (*UserLoginProfileQuery) Unique

func (ulpq *UserLoginProfileQuery) Unique(unique bool) *UserLoginProfileQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserLoginProfileQuery) Where

Where adds a new predicate for the UserLoginProfileQuery builder.

func (*UserLoginProfileQuery) WithUser

func (ulpq *UserLoginProfileQuery) WithUser(opts ...func(*UserQuery)) *UserLoginProfileQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserLoginProfileSelect

type UserLoginProfileSelect struct {
	*UserLoginProfileQuery
	// contains filtered or unexported fields
}

UserLoginProfileSelect is the builder for selecting fields of UserLoginProfile entities.

func (*UserLoginProfileSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*UserLoginProfileSelect) Bool

func (s *UserLoginProfileSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) BoolX

func (s *UserLoginProfileSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserLoginProfileSelect) Bools

func (s *UserLoginProfileSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) BoolsX

func (s *UserLoginProfileSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserLoginProfileSelect) Float64

func (s *UserLoginProfileSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) Float64X

func (s *UserLoginProfileSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserLoginProfileSelect) Float64s

func (s *UserLoginProfileSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) Float64sX

func (s *UserLoginProfileSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserLoginProfileSelect) Int

func (s *UserLoginProfileSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) IntX

func (s *UserLoginProfileSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserLoginProfileSelect) Ints

func (s *UserLoginProfileSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) IntsX

func (s *UserLoginProfileSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserLoginProfileSelect) Scan

func (ulps *UserLoginProfileSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserLoginProfileSelect) ScanX

func (s *UserLoginProfileSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserLoginProfileSelect) String

func (s *UserLoginProfileSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) StringX

func (s *UserLoginProfileSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserLoginProfileSelect) Strings

func (s *UserLoginProfileSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserLoginProfileSelect) StringsX

func (s *UserLoginProfileSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserLoginProfileUpdate

type UserLoginProfileUpdate struct {
	// contains filtered or unexported fields
}

UserLoginProfileUpdate is the builder for updating UserLoginProfile entities.

func (*UserLoginProfileUpdate) AddUpdatedBy

func (ulpu *UserLoginProfileUpdate) AddUpdatedBy(i int) *UserLoginProfileUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*UserLoginProfileUpdate) ClearCanLogin

func (ulpu *UserLoginProfileUpdate) ClearCanLogin() *UserLoginProfileUpdate

ClearCanLogin clears the value of the "can_login" field.

func (*UserLoginProfileUpdate) ClearLastLoginAt

func (ulpu *UserLoginProfileUpdate) ClearLastLoginAt() *UserLoginProfileUpdate

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserLoginProfileUpdate) ClearLastLoginIP

func (ulpu *UserLoginProfileUpdate) ClearLastLoginIP() *UserLoginProfileUpdate

ClearLastLoginIP clears the value of the "last_login_ip" field.

func (*UserLoginProfileUpdate) ClearMfaEnabled

func (ulpu *UserLoginProfileUpdate) ClearMfaEnabled() *UserLoginProfileUpdate

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserLoginProfileUpdate) ClearMfaSecret

func (ulpu *UserLoginProfileUpdate) ClearMfaSecret() *UserLoginProfileUpdate

ClearMfaSecret clears the value of the "mfa_secret" field.

func (*UserLoginProfileUpdate) ClearMfaStatus

func (ulpu *UserLoginProfileUpdate) ClearMfaStatus() *UserLoginProfileUpdate

ClearMfaStatus clears the value of the "mfa_status" field.

func (*UserLoginProfileUpdate) ClearPasswordReset

func (ulpu *UserLoginProfileUpdate) ClearPasswordReset() *UserLoginProfileUpdate

ClearPasswordReset clears the value of the "password_reset" field.

func (*UserLoginProfileUpdate) ClearUpdatedAt

func (ulpu *UserLoginProfileUpdate) ClearUpdatedAt() *UserLoginProfileUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserLoginProfileUpdate) ClearUpdatedBy

func (ulpu *UserLoginProfileUpdate) ClearUpdatedBy() *UserLoginProfileUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserLoginProfileUpdate) Exec

func (ulpu *UserLoginProfileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserLoginProfileUpdate) ExecX

func (ulpu *UserLoginProfileUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileUpdate) Mutation

Mutation returns the UserLoginProfileMutation object of the builder.

func (*UserLoginProfileUpdate) Save

func (ulpu *UserLoginProfileUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserLoginProfileUpdate) SaveX

func (ulpu *UserLoginProfileUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserLoginProfileUpdate) SetCanLogin

func (ulpu *UserLoginProfileUpdate) SetCanLogin(b bool) *UserLoginProfileUpdate

SetCanLogin sets the "can_login" field.

func (*UserLoginProfileUpdate) SetInput

SetInput applies the change-set in the UpdateUserLoginProfileInput on the UserLoginProfileUpdate builder.

func (*UserLoginProfileUpdate) SetLastLoginAt

func (ulpu *UserLoginProfileUpdate) SetLastLoginAt(t time.Time) *UserLoginProfileUpdate

SetLastLoginAt sets the "last_login_at" field.

func (*UserLoginProfileUpdate) SetLastLoginIP

func (ulpu *UserLoginProfileUpdate) SetLastLoginIP(s string) *UserLoginProfileUpdate

SetLastLoginIP sets the "last_login_ip" field.

func (*UserLoginProfileUpdate) SetMfaEnabled

func (ulpu *UserLoginProfileUpdate) SetMfaEnabled(b bool) *UserLoginProfileUpdate

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserLoginProfileUpdate) SetMfaSecret

func (ulpu *UserLoginProfileUpdate) SetMfaSecret(s string) *UserLoginProfileUpdate

SetMfaSecret sets the "mfa_secret" field.

func (*UserLoginProfileUpdate) SetMfaStatus

SetMfaStatus sets the "mfa_status" field.

func (*UserLoginProfileUpdate) SetNillableCanLogin

func (ulpu *UserLoginProfileUpdate) SetNillableCanLogin(b *bool) *UserLoginProfileUpdate

SetNillableCanLogin sets the "can_login" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillableLastLoginAt

func (ulpu *UserLoginProfileUpdate) SetNillableLastLoginAt(t *time.Time) *UserLoginProfileUpdate

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillableLastLoginIP

func (ulpu *UserLoginProfileUpdate) SetNillableLastLoginIP(s *string) *UserLoginProfileUpdate

SetNillableLastLoginIP sets the "last_login_ip" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillableMfaEnabled

func (ulpu *UserLoginProfileUpdate) SetNillableMfaEnabled(b *bool) *UserLoginProfileUpdate

SetNillableMfaEnabled sets the "mfa_enabled" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillableMfaSecret

func (ulpu *UserLoginProfileUpdate) SetNillableMfaSecret(s *string) *UserLoginProfileUpdate

SetNillableMfaSecret sets the "mfa_secret" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillableMfaStatus

func (ulpu *UserLoginProfileUpdate) SetNillableMfaStatus(ts *typex.SimpleStatus) *UserLoginProfileUpdate

SetNillableMfaStatus sets the "mfa_status" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillablePasswordReset

func (ulpu *UserLoginProfileUpdate) SetNillablePasswordReset(b *bool) *UserLoginProfileUpdate

SetNillablePasswordReset sets the "password_reset" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillableUpdatedAt

func (ulpu *UserLoginProfileUpdate) SetNillableUpdatedAt(t *time.Time) *UserLoginProfileUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetNillableUpdatedBy

func (ulpu *UserLoginProfileUpdate) SetNillableUpdatedBy(i *int) *UserLoginProfileUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserLoginProfileUpdate) SetPasswordReset

func (ulpu *UserLoginProfileUpdate) SetPasswordReset(b bool) *UserLoginProfileUpdate

SetPasswordReset sets the "password_reset" field.

func (*UserLoginProfileUpdate) SetSetKind

SetSetKind sets the "set_kind" field.

func (*UserLoginProfileUpdate) SetUpdatedAt

func (ulpu *UserLoginProfileUpdate) SetUpdatedAt(t time.Time) *UserLoginProfileUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserLoginProfileUpdate) SetUpdatedBy

func (ulpu *UserLoginProfileUpdate) SetUpdatedBy(i int) *UserLoginProfileUpdate

SetUpdatedBy sets the "updated_by" field.

func (*UserLoginProfileUpdate) SetVerifyDevice

func (ulpu *UserLoginProfileUpdate) SetVerifyDevice(b bool) *UserLoginProfileUpdate

SetVerifyDevice sets the "verify_device" field.

func (*UserLoginProfileUpdate) Where

Where appends a list predicates to the UserLoginProfileUpdate builder.

type UserLoginProfileUpdateOne

type UserLoginProfileUpdateOne struct {
	// contains filtered or unexported fields
}

UserLoginProfileUpdateOne is the builder for updating a single UserLoginProfile entity.

func (*UserLoginProfileUpdateOne) AddUpdatedBy

AddUpdatedBy adds i to the "updated_by" field.

func (*UserLoginProfileUpdateOne) ClearCanLogin

func (ulpuo *UserLoginProfileUpdateOne) ClearCanLogin() *UserLoginProfileUpdateOne

ClearCanLogin clears the value of the "can_login" field.

func (*UserLoginProfileUpdateOne) ClearLastLoginAt

func (ulpuo *UserLoginProfileUpdateOne) ClearLastLoginAt() *UserLoginProfileUpdateOne

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserLoginProfileUpdateOne) ClearLastLoginIP

func (ulpuo *UserLoginProfileUpdateOne) ClearLastLoginIP() *UserLoginProfileUpdateOne

ClearLastLoginIP clears the value of the "last_login_ip" field.

func (*UserLoginProfileUpdateOne) ClearMfaEnabled

func (ulpuo *UserLoginProfileUpdateOne) ClearMfaEnabled() *UserLoginProfileUpdateOne

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserLoginProfileUpdateOne) ClearMfaSecret

func (ulpuo *UserLoginProfileUpdateOne) ClearMfaSecret() *UserLoginProfileUpdateOne

ClearMfaSecret clears the value of the "mfa_secret" field.

func (*UserLoginProfileUpdateOne) ClearMfaStatus

func (ulpuo *UserLoginProfileUpdateOne) ClearMfaStatus() *UserLoginProfileUpdateOne

ClearMfaStatus clears the value of the "mfa_status" field.

func (*UserLoginProfileUpdateOne) ClearPasswordReset

func (ulpuo *UserLoginProfileUpdateOne) ClearPasswordReset() *UserLoginProfileUpdateOne

ClearPasswordReset clears the value of the "password_reset" field.

func (*UserLoginProfileUpdateOne) ClearUpdatedAt

func (ulpuo *UserLoginProfileUpdateOne) ClearUpdatedAt() *UserLoginProfileUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserLoginProfileUpdateOne) ClearUpdatedBy

func (ulpuo *UserLoginProfileUpdateOne) ClearUpdatedBy() *UserLoginProfileUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserLoginProfileUpdateOne) Exec

Exec executes the query on the entity.

func (*UserLoginProfileUpdateOne) ExecX

func (ulpuo *UserLoginProfileUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileUpdateOne) Mutation

Mutation returns the UserLoginProfileMutation object of the builder.

func (*UserLoginProfileUpdateOne) Save

Save executes the query and returns the updated UserLoginProfile entity.

func (*UserLoginProfileUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserLoginProfileUpdateOne) Select

func (ulpuo *UserLoginProfileUpdateOne) Select(field string, fields ...string) *UserLoginProfileUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserLoginProfileUpdateOne) SetCanLogin

SetCanLogin sets the "can_login" field.

func (*UserLoginProfileUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserLoginProfileInput on the UserLoginProfileUpdateOne builder.

func (*UserLoginProfileUpdateOne) SetLastLoginAt

SetLastLoginAt sets the "last_login_at" field.

func (*UserLoginProfileUpdateOne) SetLastLoginIP

SetLastLoginIP sets the "last_login_ip" field.

func (*UserLoginProfileUpdateOne) SetMfaEnabled

func (ulpuo *UserLoginProfileUpdateOne) SetMfaEnabled(b bool) *UserLoginProfileUpdateOne

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserLoginProfileUpdateOne) SetMfaSecret

SetMfaSecret sets the "mfa_secret" field.

func (*UserLoginProfileUpdateOne) SetMfaStatus

SetMfaStatus sets the "mfa_status" field.

func (*UserLoginProfileUpdateOne) SetNillableCanLogin

func (ulpuo *UserLoginProfileUpdateOne) SetNillableCanLogin(b *bool) *UserLoginProfileUpdateOne

SetNillableCanLogin sets the "can_login" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillableLastLoginAt

func (ulpuo *UserLoginProfileUpdateOne) SetNillableLastLoginAt(t *time.Time) *UserLoginProfileUpdateOne

SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillableLastLoginIP

func (ulpuo *UserLoginProfileUpdateOne) SetNillableLastLoginIP(s *string) *UserLoginProfileUpdateOne

SetNillableLastLoginIP sets the "last_login_ip" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillableMfaEnabled

func (ulpuo *UserLoginProfileUpdateOne) SetNillableMfaEnabled(b *bool) *UserLoginProfileUpdateOne

SetNillableMfaEnabled sets the "mfa_enabled" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillableMfaSecret

func (ulpuo *UserLoginProfileUpdateOne) SetNillableMfaSecret(s *string) *UserLoginProfileUpdateOne

SetNillableMfaSecret sets the "mfa_secret" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillableMfaStatus

func (ulpuo *UserLoginProfileUpdateOne) SetNillableMfaStatus(ts *typex.SimpleStatus) *UserLoginProfileUpdateOne

SetNillableMfaStatus sets the "mfa_status" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillablePasswordReset

func (ulpuo *UserLoginProfileUpdateOne) SetNillablePasswordReset(b *bool) *UserLoginProfileUpdateOne

SetNillablePasswordReset sets the "password_reset" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillableUpdatedAt

func (ulpuo *UserLoginProfileUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserLoginProfileUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetNillableUpdatedBy

func (ulpuo *UserLoginProfileUpdateOne) SetNillableUpdatedBy(i *int) *UserLoginProfileUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserLoginProfileUpdateOne) SetPasswordReset

func (ulpuo *UserLoginProfileUpdateOne) SetPasswordReset(b bool) *UserLoginProfileUpdateOne

SetPasswordReset sets the "password_reset" field.

func (*UserLoginProfileUpdateOne) SetSetKind

SetSetKind sets the "set_kind" field.

func (*UserLoginProfileUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserLoginProfileUpdateOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserLoginProfileUpdateOne) SetVerifyDevice

func (ulpuo *UserLoginProfileUpdateOne) SetVerifyDevice(b bool) *UserLoginProfileUpdateOne

SetVerifyDevice sets the "verify_device" field.

func (*UserLoginProfileUpdateOne) Where

Where appends a list predicates to the UserLoginProfileUpdate builder.

type UserLoginProfileUpsert

type UserLoginProfileUpsert struct {
	*sql.UpdateSet
}

UserLoginProfileUpsert is the "OnConflict" setter.

func (*UserLoginProfileUpsert) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserLoginProfileUpsert) ClearCanLogin

func (u *UserLoginProfileUpsert) ClearCanLogin() *UserLoginProfileUpsert

ClearCanLogin clears the value of the "can_login" field.

func (*UserLoginProfileUpsert) ClearLastLoginAt

func (u *UserLoginProfileUpsert) ClearLastLoginAt() *UserLoginProfileUpsert

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserLoginProfileUpsert) ClearLastLoginIP

func (u *UserLoginProfileUpsert) ClearLastLoginIP() *UserLoginProfileUpsert

ClearLastLoginIP clears the value of the "last_login_ip" field.

func (*UserLoginProfileUpsert) ClearMfaEnabled

func (u *UserLoginProfileUpsert) ClearMfaEnabled() *UserLoginProfileUpsert

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserLoginProfileUpsert) ClearMfaSecret

func (u *UserLoginProfileUpsert) ClearMfaSecret() *UserLoginProfileUpsert

ClearMfaSecret clears the value of the "mfa_secret" field.

func (*UserLoginProfileUpsert) ClearMfaStatus

func (u *UserLoginProfileUpsert) ClearMfaStatus() *UserLoginProfileUpsert

ClearMfaStatus clears the value of the "mfa_status" field.

func (*UserLoginProfileUpsert) ClearPasswordReset

func (u *UserLoginProfileUpsert) ClearPasswordReset() *UserLoginProfileUpsert

ClearPasswordReset clears the value of the "password_reset" field.

func (*UserLoginProfileUpsert) ClearUpdatedAt

func (u *UserLoginProfileUpsert) ClearUpdatedAt() *UserLoginProfileUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserLoginProfileUpsert) ClearUpdatedBy

func (u *UserLoginProfileUpsert) ClearUpdatedBy() *UserLoginProfileUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserLoginProfileUpsert) SetCanLogin

SetCanLogin sets the "can_login" field.

func (*UserLoginProfileUpsert) SetLastLoginAt

SetLastLoginAt sets the "last_login_at" field.

func (*UserLoginProfileUpsert) SetLastLoginIP

SetLastLoginIP sets the "last_login_ip" field.

func (*UserLoginProfileUpsert) SetMfaEnabled

func (u *UserLoginProfileUpsert) SetMfaEnabled(v bool) *UserLoginProfileUpsert

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserLoginProfileUpsert) SetMfaSecret

SetMfaSecret sets the "mfa_secret" field.

func (*UserLoginProfileUpsert) SetMfaStatus

SetMfaStatus sets the "mfa_status" field.

func (*UserLoginProfileUpsert) SetPasswordReset

func (u *UserLoginProfileUpsert) SetPasswordReset(v bool) *UserLoginProfileUpsert

SetPasswordReset sets the "password_reset" field.

func (*UserLoginProfileUpsert) SetSetKind

SetSetKind sets the "set_kind" field.

func (*UserLoginProfileUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserLoginProfileUpsert) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserLoginProfileUpsert) SetVerifyDevice

func (u *UserLoginProfileUpsert) SetVerifyDevice(v bool) *UserLoginProfileUpsert

SetVerifyDevice sets the "verify_device" field.

func (*UserLoginProfileUpsert) UpdateCanLogin

func (u *UserLoginProfileUpsert) UpdateCanLogin() *UserLoginProfileUpsert

UpdateCanLogin sets the "can_login" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateLastLoginAt

func (u *UserLoginProfileUpsert) UpdateLastLoginAt() *UserLoginProfileUpsert

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateLastLoginIP

func (u *UserLoginProfileUpsert) UpdateLastLoginIP() *UserLoginProfileUpsert

UpdateLastLoginIP sets the "last_login_ip" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateMfaEnabled

func (u *UserLoginProfileUpsert) UpdateMfaEnabled() *UserLoginProfileUpsert

UpdateMfaEnabled sets the "mfa_enabled" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateMfaSecret

func (u *UserLoginProfileUpsert) UpdateMfaSecret() *UserLoginProfileUpsert

UpdateMfaSecret sets the "mfa_secret" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateMfaStatus

func (u *UserLoginProfileUpsert) UpdateMfaStatus() *UserLoginProfileUpsert

UpdateMfaStatus sets the "mfa_status" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdatePasswordReset

func (u *UserLoginProfileUpsert) UpdatePasswordReset() *UserLoginProfileUpsert

UpdatePasswordReset sets the "password_reset" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateSetKind

func (u *UserLoginProfileUpsert) UpdateSetKind() *UserLoginProfileUpsert

UpdateSetKind sets the "set_kind" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateUpdatedAt

func (u *UserLoginProfileUpsert) UpdateUpdatedAt() *UserLoginProfileUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateUpdatedBy

func (u *UserLoginProfileUpsert) UpdateUpdatedBy() *UserLoginProfileUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserLoginProfileUpsert) UpdateVerifyDevice

func (u *UserLoginProfileUpsert) UpdateVerifyDevice() *UserLoginProfileUpsert

UpdateVerifyDevice sets the "verify_device" field to the value that was provided on create.

type UserLoginProfileUpsertBulk

type UserLoginProfileUpsertBulk struct {
	// contains filtered or unexported fields
}

UserLoginProfileUpsertBulk is the builder for "upsert"-ing a bulk of UserLoginProfile nodes.

func (*UserLoginProfileUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserLoginProfileUpsertBulk) ClearCanLogin

ClearCanLogin clears the value of the "can_login" field.

func (*UserLoginProfileUpsertBulk) ClearLastLoginAt

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserLoginProfileUpsertBulk) ClearLastLoginIP

ClearLastLoginIP clears the value of the "last_login_ip" field.

func (*UserLoginProfileUpsertBulk) ClearMfaEnabled

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserLoginProfileUpsertBulk) ClearMfaSecret

ClearMfaSecret clears the value of the "mfa_secret" field.

func (*UserLoginProfileUpsertBulk) ClearMfaStatus

ClearMfaStatus clears the value of the "mfa_status" field.

func (*UserLoginProfileUpsertBulk) ClearPasswordReset

func (u *UserLoginProfileUpsertBulk) ClearPasswordReset() *UserLoginProfileUpsertBulk

ClearPasswordReset clears the value of the "password_reset" field.

func (*UserLoginProfileUpsertBulk) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserLoginProfileUpsertBulk) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserLoginProfileUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserLoginProfileUpsertBulk) Exec

Exec executes the query.

func (*UserLoginProfileUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserLoginProfile.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserLoginProfileUpsertBulk) SetCanLogin

SetCanLogin sets the "can_login" field.

func (*UserLoginProfileUpsertBulk) SetLastLoginAt

SetLastLoginAt sets the "last_login_at" field.

func (*UserLoginProfileUpsertBulk) SetLastLoginIP

SetLastLoginIP sets the "last_login_ip" field.

func (*UserLoginProfileUpsertBulk) SetMfaEnabled

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserLoginProfileUpsertBulk) SetMfaSecret

SetMfaSecret sets the "mfa_secret" field.

func (*UserLoginProfileUpsertBulk) SetMfaStatus

SetMfaStatus sets the "mfa_status" field.

func (*UserLoginProfileUpsertBulk) SetPasswordReset

SetPasswordReset sets the "password_reset" field.

func (*UserLoginProfileUpsertBulk) SetSetKind

SetSetKind sets the "set_kind" field.

func (*UserLoginProfileUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserLoginProfileUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserLoginProfileUpsertBulk) SetVerifyDevice

SetVerifyDevice sets the "verify_device" field.

func (*UserLoginProfileUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserLoginProfileCreateBulk.OnConflict documentation for more info.

func (*UserLoginProfileUpsertBulk) UpdateCanLogin

UpdateCanLogin sets the "can_login" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateLastLoginAt

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateLastLoginIP

UpdateLastLoginIP sets the "last_login_ip" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateMfaEnabled

UpdateMfaEnabled sets the "mfa_enabled" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateMfaSecret

UpdateMfaSecret sets the "mfa_secret" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateMfaStatus

UpdateMfaStatus sets the "mfa_status" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserLoginProfile.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userloginprofile.FieldID)
		}),
	).
	Exec(ctx)

func (*UserLoginProfileUpsertBulk) UpdatePasswordReset

func (u *UserLoginProfileUpsertBulk) UpdatePasswordReset() *UserLoginProfileUpsertBulk

UpdatePasswordReset sets the "password_reset" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateSetKind

UpdateSetKind sets the "set_kind" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateUpdatedBy

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserLoginProfileUpsertBulk) UpdateVerifyDevice

func (u *UserLoginProfileUpsertBulk) UpdateVerifyDevice() *UserLoginProfileUpsertBulk

UpdateVerifyDevice sets the "verify_device" field to the value that was provided on create.

type UserLoginProfileUpsertOne

type UserLoginProfileUpsertOne struct {
	// contains filtered or unexported fields
}

UserLoginProfileUpsertOne is the builder for "upsert"-ing

one UserLoginProfile node.

func (*UserLoginProfileUpsertOne) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserLoginProfileUpsertOne) ClearCanLogin

ClearCanLogin clears the value of the "can_login" field.

func (*UserLoginProfileUpsertOne) ClearLastLoginAt

ClearLastLoginAt clears the value of the "last_login_at" field.

func (*UserLoginProfileUpsertOne) ClearLastLoginIP

ClearLastLoginIP clears the value of the "last_login_ip" field.

func (*UserLoginProfileUpsertOne) ClearMfaEnabled

ClearMfaEnabled clears the value of the "mfa_enabled" field.

func (*UserLoginProfileUpsertOne) ClearMfaSecret

ClearMfaSecret clears the value of the "mfa_secret" field.

func (*UserLoginProfileUpsertOne) ClearMfaStatus

ClearMfaStatus clears the value of the "mfa_status" field.

func (*UserLoginProfileUpsertOne) ClearPasswordReset

func (u *UserLoginProfileUpsertOne) ClearPasswordReset() *UserLoginProfileUpsertOne

ClearPasswordReset clears the value of the "password_reset" field.

func (*UserLoginProfileUpsertOne) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserLoginProfileUpsertOne) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserLoginProfileUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserLoginProfileUpsertOne) Exec

Exec executes the query.

func (*UserLoginProfileUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileUpsertOne) ID

func (u *UserLoginProfileUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserLoginProfileUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserLoginProfileUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserLoginProfile.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserLoginProfileUpsertOne) SetCanLogin

SetCanLogin sets the "can_login" field.

func (*UserLoginProfileUpsertOne) SetLastLoginAt

SetLastLoginAt sets the "last_login_at" field.

func (*UserLoginProfileUpsertOne) SetLastLoginIP

SetLastLoginIP sets the "last_login_ip" field.

func (*UserLoginProfileUpsertOne) SetMfaEnabled

SetMfaEnabled sets the "mfa_enabled" field.

func (*UserLoginProfileUpsertOne) SetMfaSecret

SetMfaSecret sets the "mfa_secret" field.

func (*UserLoginProfileUpsertOne) SetMfaStatus

SetMfaStatus sets the "mfa_status" field.

func (*UserLoginProfileUpsertOne) SetPasswordReset

SetPasswordReset sets the "password_reset" field.

func (*UserLoginProfileUpsertOne) SetSetKind

SetSetKind sets the "set_kind" field.

func (*UserLoginProfileUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserLoginProfileUpsertOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserLoginProfileUpsertOne) SetVerifyDevice

SetVerifyDevice sets the "verify_device" field.

func (*UserLoginProfileUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserLoginProfileCreate.OnConflict documentation for more info.

func (*UserLoginProfileUpsertOne) UpdateCanLogin

UpdateCanLogin sets the "can_login" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateLastLoginAt

func (u *UserLoginProfileUpsertOne) UpdateLastLoginAt() *UserLoginProfileUpsertOne

UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateLastLoginIP

func (u *UserLoginProfileUpsertOne) UpdateLastLoginIP() *UserLoginProfileUpsertOne

UpdateLastLoginIP sets the "last_login_ip" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateMfaEnabled

UpdateMfaEnabled sets the "mfa_enabled" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateMfaSecret

UpdateMfaSecret sets the "mfa_secret" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateMfaStatus

UpdateMfaStatus sets the "mfa_status" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.UserLoginProfile.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userloginprofile.FieldID)
		}),
	).
	Exec(ctx)

func (*UserLoginProfileUpsertOne) UpdatePasswordReset

func (u *UserLoginProfileUpsertOne) UpdatePasswordReset() *UserLoginProfileUpsertOne

UpdatePasswordReset sets the "password_reset" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateSetKind

UpdateSetKind sets the "set_kind" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateUpdatedBy

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserLoginProfileUpsertOne) UpdateVerifyDevice

func (u *UserLoginProfileUpsertOne) UpdateVerifyDevice() *UserLoginProfileUpsertOne

UpdateVerifyDevice sets the "verify_device" field to the value that was provided on create.

type UserLoginProfileWhereInput

type UserLoginProfileWhereInput struct {
	Predicates []predicate.UserLoginProfile  `json:"-"`
	Not        *UserLoginProfileWhereInput   `json:"not,omitempty"`
	Or         []*UserLoginProfileWhereInput `json:"or,omitempty"`
	And        []*UserLoginProfileWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "user_id" field predicates.
	UserID       *int  `json:"userID,omitempty"`
	UserIDNEQ    *int  `json:"userIDNEQ,omitempty"`
	UserIDIn     []int `json:"userIDIn,omitempty"`
	UserIDNotIn  []int `json:"userIDNotIn,omitempty"`
	UserIDIsNil  bool  `json:"userIDIsNil,omitempty"`
	UserIDNotNil bool  `json:"userIDNotNil,omitempty"`

	// "can_login" field predicates.
	CanLogin       *bool `json:"canLogin,omitempty"`
	CanLoginNEQ    *bool `json:"canLoginNEQ,omitempty"`
	CanLoginIsNil  bool  `json:"canLoginIsNil,omitempty"`
	CanLoginNotNil bool  `json:"canLoginNotNil,omitempty"`

	// "set_kind" field predicates.
	SetKind      *userloginprofile.SetKind  `json:"setKind,omitempty"`
	SetKindNEQ   *userloginprofile.SetKind  `json:"setKindNEQ,omitempty"`
	SetKindIn    []userloginprofile.SetKind `json:"setKindIn,omitempty"`
	SetKindNotIn []userloginprofile.SetKind `json:"setKindNotIn,omitempty"`

	// "password_reset" field predicates.
	PasswordReset       *bool `json:"passwordReset,omitempty"`
	PasswordResetNEQ    *bool `json:"passwordResetNEQ,omitempty"`
	PasswordResetIsNil  bool  `json:"passwordResetIsNil,omitempty"`
	PasswordResetNotNil bool  `json:"passwordResetNotNil,omitempty"`

	// "verify_device" field predicates.
	VerifyDevice    *bool `json:"verifyDevice,omitempty"`
	VerifyDeviceNEQ *bool `json:"verifyDeviceNEQ,omitempty"`

	// "mfa_enabled" field predicates.
	MfaEnabled       *bool `json:"mfaEnabled,omitempty"`
	MfaEnabledNEQ    *bool `json:"mfaEnabledNEQ,omitempty"`
	MfaEnabledIsNil  bool  `json:"mfaEnabledIsNil,omitempty"`
	MfaEnabledNotNil bool  `json:"mfaEnabledNotNil,omitempty"`

	// "mfa_secret" field predicates.
	MfaSecret             *string  `json:"mfaSecret,omitempty"`
	MfaSecretNEQ          *string  `json:"mfaSecretNEQ,omitempty"`
	MfaSecretIn           []string `json:"mfaSecretIn,omitempty"`
	MfaSecretNotIn        []string `json:"mfaSecretNotIn,omitempty"`
	MfaSecretGT           *string  `json:"mfaSecretGT,omitempty"`
	MfaSecretGTE          *string  `json:"mfaSecretGTE,omitempty"`
	MfaSecretLT           *string  `json:"mfaSecretLT,omitempty"`
	MfaSecretLTE          *string  `json:"mfaSecretLTE,omitempty"`
	MfaSecretContains     *string  `json:"mfaSecretContains,omitempty"`
	MfaSecretHasPrefix    *string  `json:"mfaSecretHasPrefix,omitempty"`
	MfaSecretHasSuffix    *string  `json:"mfaSecretHasSuffix,omitempty"`
	MfaSecretIsNil        bool     `json:"mfaSecretIsNil,omitempty"`
	MfaSecretNotNil       bool     `json:"mfaSecretNotNil,omitempty"`
	MfaSecretEqualFold    *string  `json:"mfaSecretEqualFold,omitempty"`
	MfaSecretContainsFold *string  `json:"mfaSecretContainsFold,omitempty"`

	// "mfa_status" field predicates.
	MfaStatus       *typex.SimpleStatus  `json:"mfaStatus,omitempty"`
	MfaStatusNEQ    *typex.SimpleStatus  `json:"mfaStatusNEQ,omitempty"`
	MfaStatusIn     []typex.SimpleStatus `json:"mfaStatusIn,omitempty"`
	MfaStatusNotIn  []typex.SimpleStatus `json:"mfaStatusNotIn,omitempty"`
	MfaStatusIsNil  bool                 `json:"mfaStatusIsNil,omitempty"`
	MfaStatusNotNil bool                 `json:"mfaStatusNotNil,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`
}

UserLoginProfileWhereInput represents a where input for filtering UserLoginProfile queries.

func (*UserLoginProfileWhereInput) AddPredicates

func (i *UserLoginProfileWhereInput) AddPredicates(predicates ...predicate.UserLoginProfile)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserLoginProfileWhereInput) Filter

Filter applies the UserLoginProfileWhereInput filter on the UserLoginProfileQuery builder.

func (*UserLoginProfileWhereInput) P

P returns a predicate for filtering userloginprofiles. An error is returned if the input is empty or invalid.

type UserLoginProfiles

type UserLoginProfiles []*UserLoginProfile

UserLoginProfiles is a parsable slice of UserLoginProfile.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddAvatarFileID

func (m *UserMutation) AddAvatarFileID(i int)

AddAvatarFileID adds i to the "avatar_file_id" field.

func (*UserMutation) AddCreatedBy

func (m *UserMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*UserMutation) AddDeviceIDs

func (m *UserMutation) AddDeviceIDs(ids ...int)

AddDeviceIDs adds the "devices" edge to the UserDevice entity by ids.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddIdentityIDs

func (m *UserMutation) AddIdentityIDs(ids ...int)

AddIdentityIDs adds the "identities" edge to the UserIdentity entity by ids.

func (*UserMutation) AddOauthClientIDs

func (m *UserMutation) AddOauthClientIDs(ids ...int)

AddOauthClientIDs adds the "oauth_clients" edge to the OauthClient entity by ids.

func (*UserMutation) AddOrgIDs

func (m *UserMutation) AddOrgIDs(ids ...int)

AddOrgIDs adds the "orgs" edge to the Org entity by ids.

func (*UserMutation) AddOrgUserIDs

func (m *UserMutation) AddOrgUserIDs(ids ...int)

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by ids.

func (*UserMutation) AddPasswordIDs

func (m *UserMutation) AddPasswordIDs(ids ...int)

AddPasswordIDs adds the "passwords" edge to the UserPassword entity by ids.

func (*UserMutation) AddPermissionIDs

func (m *UserMutation) AddPermissionIDs(ids ...int)

AddPermissionIDs adds the "permissions" edge to the Permission entity by ids.

func (*UserMutation) AddUpdatedBy

func (m *UserMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*UserMutation) AddedAvatarFileID

func (m *UserMutation) AddedAvatarFileID() (r int, exists bool)

AddedAvatarFileID returns the value that was added to the "avatar_file_id" field in this mutation.

func (*UserMutation) AddedCreatedBy

func (m *UserMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) AddedUpdatedBy

func (m *UserMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*UserMutation) AvatarFileID

func (m *UserMutation) AvatarFileID() (r int, exists bool)

AvatarFileID returns the value of the "avatar_file_id" field in the mutation.

func (*UserMutation) AvatarFileIDCleared

func (m *UserMutation) AvatarFileIDCleared() bool

AvatarFileIDCleared returns if the "avatar_file_id" field was cleared in this mutation.

func (*UserMutation) ClearAvatarFileID

func (m *UserMutation) ClearAvatarFileID()

ClearAvatarFileID clears the value of the "avatar_file_id" field.

func (*UserMutation) ClearComments

func (m *UserMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*UserMutation) ClearDeletedAt

func (m *UserMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UserMutation) ClearDevices

func (m *UserMutation) ClearDevices()

ClearDevices clears the "devices" edge to the UserDevice entity.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearEmail

func (m *UserMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearIdentities

func (m *UserMutation) ClearIdentities()

ClearIdentities clears the "identities" edge to the UserIdentity entity.

func (*UserMutation) ClearLoginProfile

func (m *UserMutation) ClearLoginProfile()

ClearLoginProfile clears the "login_profile" edge to the UserLoginProfile entity.

func (*UserMutation) ClearMobile

func (m *UserMutation) ClearMobile()

ClearMobile clears the value of the "mobile" field.

func (*UserMutation) ClearOauthClients

func (m *UserMutation) ClearOauthClients()

ClearOauthClients clears the "oauth_clients" edge to the OauthClient entity.

func (*UserMutation) ClearOrgUser

func (m *UserMutation) ClearOrgUser()

ClearOrgUser clears the "org_user" edge to the OrgUser entity.

func (*UserMutation) ClearOrgs

func (m *UserMutation) ClearOrgs()

ClearOrgs clears the "orgs" edge to the Org entity.

func (*UserMutation) ClearPasswords

func (m *UserMutation) ClearPasswords()

ClearPasswords clears the "passwords" edge to the UserPassword entity.

func (*UserMutation) ClearPermissions

func (m *UserMutation) ClearPermissions()

ClearPermissions clears the "permissions" edge to the Permission entity.

func (*UserMutation) ClearStatus

func (m *UserMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*UserMutation) ClearUpdatedAt

func (m *UserMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserMutation) ClearUpdatedBy

func (m *UserMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) Comments

func (m *UserMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*UserMutation) CommentsCleared

func (m *UserMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) CreatedBy

func (m *UserMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*UserMutation) CreationType

func (m *UserMutation) CreationType() (r user.CreationType, exists bool)

CreationType returns the value of the "creation_type" field in the mutation.

func (*UserMutation) DeletedAt

func (m *UserMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*UserMutation) DeletedAtCleared

func (m *UserMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*UserMutation) DevicesCleared

func (m *UserMutation) DevicesCleared() bool

DevicesCleared reports if the "devices" edge to the UserDevice entity was cleared.

func (*UserMutation) DevicesIDs

func (m *UserMutation) DevicesIDs() (ids []int)

DevicesIDs returns the "devices" edge IDs in the mutation.

func (*UserMutation) DisplayName

func (m *UserMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) EmailCleared

func (m *UserMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) IdentitiesCleared

func (m *UserMutation) IdentitiesCleared() bool

IdentitiesCleared reports if the "identities" edge to the UserIdentity entity was cleared.

func (*UserMutation) IdentitiesIDs

func (m *UserMutation) IdentitiesIDs() (ids []int)

IdentitiesIDs returns the "identities" edge IDs in the mutation.

func (*UserMutation) LoginProfileCleared

func (m *UserMutation) LoginProfileCleared() bool

LoginProfileCleared reports if the "login_profile" edge to the UserLoginProfile entity was cleared.

func (*UserMutation) LoginProfileID

func (m *UserMutation) LoginProfileID() (id int, exists bool)

LoginProfileID returns the "login_profile" edge ID in the mutation.

func (*UserMutation) LoginProfileIDs

func (m *UserMutation) LoginProfileIDs() (ids []int)

LoginProfileIDs returns the "login_profile" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LoginProfileID instead. It exists only for internal usage by the builders.

func (*UserMutation) Mobile

func (m *UserMutation) Mobile() (r string, exists bool)

Mobile returns the value of the "mobile" field in the mutation.

func (*UserMutation) MobileCleared

func (m *UserMutation) MobileCleared() bool

MobileCleared returns if the "mobile" field was cleared in this mutation.

func (*UserMutation) OauthClientsCleared

func (m *UserMutation) OauthClientsCleared() bool

OauthClientsCleared reports if the "oauth_clients" edge to the OauthClient entity was cleared.

func (*UserMutation) OauthClientsIDs

func (m *UserMutation) OauthClientsIDs() (ids []int)

OauthClientsIDs returns the "oauth_clients" edge IDs in the mutation.

func (*UserMutation) OldAvatarFileID

func (m *UserMutation) OldAvatarFileID(ctx context.Context) (v int, err error)

OldAvatarFileID returns the old "avatar_file_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldComments

func (m *UserMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldCreatedBy

func (m *UserMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldCreationType

func (m *UserMutation) OldCreationType(ctx context.Context) (v user.CreationType, err error)

OldCreationType returns the old "creation_type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldDeletedAt

func (m *UserMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldDisplayName

func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldMobile

func (m *UserMutation) OldMobile(ctx context.Context) (v string, err error)

OldMobile returns the old "mobile" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPrincipalName

func (m *UserMutation) OldPrincipalName(ctx context.Context) (v string, err error)

OldPrincipalName returns the old "principal_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldRegisterIP

func (m *UserMutation) OldRegisterIP(ctx context.Context) (v *string, err error)

OldRegisterIP returns the old "register_ip" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldStatus

func (m *UserMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdatedAt

func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdatedBy

func (m *UserMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUserType

func (m *UserMutation) OldUserType(ctx context.Context) (v user.UserType, err error)

OldUserType returns the old "user_type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) OrgUserCleared

func (m *UserMutation) OrgUserCleared() bool

OrgUserCleared reports if the "org_user" edge to the OrgUser entity was cleared.

func (*UserMutation) OrgUserIDs

func (m *UserMutation) OrgUserIDs() (ids []int)

OrgUserIDs returns the "org_user" edge IDs in the mutation.

func (*UserMutation) OrgsCleared

func (m *UserMutation) OrgsCleared() bool

OrgsCleared reports if the "orgs" edge to the Org entity was cleared.

func (*UserMutation) OrgsIDs

func (m *UserMutation) OrgsIDs() (ids []int)

OrgsIDs returns the "orgs" edge IDs in the mutation.

func (*UserMutation) PasswordsCleared

func (m *UserMutation) PasswordsCleared() bool

PasswordsCleared reports if the "passwords" edge to the UserPassword entity was cleared.

func (*UserMutation) PasswordsIDs

func (m *UserMutation) PasswordsIDs() (ids []int)

PasswordsIDs returns the "passwords" edge IDs in the mutation.

func (*UserMutation) PermissionsCleared

func (m *UserMutation) PermissionsCleared() bool

PermissionsCleared reports if the "permissions" edge to the Permission entity was cleared.

func (*UserMutation) PermissionsIDs

func (m *UserMutation) PermissionsIDs() (ids []int)

PermissionsIDs returns the "permissions" edge IDs in the mutation.

func (*UserMutation) PrincipalName

func (m *UserMutation) PrincipalName() (r string, exists bool)

PrincipalName returns the value of the "principal_name" field in the mutation.

func (*UserMutation) RegisterIP

func (m *UserMutation) RegisterIP() (r string, exists bool)

RegisterIP returns the value of the "register_ip" field in the mutation.

func (*UserMutation) RemoveDeviceIDs

func (m *UserMutation) RemoveDeviceIDs(ids ...int)

RemoveDeviceIDs removes the "devices" edge to the UserDevice entity by IDs.

func (*UserMutation) RemoveIdentityIDs

func (m *UserMutation) RemoveIdentityIDs(ids ...int)

RemoveIdentityIDs removes the "identities" edge to the UserIdentity entity by IDs.

func (*UserMutation) RemoveOauthClientIDs

func (m *UserMutation) RemoveOauthClientIDs(ids ...int)

RemoveOauthClientIDs removes the "oauth_clients" edge to the OauthClient entity by IDs.

func (*UserMutation) RemoveOrgIDs

func (m *UserMutation) RemoveOrgIDs(ids ...int)

RemoveOrgIDs removes the "orgs" edge to the Org entity by IDs.

func (*UserMutation) RemoveOrgUserIDs

func (m *UserMutation) RemoveOrgUserIDs(ids ...int)

RemoveOrgUserIDs removes the "org_user" edge to the OrgUser entity by IDs.

func (*UserMutation) RemovePasswordIDs

func (m *UserMutation) RemovePasswordIDs(ids ...int)

RemovePasswordIDs removes the "passwords" edge to the UserPassword entity by IDs.

func (*UserMutation) RemovePermissionIDs

func (m *UserMutation) RemovePermissionIDs(ids ...int)

RemovePermissionIDs removes the "permissions" edge to the Permission entity by IDs.

func (*UserMutation) RemovedDevicesIDs

func (m *UserMutation) RemovedDevicesIDs() (ids []int)

RemovedDevices returns the removed IDs of the "devices" edge to the UserDevice entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedIdentitiesIDs

func (m *UserMutation) RemovedIdentitiesIDs() (ids []int)

RemovedIdentities returns the removed IDs of the "identities" edge to the UserIdentity entity.

func (*UserMutation) RemovedOauthClientsIDs

func (m *UserMutation) RemovedOauthClientsIDs() (ids []int)

RemovedOauthClients returns the removed IDs of the "oauth_clients" edge to the OauthClient entity.

func (*UserMutation) RemovedOrgUserIDs

func (m *UserMutation) RemovedOrgUserIDs() (ids []int)

RemovedOrgUser returns the removed IDs of the "org_user" edge to the OrgUser entity.

func (*UserMutation) RemovedOrgsIDs

func (m *UserMutation) RemovedOrgsIDs() (ids []int)

RemovedOrgs returns the removed IDs of the "orgs" edge to the Org entity.

func (*UserMutation) RemovedPasswordsIDs

func (m *UserMutation) RemovedPasswordsIDs() (ids []int)

RemovedPasswords returns the removed IDs of the "passwords" edge to the UserPassword entity.

func (*UserMutation) RemovedPermissionsIDs

func (m *UserMutation) RemovedPermissionsIDs() (ids []int)

RemovedPermissions returns the removed IDs of the "permissions" edge to the Permission entity.

func (*UserMutation) ResetAvatarFileID

func (m *UserMutation) ResetAvatarFileID()

ResetAvatarFileID resets all changes to the "avatar_file_id" field.

func (*UserMutation) ResetComments

func (m *UserMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetCreatedBy

func (m *UserMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*UserMutation) ResetCreationType

func (m *UserMutation) ResetCreationType()

ResetCreationType resets all changes to the "creation_type" field.

func (*UserMutation) ResetDeletedAt

func (m *UserMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*UserMutation) ResetDevices

func (m *UserMutation) ResetDevices()

ResetDevices resets all changes to the "devices" edge.

func (*UserMutation) ResetDisplayName

func (m *UserMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetIdentities

func (m *UserMutation) ResetIdentities()

ResetIdentities resets all changes to the "identities" edge.

func (*UserMutation) ResetLoginProfile

func (m *UserMutation) ResetLoginProfile()

ResetLoginProfile resets all changes to the "login_profile" edge.

func (*UserMutation) ResetMobile

func (m *UserMutation) ResetMobile()

ResetMobile resets all changes to the "mobile" field.

func (*UserMutation) ResetOauthClients

func (m *UserMutation) ResetOauthClients()

ResetOauthClients resets all changes to the "oauth_clients" edge.

func (*UserMutation) ResetOrgUser

func (m *UserMutation) ResetOrgUser()

ResetOrgUser resets all changes to the "org_user" edge.

func (*UserMutation) ResetOrgs

func (m *UserMutation) ResetOrgs()

ResetOrgs resets all changes to the "orgs" edge.

func (*UserMutation) ResetPasswords

func (m *UserMutation) ResetPasswords()

ResetPasswords resets all changes to the "passwords" edge.

func (*UserMutation) ResetPermissions

func (m *UserMutation) ResetPermissions()

ResetPermissions resets all changes to the "permissions" edge.

func (*UserMutation) ResetPrincipalName

func (m *UserMutation) ResetPrincipalName()

ResetPrincipalName resets all changes to the "principal_name" field.

func (*UserMutation) ResetRegisterIP

func (m *UserMutation) ResetRegisterIP()

ResetRegisterIP resets all changes to the "register_ip" field.

func (*UserMutation) ResetStatus

func (m *UserMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserMutation) ResetUpdatedBy

func (m *UserMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*UserMutation) ResetUserType

func (m *UserMutation) ResetUserType()

ResetUserType resets all changes to the "user_type" field.

func (*UserMutation) SetAvatarFileID

func (m *UserMutation) SetAvatarFileID(i int)

SetAvatarFileID sets the "avatar_file_id" field.

func (*UserMutation) SetComments

func (m *UserMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetCreatedBy

func (m *UserMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*UserMutation) SetCreationType

func (m *UserMutation) SetCreationType(ut user.CreationType)

SetCreationType sets the "creation_type" field.

func (*UserMutation) SetDeletedAt

func (m *UserMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*UserMutation) SetDisplayName

func (m *UserMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLoginProfileID

func (m *UserMutation) SetLoginProfileID(id int)

SetLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by id.

func (*UserMutation) SetMobile

func (m *UserMutation) SetMobile(s string)

SetMobile sets the "mobile" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPrincipalName

func (m *UserMutation) SetPrincipalName(s string)

SetPrincipalName sets the "principal_name" field.

func (*UserMutation) SetRegisterIP

func (m *UserMutation) SetRegisterIP(s string)

SetRegisterIP sets the "register_ip" field.

func (*UserMutation) SetStatus

func (m *UserMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*UserMutation) SetUpdatedAt

func (m *UserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserMutation) SetUpdatedBy

func (m *UserMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*UserMutation) SetUserType

func (m *UserMutation) SetUserType(ut user.UserType)

SetUserType sets the "user_type" field.

func (*UserMutation) Status

func (m *UserMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*UserMutation) StatusCleared

func (m *UserMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdatedAt

func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserMutation) UpdatedAtCleared

func (m *UserMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*UserMutation) UpdatedBy

func (m *UserMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*UserMutation) UpdatedByCleared

func (m *UserMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*UserMutation) UserType

func (m *UserMutation) UserType() (r user.UserType, exists bool)

UserType returns the value of the "user_type" field in the mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserOrder

type UserOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *UserOrderField `json:"field"`
}

UserOrder defines the ordering of User.

type UserOrderField

type UserOrderField struct {
	// Value extracts the ordering value from the given User.
	Value func(*User) (ent.Value, error)
	// contains filtered or unexported fields
}

UserOrderField defines the ordering field of User.

func (UserOrderField) MarshalGQL

func (f UserOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserOrderField) String

func (f UserOrderField) String() string

String implement fmt.Stringer interface.

func (*UserOrderField) UnmarshalGQL

func (f *UserOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserPaginateOption

type UserPaginateOption func(*userPager) error

UserPaginateOption enables pagination customization.

func WithUserFilter

func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption

WithUserFilter configures pagination filter.

func WithUserOrder

func WithUserOrder(order *UserOrder) UserPaginateOption

WithUserOrder configures pagination ordering.

type UserPassword

type UserPassword struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID int `json:"user_id,omitempty"`
	// 场景: login 普通登陆
	Scene userpassword.Scene `json:"scene,omitempty"`
	// 密码
	Password string `json:"-"`
	// 盐
	Salt string `json:"-"`
	// 生效状态,默认生效
	Status typex.SimpleStatus `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserPasswordQuery when eager-loading is set.
	Edges UserPasswordEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserPassword is the model entity for the UserPassword schema.

func (*UserPassword) GlobalID

func (up *UserPassword) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given UserPassword node.

func (*UserPassword) IsNode

func (*UserPassword) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*UserPassword) QueryUser

func (up *UserPassword) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserPassword entity.

func (*UserPassword) String

func (up *UserPassword) String() string

String implements the fmt.Stringer.

func (*UserPassword) ToEdge

func (up *UserPassword) ToEdge(order *UserPasswordOrder) *UserPasswordEdge

ToEdge converts UserPassword into UserPasswordEdge.

func (*UserPassword) Unwrap

func (up *UserPassword) Unwrap() *UserPassword

Unwrap unwraps the UserPassword entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*UserPassword) Update

func (up *UserPassword) Update() *UserPasswordUpdateOne

Update returns a builder for updating this UserPassword. Note that you need to call UserPassword.Unwrap() before calling this method if this UserPassword was returned from a transaction, and the transaction was committed or rolled back.

func (*UserPassword) User

func (up *UserPassword) User(ctx context.Context) (*User, error)

func (*UserPassword) Value

func (up *UserPassword) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserPassword. This includes values selected through modifiers, order, etc.

type UserPasswordClient

type UserPasswordClient struct {
	// contains filtered or unexported fields
}

UserPasswordClient is a client for the UserPassword schema.

func NewUserPasswordClient

func NewUserPasswordClient(c config) *UserPasswordClient

NewUserPasswordClient returns a client for the UserPassword from the given config.

func (*UserPasswordClient) Create

Create returns a builder for creating a UserPassword entity.

func (*UserPasswordClient) CreateBulk

func (c *UserPasswordClient) CreateBulk(builders ...*UserPasswordCreate) *UserPasswordCreateBulk

CreateBulk returns a builder for creating a bulk of UserPassword entities.

func (*UserPasswordClient) Delete

Delete returns a delete builder for UserPassword.

func (*UserPasswordClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserPasswordClient) DeleteOneID

func (c *UserPasswordClient) DeleteOneID(id int) *UserPasswordDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserPasswordClient) Get

Get returns a UserPassword entity by its id.

func (*UserPasswordClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserPasswordClient) Hooks

func (c *UserPasswordClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserPasswordClient) Intercept

func (c *UserPasswordClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userpassword.Intercept(f(g(h())))`.

func (*UserPasswordClient) Interceptors

func (c *UserPasswordClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserPasswordClient) MapCreateBulk

func (c *UserPasswordClient) MapCreateBulk(slice any, setFunc func(*UserPasswordCreate, int)) *UserPasswordCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserPasswordClient) Query

Query returns a query builder for UserPassword.

func (*UserPasswordClient) QueryUser

func (c *UserPasswordClient) QueryUser(up *UserPassword) *UserQuery

QueryUser queries the user edge of a UserPassword.

func (*UserPasswordClient) Update

Update returns an update builder for UserPassword.

func (*UserPasswordClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserPasswordClient) UpdateOneID

func (c *UserPasswordClient) UpdateOneID(id int) *UserPasswordUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserPasswordClient) Use

func (c *UserPasswordClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userpassword.Hooks(f(g(h())))`.

type UserPasswordConnection

type UserPasswordConnection struct {
	Edges      []*UserPasswordEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

UserPasswordConnection is the connection containing edges to UserPassword.

type UserPasswordCreate

type UserPasswordCreate struct {
	// contains filtered or unexported fields
}

UserPasswordCreate is the builder for creating a UserPassword entity.

func (*UserPasswordCreate) Exec

func (upc *UserPasswordCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserPasswordCreate) ExecX

func (upc *UserPasswordCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordCreate) Mutation

func (upc *UserPasswordCreate) Mutation() *UserPasswordMutation

Mutation returns the UserPasswordMutation object of the builder.

func (*UserPasswordCreate) OnConflict

func (upc *UserPasswordCreate) OnConflict(opts ...sql.ConflictOption) *UserPasswordUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserPassword.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserPasswordUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserPasswordCreate) OnConflictColumns

func (upc *UserPasswordCreate) OnConflictColumns(columns ...string) *UserPasswordUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserPassword.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserPasswordCreate) Save

Save creates the UserPassword in the database.

func (*UserPasswordCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserPasswordCreate) SetCreatedAt

func (upc *UserPasswordCreate) SetCreatedAt(t time.Time) *UserPasswordCreate

SetCreatedAt sets the "created_at" field.

func (*UserPasswordCreate) SetCreatedBy

func (upc *UserPasswordCreate) SetCreatedBy(i int) *UserPasswordCreate

SetCreatedBy sets the "created_by" field.

func (*UserPasswordCreate) SetID

func (upc *UserPasswordCreate) SetID(i int) *UserPasswordCreate

SetID sets the "id" field.

func (*UserPasswordCreate) SetInput

SetInput applies the change-set in the CreateUserPasswordInput on the UserPasswordCreate builder.

func (*UserPasswordCreate) SetNillableCreatedAt

func (upc *UserPasswordCreate) SetNillableCreatedAt(t *time.Time) *UserPasswordCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserPasswordCreate) SetNillablePassword

func (upc *UserPasswordCreate) SetNillablePassword(s *string) *UserPasswordCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserPasswordCreate) SetNillableStatus

func (upc *UserPasswordCreate) SetNillableStatus(ts *typex.SimpleStatus) *UserPasswordCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserPasswordCreate) SetNillableUpdatedAt

func (upc *UserPasswordCreate) SetNillableUpdatedAt(t *time.Time) *UserPasswordCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserPasswordCreate) SetNillableUpdatedBy

func (upc *UserPasswordCreate) SetNillableUpdatedBy(i *int) *UserPasswordCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserPasswordCreate) SetNillableUserID

func (upc *UserPasswordCreate) SetNillableUserID(i *int) *UserPasswordCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*UserPasswordCreate) SetPassword

func (upc *UserPasswordCreate) SetPassword(s string) *UserPasswordCreate

SetPassword sets the "password" field.

func (*UserPasswordCreate) SetSalt

func (upc *UserPasswordCreate) SetSalt(s string) *UserPasswordCreate

SetSalt sets the "salt" field.

func (*UserPasswordCreate) SetScene

SetScene sets the "scene" field.

func (*UserPasswordCreate) SetStatus

SetStatus sets the "status" field.

func (*UserPasswordCreate) SetUpdatedAt

func (upc *UserPasswordCreate) SetUpdatedAt(t time.Time) *UserPasswordCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordCreate) SetUpdatedBy

func (upc *UserPasswordCreate) SetUpdatedBy(i int) *UserPasswordCreate

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordCreate) SetUser

func (upc *UserPasswordCreate) SetUser(u *User) *UserPasswordCreate

SetUser sets the "user" edge to the User entity.

func (*UserPasswordCreate) SetUserID

func (upc *UserPasswordCreate) SetUserID(i int) *UserPasswordCreate

SetUserID sets the "user_id" field.

type UserPasswordCreateBulk

type UserPasswordCreateBulk struct {
	// contains filtered or unexported fields
}

UserPasswordCreateBulk is the builder for creating many UserPassword entities in bulk.

func (*UserPasswordCreateBulk) Exec

func (upcb *UserPasswordCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserPasswordCreateBulk) ExecX

func (upcb *UserPasswordCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserPassword.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserPasswordUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserPasswordCreateBulk) OnConflictColumns

func (upcb *UserPasswordCreateBulk) OnConflictColumns(columns ...string) *UserPasswordUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserPassword.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserPasswordCreateBulk) Save

Save creates the UserPassword entities in the database.

func (*UserPasswordCreateBulk) SaveX

func (upcb *UserPasswordCreateBulk) SaveX(ctx context.Context) []*UserPassword

SaveX is like Save, but panics if an error occurs.

type UserPasswordDelete

type UserPasswordDelete struct {
	// contains filtered or unexported fields
}

UserPasswordDelete is the builder for deleting a UserPassword entity.

func (*UserPasswordDelete) Exec

func (upd *UserPasswordDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserPasswordDelete) ExecX

func (upd *UserPasswordDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordDelete) Where

Where appends a list predicates to the UserPasswordDelete builder.

type UserPasswordDeleteOne

type UserPasswordDeleteOne struct {
	// contains filtered or unexported fields
}

UserPasswordDeleteOne is the builder for deleting a single UserPassword entity.

func (*UserPasswordDeleteOne) Exec

func (updo *UserPasswordDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserPasswordDeleteOne) ExecX

func (updo *UserPasswordDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordDeleteOne) Where

Where appends a list predicates to the UserPasswordDelete builder.

type UserPasswordEdge

type UserPasswordEdge struct {
	Node   *UserPassword `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

UserPasswordEdge is the edge representation of UserPassword.

type UserPasswordEdges

type UserPasswordEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

UserPasswordEdges holds the relations/edges for other nodes in the graph.

func (UserPasswordEdges) UserOrErr

func (e UserPasswordEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserPasswordGroupBy

type UserPasswordGroupBy struct {
	// contains filtered or unexported fields
}

UserPasswordGroupBy is the group-by builder for UserPassword entities.

func (*UserPasswordGroupBy) Aggregate

func (upgb *UserPasswordGroupBy) Aggregate(fns ...AggregateFunc) *UserPasswordGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserPasswordGroupBy) Bool

func (s *UserPasswordGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) BoolX

func (s *UserPasswordGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserPasswordGroupBy) Bools

func (s *UserPasswordGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) BoolsX

func (s *UserPasswordGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserPasswordGroupBy) Float64

func (s *UserPasswordGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) Float64X

func (s *UserPasswordGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserPasswordGroupBy) Float64s

func (s *UserPasswordGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) Float64sX

func (s *UserPasswordGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserPasswordGroupBy) Int

func (s *UserPasswordGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) IntX

func (s *UserPasswordGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserPasswordGroupBy) Ints

func (s *UserPasswordGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) IntsX

func (s *UserPasswordGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserPasswordGroupBy) Scan

func (upgb *UserPasswordGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserPasswordGroupBy) ScanX

func (s *UserPasswordGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserPasswordGroupBy) String

func (s *UserPasswordGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) StringX

func (s *UserPasswordGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserPasswordGroupBy) Strings

func (s *UserPasswordGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserPasswordGroupBy) StringsX

func (s *UserPasswordGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserPasswordMutation

type UserPasswordMutation struct {
	// contains filtered or unexported fields
}

UserPasswordMutation represents an operation that mutates the UserPassword nodes in the graph.

func (*UserPasswordMutation) AddCreatedBy

func (m *UserPasswordMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*UserPasswordMutation) AddField

func (m *UserPasswordMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserPasswordMutation) AddUpdatedBy

func (m *UserPasswordMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*UserPasswordMutation) AddedCreatedBy

func (m *UserPasswordMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*UserPasswordMutation) AddedEdges

func (m *UserPasswordMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserPasswordMutation) AddedField

func (m *UserPasswordMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserPasswordMutation) AddedFields

func (m *UserPasswordMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserPasswordMutation) AddedIDs

func (m *UserPasswordMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserPasswordMutation) AddedUpdatedBy

func (m *UserPasswordMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*UserPasswordMutation) ClearEdge

func (m *UserPasswordMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserPasswordMutation) ClearField

func (m *UserPasswordMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserPasswordMutation) ClearPassword

func (m *UserPasswordMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*UserPasswordMutation) ClearStatus

func (m *UserPasswordMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*UserPasswordMutation) ClearUpdatedAt

func (m *UserPasswordMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordMutation) ClearUpdatedBy

func (m *UserPasswordMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordMutation) ClearUser

func (m *UserPasswordMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserPasswordMutation) ClearUserID

func (m *UserPasswordMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*UserPasswordMutation) ClearedEdges

func (m *UserPasswordMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserPasswordMutation) ClearedFields

func (m *UserPasswordMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserPasswordMutation) Client

func (m UserPasswordMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserPasswordMutation) CreatedAt

func (m *UserPasswordMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserPasswordMutation) CreatedBy

func (m *UserPasswordMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*UserPasswordMutation) EdgeCleared

func (m *UserPasswordMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserPasswordMutation) Field

func (m *UserPasswordMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserPasswordMutation) FieldCleared

func (m *UserPasswordMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserPasswordMutation) Fields

func (m *UserPasswordMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserPasswordMutation) ID

func (m *UserPasswordMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserPasswordMutation) IDs

func (m *UserPasswordMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserPasswordMutation) OldCreatedAt

func (m *UserPasswordMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldCreatedBy

func (m *UserPasswordMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldField

func (m *UserPasswordMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserPasswordMutation) OldPassword

func (m *UserPasswordMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "password" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldSalt

func (m *UserPasswordMutation) OldSalt(ctx context.Context) (v string, err error)

OldSalt returns the old "salt" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldScene

func (m *UserPasswordMutation) OldScene(ctx context.Context) (v userpassword.Scene, err error)

OldScene returns the old "scene" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldStatus

func (m *UserPasswordMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldUpdatedAt

func (m *UserPasswordMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldUpdatedBy

func (m *UserPasswordMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) OldUserID

func (m *UserPasswordMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the UserPassword entity. If the UserPassword object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordMutation) Op

func (m *UserPasswordMutation) Op() Op

Op returns the operation name.

func (*UserPasswordMutation) Password

func (m *UserPasswordMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*UserPasswordMutation) PasswordCleared

func (m *UserPasswordMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

func (*UserPasswordMutation) RemovedEdges

func (m *UserPasswordMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserPasswordMutation) RemovedIDs

func (m *UserPasswordMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserPasswordMutation) ResetCreatedAt

func (m *UserPasswordMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserPasswordMutation) ResetCreatedBy

func (m *UserPasswordMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*UserPasswordMutation) ResetEdge

func (m *UserPasswordMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserPasswordMutation) ResetField

func (m *UserPasswordMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserPasswordMutation) ResetPassword

func (m *UserPasswordMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*UserPasswordMutation) ResetSalt

func (m *UserPasswordMutation) ResetSalt()

ResetSalt resets all changes to the "salt" field.

func (*UserPasswordMutation) ResetScene

func (m *UserPasswordMutation) ResetScene()

ResetScene resets all changes to the "scene" field.

func (*UserPasswordMutation) ResetStatus

func (m *UserPasswordMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*UserPasswordMutation) ResetUpdatedAt

func (m *UserPasswordMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserPasswordMutation) ResetUpdatedBy

func (m *UserPasswordMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*UserPasswordMutation) ResetUser

func (m *UserPasswordMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserPasswordMutation) ResetUserID

func (m *UserPasswordMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UserPasswordMutation) Salt

func (m *UserPasswordMutation) Salt() (r string, exists bool)

Salt returns the value of the "salt" field in the mutation.

func (*UserPasswordMutation) Scene

func (m *UserPasswordMutation) Scene() (r userpassword.Scene, exists bool)

Scene returns the value of the "scene" field in the mutation.

func (*UserPasswordMutation) SetCreatedAt

func (m *UserPasswordMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserPasswordMutation) SetCreatedBy

func (m *UserPasswordMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*UserPasswordMutation) SetField

func (m *UserPasswordMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserPasswordMutation) SetID

func (m *UserPasswordMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UserPassword entities.

func (*UserPasswordMutation) SetOp

func (m *UserPasswordMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserPasswordMutation) SetPassword

func (m *UserPasswordMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*UserPasswordMutation) SetSalt

func (m *UserPasswordMutation) SetSalt(s string)

SetSalt sets the "salt" field.

func (*UserPasswordMutation) SetScene

func (m *UserPasswordMutation) SetScene(u userpassword.Scene)

SetScene sets the "scene" field.

func (*UserPasswordMutation) SetStatus

func (m *UserPasswordMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*UserPasswordMutation) SetUpdatedAt

func (m *UserPasswordMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordMutation) SetUpdatedBy

func (m *UserPasswordMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordMutation) SetUserID

func (m *UserPasswordMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*UserPasswordMutation) Status

func (m *UserPasswordMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*UserPasswordMutation) StatusCleared

func (m *UserPasswordMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (UserPasswordMutation) Tx

func (m UserPasswordMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserPasswordMutation) Type

func (m *UserPasswordMutation) Type() string

Type returns the node type of this mutation (UserPassword).

func (*UserPasswordMutation) UpdatedAt

func (m *UserPasswordMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserPasswordMutation) UpdatedAtCleared

func (m *UserPasswordMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*UserPasswordMutation) UpdatedBy

func (m *UserPasswordMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*UserPasswordMutation) UpdatedByCleared

func (m *UserPasswordMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*UserPasswordMutation) UserCleared

func (m *UserPasswordMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserPasswordMutation) UserID

func (m *UserPasswordMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UserPasswordMutation) UserIDCleared

func (m *UserPasswordMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*UserPasswordMutation) UserIDs

func (m *UserPasswordMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserPasswordMutation) Where

Where appends a list predicates to the UserPasswordMutation builder.

func (*UserPasswordMutation) WhereP

func (m *UserPasswordMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserPasswordMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserPasswordOrder

type UserPasswordOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *UserPasswordOrderField `json:"field"`
}

UserPasswordOrder defines the ordering of UserPassword.

type UserPasswordOrderField

type UserPasswordOrderField struct {
	// Value extracts the ordering value from the given UserPassword.
	Value func(*UserPassword) (ent.Value, error)
	// contains filtered or unexported fields
}

UserPasswordOrderField defines the ordering field of UserPassword.

func (UserPasswordOrderField) MarshalGQL

func (f UserPasswordOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserPasswordOrderField) String

func (f UserPasswordOrderField) String() string

String implement fmt.Stringer interface.

func (*UserPasswordOrderField) UnmarshalGQL

func (f *UserPasswordOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserPasswordPaginateOption

type UserPasswordPaginateOption func(*userpasswordPager) error

UserPasswordPaginateOption enables pagination customization.

func WithUserPasswordFilter

func WithUserPasswordFilter(filter func(*UserPasswordQuery) (*UserPasswordQuery, error)) UserPasswordPaginateOption

WithUserPasswordFilter configures pagination filter.

func WithUserPasswordOrder

func WithUserPasswordOrder(order *UserPasswordOrder) UserPasswordPaginateOption

WithUserPasswordOrder configures pagination ordering.

type UserPasswordQuery

type UserPasswordQuery struct {
	// contains filtered or unexported fields
}

UserPasswordQuery is the builder for querying UserPassword entities.

func (*UserPasswordQuery) Aggregate

func (upq *UserPasswordQuery) Aggregate(fns ...AggregateFunc) *UserPasswordSelect

Aggregate returns a UserPasswordSelect configured with the given aggregations.

func (*UserPasswordQuery) All

func (upq *UserPasswordQuery) All(ctx context.Context) ([]*UserPassword, error)

All executes the query and returns a list of UserPasswords.

func (*UserPasswordQuery) AllX

func (upq *UserPasswordQuery) AllX(ctx context.Context) []*UserPassword

AllX is like All, but panics if an error occurs.

func (*UserPasswordQuery) Clone

func (upq *UserPasswordQuery) Clone() *UserPasswordQuery

Clone returns a duplicate of the UserPasswordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserPasswordQuery) CollectFields

func (up *UserPasswordQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserPasswordQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserPasswordQuery) Count

func (upq *UserPasswordQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserPasswordQuery) CountX

func (upq *UserPasswordQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserPasswordQuery) Exist

func (upq *UserPasswordQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserPasswordQuery) ExistX

func (upq *UserPasswordQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserPasswordQuery) First

func (upq *UserPasswordQuery) First(ctx context.Context) (*UserPassword, error)

First returns the first UserPassword entity from the query. Returns a *NotFoundError when no UserPassword was found.

func (*UserPasswordQuery) FirstID

func (upq *UserPasswordQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserPassword ID from the query. Returns a *NotFoundError when no UserPassword ID was found.

func (*UserPasswordQuery) FirstIDX

func (upq *UserPasswordQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserPasswordQuery) FirstX

func (upq *UserPasswordQuery) FirstX(ctx context.Context) *UserPassword

FirstX is like First, but panics if an error occurs.

func (*UserPasswordQuery) GroupBy

func (upq *UserPasswordQuery) GroupBy(field string, fields ...string) *UserPasswordGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserPassword.Query().
	GroupBy(userpassword.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserPasswordQuery) IDs

func (upq *UserPasswordQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserPassword IDs.

func (*UserPasswordQuery) IDsX

func (upq *UserPasswordQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserPasswordQuery) Limit

func (upq *UserPasswordQuery) Limit(limit int) *UserPasswordQuery

Limit the number of records to be returned by this query.

func (*UserPasswordQuery) Offset

func (upq *UserPasswordQuery) Offset(offset int) *UserPasswordQuery

Offset to start from.

func (*UserPasswordQuery) Only

func (upq *UserPasswordQuery) Only(ctx context.Context) (*UserPassword, error)

Only returns a single UserPassword entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserPassword entity is found. Returns a *NotFoundError when no UserPassword entities are found.

func (*UserPasswordQuery) OnlyID

func (upq *UserPasswordQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserPassword ID in the query. Returns a *NotSingularError when more than one UserPassword ID is found. Returns a *NotFoundError when no entities are found.

func (*UserPasswordQuery) OnlyIDX

func (upq *UserPasswordQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserPasswordQuery) OnlyX

func (upq *UserPasswordQuery) OnlyX(ctx context.Context) *UserPassword

OnlyX is like Only, but panics if an error occurs.

func (*UserPasswordQuery) Order

Order specifies how the records should be ordered.

func (*UserPasswordQuery) Paginate

func (up *UserPasswordQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserPasswordPaginateOption,
) (*UserPasswordConnection, error)

Paginate executes the query and returns a relay based cursor connection to UserPassword.

func (*UserPasswordQuery) QueryUser

func (upq *UserPasswordQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserPasswordQuery) Select

func (upq *UserPasswordQuery) Select(fields ...string) *UserPasswordSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.UserPassword.Query().
	Select(userpassword.FieldCreatedBy).
	Scan(ctx, &v)

func (*UserPasswordQuery) Unique

func (upq *UserPasswordQuery) Unique(unique bool) *UserPasswordQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserPasswordQuery) Where

Where adds a new predicate for the UserPasswordQuery builder.

func (*UserPasswordQuery) WithUser

func (upq *UserPasswordQuery) WithUser(opts ...func(*UserQuery)) *UserPasswordQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserPasswordSelect

type UserPasswordSelect struct {
	*UserPasswordQuery
	// contains filtered or unexported fields
}

UserPasswordSelect is the builder for selecting fields of UserPassword entities.

func (*UserPasswordSelect) Aggregate

func (ups *UserPasswordSelect) Aggregate(fns ...AggregateFunc) *UserPasswordSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserPasswordSelect) Bool

func (s *UserPasswordSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) BoolX

func (s *UserPasswordSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserPasswordSelect) Bools

func (s *UserPasswordSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) BoolsX

func (s *UserPasswordSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserPasswordSelect) Float64

func (s *UserPasswordSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) Float64X

func (s *UserPasswordSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserPasswordSelect) Float64s

func (s *UserPasswordSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) Float64sX

func (s *UserPasswordSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserPasswordSelect) Int

func (s *UserPasswordSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) IntX

func (s *UserPasswordSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserPasswordSelect) Ints

func (s *UserPasswordSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) IntsX

func (s *UserPasswordSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserPasswordSelect) Scan

func (ups *UserPasswordSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserPasswordSelect) ScanX

func (s *UserPasswordSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserPasswordSelect) String

func (s *UserPasswordSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) StringX

func (s *UserPasswordSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserPasswordSelect) Strings

func (s *UserPasswordSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserPasswordSelect) StringsX

func (s *UserPasswordSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserPasswordUpdate

type UserPasswordUpdate struct {
	// contains filtered or unexported fields
}

UserPasswordUpdate is the builder for updating UserPassword entities.

func (*UserPasswordUpdate) AddUpdatedBy

func (upu *UserPasswordUpdate) AddUpdatedBy(i int) *UserPasswordUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*UserPasswordUpdate) ClearPassword

func (upu *UserPasswordUpdate) ClearPassword() *UserPasswordUpdate

ClearPassword clears the value of the "password" field.

func (*UserPasswordUpdate) ClearStatus

func (upu *UserPasswordUpdate) ClearStatus() *UserPasswordUpdate

ClearStatus clears the value of the "status" field.

func (*UserPasswordUpdate) ClearUpdatedAt

func (upu *UserPasswordUpdate) ClearUpdatedAt() *UserPasswordUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordUpdate) ClearUpdatedBy

func (upu *UserPasswordUpdate) ClearUpdatedBy() *UserPasswordUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordUpdate) Exec

func (upu *UserPasswordUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserPasswordUpdate) ExecX

func (upu *UserPasswordUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordUpdate) Mutation

func (upu *UserPasswordUpdate) Mutation() *UserPasswordMutation

Mutation returns the UserPasswordMutation object of the builder.

func (*UserPasswordUpdate) Save

func (upu *UserPasswordUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserPasswordUpdate) SaveX

func (upu *UserPasswordUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserPasswordUpdate) SetInput

SetInput applies the change-set in the UpdateUserPasswordInput on the UserPasswordUpdate builder.

func (*UserPasswordUpdate) SetNillablePassword

func (upu *UserPasswordUpdate) SetNillablePassword(s *string) *UserPasswordUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserPasswordUpdate) SetNillableStatus

func (upu *UserPasswordUpdate) SetNillableStatus(ts *typex.SimpleStatus) *UserPasswordUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserPasswordUpdate) SetNillableUpdatedAt

func (upu *UserPasswordUpdate) SetNillableUpdatedAt(t *time.Time) *UserPasswordUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserPasswordUpdate) SetNillableUpdatedBy

func (upu *UserPasswordUpdate) SetNillableUpdatedBy(i *int) *UserPasswordUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserPasswordUpdate) SetPassword

func (upu *UserPasswordUpdate) SetPassword(s string) *UserPasswordUpdate

SetPassword sets the "password" field.

func (*UserPasswordUpdate) SetSalt

func (upu *UserPasswordUpdate) SetSalt(s string) *UserPasswordUpdate

SetSalt sets the "salt" field.

func (*UserPasswordUpdate) SetScene

SetScene sets the "scene" field.

func (*UserPasswordUpdate) SetStatus

SetStatus sets the "status" field.

func (*UserPasswordUpdate) SetUpdatedAt

func (upu *UserPasswordUpdate) SetUpdatedAt(t time.Time) *UserPasswordUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordUpdate) SetUpdatedBy

func (upu *UserPasswordUpdate) SetUpdatedBy(i int) *UserPasswordUpdate

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordUpdate) Where

Where appends a list predicates to the UserPasswordUpdate builder.

type UserPasswordUpdateOne

type UserPasswordUpdateOne struct {
	// contains filtered or unexported fields
}

UserPasswordUpdateOne is the builder for updating a single UserPassword entity.

func (*UserPasswordUpdateOne) AddUpdatedBy

func (upuo *UserPasswordUpdateOne) AddUpdatedBy(i int) *UserPasswordUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*UserPasswordUpdateOne) ClearPassword

func (upuo *UserPasswordUpdateOne) ClearPassword() *UserPasswordUpdateOne

ClearPassword clears the value of the "password" field.

func (*UserPasswordUpdateOne) ClearStatus

func (upuo *UserPasswordUpdateOne) ClearStatus() *UserPasswordUpdateOne

ClearStatus clears the value of the "status" field.

func (*UserPasswordUpdateOne) ClearUpdatedAt

func (upuo *UserPasswordUpdateOne) ClearUpdatedAt() *UserPasswordUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordUpdateOne) ClearUpdatedBy

func (upuo *UserPasswordUpdateOne) ClearUpdatedBy() *UserPasswordUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordUpdateOne) Exec

func (upuo *UserPasswordUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserPasswordUpdateOne) ExecX

func (upuo *UserPasswordUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordUpdateOne) Mutation

func (upuo *UserPasswordUpdateOne) Mutation() *UserPasswordMutation

Mutation returns the UserPasswordMutation object of the builder.

func (*UserPasswordUpdateOne) Save

Save executes the query and returns the updated UserPassword entity.

func (*UserPasswordUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserPasswordUpdateOne) Select

func (upuo *UserPasswordUpdateOne) Select(field string, fields ...string) *UserPasswordUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserPasswordUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserPasswordInput on the UserPasswordUpdateOne builder.

func (*UserPasswordUpdateOne) SetNillablePassword

func (upuo *UserPasswordUpdateOne) SetNillablePassword(s *string) *UserPasswordUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserPasswordUpdateOne) SetNillableStatus

func (upuo *UserPasswordUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *UserPasswordUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserPasswordUpdateOne) SetNillableUpdatedAt

func (upuo *UserPasswordUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserPasswordUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserPasswordUpdateOne) SetNillableUpdatedBy

func (upuo *UserPasswordUpdateOne) SetNillableUpdatedBy(i *int) *UserPasswordUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserPasswordUpdateOne) SetPassword

func (upuo *UserPasswordUpdateOne) SetPassword(s string) *UserPasswordUpdateOne

SetPassword sets the "password" field.

func (*UserPasswordUpdateOne) SetSalt

SetSalt sets the "salt" field.

func (*UserPasswordUpdateOne) SetScene

SetScene sets the "scene" field.

func (*UserPasswordUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*UserPasswordUpdateOne) SetUpdatedAt

func (upuo *UserPasswordUpdateOne) SetUpdatedAt(t time.Time) *UserPasswordUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordUpdateOne) SetUpdatedBy

func (upuo *UserPasswordUpdateOne) SetUpdatedBy(i int) *UserPasswordUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordUpdateOne) Where

Where appends a list predicates to the UserPasswordUpdate builder.

type UserPasswordUpsert

type UserPasswordUpsert struct {
	*sql.UpdateSet
}

UserPasswordUpsert is the "OnConflict" setter.

func (*UserPasswordUpsert) AddUpdatedBy

func (u *UserPasswordUpsert) AddUpdatedBy(v int) *UserPasswordUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*UserPasswordUpsert) ClearPassword

func (u *UserPasswordUpsert) ClearPassword() *UserPasswordUpsert

ClearPassword clears the value of the "password" field.

func (*UserPasswordUpsert) ClearStatus

func (u *UserPasswordUpsert) ClearStatus() *UserPasswordUpsert

ClearStatus clears the value of the "status" field.

func (*UserPasswordUpsert) ClearUpdatedAt

func (u *UserPasswordUpsert) ClearUpdatedAt() *UserPasswordUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordUpsert) ClearUpdatedBy

func (u *UserPasswordUpsert) ClearUpdatedBy() *UserPasswordUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordUpsert) SetPassword

func (u *UserPasswordUpsert) SetPassword(v string) *UserPasswordUpsert

SetPassword sets the "password" field.

func (*UserPasswordUpsert) SetSalt

SetSalt sets the "salt" field.

func (*UserPasswordUpsert) SetScene

SetScene sets the "scene" field.

func (*UserPasswordUpsert) SetStatus

SetStatus sets the "status" field.

func (*UserPasswordUpsert) SetUpdatedAt

func (u *UserPasswordUpsert) SetUpdatedAt(v time.Time) *UserPasswordUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordUpsert) SetUpdatedBy

func (u *UserPasswordUpsert) SetUpdatedBy(v int) *UserPasswordUpsert

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordUpsert) UpdatePassword

func (u *UserPasswordUpsert) UpdatePassword() *UserPasswordUpsert

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserPasswordUpsert) UpdateSalt

func (u *UserPasswordUpsert) UpdateSalt() *UserPasswordUpsert

UpdateSalt sets the "salt" field to the value that was provided on create.

func (*UserPasswordUpsert) UpdateScene

func (u *UserPasswordUpsert) UpdateScene() *UserPasswordUpsert

UpdateScene sets the "scene" field to the value that was provided on create.

func (*UserPasswordUpsert) UpdateStatus

func (u *UserPasswordUpsert) UpdateStatus() *UserPasswordUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserPasswordUpsert) UpdateUpdatedAt

func (u *UserPasswordUpsert) UpdateUpdatedAt() *UserPasswordUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserPasswordUpsert) UpdateUpdatedBy

func (u *UserPasswordUpsert) UpdateUpdatedBy() *UserPasswordUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserPasswordUpsertBulk

type UserPasswordUpsertBulk struct {
	// contains filtered or unexported fields
}

UserPasswordUpsertBulk is the builder for "upsert"-ing a bulk of UserPassword nodes.

func (*UserPasswordUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserPasswordUpsertBulk) ClearPassword

func (u *UserPasswordUpsertBulk) ClearPassword() *UserPasswordUpsertBulk

ClearPassword clears the value of the "password" field.

func (*UserPasswordUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*UserPasswordUpsertBulk) ClearUpdatedAt

func (u *UserPasswordUpsertBulk) ClearUpdatedAt() *UserPasswordUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordUpsertBulk) ClearUpdatedBy

func (u *UserPasswordUpsertBulk) ClearUpdatedBy() *UserPasswordUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserPasswordUpsertBulk) Exec

Exec executes the query.

func (*UserPasswordUpsertBulk) ExecX

func (u *UserPasswordUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserPassword.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserPasswordUpsertBulk) SetPassword

SetPassword sets the "password" field.

func (*UserPasswordUpsertBulk) SetSalt

SetSalt sets the "salt" field.

func (*UserPasswordUpsertBulk) SetScene

SetScene sets the "scene" field.

func (*UserPasswordUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*UserPasswordUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserPasswordCreateBulk.OnConflict documentation for more info.

func (*UserPasswordUpsertBulk) UpdateNewValues

func (u *UserPasswordUpsertBulk) UpdateNewValues() *UserPasswordUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserPassword.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userpassword.FieldID)
		}),
	).
	Exec(ctx)

func (*UserPasswordUpsertBulk) UpdatePassword

func (u *UserPasswordUpsertBulk) UpdatePassword() *UserPasswordUpsertBulk

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserPasswordUpsertBulk) UpdateSalt

UpdateSalt sets the "salt" field to the value that was provided on create.

func (*UserPasswordUpsertBulk) UpdateScene

UpdateScene sets the "scene" field to the value that was provided on create.

func (*UserPasswordUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserPasswordUpsertBulk) UpdateUpdatedAt

func (u *UserPasswordUpsertBulk) UpdateUpdatedAt() *UserPasswordUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserPasswordUpsertBulk) UpdateUpdatedBy

func (u *UserPasswordUpsertBulk) UpdateUpdatedBy() *UserPasswordUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserPasswordUpsertOne

type UserPasswordUpsertOne struct {
	// contains filtered or unexported fields
}

UserPasswordUpsertOne is the builder for "upsert"-ing

one UserPassword node.

func (*UserPasswordUpsertOne) AddUpdatedBy

func (u *UserPasswordUpsertOne) AddUpdatedBy(v int) *UserPasswordUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*UserPasswordUpsertOne) ClearPassword

func (u *UserPasswordUpsertOne) ClearPassword() *UserPasswordUpsertOne

ClearPassword clears the value of the "password" field.

func (*UserPasswordUpsertOne) ClearStatus

func (u *UserPasswordUpsertOne) ClearStatus() *UserPasswordUpsertOne

ClearStatus clears the value of the "status" field.

func (*UserPasswordUpsertOne) ClearUpdatedAt

func (u *UserPasswordUpsertOne) ClearUpdatedAt() *UserPasswordUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordUpsertOne) ClearUpdatedBy

func (u *UserPasswordUpsertOne) ClearUpdatedBy() *UserPasswordUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserPasswordUpsertOne) Exec

Exec executes the query.

func (*UserPasswordUpsertOne) ExecX

func (u *UserPasswordUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordUpsertOne) ID

func (u *UserPasswordUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserPasswordUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserPasswordUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserPassword.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserPasswordUpsertOne) SetPassword

SetPassword sets the "password" field.

func (*UserPasswordUpsertOne) SetSalt

SetSalt sets the "salt" field.

func (*UserPasswordUpsertOne) SetScene

SetScene sets the "scene" field.

func (*UserPasswordUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*UserPasswordUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordUpsertOne) SetUpdatedBy

func (u *UserPasswordUpsertOne) SetUpdatedBy(v int) *UserPasswordUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserPasswordCreate.OnConflict documentation for more info.

func (*UserPasswordUpsertOne) UpdateNewValues

func (u *UserPasswordUpsertOne) UpdateNewValues() *UserPasswordUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.UserPassword.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userpassword.FieldID)
		}),
	).
	Exec(ctx)

func (*UserPasswordUpsertOne) UpdatePassword

func (u *UserPasswordUpsertOne) UpdatePassword() *UserPasswordUpsertOne

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserPasswordUpsertOne) UpdateSalt

UpdateSalt sets the "salt" field to the value that was provided on create.

func (*UserPasswordUpsertOne) UpdateScene

func (u *UserPasswordUpsertOne) UpdateScene() *UserPasswordUpsertOne

UpdateScene sets the "scene" field to the value that was provided on create.

func (*UserPasswordUpsertOne) UpdateStatus

func (u *UserPasswordUpsertOne) UpdateStatus() *UserPasswordUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserPasswordUpsertOne) UpdateUpdatedAt

func (u *UserPasswordUpsertOne) UpdateUpdatedAt() *UserPasswordUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserPasswordUpsertOne) UpdateUpdatedBy

func (u *UserPasswordUpsertOne) UpdateUpdatedBy() *UserPasswordUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserPasswordWhereInput

type UserPasswordWhereInput struct {
	Predicates []predicate.UserPassword  `json:"-"`
	Not        *UserPasswordWhereInput   `json:"not,omitempty"`
	Or         []*UserPasswordWhereInput `json:"or,omitempty"`
	And        []*UserPasswordWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "user_id" field predicates.
	UserID       *int  `json:"userID,omitempty"`
	UserIDNEQ    *int  `json:"userIDNEQ,omitempty"`
	UserIDIn     []int `json:"userIDIn,omitempty"`
	UserIDNotIn  []int `json:"userIDNotIn,omitempty"`
	UserIDIsNil  bool  `json:"userIDIsNil,omitempty"`
	UserIDNotNil bool  `json:"userIDNotNil,omitempty"`

	// "scene" field predicates.
	Scene      *userpassword.Scene  `json:"scene,omitempty"`
	SceneNEQ   *userpassword.Scene  `json:"sceneNEQ,omitempty"`
	SceneIn    []userpassword.Scene `json:"sceneIn,omitempty"`
	SceneNotIn []userpassword.Scene `json:"sceneNotIn,omitempty"`

	// "password" field predicates.
	Password             *string  `json:"password,omitempty"`
	PasswordNEQ          *string  `json:"passwordNEQ,omitempty"`
	PasswordIn           []string `json:"passwordIn,omitempty"`
	PasswordNotIn        []string `json:"passwordNotIn,omitempty"`
	PasswordGT           *string  `json:"passwordGT,omitempty"`
	PasswordGTE          *string  `json:"passwordGTE,omitempty"`
	PasswordLT           *string  `json:"passwordLT,omitempty"`
	PasswordLTE          *string  `json:"passwordLTE,omitempty"`
	PasswordContains     *string  `json:"passwordContains,omitempty"`
	PasswordHasPrefix    *string  `json:"passwordHasPrefix,omitempty"`
	PasswordHasSuffix    *string  `json:"passwordHasSuffix,omitempty"`
	PasswordIsNil        bool     `json:"passwordIsNil,omitempty"`
	PasswordNotNil       bool     `json:"passwordNotNil,omitempty"`
	PasswordEqualFold    *string  `json:"passwordEqualFold,omitempty"`
	PasswordContainsFold *string  `json:"passwordContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`
}

UserPasswordWhereInput represents a where input for filtering UserPassword queries.

func (*UserPasswordWhereInput) AddPredicates

func (i *UserPasswordWhereInput) AddPredicates(predicates ...predicate.UserPassword)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserPasswordWhereInput) Filter

Filter applies the UserPasswordWhereInput filter on the UserPasswordQuery builder.

func (*UserPasswordWhereInput) P

P returns a predicate for filtering userpasswords. An error is returned if the input is empty or invalid.

type UserPasswords

type UserPasswords []*UserPassword

UserPasswords is a parsable slice of UserPassword.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) CollectFields

func (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Paginate

func (u *UserQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserPaginateOption,
) (*UserConnection, error)

Paginate executes the query and returns a relay based cursor connection to User.

func (*UserQuery) QueryDevices

func (uq *UserQuery) QueryDevices() *UserDeviceQuery

QueryDevices chains the current query on the "devices" edge.

func (*UserQuery) QueryIdentities

func (uq *UserQuery) QueryIdentities() *UserIdentityQuery

QueryIdentities chains the current query on the "identities" edge.

func (*UserQuery) QueryLoginProfile

func (uq *UserQuery) QueryLoginProfile() *UserLoginProfileQuery

QueryLoginProfile chains the current query on the "login_profile" edge.

func (*UserQuery) QueryOauthClients

func (uq *UserQuery) QueryOauthClients() *OauthClientQuery

QueryOauthClients chains the current query on the "oauth_clients" edge.

func (*UserQuery) QueryOrgUser

func (uq *UserQuery) QueryOrgUser() *OrgUserQuery

QueryOrgUser chains the current query on the "org_user" edge.

func (*UserQuery) QueryOrgs

func (uq *UserQuery) QueryOrgs() *OrgQuery

QueryOrgs chains the current query on the "orgs" edge.

func (*UserQuery) QueryPasswords

func (uq *UserQuery) QueryPasswords() *UserPasswordQuery

QueryPasswords chains the current query on the "passwords" edge.

func (*UserQuery) QueryPermissions

func (uq *UserQuery) QueryPermissions() *PermissionQuery

QueryPermissions chains the current query on the "permissions" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedBy int `json:"created_by,omitempty"`
}

client.User.Query().
	Select(user.FieldCreatedBy).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithDevices

func (uq *UserQuery) WithDevices(opts ...func(*UserDeviceQuery)) *UserQuery

WithDevices tells the query-builder to eager-load the nodes that are connected to the "devices" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithIdentities

func (uq *UserQuery) WithIdentities(opts ...func(*UserIdentityQuery)) *UserQuery

WithIdentities tells the query-builder to eager-load the nodes that are connected to the "identities" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithLoginProfile

func (uq *UserQuery) WithLoginProfile(opts ...func(*UserLoginProfileQuery)) *UserQuery

WithLoginProfile tells the query-builder to eager-load the nodes that are connected to the "login_profile" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedDevices

func (uq *UserQuery) WithNamedDevices(name string, opts ...func(*UserDeviceQuery)) *UserQuery

WithNamedDevices tells the query-builder to eager-load the nodes that are connected to the "devices" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedIdentities

func (uq *UserQuery) WithNamedIdentities(name string, opts ...func(*UserIdentityQuery)) *UserQuery

WithNamedIdentities tells the query-builder to eager-load the nodes that are connected to the "identities" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedOauthClients

func (uq *UserQuery) WithNamedOauthClients(name string, opts ...func(*OauthClientQuery)) *UserQuery

WithNamedOauthClients tells the query-builder to eager-load the nodes that are connected to the "oauth_clients" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedOrgUser

func (uq *UserQuery) WithNamedOrgUser(name string, opts ...func(*OrgUserQuery)) *UserQuery

WithNamedOrgUser tells the query-builder to eager-load the nodes that are connected to the "org_user" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedOrgs

func (uq *UserQuery) WithNamedOrgs(name string, opts ...func(*OrgQuery)) *UserQuery

WithNamedOrgs tells the query-builder to eager-load the nodes that are connected to the "orgs" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedPasswords

func (uq *UserQuery) WithNamedPasswords(name string, opts ...func(*UserPasswordQuery)) *UserQuery

WithNamedPasswords tells the query-builder to eager-load the nodes that are connected to the "passwords" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNamedPermissions

func (uq *UserQuery) WithNamedPermissions(name string, opts ...func(*PermissionQuery)) *UserQuery

WithNamedPermissions tells the query-builder to eager-load the nodes that are connected to the "permissions" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOauthClients

func (uq *UserQuery) WithOauthClients(opts ...func(*OauthClientQuery)) *UserQuery

WithOauthClients tells the query-builder to eager-load the nodes that are connected to the "oauth_clients" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOrgUser

func (uq *UserQuery) WithOrgUser(opts ...func(*OrgUserQuery)) *UserQuery

WithOrgUser tells the query-builder to eager-load the nodes that are connected to the "org_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOrgs

func (uq *UserQuery) WithOrgs(opts ...func(*OrgQuery)) *UserQuery

WithOrgs tells the query-builder to eager-load the nodes that are connected to the "orgs" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithPasswords

func (uq *UserQuery) WithPasswords(opts ...func(*UserPasswordQuery)) *UserQuery

WithPasswords tells the query-builder to eager-load the nodes that are connected to the "passwords" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithPermissions

func (uq *UserQuery) WithPermissions(opts ...func(*PermissionQuery)) *UserQuery

WithPermissions tells the query-builder to eager-load the nodes that are connected to the "permissions" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddAvatarFileID

func (uu *UserUpdate) AddAvatarFileID(i int) *UserUpdate

AddAvatarFileID adds i to the "avatar_file_id" field.

func (*UserUpdate) AddDeviceIDs

func (uu *UserUpdate) AddDeviceIDs(ids ...int) *UserUpdate

AddDeviceIDs adds the "devices" edge to the UserDevice entity by IDs.

func (*UserUpdate) AddDevices

func (uu *UserUpdate) AddDevices(u ...*UserDevice) *UserUpdate

AddDevices adds the "devices" edges to the UserDevice entity.

func (*UserUpdate) AddIdentities

func (uu *UserUpdate) AddIdentities(u ...*UserIdentity) *UserUpdate

AddIdentities adds the "identities" edges to the UserIdentity entity.

func (*UserUpdate) AddIdentityIDs

func (uu *UserUpdate) AddIdentityIDs(ids ...int) *UserUpdate

AddIdentityIDs adds the "identities" edge to the UserIdentity entity by IDs.

func (*UserUpdate) AddOauthClientIDs

func (uu *UserUpdate) AddOauthClientIDs(ids ...int) *UserUpdate

AddOauthClientIDs adds the "oauth_clients" edge to the OauthClient entity by IDs.

func (*UserUpdate) AddOauthClients

func (uu *UserUpdate) AddOauthClients(o ...*OauthClient) *UserUpdate

AddOauthClients adds the "oauth_clients" edges to the OauthClient entity.

func (*UserUpdate) AddOrgIDs

func (uu *UserUpdate) AddOrgIDs(ids ...int) *UserUpdate

AddOrgIDs adds the "orgs" edge to the Org entity by IDs.

func (*UserUpdate) AddOrgUser

func (uu *UserUpdate) AddOrgUser(o ...*OrgUser) *UserUpdate

AddOrgUser adds the "org_user" edges to the OrgUser entity.

func (*UserUpdate) AddOrgUserIDs

func (uu *UserUpdate) AddOrgUserIDs(ids ...int) *UserUpdate

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by IDs.

func (*UserUpdate) AddOrgs

func (uu *UserUpdate) AddOrgs(o ...*Org) *UserUpdate

AddOrgs adds the "orgs" edges to the Org entity.

func (*UserUpdate) AddPasswordIDs

func (uu *UserUpdate) AddPasswordIDs(ids ...int) *UserUpdate

AddPasswordIDs adds the "passwords" edge to the UserPassword entity by IDs.

func (*UserUpdate) AddPasswords

func (uu *UserUpdate) AddPasswords(u ...*UserPassword) *UserUpdate

AddPasswords adds the "passwords" edges to the UserPassword entity.

func (*UserUpdate) AddPermissionIDs

func (uu *UserUpdate) AddPermissionIDs(ids ...int) *UserUpdate

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*UserUpdate) AddPermissions

func (uu *UserUpdate) AddPermissions(p ...*Permission) *UserUpdate

AddPermissions adds the "permissions" edges to the Permission entity.

func (*UserUpdate) AddUpdatedBy

func (uu *UserUpdate) AddUpdatedBy(i int) *UserUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*UserUpdate) ClearAvatarFileID

func (uu *UserUpdate) ClearAvatarFileID() *UserUpdate

ClearAvatarFileID clears the value of the "avatar_file_id" field.

func (*UserUpdate) ClearComments

func (uu *UserUpdate) ClearComments() *UserUpdate

ClearComments clears the value of the "comments" field.

func (*UserUpdate) ClearDeletedAt

func (uu *UserUpdate) ClearDeletedAt() *UserUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UserUpdate) ClearDevices

func (uu *UserUpdate) ClearDevices() *UserUpdate

ClearDevices clears all "devices" edges to the UserDevice entity.

func (*UserUpdate) ClearEmail

func (uu *UserUpdate) ClearEmail() *UserUpdate

ClearEmail clears the value of the "email" field.

func (*UserUpdate) ClearIdentities

func (uu *UserUpdate) ClearIdentities() *UserUpdate

ClearIdentities clears all "identities" edges to the UserIdentity entity.

func (*UserUpdate) ClearLoginProfile

func (uu *UserUpdate) ClearLoginProfile() *UserUpdate

ClearLoginProfile clears the "login_profile" edge to the UserLoginProfile entity.

func (*UserUpdate) ClearMobile

func (uu *UserUpdate) ClearMobile() *UserUpdate

ClearMobile clears the value of the "mobile" field.

func (*UserUpdate) ClearOauthClients

func (uu *UserUpdate) ClearOauthClients() *UserUpdate

ClearOauthClients clears all "oauth_clients" edges to the OauthClient entity.

func (*UserUpdate) ClearOrgUser

func (uu *UserUpdate) ClearOrgUser() *UserUpdate

ClearOrgUser clears all "org_user" edges to the OrgUser entity.

func (*UserUpdate) ClearOrgs

func (uu *UserUpdate) ClearOrgs() *UserUpdate

ClearOrgs clears all "orgs" edges to the Org entity.

func (*UserUpdate) ClearPasswords

func (uu *UserUpdate) ClearPasswords() *UserUpdate

ClearPasswords clears all "passwords" edges to the UserPassword entity.

func (*UserUpdate) ClearPermissions

func (uu *UserUpdate) ClearPermissions() *UserUpdate

ClearPermissions clears all "permissions" edges to the Permission entity.

func (*UserUpdate) ClearStatus

func (uu *UserUpdate) ClearStatus() *UserUpdate

ClearStatus clears the value of the "status" field.

func (*UserUpdate) ClearUpdatedAt

func (uu *UserUpdate) ClearUpdatedAt() *UserUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserUpdate) ClearUpdatedBy

func (uu *UserUpdate) ClearUpdatedBy() *UserUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveDeviceIDs

func (uu *UserUpdate) RemoveDeviceIDs(ids ...int) *UserUpdate

RemoveDeviceIDs removes the "devices" edge to UserDevice entities by IDs.

func (*UserUpdate) RemoveDevices

func (uu *UserUpdate) RemoveDevices(u ...*UserDevice) *UserUpdate

RemoveDevices removes "devices" edges to UserDevice entities.

func (*UserUpdate) RemoveIdentities

func (uu *UserUpdate) RemoveIdentities(u ...*UserIdentity) *UserUpdate

RemoveIdentities removes "identities" edges to UserIdentity entities.

func (*UserUpdate) RemoveIdentityIDs

func (uu *UserUpdate) RemoveIdentityIDs(ids ...int) *UserUpdate

RemoveIdentityIDs removes the "identities" edge to UserIdentity entities by IDs.

func (*UserUpdate) RemoveOauthClientIDs

func (uu *UserUpdate) RemoveOauthClientIDs(ids ...int) *UserUpdate

RemoveOauthClientIDs removes the "oauth_clients" edge to OauthClient entities by IDs.

func (*UserUpdate) RemoveOauthClients

func (uu *UserUpdate) RemoveOauthClients(o ...*OauthClient) *UserUpdate

RemoveOauthClients removes "oauth_clients" edges to OauthClient entities.

func (*UserUpdate) RemoveOrgIDs

func (uu *UserUpdate) RemoveOrgIDs(ids ...int) *UserUpdate

RemoveOrgIDs removes the "orgs" edge to Org entities by IDs.

func (*UserUpdate) RemoveOrgUser

func (uu *UserUpdate) RemoveOrgUser(o ...*OrgUser) *UserUpdate

RemoveOrgUser removes "org_user" edges to OrgUser entities.

func (*UserUpdate) RemoveOrgUserIDs

func (uu *UserUpdate) RemoveOrgUserIDs(ids ...int) *UserUpdate

RemoveOrgUserIDs removes the "org_user" edge to OrgUser entities by IDs.

func (*UserUpdate) RemoveOrgs

func (uu *UserUpdate) RemoveOrgs(o ...*Org) *UserUpdate

RemoveOrgs removes "orgs" edges to Org entities.

func (*UserUpdate) RemovePasswordIDs

func (uu *UserUpdate) RemovePasswordIDs(ids ...int) *UserUpdate

RemovePasswordIDs removes the "passwords" edge to UserPassword entities by IDs.

func (*UserUpdate) RemovePasswords

func (uu *UserUpdate) RemovePasswords(u ...*UserPassword) *UserUpdate

RemovePasswords removes "passwords" edges to UserPassword entities.

func (*UserUpdate) RemovePermissionIDs

func (uu *UserUpdate) RemovePermissionIDs(ids ...int) *UserUpdate

RemovePermissionIDs removes the "permissions" edge to Permission entities by IDs.

func (*UserUpdate) RemovePermissions

func (uu *UserUpdate) RemovePermissions(p ...*Permission) *UserUpdate

RemovePermissions removes "permissions" edges to Permission entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetAvatarFileID

func (uu *UserUpdate) SetAvatarFileID(i int) *UserUpdate

SetAvatarFileID sets the "avatar_file_id" field.

func (*UserUpdate) SetComments

func (uu *UserUpdate) SetComments(s string) *UserUpdate

SetComments sets the "comments" field.

func (*UserUpdate) SetCreationType

func (uu *UserUpdate) SetCreationType(ut user.CreationType) *UserUpdate

SetCreationType sets the "creation_type" field.

func (*UserUpdate) SetDeletedAt

func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate

SetDeletedAt sets the "deleted_at" field.

func (*UserUpdate) SetDisplayName

func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate

SetDisplayName sets the "display_name" field.

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetInput

func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate

SetInput applies the change-set in the UpdateUserInput on the UserUpdate builder.

func (*UserUpdate) SetLoginProfile

func (uu *UserUpdate) SetLoginProfile(u *UserLoginProfile) *UserUpdate

SetLoginProfile sets the "login_profile" edge to the UserLoginProfile entity.

func (*UserUpdate) SetLoginProfileID

func (uu *UserUpdate) SetLoginProfileID(id int) *UserUpdate

SetLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by ID.

func (*UserUpdate) SetMobile

func (uu *UserUpdate) SetMobile(s string) *UserUpdate

SetMobile sets the "mobile" field.

func (*UserUpdate) SetNillableAvatarFileID

func (uu *UserUpdate) SetNillableAvatarFileID(i *int) *UserUpdate

SetNillableAvatarFileID sets the "avatar_file_id" field if the given value is not nil.

func (*UserUpdate) SetNillableComments

func (uu *UserUpdate) SetNillableComments(s *string) *UserUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*UserUpdate) SetNillableDeletedAt

func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*UserUpdate) SetNillableEmail

func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdate) SetNillableLoginProfileID

func (uu *UserUpdate) SetNillableLoginProfileID(id *int) *UserUpdate

SetNillableLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by ID if the given value is not nil.

func (*UserUpdate) SetNillableMobile

func (uu *UserUpdate) SetNillableMobile(s *string) *UserUpdate

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserUpdate) SetNillableStatus

func (uu *UserUpdate) SetNillableStatus(ts *typex.SimpleStatus) *UserUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserUpdate) SetNillableUpdatedAt

func (uu *UserUpdate) SetNillableUpdatedAt(t *time.Time) *UserUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserUpdate) SetNillableUpdatedBy

func (uu *UserUpdate) SetNillableUpdatedBy(i *int) *UserUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserUpdate) SetPrincipalName

func (uu *UserUpdate) SetPrincipalName(s string) *UserUpdate

SetPrincipalName sets the "principal_name" field.

func (*UserUpdate) SetRegisterIP

func (uu *UserUpdate) SetRegisterIP(s string) *UserUpdate

SetRegisterIP sets the "register_ip" field.

func (*UserUpdate) SetStatus

func (uu *UserUpdate) SetStatus(ts typex.SimpleStatus) *UserUpdate

SetStatus sets the "status" field.

func (*UserUpdate) SetUpdatedAt

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdate) SetUpdatedBy

func (uu *UserUpdate) SetUpdatedBy(i int) *UserUpdate

SetUpdatedBy sets the "updated_by" field.

func (*UserUpdate) SetUserType

func (uu *UserUpdate) SetUserType(ut user.UserType) *UserUpdate

SetUserType sets the "user_type" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddAvatarFileID

func (uuo *UserUpdateOne) AddAvatarFileID(i int) *UserUpdateOne

AddAvatarFileID adds i to the "avatar_file_id" field.

func (*UserUpdateOne) AddDeviceIDs

func (uuo *UserUpdateOne) AddDeviceIDs(ids ...int) *UserUpdateOne

AddDeviceIDs adds the "devices" edge to the UserDevice entity by IDs.

func (*UserUpdateOne) AddDevices

func (uuo *UserUpdateOne) AddDevices(u ...*UserDevice) *UserUpdateOne

AddDevices adds the "devices" edges to the UserDevice entity.

func (*UserUpdateOne) AddIdentities

func (uuo *UserUpdateOne) AddIdentities(u ...*UserIdentity) *UserUpdateOne

AddIdentities adds the "identities" edges to the UserIdentity entity.

func (*UserUpdateOne) AddIdentityIDs

func (uuo *UserUpdateOne) AddIdentityIDs(ids ...int) *UserUpdateOne

AddIdentityIDs adds the "identities" edge to the UserIdentity entity by IDs.

func (*UserUpdateOne) AddOauthClientIDs

func (uuo *UserUpdateOne) AddOauthClientIDs(ids ...int) *UserUpdateOne

AddOauthClientIDs adds the "oauth_clients" edge to the OauthClient entity by IDs.

func (*UserUpdateOne) AddOauthClients

func (uuo *UserUpdateOne) AddOauthClients(o ...*OauthClient) *UserUpdateOne

AddOauthClients adds the "oauth_clients" edges to the OauthClient entity.

func (*UserUpdateOne) AddOrgIDs

func (uuo *UserUpdateOne) AddOrgIDs(ids ...int) *UserUpdateOne

AddOrgIDs adds the "orgs" edge to the Org entity by IDs.

func (*UserUpdateOne) AddOrgUser

func (uuo *UserUpdateOne) AddOrgUser(o ...*OrgUser) *UserUpdateOne

AddOrgUser adds the "org_user" edges to the OrgUser entity.

func (*UserUpdateOne) AddOrgUserIDs

func (uuo *UserUpdateOne) AddOrgUserIDs(ids ...int) *UserUpdateOne

AddOrgUserIDs adds the "org_user" edge to the OrgUser entity by IDs.

func (*UserUpdateOne) AddOrgs

func (uuo *UserUpdateOne) AddOrgs(o ...*Org) *UserUpdateOne

AddOrgs adds the "orgs" edges to the Org entity.

func (*UserUpdateOne) AddPasswordIDs

func (uuo *UserUpdateOne) AddPasswordIDs(ids ...int) *UserUpdateOne

AddPasswordIDs adds the "passwords" edge to the UserPassword entity by IDs.

func (*UserUpdateOne) AddPasswords

func (uuo *UserUpdateOne) AddPasswords(u ...*UserPassword) *UserUpdateOne

AddPasswords adds the "passwords" edges to the UserPassword entity.

func (*UserUpdateOne) AddPermissionIDs

func (uuo *UserUpdateOne) AddPermissionIDs(ids ...int) *UserUpdateOne

AddPermissionIDs adds the "permissions" edge to the Permission entity by IDs.

func (*UserUpdateOne) AddPermissions

func (uuo *UserUpdateOne) AddPermissions(p ...*Permission) *UserUpdateOne

AddPermissions adds the "permissions" edges to the Permission entity.

func (*UserUpdateOne) AddUpdatedBy

func (uuo *UserUpdateOne) AddUpdatedBy(i int) *UserUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*UserUpdateOne) ClearAvatarFileID

func (uuo *UserUpdateOne) ClearAvatarFileID() *UserUpdateOne

ClearAvatarFileID clears the value of the "avatar_file_id" field.

func (*UserUpdateOne) ClearComments

func (uuo *UserUpdateOne) ClearComments() *UserUpdateOne

ClearComments clears the value of the "comments" field.

func (*UserUpdateOne) ClearDeletedAt

func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UserUpdateOne) ClearDevices

func (uuo *UserUpdateOne) ClearDevices() *UserUpdateOne

ClearDevices clears all "devices" edges to the UserDevice entity.

func (*UserUpdateOne) ClearEmail

func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne

ClearEmail clears the value of the "email" field.

func (*UserUpdateOne) ClearIdentities

func (uuo *UserUpdateOne) ClearIdentities() *UserUpdateOne

ClearIdentities clears all "identities" edges to the UserIdentity entity.

func (*UserUpdateOne) ClearLoginProfile

func (uuo *UserUpdateOne) ClearLoginProfile() *UserUpdateOne

ClearLoginProfile clears the "login_profile" edge to the UserLoginProfile entity.

func (*UserUpdateOne) ClearMobile

func (uuo *UserUpdateOne) ClearMobile() *UserUpdateOne

ClearMobile clears the value of the "mobile" field.

func (*UserUpdateOne) ClearOauthClients

func (uuo *UserUpdateOne) ClearOauthClients() *UserUpdateOne

ClearOauthClients clears all "oauth_clients" edges to the OauthClient entity.

func (*UserUpdateOne) ClearOrgUser

func (uuo *UserUpdateOne) ClearOrgUser() *UserUpdateOne

ClearOrgUser clears all "org_user" edges to the OrgUser entity.

func (*UserUpdateOne) ClearOrgs

func (uuo *UserUpdateOne) ClearOrgs() *UserUpdateOne

ClearOrgs clears all "orgs" edges to the Org entity.

func (*UserUpdateOne) ClearPasswords

func (uuo *UserUpdateOne) ClearPasswords() *UserUpdateOne

ClearPasswords clears all "passwords" edges to the UserPassword entity.

func (*UserUpdateOne) ClearPermissions

func (uuo *UserUpdateOne) ClearPermissions() *UserUpdateOne

ClearPermissions clears all "permissions" edges to the Permission entity.

func (*UserUpdateOne) ClearStatus

func (uuo *UserUpdateOne) ClearStatus() *UserUpdateOne

ClearStatus clears the value of the "status" field.

func (*UserUpdateOne) ClearUpdatedAt

func (uuo *UserUpdateOne) ClearUpdatedAt() *UserUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserUpdateOne) ClearUpdatedBy

func (uuo *UserUpdateOne) ClearUpdatedBy() *UserUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveDeviceIDs

func (uuo *UserUpdateOne) RemoveDeviceIDs(ids ...int) *UserUpdateOne

RemoveDeviceIDs removes the "devices" edge to UserDevice entities by IDs.

func (*UserUpdateOne) RemoveDevices

func (uuo *UserUpdateOne) RemoveDevices(u ...*UserDevice) *UserUpdateOne

RemoveDevices removes "devices" edges to UserDevice entities.

func (*UserUpdateOne) RemoveIdentities

func (uuo *UserUpdateOne) RemoveIdentities(u ...*UserIdentity) *UserUpdateOne

RemoveIdentities removes "identities" edges to UserIdentity entities.

func (*UserUpdateOne) RemoveIdentityIDs

func (uuo *UserUpdateOne) RemoveIdentityIDs(ids ...int) *UserUpdateOne

RemoveIdentityIDs removes the "identities" edge to UserIdentity entities by IDs.

func (*UserUpdateOne) RemoveOauthClientIDs

func (uuo *UserUpdateOne) RemoveOauthClientIDs(ids ...int) *UserUpdateOne

RemoveOauthClientIDs removes the "oauth_clients" edge to OauthClient entities by IDs.

func (*UserUpdateOne) RemoveOauthClients

func (uuo *UserUpdateOne) RemoveOauthClients(o ...*OauthClient) *UserUpdateOne

RemoveOauthClients removes "oauth_clients" edges to OauthClient entities.

func (*UserUpdateOne) RemoveOrgIDs

func (uuo *UserUpdateOne) RemoveOrgIDs(ids ...int) *UserUpdateOne

RemoveOrgIDs removes the "orgs" edge to Org entities by IDs.

func (*UserUpdateOne) RemoveOrgUser

func (uuo *UserUpdateOne) RemoveOrgUser(o ...*OrgUser) *UserUpdateOne

RemoveOrgUser removes "org_user" edges to OrgUser entities.

func (*UserUpdateOne) RemoveOrgUserIDs

func (uuo *UserUpdateOne) RemoveOrgUserIDs(ids ...int) *UserUpdateOne

RemoveOrgUserIDs removes the "org_user" edge to OrgUser entities by IDs.

func (*UserUpdateOne) RemoveOrgs

func (uuo *UserUpdateOne) RemoveOrgs(o ...*Org) *UserUpdateOne

RemoveOrgs removes "orgs" edges to Org entities.

func (*UserUpdateOne) RemovePasswordIDs

func (uuo *UserUpdateOne) RemovePasswordIDs(ids ...int) *UserUpdateOne

RemovePasswordIDs removes the "passwords" edge to UserPassword entities by IDs.

func (*UserUpdateOne) RemovePasswords

func (uuo *UserUpdateOne) RemovePasswords(u ...*UserPassword) *UserUpdateOne

RemovePasswords removes "passwords" edges to UserPassword entities.

func (*UserUpdateOne) RemovePermissionIDs

func (uuo *UserUpdateOne) RemovePermissionIDs(ids ...int) *UserUpdateOne

RemovePermissionIDs removes the "permissions" edge to Permission entities by IDs.

func (*UserUpdateOne) RemovePermissions

func (uuo *UserUpdateOne) RemovePermissions(p ...*Permission) *UserUpdateOne

RemovePermissions removes "permissions" edges to Permission entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetAvatarFileID

func (uuo *UserUpdateOne) SetAvatarFileID(i int) *UserUpdateOne

SetAvatarFileID sets the "avatar_file_id" field.

func (*UserUpdateOne) SetComments

func (uuo *UserUpdateOne) SetComments(s string) *UserUpdateOne

SetComments sets the "comments" field.

func (*UserUpdateOne) SetCreationType

func (uuo *UserUpdateOne) SetCreationType(ut user.CreationType) *UserUpdateOne

SetCreationType sets the "creation_type" field.

func (*UserUpdateOne) SetDeletedAt

func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*UserUpdateOne) SetDisplayName

func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne

SetDisplayName sets the "display_name" field.

func (*UserUpdateOne) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserInput on the UserUpdateOne builder.

func (*UserUpdateOne) SetLoginProfile

func (uuo *UserUpdateOne) SetLoginProfile(u *UserLoginProfile) *UserUpdateOne

SetLoginProfile sets the "login_profile" edge to the UserLoginProfile entity.

func (*UserUpdateOne) SetLoginProfileID

func (uuo *UserUpdateOne) SetLoginProfileID(id int) *UserUpdateOne

SetLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by ID.

func (*UserUpdateOne) SetMobile

func (uuo *UserUpdateOne) SetMobile(s string) *UserUpdateOne

SetMobile sets the "mobile" field.

func (*UserUpdateOne) SetNillableAvatarFileID

func (uuo *UserUpdateOne) SetNillableAvatarFileID(i *int) *UserUpdateOne

SetNillableAvatarFileID sets the "avatar_file_id" field if the given value is not nil.

func (*UserUpdateOne) SetNillableComments

func (uuo *UserUpdateOne) SetNillableComments(s *string) *UserUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*UserUpdateOne) SetNillableDeletedAt

func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableEmail

func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLoginProfileID

func (uuo *UserUpdateOne) SetNillableLoginProfileID(id *int) *UserUpdateOne

SetNillableLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillableMobile

func (uuo *UserUpdateOne) SetNillableMobile(s *string) *UserUpdateOne

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserUpdateOne) SetNillableStatus

func (uuo *UserUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *UserUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*UserUpdateOne) SetNillableUpdatedAt

func (uuo *UserUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableUpdatedBy

func (uuo *UserUpdateOne) SetNillableUpdatedBy(i *int) *UserUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserUpdateOne) SetPrincipalName

func (uuo *UserUpdateOne) SetPrincipalName(s string) *UserUpdateOne

SetPrincipalName sets the "principal_name" field.

func (*UserUpdateOne) SetRegisterIP

func (uuo *UserUpdateOne) SetRegisterIP(s string) *UserUpdateOne

SetRegisterIP sets the "register_ip" field.

func (*UserUpdateOne) SetStatus

func (uuo *UserUpdateOne) SetStatus(ts typex.SimpleStatus) *UserUpdateOne

SetStatus sets the "status" field.

func (*UserUpdateOne) SetUpdatedAt

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdateOne) SetUpdatedBy

func (uuo *UserUpdateOne) SetUpdatedBy(i int) *UserUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*UserUpdateOne) SetUserType

func (uuo *UserUpdateOne) SetUserType(ut user.UserType) *UserUpdateOne

SetUserType sets the "user_type" field.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) AddAvatarFileID

func (u *UserUpsert) AddAvatarFileID(v int) *UserUpsert

AddAvatarFileID adds v to the "avatar_file_id" field.

func (*UserUpsert) AddUpdatedBy

func (u *UserUpsert) AddUpdatedBy(v int) *UserUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*UserUpsert) ClearAvatarFileID

func (u *UserUpsert) ClearAvatarFileID() *UserUpsert

ClearAvatarFileID clears the value of the "avatar_file_id" field.

func (*UserUpsert) ClearComments

func (u *UserUpsert) ClearComments() *UserUpsert

ClearComments clears the value of the "comments" field.

func (*UserUpsert) ClearDeletedAt

func (u *UserUpsert) ClearDeletedAt() *UserUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UserUpsert) ClearEmail

func (u *UserUpsert) ClearEmail() *UserUpsert

ClearEmail clears the value of the "email" field.

func (*UserUpsert) ClearMobile

func (u *UserUpsert) ClearMobile() *UserUpsert

ClearMobile clears the value of the "mobile" field.

func (*UserUpsert) ClearStatus

func (u *UserUpsert) ClearStatus() *UserUpsert

ClearStatus clears the value of the "status" field.

func (*UserUpsert) ClearUpdatedAt

func (u *UserUpsert) ClearUpdatedAt() *UserUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserUpsert) ClearUpdatedBy

func (u *UserUpsert) ClearUpdatedBy() *UserUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserUpsert) SetAvatarFileID

func (u *UserUpsert) SetAvatarFileID(v int) *UserUpsert

SetAvatarFileID sets the "avatar_file_id" field.

func (*UserUpsert) SetComments

func (u *UserUpsert) SetComments(v string) *UserUpsert

SetComments sets the "comments" field.

func (*UserUpsert) SetCreationType

func (u *UserUpsert) SetCreationType(v user.CreationType) *UserUpsert

SetCreationType sets the "creation_type" field.

func (*UserUpsert) SetDeletedAt

func (u *UserUpsert) SetDeletedAt(v time.Time) *UserUpsert

SetDeletedAt sets the "deleted_at" field.

func (*UserUpsert) SetDisplayName

func (u *UserUpsert) SetDisplayName(v string) *UserUpsert

SetDisplayName sets the "display_name" field.

func (*UserUpsert) SetEmail

func (u *UserUpsert) SetEmail(v string) *UserUpsert

SetEmail sets the "email" field.

func (*UserUpsert) SetMobile

func (u *UserUpsert) SetMobile(v string) *UserUpsert

SetMobile sets the "mobile" field.

func (*UserUpsert) SetPrincipalName

func (u *UserUpsert) SetPrincipalName(v string) *UserUpsert

SetPrincipalName sets the "principal_name" field.

func (*UserUpsert) SetRegisterIP

func (u *UserUpsert) SetRegisterIP(v string) *UserUpsert

SetRegisterIP sets the "register_ip" field.

func (*UserUpsert) SetStatus

func (u *UserUpsert) SetStatus(v typex.SimpleStatus) *UserUpsert

SetStatus sets the "status" field.

func (*UserUpsert) SetUpdatedAt

func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsert) SetUpdatedBy

func (u *UserUpsert) SetUpdatedBy(v int) *UserUpsert

SetUpdatedBy sets the "updated_by" field.

func (*UserUpsert) SetUserType

func (u *UserUpsert) SetUserType(v user.UserType) *UserUpsert

SetUserType sets the "user_type" field.

func (*UserUpsert) UpdateAvatarFileID

func (u *UserUpsert) UpdateAvatarFileID() *UserUpsert

UpdateAvatarFileID sets the "avatar_file_id" field to the value that was provided on create.

func (*UserUpsert) UpdateComments

func (u *UserUpsert) UpdateComments() *UserUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*UserUpsert) UpdateCreationType

func (u *UserUpsert) UpdateCreationType() *UserUpsert

UpdateCreationType sets the "creation_type" field to the value that was provided on create.

func (*UserUpsert) UpdateDeletedAt

func (u *UserUpsert) UpdateDeletedAt() *UserUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*UserUpsert) UpdateDisplayName

func (u *UserUpsert) UpdateDisplayName() *UserUpsert

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*UserUpsert) UpdateEmail

func (u *UserUpsert) UpdateEmail() *UserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsert) UpdateMobile

func (u *UserUpsert) UpdateMobile() *UserUpsert

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserUpsert) UpdatePrincipalName

func (u *UserUpsert) UpdatePrincipalName() *UserUpsert

UpdatePrincipalName sets the "principal_name" field to the value that was provided on create.

func (*UserUpsert) UpdateRegisterIP

func (u *UserUpsert) UpdateRegisterIP() *UserUpsert

UpdateRegisterIP sets the "register_ip" field to the value that was provided on create.

func (*UserUpsert) UpdateStatus

func (u *UserUpsert) UpdateStatus() *UserUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserUpsert) UpdateUpdatedAt

func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsert) UpdateUpdatedBy

func (u *UserUpsert) UpdateUpdatedBy() *UserUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserUpsert) UpdateUserType

func (u *UserUpsert) UpdateUserType() *UserUpsert

UpdateUserType sets the "user_type" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) AddAvatarFileID

func (u *UserUpsertBulk) AddAvatarFileID(v int) *UserUpsertBulk

AddAvatarFileID adds v to the "avatar_file_id" field.

func (*UserUpsertBulk) AddUpdatedBy

func (u *UserUpsertBulk) AddUpdatedBy(v int) *UserUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*UserUpsertBulk) ClearAvatarFileID

func (u *UserUpsertBulk) ClearAvatarFileID() *UserUpsertBulk

ClearAvatarFileID clears the value of the "avatar_file_id" field.

func (*UserUpsertBulk) ClearComments

func (u *UserUpsertBulk) ClearComments() *UserUpsertBulk

ClearComments clears the value of the "comments" field.

func (*UserUpsertBulk) ClearDeletedAt

func (u *UserUpsertBulk) ClearDeletedAt() *UserUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UserUpsertBulk) ClearEmail

func (u *UserUpsertBulk) ClearEmail() *UserUpsertBulk

ClearEmail clears the value of the "email" field.

func (*UserUpsertBulk) ClearMobile

func (u *UserUpsertBulk) ClearMobile() *UserUpsertBulk

ClearMobile clears the value of the "mobile" field.

func (*UserUpsertBulk) ClearStatus

func (u *UserUpsertBulk) ClearStatus() *UserUpsertBulk

ClearStatus clears the value of the "status" field.

func (*UserUpsertBulk) ClearUpdatedAt

func (u *UserUpsertBulk) ClearUpdatedAt() *UserUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserUpsertBulk) ClearUpdatedBy

func (u *UserUpsertBulk) ClearUpdatedBy() *UserUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetAvatarFileID

func (u *UserUpsertBulk) SetAvatarFileID(v int) *UserUpsertBulk

SetAvatarFileID sets the "avatar_file_id" field.

func (*UserUpsertBulk) SetComments

func (u *UserUpsertBulk) SetComments(v string) *UserUpsertBulk

SetComments sets the "comments" field.

func (*UserUpsertBulk) SetCreationType

func (u *UserUpsertBulk) SetCreationType(v user.CreationType) *UserUpsertBulk

SetCreationType sets the "creation_type" field.

func (*UserUpsertBulk) SetDeletedAt

func (u *UserUpsertBulk) SetDeletedAt(v time.Time) *UserUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*UserUpsertBulk) SetDisplayName

func (u *UserUpsertBulk) SetDisplayName(v string) *UserUpsertBulk

SetDisplayName sets the "display_name" field.

func (*UserUpsertBulk) SetEmail

func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk

SetEmail sets the "email" field.

func (*UserUpsertBulk) SetMobile

func (u *UserUpsertBulk) SetMobile(v string) *UserUpsertBulk

SetMobile sets the "mobile" field.

func (*UserUpsertBulk) SetPrincipalName

func (u *UserUpsertBulk) SetPrincipalName(v string) *UserUpsertBulk

SetPrincipalName sets the "principal_name" field.

func (*UserUpsertBulk) SetRegisterIP

func (u *UserUpsertBulk) SetRegisterIP(v string) *UserUpsertBulk

SetRegisterIP sets the "register_ip" field.

func (*UserUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*UserUpsertBulk) SetUpdatedAt

func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertBulk) SetUpdatedBy

func (u *UserUpsertBulk) SetUpdatedBy(v int) *UserUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*UserUpsertBulk) SetUserType

func (u *UserUpsertBulk) SetUserType(v user.UserType) *UserUpsertBulk

SetUserType sets the "user_type" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateAvatarFileID

func (u *UserUpsertBulk) UpdateAvatarFileID() *UserUpsertBulk

UpdateAvatarFileID sets the "avatar_file_id" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateComments

func (u *UserUpsertBulk) UpdateComments() *UserUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateCreationType

func (u *UserUpsertBulk) UpdateCreationType() *UserUpsertBulk

UpdateCreationType sets the "creation_type" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateDeletedAt

func (u *UserUpsertBulk) UpdateDeletedAt() *UserUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateDisplayName

func (u *UserUpsertBulk) UpdateDisplayName() *UserUpsertBulk

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateEmail

func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateMobile

func (u *UserUpsertBulk) UpdateMobile() *UserUpsertBulk

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdatePrincipalName

func (u *UserUpsertBulk) UpdatePrincipalName() *UserUpsertBulk

UpdatePrincipalName sets the "principal_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateRegisterIP

func (u *UserUpsertBulk) UpdateRegisterIP() *UserUpsertBulk

UpdateRegisterIP sets the "register_ip" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateStatus

func (u *UserUpsertBulk) UpdateStatus() *UserUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUpdatedAt

func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUpdatedBy

func (u *UserUpsertBulk) UpdateUpdatedBy() *UserUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUserType

func (u *UserUpsertBulk) UpdateUserType() *UserUpsertBulk

UpdateUserType sets the "user_type" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) AddAvatarFileID

func (u *UserUpsertOne) AddAvatarFileID(v int) *UserUpsertOne

AddAvatarFileID adds v to the "avatar_file_id" field.

func (*UserUpsertOne) AddUpdatedBy

func (u *UserUpsertOne) AddUpdatedBy(v int) *UserUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*UserUpsertOne) ClearAvatarFileID

func (u *UserUpsertOne) ClearAvatarFileID() *UserUpsertOne

ClearAvatarFileID clears the value of the "avatar_file_id" field.

func (*UserUpsertOne) ClearComments

func (u *UserUpsertOne) ClearComments() *UserUpsertOne

ClearComments clears the value of the "comments" field.

func (*UserUpsertOne) ClearDeletedAt

func (u *UserUpsertOne) ClearDeletedAt() *UserUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UserUpsertOne) ClearEmail

func (u *UserUpsertOne) ClearEmail() *UserUpsertOne

ClearEmail clears the value of the "email" field.

func (*UserUpsertOne) ClearMobile

func (u *UserUpsertOne) ClearMobile() *UserUpsertOne

ClearMobile clears the value of the "mobile" field.

func (*UserUpsertOne) ClearStatus

func (u *UserUpsertOne) ClearStatus() *UserUpsertOne

ClearStatus clears the value of the "status" field.

func (*UserUpsertOne) ClearUpdatedAt

func (u *UserUpsertOne) ClearUpdatedAt() *UserUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserUpsertOne) ClearUpdatedBy

func (u *UserUpsertOne) ClearUpdatedBy() *UserUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetAvatarFileID

func (u *UserUpsertOne) SetAvatarFileID(v int) *UserUpsertOne

SetAvatarFileID sets the "avatar_file_id" field.

func (*UserUpsertOne) SetComments

func (u *UserUpsertOne) SetComments(v string) *UserUpsertOne

SetComments sets the "comments" field.

func (*UserUpsertOne) SetCreationType

func (u *UserUpsertOne) SetCreationType(v user.CreationType) *UserUpsertOne

SetCreationType sets the "creation_type" field.

func (*UserUpsertOne) SetDeletedAt

func (u *UserUpsertOne) SetDeletedAt(v time.Time) *UserUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*UserUpsertOne) SetDisplayName

func (u *UserUpsertOne) SetDisplayName(v string) *UserUpsertOne

SetDisplayName sets the "display_name" field.

func (*UserUpsertOne) SetEmail

func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne

SetEmail sets the "email" field.

func (*UserUpsertOne) SetMobile

func (u *UserUpsertOne) SetMobile(v string) *UserUpsertOne

SetMobile sets the "mobile" field.

func (*UserUpsertOne) SetPrincipalName

func (u *UserUpsertOne) SetPrincipalName(v string) *UserUpsertOne

SetPrincipalName sets the "principal_name" field.

func (*UserUpsertOne) SetRegisterIP

func (u *UserUpsertOne) SetRegisterIP(v string) *UserUpsertOne

SetRegisterIP sets the "register_ip" field.

func (*UserUpsertOne) SetStatus

func (u *UserUpsertOne) SetStatus(v typex.SimpleStatus) *UserUpsertOne

SetStatus sets the "status" field.

func (*UserUpsertOne) SetUpdatedAt

func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertOne) SetUpdatedBy

func (u *UserUpsertOne) SetUpdatedBy(v int) *UserUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*UserUpsertOne) SetUserType

func (u *UserUpsertOne) SetUserType(v user.UserType) *UserUpsertOne

SetUserType sets the "user_type" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateAvatarFileID

func (u *UserUpsertOne) UpdateAvatarFileID() *UserUpsertOne

UpdateAvatarFileID sets the "avatar_file_id" field to the value that was provided on create.

func (*UserUpsertOne) UpdateComments

func (u *UserUpsertOne) UpdateComments() *UserUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*UserUpsertOne) UpdateCreationType

func (u *UserUpsertOne) UpdateCreationType() *UserUpsertOne

UpdateCreationType sets the "creation_type" field to the value that was provided on create.

func (*UserUpsertOne) UpdateDeletedAt

func (u *UserUpsertOne) UpdateDeletedAt() *UserUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateDisplayName

func (u *UserUpsertOne) UpdateDisplayName() *UserUpsertOne

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateEmail

func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertOne) UpdateMobile

func (u *UserUpsertOne) UpdateMobile() *UserUpsertOne

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdatePrincipalName

func (u *UserUpsertOne) UpdatePrincipalName() *UserUpsertOne

UpdatePrincipalName sets the "principal_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateRegisterIP

func (u *UserUpsertOne) UpdateRegisterIP() *UserUpsertOne

UpdateRegisterIP sets the "register_ip" field to the value that was provided on create.

func (*UserUpsertOne) UpdateStatus

func (u *UserUpsertOne) UpdateStatus() *UserUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUpdatedAt

func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUpdatedBy

func (u *UserUpsertOne) UpdateUpdatedBy() *UserUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUserType

func (u *UserUpsertOne) UpdateUserType() *UserUpsertOne

UpdateUserType sets the "user_type" field to the value that was provided on create.

type UserWhereInput

type UserWhereInput struct {
	Predicates []predicate.User  `json:"-"`
	Not        *UserWhereInput   `json:"not,omitempty"`
	Or         []*UserWhereInput `json:"or,omitempty"`
	And        []*UserWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "deleted_at" field predicates.
	DeletedAt       *time.Time  `json:"deletedAt,omitempty"`
	DeletedAtNEQ    *time.Time  `json:"deletedAtNEQ,omitempty"`
	DeletedAtIn     []time.Time `json:"deletedAtIn,omitempty"`
	DeletedAtNotIn  []time.Time `json:"deletedAtNotIn,omitempty"`
	DeletedAtGT     *time.Time  `json:"deletedAtGT,omitempty"`
	DeletedAtGTE    *time.Time  `json:"deletedAtGTE,omitempty"`
	DeletedAtLT     *time.Time  `json:"deletedAtLT,omitempty"`
	DeletedAtLTE    *time.Time  `json:"deletedAtLTE,omitempty"`
	DeletedAtIsNil  bool        `json:"deletedAtIsNil,omitempty"`
	DeletedAtNotNil bool        `json:"deletedAtNotNil,omitempty"`

	// "principal_name" field predicates.
	PrincipalName             *string  `json:"principalName,omitempty"`
	PrincipalNameNEQ          *string  `json:"principalNameNEQ,omitempty"`
	PrincipalNameIn           []string `json:"principalNameIn,omitempty"`
	PrincipalNameNotIn        []string `json:"principalNameNotIn,omitempty"`
	PrincipalNameGT           *string  `json:"principalNameGT,omitempty"`
	PrincipalNameGTE          *string  `json:"principalNameGTE,omitempty"`
	PrincipalNameLT           *string  `json:"principalNameLT,omitempty"`
	PrincipalNameLTE          *string  `json:"principalNameLTE,omitempty"`
	PrincipalNameContains     *string  `json:"principalNameContains,omitempty"`
	PrincipalNameHasPrefix    *string  `json:"principalNameHasPrefix,omitempty"`
	PrincipalNameHasSuffix    *string  `json:"principalNameHasSuffix,omitempty"`
	PrincipalNameEqualFold    *string  `json:"principalNameEqualFold,omitempty"`
	PrincipalNameContainsFold *string  `json:"principalNameContainsFold,omitempty"`

	// "display_name" field predicates.
	DisplayName             *string  `json:"displayName,omitempty"`
	DisplayNameNEQ          *string  `json:"displayNameNEQ,omitempty"`
	DisplayNameIn           []string `json:"displayNameIn,omitempty"`
	DisplayNameNotIn        []string `json:"displayNameNotIn,omitempty"`
	DisplayNameGT           *string  `json:"displayNameGT,omitempty"`
	DisplayNameGTE          *string  `json:"displayNameGTE,omitempty"`
	DisplayNameLT           *string  `json:"displayNameLT,omitempty"`
	DisplayNameLTE          *string  `json:"displayNameLTE,omitempty"`
	DisplayNameContains     *string  `json:"displayNameContains,omitempty"`
	DisplayNameHasPrefix    *string  `json:"displayNameHasPrefix,omitempty"`
	DisplayNameHasSuffix    *string  `json:"displayNameHasSuffix,omitempty"`
	DisplayNameEqualFold    *string  `json:"displayNameEqualFold,omitempty"`
	DisplayNameContainsFold *string  `json:"displayNameContainsFold,omitempty"`

	// "email" field predicates.
	Email             *string  `json:"email,omitempty"`
	EmailNEQ          *string  `json:"emailNEQ,omitempty"`
	EmailIn           []string `json:"emailIn,omitempty"`
	EmailNotIn        []string `json:"emailNotIn,omitempty"`
	EmailGT           *string  `json:"emailGT,omitempty"`
	EmailGTE          *string  `json:"emailGTE,omitempty"`
	EmailLT           *string  `json:"emailLT,omitempty"`
	EmailLTE          *string  `json:"emailLTE,omitempty"`
	EmailContains     *string  `json:"emailContains,omitempty"`
	EmailHasPrefix    *string  `json:"emailHasPrefix,omitempty"`
	EmailHasSuffix    *string  `json:"emailHasSuffix,omitempty"`
	EmailIsNil        bool     `json:"emailIsNil,omitempty"`
	EmailNotNil       bool     `json:"emailNotNil,omitempty"`
	EmailEqualFold    *string  `json:"emailEqualFold,omitempty"`
	EmailContainsFold *string  `json:"emailContainsFold,omitempty"`

	// "mobile" field predicates.
	Mobile             *string  `json:"mobile,omitempty"`
	MobileNEQ          *string  `json:"mobileNEQ,omitempty"`
	MobileIn           []string `json:"mobileIn,omitempty"`
	MobileNotIn        []string `json:"mobileNotIn,omitempty"`
	MobileGT           *string  `json:"mobileGT,omitempty"`
	MobileGTE          *string  `json:"mobileGTE,omitempty"`
	MobileLT           *string  `json:"mobileLT,omitempty"`
	MobileLTE          *string  `json:"mobileLTE,omitempty"`
	MobileContains     *string  `json:"mobileContains,omitempty"`
	MobileHasPrefix    *string  `json:"mobileHasPrefix,omitempty"`
	MobileHasSuffix    *string  `json:"mobileHasSuffix,omitempty"`
	MobileIsNil        bool     `json:"mobileIsNil,omitempty"`
	MobileNotNil       bool     `json:"mobileNotNil,omitempty"`
	MobileEqualFold    *string  `json:"mobileEqualFold,omitempty"`
	MobileContainsFold *string  `json:"mobileContainsFold,omitempty"`

	// "user_type" field predicates.
	UserType      *user.UserType  `json:"userType,omitempty"`
	UserTypeNEQ   *user.UserType  `json:"userTypeNEQ,omitempty"`
	UserTypeIn    []user.UserType `json:"userTypeIn,omitempty"`
	UserTypeNotIn []user.UserType `json:"userTypeNotIn,omitempty"`

	// "creation_type" field predicates.
	CreationType      *user.CreationType  `json:"creationType,omitempty"`
	CreationTypeNEQ   *user.CreationType  `json:"creationTypeNEQ,omitempty"`
	CreationTypeIn    []user.CreationType `json:"creationTypeIn,omitempty"`
	CreationTypeNotIn []user.CreationType `json:"creationTypeNotIn,omitempty"`

	// "register_ip" field predicates.
	RegisterIP             *string  `json:"registerIP,omitempty"`
	RegisterIPNEQ          *string  `json:"registerIPNEQ,omitempty"`
	RegisterIPIn           []string `json:"registerIPIn,omitempty"`
	RegisterIPNotIn        []string `json:"registerIPNotIn,omitempty"`
	RegisterIPGT           *string  `json:"registerIPGT,omitempty"`
	RegisterIPGTE          *string  `json:"registerIPGTE,omitempty"`
	RegisterIPLT           *string  `json:"registerIPLT,omitempty"`
	RegisterIPLTE          *string  `json:"registerIPLTE,omitempty"`
	RegisterIPContains     *string  `json:"registerIPContains,omitempty"`
	RegisterIPHasPrefix    *string  `json:"registerIPHasPrefix,omitempty"`
	RegisterIPHasSuffix    *string  `json:"registerIPHasSuffix,omitempty"`
	RegisterIPEqualFold    *string  `json:"registerIPEqualFold,omitempty"`
	RegisterIPContainsFold *string  `json:"registerIPContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "identities" edge predicates.
	HasIdentities     *bool                     `json:"hasIdentities,omitempty"`
	HasIdentitiesWith []*UserIdentityWhereInput `json:"hasIdentitiesWith,omitempty"`

	// "login_profile" edge predicates.
	HasLoginProfile     *bool                         `json:"hasLoginProfile,omitempty"`
	HasLoginProfileWith []*UserLoginProfileWhereInput `json:"hasLoginProfileWith,omitempty"`

	// "passwords" edge predicates.
	HasPasswords     *bool                     `json:"hasPasswords,omitempty"`
	HasPasswordsWith []*UserPasswordWhereInput `json:"hasPasswordsWith,omitempty"`

	// "devices" edge predicates.
	HasDevices     *bool                   `json:"hasDevices,omitempty"`
	HasDevicesWith []*UserDeviceWhereInput `json:"hasDevicesWith,omitempty"`

	// "permissions" edge predicates.
	HasPermissions     *bool                   `json:"hasPermissions,omitempty"`
	HasPermissionsWith []*PermissionWhereInput `json:"hasPermissionsWith,omitempty"`

	// "oauth_clients" edge predicates.
	HasOauthClients     *bool                    `json:"hasOauthClients,omitempty"`
	HasOauthClientsWith []*OauthClientWhereInput `json:"hasOauthClientsWith,omitempty"`
}

UserWhereInput represents a where input for filtering User queries.

func (*UserWhereInput) AddPredicates

func (i *UserWhereInput) AddPredicates(predicates ...predicate.User)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserWhereInput) Filter

func (i *UserWhereInput) Filter(q *UserQuery) (*UserQuery, error)

Filter applies the UserWhereInput filter on the UserQuery builder.

func (*UserWhereInput) P

func (i *UserWhereInput) P() (predicate.User, error)

P returns a predicate for filtering users. An error is returned if the input is empty or invalid.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Source Files

Jump to

Keyboard shortcuts

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