ent

package
v0.0.0-...-5fc39c8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 68 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"
	TypeAppPolicyView      = "AppPolicyView"
	TypeAppRes             = "AppRes"
	TypeAppRole            = "AppRole"
	TypeAppRolePolicy      = "AppRolePolicy"
	TypeCountry            = "Country"
	TypeCurrency           = "Currency"
	TypeFileIdentity       = "FileIdentity"
	TypeFileSource         = "FileSource"
	TypeOauthClient        = "OauthClient"
	TypeOrg                = "Org"
	TypeOrgApp             = "OrgApp"
	TypeOrgPolicy          = "OrgPolicy"
	TypeOrgRole            = "OrgRole"
	TypeOrgRoleUser        = "OrgRoleUser"
	TypeOrgUser            = "OrgUser"
	TypeOrgUserPreference  = "OrgUserPreference"
	TypePermission         = "Permission"
	TypeQuota              = "Quota"
	TypeQuotaItem          = "QuotaItem"
	TypeRegion             = "Region"
	TypeUser               = "User"
	TypeUserAddr           = "UserAddr"
	TypeUserDevice         = "UserDevice"
	TypeUserIdentity       = "UserIdentity"
	TypeUserLoginProfile   = "UserLoginProfile"
	TypeUserPassword       = "UserPassword"
	TypeUserPasswordPolicy = "UserPasswordPolicy"
)

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 (
	// AppPolicyViewOrderFieldCreatedAt orders AppPolicyView by created_at.
	AppPolicyViewOrderFieldCreatedAt = &AppPolicyViewOrderField{
		Value: func(apv *AppPolicyView) (ent.Value, error) {
			return apv.CreatedAt, nil
		},
		column: apppolicyview.FieldCreatedAt,
		toTerm: apppolicyview.ByCreatedAt,
		toCursor: func(apv *AppPolicyView) Cursor {
			return Cursor{
				ID:    apv.ID,
				Value: apv.CreatedAt,
			}
		},
	}
	// AppPolicyViewOrderFieldDisplaySort orders AppPolicyView by display_sort.
	AppPolicyViewOrderFieldDisplaySort = &AppPolicyViewOrderField{
		Value: func(apv *AppPolicyView) (ent.Value, error) {
			return apv.DisplaySort, nil
		},
		column: apppolicyview.FieldDisplaySort,
		toTerm: apppolicyview.ByDisplaySort,
		toCursor: func(apv *AppPolicyView) Cursor {
			return Cursor{
				ID:    apv.ID,
				Value: apv.DisplaySort,
			}
		},
	}
)
View Source
var (
	// CountryOrderFieldCreatedAt orders Country by created_at.
	CountryOrderFieldCreatedAt = &CountryOrderField{
		Value: func(c *Country) (ent.Value, error) {
			return c.CreatedAt, nil
		},
		column: country.FieldCreatedAt,
		toTerm: country.ByCreatedAt,
		toCursor: func(c *Country) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.CreatedAt,
			}
		},
	}
	// CountryOrderFieldDisplaySort orders Country by display_sort.
	CountryOrderFieldDisplaySort = &CountryOrderField{
		Value: func(c *Country) (ent.Value, error) {
			return c.DisplaySort, nil
		},
		column: country.FieldDisplaySort,
		toTerm: country.ByDisplaySort,
		toCursor: func(c *Country) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.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 (
	// RegionOrderFieldCreatedAt orders Region by created_at.
	RegionOrderFieldCreatedAt = &RegionOrderField{
		Value: func(r *Region) (ent.Value, error) {
			return r.CreatedAt, nil
		},
		column: region.FieldCreatedAt,
		toTerm: region.ByCreatedAt,
		toCursor: func(r *Region) Cursor {
			return Cursor{
				ID:    r.ID,
				Value: r.CreatedAt,
			}
		},
	}
	// RegionOrderFieldDisplaySort orders Region by display_sort.
	RegionOrderFieldDisplaySort = &RegionOrderField{
		Value: func(r *Region) (ent.Value, error) {
			return r.DisplaySort, nil
		},
		column: region.FieldDisplaySort,
		toTerm: region.ByDisplaySort,
		toCursor: func(r *Region) Cursor {
			return Cursor{
				ID:    r.ID,
				Value: r.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 (
	// CurrencyOrderFieldCreatedAt orders Currency by created_at.
	CurrencyOrderFieldCreatedAt = &CurrencyOrderField{
		Value: func(c *Currency) (ent.Value, error) {
			return c.CreatedAt, nil
		},
		column: currency.FieldCreatedAt,
		toTerm: currency.ByCreatedAt,
		toCursor: func(c *Currency) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.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 DefaultAppPolicyViewOrder = &AppPolicyViewOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AppPolicyViewOrderField{
		Value: func(apv *AppPolicyView) (ent.Value, error) {
			return apv.ID, nil
		},
		column: apppolicyview.FieldID,
		toTerm: apppolicyview.ByID,
		toCursor: func(apv *AppPolicyView) Cursor {
			return Cursor{ID: apv.ID}
		},
	},
}

DefaultAppPolicyViewOrder is the default ordering of AppPolicyView.

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 DefaultCountryOrder = &CountryOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CountryOrderField{
		Value: func(c *Country) (ent.Value, error) {
			return c.ID, nil
		},
		column: country.FieldID,
		toTerm: country.ByID,
		toCursor: func(c *Country) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCountryOrder is the default ordering of Country.

View Source
var DefaultCurrencyOrder = &CurrencyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CurrencyOrderField{
		Value: func(c *Currency) (ent.Value, error) {
			return c.ID, nil
		},
		column: currency.FieldID,
		toTerm: currency.ByID,
		toCursor: func(c *Currency) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCurrencyOrder is the default ordering of Currency.

View Source
var DefaultFileIdentityOrder = &FileIdentityOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &FileIdentityOrderField{
		Value: func(fi *FileIdentity) (ent.Value, error) {
			return fi.ID, nil
		},
		column: fileidentity.FieldID,
		toTerm: fileidentity.ByID,
		toCursor: func(fi *FileIdentity) Cursor {
			return Cursor{ID: fi.ID}
		},
	},
}

DefaultFileIdentityOrder is the default ordering of FileIdentity.

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 DefaultQuotaItemOrder = &QuotaItemOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &QuotaItemOrderField{
		Value: func(qi *QuotaItem) (ent.Value, error) {
			return qi.ID, nil
		},
		column: quotaitem.FieldID,
		toTerm: quotaitem.ByID,
		toCursor: func(qi *QuotaItem) Cursor {
			return Cursor{ID: qi.ID}
		},
	},
}

DefaultQuotaItemOrder is the default ordering of QuotaItem.

View Source
var DefaultQuotaOrder = &QuotaOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &QuotaOrderField{
		Value: func(q *Quota) (ent.Value, error) {
			return q.ID, nil
		},
		column: quota.FieldID,
		toTerm: quota.ByID,
		toCursor: func(q *Quota) Cursor {
			return Cursor{ID: q.ID}
		},
	},
}

DefaultQuotaOrder is the default ordering of Quota.

View Source
var DefaultRegionOrder = &RegionOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &RegionOrderField{
		Value: func(r *Region) (ent.Value, error) {
			return r.ID, nil
		},
		column: region.FieldID,
		toTerm: region.ByID,
		toCursor: func(r *Region) Cursor {
			return Cursor{ID: r.ID}
		},
	},
}

DefaultRegionOrder is the default ordering of Region.

View Source
var DefaultUserAddrOrder = &UserAddrOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserAddrOrderField{
		Value: func(ua *UserAddr) (ent.Value, error) {
			return ua.ID, nil
		},
		column: useraddr.FieldID,
		toTerm: useraddr.ByID,
		toCursor: func(ua *UserAddr) Cursor {
			return Cursor{ID: ua.ID}
		},
	},
}

DefaultUserAddrOrder is the default ordering of UserAddr.

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 DefaultUserPasswordPolicyOrder = &UserPasswordPolicyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserPasswordPolicyOrderField{
		Value: func(upp *UserPasswordPolicy) (ent.Value, error) {
			return upp.ID, nil
		},
		column: userpasswordpolicy.FieldID,
		toTerm: userpasswordpolicy.ByID,
		toCursor: func(upp *UserPasswordPolicy) Cursor {
			return Cursor{ID: upp.ID}
		},
	},
}

DefaultUserPasswordPolicyOrder is the default ordering of UserPasswordPolicy.

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 ErrEmptyAppPolicyViewWhereInput = errors.New("ent: empty predicate AppPolicyViewWhereInput")

ErrEmptyAppPolicyViewWhereInput is returned in case the AppPolicyViewWhereInput 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 ErrEmptyCountryWhereInput = errors.New("ent: empty predicate CountryWhereInput")

ErrEmptyCountryWhereInput is returned in case the CountryWhereInput is empty.

View Source
var ErrEmptyCurrencyWhereInput = errors.New("ent: empty predicate CurrencyWhereInput")

ErrEmptyCurrencyWhereInput is returned in case the CurrencyWhereInput is empty.

View Source
var ErrEmptyFileIdentityWhereInput = errors.New("ent: empty predicate FileIdentityWhereInput")

ErrEmptyFileIdentityWhereInput is returned in case the FileIdentityWhereInput is empty.

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

ErrEmptyFileSourceWhereInput is returned in case the FileSourceWhereInput 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 ErrEmptyQuotaItemWhereInput = errors.New("ent: empty predicate QuotaItemWhereInput")

ErrEmptyQuotaItemWhereInput is returned in case the QuotaItemWhereInput is empty.

View Source
var ErrEmptyQuotaWhereInput = errors.New("ent: empty predicate QuotaWhereInput")

ErrEmptyQuotaWhereInput is returned in case the QuotaWhereInput is empty.

View Source
var ErrEmptyRegionWhereInput = errors.New("ent: empty predicate RegionWhereInput")

ErrEmptyRegionWhereInput is returned in case the RegionWhereInput is empty.

View Source
var ErrEmptyUserAddrWhereInput = errors.New("ent: empty predicate UserAddrWhereInput")

ErrEmptyUserAddrWhereInput is returned in case the UserAddrWhereInput 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 ErrEmptyUserPasswordPolicyWhereInput = errors.New("ent: empty predicate UserPasswordPolicyWhereInput")

ErrEmptyUserPasswordPolicyWhereInput is returned in case the UserPasswordPolicyWhereInput 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 (
	// FileIdentityOrderFieldCreatedAt orders FileIdentity by created_at.
	FileIdentityOrderFieldCreatedAt = &FileIdentityOrderField{
		Value: func(fi *FileIdentity) (ent.Value, error) {
			return fi.CreatedAt, nil
		},
		column: fileidentity.FieldCreatedAt,
		toTerm: fileidentity.ByCreatedAt,
		toCursor: func(fi *FileIdentity) Cursor {
			return Cursor{
				ID:    fi.ID,
				Value: fi.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 (
	// QuotaItemOrderFieldCreatedAt orders QuotaItem by created_at.
	QuotaItemOrderFieldCreatedAt = &QuotaItemOrderField{
		Value: func(qi *QuotaItem) (ent.Value, error) {
			return qi.CreatedAt, nil
		},
		column: quotaitem.FieldCreatedAt,
		toTerm: quotaitem.ByCreatedAt,
		toCursor: func(qi *QuotaItem) Cursor {
			return Cursor{
				ID:    qi.ID,
				Value: qi.CreatedAt,
			}
		},
	}
)
View Source
var (
	// QuotaOrderFieldCreatedAt orders Quota by created_at.
	QuotaOrderFieldCreatedAt = &QuotaOrderField{
		Value: func(q *Quota) (ent.Value, error) {
			return q.CreatedAt, nil
		},
		column: quota.FieldCreatedAt,
		toTerm: quota.ByCreatedAt,
		toCursor: func(q *Quota) Cursor {
			return Cursor{
				ID:    q.ID,
				Value: q.CreatedAt,
			}
		},
	}
)
View Source
var (
	// UserAddrOrderFieldCreatedAt orders UserAddr by created_at.
	UserAddrOrderFieldCreatedAt = &UserAddrOrderField{
		Value: func(ua *UserAddr) (ent.Value, error) {
			return ua.CreatedAt, nil
		},
		column: useraddr.FieldCreatedAt,
		toTerm: useraddr.ByCreatedAt,
		toCursor: func(ua *UserAddr) Cursor {
			return Cursor{
				ID:    ua.ID,
				Value: ua.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,
			}
		},
	}
)
View Source
var (
	// UserPasswordPolicyOrderFieldCreatedAt orders UserPasswordPolicy by created_at.
	UserPasswordPolicyOrderFieldCreatedAt = &UserPasswordPolicyOrderField{
		Value: func(upp *UserPasswordPolicy) (ent.Value, error) {
			return upp.CreatedAt, nil
		},
		column: userpasswordpolicy.FieldCreatedAt,
		toTerm: userpasswordpolicy.ByCreatedAt,
		toCursor: func(upp *UserPasswordPolicy) Cursor {
			return Cursor{
				ID:    upp.ID,
				Value: upp.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.

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"`
	Logo string `json:"logo,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 私有App,表示由组织创建
	OrgPrivate bool `json:"org_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) ExecContext

func (c *App) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) NamedPolicyViews

func (a *App) NamedPolicyViews(name string) ([]*AppPolicyView, error)

NamedPolicyViews returns the PolicyViews 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) PolicyViews

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

func (*App) QueryActions

func (a *App) QueryActions() *AppActionQuery

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

func (*App) QueryContext

func (c *App) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) QueryPolicyViews

func (a *App) QueryPolicyViews() *AppPolicyViewQuery

QueryPolicyViews queries the "policy_views" 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) ExecContext

func (c *AppAction) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppAction) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppActionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppActionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppActionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppActionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppActionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppActionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppActionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppActionDelete) ExecX

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

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

func (*AppActionDelete) QueryContext

func (c *AppActionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppActionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppActionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppActionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppActionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c AppActionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppActionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppActionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppActionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableKind

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

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppActionUpdate) SetNillableMethod

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

SetNillableMethod sets the "method" field if the given value is not nil.

func (*AppActionUpdate) SetNillableName

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

SetNillableName sets the "name" 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) ExecContext

func (c *AppActionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppActionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableKind

func (aauo *AppActionUpdateOne) SetNillableKind(a *appaction.Kind) *AppActionUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppActionUpdateOne) SetNillableMethod

func (aauo *AppActionUpdateOne) SetNillableMethod(a *appaction.Method) *AppActionUpdateOne

SetNillableMethod sets the "method" field if the given value is not nil.

func (*AppActionUpdateOne) SetNillableName

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

SetNillableName sets the "name" 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) ExecContext

func (c *AppClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) QueryPolicyViews

func (c *AppClient) QueryPolicyViews(a *App) *AppPolicyViewQuery

QueryPolicyViews queries the policy_views 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) AddPolicyViewIDs

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

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView entity by IDs.

func (*AppCreate) AddPolicyViews

func (ac *AppCreate) AddPolicyViews(a ...*AppPolicyView) *AppCreate

AddPolicyViews adds the "policy_views" edges to the AppPolicyView entity.

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) ExecContext

func (c *AppCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 (ac *AppCreate) SetLogo(s string) *AppCreate

SetLogo sets the "logo" 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 (ac *AppCreate) SetNillableLogo(s *string) *AppCreate

SetNillableLogo sets the "logo" field if the given value is not nil.

func (*AppCreate) SetNillableOrgPrivate

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

SetNillableOrgPrivate sets the "org_private" 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) 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) SetOrgPrivate

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

SetOrgPrivate sets the "org_private" field.

func (*AppCreate) SetOwnerOrgID

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

SetOwnerOrgID sets the "owner_org_id" 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) ExecContext

func (c *AppCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppDelete) ExecX

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

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

func (*AppDelete) QueryContext

func (c *AppDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDict) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDict) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppDictDelete) ExecX

func (add *AppDictDelete) ExecX(ctx context.Context) int

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

func (*AppDictDelete) QueryContext

func (c *AppDictDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItem) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItem) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItemClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItemClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItemCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItemCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItemCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItemCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItemDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppDictItemDelete) ExecX

func (adid *AppDictItemDelete) ExecX(ctx context.Context) int

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

func (*AppDictItemDelete) QueryContext

func (c *AppDictItemDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItemMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItemMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItemQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItemQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c AppDictItemSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppDictItemSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictItemUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItemUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableName

func (adiu *AppDictItemUpdate) SetNillableName(s *string) *AppDictItemUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AppDictItemUpdate) SetNillableRefCode

func (adiu *AppDictItemUpdate) SetNillableRefCode(s *string) *AppDictItemUpdate

SetNillableRefCode sets the "ref_code" 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) ExecContext

func (c *AppDictItemUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictItemUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableName

func (adiuo *AppDictItemUpdateOne) SetNillableName(s *string) *AppDictItemUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*AppDictItemUpdateOne) SetNillableRefCode

func (adiuo *AppDictItemUpdateOne) SetNillableRefCode(s *string) *AppDictItemUpdateOne

SetNillableRefCode sets the "ref_code" 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) ExecContext

func (c *AppDictMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c AppDictSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppDictSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppDictUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableName

func (adu *AppDictUpdate) SetNillableName(s *string) *AppDictUpdate

SetNillableName sets the "name" 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) ExecContext

func (c *AppDictUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppDictUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableName

func (aduo *AppDictUpdateOne) SetNillableName(s *string) *AppDictUpdateOne

SetNillableName sets the "name" 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"`
	// 策略视图
	PolicyViews []*AppPolicyView `json:"policy_views,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) PolicyViewsOrErr

func (e AppEdges) PolicyViewsOrErr() ([]*AppPolicyView, error)

PolicyViewsOrErr returns the PolicyViews 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"`
	// 状态
	Status typex.SimpleStatus `json:"status,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) Children

func (am *AppMenu) Children(ctx context.Context) (result []*AppMenu, err error)

func (*AppMenu) ExecContext

func (c *AppMenu) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) NamedChildren

func (am *AppMenu) NamedChildren(name string) ([]*AppMenu, error)

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

func (*AppMenu) Parent

func (am *AppMenu) Parent(ctx context.Context) (*AppMenu, error)

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) QueryChildren

func (am *AppMenu) QueryChildren() *AppMenuQuery

QueryChildren queries the "children" edge of the AppMenu entity.

func (*AppMenu) QueryContext

func (c *AppMenu) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppMenu) QueryParent

func (am *AppMenu) QueryParent() *AppMenuQuery

QueryParent queries the "parent" 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) ExecContext

func (c *AppMenuClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryChildren

func (c *AppMenuClient) QueryChildren(am *AppMenu) *AppMenuQuery

QueryChildren queries the children edge of a AppMenu.

func (*AppMenuClient) QueryContext

func (c *AppMenuClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppMenuClient) QueryParent

func (c *AppMenuClient) QueryParent(am *AppMenu) *AppMenuQuery

QueryParent queries the parent 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) AddChildIDs

func (amc *AppMenuCreate) AddChildIDs(ids ...int) *AppMenuCreate

AddChildIDs adds the "children" edge to the AppMenu entity by IDs.

func (*AppMenuCreate) AddChildren

func (amc *AppMenuCreate) AddChildren(a ...*AppMenu) *AppMenuCreate

AddChildren adds the "children" edges to the AppMenu entity.

func (*AppMenuCreate) Exec

func (amc *AppMenuCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppMenuCreate) ExecContext

func (c *AppMenuCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppMenuCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableStatus

func (amc *AppMenuCreate) SetNillableStatus(ts *typex.SimpleStatus) *AppMenuCreate

SetNillableStatus sets the "status" 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) SetParent

func (amc *AppMenuCreate) SetParent(a *AppMenu) *AppMenuCreate

SetParent sets the "parent" edge to the AppMenu entity.

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) SetStatus

func (amc *AppMenuCreate) SetStatus(ts typex.SimpleStatus) *AppMenuCreate

SetStatus sets the "status" 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) ExecContext

func (c *AppMenuCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppMenuCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppMenuDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppMenuDelete) ExecX

func (amd *AppMenuDelete) ExecX(ctx context.Context) int

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

func (*AppMenuDelete) QueryContext

func (c *AppMenuDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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"`
	// Parent holds the value of the parent edge.
	Parent *AppMenu `json:"parent,omitempty"`
	// Children holds the value of the children edge.
	Children []*AppMenu `json:"children,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.

func (AppMenuEdges) ChildrenOrErr

func (e AppMenuEdges) ChildrenOrErr() ([]*AppMenu, error)

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

func (AppMenuEdges) ParentOrErr

func (e AppMenuEdges) ParentOrErr() (*AppMenu, error)

ParentOrErr returns the Parent 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) AddChildIDs

func (m *AppMenuMutation) AddChildIDs(ids ...int)

AddChildIDs adds the "children" edge to the AppMenu entity by ids.

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) 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) 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) ChildrenCleared

func (m *AppMenuMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the AppMenu entity was cleared.

func (*AppMenuMutation) ChildrenIDs

func (m *AppMenuMutation) ChildrenIDs() (ids []int)

ChildrenIDs returns the "children" edge IDs in the mutation.

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) ClearChildren

func (m *AppMenuMutation) ClearChildren()

ClearChildren clears the "children" edge to the AppMenu entity.

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) ClearParent

func (m *AppMenuMutation) ClearParent()

ClearParent clears the "parent" edge to the AppMenu entity.

func (*AppMenuMutation) ClearRoute

func (m *AppMenuMutation) ClearRoute()

ClearRoute clears the value of the "route" field.

func (*AppMenuMutation) ClearStatus

func (m *AppMenuMutation) ClearStatus()

ClearStatus clears the value of the "status" 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) ExecContext

func (c *AppMenuMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) OldStatus

func (m *AppMenuMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" 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) ParentCleared

func (m *AppMenuMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the AppMenu entity was cleared.

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) ParentIDs

func (m *AppMenuMutation) 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 (*AppMenuMutation) QueryContext

func (c *AppMenuMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppMenuMutation) RemoveChildIDs

func (m *AppMenuMutation) RemoveChildIDs(ids ...int)

RemoveChildIDs removes the "children" edge to the AppMenu entity by IDs.

func (*AppMenuMutation) RemovedChildrenIDs

func (m *AppMenuMutation) RemovedChildrenIDs() (ids []int)

RemovedChildren returns the removed IDs of the "children" edge to the AppMenu entity.

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) ResetChildren

func (m *AppMenuMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

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) ResetParent

func (m *AppMenuMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

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) ResetStatus

func (m *AppMenuMutation) ResetStatus()

ResetStatus resets all changes to the "status" 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) SetStatus

func (m *AppMenuMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" 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) Status

func (m *AppMenuMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*AppMenuMutation) StatusCleared

func (m *AppMenuMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

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) ExecContext

func (c *AppMenuQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryChildren

func (amq *AppMenuQuery) QueryChildren() *AppMenuQuery

QueryChildren chains the current query on the "children" edge.

func (*AppMenuQuery) QueryContext

func (c *AppMenuQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppMenuQuery) QueryParent

func (amq *AppMenuQuery) QueryParent() *AppMenuQuery

QueryParent chains the current query on the "parent" 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.

func (*AppMenuQuery) WithChildren

func (amq *AppMenuQuery) WithChildren(opts ...func(*AppMenuQuery)) *AppMenuQuery

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 (*AppMenuQuery) WithNamedChildren

func (amq *AppMenuQuery) WithNamedChildren(name string, opts ...func(*AppMenuQuery)) *AppMenuQuery

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 (*AppMenuQuery) WithParent

func (amq *AppMenuQuery) WithParent(opts ...func(*AppMenuQuery)) *AppMenuQuery

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.

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) ExecContext

func (c AppMenuSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppMenuSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) AddChildIDs

func (amu *AppMenuUpdate) AddChildIDs(ids ...int) *AppMenuUpdate

AddChildIDs adds the "children" edge to the AppMenu entity by IDs.

func (*AppMenuUpdate) AddChildren

func (amu *AppMenuUpdate) AddChildren(a ...*AppMenu) *AppMenuUpdate

AddChildren adds the "children" edges to the AppMenu entity.

func (*AppMenuUpdate) AddDisplaySort

func (amu *AppMenuUpdate) AddDisplaySort(i int32) *AppMenuUpdate

AddDisplaySort adds i to the "display_sort" 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) ClearChildren

func (amu *AppMenuUpdate) ClearChildren() *AppMenuUpdate

ClearChildren clears all "children" edges to the AppMenu entity.

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) ClearParent

func (amu *AppMenuUpdate) ClearParent() *AppMenuUpdate

ClearParent clears the "parent" edge to the AppMenu entity.

func (*AppMenuUpdate) ClearRoute

func (amu *AppMenuUpdate) ClearRoute() *AppMenuUpdate

ClearRoute clears the value of the "route" field.

func (*AppMenuUpdate) ClearStatus

func (amu *AppMenuUpdate) ClearStatus() *AppMenuUpdate

ClearStatus clears the value of the "status" 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) ExecContext

func (c *AppMenuUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppMenuUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppMenuUpdate) RemoveChildIDs

func (amu *AppMenuUpdate) RemoveChildIDs(ids ...int) *AppMenuUpdate

RemoveChildIDs removes the "children" edge to AppMenu entities by IDs.

func (*AppMenuUpdate) RemoveChildren

func (amu *AppMenuUpdate) RemoveChildren(a ...*AppMenu) *AppMenuUpdate

RemoveChildren removes "children" edges to AppMenu entities.

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) SetNillableKind

func (amu *AppMenuUpdate) SetNillableKind(a *appmenu.Kind) *AppMenuUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableName

func (amu *AppMenuUpdate) SetNillableName(s *string) *AppMenuUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AppMenuUpdate) SetNillableParentID

func (amu *AppMenuUpdate) SetNillableParentID(i *int) *AppMenuUpdate

SetNillableParentID sets the "parent_id" 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) SetNillableStatus

func (amu *AppMenuUpdate) SetNillableStatus(ts *typex.SimpleStatus) *AppMenuUpdate

SetNillableStatus sets the "status" 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) SetParent

func (amu *AppMenuUpdate) SetParent(a *AppMenu) *AppMenuUpdate

SetParent sets the "parent" edge to the AppMenu entity.

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) SetStatus

func (amu *AppMenuUpdate) SetStatus(ts typex.SimpleStatus) *AppMenuUpdate

SetStatus sets the "status" 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) AddChildIDs

func (amuo *AppMenuUpdateOne) AddChildIDs(ids ...int) *AppMenuUpdateOne

AddChildIDs adds the "children" edge to the AppMenu entity by IDs.

func (*AppMenuUpdateOne) AddChildren

func (amuo *AppMenuUpdateOne) AddChildren(a ...*AppMenu) *AppMenuUpdateOne

AddChildren adds the "children" edges to the AppMenu entity.

func (*AppMenuUpdateOne) AddDisplaySort

func (amuo *AppMenuUpdateOne) AddDisplaySort(i int32) *AppMenuUpdateOne

AddDisplaySort adds i to the "display_sort" 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) ClearChildren

func (amuo *AppMenuUpdateOne) ClearChildren() *AppMenuUpdateOne

ClearChildren clears all "children" edges to the AppMenu entity.

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) ClearParent

func (amuo *AppMenuUpdateOne) ClearParent() *AppMenuUpdateOne

ClearParent clears the "parent" edge to the AppMenu entity.

func (*AppMenuUpdateOne) ClearRoute

func (amuo *AppMenuUpdateOne) ClearRoute() *AppMenuUpdateOne

ClearRoute clears the value of the "route" field.

func (*AppMenuUpdateOne) ClearStatus

func (amuo *AppMenuUpdateOne) ClearStatus() *AppMenuUpdateOne

ClearStatus clears the value of the "status" 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) ExecContext

func (c *AppMenuUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppMenuUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppMenuUpdateOne) RemoveChildIDs

func (amuo *AppMenuUpdateOne) RemoveChildIDs(ids ...int) *AppMenuUpdateOne

RemoveChildIDs removes the "children" edge to AppMenu entities by IDs.

func (*AppMenuUpdateOne) RemoveChildren

func (amuo *AppMenuUpdateOne) RemoveChildren(a ...*AppMenu) *AppMenuUpdateOne

RemoveChildren removes "children" edges to AppMenu entities.

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) SetNillableKind

func (amuo *AppMenuUpdateOne) SetNillableKind(a *appmenu.Kind) *AppMenuUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableName

func (amuo *AppMenuUpdateOne) SetNillableName(s *string) *AppMenuUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*AppMenuUpdateOne) SetNillableParentID

func (amuo *AppMenuUpdateOne) SetNillableParentID(i *int) *AppMenuUpdateOne

SetNillableParentID sets the "parent_id" 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) SetNillableStatus

func (amuo *AppMenuUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *AppMenuUpdateOne

SetNillableStatus sets the "status" 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) SetParent

func (amuo *AppMenuUpdateOne) SetParent(a *AppMenu) *AppMenuUpdateOne

SetParent sets the "parent" edge to the AppMenu entity.

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) SetStatus

func (amuo *AppMenuUpdateOne) SetStatus(ts typex.SimpleStatus) *AppMenuUpdateOne

SetStatus sets the "status" 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) 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) ClearStatus

func (u *AppMenuUpsert) ClearStatus() *AppMenuUpsert

ClearStatus clears the value of the "status" 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) SetStatus

func (u *AppMenuUpsert) SetStatus(v typex.SimpleStatus) *AppMenuUpsert

SetStatus sets the "status" 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) UpdateStatus

func (u *AppMenuUpsert) UpdateStatus() *AppMenuUpsert

UpdateStatus sets the "status" 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) 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) ClearStatus

func (u *AppMenuUpsertBulk) ClearStatus() *AppMenuUpsertBulk

ClearStatus clears the value of the "status" 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) SetStatus

SetStatus sets the "status" 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) UpdateStatus

func (u *AppMenuUpsertBulk) UpdateStatus() *AppMenuUpsertBulk

UpdateStatus sets the "status" 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) 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) ClearStatus

func (u *AppMenuUpsertOne) ClearStatus() *AppMenuUpsertOne

ClearStatus clears the value of the "status" 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) SetStatus

SetStatus sets the "status" 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) UpdateStatus

func (u *AppMenuUpsertOne) UpdateStatus() *AppMenuUpsertOne

UpdateStatus sets the "status" 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"`

	// "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"`

	// "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"`

	// "action" edge predicates.
	HasAction     *bool                  `json:"hasAction,omitempty"`
	HasActionWith []*AppActionWhereInput `json:"hasActionWith,omitempty"`

	// "parent" edge predicates.
	HasParent     *bool                `json:"hasParent,omitempty"`
	HasParentWith []*AppMenuWhereInput `json:"hasParentWith,omitempty"`

	// "children" edge predicates.
	HasChildren     *bool                `json:"hasChildren,omitempty"`
	HasChildrenWith []*AppMenuWhereInput `json:"hasChildrenWith,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) 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) AddPolicyViewIDs

func (m *AppMutation) AddPolicyViewIDs(ids ...int)

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView 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) 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 (m *AppMutation) ClearLogo()

ClearLogo clears the value of the "logo" 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) ClearOrgPrivate

func (m *AppMutation) ClearOrgPrivate()

ClearOrgPrivate clears the value of the "org_private" field.

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) ClearPolicyViews

func (m *AppMutation) ClearPolicyViews()

ClearPolicyViews clears the "policy_views" edge to the AppPolicyView entity.

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) ExecContext

func (c *AppMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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 (m *AppMutation) Logo() (r string, exists bool)

Logo returns the value of the "logo" field in the mutation.

func (*AppMutation) LogoCleared

func (m *AppMutation) LogoCleared() bool

LogoCleared returns if the "logo" 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 (m *AppMutation) OldLogo(ctx context.Context) (v string, err error)

OldLogo returns the old "logo" 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) OldOrgPrivate

func (m *AppMutation) OldOrgPrivate(ctx context.Context) (v bool, err error)

OldOrgPrivate returns the old "org_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) 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) 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) OrgPrivate

func (m *AppMutation) OrgPrivate() (r bool, exists bool)

OrgPrivate returns the value of the "org_private" field in the mutation.

func (*AppMutation) OrgPrivateCleared

func (m *AppMutation) OrgPrivateCleared() bool

OrgPrivateCleared returns if the "org_private" field was cleared in this 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) PolicyViewsCleared

func (m *AppMutation) PolicyViewsCleared() bool

PolicyViewsCleared reports if the "policy_views" edge to the AppPolicyView entity was cleared.

func (*AppMutation) PolicyViewsIDs

func (m *AppMutation) PolicyViewsIDs() (ids []int)

PolicyViewsIDs returns the "policy_views" edge IDs in the mutation.

func (*AppMutation) QueryContext

func (c *AppMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemovePolicyViewIDs

func (m *AppMutation) RemovePolicyViewIDs(ids ...int)

RemovePolicyViewIDs removes the "policy_views" edge to the AppPolicyView 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) RemovedPolicyViewsIDs

func (m *AppMutation) RemovedPolicyViewsIDs() (ids []int)

RemovedPolicyViews returns the removed IDs of the "policy_views" edge to the AppPolicyView 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 (m *AppMutation) ResetLogo()

ResetLogo resets all changes to the "logo" 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) ResetOrgPrivate

func (m *AppMutation) ResetOrgPrivate()

ResetOrgPrivate resets all changes to the "org_private" field.

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) ResetPolicyViews

func (m *AppMutation) ResetPolicyViews()

ResetPolicyViews resets all changes to the "policy_views" edge.

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 (m *AppMutation) SetLogo(s string)

SetLogo sets the "logo" 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) SetOrgPrivate

func (m *AppMutation) SetOrgPrivate(b bool)

SetOrgPrivate sets the "org_private" field.

func (*AppMutation) SetOwnerOrgID

func (m *AppMutation) SetOwnerOrgID(i int)

SetOwnerOrgID sets the "owner_org_id" 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"`
	// 分类:app-应用策略、view-策略视图
	Kind apppolicy.Kind `json:"kind,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) ExecContext

func (c *AppPolicy) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) NamedOrgPolicies

func (ap *AppPolicy) NamedOrgPolicies(name string) ([]*OrgPolicy, error)

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

func (*AppPolicy) NamedPolicyViews

func (ap *AppPolicy) NamedPolicyViews(name string) ([]*AppPolicyView, error)

NamedPolicyViews returns the PolicyViews 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) OrgPolicies

func (ap *AppPolicy) OrgPolicies(ctx context.Context) (result []*OrgPolicy, err error)

func (*AppPolicy) PolicyViews

func (ap *AppPolicy) PolicyViews(ctx context.Context) (result []*AppPolicyView, err error)

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) QueryContext

func (c *AppPolicy) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicy) QueryOrgPolicies

func (ap *AppPolicy) QueryOrgPolicies() *OrgPolicyQuery

QueryOrgPolicies queries the "org_policies" edge of the AppPolicy entity.

func (*AppPolicy) QueryPolicyViews

func (ap *AppPolicy) QueryPolicyViews() *AppPolicyViewQuery

QueryPolicyViews queries the "policy_views" 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) ExecContext

func (c *AppPolicyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppPolicyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyClient) QueryOrgPolicies

func (c *AppPolicyClient) QueryOrgPolicies(ap *AppPolicy) *OrgPolicyQuery

QueryOrgPolicies queries the org_policies edge of a AppPolicy.

func (*AppPolicyClient) QueryPolicyViews

func (c *AppPolicyClient) QueryPolicyViews(ap *AppPolicy) *AppPolicyViewQuery

QueryPolicyViews queries the policy_views 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) AddOrgPolicies

func (apc *AppPolicyCreate) AddOrgPolicies(o ...*OrgPolicy) *AppPolicyCreate

AddOrgPolicies adds the "org_policies" edges to the OrgPolicy entity.

func (*AppPolicyCreate) AddOrgPolicyIDs

func (apc *AppPolicyCreate) AddOrgPolicyIDs(ids ...int) *AppPolicyCreate

AddOrgPolicyIDs adds the "org_policies" edge to the OrgPolicy entity by IDs.

func (*AppPolicyCreate) AddPolicyViewIDs

func (apc *AppPolicyCreate) AddPolicyViewIDs(ids ...int) *AppPolicyCreate

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView entity by IDs.

func (*AppPolicyCreate) AddPolicyViews

func (apc *AppPolicyCreate) AddPolicyViews(a ...*AppPolicyView) *AppPolicyCreate

AddPolicyViews adds the "policy_views" edges to the AppPolicyView entity.

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) ExecContext

func (c *AppPolicyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppPolicyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetKind

func (apc *AppPolicyCreate) SetKind(a apppolicy.Kind) *AppPolicyCreate

SetKind sets the "kind" field.

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) SetNillableKind

func (apc *AppPolicyCreate) SetNillableKind(a *apppolicy.Kind) *AppPolicyCreate

SetNillableKind sets the "kind" 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) ExecContext

func (c *AppPolicyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppPolicyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppPolicyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyDelete) ExecX

func (apd *AppPolicyDelete) ExecX(ctx context.Context) int

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

func (*AppPolicyDelete) QueryContext

func (c *AppPolicyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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"`
	// 策略授权的组织策略
	OrgPolicies []*OrgPolicy `json:"org_policies,omitempty"`
	// 策略视图
	PolicyViews []*AppPolicyView `json:"policy_views,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) OrgPoliciesOrErr

func (e AppPolicyEdges) OrgPoliciesOrErr() ([]*OrgPolicy, error)

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

func (AppPolicyEdges) PolicyViewsOrErr

func (e AppPolicyEdges) PolicyViewsOrErr() ([]*AppPolicyView, error)

PolicyViewsOrErr returns the PolicyViews 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) AddOrgPolicyIDs

func (m *AppPolicyMutation) AddOrgPolicyIDs(ids ...int)

AddOrgPolicyIDs adds the "org_policies" edge to the OrgPolicy entity by ids.

func (*AppPolicyMutation) AddPolicyViewIDs

func (m *AppPolicyMutation) AddPolicyViewIDs(ids ...int)

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView entity by ids.

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) ClearOrgPolicies

func (m *AppPolicyMutation) ClearOrgPolicies()

ClearOrgPolicies clears the "org_policies" edge to the OrgPolicy entity.

func (*AppPolicyMutation) ClearPolicyViews

func (m *AppPolicyMutation) ClearPolicyViews()

ClearPolicyViews clears the "policy_views" edge to the AppPolicyView entity.

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) ExecContext

func (c *AppPolicyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) Kind

func (m *AppPolicyMutation) Kind() (r apppolicy.Kind, exists bool)

Kind returns the value of the "kind" field in 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) OldKind

func (m *AppPolicyMutation) OldKind(ctx context.Context) (v apppolicy.Kind, err error)

OldKind returns the old "kind" 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) 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) OrgPoliciesCleared

func (m *AppPolicyMutation) OrgPoliciesCleared() bool

OrgPoliciesCleared reports if the "org_policies" edge to the OrgPolicy entity was cleared.

func (*AppPolicyMutation) OrgPoliciesIDs

func (m *AppPolicyMutation) OrgPoliciesIDs() (ids []int)

OrgPoliciesIDs returns the "org_policies" edge IDs in the mutation.

func (*AppPolicyMutation) PolicyViewsCleared

func (m *AppPolicyMutation) PolicyViewsCleared() bool

PolicyViewsCleared reports if the "policy_views" edge to the AppPolicyView entity was cleared.

func (*AppPolicyMutation) PolicyViewsIDs

func (m *AppPolicyMutation) PolicyViewsIDs() (ids []int)

PolicyViewsIDs returns the "policy_views" edge IDs in the mutation.

func (*AppPolicyMutation) QueryContext

func (c *AppPolicyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyMutation) RemoveAppRolePolicyIDs

func (m *AppPolicyMutation) RemoveAppRolePolicyIDs(ids ...int)

RemoveAppRolePolicyIDs removes the "app_role_policy" edge to the AppRolePolicy entity by IDs.

func (*AppPolicyMutation) RemoveOrgPolicyIDs

func (m *AppPolicyMutation) RemoveOrgPolicyIDs(ids ...int)

RemoveOrgPolicyIDs removes the "org_policies" edge to the OrgPolicy entity by IDs.

func (*AppPolicyMutation) RemovePolicyViewIDs

func (m *AppPolicyMutation) RemovePolicyViewIDs(ids ...int)

RemovePolicyViewIDs removes the "policy_views" edge to the AppPolicyView 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) RemovedOrgPoliciesIDs

func (m *AppPolicyMutation) RemovedOrgPoliciesIDs() (ids []int)

RemovedOrgPolicies returns the removed IDs of the "org_policies" edge to the OrgPolicy entity.

func (*AppPolicyMutation) RemovedPolicyViewsIDs

func (m *AppPolicyMutation) RemovedPolicyViewsIDs() (ids []int)

RemovedPolicyViews returns the removed IDs of the "policy_views" edge to the AppPolicyView entity.

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) ResetKind

func (m *AppPolicyMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*AppPolicyMutation) ResetName

func (m *AppPolicyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppPolicyMutation) ResetOrgPolicies

func (m *AppPolicyMutation) ResetOrgPolicies()

ResetOrgPolicies resets all changes to the "org_policies" edge.

func (*AppPolicyMutation) ResetPolicyViews

func (m *AppPolicyMutation) ResetPolicyViews()

ResetPolicyViews resets all changes to the "policy_views" edge.

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) SetKind

func (m *AppPolicyMutation) SetKind(a apppolicy.Kind)

SetKind sets the "kind" field.

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) ExecContext

func (c *AppPolicyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppPolicyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyQuery) QueryOrgPolicies

func (apq *AppPolicyQuery) QueryOrgPolicies() *OrgPolicyQuery

QueryOrgPolicies chains the current query on the "org_policies" edge.

func (*AppPolicyQuery) QueryPolicyViews

func (apq *AppPolicyQuery) QueryPolicyViews() *AppPolicyViewQuery

QueryPolicyViews chains the current query on the "policy_views" 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) WithNamedOrgPolicies

func (apq *AppPolicyQuery) WithNamedOrgPolicies(name string, opts ...func(*OrgPolicyQuery)) *AppPolicyQuery

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

func (*AppPolicyQuery) WithNamedPolicyViews

func (apq *AppPolicyQuery) WithNamedPolicyViews(name string, opts ...func(*AppPolicyViewQuery)) *AppPolicyQuery

WithNamedPolicyViews tells the query-builder to eager-load the nodes that are connected to the "policy_views" 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) WithOrgPolicies

func (apq *AppPolicyQuery) WithOrgPolicies(opts ...func(*OrgPolicyQuery)) *AppPolicyQuery

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

func (*AppPolicyQuery) WithPolicyViews

func (apq *AppPolicyQuery) WithPolicyViews(opts ...func(*AppPolicyViewQuery)) *AppPolicyQuery

WithPolicyViews tells the query-builder to eager-load the nodes that are connected to the "policy_views" edge. 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) ExecContext

func (c AppPolicySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppPolicySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) AddOrgPolicies

func (apu *AppPolicyUpdate) AddOrgPolicies(o ...*OrgPolicy) *AppPolicyUpdate

AddOrgPolicies adds the "org_policies" edges to the OrgPolicy entity.

func (*AppPolicyUpdate) AddOrgPolicyIDs

func (apu *AppPolicyUpdate) AddOrgPolicyIDs(ids ...int) *AppPolicyUpdate

AddOrgPolicyIDs adds the "org_policies" edge to the OrgPolicy entity by IDs.

func (*AppPolicyUpdate) AddPolicyViewIDs

func (apu *AppPolicyUpdate) AddPolicyViewIDs(ids ...int) *AppPolicyUpdate

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView entity by IDs.

func (*AppPolicyUpdate) AddPolicyViews

func (apu *AppPolicyUpdate) AddPolicyViews(a ...*AppPolicyView) *AppPolicyUpdate

AddPolicyViews adds the "policy_views" edges to the AppPolicyView entity.

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) ClearOrgPolicies

func (apu *AppPolicyUpdate) ClearOrgPolicies() *AppPolicyUpdate

ClearOrgPolicies clears all "org_policies" edges to the OrgPolicy entity.

func (*AppPolicyUpdate) ClearPolicyViews

func (apu *AppPolicyUpdate) ClearPolicyViews() *AppPolicyUpdate

ClearPolicyViews clears all "policy_views" edges to the AppPolicyView entity.

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) ExecContext

func (c *AppPolicyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppPolicyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemoveOrgPolicies

func (apu *AppPolicyUpdate) RemoveOrgPolicies(o ...*OrgPolicy) *AppPolicyUpdate

RemoveOrgPolicies removes "org_policies" edges to OrgPolicy entities.

func (*AppPolicyUpdate) RemoveOrgPolicyIDs

func (apu *AppPolicyUpdate) RemoveOrgPolicyIDs(ids ...int) *AppPolicyUpdate

RemoveOrgPolicyIDs removes the "org_policies" edge to OrgPolicy entities by IDs.

func (*AppPolicyUpdate) RemovePolicyViewIDs

func (apu *AppPolicyUpdate) RemovePolicyViewIDs(ids ...int) *AppPolicyUpdate

RemovePolicyViewIDs removes the "policy_views" edge to AppPolicyView entities by IDs.

func (*AppPolicyUpdate) RemovePolicyViews

func (apu *AppPolicyUpdate) RemovePolicyViews(a ...*AppPolicyView) *AppPolicyUpdate

RemovePolicyViews removes "policy_views" edges to AppPolicyView entities.

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) SetKind

func (apu *AppPolicyUpdate) SetKind(a apppolicy.Kind) *AppPolicyUpdate

SetKind sets the "kind" field.

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) SetNillableKind

func (apu *AppPolicyUpdate) SetNillableKind(a *apppolicy.Kind) *AppPolicyUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppPolicyUpdate) SetNillableName

func (apu *AppPolicyUpdate) SetNillableName(s *string) *AppPolicyUpdate

SetNillableName sets the "name" 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) AddOrgPolicies

func (apuo *AppPolicyUpdateOne) AddOrgPolicies(o ...*OrgPolicy) *AppPolicyUpdateOne

AddOrgPolicies adds the "org_policies" edges to the OrgPolicy entity.

func (*AppPolicyUpdateOne) AddOrgPolicyIDs

func (apuo *AppPolicyUpdateOne) AddOrgPolicyIDs(ids ...int) *AppPolicyUpdateOne

AddOrgPolicyIDs adds the "org_policies" edge to the OrgPolicy entity by IDs.

func (*AppPolicyUpdateOne) AddPolicyViewIDs

func (apuo *AppPolicyUpdateOne) AddPolicyViewIDs(ids ...int) *AppPolicyUpdateOne

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView entity by IDs.

func (*AppPolicyUpdateOne) AddPolicyViews

func (apuo *AppPolicyUpdateOne) AddPolicyViews(a ...*AppPolicyView) *AppPolicyUpdateOne

AddPolicyViews adds the "policy_views" edges to the AppPolicyView entity.

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) ClearOrgPolicies

func (apuo *AppPolicyUpdateOne) ClearOrgPolicies() *AppPolicyUpdateOne

ClearOrgPolicies clears all "org_policies" edges to the OrgPolicy entity.

func (*AppPolicyUpdateOne) ClearPolicyViews

func (apuo *AppPolicyUpdateOne) ClearPolicyViews() *AppPolicyUpdateOne

ClearPolicyViews clears all "policy_views" edges to the AppPolicyView entity.

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) ExecContext

func (c *AppPolicyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppPolicyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemoveOrgPolicies

func (apuo *AppPolicyUpdateOne) RemoveOrgPolicies(o ...*OrgPolicy) *AppPolicyUpdateOne

RemoveOrgPolicies removes "org_policies" edges to OrgPolicy entities.

func (*AppPolicyUpdateOne) RemoveOrgPolicyIDs

func (apuo *AppPolicyUpdateOne) RemoveOrgPolicyIDs(ids ...int) *AppPolicyUpdateOne

RemoveOrgPolicyIDs removes the "org_policies" edge to OrgPolicy entities by IDs.

func (*AppPolicyUpdateOne) RemovePolicyViewIDs

func (apuo *AppPolicyUpdateOne) RemovePolicyViewIDs(ids ...int) *AppPolicyUpdateOne

RemovePolicyViewIDs removes the "policy_views" edge to AppPolicyView entities by IDs.

func (*AppPolicyUpdateOne) RemovePolicyViews

func (apuo *AppPolicyUpdateOne) RemovePolicyViews(a ...*AppPolicyView) *AppPolicyUpdateOne

RemovePolicyViews removes "policy_views" edges to AppPolicyView entities.

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) SetKind

SetKind sets the "kind" field.

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) SetNillableKind

func (apuo *AppPolicyUpdateOne) SetNillableKind(a *apppolicy.Kind) *AppPolicyUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppPolicyUpdateOne) SetNillableName

func (apuo *AppPolicyUpdateOne) SetNillableName(s *string) *AppPolicyUpdateOne

SetNillableName sets the "name" 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) SetKind

SetKind sets the "kind" 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) UpdateKind

func (u *AppPolicyUpsert) UpdateKind() *AppPolicyUpsert

UpdateKind sets the "kind" 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) SetKind

SetKind sets the "kind" 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) UpdateKind

func (u *AppPolicyUpsertBulk) UpdateKind() *AppPolicyUpsertBulk

UpdateKind sets the "kind" 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) SetKind

SetKind sets the "kind" 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) UpdateKind

func (u *AppPolicyUpsertOne) UpdateKind() *AppPolicyUpsertOne

UpdateKind sets the "kind" 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 AppPolicyView

type AppPolicyView 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,0为顶级
	ParentID int `json:"parent_id,omitempty"`
	// 分类:dir-目录、policy-权限策略
	Kind apppolicyview.Kind `json:"kind,omitempty"`
	// 名称
	Name string `json:"name,omitempty"`
	// 描述
	Comments string `json:"comments,omitempty"`
	// 关联的应用策略
	PolicyID *int `json:"policy_id,omitempty"`
	// 路径编码
	Path string `json:"path,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 AppPolicyViewQuery when eager-loading is set.
	Edges AppPolicyViewEdges `json:"edges"`
	// contains filtered or unexported fields
}

AppPolicyView is the model entity for the AppPolicyView schema.

func (*AppPolicyView) App

func (apv *AppPolicyView) App(ctx context.Context) (*App, error)

func (*AppPolicyView) AppPolicy

func (apv *AppPolicyView) AppPolicy(ctx context.Context) (*AppPolicy, error)

func (*AppPolicyView) Children

func (apv *AppPolicyView) Children(ctx context.Context) (result []*AppPolicyView, err error)

func (*AppPolicyView) ExecContext

func (c *AppPolicyView) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyView) GlobalID

func (apv *AppPolicyView) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given AppPolicyView node.

func (*AppPolicyView) IsNode

func (*AppPolicyView) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AppPolicyView) NamedChildren

func (apv *AppPolicyView) NamedChildren(name string) ([]*AppPolicyView, error)

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

func (*AppPolicyView) Parent

func (apv *AppPolicyView) Parent(ctx context.Context) (*AppPolicyView, error)

func (*AppPolicyView) QueryApp

func (apv *AppPolicyView) QueryApp() *AppQuery

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

func (*AppPolicyView) QueryAppPolicy

func (apv *AppPolicyView) QueryAppPolicy() *AppPolicyQuery

QueryAppPolicy queries the "app_policy" edge of the AppPolicyView entity.

func (*AppPolicyView) QueryChildren

func (apv *AppPolicyView) QueryChildren() *AppPolicyViewQuery

QueryChildren queries the "children" edge of the AppPolicyView entity.

func (*AppPolicyView) QueryContext

func (c *AppPolicyView) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyView) QueryParent

func (apv *AppPolicyView) QueryParent() *AppPolicyViewQuery

QueryParent queries the "parent" edge of the AppPolicyView entity.

func (*AppPolicyView) String

func (apv *AppPolicyView) String() string

String implements the fmt.Stringer.

func (*AppPolicyView) ToEdge

func (apv *AppPolicyView) ToEdge(order *AppPolicyViewOrder) *AppPolicyViewEdge

ToEdge converts AppPolicyView into AppPolicyViewEdge.

func (*AppPolicyView) Unwrap

func (apv *AppPolicyView) Unwrap() *AppPolicyView

Unwrap unwraps the AppPolicyView 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 (*AppPolicyView) Update

func (apv *AppPolicyView) Update() *AppPolicyViewUpdateOne

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

func (*AppPolicyView) Value

func (apv *AppPolicyView) Value(name string) (ent.Value, error)

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

type AppPolicyViewClient

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

AppPolicyViewClient is a client for the AppPolicyView schema.

func NewAppPolicyViewClient

func NewAppPolicyViewClient(c config) *AppPolicyViewClient

NewAppPolicyViewClient returns a client for the AppPolicyView from the given config.

func (*AppPolicyViewClient) Create

Create returns a builder for creating a AppPolicyView entity.

func (*AppPolicyViewClient) CreateBulk

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

func (*AppPolicyViewClient) Delete

Delete returns a delete builder for AppPolicyView.

func (*AppPolicyViewClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppPolicyViewClient) DeleteOneID

func (c *AppPolicyViewClient) DeleteOneID(id int) *AppPolicyViewDeleteOne

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

func (*AppPolicyViewClient) ExecContext

func (c *AppPolicyViewClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewClient) Get

Get returns a AppPolicyView entity by its id.

func (*AppPolicyViewClient) GetX

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

func (*AppPolicyViewClient) Hooks

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

Hooks returns the client hooks.

func (*AppPolicyViewClient) Intercept

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

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

func (*AppPolicyViewClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AppPolicyViewClient) MapCreateBulk

func (c *AppPolicyViewClient) MapCreateBulk(slice any, setFunc func(*AppPolicyViewCreate, int)) *AppPolicyViewCreateBulk

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 (*AppPolicyViewClient) Query

Query returns a query builder for AppPolicyView.

func (*AppPolicyViewClient) QueryApp

func (c *AppPolicyViewClient) QueryApp(apv *AppPolicyView) *AppQuery

QueryApp queries the app edge of a AppPolicyView.

func (*AppPolicyViewClient) QueryAppPolicy

func (c *AppPolicyViewClient) QueryAppPolicy(apv *AppPolicyView) *AppPolicyQuery

QueryAppPolicy queries the app_policy edge of a AppPolicyView.

func (*AppPolicyViewClient) QueryChildren

func (c *AppPolicyViewClient) QueryChildren(apv *AppPolicyView) *AppPolicyViewQuery

QueryChildren queries the children edge of a AppPolicyView.

func (*AppPolicyViewClient) QueryContext

func (c *AppPolicyViewClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewClient) QueryParent

QueryParent queries the parent edge of a AppPolicyView.

func (*AppPolicyViewClient) Update

Update returns an update builder for AppPolicyView.

func (*AppPolicyViewClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppPolicyViewClient) UpdateOneID

func (c *AppPolicyViewClient) UpdateOneID(id int) *AppPolicyViewUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppPolicyViewClient) Use

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

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

type AppPolicyViewConnection

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

AppPolicyViewConnection is the connection containing edges to AppPolicyView.

type AppPolicyViewCreate

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

AppPolicyViewCreate is the builder for creating a AppPolicyView entity.

func (*AppPolicyViewCreate) AddChildIDs

func (apvc *AppPolicyViewCreate) AddChildIDs(ids ...int) *AppPolicyViewCreate

AddChildIDs adds the "children" edge to the AppPolicyView entity by IDs.

func (*AppPolicyViewCreate) AddChildren

func (apvc *AppPolicyViewCreate) AddChildren(a ...*AppPolicyView) *AppPolicyViewCreate

AddChildren adds the "children" edges to the AppPolicyView entity.

func (*AppPolicyViewCreate) Exec

func (apvc *AppPolicyViewCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPolicyViewCreate) ExecContext

func (c *AppPolicyViewCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewCreate) ExecX

func (apvc *AppPolicyViewCreate) ExecX(ctx context.Context)

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

func (*AppPolicyViewCreate) Mutation

func (apvc *AppPolicyViewCreate) Mutation() *AppPolicyViewMutation

Mutation returns the AppPolicyViewMutation object of the builder.

func (*AppPolicyViewCreate) OnConflict

func (apvc *AppPolicyViewCreate) OnConflict(opts ...sql.ConflictOption) *AppPolicyViewUpsertOne

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

client.AppPolicyView.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.AppPolicyViewUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppPolicyViewCreate) OnConflictColumns

func (apvc *AppPolicyViewCreate) OnConflictColumns(columns ...string) *AppPolicyViewUpsertOne

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

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

func (*AppPolicyViewCreate) QueryContext

func (c *AppPolicyViewCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewCreate) Save

Save creates the AppPolicyView in the database.

func (*AppPolicyViewCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AppPolicyViewCreate) SetApp

func (apvc *AppPolicyViewCreate) SetApp(a *App) *AppPolicyViewCreate

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

func (*AppPolicyViewCreate) SetAppID

func (apvc *AppPolicyViewCreate) SetAppID(i int) *AppPolicyViewCreate

SetAppID sets the "app_id" field.

func (*AppPolicyViewCreate) SetAppPolicy

func (apvc *AppPolicyViewCreate) SetAppPolicy(a *AppPolicy) *AppPolicyViewCreate

SetAppPolicy sets the "app_policy" edge to the AppPolicy entity.

func (*AppPolicyViewCreate) SetAppPolicyID

func (apvc *AppPolicyViewCreate) SetAppPolicyID(id int) *AppPolicyViewCreate

SetAppPolicyID sets the "app_policy" edge to the AppPolicy entity by ID.

func (*AppPolicyViewCreate) SetComments

func (apvc *AppPolicyViewCreate) SetComments(s string) *AppPolicyViewCreate

SetComments sets the "comments" field.

func (*AppPolicyViewCreate) SetCreatedAt

func (apvc *AppPolicyViewCreate) SetCreatedAt(t time.Time) *AppPolicyViewCreate

SetCreatedAt sets the "created_at" field.

func (*AppPolicyViewCreate) SetCreatedBy

func (apvc *AppPolicyViewCreate) SetCreatedBy(i int) *AppPolicyViewCreate

SetCreatedBy sets the "created_by" field.

func (*AppPolicyViewCreate) SetDisplaySort

func (apvc *AppPolicyViewCreate) SetDisplaySort(i int32) *AppPolicyViewCreate

SetDisplaySort sets the "display_sort" field.

func (*AppPolicyViewCreate) SetID

SetID sets the "id" field.

func (*AppPolicyViewCreate) SetInput

SetInput applies the change-set in the CreateAppPolicyViewInput on the AppPolicyViewCreate builder.

func (*AppPolicyViewCreate) SetKind

SetKind sets the "kind" field.

func (*AppPolicyViewCreate) SetName

SetName sets the "name" field.

func (*AppPolicyViewCreate) SetNillableAppID

func (apvc *AppPolicyViewCreate) SetNillableAppID(i *int) *AppPolicyViewCreate

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

func (*AppPolicyViewCreate) SetNillableAppPolicyID

func (apvc *AppPolicyViewCreate) SetNillableAppPolicyID(id *int) *AppPolicyViewCreate

SetNillableAppPolicyID sets the "app_policy" edge to the AppPolicy entity by ID if the given value is not nil.

func (*AppPolicyViewCreate) SetNillableComments

func (apvc *AppPolicyViewCreate) SetNillableComments(s *string) *AppPolicyViewCreate

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

func (*AppPolicyViewCreate) SetNillableCreatedAt

func (apvc *AppPolicyViewCreate) SetNillableCreatedAt(t *time.Time) *AppPolicyViewCreate

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

func (*AppPolicyViewCreate) SetNillableDisplaySort

func (apvc *AppPolicyViewCreate) SetNillableDisplaySort(i *int32) *AppPolicyViewCreate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppPolicyViewCreate) SetNillableID

func (apvc *AppPolicyViewCreate) SetNillableID(i *int) *AppPolicyViewCreate

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

func (*AppPolicyViewCreate) SetNillableParentID

func (apvc *AppPolicyViewCreate) SetNillableParentID(i *int) *AppPolicyViewCreate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*AppPolicyViewCreate) SetNillablePath

func (apvc *AppPolicyViewCreate) SetNillablePath(s *string) *AppPolicyViewCreate

SetNillablePath sets the "path" field if the given value is not nil.

func (*AppPolicyViewCreate) SetNillablePolicyID

func (apvc *AppPolicyViewCreate) SetNillablePolicyID(i *int) *AppPolicyViewCreate

SetNillablePolicyID sets the "policy_id" field if the given value is not nil.

func (*AppPolicyViewCreate) SetNillableUpdatedAt

func (apvc *AppPolicyViewCreate) SetNillableUpdatedAt(t *time.Time) *AppPolicyViewCreate

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

func (*AppPolicyViewCreate) SetNillableUpdatedBy

func (apvc *AppPolicyViewCreate) SetNillableUpdatedBy(i *int) *AppPolicyViewCreate

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

func (*AppPolicyViewCreate) SetParent

SetParent sets the "parent" edge to the AppPolicyView entity.

func (*AppPolicyViewCreate) SetParentID

func (apvc *AppPolicyViewCreate) SetParentID(i int) *AppPolicyViewCreate

SetParentID sets the "parent_id" field.

func (*AppPolicyViewCreate) SetPath

SetPath sets the "path" field.

func (*AppPolicyViewCreate) SetPolicyID

func (apvc *AppPolicyViewCreate) SetPolicyID(i int) *AppPolicyViewCreate

SetPolicyID sets the "policy_id" field.

func (*AppPolicyViewCreate) SetUpdatedAt

func (apvc *AppPolicyViewCreate) SetUpdatedAt(t time.Time) *AppPolicyViewCreate

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyViewCreate) SetUpdatedBy

func (apvc *AppPolicyViewCreate) SetUpdatedBy(i int) *AppPolicyViewCreate

SetUpdatedBy sets the "updated_by" field.

type AppPolicyViewCreateBulk

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

AppPolicyViewCreateBulk is the builder for creating many AppPolicyView entities in bulk.

func (*AppPolicyViewCreateBulk) Exec

func (apvcb *AppPolicyViewCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPolicyViewCreateBulk) ExecContext

func (c *AppPolicyViewCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewCreateBulk) ExecX

func (apvcb *AppPolicyViewCreateBulk) ExecX(ctx context.Context)

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

func (*AppPolicyViewCreateBulk) OnConflict

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

client.AppPolicyView.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.AppPolicyViewUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*AppPolicyViewCreateBulk) OnConflictColumns

func (apvcb *AppPolicyViewCreateBulk) OnConflictColumns(columns ...string) *AppPolicyViewUpsertBulk

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

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

func (*AppPolicyViewCreateBulk) QueryContext

func (c *AppPolicyViewCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewCreateBulk) Save

Save creates the AppPolicyView entities in the database.

func (*AppPolicyViewCreateBulk) SaveX

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

type AppPolicyViewDelete

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

AppPolicyViewDelete is the builder for deleting a AppPolicyView entity.

func (*AppPolicyViewDelete) Exec

func (apvd *AppPolicyViewDelete) Exec(ctx context.Context) (int, error)

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

func (*AppPolicyViewDelete) ExecContext

func (c *AppPolicyViewDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewDelete) ExecX

func (apvd *AppPolicyViewDelete) ExecX(ctx context.Context) int

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

func (*AppPolicyViewDelete) QueryContext

func (c *AppPolicyViewDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewDelete) Where

Where appends a list predicates to the AppPolicyViewDelete builder.

type AppPolicyViewDeleteOne

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

AppPolicyViewDeleteOne is the builder for deleting a single AppPolicyView entity.

func (*AppPolicyViewDeleteOne) Exec

func (apvdo *AppPolicyViewDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppPolicyViewDeleteOne) ExecX

func (apvdo *AppPolicyViewDeleteOne) ExecX(ctx context.Context)

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

func (*AppPolicyViewDeleteOne) Where

Where appends a list predicates to the AppPolicyViewDelete builder.

type AppPolicyViewEdge

type AppPolicyViewEdge struct {
	Node   *AppPolicyView `json:"node"`
	Cursor Cursor         `json:"cursor"`
}

AppPolicyViewEdge is the edge representation of AppPolicyView.

type AppPolicyViewEdges

type AppPolicyViewEdges struct {
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// AppPolicy holds the value of the app_policy edge.
	AppPolicy *AppPolicy `json:"app_policy,omitempty"`
	// Parent holds the value of the parent edge.
	Parent *AppPolicyView `json:"parent,omitempty"`
	// Children holds the value of the children edge.
	Children []*AppPolicyView `json:"children,omitempty"`
	// contains filtered or unexported fields
}

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

func (AppPolicyViewEdges) AppOrErr

func (e AppPolicyViewEdges) 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 (AppPolicyViewEdges) AppPolicyOrErr

func (e AppPolicyViewEdges) AppPolicyOrErr() (*AppPolicy, error)

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

func (AppPolicyViewEdges) ChildrenOrErr

func (e AppPolicyViewEdges) ChildrenOrErr() ([]*AppPolicyView, error)

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

func (AppPolicyViewEdges) ParentOrErr

func (e AppPolicyViewEdges) ParentOrErr() (*AppPolicyView, error)

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

type AppPolicyViewGroupBy

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

AppPolicyViewGroupBy is the group-by builder for AppPolicyView entities.

func (*AppPolicyViewGroupBy) Aggregate

func (apvgb *AppPolicyViewGroupBy) Aggregate(fns ...AggregateFunc) *AppPolicyViewGroupBy

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

func (*AppPolicyViewGroupBy) Bool

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

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

func (*AppPolicyViewGroupBy) BoolX

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

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

func (*AppPolicyViewGroupBy) Bools

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

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

func (*AppPolicyViewGroupBy) BoolsX

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

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

func (*AppPolicyViewGroupBy) Float64

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

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

func (*AppPolicyViewGroupBy) Float64X

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

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

func (*AppPolicyViewGroupBy) Float64s

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

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

func (*AppPolicyViewGroupBy) Float64sX

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

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

func (*AppPolicyViewGroupBy) Int

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

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

func (*AppPolicyViewGroupBy) IntX

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

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

func (*AppPolicyViewGroupBy) Ints

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

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

func (*AppPolicyViewGroupBy) IntsX

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

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

func (*AppPolicyViewGroupBy) Scan

func (apvgb *AppPolicyViewGroupBy) Scan(ctx context.Context, v any) error

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

func (*AppPolicyViewGroupBy) ScanX

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

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

func (*AppPolicyViewGroupBy) String

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

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

func (*AppPolicyViewGroupBy) StringX

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

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

func (*AppPolicyViewGroupBy) Strings

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

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

func (*AppPolicyViewGroupBy) StringsX

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

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

type AppPolicyViewMutation

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

AppPolicyViewMutation represents an operation that mutates the AppPolicyView nodes in the graph.

func (*AppPolicyViewMutation) AddChildIDs

func (m *AppPolicyViewMutation) AddChildIDs(ids ...int)

AddChildIDs adds the "children" edge to the AppPolicyView entity by ids.

func (*AppPolicyViewMutation) AddCreatedBy

func (m *AppPolicyViewMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*AppPolicyViewMutation) AddDisplaySort

func (m *AppPolicyViewMutation) AddDisplaySort(i int32)

AddDisplaySort adds i to the "display_sort" field.

func (*AppPolicyViewMutation) AddField

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) AddUpdatedBy

func (m *AppPolicyViewMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*AppPolicyViewMutation) AddedCreatedBy

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

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

func (*AppPolicyViewMutation) AddedDisplaySort

func (m *AppPolicyViewMutation) AddedDisplaySort() (r int32, exists bool)

AddedDisplaySort returns the value that was added to the "display_sort" field in this mutation.

func (*AppPolicyViewMutation) AddedEdges

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

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

func (*AppPolicyViewMutation) AddedField

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) AddedFields

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

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

func (*AppPolicyViewMutation) AddedIDs

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

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

func (*AppPolicyViewMutation) AddedUpdatedBy

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

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

func (*AppPolicyViewMutation) AppCleared

func (m *AppPolicyViewMutation) AppCleared() bool

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

func (*AppPolicyViewMutation) AppID

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

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

func (*AppPolicyViewMutation) AppIDCleared

func (m *AppPolicyViewMutation) AppIDCleared() bool

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

func (*AppPolicyViewMutation) AppIDs

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) AppPolicyCleared

func (m *AppPolicyViewMutation) AppPolicyCleared() bool

AppPolicyCleared reports if the "app_policy" edge to the AppPolicy entity was cleared.

func (*AppPolicyViewMutation) AppPolicyID

func (m *AppPolicyViewMutation) AppPolicyID() (id int, exists bool)

AppPolicyID returns the "app_policy" edge ID in the mutation.

func (*AppPolicyViewMutation) AppPolicyIDs

func (m *AppPolicyViewMutation) AppPolicyIDs() (ids []int)

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

func (*AppPolicyViewMutation) ChildrenCleared

func (m *AppPolicyViewMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the AppPolicyView entity was cleared.

func (*AppPolicyViewMutation) ChildrenIDs

func (m *AppPolicyViewMutation) ChildrenIDs() (ids []int)

ChildrenIDs returns the "children" edge IDs in the mutation.

func (*AppPolicyViewMutation) ClearApp

func (m *AppPolicyViewMutation) ClearApp()

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

func (*AppPolicyViewMutation) ClearAppID

func (m *AppPolicyViewMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*AppPolicyViewMutation) ClearAppPolicy

func (m *AppPolicyViewMutation) ClearAppPolicy()

ClearAppPolicy clears the "app_policy" edge to the AppPolicy entity.

func (*AppPolicyViewMutation) ClearChildren

func (m *AppPolicyViewMutation) ClearChildren()

ClearChildren clears the "children" edge to the AppPolicyView entity.

func (*AppPolicyViewMutation) ClearComments

func (m *AppPolicyViewMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*AppPolicyViewMutation) ClearDisplaySort

func (m *AppPolicyViewMutation) ClearDisplaySort()

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppPolicyViewMutation) ClearEdge

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) ClearField

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) ClearParent

func (m *AppPolicyViewMutation) ClearParent()

ClearParent clears the "parent" edge to the AppPolicyView entity.

func (*AppPolicyViewMutation) ClearPath

func (m *AppPolicyViewMutation) ClearPath()

ClearPath clears the value of the "path" field.

func (*AppPolicyViewMutation) ClearPolicyID

func (m *AppPolicyViewMutation) ClearPolicyID()

ClearPolicyID clears the value of the "policy_id" field.

func (*AppPolicyViewMutation) ClearUpdatedAt

func (m *AppPolicyViewMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyViewMutation) ClearUpdatedBy

func (m *AppPolicyViewMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyViewMutation) ClearedEdges

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

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

func (*AppPolicyViewMutation) ClearedFields

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

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

func (AppPolicyViewMutation) Client

func (m AppPolicyViewMutation) 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 (*AppPolicyViewMutation) Comments

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

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

func (*AppPolicyViewMutation) CommentsCleared

func (m *AppPolicyViewMutation) CommentsCleared() bool

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

func (*AppPolicyViewMutation) CreatedAt

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

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

func (*AppPolicyViewMutation) CreatedBy

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

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

func (*AppPolicyViewMutation) DisplaySort

func (m *AppPolicyViewMutation) DisplaySort() (r int32, exists bool)

DisplaySort returns the value of the "display_sort" field in the mutation.

func (*AppPolicyViewMutation) DisplaySortCleared

func (m *AppPolicyViewMutation) DisplaySortCleared() bool

DisplaySortCleared returns if the "display_sort" field was cleared in this mutation.

func (*AppPolicyViewMutation) EdgeCleared

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

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

func (*AppPolicyViewMutation) ExecContext

func (c *AppPolicyViewMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewMutation) Field

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) FieldCleared

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

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

func (*AppPolicyViewMutation) Fields

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) ID

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) IDs

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) Kind

func (m *AppPolicyViewMutation) Kind() (r apppolicyview.Kind, exists bool)

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

func (*AppPolicyViewMutation) Name

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

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

func (*AppPolicyViewMutation) OldAppID

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

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

func (*AppPolicyViewMutation) OldComments

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

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

func (*AppPolicyViewMutation) OldCreatedAt

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

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

func (*AppPolicyViewMutation) OldCreatedBy

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

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

func (*AppPolicyViewMutation) OldDisplaySort

func (m *AppPolicyViewMutation) OldDisplaySort(ctx context.Context) (v int32, err error)

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

func (*AppPolicyViewMutation) OldField

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) OldKind

func (m *AppPolicyViewMutation) OldKind(ctx context.Context) (v apppolicyview.Kind, err error)

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

func (*AppPolicyViewMutation) OldName

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

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

func (*AppPolicyViewMutation) OldParentID

func (m *AppPolicyViewMutation) OldParentID(ctx context.Context) (v int, err error)

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

func (*AppPolicyViewMutation) OldPath

func (m *AppPolicyViewMutation) OldPath(ctx context.Context) (v string, err error)

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

func (*AppPolicyViewMutation) OldPolicyID

func (m *AppPolicyViewMutation) OldPolicyID(ctx context.Context) (v *int, err error)

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

func (*AppPolicyViewMutation) OldUpdatedAt

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

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

func (*AppPolicyViewMutation) OldUpdatedBy

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

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

func (*AppPolicyViewMutation) Op

func (m *AppPolicyViewMutation) Op() Op

Op returns the operation name.

func (*AppPolicyViewMutation) ParentCleared

func (m *AppPolicyViewMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the AppPolicyView entity was cleared.

func (*AppPolicyViewMutation) ParentID

func (m *AppPolicyViewMutation) ParentID() (r int, exists bool)

ParentID returns the value of the "parent_id" field in the mutation.

func (*AppPolicyViewMutation) ParentIDs

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) Path

func (m *AppPolicyViewMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*AppPolicyViewMutation) PathCleared

func (m *AppPolicyViewMutation) PathCleared() bool

PathCleared returns if the "path" field was cleared in this mutation.

func (*AppPolicyViewMutation) PolicyID

func (m *AppPolicyViewMutation) PolicyID() (r int, exists bool)

PolicyID returns the value of the "policy_id" field in the mutation.

func (*AppPolicyViewMutation) PolicyIDCleared

func (m *AppPolicyViewMutation) PolicyIDCleared() bool

PolicyIDCleared returns if the "policy_id" field was cleared in this mutation.

func (*AppPolicyViewMutation) QueryContext

func (c *AppPolicyViewMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewMutation) RemoveChildIDs

func (m *AppPolicyViewMutation) RemoveChildIDs(ids ...int)

RemoveChildIDs removes the "children" edge to the AppPolicyView entity by IDs.

func (*AppPolicyViewMutation) RemovedChildrenIDs

func (m *AppPolicyViewMutation) RemovedChildrenIDs() (ids []int)

RemovedChildren returns the removed IDs of the "children" edge to the AppPolicyView entity.

func (*AppPolicyViewMutation) RemovedEdges

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

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

func (*AppPolicyViewMutation) RemovedIDs

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) ResetApp

func (m *AppPolicyViewMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*AppPolicyViewMutation) ResetAppID

func (m *AppPolicyViewMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*AppPolicyViewMutation) ResetAppPolicy

func (m *AppPolicyViewMutation) ResetAppPolicy()

ResetAppPolicy resets all changes to the "app_policy" edge.

func (*AppPolicyViewMutation) ResetChildren

func (m *AppPolicyViewMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

func (*AppPolicyViewMutation) ResetComments

func (m *AppPolicyViewMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*AppPolicyViewMutation) ResetCreatedAt

func (m *AppPolicyViewMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppPolicyViewMutation) ResetCreatedBy

func (m *AppPolicyViewMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*AppPolicyViewMutation) ResetDisplaySort

func (m *AppPolicyViewMutation) ResetDisplaySort()

ResetDisplaySort resets all changes to the "display_sort" field.

func (*AppPolicyViewMutation) ResetEdge

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) ResetField

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) ResetKind

func (m *AppPolicyViewMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*AppPolicyViewMutation) ResetName

func (m *AppPolicyViewMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppPolicyViewMutation) ResetParent

func (m *AppPolicyViewMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*AppPolicyViewMutation) ResetParentID

func (m *AppPolicyViewMutation) ResetParentID()

ResetParentID resets all changes to the "parent_id" field.

func (*AppPolicyViewMutation) ResetPath

func (m *AppPolicyViewMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*AppPolicyViewMutation) ResetPolicyID

func (m *AppPolicyViewMutation) ResetPolicyID()

ResetPolicyID resets all changes to the "policy_id" field.

func (*AppPolicyViewMutation) ResetUpdatedAt

func (m *AppPolicyViewMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppPolicyViewMutation) ResetUpdatedBy

func (m *AppPolicyViewMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*AppPolicyViewMutation) SetAppID

func (m *AppPolicyViewMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*AppPolicyViewMutation) SetAppPolicyID

func (m *AppPolicyViewMutation) SetAppPolicyID(id int)

SetAppPolicyID sets the "app_policy" edge to the AppPolicy entity by id.

func (*AppPolicyViewMutation) SetComments

func (m *AppPolicyViewMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*AppPolicyViewMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*AppPolicyViewMutation) SetCreatedBy

func (m *AppPolicyViewMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*AppPolicyViewMutation) SetDisplaySort

func (m *AppPolicyViewMutation) SetDisplaySort(i int32)

SetDisplaySort sets the "display_sort" field.

func (*AppPolicyViewMutation) SetField

func (m *AppPolicyViewMutation) 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 (*AppPolicyViewMutation) SetID

func (m *AppPolicyViewMutation) SetID(id int)

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

func (*AppPolicyViewMutation) SetKind

SetKind sets the "kind" field.

func (*AppPolicyViewMutation) SetName

func (m *AppPolicyViewMutation) SetName(s string)

SetName sets the "name" field.

func (*AppPolicyViewMutation) SetOp

func (m *AppPolicyViewMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppPolicyViewMutation) SetParentID

func (m *AppPolicyViewMutation) SetParentID(i int)

SetParentID sets the "parent_id" field.

func (*AppPolicyViewMutation) SetPath

func (m *AppPolicyViewMutation) SetPath(s string)

SetPath sets the "path" field.

func (*AppPolicyViewMutation) SetPolicyID

func (m *AppPolicyViewMutation) SetPolicyID(i int)

SetPolicyID sets the "policy_id" field.

func (*AppPolicyViewMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyViewMutation) SetUpdatedBy

func (m *AppPolicyViewMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (AppPolicyViewMutation) Tx

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

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

func (*AppPolicyViewMutation) Type

func (m *AppPolicyViewMutation) Type() string

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

func (*AppPolicyViewMutation) UpdatedAt

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

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

func (*AppPolicyViewMutation) UpdatedAtCleared

func (m *AppPolicyViewMutation) UpdatedAtCleared() bool

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

func (*AppPolicyViewMutation) UpdatedBy

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

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

func (*AppPolicyViewMutation) UpdatedByCleared

func (m *AppPolicyViewMutation) UpdatedByCleared() bool

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

func (*AppPolicyViewMutation) Where

Where appends a list predicates to the AppPolicyViewMutation builder.

func (*AppPolicyViewMutation) WhereP

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

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

type AppPolicyViewOrder

type AppPolicyViewOrder struct {
	Direction OrderDirection           `json:"direction"`
	Field     *AppPolicyViewOrderField `json:"field"`
}

AppPolicyViewOrder defines the ordering of AppPolicyView.

type AppPolicyViewOrderField

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

AppPolicyViewOrderField defines the ordering field of AppPolicyView.

func (AppPolicyViewOrderField) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (AppPolicyViewOrderField) String

func (f AppPolicyViewOrderField) String() string

String implement fmt.Stringer interface.

func (*AppPolicyViewOrderField) UnmarshalGQL

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

UnmarshalGQL implements graphql.Unmarshaler interface.

type AppPolicyViewPaginateOption

type AppPolicyViewPaginateOption func(*apppolicyviewPager) error

AppPolicyViewPaginateOption enables pagination customization.

func WithAppPolicyViewFilter

func WithAppPolicyViewFilter(filter func(*AppPolicyViewQuery) (*AppPolicyViewQuery, error)) AppPolicyViewPaginateOption

WithAppPolicyViewFilter configures pagination filter.

func WithAppPolicyViewOrder

func WithAppPolicyViewOrder(order *AppPolicyViewOrder) AppPolicyViewPaginateOption

WithAppPolicyViewOrder configures pagination ordering.

type AppPolicyViewQuery

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

AppPolicyViewQuery is the builder for querying AppPolicyView entities.

func (*AppPolicyViewQuery) Aggregate

func (apvq *AppPolicyViewQuery) Aggregate(fns ...AggregateFunc) *AppPolicyViewSelect

Aggregate returns a AppPolicyViewSelect configured with the given aggregations.

func (*AppPolicyViewQuery) All

func (apvq *AppPolicyViewQuery) All(ctx context.Context) ([]*AppPolicyView, error)

All executes the query and returns a list of AppPolicyViews.

func (*AppPolicyViewQuery) AllX

func (apvq *AppPolicyViewQuery) AllX(ctx context.Context) []*AppPolicyView

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

func (*AppPolicyViewQuery) Clone

func (apvq *AppPolicyViewQuery) Clone() *AppPolicyViewQuery

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

func (*AppPolicyViewQuery) CollectFields

func (apv *AppPolicyViewQuery) CollectFields(ctx context.Context, satisfies ...string) (*AppPolicyViewQuery, error)

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

func (*AppPolicyViewQuery) Count

func (apvq *AppPolicyViewQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppPolicyViewQuery) CountX

func (apvq *AppPolicyViewQuery) CountX(ctx context.Context) int

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

func (*AppPolicyViewQuery) ExecContext

func (c *AppPolicyViewQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewQuery) Exist

func (apvq *AppPolicyViewQuery) Exist(ctx context.Context) (bool, error)

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

func (*AppPolicyViewQuery) ExistX

func (apvq *AppPolicyViewQuery) ExistX(ctx context.Context) bool

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

func (*AppPolicyViewQuery) First

func (apvq *AppPolicyViewQuery) First(ctx context.Context) (*AppPolicyView, error)

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

func (*AppPolicyViewQuery) FirstID

func (apvq *AppPolicyViewQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AppPolicyViewQuery) FirstIDX

func (apvq *AppPolicyViewQuery) FirstIDX(ctx context.Context) int

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

func (*AppPolicyViewQuery) FirstX

func (apvq *AppPolicyViewQuery) FirstX(ctx context.Context) *AppPolicyView

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

func (*AppPolicyViewQuery) GroupBy

func (apvq *AppPolicyViewQuery) GroupBy(field string, fields ...string) *AppPolicyViewGroupBy

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.AppPolicyView.Query().
	GroupBy(apppolicyview.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppPolicyViewQuery) IDs

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

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

func (*AppPolicyViewQuery) IDsX

func (apvq *AppPolicyViewQuery) IDsX(ctx context.Context) []int

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

func (*AppPolicyViewQuery) Limit

func (apvq *AppPolicyViewQuery) Limit(limit int) *AppPolicyViewQuery

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

func (*AppPolicyViewQuery) Offset

func (apvq *AppPolicyViewQuery) Offset(offset int) *AppPolicyViewQuery

Offset to start from.

func (*AppPolicyViewQuery) Only

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

func (*AppPolicyViewQuery) OnlyID

func (apvq *AppPolicyViewQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AppPolicyViewQuery) OnlyIDX

func (apvq *AppPolicyViewQuery) OnlyIDX(ctx context.Context) int

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

func (*AppPolicyViewQuery) OnlyX

func (apvq *AppPolicyViewQuery) OnlyX(ctx context.Context) *AppPolicyView

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

func (*AppPolicyViewQuery) Order

Order specifies how the records should be ordered.

func (*AppPolicyViewQuery) Paginate

func (apv *AppPolicyViewQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AppPolicyViewPaginateOption,
) (*AppPolicyViewConnection, error)

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

func (*AppPolicyViewQuery) QueryApp

func (apvq *AppPolicyViewQuery) QueryApp() *AppQuery

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

func (*AppPolicyViewQuery) QueryAppPolicy

func (apvq *AppPolicyViewQuery) QueryAppPolicy() *AppPolicyQuery

QueryAppPolicy chains the current query on the "app_policy" edge.

func (*AppPolicyViewQuery) QueryChildren

func (apvq *AppPolicyViewQuery) QueryChildren() *AppPolicyViewQuery

QueryChildren chains the current query on the "children" edge.

func (*AppPolicyViewQuery) QueryContext

func (c *AppPolicyViewQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewQuery) QueryParent

func (apvq *AppPolicyViewQuery) QueryParent() *AppPolicyViewQuery

QueryParent chains the current query on the "parent" edge.

func (*AppPolicyViewQuery) Select

func (apvq *AppPolicyViewQuery) Select(fields ...string) *AppPolicyViewSelect

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.AppPolicyView.Query().
	Select(apppolicyview.FieldCreatedBy).
	Scan(ctx, &v)

func (*AppPolicyViewQuery) Unique

func (apvq *AppPolicyViewQuery) Unique(unique bool) *AppPolicyViewQuery

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 (*AppPolicyViewQuery) Where

Where adds a new predicate for the AppPolicyViewQuery builder.

func (*AppPolicyViewQuery) WithApp

func (apvq *AppPolicyViewQuery) WithApp(opts ...func(*AppQuery)) *AppPolicyViewQuery

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 (*AppPolicyViewQuery) WithAppPolicy

func (apvq *AppPolicyViewQuery) WithAppPolicy(opts ...func(*AppPolicyQuery)) *AppPolicyViewQuery

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

func (*AppPolicyViewQuery) WithChildren

func (apvq *AppPolicyViewQuery) WithChildren(opts ...func(*AppPolicyViewQuery)) *AppPolicyViewQuery

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 (*AppPolicyViewQuery) WithNamedChildren

func (apvq *AppPolicyViewQuery) WithNamedChildren(name string, opts ...func(*AppPolicyViewQuery)) *AppPolicyViewQuery

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 (*AppPolicyViewQuery) WithParent

func (apvq *AppPolicyViewQuery) WithParent(opts ...func(*AppPolicyViewQuery)) *AppPolicyViewQuery

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.

type AppPolicyViewSelect

type AppPolicyViewSelect struct {
	*AppPolicyViewQuery
	// contains filtered or unexported fields
}

AppPolicyViewSelect is the builder for selecting fields of AppPolicyView entities.

func (*AppPolicyViewSelect) Aggregate

func (apvs *AppPolicyViewSelect) Aggregate(fns ...AggregateFunc) *AppPolicyViewSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppPolicyViewSelect) Bool

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

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

func (*AppPolicyViewSelect) BoolX

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

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

func (*AppPolicyViewSelect) Bools

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

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

func (*AppPolicyViewSelect) BoolsX

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

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

func (AppPolicyViewSelect) ExecContext

func (c AppPolicyViewSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewSelect) Float64

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

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

func (*AppPolicyViewSelect) Float64X

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

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

func (*AppPolicyViewSelect) Float64s

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

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

func (*AppPolicyViewSelect) Float64sX

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

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

func (*AppPolicyViewSelect) Int

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

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

func (*AppPolicyViewSelect) IntX

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

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

func (*AppPolicyViewSelect) Ints

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

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

func (*AppPolicyViewSelect) IntsX

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

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

func (AppPolicyViewSelect) QueryContext

func (c AppPolicyViewSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewSelect) Scan

func (apvs *AppPolicyViewSelect) Scan(ctx context.Context, v any) error

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

func (*AppPolicyViewSelect) ScanX

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

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

func (*AppPolicyViewSelect) String

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

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

func (*AppPolicyViewSelect) StringX

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

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

func (*AppPolicyViewSelect) Strings

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

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

func (*AppPolicyViewSelect) StringsX

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

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

type AppPolicyViewUpdate

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

AppPolicyViewUpdate is the builder for updating AppPolicyView entities.

func (*AppPolicyViewUpdate) AddChildIDs

func (apvu *AppPolicyViewUpdate) AddChildIDs(ids ...int) *AppPolicyViewUpdate

AddChildIDs adds the "children" edge to the AppPolicyView entity by IDs.

func (*AppPolicyViewUpdate) AddChildren

func (apvu *AppPolicyViewUpdate) AddChildren(a ...*AppPolicyView) *AppPolicyViewUpdate

AddChildren adds the "children" edges to the AppPolicyView entity.

func (*AppPolicyViewUpdate) AddDisplaySort

func (apvu *AppPolicyViewUpdate) AddDisplaySort(i int32) *AppPolicyViewUpdate

AddDisplaySort adds i to the "display_sort" field.

func (*AppPolicyViewUpdate) AddUpdatedBy

func (apvu *AppPolicyViewUpdate) AddUpdatedBy(i int) *AppPolicyViewUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*AppPolicyViewUpdate) ClearAppPolicy

func (apvu *AppPolicyViewUpdate) ClearAppPolicy() *AppPolicyViewUpdate

ClearAppPolicy clears the "app_policy" edge to the AppPolicy entity.

func (*AppPolicyViewUpdate) ClearChildren

func (apvu *AppPolicyViewUpdate) ClearChildren() *AppPolicyViewUpdate

ClearChildren clears all "children" edges to the AppPolicyView entity.

func (*AppPolicyViewUpdate) ClearComments

func (apvu *AppPolicyViewUpdate) ClearComments() *AppPolicyViewUpdate

ClearComments clears the value of the "comments" field.

func (*AppPolicyViewUpdate) ClearDisplaySort

func (apvu *AppPolicyViewUpdate) ClearDisplaySort() *AppPolicyViewUpdate

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppPolicyViewUpdate) ClearParent

func (apvu *AppPolicyViewUpdate) ClearParent() *AppPolicyViewUpdate

ClearParent clears the "parent" edge to the AppPolicyView entity.

func (*AppPolicyViewUpdate) ClearPath

func (apvu *AppPolicyViewUpdate) ClearPath() *AppPolicyViewUpdate

ClearPath clears the value of the "path" field.

func (*AppPolicyViewUpdate) ClearPolicyID

func (apvu *AppPolicyViewUpdate) ClearPolicyID() *AppPolicyViewUpdate

ClearPolicyID clears the value of the "policy_id" field.

func (*AppPolicyViewUpdate) ClearUpdatedAt

func (apvu *AppPolicyViewUpdate) ClearUpdatedAt() *AppPolicyViewUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyViewUpdate) ClearUpdatedBy

func (apvu *AppPolicyViewUpdate) ClearUpdatedBy() *AppPolicyViewUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyViewUpdate) Exec

func (apvu *AppPolicyViewUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppPolicyViewUpdate) ExecContext

func (c *AppPolicyViewUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewUpdate) ExecX

func (apvu *AppPolicyViewUpdate) ExecX(ctx context.Context)

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

func (*AppPolicyViewUpdate) Mutation

func (apvu *AppPolicyViewUpdate) Mutation() *AppPolicyViewMutation

Mutation returns the AppPolicyViewMutation object of the builder.

func (*AppPolicyViewUpdate) QueryContext

func (c *AppPolicyViewUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewUpdate) RemoveChildIDs

func (apvu *AppPolicyViewUpdate) RemoveChildIDs(ids ...int) *AppPolicyViewUpdate

RemoveChildIDs removes the "children" edge to AppPolicyView entities by IDs.

func (*AppPolicyViewUpdate) RemoveChildren

func (apvu *AppPolicyViewUpdate) RemoveChildren(a ...*AppPolicyView) *AppPolicyViewUpdate

RemoveChildren removes "children" edges to AppPolicyView entities.

func (*AppPolicyViewUpdate) Save

func (apvu *AppPolicyViewUpdate) Save(ctx context.Context) (int, error)

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

func (*AppPolicyViewUpdate) SaveX

func (apvu *AppPolicyViewUpdate) SaveX(ctx context.Context) int

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

func (*AppPolicyViewUpdate) SetAppPolicy

func (apvu *AppPolicyViewUpdate) SetAppPolicy(a *AppPolicy) *AppPolicyViewUpdate

SetAppPolicy sets the "app_policy" edge to the AppPolicy entity.

func (*AppPolicyViewUpdate) SetAppPolicyID

func (apvu *AppPolicyViewUpdate) SetAppPolicyID(id int) *AppPolicyViewUpdate

SetAppPolicyID sets the "app_policy" edge to the AppPolicy entity by ID.

func (*AppPolicyViewUpdate) SetComments

func (apvu *AppPolicyViewUpdate) SetComments(s string) *AppPolicyViewUpdate

SetComments sets the "comments" field.

func (*AppPolicyViewUpdate) SetDisplaySort

func (apvu *AppPolicyViewUpdate) SetDisplaySort(i int32) *AppPolicyViewUpdate

SetDisplaySort sets the "display_sort" field.

func (*AppPolicyViewUpdate) SetInput

SetInput applies the change-set in the UpdateAppPolicyViewInput on the AppPolicyViewUpdate builder.

func (*AppPolicyViewUpdate) SetKind

SetKind sets the "kind" field.

func (*AppPolicyViewUpdate) SetName

SetName sets the "name" field.

func (*AppPolicyViewUpdate) SetNillableAppPolicyID

func (apvu *AppPolicyViewUpdate) SetNillableAppPolicyID(id *int) *AppPolicyViewUpdate

SetNillableAppPolicyID sets the "app_policy" edge to the AppPolicy entity by ID if the given value is not nil.

func (*AppPolicyViewUpdate) SetNillableComments

func (apvu *AppPolicyViewUpdate) SetNillableComments(s *string) *AppPolicyViewUpdate

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

func (*AppPolicyViewUpdate) SetNillableDisplaySort

func (apvu *AppPolicyViewUpdate) SetNillableDisplaySort(i *int32) *AppPolicyViewUpdate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppPolicyViewUpdate) SetNillableKind

func (apvu *AppPolicyViewUpdate) SetNillableKind(a *apppolicyview.Kind) *AppPolicyViewUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppPolicyViewUpdate) SetNillableName

func (apvu *AppPolicyViewUpdate) SetNillableName(s *string) *AppPolicyViewUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AppPolicyViewUpdate) SetNillableParentID

func (apvu *AppPolicyViewUpdate) SetNillableParentID(i *int) *AppPolicyViewUpdate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*AppPolicyViewUpdate) SetNillablePath

func (apvu *AppPolicyViewUpdate) SetNillablePath(s *string) *AppPolicyViewUpdate

SetNillablePath sets the "path" field if the given value is not nil.

func (*AppPolicyViewUpdate) SetNillablePolicyID

func (apvu *AppPolicyViewUpdate) SetNillablePolicyID(i *int) *AppPolicyViewUpdate

SetNillablePolicyID sets the "policy_id" field if the given value is not nil.

func (*AppPolicyViewUpdate) SetNillableUpdatedAt

func (apvu *AppPolicyViewUpdate) SetNillableUpdatedAt(t *time.Time) *AppPolicyViewUpdate

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

func (*AppPolicyViewUpdate) SetNillableUpdatedBy

func (apvu *AppPolicyViewUpdate) SetNillableUpdatedBy(i *int) *AppPolicyViewUpdate

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

func (*AppPolicyViewUpdate) SetParent

SetParent sets the "parent" edge to the AppPolicyView entity.

func (*AppPolicyViewUpdate) SetParentID

func (apvu *AppPolicyViewUpdate) SetParentID(i int) *AppPolicyViewUpdate

SetParentID sets the "parent_id" field.

func (*AppPolicyViewUpdate) SetPath

SetPath sets the "path" field.

func (*AppPolicyViewUpdate) SetPolicyID

func (apvu *AppPolicyViewUpdate) SetPolicyID(i int) *AppPolicyViewUpdate

SetPolicyID sets the "policy_id" field.

func (*AppPolicyViewUpdate) SetUpdatedAt

func (apvu *AppPolicyViewUpdate) SetUpdatedAt(t time.Time) *AppPolicyViewUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyViewUpdate) SetUpdatedBy

func (apvu *AppPolicyViewUpdate) SetUpdatedBy(i int) *AppPolicyViewUpdate

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyViewUpdate) Where

Where appends a list predicates to the AppPolicyViewUpdate builder.

type AppPolicyViewUpdateOne

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

AppPolicyViewUpdateOne is the builder for updating a single AppPolicyView entity.

func (*AppPolicyViewUpdateOne) AddChildIDs

func (apvuo *AppPolicyViewUpdateOne) AddChildIDs(ids ...int) *AppPolicyViewUpdateOne

AddChildIDs adds the "children" edge to the AppPolicyView entity by IDs.

func (*AppPolicyViewUpdateOne) AddChildren

func (apvuo *AppPolicyViewUpdateOne) AddChildren(a ...*AppPolicyView) *AppPolicyViewUpdateOne

AddChildren adds the "children" edges to the AppPolicyView entity.

func (*AppPolicyViewUpdateOne) AddDisplaySort

func (apvuo *AppPolicyViewUpdateOne) AddDisplaySort(i int32) *AppPolicyViewUpdateOne

AddDisplaySort adds i to the "display_sort" field.

func (*AppPolicyViewUpdateOne) AddUpdatedBy

func (apvuo *AppPolicyViewUpdateOne) AddUpdatedBy(i int) *AppPolicyViewUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*AppPolicyViewUpdateOne) ClearAppPolicy

func (apvuo *AppPolicyViewUpdateOne) ClearAppPolicy() *AppPolicyViewUpdateOne

ClearAppPolicy clears the "app_policy" edge to the AppPolicy entity.

func (*AppPolicyViewUpdateOne) ClearChildren

func (apvuo *AppPolicyViewUpdateOne) ClearChildren() *AppPolicyViewUpdateOne

ClearChildren clears all "children" edges to the AppPolicyView entity.

func (*AppPolicyViewUpdateOne) ClearComments

func (apvuo *AppPolicyViewUpdateOne) ClearComments() *AppPolicyViewUpdateOne

ClearComments clears the value of the "comments" field.

func (*AppPolicyViewUpdateOne) ClearDisplaySort

func (apvuo *AppPolicyViewUpdateOne) ClearDisplaySort() *AppPolicyViewUpdateOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppPolicyViewUpdateOne) ClearParent

func (apvuo *AppPolicyViewUpdateOne) ClearParent() *AppPolicyViewUpdateOne

ClearParent clears the "parent" edge to the AppPolicyView entity.

func (*AppPolicyViewUpdateOne) ClearPath

func (apvuo *AppPolicyViewUpdateOne) ClearPath() *AppPolicyViewUpdateOne

ClearPath clears the value of the "path" field.

func (*AppPolicyViewUpdateOne) ClearPolicyID

func (apvuo *AppPolicyViewUpdateOne) ClearPolicyID() *AppPolicyViewUpdateOne

ClearPolicyID clears the value of the "policy_id" field.

func (*AppPolicyViewUpdateOne) ClearUpdatedAt

func (apvuo *AppPolicyViewUpdateOne) ClearUpdatedAt() *AppPolicyViewUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyViewUpdateOne) ClearUpdatedBy

func (apvuo *AppPolicyViewUpdateOne) ClearUpdatedBy() *AppPolicyViewUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyViewUpdateOne) Exec

func (apvuo *AppPolicyViewUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppPolicyViewUpdateOne) ExecContext

func (c *AppPolicyViewUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppPolicyViewUpdateOne) ExecX

func (apvuo *AppPolicyViewUpdateOne) ExecX(ctx context.Context)

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

func (*AppPolicyViewUpdateOne) Mutation

func (apvuo *AppPolicyViewUpdateOne) Mutation() *AppPolicyViewMutation

Mutation returns the AppPolicyViewMutation object of the builder.

func (*AppPolicyViewUpdateOne) QueryContext

func (c *AppPolicyViewUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppPolicyViewUpdateOne) RemoveChildIDs

func (apvuo *AppPolicyViewUpdateOne) RemoveChildIDs(ids ...int) *AppPolicyViewUpdateOne

RemoveChildIDs removes the "children" edge to AppPolicyView entities by IDs.

func (*AppPolicyViewUpdateOne) RemoveChildren

func (apvuo *AppPolicyViewUpdateOne) RemoveChildren(a ...*AppPolicyView) *AppPolicyViewUpdateOne

RemoveChildren removes "children" edges to AppPolicyView entities.

func (*AppPolicyViewUpdateOne) Save

Save executes the query and returns the updated AppPolicyView entity.

func (*AppPolicyViewUpdateOne) SaveX

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

func (*AppPolicyViewUpdateOne) Select

func (apvuo *AppPolicyViewUpdateOne) Select(field string, fields ...string) *AppPolicyViewUpdateOne

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

func (*AppPolicyViewUpdateOne) SetAppPolicy

func (apvuo *AppPolicyViewUpdateOne) SetAppPolicy(a *AppPolicy) *AppPolicyViewUpdateOne

SetAppPolicy sets the "app_policy" edge to the AppPolicy entity.

func (*AppPolicyViewUpdateOne) SetAppPolicyID

func (apvuo *AppPolicyViewUpdateOne) SetAppPolicyID(id int) *AppPolicyViewUpdateOne

SetAppPolicyID sets the "app_policy" edge to the AppPolicy entity by ID.

func (*AppPolicyViewUpdateOne) SetComments

func (apvuo *AppPolicyViewUpdateOne) SetComments(s string) *AppPolicyViewUpdateOne

SetComments sets the "comments" field.

func (*AppPolicyViewUpdateOne) SetDisplaySort

func (apvuo *AppPolicyViewUpdateOne) SetDisplaySort(i int32) *AppPolicyViewUpdateOne

SetDisplaySort sets the "display_sort" field.

func (*AppPolicyViewUpdateOne) SetInput

SetInput applies the change-set in the UpdateAppPolicyViewInput on the AppPolicyViewUpdateOne builder.

func (*AppPolicyViewUpdateOne) SetKind

SetKind sets the "kind" field.

func (*AppPolicyViewUpdateOne) SetName

SetName sets the "name" field.

func (*AppPolicyViewUpdateOne) SetNillableAppPolicyID

func (apvuo *AppPolicyViewUpdateOne) SetNillableAppPolicyID(id *int) *AppPolicyViewUpdateOne

SetNillableAppPolicyID sets the "app_policy" edge to the AppPolicy entity by ID if the given value is not nil.

func (*AppPolicyViewUpdateOne) SetNillableComments

func (apvuo *AppPolicyViewUpdateOne) SetNillableComments(s *string) *AppPolicyViewUpdateOne

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

func (*AppPolicyViewUpdateOne) SetNillableDisplaySort

func (apvuo *AppPolicyViewUpdateOne) SetNillableDisplaySort(i *int32) *AppPolicyViewUpdateOne

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*AppPolicyViewUpdateOne) SetNillableKind

SetNillableKind sets the "kind" field if the given value is not nil.

func (*AppPolicyViewUpdateOne) SetNillableName

func (apvuo *AppPolicyViewUpdateOne) SetNillableName(s *string) *AppPolicyViewUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*AppPolicyViewUpdateOne) SetNillableParentID

func (apvuo *AppPolicyViewUpdateOne) SetNillableParentID(i *int) *AppPolicyViewUpdateOne

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*AppPolicyViewUpdateOne) SetNillablePath

func (apvuo *AppPolicyViewUpdateOne) SetNillablePath(s *string) *AppPolicyViewUpdateOne

SetNillablePath sets the "path" field if the given value is not nil.

func (*AppPolicyViewUpdateOne) SetNillablePolicyID

func (apvuo *AppPolicyViewUpdateOne) SetNillablePolicyID(i *int) *AppPolicyViewUpdateOne

SetNillablePolicyID sets the "policy_id" field if the given value is not nil.

func (*AppPolicyViewUpdateOne) SetNillableUpdatedAt

func (apvuo *AppPolicyViewUpdateOne) SetNillableUpdatedAt(t *time.Time) *AppPolicyViewUpdateOne

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

func (*AppPolicyViewUpdateOne) SetNillableUpdatedBy

func (apvuo *AppPolicyViewUpdateOne) SetNillableUpdatedBy(i *int) *AppPolicyViewUpdateOne

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

func (*AppPolicyViewUpdateOne) SetParent

SetParent sets the "parent" edge to the AppPolicyView entity.

func (*AppPolicyViewUpdateOne) SetParentID

func (apvuo *AppPolicyViewUpdateOne) SetParentID(i int) *AppPolicyViewUpdateOne

SetParentID sets the "parent_id" field.

func (*AppPolicyViewUpdateOne) SetPath

SetPath sets the "path" field.

func (*AppPolicyViewUpdateOne) SetPolicyID

func (apvuo *AppPolicyViewUpdateOne) SetPolicyID(i int) *AppPolicyViewUpdateOne

SetPolicyID sets the "policy_id" field.

func (*AppPolicyViewUpdateOne) SetUpdatedAt

func (apvuo *AppPolicyViewUpdateOne) SetUpdatedAt(t time.Time) *AppPolicyViewUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyViewUpdateOne) SetUpdatedBy

func (apvuo *AppPolicyViewUpdateOne) SetUpdatedBy(i int) *AppPolicyViewUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyViewUpdateOne) Where

Where appends a list predicates to the AppPolicyViewUpdate builder.

type AppPolicyViewUpsert

type AppPolicyViewUpsert struct {
	*sql.UpdateSet
}

AppPolicyViewUpsert is the "OnConflict" setter.

func (*AppPolicyViewUpsert) AddDisplaySort

func (u *AppPolicyViewUpsert) AddDisplaySort(v int32) *AppPolicyViewUpsert

AddDisplaySort adds v to the "display_sort" field.

func (*AppPolicyViewUpsert) AddUpdatedBy

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

AddUpdatedBy adds v to the "updated_by" field.

func (*AppPolicyViewUpsert) ClearComments

func (u *AppPolicyViewUpsert) ClearComments() *AppPolicyViewUpsert

ClearComments clears the value of the "comments" field.

func (*AppPolicyViewUpsert) ClearDisplaySort

func (u *AppPolicyViewUpsert) ClearDisplaySort() *AppPolicyViewUpsert

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppPolicyViewUpsert) ClearPath

func (u *AppPolicyViewUpsert) ClearPath() *AppPolicyViewUpsert

ClearPath clears the value of the "path" field.

func (*AppPolicyViewUpsert) ClearPolicyID

func (u *AppPolicyViewUpsert) ClearPolicyID() *AppPolicyViewUpsert

ClearPolicyID clears the value of the "policy_id" field.

func (*AppPolicyViewUpsert) ClearUpdatedAt

func (u *AppPolicyViewUpsert) ClearUpdatedAt() *AppPolicyViewUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyViewUpsert) ClearUpdatedBy

func (u *AppPolicyViewUpsert) ClearUpdatedBy() *AppPolicyViewUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyViewUpsert) SetComments

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

SetComments sets the "comments" field.

func (*AppPolicyViewUpsert) SetDisplaySort

func (u *AppPolicyViewUpsert) SetDisplaySort(v int32) *AppPolicyViewUpsert

SetDisplaySort sets the "display_sort" field.

func (*AppPolicyViewUpsert) SetKind

SetKind sets the "kind" field.

func (*AppPolicyViewUpsert) SetName

SetName sets the "name" field.

func (*AppPolicyViewUpsert) SetParentID

func (u *AppPolicyViewUpsert) SetParentID(v int) *AppPolicyViewUpsert

SetParentID sets the "parent_id" field.

func (*AppPolicyViewUpsert) SetPath

SetPath sets the "path" field.

func (*AppPolicyViewUpsert) SetPolicyID

func (u *AppPolicyViewUpsert) SetPolicyID(v int) *AppPolicyViewUpsert

SetPolicyID sets the "policy_id" field.

func (*AppPolicyViewUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyViewUpsert) SetUpdatedBy

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

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyViewUpsert) UpdateComments

func (u *AppPolicyViewUpsert) UpdateComments() *AppPolicyViewUpsert

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

func (*AppPolicyViewUpsert) UpdateDisplaySort

func (u *AppPolicyViewUpsert) UpdateDisplaySort() *AppPolicyViewUpsert

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppPolicyViewUpsert) UpdateKind

func (u *AppPolicyViewUpsert) UpdateKind() *AppPolicyViewUpsert

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

func (*AppPolicyViewUpsert) UpdateName

func (u *AppPolicyViewUpsert) UpdateName() *AppPolicyViewUpsert

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

func (*AppPolicyViewUpsert) UpdateParentID

func (u *AppPolicyViewUpsert) UpdateParentID() *AppPolicyViewUpsert

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*AppPolicyViewUpsert) UpdatePath

func (u *AppPolicyViewUpsert) UpdatePath() *AppPolicyViewUpsert

UpdatePath sets the "path" field to the value that was provided on create.

func (*AppPolicyViewUpsert) UpdatePolicyID

func (u *AppPolicyViewUpsert) UpdatePolicyID() *AppPolicyViewUpsert

UpdatePolicyID sets the "policy_id" field to the value that was provided on create.

func (*AppPolicyViewUpsert) UpdateUpdatedAt

func (u *AppPolicyViewUpsert) UpdateUpdatedAt() *AppPolicyViewUpsert

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

func (*AppPolicyViewUpsert) UpdateUpdatedBy

func (u *AppPolicyViewUpsert) UpdateUpdatedBy() *AppPolicyViewUpsert

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

type AppPolicyViewUpsertBulk

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

AppPolicyViewUpsertBulk is the builder for "upsert"-ing a bulk of AppPolicyView nodes.

func (*AppPolicyViewUpsertBulk) AddDisplaySort

AddDisplaySort adds v to the "display_sort" field.

func (*AppPolicyViewUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*AppPolicyViewUpsertBulk) ClearComments

ClearComments clears the value of the "comments" field.

func (*AppPolicyViewUpsertBulk) ClearDisplaySort

func (u *AppPolicyViewUpsertBulk) ClearDisplaySort() *AppPolicyViewUpsertBulk

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppPolicyViewUpsertBulk) ClearPath

ClearPath clears the value of the "path" field.

func (*AppPolicyViewUpsertBulk) ClearPolicyID

ClearPolicyID clears the value of the "policy_id" field.

func (*AppPolicyViewUpsertBulk) ClearUpdatedAt

func (u *AppPolicyViewUpsertBulk) ClearUpdatedAt() *AppPolicyViewUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyViewUpsertBulk) ClearUpdatedBy

func (u *AppPolicyViewUpsertBulk) ClearUpdatedBy() *AppPolicyViewUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyViewUpsertBulk) DoNothing

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

func (*AppPolicyViewUpsertBulk) Exec

Exec executes the query.

func (*AppPolicyViewUpsertBulk) ExecX

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

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

func (*AppPolicyViewUpsertBulk) Ignore

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

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

func (*AppPolicyViewUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*AppPolicyViewUpsertBulk) SetDisplaySort

SetDisplaySort sets the "display_sort" field.

func (*AppPolicyViewUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*AppPolicyViewUpsertBulk) SetName

SetName sets the "name" field.

func (*AppPolicyViewUpsertBulk) SetParentID

SetParentID sets the "parent_id" field.

func (*AppPolicyViewUpsertBulk) SetPath

SetPath sets the "path" field.

func (*AppPolicyViewUpsertBulk) SetPolicyID

SetPolicyID sets the "policy_id" field.

func (*AppPolicyViewUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyViewUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyViewUpsertBulk) Update

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

func (*AppPolicyViewUpsertBulk) UpdateComments

func (u *AppPolicyViewUpsertBulk) UpdateComments() *AppPolicyViewUpsertBulk

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

func (*AppPolicyViewUpsertBulk) UpdateDisplaySort

func (u *AppPolicyViewUpsertBulk) UpdateDisplaySort() *AppPolicyViewUpsertBulk

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppPolicyViewUpsertBulk) UpdateKind

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

func (*AppPolicyViewUpsertBulk) UpdateName

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

func (*AppPolicyViewUpsertBulk) UpdateNewValues

func (u *AppPolicyViewUpsertBulk) UpdateNewValues() *AppPolicyViewUpsertBulk

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

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

func (*AppPolicyViewUpsertBulk) UpdateParentID

func (u *AppPolicyViewUpsertBulk) UpdateParentID() *AppPolicyViewUpsertBulk

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*AppPolicyViewUpsertBulk) UpdatePath

UpdatePath sets the "path" field to the value that was provided on create.

func (*AppPolicyViewUpsertBulk) UpdatePolicyID

func (u *AppPolicyViewUpsertBulk) UpdatePolicyID() *AppPolicyViewUpsertBulk

UpdatePolicyID sets the "policy_id" field to the value that was provided on create.

func (*AppPolicyViewUpsertBulk) UpdateUpdatedAt

func (u *AppPolicyViewUpsertBulk) UpdateUpdatedAt() *AppPolicyViewUpsertBulk

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

func (*AppPolicyViewUpsertBulk) UpdateUpdatedBy

func (u *AppPolicyViewUpsertBulk) UpdateUpdatedBy() *AppPolicyViewUpsertBulk

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

type AppPolicyViewUpsertOne

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

AppPolicyViewUpsertOne is the builder for "upsert"-ing

one AppPolicyView node.

func (*AppPolicyViewUpsertOne) AddDisplaySort

func (u *AppPolicyViewUpsertOne) AddDisplaySort(v int32) *AppPolicyViewUpsertOne

AddDisplaySort adds v to the "display_sort" field.

func (*AppPolicyViewUpsertOne) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*AppPolicyViewUpsertOne) ClearComments

func (u *AppPolicyViewUpsertOne) ClearComments() *AppPolicyViewUpsertOne

ClearComments clears the value of the "comments" field.

func (*AppPolicyViewUpsertOne) ClearDisplaySort

func (u *AppPolicyViewUpsertOne) ClearDisplaySort() *AppPolicyViewUpsertOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*AppPolicyViewUpsertOne) ClearPath

ClearPath clears the value of the "path" field.

func (*AppPolicyViewUpsertOne) ClearPolicyID

func (u *AppPolicyViewUpsertOne) ClearPolicyID() *AppPolicyViewUpsertOne

ClearPolicyID clears the value of the "policy_id" field.

func (*AppPolicyViewUpsertOne) ClearUpdatedAt

func (u *AppPolicyViewUpsertOne) ClearUpdatedAt() *AppPolicyViewUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*AppPolicyViewUpsertOne) ClearUpdatedBy

func (u *AppPolicyViewUpsertOne) ClearUpdatedBy() *AppPolicyViewUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*AppPolicyViewUpsertOne) DoNothing

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

func (*AppPolicyViewUpsertOne) Exec

Exec executes the query.

func (*AppPolicyViewUpsertOne) ExecX

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

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

func (*AppPolicyViewUpsertOne) ID

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

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

func (*AppPolicyViewUpsertOne) IDX

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

func (*AppPolicyViewUpsertOne) Ignore

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

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

func (*AppPolicyViewUpsertOne) SetComments

SetComments sets the "comments" field.

func (*AppPolicyViewUpsertOne) SetDisplaySort

func (u *AppPolicyViewUpsertOne) SetDisplaySort(v int32) *AppPolicyViewUpsertOne

SetDisplaySort sets the "display_sort" field.

func (*AppPolicyViewUpsertOne) SetKind

SetKind sets the "kind" field.

func (*AppPolicyViewUpsertOne) SetName

SetName sets the "name" field.

func (*AppPolicyViewUpsertOne) SetParentID

SetParentID sets the "parent_id" field.

func (*AppPolicyViewUpsertOne) SetPath

SetPath sets the "path" field.

func (*AppPolicyViewUpsertOne) SetPolicyID

SetPolicyID sets the "policy_id" field.

func (*AppPolicyViewUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*AppPolicyViewUpsertOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*AppPolicyViewUpsertOne) Update

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

func (*AppPolicyViewUpsertOne) UpdateComments

func (u *AppPolicyViewUpsertOne) UpdateComments() *AppPolicyViewUpsertOne

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

func (*AppPolicyViewUpsertOne) UpdateDisplaySort

func (u *AppPolicyViewUpsertOne) UpdateDisplaySort() *AppPolicyViewUpsertOne

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*AppPolicyViewUpsertOne) UpdateKind

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

func (*AppPolicyViewUpsertOne) UpdateName

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

func (*AppPolicyViewUpsertOne) UpdateNewValues

func (u *AppPolicyViewUpsertOne) UpdateNewValues() *AppPolicyViewUpsertOne

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.AppPolicyView.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apppolicyview.FieldID)
		}),
	).
	Exec(ctx)

func (*AppPolicyViewUpsertOne) UpdateParentID

func (u *AppPolicyViewUpsertOne) UpdateParentID() *AppPolicyViewUpsertOne

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*AppPolicyViewUpsertOne) UpdatePath

UpdatePath sets the "path" field to the value that was provided on create.

func (*AppPolicyViewUpsertOne) UpdatePolicyID

func (u *AppPolicyViewUpsertOne) UpdatePolicyID() *AppPolicyViewUpsertOne

UpdatePolicyID sets the "policy_id" field to the value that was provided on create.

func (*AppPolicyViewUpsertOne) UpdateUpdatedAt

func (u *AppPolicyViewUpsertOne) UpdateUpdatedAt() *AppPolicyViewUpsertOne

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

func (*AppPolicyViewUpsertOne) UpdateUpdatedBy

func (u *AppPolicyViewUpsertOne) UpdateUpdatedBy() *AppPolicyViewUpsertOne

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

type AppPolicyViewWhereInput

type AppPolicyViewWhereInput struct {
	Predicates []predicate.AppPolicyView  `json:"-"`
	Not        *AppPolicyViewWhereInput   `json:"not,omitempty"`
	Or         []*AppPolicyViewWhereInput `json:"or,omitempty"`
	And        []*AppPolicyViewWhereInput `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"`

	// "kind" field predicates.
	Kind      *apppolicyview.Kind  `json:"kind,omitempty"`
	KindNEQ   *apppolicyview.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []apppolicyview.Kind `json:"kindIn,omitempty"`
	KindNotIn []apppolicyview.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"`

	// "policy_id" field predicates.
	PolicyID       *int  `json:"policyID,omitempty"`
	PolicyIDNEQ    *int  `json:"policyIDNEQ,omitempty"`
	PolicyIDIn     []int `json:"policyIDIn,omitempty"`
	PolicyIDNotIn  []int `json:"policyIDNotIn,omitempty"`
	PolicyIDIsNil  bool  `json:"policyIDIsNil,omitempty"`
	PolicyIDNotNil bool  `json:"policyIDNotNil,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"`

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

	// "app_policy" edge predicates.
	HasAppPolicy     *bool                  `json:"hasAppPolicy,omitempty"`
	HasAppPolicyWith []*AppPolicyWhereInput `json:"hasAppPolicyWith,omitempty"`

	// "parent" edge predicates.
	HasParent     *bool                      `json:"hasParent,omitempty"`
	HasParentWith []*AppPolicyViewWhereInput `json:"hasParentWith,omitempty"`

	// "children" edge predicates.
	HasChildren     *bool                      `json:"hasChildren,omitempty"`
	HasChildrenWith []*AppPolicyViewWhereInput `json:"hasChildrenWith,omitempty"`
}

AppPolicyViewWhereInput represents a where input for filtering AppPolicyView queries.

func (*AppPolicyViewWhereInput) AddPredicates

func (i *AppPolicyViewWhereInput) AddPredicates(predicates ...predicate.AppPolicyView)

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

func (*AppPolicyViewWhereInput) Filter

Filter applies the AppPolicyViewWhereInput filter on the AppPolicyViewQuery builder.

func (*AppPolicyViewWhereInput) P

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

type AppPolicyViews

type AppPolicyViews []*AppPolicyView

AppPolicyViews is a parsable slice of AppPolicyView.

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"`

	// "kind" field predicates.
	Kind      *apppolicy.Kind  `json:"kind,omitempty"`
	KindNEQ   *apppolicy.Kind  `json:"kindNEQ,omitempty"`
	KindIn    []apppolicy.Kind `json:"kindIn,omitempty"`
	KindNotIn []apppolicy.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"`

	// "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"`

	// "org_policies" edge predicates.
	HasOrgPolicies     *bool                  `json:"hasOrgPolicies,omitempty"`
	HasOrgPoliciesWith []*OrgPolicyWhereInput `json:"hasOrgPoliciesWith,omitempty"`

	// "policy_views" edge predicates.
	HasPolicyViews     *bool                      `json:"hasPolicyViews,omitempty"`
	HasPolicyViewsWith []*AppPolicyViewWhereInput `json:"hasPolicyViewsWith,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) ExecContext

func (c *AppQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) QueryPolicyViews

func (aq *AppQuery) QueryPolicyViews() *AppPolicyViewQuery

QueryPolicyViews chains the current query on the "policy_views" 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) WithNamedPolicyViews

func (aq *AppQuery) WithNamedPolicyViews(name string, opts ...func(*AppPolicyViewQuery)) *AppQuery

WithNamedPolicyViews tells the query-builder to eager-load the nodes that are connected to the "policy_views" 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) WithPolicyViews

func (aq *AppQuery) WithPolicyViews(opts ...func(*AppPolicyViewQuery)) *AppQuery

WithPolicyViews tells the query-builder to eager-load the nodes that are connected to the "policy_views" 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) ExecContext

func (c *AppRes) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRes) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppResClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppResClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppResCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppResCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppResCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppResCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppResDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppResDelete) ExecX

func (ard *AppResDelete) ExecX(ctx context.Context) int

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

func (*AppResDelete) QueryContext

func (c *AppResDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppResMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppResMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppResQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppResQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c AppResSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppResSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppResUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppResUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableArnPattern

func (aru *AppResUpdate) SetNillableArnPattern(s *string) *AppResUpdate

SetNillableArnPattern sets the "arn_pattern" field if the given value is not nil.

func (*AppResUpdate) SetNillableName

func (aru *AppResUpdate) SetNillableName(s *string) *AppResUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AppResUpdate) SetNillableTypeName

func (aru *AppResUpdate) SetNillableTypeName(s *string) *AppResUpdate

SetNillableTypeName sets the "type_name" field if the given value is not nil.

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) ExecContext

func (c *AppResUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppResUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableArnPattern

func (aruo *AppResUpdateOne) SetNillableArnPattern(s *string) *AppResUpdateOne

SetNillableArnPattern sets the "arn_pattern" field if the given value is not nil.

func (*AppResUpdateOne) SetNillableName

func (aruo *AppResUpdateOne) SetNillableName(s *string) *AppResUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*AppResUpdateOne) SetNillableTypeName

func (aruo *AppResUpdateOne) SetNillableTypeName(s *string) *AppResUpdateOne

SetNillableTypeName sets the "type_name" field if the given value is not nil.

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) ExecContext

func (c *AppRole) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRole) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppRoleDelete) ExecX

func (ard *AppRoleDelete) ExecX(ctx context.Context) int

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

func (*AppRoleDelete) QueryContext

func (c *AppRoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicy) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppRolePolicy) QueryContext

func (c *AppRolePolicy) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRolePolicyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRolePolicyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRolePolicyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppRolePolicyDelete) ExecX

func (arpd *AppRolePolicyDelete) ExecX(ctx context.Context) int

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

func (*AppRolePolicyDelete) QueryContext

func (c *AppRolePolicyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRolePolicyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRolePolicyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c AppRolePolicySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppRolePolicySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRolePolicyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRolePolicyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableAppID

func (arpu *AppRolePolicyUpdate) SetNillableAppID(i *int) *AppRolePolicyUpdate

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

func (*AppRolePolicyUpdate) SetNillableAppPolicyID

func (arpu *AppRolePolicyUpdate) SetNillableAppPolicyID(i *int) *AppRolePolicyUpdate

SetNillableAppPolicyID sets the "app_policy_id" field if the given value is not nil.

func (*AppRolePolicyUpdate) SetNillableAppRoleID

func (arpu *AppRolePolicyUpdate) SetNillableAppRoleID(i *int) *AppRolePolicyUpdate

SetNillableAppRoleID sets the "app_role_id" field if the given value is not nil.

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) ExecContext

func (c *AppRolePolicyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRolePolicyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableAppID

func (arpuo *AppRolePolicyUpdateOne) SetNillableAppID(i *int) *AppRolePolicyUpdateOne

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

func (*AppRolePolicyUpdateOne) SetNillableAppPolicyID

func (arpuo *AppRolePolicyUpdateOne) SetNillableAppPolicyID(i *int) *AppRolePolicyUpdateOne

SetNillableAppPolicyID sets the "app_policy_id" field if the given value is not nil.

func (*AppRolePolicyUpdateOne) SetNillableAppRoleID

func (arpuo *AppRolePolicyUpdateOne) SetNillableAppRoleID(i *int) *AppRolePolicyUpdateOne

SetNillableAppRoleID sets the "app_role_id" field if the given value is not nil.

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) ExecContext

func (c *AppRoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c AppRoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppRoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *AppRoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableName

func (aru *AppRoleUpdate) SetNillableName(s *string) *AppRoleUpdate

SetNillableName sets the "name" 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) ExecContext

func (c *AppRoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppRoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableName

func (aruo *AppRoleUpdateOne) SetNillableName(s *string) *AppRoleUpdateOne

SetNillableName sets the "name" 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) ExecContext

func (c AppSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c AppSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) 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) AddPolicyViewIDs

func (au *AppUpdate) AddPolicyViewIDs(ids ...int) *AppUpdate

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView entity by IDs.

func (*AppUpdate) AddPolicyViews

func (au *AppUpdate) AddPolicyViews(a ...*AppPolicyView) *AppUpdate

AddPolicyViews adds the "policy_views" edges to the AppPolicyView entity.

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 (au *AppUpdate) ClearLogo() *AppUpdate

ClearLogo clears the value of the "logo" 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) ClearOrgPrivate

func (au *AppUpdate) ClearOrgPrivate() *AppUpdate

ClearOrgPrivate clears the value of the "org_private" field.

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) ClearPolicyViews

func (au *AppUpdate) ClearPolicyViews() *AppUpdate

ClearPolicyViews clears all "policy_views" edges to the AppPolicyView entity.

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) ExecContext

func (c *AppUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemovePolicyViewIDs

func (au *AppUpdate) RemovePolicyViewIDs(ids ...int) *AppUpdate

RemovePolicyViewIDs removes the "policy_views" edge to AppPolicyView entities by IDs.

func (*AppUpdate) RemovePolicyViews

func (au *AppUpdate) RemovePolicyViews(a ...*AppPolicyView) *AppUpdate

RemovePolicyViews removes "policy_views" edges to AppPolicyView entities.

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 (au *AppUpdate) SetLogo(s string) *AppUpdate

SetLogo sets the "logo" 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) SetNillableKind

func (au *AppUpdate) SetNillableKind(a *app.Kind) *AppUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (au *AppUpdate) SetNillableLogo(s *string) *AppUpdate

SetNillableLogo sets the "logo" field if the given value is not nil.

func (*AppUpdate) SetNillableName

func (au *AppUpdate) SetNillableName(s *string) *AppUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*AppUpdate) SetNillableOrgPrivate

func (au *AppUpdate) SetNillableOrgPrivate(b *bool) *AppUpdate

SetNillableOrgPrivate sets the "org_private" 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) 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) SetOrgPrivate

func (au *AppUpdate) SetOrgPrivate(b bool) *AppUpdate

SetOrgPrivate sets the "org_private" field.

func (*AppUpdate) SetOwnerOrgID

func (au *AppUpdate) SetOwnerOrgID(i int) *AppUpdate

SetOwnerOrgID sets the "owner_org_id" 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) 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) AddPolicyViewIDs

func (auo *AppUpdateOne) AddPolicyViewIDs(ids ...int) *AppUpdateOne

AddPolicyViewIDs adds the "policy_views" edge to the AppPolicyView entity by IDs.

func (*AppUpdateOne) AddPolicyViews

func (auo *AppUpdateOne) AddPolicyViews(a ...*AppPolicyView) *AppUpdateOne

AddPolicyViews adds the "policy_views" edges to the AppPolicyView entity.

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 (auo *AppUpdateOne) ClearLogo() *AppUpdateOne

ClearLogo clears the value of the "logo" 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) ClearOrgPrivate

func (auo *AppUpdateOne) ClearOrgPrivate() *AppUpdateOne

ClearOrgPrivate clears the value of the "org_private" field.

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) ClearPolicyViews

func (auo *AppUpdateOne) ClearPolicyViews() *AppUpdateOne

ClearPolicyViews clears all "policy_views" edges to the AppPolicyView entity.

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) ExecContext

func (c *AppUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *AppUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemovePolicyViewIDs

func (auo *AppUpdateOne) RemovePolicyViewIDs(ids ...int) *AppUpdateOne

RemovePolicyViewIDs removes the "policy_views" edge to AppPolicyView entities by IDs.

func (*AppUpdateOne) RemovePolicyViews

func (auo *AppUpdateOne) RemovePolicyViews(a ...*AppPolicyView) *AppUpdateOne

RemovePolicyViews removes "policy_views" edges to AppPolicyView entities.

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 (auo *AppUpdateOne) SetLogo(s string) *AppUpdateOne

SetLogo sets the "logo" 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) SetNillableKind

func (auo *AppUpdateOne) SetNillableKind(a *app.Kind) *AppUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (auo *AppUpdateOne) SetNillableLogo(s *string) *AppUpdateOne

SetNillableLogo sets the "logo" field if the given value is not nil.

func (*AppUpdateOne) SetNillableName

func (auo *AppUpdateOne) SetNillableName(s *string) *AppUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*AppUpdateOne) SetNillableOrgPrivate

func (auo *AppUpdateOne) SetNillableOrgPrivate(b *bool) *AppUpdateOne

SetNillableOrgPrivate sets the "org_private" 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) 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) SetOrgPrivate

func (auo *AppUpdateOne) SetOrgPrivate(b bool) *AppUpdateOne

SetOrgPrivate sets the "org_private" field.

func (*AppUpdateOne) SetOwnerOrgID

func (auo *AppUpdateOne) SetOwnerOrgID(i int) *AppUpdateOne

SetOwnerOrgID sets the "owner_org_id" 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) 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 (u *AppUpsert) ClearLogo() *AppUpsert

ClearLogo clears the value of the "logo" field.

func (*AppUpsert) ClearOrgPrivate

func (u *AppUpsert) ClearOrgPrivate() *AppUpsert

ClearOrgPrivate clears the value of the "org_private" field.

func (*AppUpsert) ClearOwnerOrgID

func (u *AppUpsert) ClearOwnerOrgID() *AppUpsert

ClearOwnerOrgID clears the value of the "owner_org_id" 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 (u *AppUpsert) SetLogo(v string) *AppUpsert

SetLogo sets the "logo" field.

func (*AppUpsert) SetName

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

SetName sets the "name" field.

func (*AppUpsert) SetOrgPrivate

func (u *AppUpsert) SetOrgPrivate(v bool) *AppUpsert

SetOrgPrivate sets the "org_private" field.

func (*AppUpsert) SetOwnerOrgID

func (u *AppUpsert) SetOwnerOrgID(v int) *AppUpsert

SetOwnerOrgID sets the "owner_org_id" 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 (u *AppUpsert) UpdateLogo() *AppUpsert

UpdateLogo sets the "logo" 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) UpdateOrgPrivate

func (u *AppUpsert) UpdateOrgPrivate() *AppUpsert

UpdateOrgPrivate sets the "org_private" 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) 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) 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 (u *AppUpsertBulk) ClearLogo() *AppUpsertBulk

ClearLogo clears the value of the "logo" field.

func (*AppUpsertBulk) ClearOrgPrivate

func (u *AppUpsertBulk) ClearOrgPrivate() *AppUpsertBulk

ClearOrgPrivate clears the value of the "org_private" field.

func (*AppUpsertBulk) ClearOwnerOrgID

func (u *AppUpsertBulk) ClearOwnerOrgID() *AppUpsertBulk

ClearOwnerOrgID clears the value of the "owner_org_id" 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 (u *AppUpsertBulk) SetLogo(v string) *AppUpsertBulk

SetLogo sets the "logo" field.

func (*AppUpsertBulk) SetName

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

SetName sets the "name" field.

func (*AppUpsertBulk) SetOrgPrivate

func (u *AppUpsertBulk) SetOrgPrivate(v bool) *AppUpsertBulk

SetOrgPrivate sets the "org_private" field.

func (*AppUpsertBulk) SetOwnerOrgID

func (u *AppUpsertBulk) SetOwnerOrgID(v int) *AppUpsertBulk

SetOwnerOrgID sets the "owner_org_id" 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 (u *AppUpsertBulk) UpdateLogo() *AppUpsertBulk

UpdateLogo sets the "logo" 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) UpdateOrgPrivate

func (u *AppUpsertBulk) UpdateOrgPrivate() *AppUpsertBulk

UpdateOrgPrivate sets the "org_private" field to the value that was provided on create.

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) 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) 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 (u *AppUpsertOne) ClearLogo() *AppUpsertOne

ClearLogo clears the value of the "logo" field.

func (*AppUpsertOne) ClearOrgPrivate

func (u *AppUpsertOne) ClearOrgPrivate() *AppUpsertOne

ClearOrgPrivate clears the value of the "org_private" field.

func (*AppUpsertOne) ClearOwnerOrgID

func (u *AppUpsertOne) ClearOwnerOrgID() *AppUpsertOne

ClearOwnerOrgID clears the value of the "owner_org_id" 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 (u *AppUpsertOne) SetLogo(v string) *AppUpsertOne

SetLogo sets the "logo" field.

func (*AppUpsertOne) SetName

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

SetName sets the "name" field.

func (*AppUpsertOne) SetOrgPrivate

func (u *AppUpsertOne) SetOrgPrivate(v bool) *AppUpsertOne

SetOrgPrivate sets the "org_private" field.

func (*AppUpsertOne) SetOwnerOrgID

func (u *AppUpsertOne) SetOwnerOrgID(v int) *AppUpsertOne

SetOwnerOrgID sets the "owner_org_id" 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 (u *AppUpsertOne) UpdateLogo() *AppUpsertOne

UpdateLogo sets the "logo" 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) UpdateOrgPrivate

func (u *AppUpsertOne) UpdateOrgPrivate() *AppUpsertOne

UpdateOrgPrivate sets the "org_private" field to the value that was provided on create.

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) 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"`

	// "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"`

	// "policy_views" edge predicates.
	HasPolicyViews     *bool                      `json:"hasPolicyViews,omitempty"`
	HasPolicyViewsWith []*AppPolicyViewWhereInput `json:"hasPolicyViewsWith,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
	// AppPolicyView is the client for interacting with the AppPolicyView builders.
	AppPolicyView *AppPolicyViewClient
	// 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
	// Country is the client for interacting with the Country builders.
	Country *CountryClient
	// Currency is the client for interacting with the Currency builders.
	Currency *CurrencyClient
	// FileIdentity is the client for interacting with the FileIdentity builders.
	FileIdentity *FileIdentityClient
	// 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
	// Quota is the client for interacting with the Quota builders.
	Quota *QuotaClient
	// QuotaItem is the client for interacting with the QuotaItem builders.
	QuotaItem *QuotaItemClient
	// Region is the client for interacting with the Region builders.
	Region *RegionClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserAddr is the client for interacting with the UserAddr builders.
	UserAddr *UserAddrClient
	// 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
	// UserPasswordPolicy is the client for interacting with the UserPasswordPolicy builders.
	UserPasswordPolicy *UserPasswordPolicyClient
	// 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) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 Countries

type Countries []*Country

Countries is a parsable slice of Country.

type Country

type Country 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"`
	// 国家英文名称
	NameEn string `json:"name_en,omitempty"`
	// 国家代码
	Code string `json:"code,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 CountryQuery when eager-loading is set.
	Edges CountryEdges `json:"edges"`
	// contains filtered or unexported fields
}

Country is the model entity for the Country schema.

func (*Country) ExecContext

func (c *Country) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Country) GlobalID

func (c *Country) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Country node.

func (*Country) IsNode

func (*Country) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Country) NamedRegions

func (c *Country) NamedRegions(name string) ([]*Region, error)

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

func (*Country) QueryContext

func (c *Country) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Country) QueryRegions

func (c *Country) QueryRegions() *RegionQuery

QueryRegions queries the "regions" edge of the Country entity.

func (*Country) Regions

func (c *Country) Regions(ctx context.Context) (result []*Region, err error)

func (*Country) String

func (c *Country) String() string

String implements the fmt.Stringer.

func (*Country) ToEdge

func (c *Country) ToEdge(order *CountryOrder) *CountryEdge

ToEdge converts Country into CountryEdge.

func (*Country) Unwrap

func (c *Country) Unwrap() *Country

Unwrap unwraps the Country 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 (*Country) Update

func (c *Country) Update() *CountryUpdateOne

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

func (*Country) Value

func (c *Country) Value(name string) (ent.Value, error)

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

type CountryClient

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

CountryClient is a client for the Country schema.

func NewCountryClient

func NewCountryClient(c config) *CountryClient

NewCountryClient returns a client for the Country from the given config.

func (*CountryClient) Create

func (c *CountryClient) Create() *CountryCreate

Create returns a builder for creating a Country entity.

func (*CountryClient) CreateBulk

func (c *CountryClient) CreateBulk(builders ...*CountryCreate) *CountryCreateBulk

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

func (*CountryClient) Delete

func (c *CountryClient) Delete() *CountryDelete

Delete returns a delete builder for Country.

func (*CountryClient) DeleteOne

func (c *CountryClient) DeleteOne(co *Country) *CountryDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CountryClient) DeleteOneID

func (c *CountryClient) DeleteOneID(id int) *CountryDeleteOne

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

func (*CountryClient) ExecContext

func (c *CountryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryClient) Get

func (c *CountryClient) Get(ctx context.Context, id int) (*Country, error)

Get returns a Country entity by its id.

func (*CountryClient) GetX

func (c *CountryClient) GetX(ctx context.Context, id int) *Country

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

func (*CountryClient) Hooks

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

Hooks returns the client hooks.

func (*CountryClient) Intercept

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

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

func (*CountryClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CountryClient) MapCreateBulk

func (c *CountryClient) MapCreateBulk(slice any, setFunc func(*CountryCreate, int)) *CountryCreateBulk

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 (*CountryClient) Query

func (c *CountryClient) Query() *CountryQuery

Query returns a query builder for Country.

func (*CountryClient) QueryContext

func (c *CountryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryClient) QueryRegions

func (c *CountryClient) QueryRegions(co *Country) *RegionQuery

QueryRegions queries the regions edge of a Country.

func (*CountryClient) Update

func (c *CountryClient) Update() *CountryUpdate

Update returns an update builder for Country.

func (*CountryClient) UpdateOne

func (c *CountryClient) UpdateOne(co *Country) *CountryUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CountryClient) UpdateOneID

func (c *CountryClient) UpdateOneID(id int) *CountryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CountryClient) Use

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

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

type CountryConnection

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

CountryConnection is the connection containing edges to Country.

type CountryCreate

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

CountryCreate is the builder for creating a Country entity.

func (*CountryCreate) AddRegionIDs

func (cc *CountryCreate) AddRegionIDs(ids ...int) *CountryCreate

AddRegionIDs adds the "regions" edge to the Region entity by IDs.

func (*CountryCreate) AddRegions

func (cc *CountryCreate) AddRegions(r ...*Region) *CountryCreate

AddRegions adds the "regions" edges to the Region entity.

func (*CountryCreate) Exec

func (cc *CountryCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CountryCreate) ExecContext

func (c *CountryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryCreate) ExecX

func (cc *CountryCreate) ExecX(ctx context.Context)

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

func (*CountryCreate) Mutation

func (cc *CountryCreate) Mutation() *CountryMutation

Mutation returns the CountryMutation object of the builder.

func (*CountryCreate) OnConflict

func (cc *CountryCreate) OnConflict(opts ...sql.ConflictOption) *CountryUpsertOne

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

client.Country.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.CountryUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*CountryCreate) OnConflictColumns

func (cc *CountryCreate) OnConflictColumns(columns ...string) *CountryUpsertOne

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

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

func (*CountryCreate) QueryContext

func (c *CountryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryCreate) Save

func (cc *CountryCreate) Save(ctx context.Context) (*Country, error)

Save creates the Country in the database.

func (*CountryCreate) SaveX

func (cc *CountryCreate) SaveX(ctx context.Context) *Country

SaveX calls Save and panics if Save returns an error.

func (*CountryCreate) SetCode

func (cc *CountryCreate) SetCode(s string) *CountryCreate

SetCode sets the "code" field.

func (*CountryCreate) SetCreatedAt

func (cc *CountryCreate) SetCreatedAt(t time.Time) *CountryCreate

SetCreatedAt sets the "created_at" field.

func (*CountryCreate) SetCreatedBy

func (cc *CountryCreate) SetCreatedBy(i int) *CountryCreate

SetCreatedBy sets the "created_by" field.

func (*CountryCreate) SetDisplaySort

func (cc *CountryCreate) SetDisplaySort(i int32) *CountryCreate

SetDisplaySort sets the "display_sort" field.

func (*CountryCreate) SetID

func (cc *CountryCreate) SetID(i int) *CountryCreate

SetID sets the "id" field.

func (*CountryCreate) SetInput

SetInput applies the change-set in the CreateCountryInput on the CountryCreate builder.

func (*CountryCreate) SetName

func (cc *CountryCreate) SetName(s string) *CountryCreate

SetName sets the "name" field.

func (*CountryCreate) SetNameEn

func (cc *CountryCreate) SetNameEn(s string) *CountryCreate

SetNameEn sets the "name_en" field.

func (*CountryCreate) SetNillableCreatedAt

func (cc *CountryCreate) SetNillableCreatedAt(t *time.Time) *CountryCreate

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

func (*CountryCreate) SetNillableDisplaySort

func (cc *CountryCreate) SetNillableDisplaySort(i *int32) *CountryCreate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*CountryCreate) SetNillableName

func (cc *CountryCreate) SetNillableName(s *string) *CountryCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*CountryCreate) SetNillableNameEn

func (cc *CountryCreate) SetNillableNameEn(s *string) *CountryCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CountryCreate) SetNillableStatus

func (cc *CountryCreate) SetNillableStatus(ts *typex.SimpleStatus) *CountryCreate

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

func (*CountryCreate) SetNillableUpdatedAt

func (cc *CountryCreate) SetNillableUpdatedAt(t *time.Time) *CountryCreate

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

func (*CountryCreate) SetNillableUpdatedBy

func (cc *CountryCreate) SetNillableUpdatedBy(i *int) *CountryCreate

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

func (*CountryCreate) SetStatus

func (cc *CountryCreate) SetStatus(ts typex.SimpleStatus) *CountryCreate

SetStatus sets the "status" field.

func (*CountryCreate) SetUpdatedAt

func (cc *CountryCreate) SetUpdatedAt(t time.Time) *CountryCreate

SetUpdatedAt sets the "updated_at" field.

func (*CountryCreate) SetUpdatedBy

func (cc *CountryCreate) SetUpdatedBy(i int) *CountryCreate

SetUpdatedBy sets the "updated_by" field.

type CountryCreateBulk

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

CountryCreateBulk is the builder for creating many Country entities in bulk.

func (*CountryCreateBulk) Exec

func (ccb *CountryCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CountryCreateBulk) ExecContext

func (c *CountryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryCreateBulk) ExecX

func (ccb *CountryCreateBulk) ExecX(ctx context.Context)

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

func (*CountryCreateBulk) OnConflict

func (ccb *CountryCreateBulk) OnConflict(opts ...sql.ConflictOption) *CountryUpsertBulk

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

client.Country.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.CountryUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*CountryCreateBulk) OnConflictColumns

func (ccb *CountryCreateBulk) OnConflictColumns(columns ...string) *CountryUpsertBulk

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

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

func (*CountryCreateBulk) QueryContext

func (c *CountryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryCreateBulk) Save

func (ccb *CountryCreateBulk) Save(ctx context.Context) ([]*Country, error)

Save creates the Country entities in the database.

func (*CountryCreateBulk) SaveX

func (ccb *CountryCreateBulk) SaveX(ctx context.Context) []*Country

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

type CountryDelete

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

CountryDelete is the builder for deleting a Country entity.

func (*CountryDelete) Exec

func (cd *CountryDelete) Exec(ctx context.Context) (int, error)

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

func (*CountryDelete) ExecContext

func (c *CountryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryDelete) ExecX

func (cd *CountryDelete) ExecX(ctx context.Context) int

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

func (*CountryDelete) QueryContext

func (c *CountryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryDelete) Where

func (cd *CountryDelete) Where(ps ...predicate.Country) *CountryDelete

Where appends a list predicates to the CountryDelete builder.

type CountryDeleteOne

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

CountryDeleteOne is the builder for deleting a single Country entity.

func (*CountryDeleteOne) Exec

func (cdo *CountryDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CountryDeleteOne) ExecX

func (cdo *CountryDeleteOne) ExecX(ctx context.Context)

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

func (*CountryDeleteOne) Where

Where appends a list predicates to the CountryDelete builder.

type CountryEdge

type CountryEdge struct {
	Node   *Country `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

CountryEdge is the edge representation of Country.

type CountryEdges

type CountryEdges struct {
	// 地区信息
	Regions []*Region `json:"regions,omitempty"`
	// contains filtered or unexported fields
}

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

func (CountryEdges) RegionsOrErr

func (e CountryEdges) RegionsOrErr() ([]*Region, error)

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

type CountryGroupBy

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

CountryGroupBy is the group-by builder for Country entities.

func (*CountryGroupBy) Aggregate

func (cgb *CountryGroupBy) Aggregate(fns ...AggregateFunc) *CountryGroupBy

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

func (*CountryGroupBy) Bool

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

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

func (*CountryGroupBy) BoolX

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

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

func (*CountryGroupBy) Bools

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

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

func (*CountryGroupBy) BoolsX

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

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

func (*CountryGroupBy) Float64

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

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

func (*CountryGroupBy) Float64X

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

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

func (*CountryGroupBy) Float64s

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

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

func (*CountryGroupBy) Float64sX

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

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

func (*CountryGroupBy) Int

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

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

func (*CountryGroupBy) IntX

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

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

func (*CountryGroupBy) Ints

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

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

func (*CountryGroupBy) IntsX

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

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

func (*CountryGroupBy) Scan

func (cgb *CountryGroupBy) Scan(ctx context.Context, v any) error

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

func (*CountryGroupBy) ScanX

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

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

func (*CountryGroupBy) String

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

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

func (*CountryGroupBy) StringX

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

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

func (*CountryGroupBy) Strings

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

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

func (*CountryGroupBy) StringsX

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

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

type CountryMutation

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

CountryMutation represents an operation that mutates the Country nodes in the graph.

func (*CountryMutation) AddCreatedBy

func (m *CountryMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*CountryMutation) AddDisplaySort

func (m *CountryMutation) AddDisplaySort(i int32)

AddDisplaySort adds i to the "display_sort" field.

func (*CountryMutation) AddField

func (m *CountryMutation) 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 (*CountryMutation) AddRegionIDs

func (m *CountryMutation) AddRegionIDs(ids ...int)

AddRegionIDs adds the "regions" edge to the Region entity by ids.

func (*CountryMutation) AddUpdatedBy

func (m *CountryMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*CountryMutation) AddedCreatedBy

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

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

func (*CountryMutation) AddedDisplaySort

func (m *CountryMutation) AddedDisplaySort() (r int32, exists bool)

AddedDisplaySort returns the value that was added to the "display_sort" field in this mutation.

func (*CountryMutation) AddedEdges

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

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

func (*CountryMutation) AddedField

func (m *CountryMutation) 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 (*CountryMutation) AddedFields

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

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

func (*CountryMutation) AddedIDs

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

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

func (*CountryMutation) AddedUpdatedBy

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

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

func (*CountryMutation) ClearDisplaySort

func (m *CountryMutation) ClearDisplaySort()

ClearDisplaySort clears the value of the "display_sort" field.

func (*CountryMutation) ClearEdge

func (m *CountryMutation) 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 (*CountryMutation) ClearField

func (m *CountryMutation) 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 (*CountryMutation) ClearName

func (m *CountryMutation) ClearName()

ClearName clears the value of the "name" field.

func (*CountryMutation) ClearNameEn

func (m *CountryMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*CountryMutation) ClearRegions

func (m *CountryMutation) ClearRegions()

ClearRegions clears the "regions" edge to the Region entity.

func (*CountryMutation) ClearStatus

func (m *CountryMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*CountryMutation) ClearUpdatedAt

func (m *CountryMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CountryMutation) ClearUpdatedBy

func (m *CountryMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CountryMutation) ClearedEdges

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

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

func (*CountryMutation) ClearedFields

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

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

func (CountryMutation) Client

func (m CountryMutation) 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 (*CountryMutation) Code

func (m *CountryMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*CountryMutation) CreatedAt

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

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

func (*CountryMutation) CreatedBy

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

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

func (*CountryMutation) DisplaySort

func (m *CountryMutation) DisplaySort() (r int32, exists bool)

DisplaySort returns the value of the "display_sort" field in the mutation.

func (*CountryMutation) DisplaySortCleared

func (m *CountryMutation) DisplaySortCleared() bool

DisplaySortCleared returns if the "display_sort" field was cleared in this mutation.

func (*CountryMutation) EdgeCleared

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

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

func (*CountryMutation) ExecContext

func (c *CountryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryMutation) Field

func (m *CountryMutation) 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 (*CountryMutation) FieldCleared

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

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

func (*CountryMutation) Fields

func (m *CountryMutation) 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 (*CountryMutation) ID

func (m *CountryMutation) 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 (*CountryMutation) IDs

func (m *CountryMutation) 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 (*CountryMutation) Name

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

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

func (*CountryMutation) NameCleared

func (m *CountryMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*CountryMutation) NameEn

func (m *CountryMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*CountryMutation) NameEnCleared

func (m *CountryMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*CountryMutation) OldCode

func (m *CountryMutation) OldCode(ctx context.Context) (v string, err error)

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

func (*CountryMutation) OldCreatedAt

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

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

func (*CountryMutation) OldCreatedBy

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

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

func (*CountryMutation) OldDisplaySort

func (m *CountryMutation) OldDisplaySort(ctx context.Context) (v int32, err error)

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

func (*CountryMutation) OldField

func (m *CountryMutation) 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 (*CountryMutation) OldName

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

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

func (*CountryMutation) OldNameEn

func (m *CountryMutation) OldNameEn(ctx context.Context) (v string, err error)

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

func (*CountryMutation) OldStatus

func (m *CountryMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

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

func (*CountryMutation) OldUpdatedAt

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

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

func (*CountryMutation) OldUpdatedBy

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

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

func (*CountryMutation) Op

func (m *CountryMutation) Op() Op

Op returns the operation name.

func (*CountryMutation) QueryContext

func (c *CountryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryMutation) RegionsCleared

func (m *CountryMutation) RegionsCleared() bool

RegionsCleared reports if the "regions" edge to the Region entity was cleared.

func (*CountryMutation) RegionsIDs

func (m *CountryMutation) RegionsIDs() (ids []int)

RegionsIDs returns the "regions" edge IDs in the mutation.

func (*CountryMutation) RemoveRegionIDs

func (m *CountryMutation) RemoveRegionIDs(ids ...int)

RemoveRegionIDs removes the "regions" edge to the Region entity by IDs.

func (*CountryMutation) RemovedEdges

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

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

func (*CountryMutation) RemovedIDs

func (m *CountryMutation) 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 (*CountryMutation) RemovedRegionsIDs

func (m *CountryMutation) RemovedRegionsIDs() (ids []int)

RemovedRegions returns the removed IDs of the "regions" edge to the Region entity.

func (*CountryMutation) ResetCode

func (m *CountryMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*CountryMutation) ResetCreatedAt

func (m *CountryMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CountryMutation) ResetCreatedBy

func (m *CountryMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*CountryMutation) ResetDisplaySort

func (m *CountryMutation) ResetDisplaySort()

ResetDisplaySort resets all changes to the "display_sort" field.

func (*CountryMutation) ResetEdge

func (m *CountryMutation) 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 (*CountryMutation) ResetField

func (m *CountryMutation) 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 (*CountryMutation) ResetName

func (m *CountryMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CountryMutation) ResetNameEn

func (m *CountryMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*CountryMutation) ResetRegions

func (m *CountryMutation) ResetRegions()

ResetRegions resets all changes to the "regions" edge.

func (*CountryMutation) ResetStatus

func (m *CountryMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*CountryMutation) ResetUpdatedAt

func (m *CountryMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CountryMutation) ResetUpdatedBy

func (m *CountryMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*CountryMutation) SetCode

func (m *CountryMutation) SetCode(s string)

SetCode sets the "code" field.

func (*CountryMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*CountryMutation) SetCreatedBy

func (m *CountryMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*CountryMutation) SetDisplaySort

func (m *CountryMutation) SetDisplaySort(i int32)

SetDisplaySort sets the "display_sort" field.

func (*CountryMutation) SetField

func (m *CountryMutation) 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 (*CountryMutation) SetID

func (m *CountryMutation) SetID(id int)

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

func (*CountryMutation) SetName

func (m *CountryMutation) SetName(s string)

SetName sets the "name" field.

func (*CountryMutation) SetNameEn

func (m *CountryMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*CountryMutation) SetOp

func (m *CountryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CountryMutation) SetStatus

func (m *CountryMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*CountryMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CountryMutation) SetUpdatedBy

func (m *CountryMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*CountryMutation) Status

func (m *CountryMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*CountryMutation) StatusCleared

func (m *CountryMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (CountryMutation) Tx

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

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

func (*CountryMutation) Type

func (m *CountryMutation) Type() string

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

func (*CountryMutation) UpdatedAt

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

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

func (*CountryMutation) UpdatedAtCleared

func (m *CountryMutation) UpdatedAtCleared() bool

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

func (*CountryMutation) UpdatedBy

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

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

func (*CountryMutation) UpdatedByCleared

func (m *CountryMutation) UpdatedByCleared() bool

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

func (*CountryMutation) Where

func (m *CountryMutation) Where(ps ...predicate.Country)

Where appends a list predicates to the CountryMutation builder.

func (*CountryMutation) WhereP

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

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

type CountryOrder

type CountryOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *CountryOrderField `json:"field"`
}

CountryOrder defines the ordering of Country.

type CountryOrderField

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

CountryOrderField defines the ordering field of Country.

func (CountryOrderField) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (CountryOrderField) String

func (f CountryOrderField) String() string

String implement fmt.Stringer interface.

func (*CountryOrderField) UnmarshalGQL

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

UnmarshalGQL implements graphql.Unmarshaler interface.

type CountryPaginateOption

type CountryPaginateOption func(*countryPager) error

CountryPaginateOption enables pagination customization.

func WithCountryFilter

func WithCountryFilter(filter func(*CountryQuery) (*CountryQuery, error)) CountryPaginateOption

WithCountryFilter configures pagination filter.

func WithCountryOrder

func WithCountryOrder(order *CountryOrder) CountryPaginateOption

WithCountryOrder configures pagination ordering.

type CountryQuery

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

CountryQuery is the builder for querying Country entities.

func (*CountryQuery) Aggregate

func (cq *CountryQuery) Aggregate(fns ...AggregateFunc) *CountrySelect

Aggregate returns a CountrySelect configured with the given aggregations.

func (*CountryQuery) All

func (cq *CountryQuery) All(ctx context.Context) ([]*Country, error)

All executes the query and returns a list of Countries.

func (*CountryQuery) AllX

func (cq *CountryQuery) AllX(ctx context.Context) []*Country

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

func (*CountryQuery) Clone

func (cq *CountryQuery) Clone() *CountryQuery

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

func (*CountryQuery) CollectFields

func (c *CountryQuery) CollectFields(ctx context.Context, satisfies ...string) (*CountryQuery, error)

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

func (*CountryQuery) Count

func (cq *CountryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CountryQuery) CountX

func (cq *CountryQuery) CountX(ctx context.Context) int

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

func (*CountryQuery) ExecContext

func (c *CountryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryQuery) Exist

func (cq *CountryQuery) Exist(ctx context.Context) (bool, error)

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

func (*CountryQuery) ExistX

func (cq *CountryQuery) ExistX(ctx context.Context) bool

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

func (*CountryQuery) First

func (cq *CountryQuery) First(ctx context.Context) (*Country, error)

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

func (*CountryQuery) FirstID

func (cq *CountryQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CountryQuery) FirstIDX

func (cq *CountryQuery) FirstIDX(ctx context.Context) int

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

func (*CountryQuery) FirstX

func (cq *CountryQuery) FirstX(ctx context.Context) *Country

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

func (*CountryQuery) GroupBy

func (cq *CountryQuery) GroupBy(field string, fields ...string) *CountryGroupBy

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.Country.Query().
	GroupBy(country.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CountryQuery) IDs

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

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

func (*CountryQuery) IDsX

func (cq *CountryQuery) IDsX(ctx context.Context) []int

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

func (*CountryQuery) Limit

func (cq *CountryQuery) Limit(limit int) *CountryQuery

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

func (*CountryQuery) Offset

func (cq *CountryQuery) Offset(offset int) *CountryQuery

Offset to start from.

func (*CountryQuery) Only

func (cq *CountryQuery) Only(ctx context.Context) (*Country, error)

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

func (*CountryQuery) OnlyID

func (cq *CountryQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CountryQuery) OnlyIDX

func (cq *CountryQuery) OnlyIDX(ctx context.Context) int

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

func (*CountryQuery) OnlyX

func (cq *CountryQuery) OnlyX(ctx context.Context) *Country

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

func (*CountryQuery) Order

func (cq *CountryQuery) Order(o ...country.OrderOption) *CountryQuery

Order specifies how the records should be ordered.

func (*CountryQuery) Paginate

func (c *CountryQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CountryPaginateOption,
) (*CountryConnection, error)

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

func (*CountryQuery) QueryContext

func (c *CountryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryQuery) QueryRegions

func (cq *CountryQuery) QueryRegions() *RegionQuery

QueryRegions chains the current query on the "regions" edge.

func (*CountryQuery) Select

func (cq *CountryQuery) Select(fields ...string) *CountrySelect

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.Country.Query().
	Select(country.FieldCreatedBy).
	Scan(ctx, &v)

func (*CountryQuery) Unique

func (cq *CountryQuery) Unique(unique bool) *CountryQuery

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 (*CountryQuery) Where

func (cq *CountryQuery) Where(ps ...predicate.Country) *CountryQuery

Where adds a new predicate for the CountryQuery builder.

func (*CountryQuery) WithNamedRegions

func (cq *CountryQuery) WithNamedRegions(name string, opts ...func(*RegionQuery)) *CountryQuery

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

func (*CountryQuery) WithRegions

func (cq *CountryQuery) WithRegions(opts ...func(*RegionQuery)) *CountryQuery

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

type CountrySelect

type CountrySelect struct {
	*CountryQuery
	// contains filtered or unexported fields
}

CountrySelect is the builder for selecting fields of Country entities.

func (*CountrySelect) Aggregate

func (cs *CountrySelect) Aggregate(fns ...AggregateFunc) *CountrySelect

Aggregate adds the given aggregation functions to the selector query.

func (*CountrySelect) Bool

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

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

func (*CountrySelect) BoolX

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

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

func (*CountrySelect) Bools

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

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

func (*CountrySelect) BoolsX

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

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

func (CountrySelect) ExecContext

func (c CountrySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountrySelect) Float64

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

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

func (*CountrySelect) Float64X

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

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

func (*CountrySelect) Float64s

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

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

func (*CountrySelect) Float64sX

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

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

func (*CountrySelect) Int

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

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

func (*CountrySelect) IntX

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

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

func (*CountrySelect) Ints

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

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

func (*CountrySelect) IntsX

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

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

func (CountrySelect) QueryContext

func (c CountrySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountrySelect) Scan

func (cs *CountrySelect) Scan(ctx context.Context, v any) error

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

func (*CountrySelect) ScanX

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

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

func (*CountrySelect) String

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

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

func (*CountrySelect) StringX

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

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

func (*CountrySelect) Strings

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

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

func (*CountrySelect) StringsX

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

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

type CountryUpdate

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

CountryUpdate is the builder for updating Country entities.

func (*CountryUpdate) AddDisplaySort

func (cu *CountryUpdate) AddDisplaySort(i int32) *CountryUpdate

AddDisplaySort adds i to the "display_sort" field.

func (*CountryUpdate) AddRegionIDs

func (cu *CountryUpdate) AddRegionIDs(ids ...int) *CountryUpdate

AddRegionIDs adds the "regions" edge to the Region entity by IDs.

func (*CountryUpdate) AddRegions

func (cu *CountryUpdate) AddRegions(r ...*Region) *CountryUpdate

AddRegions adds the "regions" edges to the Region entity.

func (*CountryUpdate) AddUpdatedBy

func (cu *CountryUpdate) AddUpdatedBy(i int) *CountryUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*CountryUpdate) ClearDisplaySort

func (cu *CountryUpdate) ClearDisplaySort() *CountryUpdate

ClearDisplaySort clears the value of the "display_sort" field.

func (*CountryUpdate) ClearName

func (cu *CountryUpdate) ClearName() *CountryUpdate

ClearName clears the value of the "name" field.

func (*CountryUpdate) ClearNameEn

func (cu *CountryUpdate) ClearNameEn() *CountryUpdate

ClearNameEn clears the value of the "name_en" field.

func (*CountryUpdate) ClearRegions

func (cu *CountryUpdate) ClearRegions() *CountryUpdate

ClearRegions clears all "regions" edges to the Region entity.

func (*CountryUpdate) ClearStatus

func (cu *CountryUpdate) ClearStatus() *CountryUpdate

ClearStatus clears the value of the "status" field.

func (*CountryUpdate) ClearUpdatedAt

func (cu *CountryUpdate) ClearUpdatedAt() *CountryUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CountryUpdate) ClearUpdatedBy

func (cu *CountryUpdate) ClearUpdatedBy() *CountryUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CountryUpdate) Exec

func (cu *CountryUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CountryUpdate) ExecContext

func (c *CountryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryUpdate) ExecX

func (cu *CountryUpdate) ExecX(ctx context.Context)

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

func (*CountryUpdate) Mutation

func (cu *CountryUpdate) Mutation() *CountryMutation

Mutation returns the CountryMutation object of the builder.

func (*CountryUpdate) QueryContext

func (c *CountryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryUpdate) RemoveRegionIDs

func (cu *CountryUpdate) RemoveRegionIDs(ids ...int) *CountryUpdate

RemoveRegionIDs removes the "regions" edge to Region entities by IDs.

func (*CountryUpdate) RemoveRegions

func (cu *CountryUpdate) RemoveRegions(r ...*Region) *CountryUpdate

RemoveRegions removes "regions" edges to Region entities.

func (*CountryUpdate) Save

func (cu *CountryUpdate) Save(ctx context.Context) (int, error)

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

func (*CountryUpdate) SaveX

func (cu *CountryUpdate) SaveX(ctx context.Context) int

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

func (*CountryUpdate) SetCode

func (cu *CountryUpdate) SetCode(s string) *CountryUpdate

SetCode sets the "code" field.

func (*CountryUpdate) SetDisplaySort

func (cu *CountryUpdate) SetDisplaySort(i int32) *CountryUpdate

SetDisplaySort sets the "display_sort" field.

func (*CountryUpdate) SetInput

SetInput applies the change-set in the UpdateCountryInput on the CountryUpdate builder.

func (*CountryUpdate) SetName

func (cu *CountryUpdate) SetName(s string) *CountryUpdate

SetName sets the "name" field.

func (*CountryUpdate) SetNameEn

func (cu *CountryUpdate) SetNameEn(s string) *CountryUpdate

SetNameEn sets the "name_en" field.

func (*CountryUpdate) SetNillableCode

func (cu *CountryUpdate) SetNillableCode(s *string) *CountryUpdate

SetNillableCode sets the "code" field if the given value is not nil.

func (*CountryUpdate) SetNillableDisplaySort

func (cu *CountryUpdate) SetNillableDisplaySort(i *int32) *CountryUpdate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*CountryUpdate) SetNillableName

func (cu *CountryUpdate) SetNillableName(s *string) *CountryUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*CountryUpdate) SetNillableNameEn

func (cu *CountryUpdate) SetNillableNameEn(s *string) *CountryUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CountryUpdate) SetNillableStatus

func (cu *CountryUpdate) SetNillableStatus(ts *typex.SimpleStatus) *CountryUpdate

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

func (*CountryUpdate) SetNillableUpdatedAt

func (cu *CountryUpdate) SetNillableUpdatedAt(t *time.Time) *CountryUpdate

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

func (*CountryUpdate) SetNillableUpdatedBy

func (cu *CountryUpdate) SetNillableUpdatedBy(i *int) *CountryUpdate

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

func (*CountryUpdate) SetStatus

func (cu *CountryUpdate) SetStatus(ts typex.SimpleStatus) *CountryUpdate

SetStatus sets the "status" field.

func (*CountryUpdate) SetUpdatedAt

func (cu *CountryUpdate) SetUpdatedAt(t time.Time) *CountryUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CountryUpdate) SetUpdatedBy

func (cu *CountryUpdate) SetUpdatedBy(i int) *CountryUpdate

SetUpdatedBy sets the "updated_by" field.

func (*CountryUpdate) Where

func (cu *CountryUpdate) Where(ps ...predicate.Country) *CountryUpdate

Where appends a list predicates to the CountryUpdate builder.

type CountryUpdateOne

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

CountryUpdateOne is the builder for updating a single Country entity.

func (*CountryUpdateOne) AddDisplaySort

func (cuo *CountryUpdateOne) AddDisplaySort(i int32) *CountryUpdateOne

AddDisplaySort adds i to the "display_sort" field.

func (*CountryUpdateOne) AddRegionIDs

func (cuo *CountryUpdateOne) AddRegionIDs(ids ...int) *CountryUpdateOne

AddRegionIDs adds the "regions" edge to the Region entity by IDs.

func (*CountryUpdateOne) AddRegions

func (cuo *CountryUpdateOne) AddRegions(r ...*Region) *CountryUpdateOne

AddRegions adds the "regions" edges to the Region entity.

func (*CountryUpdateOne) AddUpdatedBy

func (cuo *CountryUpdateOne) AddUpdatedBy(i int) *CountryUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*CountryUpdateOne) ClearDisplaySort

func (cuo *CountryUpdateOne) ClearDisplaySort() *CountryUpdateOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*CountryUpdateOne) ClearName

func (cuo *CountryUpdateOne) ClearName() *CountryUpdateOne

ClearName clears the value of the "name" field.

func (*CountryUpdateOne) ClearNameEn

func (cuo *CountryUpdateOne) ClearNameEn() *CountryUpdateOne

ClearNameEn clears the value of the "name_en" field.

func (*CountryUpdateOne) ClearRegions

func (cuo *CountryUpdateOne) ClearRegions() *CountryUpdateOne

ClearRegions clears all "regions" edges to the Region entity.

func (*CountryUpdateOne) ClearStatus

func (cuo *CountryUpdateOne) ClearStatus() *CountryUpdateOne

ClearStatus clears the value of the "status" field.

func (*CountryUpdateOne) ClearUpdatedAt

func (cuo *CountryUpdateOne) ClearUpdatedAt() *CountryUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CountryUpdateOne) ClearUpdatedBy

func (cuo *CountryUpdateOne) ClearUpdatedBy() *CountryUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CountryUpdateOne) Exec

func (cuo *CountryUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CountryUpdateOne) ExecContext

func (c *CountryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CountryUpdateOne) ExecX

func (cuo *CountryUpdateOne) ExecX(ctx context.Context)

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

func (*CountryUpdateOne) Mutation

func (cuo *CountryUpdateOne) Mutation() *CountryMutation

Mutation returns the CountryMutation object of the builder.

func (*CountryUpdateOne) QueryContext

func (c *CountryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CountryUpdateOne) RemoveRegionIDs

func (cuo *CountryUpdateOne) RemoveRegionIDs(ids ...int) *CountryUpdateOne

RemoveRegionIDs removes the "regions" edge to Region entities by IDs.

func (*CountryUpdateOne) RemoveRegions

func (cuo *CountryUpdateOne) RemoveRegions(r ...*Region) *CountryUpdateOne

RemoveRegions removes "regions" edges to Region entities.

func (*CountryUpdateOne) Save

func (cuo *CountryUpdateOne) Save(ctx context.Context) (*Country, error)

Save executes the query and returns the updated Country entity.

func (*CountryUpdateOne) SaveX

func (cuo *CountryUpdateOne) SaveX(ctx context.Context) *Country

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

func (*CountryUpdateOne) Select

func (cuo *CountryUpdateOne) Select(field string, fields ...string) *CountryUpdateOne

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

func (*CountryUpdateOne) SetCode

func (cuo *CountryUpdateOne) SetCode(s string) *CountryUpdateOne

SetCode sets the "code" field.

func (*CountryUpdateOne) SetDisplaySort

func (cuo *CountryUpdateOne) SetDisplaySort(i int32) *CountryUpdateOne

SetDisplaySort sets the "display_sort" field.

func (*CountryUpdateOne) SetInput

SetInput applies the change-set in the UpdateCountryInput on the CountryUpdateOne builder.

func (*CountryUpdateOne) SetName

func (cuo *CountryUpdateOne) SetName(s string) *CountryUpdateOne

SetName sets the "name" field.

func (*CountryUpdateOne) SetNameEn

func (cuo *CountryUpdateOne) SetNameEn(s string) *CountryUpdateOne

SetNameEn sets the "name_en" field.

func (*CountryUpdateOne) SetNillableCode

func (cuo *CountryUpdateOne) SetNillableCode(s *string) *CountryUpdateOne

SetNillableCode sets the "code" field if the given value is not nil.

func (*CountryUpdateOne) SetNillableDisplaySort

func (cuo *CountryUpdateOne) SetNillableDisplaySort(i *int32) *CountryUpdateOne

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*CountryUpdateOne) SetNillableName

func (cuo *CountryUpdateOne) SetNillableName(s *string) *CountryUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*CountryUpdateOne) SetNillableNameEn

func (cuo *CountryUpdateOne) SetNillableNameEn(s *string) *CountryUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CountryUpdateOne) SetNillableStatus

func (cuo *CountryUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *CountryUpdateOne

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

func (*CountryUpdateOne) SetNillableUpdatedAt

func (cuo *CountryUpdateOne) SetNillableUpdatedAt(t *time.Time) *CountryUpdateOne

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

func (*CountryUpdateOne) SetNillableUpdatedBy

func (cuo *CountryUpdateOne) SetNillableUpdatedBy(i *int) *CountryUpdateOne

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

func (*CountryUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*CountryUpdateOne) SetUpdatedAt

func (cuo *CountryUpdateOne) SetUpdatedAt(t time.Time) *CountryUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*CountryUpdateOne) SetUpdatedBy

func (cuo *CountryUpdateOne) SetUpdatedBy(i int) *CountryUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*CountryUpdateOne) Where

Where appends a list predicates to the CountryUpdate builder.

type CountryUpsert

type CountryUpsert struct {
	*sql.UpdateSet
}

CountryUpsert is the "OnConflict" setter.

func (*CountryUpsert) AddDisplaySort

func (u *CountryUpsert) AddDisplaySort(v int32) *CountryUpsert

AddDisplaySort adds v to the "display_sort" field.

func (*CountryUpsert) AddUpdatedBy

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

AddUpdatedBy adds v to the "updated_by" field.

func (*CountryUpsert) ClearDisplaySort

func (u *CountryUpsert) ClearDisplaySort() *CountryUpsert

ClearDisplaySort clears the value of the "display_sort" field.

func (*CountryUpsert) ClearName

func (u *CountryUpsert) ClearName() *CountryUpsert

ClearName clears the value of the "name" field.

func (*CountryUpsert) ClearNameEn

func (u *CountryUpsert) ClearNameEn() *CountryUpsert

ClearNameEn clears the value of the "name_en" field.

func (*CountryUpsert) ClearStatus

func (u *CountryUpsert) ClearStatus() *CountryUpsert

ClearStatus clears the value of the "status" field.

func (*CountryUpsert) ClearUpdatedAt

func (u *CountryUpsert) ClearUpdatedAt() *CountryUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CountryUpsert) ClearUpdatedBy

func (u *CountryUpsert) ClearUpdatedBy() *CountryUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CountryUpsert) SetCode

func (u *CountryUpsert) SetCode(v string) *CountryUpsert

SetCode sets the "code" field.

func (*CountryUpsert) SetDisplaySort

func (u *CountryUpsert) SetDisplaySort(v int32) *CountryUpsert

SetDisplaySort sets the "display_sort" field.

func (*CountryUpsert) SetName

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

SetName sets the "name" field.

func (*CountryUpsert) SetNameEn

func (u *CountryUpsert) SetNameEn(v string) *CountryUpsert

SetNameEn sets the "name_en" field.

func (*CountryUpsert) SetStatus

func (u *CountryUpsert) SetStatus(v typex.SimpleStatus) *CountryUpsert

SetStatus sets the "status" field.

func (*CountryUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CountryUpsert) SetUpdatedBy

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

SetUpdatedBy sets the "updated_by" field.

func (*CountryUpsert) UpdateCode

func (u *CountryUpsert) UpdateCode() *CountryUpsert

UpdateCode sets the "code" field to the value that was provided on create.

func (*CountryUpsert) UpdateDisplaySort

func (u *CountryUpsert) UpdateDisplaySort() *CountryUpsert

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*CountryUpsert) UpdateName

func (u *CountryUpsert) UpdateName() *CountryUpsert

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

func (*CountryUpsert) UpdateNameEn

func (u *CountryUpsert) UpdateNameEn() *CountryUpsert

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*CountryUpsert) UpdateStatus

func (u *CountryUpsert) UpdateStatus() *CountryUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CountryUpsert) UpdateUpdatedAt

func (u *CountryUpsert) UpdateUpdatedAt() *CountryUpsert

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

func (*CountryUpsert) UpdateUpdatedBy

func (u *CountryUpsert) UpdateUpdatedBy() *CountryUpsert

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

type CountryUpsertBulk

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

CountryUpsertBulk is the builder for "upsert"-ing a bulk of Country nodes.

func (*CountryUpsertBulk) AddDisplaySort

func (u *CountryUpsertBulk) AddDisplaySort(v int32) *CountryUpsertBulk

AddDisplaySort adds v to the "display_sort" field.

func (*CountryUpsertBulk) AddUpdatedBy

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

AddUpdatedBy adds v to the "updated_by" field.

func (*CountryUpsertBulk) ClearDisplaySort

func (u *CountryUpsertBulk) ClearDisplaySort() *CountryUpsertBulk

ClearDisplaySort clears the value of the "display_sort" field.

func (*CountryUpsertBulk) ClearName

func (u *CountryUpsertBulk) ClearName() *CountryUpsertBulk

ClearName clears the value of the "name" field.

func (*CountryUpsertBulk) ClearNameEn

func (u *CountryUpsertBulk) ClearNameEn() *CountryUpsertBulk

ClearNameEn clears the value of the "name_en" field.

func (*CountryUpsertBulk) ClearStatus

func (u *CountryUpsertBulk) ClearStatus() *CountryUpsertBulk

ClearStatus clears the value of the "status" field.

func (*CountryUpsertBulk) ClearUpdatedAt

func (u *CountryUpsertBulk) ClearUpdatedAt() *CountryUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CountryUpsertBulk) ClearUpdatedBy

func (u *CountryUpsertBulk) ClearUpdatedBy() *CountryUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CountryUpsertBulk) DoNothing

func (u *CountryUpsertBulk) DoNothing() *CountryUpsertBulk

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

func (*CountryUpsertBulk) Exec

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

Exec executes the query.

func (*CountryUpsertBulk) ExecX

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

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

func (*CountryUpsertBulk) Ignore

func (u *CountryUpsertBulk) Ignore() *CountryUpsertBulk

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

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

func (*CountryUpsertBulk) SetCode

SetCode sets the "code" field.

func (*CountryUpsertBulk) SetDisplaySort

func (u *CountryUpsertBulk) SetDisplaySort(v int32) *CountryUpsertBulk

SetDisplaySort sets the "display_sort" field.

func (*CountryUpsertBulk) SetName

SetName sets the "name" field.

func (*CountryUpsertBulk) SetNameEn

func (u *CountryUpsertBulk) SetNameEn(v string) *CountryUpsertBulk

SetNameEn sets the "name_en" field.

func (*CountryUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*CountryUpsertBulk) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CountryUpsertBulk) SetUpdatedBy

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

SetUpdatedBy sets the "updated_by" field.

func (*CountryUpsertBulk) Update

func (u *CountryUpsertBulk) Update(set func(*CountryUpsert)) *CountryUpsertBulk

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

func (*CountryUpsertBulk) UpdateCode

func (u *CountryUpsertBulk) UpdateCode() *CountryUpsertBulk

UpdateCode sets the "code" field to the value that was provided on create.

func (*CountryUpsertBulk) UpdateDisplaySort

func (u *CountryUpsertBulk) UpdateDisplaySort() *CountryUpsertBulk

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*CountryUpsertBulk) UpdateName

func (u *CountryUpsertBulk) UpdateName() *CountryUpsertBulk

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

func (*CountryUpsertBulk) UpdateNameEn

func (u *CountryUpsertBulk) UpdateNameEn() *CountryUpsertBulk

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*CountryUpsertBulk) UpdateNewValues

func (u *CountryUpsertBulk) UpdateNewValues() *CountryUpsertBulk

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

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

func (*CountryUpsertBulk) UpdateStatus

func (u *CountryUpsertBulk) UpdateStatus() *CountryUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CountryUpsertBulk) UpdateUpdatedAt

func (u *CountryUpsertBulk) UpdateUpdatedAt() *CountryUpsertBulk

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

func (*CountryUpsertBulk) UpdateUpdatedBy

func (u *CountryUpsertBulk) UpdateUpdatedBy() *CountryUpsertBulk

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

type CountryUpsertOne

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

CountryUpsertOne is the builder for "upsert"-ing

one Country node.

func (*CountryUpsertOne) AddDisplaySort

func (u *CountryUpsertOne) AddDisplaySort(v int32) *CountryUpsertOne

AddDisplaySort adds v to the "display_sort" field.

func (*CountryUpsertOne) AddUpdatedBy

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

AddUpdatedBy adds v to the "updated_by" field.

func (*CountryUpsertOne) ClearDisplaySort

func (u *CountryUpsertOne) ClearDisplaySort() *CountryUpsertOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*CountryUpsertOne) ClearName

func (u *CountryUpsertOne) ClearName() *CountryUpsertOne

ClearName clears the value of the "name" field.

func (*CountryUpsertOne) ClearNameEn

func (u *CountryUpsertOne) ClearNameEn() *CountryUpsertOne

ClearNameEn clears the value of the "name_en" field.

func (*CountryUpsertOne) ClearStatus

func (u *CountryUpsertOne) ClearStatus() *CountryUpsertOne

ClearStatus clears the value of the "status" field.

func (*CountryUpsertOne) ClearUpdatedAt

func (u *CountryUpsertOne) ClearUpdatedAt() *CountryUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CountryUpsertOne) ClearUpdatedBy

func (u *CountryUpsertOne) ClearUpdatedBy() *CountryUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CountryUpsertOne) DoNothing

func (u *CountryUpsertOne) DoNothing() *CountryUpsertOne

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

func (*CountryUpsertOne) Exec

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

Exec executes the query.

func (*CountryUpsertOne) ExecX

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

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

func (*CountryUpsertOne) ID

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

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

func (*CountryUpsertOne) IDX

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

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

func (*CountryUpsertOne) Ignore

func (u *CountryUpsertOne) Ignore() *CountryUpsertOne

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

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

func (*CountryUpsertOne) SetCode

func (u *CountryUpsertOne) SetCode(v string) *CountryUpsertOne

SetCode sets the "code" field.

func (*CountryUpsertOne) SetDisplaySort

func (u *CountryUpsertOne) SetDisplaySort(v int32) *CountryUpsertOne

SetDisplaySort sets the "display_sort" field.

func (*CountryUpsertOne) SetName

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

SetName sets the "name" field.

func (*CountryUpsertOne) SetNameEn

func (u *CountryUpsertOne) SetNameEn(v string) *CountryUpsertOne

SetNameEn sets the "name_en" field.

func (*CountryUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*CountryUpsertOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CountryUpsertOne) SetUpdatedBy

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

SetUpdatedBy sets the "updated_by" field.

func (*CountryUpsertOne) Update

func (u *CountryUpsertOne) Update(set func(*CountryUpsert)) *CountryUpsertOne

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

func (*CountryUpsertOne) UpdateCode

func (u *CountryUpsertOne) UpdateCode() *CountryUpsertOne

UpdateCode sets the "code" field to the value that was provided on create.

func (*CountryUpsertOne) UpdateDisplaySort

func (u *CountryUpsertOne) UpdateDisplaySort() *CountryUpsertOne

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*CountryUpsertOne) UpdateName

func (u *CountryUpsertOne) UpdateName() *CountryUpsertOne

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

func (*CountryUpsertOne) UpdateNameEn

func (u *CountryUpsertOne) UpdateNameEn() *CountryUpsertOne

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*CountryUpsertOne) UpdateNewValues

func (u *CountryUpsertOne) UpdateNewValues() *CountryUpsertOne

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.Country.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(country.FieldID)
		}),
	).
	Exec(ctx)

func (*CountryUpsertOne) UpdateStatus

func (u *CountryUpsertOne) UpdateStatus() *CountryUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CountryUpsertOne) UpdateUpdatedAt

func (u *CountryUpsertOne) UpdateUpdatedAt() *CountryUpsertOne

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

func (*CountryUpsertOne) UpdateUpdatedBy

func (u *CountryUpsertOne) UpdateUpdatedBy() *CountryUpsertOne

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

type CountryWhereInput

type CountryWhereInput struct {
	Predicates []predicate.Country  `json:"-"`
	Not        *CountryWhereInput   `json:"not,omitempty"`
	Or         []*CountryWhereInput `json:"or,omitempty"`
	And        []*CountryWhereInput `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"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,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"`

	// "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"`

	// "regions" edge predicates.
	HasRegions     *bool               `json:"hasRegions,omitempty"`
	HasRegionsWith []*RegionWhereInput `json:"hasRegionsWith,omitempty"`
}

CountryWhereInput represents a where input for filtering Country queries.

func (*CountryWhereInput) AddPredicates

func (i *CountryWhereInput) AddPredicates(predicates ...predicate.Country)

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

func (*CountryWhereInput) Filter

Filter applies the CountryWhereInput filter on the CountryQuery builder.

func (*CountryWhereInput) P

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

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
	Comments             *string
	Status               *typex.SimpleStatus
	MenuIDs              []int
	ActionIDs            []int
	ResourceIDs          []int
	RoleIDs              []int
	PolicyIDs            []int
	PolicyViewIDs        []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 {
	Kind     appmenu.Kind
	Name     string
	Icon     *string
	Route    *string
	Comments *string
	Status   *typex.SimpleStatus
	AppID    *int
	ActionID *int
	ParentID int
	ChildIDs []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 {
	Kind          *apppolicy.Kind
	Name          string
	Comments      *string
	Rules         []*types.PolicyRule
	AutoGrant     *bool
	Status        *typex.SimpleStatus
	AppID         *int
	RoleIDs       []int
	OrgPolicyIDs  []int
	PolicyViewIDs []int
}

CreateAppPolicyInput represents a mutation input for creating apppolicies.

func (*CreateAppPolicyInput) Mutate

Mutate applies the CreateAppPolicyInput on the AppPolicyMutation builder.

type CreateAppPolicyViewInput

type CreateAppPolicyViewInput struct {
	Kind        apppolicyview.Kind
	Name        string
	Comments    *string
	AppID       *int
	AppPolicyID *int
	ParentID    int
	ChildIDs    []int
}

CreateAppPolicyViewInput represents a mutation input for creating apppolicyviews.

func (*CreateAppPolicyViewInput) Mutate

Mutate applies the CreateAppPolicyViewInput on the AppPolicyViewMutation 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 CreateCountryInput

type CreateCountryInput struct {
	Name      *string
	NameEn    *string
	Code      string
	Status    *typex.SimpleStatus
	RegionIDs []int
}

CreateCountryInput represents a mutation input for creating countries.

func (*CreateCountryInput) Mutate

func (i *CreateCountryInput) Mutate(m *CountryMutation)

Mutate applies the CreateCountryInput on the CountryMutation builder.

type CreateCurrencyInput

type CreateCurrencyInput struct {
	Code   string
	Name   string
	Sign   *string
	Status *typex.SimpleStatus
}

CreateCurrencyInput represents a mutation input for creating currencies.

func (*CreateCurrencyInput) Mutate

func (i *CreateCurrencyInput) Mutate(m *CurrencyMutation)

Mutate applies the CreateCurrencyInput on the CurrencyMutation builder.

type CreateFileIdentityInput

type CreateFileIdentityInput struct {
	AccessKeyID     string
	AccessKeySecret string
	RoleArn         string
	Policy          *string
	DurationSeconds *int
	Comments        *string
	SourceID        int
	OrgID           int
}

CreateFileIdentityInput represents a mutation input for creating fileidentities.

func (*CreateFileIdentityInput) Mutate

Mutate applies the CreateFileIdentityInput on the FileIdentityMutation builder.

type CreateFileSourceInput

type CreateFileSourceInput struct {
	Kind              filesource.Kind
	Comments          *string
	Endpoint          string
	EndpointImmutable *bool
	StsEndpoint       string
	Region            string
	Bucket            string
	BucketURL         string
	IdentityIDs       []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
	CustomDomain         []string
	Name                 string
	Profile              *string
	Status               *typex.SimpleStatus
	CountryCode          *string
	Timezone             *string
	LocalCurrency        *string
	ParentID             int
	ChildIDs             []int
	OwnerID              *int
	UserIDs              []int
	RolesAndGroupIDs     []int
	PermissionIDs        []int
	PolicyIDs            []int
	AppIDs               []int
	FileIdentityIDs      []int
	UserPasswordPolicyID *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 {
	Name          string
	Comments      *string
	Rules         []*types.PolicyRule
	OrgID         *int
	PermissionIDs []int
	AppPolicyID   *int
	AppID         *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
	UserType    *orguser.UserType
	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
	ClientPreferences []types.ClientPreference
}

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 CreateQuotaInput

type CreateQuotaInput struct {
	Limit       int64
	StartAt     *time.Time
	EndAt       *time.Time
	QuotaItemID int
	QuotaOrgID  *int
	QuotaUserID *int
}

CreateQuotaInput represents a mutation input for creating quotaslice.

func (*CreateQuotaInput) Mutate

func (i *CreateQuotaInput) Mutate(m *QuotaMutation)

Mutate applies the CreateQuotaInput on the QuotaMutation builder.

type CreateQuotaItemInput

type CreateQuotaItemInput struct {
	Code         string
	Name         string
	Description  *string
	ResourceType quotaitem.ResourceType
	Unit         *string
	Active       *bool
	DefaultLimit *int64
	QuotumIDs    []int
}

CreateQuotaItemInput represents a mutation input for creating quotaitems.

func (*CreateQuotaItemInput) Mutate

Mutate applies the CreateQuotaItemInput on the QuotaItemMutation builder.

type CreateRegionInput

type CreateRegionInput struct {
	Name      *string
	NameEn    *string
	ShortCode *string
	ZipCode   *string
	Status    *typex.SimpleStatus
	ParentID  *int
	ChildIDs  []int
	CountryID *int
}

CreateRegionInput represents a mutation input for creating regions.

func (*CreateRegionInput) Mutate

func (i *CreateRegionInput) Mutate(m *RegionMutation)

Mutate applies the CreateRegionInput on the RegionMutation builder.

type CreateUserAddrInput

type CreateUserAddrInput struct {
	Addr      *string
	Email     *string
	Fax       *string
	ZipCode   *string
	Tel       *string
	Mobile    *string
	Name      *string
	IsDefault *bool
	UserID    *int
	RegionID  *int
}

CreateUserAddrInput represents a mutation input for creating useraddrs.

func (*CreateUserAddrInput) Mutate

func (i *CreateUserAddrInput) Mutate(m *UserAddrMutation)

Mutate applies the CreateUserAddrInput on the UserAddrMutation builder.

type CreateUserDeviceInput

type CreateUserDeviceInput struct {
	DeviceUID     string
	DeviceName    *string
	SystemName    *string
	SystemVersion *string
	AppVersion    *string
	DeviceModel   *string
	Status        *typex.SimpleStatus
	Comments      *string
	UserID        *int
}

CreateUserDeviceInput represents a mutation input for creating userdevices.

func (*CreateUserDeviceInput) Mutate

Mutate applies the CreateUserDeviceInput on the UserDeviceMutation 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
	Status         *types.UserStatus
	Comments       *string
	Avatar         *string
	Gender         *user.Gender
	FirstName      *string
	MiddleName     *string
	LastName       *string
	Lang           *string
	IdentityIDs    []int
	LoginProfileID *int
	PasswordIDs    []int
	DeviceIDs      []int
	OauthClientIDs []int
	AddressIDs     []int
	CitizenshipID  *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 CreateUserPasswordPolicyInput

type CreateUserPasswordPolicyInput struct {
	Length               *int32
	IncludeElement       *int32
	IncludeChar          *int32
	AllowIncludeUserName *bool
	InvalidDay           *int32
	InvalidLoginLimit    *bool
	Retry                *int32
	CaptchaTimes         *int32
	OrgID                *int
}

CreateUserPasswordPolicyInput represents a mutation input for creating userpasswordpolicies.

func (*CreateUserPasswordPolicyInput) Mutate

Mutate applies the CreateUserPasswordPolicyInput on the UserPasswordPolicyMutation builder.

type Currencies

type Currencies []*Currency

Currencies is a parsable slice of Currency.

type Currency

type Currency 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"`
	// 代码
	Code string `json:"code,omitempty"`
	// 中文名称
	Name string `json:"name,omitempty"`
	// 货币符号
	Sign string `json:"sign,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// contains filtered or unexported fields
}

Currency is the model entity for the Currency schema.

func (*Currency) ExecContext

func (c *Currency) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Currency) GlobalID

func (c *Currency) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Currency node.

func (*Currency) IsNode

func (*Currency) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Currency) QueryContext

func (c *Currency) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Currency) String

func (c *Currency) String() string

String implements the fmt.Stringer.

func (*Currency) ToEdge

func (c *Currency) ToEdge(order *CurrencyOrder) *CurrencyEdge

ToEdge converts Currency into CurrencyEdge.

func (*Currency) Unwrap

func (c *Currency) Unwrap() *Currency

Unwrap unwraps the Currency 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 (*Currency) Update

func (c *Currency) Update() *CurrencyUpdateOne

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

func (*Currency) Value

func (c *Currency) Value(name string) (ent.Value, error)

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

type CurrencyClient

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

CurrencyClient is a client for the Currency schema.

func NewCurrencyClient

func NewCurrencyClient(c config) *CurrencyClient

NewCurrencyClient returns a client for the Currency from the given config.

func (*CurrencyClient) Create

func (c *CurrencyClient) Create() *CurrencyCreate

Create returns a builder for creating a Currency entity.

func (*CurrencyClient) CreateBulk

func (c *CurrencyClient) CreateBulk(builders ...*CurrencyCreate) *CurrencyCreateBulk

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

func (*CurrencyClient) Delete

func (c *CurrencyClient) Delete() *CurrencyDelete

Delete returns a delete builder for Currency.

func (*CurrencyClient) DeleteOne

func (c *CurrencyClient) DeleteOne(cu *Currency) *CurrencyDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CurrencyClient) DeleteOneID

func (c *CurrencyClient) DeleteOneID(id int) *CurrencyDeleteOne

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

func (*CurrencyClient) ExecContext

func (c *CurrencyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyClient) Get

func (c *CurrencyClient) Get(ctx context.Context, id int) (*Currency, error)

Get returns a Currency entity by its id.

func (*CurrencyClient) GetX

func (c *CurrencyClient) GetX(ctx context.Context, id int) *Currency

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

func (*CurrencyClient) Hooks

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

Hooks returns the client hooks.

func (*CurrencyClient) Intercept

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

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

func (*CurrencyClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CurrencyClient) MapCreateBulk

func (c *CurrencyClient) MapCreateBulk(slice any, setFunc func(*CurrencyCreate, int)) *CurrencyCreateBulk

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 (*CurrencyClient) Query

func (c *CurrencyClient) Query() *CurrencyQuery

Query returns a query builder for Currency.

func (*CurrencyClient) QueryContext

func (c *CurrencyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyClient) Update

func (c *CurrencyClient) Update() *CurrencyUpdate

Update returns an update builder for Currency.

func (*CurrencyClient) UpdateOne

func (c *CurrencyClient) UpdateOne(cu *Currency) *CurrencyUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CurrencyClient) UpdateOneID

func (c *CurrencyClient) UpdateOneID(id int) *CurrencyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CurrencyClient) Use

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

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

type CurrencyConnection

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

CurrencyConnection is the connection containing edges to Currency.

type CurrencyCreate

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

CurrencyCreate is the builder for creating a Currency entity.

func (*CurrencyCreate) Exec

func (cc *CurrencyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CurrencyCreate) ExecContext

func (c *CurrencyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyCreate) ExecX

func (cc *CurrencyCreate) ExecX(ctx context.Context)

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

func (*CurrencyCreate) Mutation

func (cc *CurrencyCreate) Mutation() *CurrencyMutation

Mutation returns the CurrencyMutation object of the builder.

func (*CurrencyCreate) OnConflict

func (cc *CurrencyCreate) OnConflict(opts ...sql.ConflictOption) *CurrencyUpsertOne

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

client.Currency.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.CurrencyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*CurrencyCreate) OnConflictColumns

func (cc *CurrencyCreate) OnConflictColumns(columns ...string) *CurrencyUpsertOne

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

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

func (*CurrencyCreate) QueryContext

func (c *CurrencyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyCreate) Save

func (cc *CurrencyCreate) Save(ctx context.Context) (*Currency, error)

Save creates the Currency in the database.

func (*CurrencyCreate) SaveX

func (cc *CurrencyCreate) SaveX(ctx context.Context) *Currency

SaveX calls Save and panics if Save returns an error.

func (*CurrencyCreate) SetCode

func (cc *CurrencyCreate) SetCode(s string) *CurrencyCreate

SetCode sets the "code" field.

func (*CurrencyCreate) SetCreatedAt

func (cc *CurrencyCreate) SetCreatedAt(t time.Time) *CurrencyCreate

SetCreatedAt sets the "created_at" field.

func (*CurrencyCreate) SetCreatedBy

func (cc *CurrencyCreate) SetCreatedBy(i int) *CurrencyCreate

SetCreatedBy sets the "created_by" field.

func (*CurrencyCreate) SetID

func (cc *CurrencyCreate) SetID(i int) *CurrencyCreate

SetID sets the "id" field.

func (*CurrencyCreate) SetInput

SetInput applies the change-set in the CreateCurrencyInput on the CurrencyCreate builder.

func (*CurrencyCreate) SetName

func (cc *CurrencyCreate) SetName(s string) *CurrencyCreate

SetName sets the "name" field.

func (*CurrencyCreate) SetNillableCreatedAt

func (cc *CurrencyCreate) SetNillableCreatedAt(t *time.Time) *CurrencyCreate

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

func (*CurrencyCreate) SetNillableSign

func (cc *CurrencyCreate) SetNillableSign(s *string) *CurrencyCreate

SetNillableSign sets the "sign" field if the given value is not nil.

func (*CurrencyCreate) SetNillableStatus

func (cc *CurrencyCreate) SetNillableStatus(ts *typex.SimpleStatus) *CurrencyCreate

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

func (*CurrencyCreate) SetNillableUpdatedAt

func (cc *CurrencyCreate) SetNillableUpdatedAt(t *time.Time) *CurrencyCreate

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

func (*CurrencyCreate) SetNillableUpdatedBy

func (cc *CurrencyCreate) SetNillableUpdatedBy(i *int) *CurrencyCreate

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

func (*CurrencyCreate) SetSign

func (cc *CurrencyCreate) SetSign(s string) *CurrencyCreate

SetSign sets the "sign" field.

func (*CurrencyCreate) SetStatus

func (cc *CurrencyCreate) SetStatus(ts typex.SimpleStatus) *CurrencyCreate

SetStatus sets the "status" field.

func (*CurrencyCreate) SetUpdatedAt

func (cc *CurrencyCreate) SetUpdatedAt(t time.Time) *CurrencyCreate

SetUpdatedAt sets the "updated_at" field.

func (*CurrencyCreate) SetUpdatedBy

func (cc *CurrencyCreate) SetUpdatedBy(i int) *CurrencyCreate

SetUpdatedBy sets the "updated_by" field.

type CurrencyCreateBulk

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

CurrencyCreateBulk is the builder for creating many Currency entities in bulk.

func (*CurrencyCreateBulk) Exec

func (ccb *CurrencyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CurrencyCreateBulk) ExecContext

func (c *CurrencyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyCreateBulk) ExecX

func (ccb *CurrencyCreateBulk) ExecX(ctx context.Context)

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

func (*CurrencyCreateBulk) OnConflict

func (ccb *CurrencyCreateBulk) OnConflict(opts ...sql.ConflictOption) *CurrencyUpsertBulk

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

client.Currency.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.CurrencyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*CurrencyCreateBulk) OnConflictColumns

func (ccb *CurrencyCreateBulk) OnConflictColumns(columns ...string) *CurrencyUpsertBulk

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

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

func (*CurrencyCreateBulk) QueryContext

func (c *CurrencyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyCreateBulk) Save

func (ccb *CurrencyCreateBulk) Save(ctx context.Context) ([]*Currency, error)

Save creates the Currency entities in the database.

func (*CurrencyCreateBulk) SaveX

func (ccb *CurrencyCreateBulk) SaveX(ctx context.Context) []*Currency

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

type CurrencyDelete

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

CurrencyDelete is the builder for deleting a Currency entity.

func (*CurrencyDelete) Exec

func (cd *CurrencyDelete) Exec(ctx context.Context) (int, error)

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

func (*CurrencyDelete) ExecContext

func (c *CurrencyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyDelete) ExecX

func (cd *CurrencyDelete) ExecX(ctx context.Context) int

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

func (*CurrencyDelete) QueryContext

func (c *CurrencyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyDelete) Where

func (cd *CurrencyDelete) Where(ps ...predicate.Currency) *CurrencyDelete

Where appends a list predicates to the CurrencyDelete builder.

type CurrencyDeleteOne

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

CurrencyDeleteOne is the builder for deleting a single Currency entity.

func (*CurrencyDeleteOne) Exec

func (cdo *CurrencyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CurrencyDeleteOne) ExecX

func (cdo *CurrencyDeleteOne) ExecX(ctx context.Context)

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

func (*CurrencyDeleteOne) Where

Where appends a list predicates to the CurrencyDelete builder.

type CurrencyEdge

type CurrencyEdge struct {
	Node   *Currency `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

CurrencyEdge is the edge representation of Currency.

type CurrencyGroupBy

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

CurrencyGroupBy is the group-by builder for Currency entities.

func (*CurrencyGroupBy) Aggregate

func (cgb *CurrencyGroupBy) Aggregate(fns ...AggregateFunc) *CurrencyGroupBy

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

func (*CurrencyGroupBy) Bool

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

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

func (*CurrencyGroupBy) BoolX

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

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

func (*CurrencyGroupBy) Bools

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

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

func (*CurrencyGroupBy) BoolsX

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

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

func (*CurrencyGroupBy) Float64

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

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

func (*CurrencyGroupBy) Float64X

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

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

func (*CurrencyGroupBy) Float64s

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

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

func (*CurrencyGroupBy) Float64sX

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

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

func (*CurrencyGroupBy) Int

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

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

func (*CurrencyGroupBy) IntX

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

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

func (*CurrencyGroupBy) Ints

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

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

func (*CurrencyGroupBy) IntsX

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

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

func (*CurrencyGroupBy) Scan

func (cgb *CurrencyGroupBy) Scan(ctx context.Context, v any) error

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

func (*CurrencyGroupBy) ScanX

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

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

func (*CurrencyGroupBy) String

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

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

func (*CurrencyGroupBy) StringX

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

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

func (*CurrencyGroupBy) Strings

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

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

func (*CurrencyGroupBy) StringsX

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

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

type CurrencyMutation

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

CurrencyMutation represents an operation that mutates the Currency nodes in the graph.

func (*CurrencyMutation) AddCreatedBy

func (m *CurrencyMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*CurrencyMutation) AddField

func (m *CurrencyMutation) 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 (*CurrencyMutation) AddUpdatedBy

func (m *CurrencyMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*CurrencyMutation) AddedCreatedBy

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

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

func (*CurrencyMutation) AddedEdges

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

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

func (*CurrencyMutation) AddedField

func (m *CurrencyMutation) 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 (*CurrencyMutation) AddedFields

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

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

func (*CurrencyMutation) AddedIDs

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

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

func (*CurrencyMutation) AddedUpdatedBy

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

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

func (*CurrencyMutation) ClearEdge

func (m *CurrencyMutation) 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 (*CurrencyMutation) ClearField

func (m *CurrencyMutation) 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 (*CurrencyMutation) ClearSign

func (m *CurrencyMutation) ClearSign()

ClearSign clears the value of the "sign" field.

func (*CurrencyMutation) ClearUpdatedAt

func (m *CurrencyMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CurrencyMutation) ClearUpdatedBy

func (m *CurrencyMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CurrencyMutation) ClearedEdges

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

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

func (*CurrencyMutation) ClearedFields

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

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

func (CurrencyMutation) Client

func (m CurrencyMutation) 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 (*CurrencyMutation) Code

func (m *CurrencyMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*CurrencyMutation) CreatedAt

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

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

func (*CurrencyMutation) CreatedBy

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

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

func (*CurrencyMutation) EdgeCleared

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

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

func (*CurrencyMutation) ExecContext

func (c *CurrencyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyMutation) Field

func (m *CurrencyMutation) 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 (*CurrencyMutation) FieldCleared

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

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

func (*CurrencyMutation) Fields

func (m *CurrencyMutation) 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 (*CurrencyMutation) ID

func (m *CurrencyMutation) 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 (*CurrencyMutation) IDs

func (m *CurrencyMutation) 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 (*CurrencyMutation) Name

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

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

func (*CurrencyMutation) OldCode

func (m *CurrencyMutation) OldCode(ctx context.Context) (v string, err error)

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

func (*CurrencyMutation) OldCreatedAt

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

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

func (*CurrencyMutation) OldCreatedBy

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

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

func (*CurrencyMutation) OldField

func (m *CurrencyMutation) 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 (*CurrencyMutation) OldName

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

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

func (*CurrencyMutation) OldSign

func (m *CurrencyMutation) OldSign(ctx context.Context) (v string, err error)

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

func (*CurrencyMutation) OldStatus

func (m *CurrencyMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

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

func (*CurrencyMutation) OldUpdatedAt

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

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

func (*CurrencyMutation) OldUpdatedBy

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

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

func (*CurrencyMutation) Op

func (m *CurrencyMutation) Op() Op

Op returns the operation name.

func (*CurrencyMutation) QueryContext

func (c *CurrencyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyMutation) RemovedEdges

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

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

func (*CurrencyMutation) RemovedIDs

func (m *CurrencyMutation) 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 (*CurrencyMutation) ResetCode

func (m *CurrencyMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*CurrencyMutation) ResetCreatedAt

func (m *CurrencyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CurrencyMutation) ResetCreatedBy

func (m *CurrencyMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*CurrencyMutation) ResetEdge

func (m *CurrencyMutation) 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 (*CurrencyMutation) ResetField

func (m *CurrencyMutation) 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 (*CurrencyMutation) ResetName

func (m *CurrencyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CurrencyMutation) ResetSign

func (m *CurrencyMutation) ResetSign()

ResetSign resets all changes to the "sign" field.

func (*CurrencyMutation) ResetStatus

func (m *CurrencyMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*CurrencyMutation) ResetUpdatedAt

func (m *CurrencyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CurrencyMutation) ResetUpdatedBy

func (m *CurrencyMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*CurrencyMutation) SetCode

func (m *CurrencyMutation) SetCode(s string)

SetCode sets the "code" field.

func (*CurrencyMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*CurrencyMutation) SetCreatedBy

func (m *CurrencyMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*CurrencyMutation) SetField

func (m *CurrencyMutation) 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 (*CurrencyMutation) SetID

func (m *CurrencyMutation) SetID(id int)

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

func (*CurrencyMutation) SetName

func (m *CurrencyMutation) SetName(s string)

SetName sets the "name" field.

func (*CurrencyMutation) SetOp

func (m *CurrencyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CurrencyMutation) SetSign

func (m *CurrencyMutation) SetSign(s string)

SetSign sets the "sign" field.

func (*CurrencyMutation) SetStatus

func (m *CurrencyMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*CurrencyMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CurrencyMutation) SetUpdatedBy

func (m *CurrencyMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*CurrencyMutation) Sign

func (m *CurrencyMutation) Sign() (r string, exists bool)

Sign returns the value of the "sign" field in the mutation.

func (*CurrencyMutation) SignCleared

func (m *CurrencyMutation) SignCleared() bool

SignCleared returns if the "sign" field was cleared in this mutation.

func (*CurrencyMutation) Status

func (m *CurrencyMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (CurrencyMutation) Tx

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

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

func (*CurrencyMutation) Type

func (m *CurrencyMutation) Type() string

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

func (*CurrencyMutation) UpdatedAt

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

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

func (*CurrencyMutation) UpdatedAtCleared

func (m *CurrencyMutation) UpdatedAtCleared() bool

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

func (*CurrencyMutation) UpdatedBy

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

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

func (*CurrencyMutation) UpdatedByCleared

func (m *CurrencyMutation) UpdatedByCleared() bool

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

func (*CurrencyMutation) Where

func (m *CurrencyMutation) Where(ps ...predicate.Currency)

Where appends a list predicates to the CurrencyMutation builder.

func (*CurrencyMutation) WhereP

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

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

type CurrencyOrder

type CurrencyOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *CurrencyOrderField `json:"field"`
}

CurrencyOrder defines the ordering of Currency.

type CurrencyOrderField

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

CurrencyOrderField defines the ordering field of Currency.

func (CurrencyOrderField) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (CurrencyOrderField) String

func (f CurrencyOrderField) String() string

String implement fmt.Stringer interface.

func (*CurrencyOrderField) UnmarshalGQL

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

UnmarshalGQL implements graphql.Unmarshaler interface.

type CurrencyPaginateOption

type CurrencyPaginateOption func(*currencyPager) error

CurrencyPaginateOption enables pagination customization.

func WithCurrencyFilter

func WithCurrencyFilter(filter func(*CurrencyQuery) (*CurrencyQuery, error)) CurrencyPaginateOption

WithCurrencyFilter configures pagination filter.

func WithCurrencyOrder

func WithCurrencyOrder(order *CurrencyOrder) CurrencyPaginateOption

WithCurrencyOrder configures pagination ordering.

type CurrencyQuery

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

CurrencyQuery is the builder for querying Currency entities.

func (*CurrencyQuery) Aggregate

func (cq *CurrencyQuery) Aggregate(fns ...AggregateFunc) *CurrencySelect

Aggregate returns a CurrencySelect configured with the given aggregations.

func (*CurrencyQuery) All

func (cq *CurrencyQuery) All(ctx context.Context) ([]*Currency, error)

All executes the query and returns a list of Currencies.

func (*CurrencyQuery) AllX

func (cq *CurrencyQuery) AllX(ctx context.Context) []*Currency

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

func (*CurrencyQuery) Clone

func (cq *CurrencyQuery) Clone() *CurrencyQuery

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

func (*CurrencyQuery) CollectFields

func (c *CurrencyQuery) CollectFields(ctx context.Context, satisfies ...string) (*CurrencyQuery, error)

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

func (*CurrencyQuery) Count

func (cq *CurrencyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CurrencyQuery) CountX

func (cq *CurrencyQuery) CountX(ctx context.Context) int

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

func (*CurrencyQuery) ExecContext

func (c *CurrencyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyQuery) Exist

func (cq *CurrencyQuery) Exist(ctx context.Context) (bool, error)

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

func (*CurrencyQuery) ExistX

func (cq *CurrencyQuery) ExistX(ctx context.Context) bool

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

func (*CurrencyQuery) First

func (cq *CurrencyQuery) First(ctx context.Context) (*Currency, error)

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

func (*CurrencyQuery) FirstID

func (cq *CurrencyQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CurrencyQuery) FirstIDX

func (cq *CurrencyQuery) FirstIDX(ctx context.Context) int

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

func (*CurrencyQuery) FirstX

func (cq *CurrencyQuery) FirstX(ctx context.Context) *Currency

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

func (*CurrencyQuery) GroupBy

func (cq *CurrencyQuery) GroupBy(field string, fields ...string) *CurrencyGroupBy

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.Currency.Query().
	GroupBy(currency.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CurrencyQuery) IDs

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

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

func (*CurrencyQuery) IDsX

func (cq *CurrencyQuery) IDsX(ctx context.Context) []int

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

func (*CurrencyQuery) Limit

func (cq *CurrencyQuery) Limit(limit int) *CurrencyQuery

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

func (*CurrencyQuery) Offset

func (cq *CurrencyQuery) Offset(offset int) *CurrencyQuery

Offset to start from.

func (*CurrencyQuery) Only

func (cq *CurrencyQuery) Only(ctx context.Context) (*Currency, error)

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

func (*CurrencyQuery) OnlyID

func (cq *CurrencyQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CurrencyQuery) OnlyIDX

func (cq *CurrencyQuery) OnlyIDX(ctx context.Context) int

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

func (*CurrencyQuery) OnlyX

func (cq *CurrencyQuery) OnlyX(ctx context.Context) *Currency

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

func (*CurrencyQuery) Order

Order specifies how the records should be ordered.

func (*CurrencyQuery) Paginate

func (c *CurrencyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CurrencyPaginateOption,
) (*CurrencyConnection, error)

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

func (*CurrencyQuery) QueryContext

func (c *CurrencyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyQuery) Select

func (cq *CurrencyQuery) Select(fields ...string) *CurrencySelect

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.Currency.Query().
	Select(currency.FieldCreatedBy).
	Scan(ctx, &v)

func (*CurrencyQuery) Unique

func (cq *CurrencyQuery) Unique(unique bool) *CurrencyQuery

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 (*CurrencyQuery) Where

func (cq *CurrencyQuery) Where(ps ...predicate.Currency) *CurrencyQuery

Where adds a new predicate for the CurrencyQuery builder.

type CurrencySelect

type CurrencySelect struct {
	*CurrencyQuery
	// contains filtered or unexported fields
}

CurrencySelect is the builder for selecting fields of Currency entities.

func (*CurrencySelect) Aggregate

func (cs *CurrencySelect) Aggregate(fns ...AggregateFunc) *CurrencySelect

Aggregate adds the given aggregation functions to the selector query.

func (*CurrencySelect) Bool

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

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

func (*CurrencySelect) BoolX

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

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

func (*CurrencySelect) Bools

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

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

func (*CurrencySelect) BoolsX

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

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

func (CurrencySelect) ExecContext

func (c CurrencySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencySelect) Float64

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

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

func (*CurrencySelect) Float64X

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

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

func (*CurrencySelect) Float64s

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

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

func (*CurrencySelect) Float64sX

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

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

func (*CurrencySelect) Int

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

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

func (*CurrencySelect) IntX

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

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

func (*CurrencySelect) Ints

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

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

func (*CurrencySelect) IntsX

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

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

func (CurrencySelect) QueryContext

func (c CurrencySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencySelect) Scan

func (cs *CurrencySelect) Scan(ctx context.Context, v any) error

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

func (*CurrencySelect) ScanX

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

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

func (*CurrencySelect) String

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

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

func (*CurrencySelect) StringX

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

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

func (*CurrencySelect) Strings

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

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

func (*CurrencySelect) StringsX

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

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

type CurrencyUpdate

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

CurrencyUpdate is the builder for updating Currency entities.

func (*CurrencyUpdate) AddUpdatedBy

func (cu *CurrencyUpdate) AddUpdatedBy(i int) *CurrencyUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*CurrencyUpdate) ClearSign

func (cu *CurrencyUpdate) ClearSign() *CurrencyUpdate

ClearSign clears the value of the "sign" field.

func (*CurrencyUpdate) ClearUpdatedAt

func (cu *CurrencyUpdate) ClearUpdatedAt() *CurrencyUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CurrencyUpdate) ClearUpdatedBy

func (cu *CurrencyUpdate) ClearUpdatedBy() *CurrencyUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CurrencyUpdate) Exec

func (cu *CurrencyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CurrencyUpdate) ExecContext

func (c *CurrencyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyUpdate) ExecX

func (cu *CurrencyUpdate) ExecX(ctx context.Context)

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

func (*CurrencyUpdate) Mutation

func (cu *CurrencyUpdate) Mutation() *CurrencyMutation

Mutation returns the CurrencyMutation object of the builder.

func (*CurrencyUpdate) QueryContext

func (c *CurrencyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyUpdate) Save

func (cu *CurrencyUpdate) Save(ctx context.Context) (int, error)

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

func (*CurrencyUpdate) SaveX

func (cu *CurrencyUpdate) SaveX(ctx context.Context) int

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

func (*CurrencyUpdate) SetCode

func (cu *CurrencyUpdate) SetCode(s string) *CurrencyUpdate

SetCode sets the "code" field.

func (*CurrencyUpdate) SetInput

SetInput applies the change-set in the UpdateCurrencyInput on the CurrencyUpdate builder.

func (*CurrencyUpdate) SetName

func (cu *CurrencyUpdate) SetName(s string) *CurrencyUpdate

SetName sets the "name" field.

func (*CurrencyUpdate) SetNillableCode

func (cu *CurrencyUpdate) SetNillableCode(s *string) *CurrencyUpdate

SetNillableCode sets the "code" field if the given value is not nil.

func (*CurrencyUpdate) SetNillableName

func (cu *CurrencyUpdate) SetNillableName(s *string) *CurrencyUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*CurrencyUpdate) SetNillableSign

func (cu *CurrencyUpdate) SetNillableSign(s *string) *CurrencyUpdate

SetNillableSign sets the "sign" field if the given value is not nil.

func (*CurrencyUpdate) SetNillableStatus

func (cu *CurrencyUpdate) SetNillableStatus(ts *typex.SimpleStatus) *CurrencyUpdate

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

func (*CurrencyUpdate) SetNillableUpdatedAt

func (cu *CurrencyUpdate) SetNillableUpdatedAt(t *time.Time) *CurrencyUpdate

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

func (*CurrencyUpdate) SetNillableUpdatedBy

func (cu *CurrencyUpdate) SetNillableUpdatedBy(i *int) *CurrencyUpdate

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

func (*CurrencyUpdate) SetSign

func (cu *CurrencyUpdate) SetSign(s string) *CurrencyUpdate

SetSign sets the "sign" field.

func (*CurrencyUpdate) SetStatus

func (cu *CurrencyUpdate) SetStatus(ts typex.SimpleStatus) *CurrencyUpdate

SetStatus sets the "status" field.

func (*CurrencyUpdate) SetUpdatedAt

func (cu *CurrencyUpdate) SetUpdatedAt(t time.Time) *CurrencyUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CurrencyUpdate) SetUpdatedBy

func (cu *CurrencyUpdate) SetUpdatedBy(i int) *CurrencyUpdate

SetUpdatedBy sets the "updated_by" field.

func (*CurrencyUpdate) Where

func (cu *CurrencyUpdate) Where(ps ...predicate.Currency) *CurrencyUpdate

Where appends a list predicates to the CurrencyUpdate builder.

type CurrencyUpdateOne

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

CurrencyUpdateOne is the builder for updating a single Currency entity.

func (*CurrencyUpdateOne) AddUpdatedBy

func (cuo *CurrencyUpdateOne) AddUpdatedBy(i int) *CurrencyUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*CurrencyUpdateOne) ClearSign

func (cuo *CurrencyUpdateOne) ClearSign() *CurrencyUpdateOne

ClearSign clears the value of the "sign" field.

func (*CurrencyUpdateOne) ClearUpdatedAt

func (cuo *CurrencyUpdateOne) ClearUpdatedAt() *CurrencyUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CurrencyUpdateOne) ClearUpdatedBy

func (cuo *CurrencyUpdateOne) ClearUpdatedBy() *CurrencyUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CurrencyUpdateOne) Exec

func (cuo *CurrencyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CurrencyUpdateOne) ExecContext

func (c *CurrencyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CurrencyUpdateOne) ExecX

func (cuo *CurrencyUpdateOne) ExecX(ctx context.Context)

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

func (*CurrencyUpdateOne) Mutation

func (cuo *CurrencyUpdateOne) Mutation() *CurrencyMutation

Mutation returns the CurrencyMutation object of the builder.

func (*CurrencyUpdateOne) QueryContext

func (c *CurrencyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CurrencyUpdateOne) Save

func (cuo *CurrencyUpdateOne) Save(ctx context.Context) (*Currency, error)

Save executes the query and returns the updated Currency entity.

func (*CurrencyUpdateOne) SaveX

func (cuo *CurrencyUpdateOne) SaveX(ctx context.Context) *Currency

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

func (*CurrencyUpdateOne) Select

func (cuo *CurrencyUpdateOne) Select(field string, fields ...string) *CurrencyUpdateOne

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

func (*CurrencyUpdateOne) SetCode

func (cuo *CurrencyUpdateOne) SetCode(s string) *CurrencyUpdateOne

SetCode sets the "code" field.

func (*CurrencyUpdateOne) SetInput

SetInput applies the change-set in the UpdateCurrencyInput on the CurrencyUpdateOne builder.

func (*CurrencyUpdateOne) SetName

func (cuo *CurrencyUpdateOne) SetName(s string) *CurrencyUpdateOne

SetName sets the "name" field.

func (*CurrencyUpdateOne) SetNillableCode

func (cuo *CurrencyUpdateOne) SetNillableCode(s *string) *CurrencyUpdateOne

SetNillableCode sets the "code" field if the given value is not nil.

func (*CurrencyUpdateOne) SetNillableName

func (cuo *CurrencyUpdateOne) SetNillableName(s *string) *CurrencyUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*CurrencyUpdateOne) SetNillableSign

func (cuo *CurrencyUpdateOne) SetNillableSign(s *string) *CurrencyUpdateOne

SetNillableSign sets the "sign" field if the given value is not nil.

func (*CurrencyUpdateOne) SetNillableStatus

func (cuo *CurrencyUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *CurrencyUpdateOne

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

func (*CurrencyUpdateOne) SetNillableUpdatedAt

func (cuo *CurrencyUpdateOne) SetNillableUpdatedAt(t *time.Time) *CurrencyUpdateOne

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

func (*CurrencyUpdateOne) SetNillableUpdatedBy

func (cuo *CurrencyUpdateOne) SetNillableUpdatedBy(i *int) *CurrencyUpdateOne

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

func (*CurrencyUpdateOne) SetSign

func (cuo *CurrencyUpdateOne) SetSign(s string) *CurrencyUpdateOne

SetSign sets the "sign" field.

func (*CurrencyUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*CurrencyUpdateOne) SetUpdatedAt

func (cuo *CurrencyUpdateOne) SetUpdatedAt(t time.Time) *CurrencyUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*CurrencyUpdateOne) SetUpdatedBy

func (cuo *CurrencyUpdateOne) SetUpdatedBy(i int) *CurrencyUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*CurrencyUpdateOne) Where

Where appends a list predicates to the CurrencyUpdate builder.

type CurrencyUpsert

type CurrencyUpsert struct {
	*sql.UpdateSet
}

CurrencyUpsert is the "OnConflict" setter.

func (*CurrencyUpsert) AddUpdatedBy

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

AddUpdatedBy adds v to the "updated_by" field.

func (*CurrencyUpsert) ClearSign

func (u *CurrencyUpsert) ClearSign() *CurrencyUpsert

ClearSign clears the value of the "sign" field.

func (*CurrencyUpsert) ClearUpdatedAt

func (u *CurrencyUpsert) ClearUpdatedAt() *CurrencyUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CurrencyUpsert) ClearUpdatedBy

func (u *CurrencyUpsert) ClearUpdatedBy() *CurrencyUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CurrencyUpsert) SetCode

func (u *CurrencyUpsert) SetCode(v string) *CurrencyUpsert

SetCode sets the "code" field.

func (*CurrencyUpsert) SetName

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

SetName sets the "name" field.

func (*CurrencyUpsert) SetSign

func (u *CurrencyUpsert) SetSign(v string) *CurrencyUpsert

SetSign sets the "sign" field.

func (*CurrencyUpsert) SetStatus

SetStatus sets the "status" field.

func (*CurrencyUpsert) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CurrencyUpsert) SetUpdatedBy

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

SetUpdatedBy sets the "updated_by" field.

func (*CurrencyUpsert) UpdateCode

func (u *CurrencyUpsert) UpdateCode() *CurrencyUpsert

UpdateCode sets the "code" field to the value that was provided on create.

func (*CurrencyUpsert) UpdateName

func (u *CurrencyUpsert) UpdateName() *CurrencyUpsert

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

func (*CurrencyUpsert) UpdateSign

func (u *CurrencyUpsert) UpdateSign() *CurrencyUpsert

UpdateSign sets the "sign" field to the value that was provided on create.

func (*CurrencyUpsert) UpdateStatus

func (u *CurrencyUpsert) UpdateStatus() *CurrencyUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CurrencyUpsert) UpdateUpdatedAt

func (u *CurrencyUpsert) UpdateUpdatedAt() *CurrencyUpsert

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

func (*CurrencyUpsert) UpdateUpdatedBy

func (u *CurrencyUpsert) UpdateUpdatedBy() *CurrencyUpsert

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

type CurrencyUpsertBulk

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

CurrencyUpsertBulk is the builder for "upsert"-ing a bulk of Currency nodes.

func (*CurrencyUpsertBulk) AddUpdatedBy

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

AddUpdatedBy adds v to the "updated_by" field.

func (*CurrencyUpsertBulk) ClearSign

func (u *CurrencyUpsertBulk) ClearSign() *CurrencyUpsertBulk

ClearSign clears the value of the "sign" field.

func (*CurrencyUpsertBulk) ClearUpdatedAt

func (u *CurrencyUpsertBulk) ClearUpdatedAt() *CurrencyUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CurrencyUpsertBulk) ClearUpdatedBy

func (u *CurrencyUpsertBulk) ClearUpdatedBy() *CurrencyUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CurrencyUpsertBulk) DoNothing

func (u *CurrencyUpsertBulk) DoNothing() *CurrencyUpsertBulk

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

func (*CurrencyUpsertBulk) Exec

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

Exec executes the query.

func (*CurrencyUpsertBulk) ExecX

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

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

func (*CurrencyUpsertBulk) Ignore

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

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

func (*CurrencyUpsertBulk) SetCode

SetCode sets the "code" field.

func (*CurrencyUpsertBulk) SetName

SetName sets the "name" field.

func (*CurrencyUpsertBulk) SetSign

SetSign sets the "sign" field.

func (*CurrencyUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*CurrencyUpsertBulk) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CurrencyUpsertBulk) SetUpdatedBy

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

SetUpdatedBy sets the "updated_by" field.

func (*CurrencyUpsertBulk) Update

func (u *CurrencyUpsertBulk) Update(set func(*CurrencyUpsert)) *CurrencyUpsertBulk

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

func (*CurrencyUpsertBulk) UpdateCode

func (u *CurrencyUpsertBulk) UpdateCode() *CurrencyUpsertBulk

UpdateCode sets the "code" field to the value that was provided on create.

func (*CurrencyUpsertBulk) UpdateName

func (u *CurrencyUpsertBulk) UpdateName() *CurrencyUpsertBulk

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

func (*CurrencyUpsertBulk) UpdateNewValues

func (u *CurrencyUpsertBulk) UpdateNewValues() *CurrencyUpsertBulk

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

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

func (*CurrencyUpsertBulk) UpdateSign

func (u *CurrencyUpsertBulk) UpdateSign() *CurrencyUpsertBulk

UpdateSign sets the "sign" field to the value that was provided on create.

func (*CurrencyUpsertBulk) UpdateStatus

func (u *CurrencyUpsertBulk) UpdateStatus() *CurrencyUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CurrencyUpsertBulk) UpdateUpdatedAt

func (u *CurrencyUpsertBulk) UpdateUpdatedAt() *CurrencyUpsertBulk

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

func (*CurrencyUpsertBulk) UpdateUpdatedBy

func (u *CurrencyUpsertBulk) UpdateUpdatedBy() *CurrencyUpsertBulk

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

type CurrencyUpsertOne

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

CurrencyUpsertOne is the builder for "upsert"-ing

one Currency node.

func (*CurrencyUpsertOne) AddUpdatedBy

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

AddUpdatedBy adds v to the "updated_by" field.

func (*CurrencyUpsertOne) ClearSign

func (u *CurrencyUpsertOne) ClearSign() *CurrencyUpsertOne

ClearSign clears the value of the "sign" field.

func (*CurrencyUpsertOne) ClearUpdatedAt

func (u *CurrencyUpsertOne) ClearUpdatedAt() *CurrencyUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*CurrencyUpsertOne) ClearUpdatedBy

func (u *CurrencyUpsertOne) ClearUpdatedBy() *CurrencyUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*CurrencyUpsertOne) DoNothing

func (u *CurrencyUpsertOne) DoNothing() *CurrencyUpsertOne

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

func (*CurrencyUpsertOne) Exec

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

Exec executes the query.

func (*CurrencyUpsertOne) ExecX

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

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

func (*CurrencyUpsertOne) ID

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

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

func (*CurrencyUpsertOne) IDX

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

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

func (*CurrencyUpsertOne) Ignore

func (u *CurrencyUpsertOne) Ignore() *CurrencyUpsertOne

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

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

func (*CurrencyUpsertOne) SetCode

SetCode sets the "code" field.

func (*CurrencyUpsertOne) SetName

SetName sets the "name" field.

func (*CurrencyUpsertOne) SetSign

SetSign sets the "sign" field.

func (*CurrencyUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*CurrencyUpsertOne) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*CurrencyUpsertOne) SetUpdatedBy

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

SetUpdatedBy sets the "updated_by" field.

func (*CurrencyUpsertOne) Update

func (u *CurrencyUpsertOne) Update(set func(*CurrencyUpsert)) *CurrencyUpsertOne

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

func (*CurrencyUpsertOne) UpdateCode

func (u *CurrencyUpsertOne) UpdateCode() *CurrencyUpsertOne

UpdateCode sets the "code" field to the value that was provided on create.

func (*CurrencyUpsertOne) UpdateName

func (u *CurrencyUpsertOne) UpdateName() *CurrencyUpsertOne

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

func (*CurrencyUpsertOne) UpdateNewValues

func (u *CurrencyUpsertOne) UpdateNewValues() *CurrencyUpsertOne

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.Currency.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(currency.FieldID)
		}),
	).
	Exec(ctx)

func (*CurrencyUpsertOne) UpdateSign

func (u *CurrencyUpsertOne) UpdateSign() *CurrencyUpsertOne

UpdateSign sets the "sign" field to the value that was provided on create.

func (*CurrencyUpsertOne) UpdateStatus

func (u *CurrencyUpsertOne) UpdateStatus() *CurrencyUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*CurrencyUpsertOne) UpdateUpdatedAt

func (u *CurrencyUpsertOne) UpdateUpdatedAt() *CurrencyUpsertOne

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

func (*CurrencyUpsertOne) UpdateUpdatedBy

func (u *CurrencyUpsertOne) UpdateUpdatedBy() *CurrencyUpsertOne

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

type CurrencyWhereInput

type CurrencyWhereInput struct {
	Predicates []predicate.Currency  `json:"-"`
	Not        *CurrencyWhereInput   `json:"not,omitempty"`
	Or         []*CurrencyWhereInput `json:"or,omitempty"`
	And        []*CurrencyWhereInput `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"`

	// "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"`

	// "sign" field predicates.
	Sign             *string  `json:"sign,omitempty"`
	SignNEQ          *string  `json:"signNEQ,omitempty"`
	SignIn           []string `json:"signIn,omitempty"`
	SignNotIn        []string `json:"signNotIn,omitempty"`
	SignGT           *string  `json:"signGT,omitempty"`
	SignGTE          *string  `json:"signGTE,omitempty"`
	SignLT           *string  `json:"signLT,omitempty"`
	SignLTE          *string  `json:"signLTE,omitempty"`
	SignContains     *string  `json:"signContains,omitempty"`
	SignHasPrefix    *string  `json:"signHasPrefix,omitempty"`
	SignHasSuffix    *string  `json:"signHasSuffix,omitempty"`
	SignIsNil        bool     `json:"signIsNil,omitempty"`
	SignNotNil       bool     `json:"signNotNil,omitempty"`
	SignEqualFold    *string  `json:"signEqualFold,omitempty"`
	SignContainsFold *string  `json:"signContainsFold,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"`
}

CurrencyWhereInput represents a where input for filtering Currency queries.

func (*CurrencyWhereInput) AddPredicates

func (i *CurrencyWhereInput) AddPredicates(predicates ...predicate.Currency)

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

func (*CurrencyWhereInput) Filter

Filter applies the CurrencyWhereInput filter on the CurrencyQuery builder.

func (*CurrencyWhereInput) P

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

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

type FileIdentities

type FileIdentities []*FileIdentity

FileIdentities is a parsable slice of FileIdentity.

type FileIdentity

type FileIdentity 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
	TenantID int `json:"tenant_id,omitempty"`
	// accesskey id
	AccessKeyID string `json:"access_key_id,omitempty"`
	// accesskey secret
	AccessKeySecret string `json:"-"`
	// 文件来源ID
	FileSourceID int `json:"file_source_id,omitempty"`
	// 角色的资源名称(ARN),用于STS
	RoleArn string `json:"role_arn,omitempty"`
	// 指定返回的STS令牌的权限的策略
	Policy string `json:"policy,omitempty"`
	// STS令牌的有效期,默认3600s
	DurationSeconds int `json:"duration_seconds,omitempty"`
	// 租户默认的凭证
	IsDefault bool `json:"is_default,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FileIdentityQuery when eager-loading is set.
	Edges FileIdentityEdges `json:"edges"`
	// contains filtered or unexported fields
}

FileIdentity is the model entity for the FileIdentity schema.

func (*FileIdentity) ExecContext

func (c *FileIdentity) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentity) GlobalID

func (fi *FileIdentity) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given FileIdentity node.

func (*FileIdentity) IsNode

func (*FileIdentity) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*FileIdentity) Org

func (fi *FileIdentity) Org(ctx context.Context) (*Org, error)

func (*FileIdentity) QueryContext

func (c *FileIdentity) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentity) QueryOrg

func (fi *FileIdentity) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the FileIdentity entity.

func (*FileIdentity) QuerySource

func (fi *FileIdentity) QuerySource() *FileSourceQuery

QuerySource queries the "source" edge of the FileIdentity entity.

func (*FileIdentity) Source

func (fi *FileIdentity) Source(ctx context.Context) (*FileSource, error)

func (*FileIdentity) String

func (fi *FileIdentity) String() string

String implements the fmt.Stringer.

func (*FileIdentity) ToEdge

func (fi *FileIdentity) ToEdge(order *FileIdentityOrder) *FileIdentityEdge

ToEdge converts FileIdentity into FileIdentityEdge.

func (*FileIdentity) Unwrap

func (fi *FileIdentity) Unwrap() *FileIdentity

Unwrap unwraps the FileIdentity 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 (*FileIdentity) Update

func (fi *FileIdentity) Update() *FileIdentityUpdateOne

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

func (*FileIdentity) Value

func (fi *FileIdentity) Value(name string) (ent.Value, error)

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

type FileIdentityClient

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

FileIdentityClient is a client for the FileIdentity schema.

func NewFileIdentityClient

func NewFileIdentityClient(c config) *FileIdentityClient

NewFileIdentityClient returns a client for the FileIdentity from the given config.

func (*FileIdentityClient) Create

Create returns a builder for creating a FileIdentity entity.

func (*FileIdentityClient) CreateBulk

func (c *FileIdentityClient) CreateBulk(builders ...*FileIdentityCreate) *FileIdentityCreateBulk

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

func (*FileIdentityClient) Delete

Delete returns a delete builder for FileIdentity.

func (*FileIdentityClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FileIdentityClient) DeleteOneID

func (c *FileIdentityClient) DeleteOneID(id int) *FileIdentityDeleteOne

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

func (*FileIdentityClient) ExecContext

func (c *FileIdentityClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityClient) Get

Get returns a FileIdentity entity by its id.

func (*FileIdentityClient) GetX

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

func (*FileIdentityClient) Hooks

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

Hooks returns the client hooks.

func (*FileIdentityClient) Intercept

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

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

func (*FileIdentityClient) Interceptors

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

Interceptors returns the client interceptors.

func (*FileIdentityClient) MapCreateBulk

func (c *FileIdentityClient) MapCreateBulk(slice any, setFunc func(*FileIdentityCreate, int)) *FileIdentityCreateBulk

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 (*FileIdentityClient) Query

Query returns a query builder for FileIdentity.

func (*FileIdentityClient) QueryContext

func (c *FileIdentityClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityClient) QueryOrg

func (c *FileIdentityClient) QueryOrg(fi *FileIdentity) *OrgQuery

QueryOrg queries the org edge of a FileIdentity.

func (*FileIdentityClient) QuerySource

func (c *FileIdentityClient) QuerySource(fi *FileIdentity) *FileSourceQuery

QuerySource queries the source edge of a FileIdentity.

func (*FileIdentityClient) Update

Update returns an update builder for FileIdentity.

func (*FileIdentityClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*FileIdentityClient) UpdateOneID

func (c *FileIdentityClient) UpdateOneID(id int) *FileIdentityUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FileIdentityClient) Use

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

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

type FileIdentityConnection

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

FileIdentityConnection is the connection containing edges to FileIdentity.

type FileIdentityCreate

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

FileIdentityCreate is the builder for creating a FileIdentity entity.

func (*FileIdentityCreate) Exec

func (fic *FileIdentityCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileIdentityCreate) ExecContext

func (c *FileIdentityCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityCreate) ExecX

func (fic *FileIdentityCreate) ExecX(ctx context.Context)

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

func (*FileIdentityCreate) Mutation

func (fic *FileIdentityCreate) Mutation() *FileIdentityMutation

Mutation returns the FileIdentityMutation object of the builder.

func (*FileIdentityCreate) OnConflict

func (fic *FileIdentityCreate) OnConflict(opts ...sql.ConflictOption) *FileIdentityUpsertOne

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

client.FileIdentity.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.FileIdentityUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*FileIdentityCreate) OnConflictColumns

func (fic *FileIdentityCreate) OnConflictColumns(columns ...string) *FileIdentityUpsertOne

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

client.FileIdentity.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileIdentityCreate) QueryContext

func (c *FileIdentityCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityCreate) Save

Save creates the FileIdentity in the database.

func (*FileIdentityCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*FileIdentityCreate) SetAccessKeyID

func (fic *FileIdentityCreate) SetAccessKeyID(s string) *FileIdentityCreate

SetAccessKeyID sets the "access_key_id" field.

func (*FileIdentityCreate) SetAccessKeySecret

func (fic *FileIdentityCreate) SetAccessKeySecret(s string) *FileIdentityCreate

SetAccessKeySecret sets the "access_key_secret" field.

func (*FileIdentityCreate) SetComments

func (fic *FileIdentityCreate) SetComments(s string) *FileIdentityCreate

SetComments sets the "comments" field.

func (*FileIdentityCreate) SetCreatedAt

func (fic *FileIdentityCreate) SetCreatedAt(t time.Time) *FileIdentityCreate

SetCreatedAt sets the "created_at" field.

func (*FileIdentityCreate) SetCreatedBy

func (fic *FileIdentityCreate) SetCreatedBy(i int) *FileIdentityCreate

SetCreatedBy sets the "created_by" field.

func (*FileIdentityCreate) SetDurationSeconds

func (fic *FileIdentityCreate) SetDurationSeconds(i int) *FileIdentityCreate

SetDurationSeconds sets the "duration_seconds" field.

func (*FileIdentityCreate) SetFileSourceID

func (fic *FileIdentityCreate) SetFileSourceID(i int) *FileIdentityCreate

SetFileSourceID sets the "file_source_id" field.

func (*FileIdentityCreate) SetID

func (fic *FileIdentityCreate) SetID(i int) *FileIdentityCreate

SetID sets the "id" field.

func (*FileIdentityCreate) SetInput

SetInput applies the change-set in the CreateFileIdentityInput on the FileIdentityCreate builder.

func (*FileIdentityCreate) SetIsDefault

func (fic *FileIdentityCreate) SetIsDefault(b bool) *FileIdentityCreate

SetIsDefault sets the "is_default" field.

func (*FileIdentityCreate) SetNillableComments

func (fic *FileIdentityCreate) SetNillableComments(s *string) *FileIdentityCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*FileIdentityCreate) SetNillableCreatedAt

func (fic *FileIdentityCreate) SetNillableCreatedAt(t *time.Time) *FileIdentityCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*FileIdentityCreate) SetNillableDurationSeconds

func (fic *FileIdentityCreate) SetNillableDurationSeconds(i *int) *FileIdentityCreate

SetNillableDurationSeconds sets the "duration_seconds" field if the given value is not nil.

func (*FileIdentityCreate) SetNillableIsDefault

func (fic *FileIdentityCreate) SetNillableIsDefault(b *bool) *FileIdentityCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*FileIdentityCreate) SetNillablePolicy

func (fic *FileIdentityCreate) SetNillablePolicy(s *string) *FileIdentityCreate

SetNillablePolicy sets the "policy" field if the given value is not nil.

func (*FileIdentityCreate) SetNillableUpdatedAt

func (fic *FileIdentityCreate) SetNillableUpdatedAt(t *time.Time) *FileIdentityCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileIdentityCreate) SetNillableUpdatedBy

func (fic *FileIdentityCreate) SetNillableUpdatedBy(i *int) *FileIdentityCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileIdentityCreate) SetOrg

func (fic *FileIdentityCreate) SetOrg(o *Org) *FileIdentityCreate

SetOrg sets the "org" edge to the Org entity.

func (*FileIdentityCreate) SetOrgID

func (fic *FileIdentityCreate) SetOrgID(id int) *FileIdentityCreate

SetOrgID sets the "org" edge to the Org entity by ID.

func (*FileIdentityCreate) SetPolicy

func (fic *FileIdentityCreate) SetPolicy(s string) *FileIdentityCreate

SetPolicy sets the "policy" field.

func (*FileIdentityCreate) SetRoleArn

func (fic *FileIdentityCreate) SetRoleArn(s string) *FileIdentityCreate

SetRoleArn sets the "role_arn" field.

func (*FileIdentityCreate) SetSource

func (fic *FileIdentityCreate) SetSource(f *FileSource) *FileIdentityCreate

SetSource sets the "source" edge to the FileSource entity.

func (*FileIdentityCreate) SetSourceID

func (fic *FileIdentityCreate) SetSourceID(id int) *FileIdentityCreate

SetSourceID sets the "source" edge to the FileSource entity by ID.

func (*FileIdentityCreate) SetTenantID

func (fic *FileIdentityCreate) SetTenantID(i int) *FileIdentityCreate

SetTenantID sets the "tenant_id" field.

func (*FileIdentityCreate) SetUpdatedAt

func (fic *FileIdentityCreate) SetUpdatedAt(t time.Time) *FileIdentityCreate

SetUpdatedAt sets the "updated_at" field.

func (*FileIdentityCreate) SetUpdatedBy

func (fic *FileIdentityCreate) SetUpdatedBy(i int) *FileIdentityCreate

SetUpdatedBy sets the "updated_by" field.

type FileIdentityCreateBulk

type FileIdentityCreateBulk struct {
	// contains filtered or unexported fields
}

FileIdentityCreateBulk is the builder for creating many FileIdentity entities in bulk.

func (*FileIdentityCreateBulk) Exec

func (ficb *FileIdentityCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileIdentityCreateBulk) ExecContext

func (c *FileIdentityCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityCreateBulk) ExecX

func (ficb *FileIdentityCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileIdentityCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.FileIdentity.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.FileIdentityUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*FileIdentityCreateBulk) OnConflictColumns

func (ficb *FileIdentityCreateBulk) OnConflictColumns(columns ...string) *FileIdentityUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.FileIdentity.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileIdentityCreateBulk) QueryContext

func (c *FileIdentityCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityCreateBulk) Save

Save creates the FileIdentity entities in the database.

func (*FileIdentityCreateBulk) SaveX

func (ficb *FileIdentityCreateBulk) SaveX(ctx context.Context) []*FileIdentity

SaveX is like Save, but panics if an error occurs.

type FileIdentityDelete

type FileIdentityDelete struct {
	// contains filtered or unexported fields
}

FileIdentityDelete is the builder for deleting a FileIdentity entity.

func (*FileIdentityDelete) Exec

func (fid *FileIdentityDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*FileIdentityDelete) ExecContext

func (c *FileIdentityDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityDelete) ExecX

func (fid *FileIdentityDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*FileIdentityDelete) QueryContext

func (c *FileIdentityDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityDelete) Where

Where appends a list predicates to the FileIdentityDelete builder.

type FileIdentityDeleteOne

type FileIdentityDeleteOne struct {
	// contains filtered or unexported fields
}

FileIdentityDeleteOne is the builder for deleting a single FileIdentity entity.

func (*FileIdentityDeleteOne) Exec

func (fido *FileIdentityDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FileIdentityDeleteOne) ExecX

func (fido *FileIdentityDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileIdentityDeleteOne) Where

Where appends a list predicates to the FileIdentityDelete builder.

type FileIdentityEdge

type FileIdentityEdge struct {
	Node   *FileIdentity `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

FileIdentityEdge is the edge representation of FileIdentity.

type FileIdentityEdges

type FileIdentityEdges struct {
	// Source holds the value of the source edge.
	Source *FileSource `json:"source,omitempty"`
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// contains filtered or unexported fields
}

FileIdentityEdges holds the relations/edges for other nodes in the graph.

func (FileIdentityEdges) OrgOrErr

func (e FileIdentityEdges) 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 (FileIdentityEdges) SourceOrErr

func (e FileIdentityEdges) 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 FileIdentityGroupBy

type FileIdentityGroupBy struct {
	// contains filtered or unexported fields
}

FileIdentityGroupBy is the group-by builder for FileIdentity entities.

func (*FileIdentityGroupBy) Aggregate

func (figb *FileIdentityGroupBy) Aggregate(fns ...AggregateFunc) *FileIdentityGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*FileIdentityGroupBy) Bool

func (s *FileIdentityGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) BoolX

func (s *FileIdentityGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileIdentityGroupBy) Bools

func (s *FileIdentityGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) BoolsX

func (s *FileIdentityGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FileIdentityGroupBy) Float64

func (s *FileIdentityGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) Float64X

func (s *FileIdentityGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileIdentityGroupBy) Float64s

func (s *FileIdentityGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) Float64sX

func (s *FileIdentityGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileIdentityGroupBy) Int

func (s *FileIdentityGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) IntX

func (s *FileIdentityGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileIdentityGroupBy) Ints

func (s *FileIdentityGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) IntsX

func (s *FileIdentityGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FileIdentityGroupBy) Scan

func (figb *FileIdentityGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileIdentityGroupBy) ScanX

func (s *FileIdentityGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileIdentityGroupBy) String

func (s *FileIdentityGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) StringX

func (s *FileIdentityGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileIdentityGroupBy) Strings

func (s *FileIdentityGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileIdentityGroupBy) StringsX

func (s *FileIdentityGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileIdentityMutation

type FileIdentityMutation struct {
	// contains filtered or unexported fields
}

FileIdentityMutation represents an operation that mutates the FileIdentity nodes in the graph.

func (*FileIdentityMutation) AccessKeyID

func (m *FileIdentityMutation) AccessKeyID() (r string, exists bool)

AccessKeyID returns the value of the "access_key_id" field in the mutation.

func (*FileIdentityMutation) AccessKeySecret

func (m *FileIdentityMutation) AccessKeySecret() (r string, exists bool)

AccessKeySecret returns the value of the "access_key_secret" field in the mutation.

func (*FileIdentityMutation) AddCreatedBy

func (m *FileIdentityMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*FileIdentityMutation) AddDurationSeconds

func (m *FileIdentityMutation) AddDurationSeconds(i int)

AddDurationSeconds adds i to the "duration_seconds" field.

func (*FileIdentityMutation) AddField

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) AddUpdatedBy

func (m *FileIdentityMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*FileIdentityMutation) AddedCreatedBy

func (m *FileIdentityMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*FileIdentityMutation) AddedDurationSeconds

func (m *FileIdentityMutation) AddedDurationSeconds() (r int, exists bool)

AddedDurationSeconds returns the value that was added to the "duration_seconds" field in this mutation.

func (*FileIdentityMutation) AddedEdges

func (m *FileIdentityMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*FileIdentityMutation) AddedField

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) AddedFields

func (m *FileIdentityMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*FileIdentityMutation) AddedIDs

func (m *FileIdentityMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*FileIdentityMutation) AddedUpdatedBy

func (m *FileIdentityMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*FileIdentityMutation) ClearComments

func (m *FileIdentityMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*FileIdentityMutation) ClearDurationSeconds

func (m *FileIdentityMutation) ClearDurationSeconds()

ClearDurationSeconds clears the value of the "duration_seconds" field.

func (*FileIdentityMutation) ClearEdge

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) ClearField

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) ClearOrg

func (m *FileIdentityMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*FileIdentityMutation) ClearPolicy

func (m *FileIdentityMutation) ClearPolicy()

ClearPolicy clears the value of the "policy" field.

func (*FileIdentityMutation) ClearSource

func (m *FileIdentityMutation) ClearSource()

ClearSource clears the "source" edge to the FileSource entity.

func (*FileIdentityMutation) ClearUpdatedAt

func (m *FileIdentityMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileIdentityMutation) ClearUpdatedBy

func (m *FileIdentityMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileIdentityMutation) ClearedEdges

func (m *FileIdentityMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*FileIdentityMutation) ClearedFields

func (m *FileIdentityMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (FileIdentityMutation) Client

func (m FileIdentityMutation) 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 (*FileIdentityMutation) Comments

func (m *FileIdentityMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*FileIdentityMutation) CommentsCleared

func (m *FileIdentityMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*FileIdentityMutation) CreatedAt

func (m *FileIdentityMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*FileIdentityMutation) CreatedBy

func (m *FileIdentityMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*FileIdentityMutation) DurationSeconds

func (m *FileIdentityMutation) DurationSeconds() (r int, exists bool)

DurationSeconds returns the value of the "duration_seconds" field in the mutation.

func (*FileIdentityMutation) DurationSecondsCleared

func (m *FileIdentityMutation) DurationSecondsCleared() bool

DurationSecondsCleared returns if the "duration_seconds" field was cleared in this mutation.

func (*FileIdentityMutation) EdgeCleared

func (m *FileIdentityMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*FileIdentityMutation) ExecContext

func (c *FileIdentityMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityMutation) Field

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) FieldCleared

func (m *FileIdentityMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*FileIdentityMutation) Fields

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) FileSourceID

func (m *FileIdentityMutation) FileSourceID() (r int, exists bool)

FileSourceID returns the value of the "file_source_id" field in the mutation.

func (*FileIdentityMutation) ID

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) IDs

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) IsDefault

func (m *FileIdentityMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*FileIdentityMutation) OldAccessKeyID

func (m *FileIdentityMutation) OldAccessKeyID(ctx context.Context) (v string, err error)

OldAccessKeyID returns the old "access_key_id" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldAccessKeySecret

func (m *FileIdentityMutation) OldAccessKeySecret(ctx context.Context) (v string, err error)

OldAccessKeySecret returns the old "access_key_secret" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldComments

func (m *FileIdentityMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldCreatedAt

func (m *FileIdentityMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldCreatedBy

func (m *FileIdentityMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldDurationSeconds

func (m *FileIdentityMutation) OldDurationSeconds(ctx context.Context) (v int, err error)

OldDurationSeconds returns the old "duration_seconds" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldField

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) OldFileSourceID

func (m *FileIdentityMutation) OldFileSourceID(ctx context.Context) (v int, err error)

OldFileSourceID returns the old "file_source_id" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldIsDefault

func (m *FileIdentityMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldPolicy

func (m *FileIdentityMutation) OldPolicy(ctx context.Context) (v string, err error)

OldPolicy returns the old "policy" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldRoleArn

func (m *FileIdentityMutation) OldRoleArn(ctx context.Context) (v string, err error)

OldRoleArn returns the old "role_arn" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldTenantID

func (m *FileIdentityMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldUpdatedAt

func (m *FileIdentityMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) OldUpdatedBy

func (m *FileIdentityMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the FileIdentity entity. If the FileIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileIdentityMutation) Op

func (m *FileIdentityMutation) Op() Op

Op returns the operation name.

func (*FileIdentityMutation) OrgCleared

func (m *FileIdentityMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*FileIdentityMutation) OrgID

func (m *FileIdentityMutation) OrgID() (id int, exists bool)

OrgID returns the "org" edge ID in the mutation.

func (*FileIdentityMutation) OrgIDs

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) Policy

func (m *FileIdentityMutation) Policy() (r string, exists bool)

Policy returns the value of the "policy" field in the mutation.

func (*FileIdentityMutation) PolicyCleared

func (m *FileIdentityMutation) PolicyCleared() bool

PolicyCleared returns if the "policy" field was cleared in this mutation.

func (*FileIdentityMutation) QueryContext

func (c *FileIdentityMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityMutation) RemovedEdges

func (m *FileIdentityMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*FileIdentityMutation) RemovedIDs

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) ResetAccessKeyID

func (m *FileIdentityMutation) ResetAccessKeyID()

ResetAccessKeyID resets all changes to the "access_key_id" field.

func (*FileIdentityMutation) ResetAccessKeySecret

func (m *FileIdentityMutation) ResetAccessKeySecret()

ResetAccessKeySecret resets all changes to the "access_key_secret" field.

func (*FileIdentityMutation) ResetComments

func (m *FileIdentityMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*FileIdentityMutation) ResetCreatedAt

func (m *FileIdentityMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FileIdentityMutation) ResetCreatedBy

func (m *FileIdentityMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*FileIdentityMutation) ResetDurationSeconds

func (m *FileIdentityMutation) ResetDurationSeconds()

ResetDurationSeconds resets all changes to the "duration_seconds" field.

func (*FileIdentityMutation) ResetEdge

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) ResetField

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) ResetFileSourceID

func (m *FileIdentityMutation) ResetFileSourceID()

ResetFileSourceID resets all changes to the "file_source_id" field.

func (*FileIdentityMutation) ResetIsDefault

func (m *FileIdentityMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*FileIdentityMutation) ResetOrg

func (m *FileIdentityMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*FileIdentityMutation) ResetPolicy

func (m *FileIdentityMutation) ResetPolicy()

ResetPolicy resets all changes to the "policy" field.

func (*FileIdentityMutation) ResetRoleArn

func (m *FileIdentityMutation) ResetRoleArn()

ResetRoleArn resets all changes to the "role_arn" field.

func (*FileIdentityMutation) ResetSource

func (m *FileIdentityMutation) ResetSource()

ResetSource resets all changes to the "source" edge.

func (*FileIdentityMutation) ResetTenantID

func (m *FileIdentityMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*FileIdentityMutation) ResetUpdatedAt

func (m *FileIdentityMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FileIdentityMutation) ResetUpdatedBy

func (m *FileIdentityMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*FileIdentityMutation) RoleArn

func (m *FileIdentityMutation) RoleArn() (r string, exists bool)

RoleArn returns the value of the "role_arn" field in the mutation.

func (*FileIdentityMutation) SetAccessKeyID

func (m *FileIdentityMutation) SetAccessKeyID(s string)

SetAccessKeyID sets the "access_key_id" field.

func (*FileIdentityMutation) SetAccessKeySecret

func (m *FileIdentityMutation) SetAccessKeySecret(s string)

SetAccessKeySecret sets the "access_key_secret" field.

func (*FileIdentityMutation) SetComments

func (m *FileIdentityMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*FileIdentityMutation) SetCreatedAt

func (m *FileIdentityMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*FileIdentityMutation) SetCreatedBy

func (m *FileIdentityMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*FileIdentityMutation) SetDurationSeconds

func (m *FileIdentityMutation) SetDurationSeconds(i int)

SetDurationSeconds sets the "duration_seconds" field.

func (*FileIdentityMutation) SetField

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) SetFileSourceID

func (m *FileIdentityMutation) SetFileSourceID(i int)

SetFileSourceID sets the "file_source_id" field.

func (*FileIdentityMutation) SetID

func (m *FileIdentityMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of FileIdentity entities.

func (*FileIdentityMutation) SetIsDefault

func (m *FileIdentityMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*FileIdentityMutation) SetOp

func (m *FileIdentityMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FileIdentityMutation) SetOrgID

func (m *FileIdentityMutation) SetOrgID(id int)

SetOrgID sets the "org" edge to the Org entity by id.

func (*FileIdentityMutation) SetPolicy

func (m *FileIdentityMutation) SetPolicy(s string)

SetPolicy sets the "policy" field.

func (*FileIdentityMutation) SetRoleArn

func (m *FileIdentityMutation) SetRoleArn(s string)

SetRoleArn sets the "role_arn" field.

func (*FileIdentityMutation) SetSourceID

func (m *FileIdentityMutation) SetSourceID(id int)

SetSourceID sets the "source" edge to the FileSource entity by id.

func (*FileIdentityMutation) SetTenantID

func (m *FileIdentityMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*FileIdentityMutation) SetUpdatedAt

func (m *FileIdentityMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*FileIdentityMutation) SetUpdatedBy

func (m *FileIdentityMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*FileIdentityMutation) SourceCleared

func (m *FileIdentityMutation) SourceCleared() bool

SourceCleared reports if the "source" edge to the FileSource entity was cleared.

func (*FileIdentityMutation) SourceID

func (m *FileIdentityMutation) SourceID() (id int, exists bool)

SourceID returns the "source" edge ID in the mutation.

func (*FileIdentityMutation) SourceIDs

func (m *FileIdentityMutation) 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 (*FileIdentityMutation) TenantID

func (m *FileIdentityMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (FileIdentityMutation) Tx

func (m FileIdentityMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*FileIdentityMutation) Type

func (m *FileIdentityMutation) Type() string

Type returns the node type of this mutation (FileIdentity).

func (*FileIdentityMutation) UpdatedAt

func (m *FileIdentityMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*FileIdentityMutation) UpdatedAtCleared

func (m *FileIdentityMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*FileIdentityMutation) UpdatedBy

func (m *FileIdentityMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*FileIdentityMutation) UpdatedByCleared

func (m *FileIdentityMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*FileIdentityMutation) Where

Where appends a list predicates to the FileIdentityMutation builder.

func (*FileIdentityMutation) WhereP

func (m *FileIdentityMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the FileIdentityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type FileIdentityOrder

type FileIdentityOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *FileIdentityOrderField `json:"field"`
}

FileIdentityOrder defines the ordering of FileIdentity.

type FileIdentityOrderField

type FileIdentityOrderField struct {
	// Value extracts the ordering value from the given FileIdentity.
	Value func(*FileIdentity) (ent.Value, error)
	// contains filtered or unexported fields
}

FileIdentityOrderField defines the ordering field of FileIdentity.

func (FileIdentityOrderField) MarshalGQL

func (f FileIdentityOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (FileIdentityOrderField) String

func (f FileIdentityOrderField) String() string

String implement fmt.Stringer interface.

func (*FileIdentityOrderField) UnmarshalGQL

func (f *FileIdentityOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type FileIdentityPaginateOption

type FileIdentityPaginateOption func(*fileidentityPager) error

FileIdentityPaginateOption enables pagination customization.

func WithFileIdentityFilter

func WithFileIdentityFilter(filter func(*FileIdentityQuery) (*FileIdentityQuery, error)) FileIdentityPaginateOption

WithFileIdentityFilter configures pagination filter.

func WithFileIdentityOrder

func WithFileIdentityOrder(order *FileIdentityOrder) FileIdentityPaginateOption

WithFileIdentityOrder configures pagination ordering.

type FileIdentityQuery

type FileIdentityQuery struct {
	// contains filtered or unexported fields
}

FileIdentityQuery is the builder for querying FileIdentity entities.

func (*FileIdentityQuery) Aggregate

func (fiq *FileIdentityQuery) Aggregate(fns ...AggregateFunc) *FileIdentitySelect

Aggregate returns a FileIdentitySelect configured with the given aggregations.

func (*FileIdentityQuery) All

func (fiq *FileIdentityQuery) All(ctx context.Context) ([]*FileIdentity, error)

All executes the query and returns a list of FileIdentities.

func (*FileIdentityQuery) AllX

func (fiq *FileIdentityQuery) AllX(ctx context.Context) []*FileIdentity

AllX is like All, but panics if an error occurs.

func (*FileIdentityQuery) Clone

func (fiq *FileIdentityQuery) Clone() *FileIdentityQuery

Clone returns a duplicate of the FileIdentityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*FileIdentityQuery) CollectFields

func (fi *FileIdentityQuery) CollectFields(ctx context.Context, satisfies ...string) (*FileIdentityQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*FileIdentityQuery) Count

func (fiq *FileIdentityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FileIdentityQuery) CountX

func (fiq *FileIdentityQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*FileIdentityQuery) ExecContext

func (c *FileIdentityQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityQuery) Exist

func (fiq *FileIdentityQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*FileIdentityQuery) ExistX

func (fiq *FileIdentityQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*FileIdentityQuery) First

func (fiq *FileIdentityQuery) First(ctx context.Context) (*FileIdentity, error)

First returns the first FileIdentity entity from the query. Returns a *NotFoundError when no FileIdentity was found.

func (*FileIdentityQuery) FirstID

func (fiq *FileIdentityQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first FileIdentity ID from the query. Returns a *NotFoundError when no FileIdentity ID was found.

func (*FileIdentityQuery) FirstIDX

func (fiq *FileIdentityQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*FileIdentityQuery) FirstX

func (fiq *FileIdentityQuery) FirstX(ctx context.Context) *FileIdentity

FirstX is like First, but panics if an error occurs.

func (*FileIdentityQuery) GroupBy

func (fiq *FileIdentityQuery) GroupBy(field string, fields ...string) *FileIdentityGroupBy

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.FileIdentity.Query().
	GroupBy(fileidentity.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FileIdentityQuery) IDs

func (fiq *FileIdentityQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of FileIdentity IDs.

func (*FileIdentityQuery) IDsX

func (fiq *FileIdentityQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*FileIdentityQuery) Limit

func (fiq *FileIdentityQuery) Limit(limit int) *FileIdentityQuery

Limit the number of records to be returned by this query.

func (*FileIdentityQuery) Offset

func (fiq *FileIdentityQuery) Offset(offset int) *FileIdentityQuery

Offset to start from.

func (*FileIdentityQuery) Only

func (fiq *FileIdentityQuery) Only(ctx context.Context) (*FileIdentity, error)

Only returns a single FileIdentity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one FileIdentity entity is found. Returns a *NotFoundError when no FileIdentity entities are found.

func (*FileIdentityQuery) OnlyID

func (fiq *FileIdentityQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only FileIdentity ID in the query. Returns a *NotSingularError when more than one FileIdentity ID is found. Returns a *NotFoundError when no entities are found.

func (*FileIdentityQuery) OnlyIDX

func (fiq *FileIdentityQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*FileIdentityQuery) OnlyX

func (fiq *FileIdentityQuery) OnlyX(ctx context.Context) *FileIdentity

OnlyX is like Only, but panics if an error occurs.

func (*FileIdentityQuery) Order

Order specifies how the records should be ordered.

func (*FileIdentityQuery) Paginate

func (fi *FileIdentityQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...FileIdentityPaginateOption,
) (*FileIdentityConnection, error)

Paginate executes the query and returns a relay based cursor connection to FileIdentity.

func (*FileIdentityQuery) QueryContext

func (c *FileIdentityQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityQuery) QueryOrg

func (fiq *FileIdentityQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*FileIdentityQuery) QuerySource

func (fiq *FileIdentityQuery) QuerySource() *FileSourceQuery

QuerySource chains the current query on the "source" edge.

func (*FileIdentityQuery) Select

func (fiq *FileIdentityQuery) Select(fields ...string) *FileIdentitySelect

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.FileIdentity.Query().
	Select(fileidentity.FieldCreatedBy).
	Scan(ctx, &v)

func (*FileIdentityQuery) Unique

func (fiq *FileIdentityQuery) Unique(unique bool) *FileIdentityQuery

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 (*FileIdentityQuery) Where

Where adds a new predicate for the FileIdentityQuery builder.

func (*FileIdentityQuery) WithOrg

func (fiq *FileIdentityQuery) WithOrg(opts ...func(*OrgQuery)) *FileIdentityQuery

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 (*FileIdentityQuery) WithSource

func (fiq *FileIdentityQuery) WithSource(opts ...func(*FileSourceQuery)) *FileIdentityQuery

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 FileIdentitySelect

type FileIdentitySelect struct {
	*FileIdentityQuery
	// contains filtered or unexported fields
}

FileIdentitySelect is the builder for selecting fields of FileIdentity entities.

func (*FileIdentitySelect) Aggregate

func (fis *FileIdentitySelect) Aggregate(fns ...AggregateFunc) *FileIdentitySelect

Aggregate adds the given aggregation functions to the selector query.

func (*FileIdentitySelect) Bool

func (s *FileIdentitySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) BoolX

func (s *FileIdentitySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileIdentitySelect) Bools

func (s *FileIdentitySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) BoolsX

func (s *FileIdentitySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (FileIdentitySelect) ExecContext

func (c FileIdentitySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentitySelect) Float64

func (s *FileIdentitySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) Float64X

func (s *FileIdentitySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileIdentitySelect) Float64s

func (s *FileIdentitySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) Float64sX

func (s *FileIdentitySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileIdentitySelect) Int

func (s *FileIdentitySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) IntX

func (s *FileIdentitySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileIdentitySelect) Ints

func (s *FileIdentitySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) IntsX

func (s *FileIdentitySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (FileIdentitySelect) QueryContext

func (c FileIdentitySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentitySelect) Scan

func (fis *FileIdentitySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileIdentitySelect) ScanX

func (s *FileIdentitySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileIdentitySelect) String

func (s *FileIdentitySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) StringX

func (s *FileIdentitySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileIdentitySelect) Strings

func (s *FileIdentitySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileIdentitySelect) StringsX

func (s *FileIdentitySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileIdentityUpdate

type FileIdentityUpdate struct {
	// contains filtered or unexported fields
}

FileIdentityUpdate is the builder for updating FileIdentity entities.

func (*FileIdentityUpdate) AddDurationSeconds

func (fiu *FileIdentityUpdate) AddDurationSeconds(i int) *FileIdentityUpdate

AddDurationSeconds adds i to the "duration_seconds" field.

func (*FileIdentityUpdate) AddUpdatedBy

func (fiu *FileIdentityUpdate) AddUpdatedBy(i int) *FileIdentityUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*FileIdentityUpdate) ClearComments

func (fiu *FileIdentityUpdate) ClearComments() *FileIdentityUpdate

ClearComments clears the value of the "comments" field.

func (*FileIdentityUpdate) ClearDurationSeconds

func (fiu *FileIdentityUpdate) ClearDurationSeconds() *FileIdentityUpdate

ClearDurationSeconds clears the value of the "duration_seconds" field.

func (*FileIdentityUpdate) ClearPolicy

func (fiu *FileIdentityUpdate) ClearPolicy() *FileIdentityUpdate

ClearPolicy clears the value of the "policy" field.

func (*FileIdentityUpdate) ClearSource

func (fiu *FileIdentityUpdate) ClearSource() *FileIdentityUpdate

ClearSource clears the "source" edge to the FileSource entity.

func (*FileIdentityUpdate) ClearUpdatedAt

func (fiu *FileIdentityUpdate) ClearUpdatedAt() *FileIdentityUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileIdentityUpdate) ClearUpdatedBy

func (fiu *FileIdentityUpdate) ClearUpdatedBy() *FileIdentityUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileIdentityUpdate) Exec

func (fiu *FileIdentityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileIdentityUpdate) ExecContext

func (c *FileIdentityUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityUpdate) ExecX

func (fiu *FileIdentityUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileIdentityUpdate) Mutation

func (fiu *FileIdentityUpdate) Mutation() *FileIdentityMutation

Mutation returns the FileIdentityMutation object of the builder.

func (*FileIdentityUpdate) QueryContext

func (c *FileIdentityUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityUpdate) Save

func (fiu *FileIdentityUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*FileIdentityUpdate) SaveX

func (fiu *FileIdentityUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*FileIdentityUpdate) SetAccessKeyID

func (fiu *FileIdentityUpdate) SetAccessKeyID(s string) *FileIdentityUpdate

SetAccessKeyID sets the "access_key_id" field.

func (*FileIdentityUpdate) SetAccessKeySecret

func (fiu *FileIdentityUpdate) SetAccessKeySecret(s string) *FileIdentityUpdate

SetAccessKeySecret sets the "access_key_secret" field.

func (*FileIdentityUpdate) SetComments

func (fiu *FileIdentityUpdate) SetComments(s string) *FileIdentityUpdate

SetComments sets the "comments" field.

func (*FileIdentityUpdate) SetDurationSeconds

func (fiu *FileIdentityUpdate) SetDurationSeconds(i int) *FileIdentityUpdate

SetDurationSeconds sets the "duration_seconds" field.

func (*FileIdentityUpdate) SetFileSourceID

func (fiu *FileIdentityUpdate) SetFileSourceID(i int) *FileIdentityUpdate

SetFileSourceID sets the "file_source_id" field.

func (*FileIdentityUpdate) SetInput

SetInput applies the change-set in the UpdateFileIdentityInput on the FileIdentityUpdate builder.

func (*FileIdentityUpdate) SetIsDefault

func (fiu *FileIdentityUpdate) SetIsDefault(b bool) *FileIdentityUpdate

SetIsDefault sets the "is_default" field.

func (*FileIdentityUpdate) SetNillableAccessKeyID

func (fiu *FileIdentityUpdate) SetNillableAccessKeyID(s *string) *FileIdentityUpdate

SetNillableAccessKeyID sets the "access_key_id" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableAccessKeySecret

func (fiu *FileIdentityUpdate) SetNillableAccessKeySecret(s *string) *FileIdentityUpdate

SetNillableAccessKeySecret sets the "access_key_secret" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableComments

func (fiu *FileIdentityUpdate) SetNillableComments(s *string) *FileIdentityUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableDurationSeconds

func (fiu *FileIdentityUpdate) SetNillableDurationSeconds(i *int) *FileIdentityUpdate

SetNillableDurationSeconds sets the "duration_seconds" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableFileSourceID

func (fiu *FileIdentityUpdate) SetNillableFileSourceID(i *int) *FileIdentityUpdate

SetNillableFileSourceID sets the "file_source_id" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableIsDefault

func (fiu *FileIdentityUpdate) SetNillableIsDefault(b *bool) *FileIdentityUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillablePolicy

func (fiu *FileIdentityUpdate) SetNillablePolicy(s *string) *FileIdentityUpdate

SetNillablePolicy sets the "policy" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableRoleArn

func (fiu *FileIdentityUpdate) SetNillableRoleArn(s *string) *FileIdentityUpdate

SetNillableRoleArn sets the "role_arn" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableUpdatedAt

func (fiu *FileIdentityUpdate) SetNillableUpdatedAt(t *time.Time) *FileIdentityUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileIdentityUpdate) SetNillableUpdatedBy

func (fiu *FileIdentityUpdate) SetNillableUpdatedBy(i *int) *FileIdentityUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileIdentityUpdate) SetPolicy

func (fiu *FileIdentityUpdate) SetPolicy(s string) *FileIdentityUpdate

SetPolicy sets the "policy" field.

func (*FileIdentityUpdate) SetRoleArn

func (fiu *FileIdentityUpdate) SetRoleArn(s string) *FileIdentityUpdate

SetRoleArn sets the "role_arn" field.

func (*FileIdentityUpdate) SetSource

func (fiu *FileIdentityUpdate) SetSource(f *FileSource) *FileIdentityUpdate

SetSource sets the "source" edge to the FileSource entity.

func (*FileIdentityUpdate) SetSourceID

func (fiu *FileIdentityUpdate) SetSourceID(id int) *FileIdentityUpdate

SetSourceID sets the "source" edge to the FileSource entity by ID.

func (*FileIdentityUpdate) SetUpdatedAt

func (fiu *FileIdentityUpdate) SetUpdatedAt(t time.Time) *FileIdentityUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FileIdentityUpdate) SetUpdatedBy

func (fiu *FileIdentityUpdate) SetUpdatedBy(i int) *FileIdentityUpdate

SetUpdatedBy sets the "updated_by" field.

func (*FileIdentityUpdate) Where

Where appends a list predicates to the FileIdentityUpdate builder.

type FileIdentityUpdateOne

type FileIdentityUpdateOne struct {
	// contains filtered or unexported fields
}

FileIdentityUpdateOne is the builder for updating a single FileIdentity entity.

func (*FileIdentityUpdateOne) AddDurationSeconds

func (fiuo *FileIdentityUpdateOne) AddDurationSeconds(i int) *FileIdentityUpdateOne

AddDurationSeconds adds i to the "duration_seconds" field.

func (*FileIdentityUpdateOne) AddUpdatedBy

func (fiuo *FileIdentityUpdateOne) AddUpdatedBy(i int) *FileIdentityUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*FileIdentityUpdateOne) ClearComments

func (fiuo *FileIdentityUpdateOne) ClearComments() *FileIdentityUpdateOne

ClearComments clears the value of the "comments" field.

func (*FileIdentityUpdateOne) ClearDurationSeconds

func (fiuo *FileIdentityUpdateOne) ClearDurationSeconds() *FileIdentityUpdateOne

ClearDurationSeconds clears the value of the "duration_seconds" field.

func (*FileIdentityUpdateOne) ClearPolicy

func (fiuo *FileIdentityUpdateOne) ClearPolicy() *FileIdentityUpdateOne

ClearPolicy clears the value of the "policy" field.

func (*FileIdentityUpdateOne) ClearSource

func (fiuo *FileIdentityUpdateOne) ClearSource() *FileIdentityUpdateOne

ClearSource clears the "source" edge to the FileSource entity.

func (*FileIdentityUpdateOne) ClearUpdatedAt

func (fiuo *FileIdentityUpdateOne) ClearUpdatedAt() *FileIdentityUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileIdentityUpdateOne) ClearUpdatedBy

func (fiuo *FileIdentityUpdateOne) ClearUpdatedBy() *FileIdentityUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileIdentityUpdateOne) Exec

func (fiuo *FileIdentityUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FileIdentityUpdateOne) ExecContext

func (c *FileIdentityUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileIdentityUpdateOne) ExecX

func (fiuo *FileIdentityUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileIdentityUpdateOne) Mutation

func (fiuo *FileIdentityUpdateOne) Mutation() *FileIdentityMutation

Mutation returns the FileIdentityMutation object of the builder.

func (*FileIdentityUpdateOne) QueryContext

func (c *FileIdentityUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileIdentityUpdateOne) Save

Save executes the query and returns the updated FileIdentity entity.

func (*FileIdentityUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*FileIdentityUpdateOne) Select

func (fiuo *FileIdentityUpdateOne) Select(field string, fields ...string) *FileIdentityUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*FileIdentityUpdateOne) SetAccessKeyID

func (fiuo *FileIdentityUpdateOne) SetAccessKeyID(s string) *FileIdentityUpdateOne

SetAccessKeyID sets the "access_key_id" field.

func (*FileIdentityUpdateOne) SetAccessKeySecret

func (fiuo *FileIdentityUpdateOne) SetAccessKeySecret(s string) *FileIdentityUpdateOne

SetAccessKeySecret sets the "access_key_secret" field.

func (*FileIdentityUpdateOne) SetComments

func (fiuo *FileIdentityUpdateOne) SetComments(s string) *FileIdentityUpdateOne

SetComments sets the "comments" field.

func (*FileIdentityUpdateOne) SetDurationSeconds

func (fiuo *FileIdentityUpdateOne) SetDurationSeconds(i int) *FileIdentityUpdateOne

SetDurationSeconds sets the "duration_seconds" field.

func (*FileIdentityUpdateOne) SetFileSourceID

func (fiuo *FileIdentityUpdateOne) SetFileSourceID(i int) *FileIdentityUpdateOne

SetFileSourceID sets the "file_source_id" field.

func (*FileIdentityUpdateOne) SetInput

SetInput applies the change-set in the UpdateFileIdentityInput on the FileIdentityUpdateOne builder.

func (*FileIdentityUpdateOne) SetIsDefault

func (fiuo *FileIdentityUpdateOne) SetIsDefault(b bool) *FileIdentityUpdateOne

SetIsDefault sets the "is_default" field.

func (*FileIdentityUpdateOne) SetNillableAccessKeyID

func (fiuo *FileIdentityUpdateOne) SetNillableAccessKeyID(s *string) *FileIdentityUpdateOne

SetNillableAccessKeyID sets the "access_key_id" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableAccessKeySecret

func (fiuo *FileIdentityUpdateOne) SetNillableAccessKeySecret(s *string) *FileIdentityUpdateOne

SetNillableAccessKeySecret sets the "access_key_secret" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableComments

func (fiuo *FileIdentityUpdateOne) SetNillableComments(s *string) *FileIdentityUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableDurationSeconds

func (fiuo *FileIdentityUpdateOne) SetNillableDurationSeconds(i *int) *FileIdentityUpdateOne

SetNillableDurationSeconds sets the "duration_seconds" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableFileSourceID

func (fiuo *FileIdentityUpdateOne) SetNillableFileSourceID(i *int) *FileIdentityUpdateOne

SetNillableFileSourceID sets the "file_source_id" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableIsDefault

func (fiuo *FileIdentityUpdateOne) SetNillableIsDefault(b *bool) *FileIdentityUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillablePolicy

func (fiuo *FileIdentityUpdateOne) SetNillablePolicy(s *string) *FileIdentityUpdateOne

SetNillablePolicy sets the "policy" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableRoleArn

func (fiuo *FileIdentityUpdateOne) SetNillableRoleArn(s *string) *FileIdentityUpdateOne

SetNillableRoleArn sets the "role_arn" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableUpdatedAt

func (fiuo *FileIdentityUpdateOne) SetNillableUpdatedAt(t *time.Time) *FileIdentityUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetNillableUpdatedBy

func (fiuo *FileIdentityUpdateOne) SetNillableUpdatedBy(i *int) *FileIdentityUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*FileIdentityUpdateOne) SetPolicy

SetPolicy sets the "policy" field.

func (*FileIdentityUpdateOne) SetRoleArn

func (fiuo *FileIdentityUpdateOne) SetRoleArn(s string) *FileIdentityUpdateOne

SetRoleArn sets the "role_arn" field.

func (*FileIdentityUpdateOne) SetSource

SetSource sets the "source" edge to the FileSource entity.

func (*FileIdentityUpdateOne) SetSourceID

func (fiuo *FileIdentityUpdateOne) SetSourceID(id int) *FileIdentityUpdateOne

SetSourceID sets the "source" edge to the FileSource entity by ID.

func (*FileIdentityUpdateOne) SetUpdatedAt

func (fiuo *FileIdentityUpdateOne) SetUpdatedAt(t time.Time) *FileIdentityUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FileIdentityUpdateOne) SetUpdatedBy

func (fiuo *FileIdentityUpdateOne) SetUpdatedBy(i int) *FileIdentityUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*FileIdentityUpdateOne) Where

Where appends a list predicates to the FileIdentityUpdate builder.

type FileIdentityUpsert

type FileIdentityUpsert struct {
	*sql.UpdateSet
}

FileIdentityUpsert is the "OnConflict" setter.

func (*FileIdentityUpsert) AddDurationSeconds

func (u *FileIdentityUpsert) AddDurationSeconds(v int) *FileIdentityUpsert

AddDurationSeconds adds v to the "duration_seconds" field.

func (*FileIdentityUpsert) AddUpdatedBy

func (u *FileIdentityUpsert) AddUpdatedBy(v int) *FileIdentityUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*FileIdentityUpsert) ClearComments

func (u *FileIdentityUpsert) ClearComments() *FileIdentityUpsert

ClearComments clears the value of the "comments" field.

func (*FileIdentityUpsert) ClearDurationSeconds

func (u *FileIdentityUpsert) ClearDurationSeconds() *FileIdentityUpsert

ClearDurationSeconds clears the value of the "duration_seconds" field.

func (*FileIdentityUpsert) ClearPolicy

func (u *FileIdentityUpsert) ClearPolicy() *FileIdentityUpsert

ClearPolicy clears the value of the "policy" field.

func (*FileIdentityUpsert) ClearUpdatedAt

func (u *FileIdentityUpsert) ClearUpdatedAt() *FileIdentityUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileIdentityUpsert) ClearUpdatedBy

func (u *FileIdentityUpsert) ClearUpdatedBy() *FileIdentityUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileIdentityUpsert) SetAccessKeyID

func (u *FileIdentityUpsert) SetAccessKeyID(v string) *FileIdentityUpsert

SetAccessKeyID sets the "access_key_id" field.

func (*FileIdentityUpsert) SetAccessKeySecret

func (u *FileIdentityUpsert) SetAccessKeySecret(v string) *FileIdentityUpsert

SetAccessKeySecret sets the "access_key_secret" field.

func (*FileIdentityUpsert) SetComments

func (u *FileIdentityUpsert) SetComments(v string) *FileIdentityUpsert

SetComments sets the "comments" field.

func (*FileIdentityUpsert) SetDurationSeconds

func (u *FileIdentityUpsert) SetDurationSeconds(v int) *FileIdentityUpsert

SetDurationSeconds sets the "duration_seconds" field.

func (*FileIdentityUpsert) SetFileSourceID

func (u *FileIdentityUpsert) SetFileSourceID(v int) *FileIdentityUpsert

SetFileSourceID sets the "file_source_id" field.

func (*FileIdentityUpsert) SetIsDefault

func (u *FileIdentityUpsert) SetIsDefault(v bool) *FileIdentityUpsert

SetIsDefault sets the "is_default" field.

func (*FileIdentityUpsert) SetPolicy

func (u *FileIdentityUpsert) SetPolicy(v string) *FileIdentityUpsert

SetPolicy sets the "policy" field.

func (*FileIdentityUpsert) SetRoleArn

func (u *FileIdentityUpsert) SetRoleArn(v string) *FileIdentityUpsert

SetRoleArn sets the "role_arn" field.

func (*FileIdentityUpsert) SetUpdatedAt

func (u *FileIdentityUpsert) SetUpdatedAt(v time.Time) *FileIdentityUpsert

SetUpdatedAt sets the "updated_at" field.

func (*FileIdentityUpsert) SetUpdatedBy

func (u *FileIdentityUpsert) SetUpdatedBy(v int) *FileIdentityUpsert

SetUpdatedBy sets the "updated_by" field.

func (*FileIdentityUpsert) UpdateAccessKeyID

func (u *FileIdentityUpsert) UpdateAccessKeyID() *FileIdentityUpsert

UpdateAccessKeyID sets the "access_key_id" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateAccessKeySecret

func (u *FileIdentityUpsert) UpdateAccessKeySecret() *FileIdentityUpsert

UpdateAccessKeySecret sets the "access_key_secret" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateComments

func (u *FileIdentityUpsert) UpdateComments() *FileIdentityUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateDurationSeconds

func (u *FileIdentityUpsert) UpdateDurationSeconds() *FileIdentityUpsert

UpdateDurationSeconds sets the "duration_seconds" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateFileSourceID

func (u *FileIdentityUpsert) UpdateFileSourceID() *FileIdentityUpsert

UpdateFileSourceID sets the "file_source_id" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateIsDefault

func (u *FileIdentityUpsert) UpdateIsDefault() *FileIdentityUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdatePolicy

func (u *FileIdentityUpsert) UpdatePolicy() *FileIdentityUpsert

UpdatePolicy sets the "policy" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateRoleArn

func (u *FileIdentityUpsert) UpdateRoleArn() *FileIdentityUpsert

UpdateRoleArn sets the "role_arn" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateUpdatedAt

func (u *FileIdentityUpsert) UpdateUpdatedAt() *FileIdentityUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileIdentityUpsert) UpdateUpdatedBy

func (u *FileIdentityUpsert) UpdateUpdatedBy() *FileIdentityUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileIdentityUpsertBulk

type FileIdentityUpsertBulk struct {
	// contains filtered or unexported fields
}

FileIdentityUpsertBulk is the builder for "upsert"-ing a bulk of FileIdentity nodes.

func (*FileIdentityUpsertBulk) AddDurationSeconds

func (u *FileIdentityUpsertBulk) AddDurationSeconds(v int) *FileIdentityUpsertBulk

AddDurationSeconds adds v to the "duration_seconds" field.

func (*FileIdentityUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*FileIdentityUpsertBulk) ClearComments

func (u *FileIdentityUpsertBulk) ClearComments() *FileIdentityUpsertBulk

ClearComments clears the value of the "comments" field.

func (*FileIdentityUpsertBulk) ClearDurationSeconds

func (u *FileIdentityUpsertBulk) ClearDurationSeconds() *FileIdentityUpsertBulk

ClearDurationSeconds clears the value of the "duration_seconds" field.

func (*FileIdentityUpsertBulk) ClearPolicy

ClearPolicy clears the value of the "policy" field.

func (*FileIdentityUpsertBulk) ClearUpdatedAt

func (u *FileIdentityUpsertBulk) ClearUpdatedAt() *FileIdentityUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileIdentityUpsertBulk) ClearUpdatedBy

func (u *FileIdentityUpsertBulk) ClearUpdatedBy() *FileIdentityUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileIdentityUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileIdentityUpsertBulk) Exec

Exec executes the query.

func (*FileIdentityUpsertBulk) ExecX

func (u *FileIdentityUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileIdentityUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.FileIdentity.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*FileIdentityUpsertBulk) SetAccessKeyID

SetAccessKeyID sets the "access_key_id" field.

func (*FileIdentityUpsertBulk) SetAccessKeySecret

func (u *FileIdentityUpsertBulk) SetAccessKeySecret(v string) *FileIdentityUpsertBulk

SetAccessKeySecret sets the "access_key_secret" field.

func (*FileIdentityUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*FileIdentityUpsertBulk) SetDurationSeconds

func (u *FileIdentityUpsertBulk) SetDurationSeconds(v int) *FileIdentityUpsertBulk

SetDurationSeconds sets the "duration_seconds" field.

func (*FileIdentityUpsertBulk) SetFileSourceID

func (u *FileIdentityUpsertBulk) SetFileSourceID(v int) *FileIdentityUpsertBulk

SetFileSourceID sets the "file_source_id" field.

func (*FileIdentityUpsertBulk) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*FileIdentityUpsertBulk) SetPolicy

SetPolicy sets the "policy" field.

func (*FileIdentityUpsertBulk) SetRoleArn

SetRoleArn sets the "role_arn" field.

func (*FileIdentityUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*FileIdentityUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*FileIdentityUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the FileIdentityCreateBulk.OnConflict documentation for more info.

func (*FileIdentityUpsertBulk) UpdateAccessKeyID

func (u *FileIdentityUpsertBulk) UpdateAccessKeyID() *FileIdentityUpsertBulk

UpdateAccessKeyID sets the "access_key_id" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateAccessKeySecret

func (u *FileIdentityUpsertBulk) UpdateAccessKeySecret() *FileIdentityUpsertBulk

UpdateAccessKeySecret sets the "access_key_secret" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateComments

func (u *FileIdentityUpsertBulk) UpdateComments() *FileIdentityUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateDurationSeconds

func (u *FileIdentityUpsertBulk) UpdateDurationSeconds() *FileIdentityUpsertBulk

UpdateDurationSeconds sets the "duration_seconds" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateFileSourceID

func (u *FileIdentityUpsertBulk) UpdateFileSourceID() *FileIdentityUpsertBulk

UpdateFileSourceID sets the "file_source_id" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateIsDefault

func (u *FileIdentityUpsertBulk) UpdateIsDefault() *FileIdentityUpsertBulk

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateNewValues

func (u *FileIdentityUpsertBulk) UpdateNewValues() *FileIdentityUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.FileIdentity.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(fileidentity.FieldID)
		}),
	).
	Exec(ctx)

func (*FileIdentityUpsertBulk) UpdatePolicy

UpdatePolicy sets the "policy" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateRoleArn

func (u *FileIdentityUpsertBulk) UpdateRoleArn() *FileIdentityUpsertBulk

UpdateRoleArn sets the "role_arn" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateUpdatedAt

func (u *FileIdentityUpsertBulk) UpdateUpdatedAt() *FileIdentityUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileIdentityUpsertBulk) UpdateUpdatedBy

func (u *FileIdentityUpsertBulk) UpdateUpdatedBy() *FileIdentityUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileIdentityUpsertOne

type FileIdentityUpsertOne struct {
	// contains filtered or unexported fields
}

FileIdentityUpsertOne is the builder for "upsert"-ing

one FileIdentity node.

func (*FileIdentityUpsertOne) AddDurationSeconds

func (u *FileIdentityUpsertOne) AddDurationSeconds(v int) *FileIdentityUpsertOne

AddDurationSeconds adds v to the "duration_seconds" field.

func (*FileIdentityUpsertOne) AddUpdatedBy

func (u *FileIdentityUpsertOne) AddUpdatedBy(v int) *FileIdentityUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*FileIdentityUpsertOne) ClearComments

func (u *FileIdentityUpsertOne) ClearComments() *FileIdentityUpsertOne

ClearComments clears the value of the "comments" field.

func (*FileIdentityUpsertOne) ClearDurationSeconds

func (u *FileIdentityUpsertOne) ClearDurationSeconds() *FileIdentityUpsertOne

ClearDurationSeconds clears the value of the "duration_seconds" field.

func (*FileIdentityUpsertOne) ClearPolicy

func (u *FileIdentityUpsertOne) ClearPolicy() *FileIdentityUpsertOne

ClearPolicy clears the value of the "policy" field.

func (*FileIdentityUpsertOne) ClearUpdatedAt

func (u *FileIdentityUpsertOne) ClearUpdatedAt() *FileIdentityUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*FileIdentityUpsertOne) ClearUpdatedBy

func (u *FileIdentityUpsertOne) ClearUpdatedBy() *FileIdentityUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*FileIdentityUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileIdentityUpsertOne) Exec

Exec executes the query.

func (*FileIdentityUpsertOne) ExecX

func (u *FileIdentityUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileIdentityUpsertOne) ID

func (u *FileIdentityUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*FileIdentityUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*FileIdentityUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.FileIdentity.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*FileIdentityUpsertOne) SetAccessKeyID

func (u *FileIdentityUpsertOne) SetAccessKeyID(v string) *FileIdentityUpsertOne

SetAccessKeyID sets the "access_key_id" field.

func (*FileIdentityUpsertOne) SetAccessKeySecret

func (u *FileIdentityUpsertOne) SetAccessKeySecret(v string) *FileIdentityUpsertOne

SetAccessKeySecret sets the "access_key_secret" field.

func (*FileIdentityUpsertOne) SetComments

SetComments sets the "comments" field.

func (*FileIdentityUpsertOne) SetDurationSeconds

func (u *FileIdentityUpsertOne) SetDurationSeconds(v int) *FileIdentityUpsertOne

SetDurationSeconds sets the "duration_seconds" field.

func (*FileIdentityUpsertOne) SetFileSourceID

func (u *FileIdentityUpsertOne) SetFileSourceID(v int) *FileIdentityUpsertOne

SetFileSourceID sets the "file_source_id" field.

func (*FileIdentityUpsertOne) SetIsDefault

func (u *FileIdentityUpsertOne) SetIsDefault(v bool) *FileIdentityUpsertOne

SetIsDefault sets the "is_default" field.

func (*FileIdentityUpsertOne) SetPolicy

SetPolicy sets the "policy" field.

func (*FileIdentityUpsertOne) SetRoleArn

SetRoleArn sets the "role_arn" field.

func (*FileIdentityUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*FileIdentityUpsertOne) SetUpdatedBy

func (u *FileIdentityUpsertOne) SetUpdatedBy(v int) *FileIdentityUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*FileIdentityUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the FileIdentityCreate.OnConflict documentation for more info.

func (*FileIdentityUpsertOne) UpdateAccessKeyID

func (u *FileIdentityUpsertOne) UpdateAccessKeyID() *FileIdentityUpsertOne

UpdateAccessKeyID sets the "access_key_id" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateAccessKeySecret

func (u *FileIdentityUpsertOne) UpdateAccessKeySecret() *FileIdentityUpsertOne

UpdateAccessKeySecret sets the "access_key_secret" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateComments

func (u *FileIdentityUpsertOne) UpdateComments() *FileIdentityUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateDurationSeconds

func (u *FileIdentityUpsertOne) UpdateDurationSeconds() *FileIdentityUpsertOne

UpdateDurationSeconds sets the "duration_seconds" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateFileSourceID

func (u *FileIdentityUpsertOne) UpdateFileSourceID() *FileIdentityUpsertOne

UpdateFileSourceID sets the "file_source_id" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateIsDefault

func (u *FileIdentityUpsertOne) UpdateIsDefault() *FileIdentityUpsertOne

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateNewValues

func (u *FileIdentityUpsertOne) UpdateNewValues() *FileIdentityUpsertOne

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.FileIdentity.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(fileidentity.FieldID)
		}),
	).
	Exec(ctx)

func (*FileIdentityUpsertOne) UpdatePolicy

func (u *FileIdentityUpsertOne) UpdatePolicy() *FileIdentityUpsertOne

UpdatePolicy sets the "policy" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateRoleArn

func (u *FileIdentityUpsertOne) UpdateRoleArn() *FileIdentityUpsertOne

UpdateRoleArn sets the "role_arn" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateUpdatedAt

func (u *FileIdentityUpsertOne) UpdateUpdatedAt() *FileIdentityUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileIdentityUpsertOne) UpdateUpdatedBy

func (u *FileIdentityUpsertOne) UpdateUpdatedBy() *FileIdentityUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type FileIdentityWhereInput

type FileIdentityWhereInput struct {
	Predicates []predicate.FileIdentity  `json:"-"`
	Not        *FileIdentityWhereInput   `json:"not,omitempty"`
	Or         []*FileIdentityWhereInput `json:"or,omitempty"`
	And        []*FileIdentityWhereInput `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"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`

	// "access_key_id" field predicates.
	AccessKeyID             *string  `json:"accessKeyID,omitempty"`
	AccessKeyIDNEQ          *string  `json:"accessKeyIDNEQ,omitempty"`
	AccessKeyIDIn           []string `json:"accessKeyIDIn,omitempty"`
	AccessKeyIDNotIn        []string `json:"accessKeyIDNotIn,omitempty"`
	AccessKeyIDGT           *string  `json:"accessKeyIDGT,omitempty"`
	AccessKeyIDGTE          *string  `json:"accessKeyIDGTE,omitempty"`
	AccessKeyIDLT           *string  `json:"accessKeyIDLT,omitempty"`
	AccessKeyIDLTE          *string  `json:"accessKeyIDLTE,omitempty"`
	AccessKeyIDContains     *string  `json:"accessKeyIDContains,omitempty"`
	AccessKeyIDHasPrefix    *string  `json:"accessKeyIDHasPrefix,omitempty"`
	AccessKeyIDHasSuffix    *string  `json:"accessKeyIDHasSuffix,omitempty"`
	AccessKeyIDEqualFold    *string  `json:"accessKeyIDEqualFold,omitempty"`
	AccessKeyIDContainsFold *string  `json:"accessKeyIDContainsFold,omitempty"`

	// "access_key_secret" field predicates.
	AccessKeySecret             *string  `json:"accessKeySecret,omitempty"`
	AccessKeySecretNEQ          *string  `json:"accessKeySecretNEQ,omitempty"`
	AccessKeySecretIn           []string `json:"accessKeySecretIn,omitempty"`
	AccessKeySecretNotIn        []string `json:"accessKeySecretNotIn,omitempty"`
	AccessKeySecretGT           *string  `json:"accessKeySecretGT,omitempty"`
	AccessKeySecretGTE          *string  `json:"accessKeySecretGTE,omitempty"`
	AccessKeySecretLT           *string  `json:"accessKeySecretLT,omitempty"`
	AccessKeySecretLTE          *string  `json:"accessKeySecretLTE,omitempty"`
	AccessKeySecretContains     *string  `json:"accessKeySecretContains,omitempty"`
	AccessKeySecretHasPrefix    *string  `json:"accessKeySecretHasPrefix,omitempty"`
	AccessKeySecretHasSuffix    *string  `json:"accessKeySecretHasSuffix,omitempty"`
	AccessKeySecretEqualFold    *string  `json:"accessKeySecretEqualFold,omitempty"`
	AccessKeySecretContainsFold *string  `json:"accessKeySecretContainsFold,omitempty"`

	// "file_source_id" field predicates.
	FileSourceID      *int  `json:"fileSourceID,omitempty"`
	FileSourceIDNEQ   *int  `json:"fileSourceIDNEQ,omitempty"`
	FileSourceIDIn    []int `json:"fileSourceIDIn,omitempty"`
	FileSourceIDNotIn []int `json:"fileSourceIDNotIn,omitempty"`

	// "role_arn" field predicates.
	RoleArn             *string  `json:"roleArn,omitempty"`
	RoleArnNEQ          *string  `json:"roleArnNEQ,omitempty"`
	RoleArnIn           []string `json:"roleArnIn,omitempty"`
	RoleArnNotIn        []string `json:"roleArnNotIn,omitempty"`
	RoleArnGT           *string  `json:"roleArnGT,omitempty"`
	RoleArnGTE          *string  `json:"roleArnGTE,omitempty"`
	RoleArnLT           *string  `json:"roleArnLT,omitempty"`
	RoleArnLTE          *string  `json:"roleArnLTE,omitempty"`
	RoleArnContains     *string  `json:"roleArnContains,omitempty"`
	RoleArnHasPrefix    *string  `json:"roleArnHasPrefix,omitempty"`
	RoleArnHasSuffix    *string  `json:"roleArnHasSuffix,omitempty"`
	RoleArnEqualFold    *string  `json:"roleArnEqualFold,omitempty"`
	RoleArnContainsFold *string  `json:"roleArnContainsFold,omitempty"`

	// "policy" field predicates.
	Policy             *string  `json:"policy,omitempty"`
	PolicyNEQ          *string  `json:"policyNEQ,omitempty"`
	PolicyIn           []string `json:"policyIn,omitempty"`
	PolicyNotIn        []string `json:"policyNotIn,omitempty"`
	PolicyGT           *string  `json:"policyGT,omitempty"`
	PolicyGTE          *string  `json:"policyGTE,omitempty"`
	PolicyLT           *string  `json:"policyLT,omitempty"`
	PolicyLTE          *string  `json:"policyLTE,omitempty"`
	PolicyContains     *string  `json:"policyContains,omitempty"`
	PolicyHasPrefix    *string  `json:"policyHasPrefix,omitempty"`
	PolicyHasSuffix    *string  `json:"policyHasSuffix,omitempty"`
	PolicyIsNil        bool     `json:"policyIsNil,omitempty"`
	PolicyNotNil       bool     `json:"policyNotNil,omitempty"`
	PolicyEqualFold    *string  `json:"policyEqualFold,omitempty"`
	PolicyContainsFold *string  `json:"policyContainsFold,omitempty"`

	// "duration_seconds" field predicates.
	DurationSeconds       *int  `json:"durationSeconds,omitempty"`
	DurationSecondsNEQ    *int  `json:"durationSecondsNEQ,omitempty"`
	DurationSecondsIn     []int `json:"durationSecondsIn,omitempty"`
	DurationSecondsNotIn  []int `json:"durationSecondsNotIn,omitempty"`
	DurationSecondsGT     *int  `json:"durationSecondsGT,omitempty"`
	DurationSecondsGTE    *int  `json:"durationSecondsGTE,omitempty"`
	DurationSecondsLT     *int  `json:"durationSecondsLT,omitempty"`
	DurationSecondsLTE    *int  `json:"durationSecondsLTE,omitempty"`
	DurationSecondsIsNil  bool  `json:"durationSecondsIsNil,omitempty"`
	DurationSecondsNotNil bool  `json:"durationSecondsNotNil,omitempty"`

	// "is_default" field predicates.
	IsDefault    *bool `json:"isDefault,omitempty"`
	IsDefaultNEQ *bool `json:"isDefaultNEQ,omitempty"`

	// "source" edge predicates.
	HasSource     *bool                   `json:"hasSource,omitempty"`
	HasSourceWith []*FileSourceWhereInput `json:"hasSourceWith,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`
}

FileIdentityWhereInput represents a where input for filtering FileIdentity queries.

func (*FileIdentityWhereInput) AddPredicates

func (i *FileIdentityWhereInput) AddPredicates(predicates ...predicate.FileIdentity)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*FileIdentityWhereInput) Filter

Filter applies the FileIdentityWhereInput filter on the FileIdentityQuery builder.

func (*FileIdentityWhereInput) P

P returns a predicate for filtering fileidentities. An error is returned if the input is empty or invalid.

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"`
	// 是否禁止修改endpoint,如果是自定义域名设为true
	EndpointImmutable bool `json:"endpoint_immutable,omitempty"`
	// sts服务的访问域名
	StsEndpoint string `json:"sts_endpoint,omitempty"`
	// 地域,数据存储的物理位置
	Region string `json:"region,omitempty"`
	// 文件存储空间
	Bucket string `json:"bucket,omitempty"`
	// 文件存储空间地址,用于匹配url
	BucketURL string `json:"bucket_url,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) ExecContext

func (c *FileSource) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) NamedIdentities

func (fs *FileSource) NamedIdentities(name string) ([]*FileIdentity, error)

NamedIdentities returns the Identities named value or an error if the edge was not loaded in eager-loading with this name.

func (*FileSource) QueryContext

func (c *FileSource) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileSource) QueryIdentities

func (fs *FileSource) QueryIdentities() *FileIdentityQuery

QueryIdentities queries the "identities" 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) ExecContext

func (c *FileSourceClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *FileSourceClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileSourceClient) QueryIdentities

func (c *FileSourceClient) QueryIdentities(fs *FileSource) *FileIdentityQuery

QueryIdentities queries the identities 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) AddIdentities

func (fsc *FileSourceCreate) AddIdentities(f ...*FileIdentity) *FileSourceCreate

AddIdentities adds the "identities" edges to the FileIdentity entity.

func (*FileSourceCreate) AddIdentityIDs

func (fsc *FileSourceCreate) AddIdentityIDs(ids ...int) *FileSourceCreate

AddIdentityIDs adds the "identities" edge to the FileIdentity entity by IDs.

func (*FileSourceCreate) Exec

func (fsc *FileSourceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileSourceCreate) ExecContext

func (c *FileSourceCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *FileSourceCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetBucketURL

func (fsc *FileSourceCreate) SetBucketURL(s string) *FileSourceCreate

SetBucketURL sets the "bucket_url" 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) SetEndpointImmutable

func (fsc *FileSourceCreate) SetEndpointImmutable(b bool) *FileSourceCreate

SetEndpointImmutable sets the "endpoint_immutable" 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) 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) SetNillableEndpointImmutable

func (fsc *FileSourceCreate) SetNillableEndpointImmutable(b *bool) *FileSourceCreate

SetNillableEndpointImmutable sets the "endpoint_immutable" 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) SetStsEndpoint

func (fsc *FileSourceCreate) SetStsEndpoint(s string) *FileSourceCreate

SetStsEndpoint sets the "sts_endpoint" 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) ExecContext

func (c *FileSourceCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *FileSourceCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *FileSourceDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*FileSourceDelete) ExecX

func (fsd *FileSourceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*FileSourceDelete) QueryContext

func (c *FileSourceDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 {
	// 来源凭证
	Identities []*FileIdentity `json:"identities,omitempty"`
	// contains filtered or unexported fields
}

FileSourceEdges holds the relations/edges for other nodes in the graph.

func (FileSourceEdges) IdentitiesOrErr

func (e FileSourceEdges) IdentitiesOrErr() ([]*FileIdentity, error)

IdentitiesOrErr returns the Identities 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) AddIdentityIDs

func (m *FileSourceMutation) AddIdentityIDs(ids ...int)

AddIdentityIDs adds the "identities" edge to the FileIdentity 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) BucketURL

func (m *FileSourceMutation) BucketURL() (r string, exists bool)

BucketURL returns the value of the "bucket_url" field in the mutation.

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) 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) ClearIdentities

func (m *FileSourceMutation) ClearIdentities()

ClearIdentities clears the "identities" edge to the FileIdentity entity.

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) EndpointImmutable

func (m *FileSourceMutation) EndpointImmutable() (r bool, exists bool)

EndpointImmutable returns the value of the "endpoint_immutable" field in the mutation.

func (*FileSourceMutation) ExecContext

func (c *FileSourceMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) 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) IdentitiesCleared

func (m *FileSourceMutation) IdentitiesCleared() bool

IdentitiesCleared reports if the "identities" edge to the FileIdentity entity was cleared.

func (*FileSourceMutation) IdentitiesIDs

func (m *FileSourceMutation) IdentitiesIDs() (ids []int)

IdentitiesIDs returns the "identities" edge IDs in 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) OldBucketURL

func (m *FileSourceMutation) OldBucketURL(ctx context.Context) (v string, err error)

OldBucketURL returns the old "bucket_url" 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) OldEndpointImmutable

func (m *FileSourceMutation) OldEndpointImmutable(ctx context.Context) (v bool, err error)

OldEndpointImmutable returns the old "endpoint_immutable" 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) OldStsEndpoint

func (m *FileSourceMutation) OldStsEndpoint(ctx context.Context) (v string, err error)

OldStsEndpoint returns the old "sts_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) 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) QueryContext

func (c *FileSourceMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileSourceMutation) Region

func (m *FileSourceMutation) Region() (r string, exists bool)

Region returns the value of the "region" field in the mutation.

func (*FileSourceMutation) RemoveIdentityIDs

func (m *FileSourceMutation) RemoveIdentityIDs(ids ...int)

RemoveIdentityIDs removes the "identities" edge to the FileIdentity entity by IDs.

func (*FileSourceMutation) RemovedEdges

func (m *FileSourceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

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) RemovedIdentitiesIDs

func (m *FileSourceMutation) RemovedIdentitiesIDs() (ids []int)

RemovedIdentities returns the removed IDs of the "identities" edge to the FileIdentity entity.

func (*FileSourceMutation) ResetBucket

func (m *FileSourceMutation) ResetBucket()

ResetBucket resets all changes to the "bucket" field.

func (*FileSourceMutation) ResetBucketURL

func (m *FileSourceMutation) ResetBucketURL()

ResetBucketURL resets all changes to the "bucket_url" 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) ResetEndpointImmutable

func (m *FileSourceMutation) ResetEndpointImmutable()

ResetEndpointImmutable resets all changes to the "endpoint_immutable" 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) ResetIdentities

func (m *FileSourceMutation) ResetIdentities()

ResetIdentities resets all changes to the "identities" 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) ResetStsEndpoint

func (m *FileSourceMutation) ResetStsEndpoint()

ResetStsEndpoint resets all changes to the "sts_endpoint" 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) SetBucketURL

func (m *FileSourceMutation) SetBucketURL(s string)

SetBucketURL sets the "bucket_url" 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) SetEndpointImmutable

func (m *FileSourceMutation) SetEndpointImmutable(b bool)

SetEndpointImmutable sets the "endpoint_immutable" 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) SetStsEndpoint

func (m *FileSourceMutation) SetStsEndpoint(s string)

SetStsEndpoint sets the "sts_endpoint" 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) StsEndpoint

func (m *FileSourceMutation) StsEndpoint() (r string, exists bool)

StsEndpoint returns the value of the "sts_endpoint" field in the mutation.

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) ExecContext

func (c *FileSourceQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *FileSourceQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileSourceQuery) QueryIdentities

func (fsq *FileSourceQuery) QueryIdentities() *FileIdentityQuery

QueryIdentities chains the current query on the "identities" 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) WithIdentities

func (fsq *FileSourceQuery) WithIdentities(opts ...func(*FileIdentityQuery)) *FileSourceQuery

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 (*FileSourceQuery) WithNamedIdentities

func (fsq *FileSourceQuery) WithNamedIdentities(name string, opts ...func(*FileIdentityQuery)) *FileSourceQuery

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.

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) ExecContext

func (c FileSourceSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c FileSourceSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) AddIdentities

func (fsu *FileSourceUpdate) AddIdentities(f ...*FileIdentity) *FileSourceUpdate

AddIdentities adds the "identities" edges to the FileIdentity entity.

func (*FileSourceUpdate) AddIdentityIDs

func (fsu *FileSourceUpdate) AddIdentityIDs(ids ...int) *FileSourceUpdate

AddIdentityIDs adds the "identities" edge to the FileIdentity entity by IDs.

func (*FileSourceUpdate) AddUpdatedBy

func (fsu *FileSourceUpdate) AddUpdatedBy(i int) *FileSourceUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*FileSourceUpdate) ClearComments

func (fsu *FileSourceUpdate) ClearComments() *FileSourceUpdate

ClearComments clears the value of the "comments" field.

func (*FileSourceUpdate) ClearIdentities

func (fsu *FileSourceUpdate) ClearIdentities() *FileSourceUpdate

ClearIdentities clears all "identities" edges to the FileIdentity entity.

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) ExecContext

func (c *FileSourceUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *FileSourceUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileSourceUpdate) RemoveIdentities

func (fsu *FileSourceUpdate) RemoveIdentities(f ...*FileIdentity) *FileSourceUpdate

RemoveIdentities removes "identities" edges to FileIdentity entities.

func (*FileSourceUpdate) RemoveIdentityIDs

func (fsu *FileSourceUpdate) RemoveIdentityIDs(ids ...int) *FileSourceUpdate

RemoveIdentityIDs removes the "identities" edge to FileIdentity entities by IDs.

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) SetBucketURL

func (fsu *FileSourceUpdate) SetBucketURL(s string) *FileSourceUpdate

SetBucketURL sets the "bucket_url" 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) SetEndpointImmutable

func (fsu *FileSourceUpdate) SetEndpointImmutable(b bool) *FileSourceUpdate

SetEndpointImmutable sets the "endpoint_immutable" 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) SetNillableBucketURL

func (fsu *FileSourceUpdate) SetNillableBucketURL(s *string) *FileSourceUpdate

SetNillableBucketURL sets the "bucket_url" 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) SetNillableEndpointImmutable

func (fsu *FileSourceUpdate) SetNillableEndpointImmutable(b *bool) *FileSourceUpdate

SetNillableEndpointImmutable sets the "endpoint_immutable" field if the given value is not nil.

func (*FileSourceUpdate) SetNillableKind

func (fsu *FileSourceUpdate) SetNillableKind(f *filesource.Kind) *FileSourceUpdate

SetNillableKind sets the "kind" 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) SetNillableStsEndpoint

func (fsu *FileSourceUpdate) SetNillableStsEndpoint(s *string) *FileSourceUpdate

SetNillableStsEndpoint sets the "sts_endpoint" 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) SetStsEndpoint

func (fsu *FileSourceUpdate) SetStsEndpoint(s string) *FileSourceUpdate

SetStsEndpoint sets the "sts_endpoint" 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) AddIdentities

func (fsuo *FileSourceUpdateOne) AddIdentities(f ...*FileIdentity) *FileSourceUpdateOne

AddIdentities adds the "identities" edges to the FileIdentity entity.

func (*FileSourceUpdateOne) AddIdentityIDs

func (fsuo *FileSourceUpdateOne) AddIdentityIDs(ids ...int) *FileSourceUpdateOne

AddIdentityIDs adds the "identities" edge to the FileIdentity entity by IDs.

func (*FileSourceUpdateOne) AddUpdatedBy

func (fsuo *FileSourceUpdateOne) AddUpdatedBy(i int) *FileSourceUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*FileSourceUpdateOne) ClearComments

func (fsuo *FileSourceUpdateOne) ClearComments() *FileSourceUpdateOne

ClearComments clears the value of the "comments" field.

func (*FileSourceUpdateOne) ClearIdentities

func (fsuo *FileSourceUpdateOne) ClearIdentities() *FileSourceUpdateOne

ClearIdentities clears all "identities" edges to the FileIdentity entity.

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) ExecContext

func (c *FileSourceUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *FileSourceUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*FileSourceUpdateOne) RemoveIdentities

func (fsuo *FileSourceUpdateOne) RemoveIdentities(f ...*FileIdentity) *FileSourceUpdateOne

RemoveIdentities removes "identities" edges to FileIdentity entities.

func (*FileSourceUpdateOne) RemoveIdentityIDs

func (fsuo *FileSourceUpdateOne) RemoveIdentityIDs(ids ...int) *FileSourceUpdateOne

RemoveIdentityIDs removes the "identities" edge to FileIdentity entities by IDs.

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) SetBucketURL

func (fsuo *FileSourceUpdateOne) SetBucketURL(s string) *FileSourceUpdateOne

SetBucketURL sets the "bucket_url" 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) SetEndpointImmutable

func (fsuo *FileSourceUpdateOne) SetEndpointImmutable(b bool) *FileSourceUpdateOne

SetEndpointImmutable sets the "endpoint_immutable" 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) SetNillableBucketURL

func (fsuo *FileSourceUpdateOne) SetNillableBucketURL(s *string) *FileSourceUpdateOne

SetNillableBucketURL sets the "bucket_url" 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) SetNillableEndpointImmutable

func (fsuo *FileSourceUpdateOne) SetNillableEndpointImmutable(b *bool) *FileSourceUpdateOne

SetNillableEndpointImmutable sets the "endpoint_immutable" field if the given value is not nil.

func (*FileSourceUpdateOne) SetNillableKind

func (fsuo *FileSourceUpdateOne) SetNillableKind(f *filesource.Kind) *FileSourceUpdateOne

SetNillableKind sets the "kind" 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) SetNillableStsEndpoint

func (fsuo *FileSourceUpdateOne) SetNillableStsEndpoint(s *string) *FileSourceUpdateOne

SetNillableStsEndpoint sets the "sts_endpoint" 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) SetStsEndpoint

func (fsuo *FileSourceUpdateOne) SetStsEndpoint(s string) *FileSourceUpdateOne

SetStsEndpoint sets the "sts_endpoint" 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) ClearComments

func (u *FileSourceUpsert) ClearComments() *FileSourceUpsert

ClearComments clears the value of the "comments" 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) SetBucketURL

func (u *FileSourceUpsert) SetBucketURL(v string) *FileSourceUpsert

SetBucketURL sets the "bucket_url" 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) SetEndpointImmutable

func (u *FileSourceUpsert) SetEndpointImmutable(v bool) *FileSourceUpsert

SetEndpointImmutable sets the "endpoint_immutable" 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) SetStsEndpoint

func (u *FileSourceUpsert) SetStsEndpoint(v string) *FileSourceUpsert

SetStsEndpoint sets the "sts_endpoint" 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) UpdateBucketURL

func (u *FileSourceUpsert) UpdateBucketURL() *FileSourceUpsert

UpdateBucketURL sets the "bucket_url" 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) UpdateEndpointImmutable

func (u *FileSourceUpsert) UpdateEndpointImmutable() *FileSourceUpsert

UpdateEndpointImmutable sets the "endpoint_immutable" 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) UpdateStsEndpoint

func (u *FileSourceUpsert) UpdateStsEndpoint() *FileSourceUpsert

UpdateStsEndpoint sets the "sts_endpoint" 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) ClearComments

func (u *FileSourceUpsertBulk) ClearComments() *FileSourceUpsertBulk

ClearComments clears the value of the "comments" 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) SetBucketURL

func (u *FileSourceUpsertBulk) SetBucketURL(v string) *FileSourceUpsertBulk

SetBucketURL sets the "bucket_url" field.

func (*FileSourceUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*FileSourceUpsertBulk) SetEndpoint

SetEndpoint sets the "endpoint" field.

func (*FileSourceUpsertBulk) SetEndpointImmutable

func (u *FileSourceUpsertBulk) SetEndpointImmutable(v bool) *FileSourceUpsertBulk

SetEndpointImmutable sets the "endpoint_immutable" field.

func (*FileSourceUpsertBulk) SetKind

SetKind sets the "kind" field.

func (*FileSourceUpsertBulk) SetRegion

SetRegion sets the "region" field.

func (*FileSourceUpsertBulk) SetStsEndpoint

func (u *FileSourceUpsertBulk) SetStsEndpoint(v string) *FileSourceUpsertBulk

SetStsEndpoint sets the "sts_endpoint" 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) UpdateBucketURL

func (u *FileSourceUpsertBulk) UpdateBucketURL() *FileSourceUpsertBulk

UpdateBucketURL sets the "bucket_url" 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) UpdateEndpointImmutable

func (u *FileSourceUpsertBulk) UpdateEndpointImmutable() *FileSourceUpsertBulk

UpdateEndpointImmutable sets the "endpoint_immutable" 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) UpdateStsEndpoint

func (u *FileSourceUpsertBulk) UpdateStsEndpoint() *FileSourceUpsertBulk

UpdateStsEndpoint sets the "sts_endpoint" 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) ClearComments

func (u *FileSourceUpsertOne) ClearComments() *FileSourceUpsertOne

ClearComments clears the value of the "comments" 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) SetBucketURL

func (u *FileSourceUpsertOne) SetBucketURL(v string) *FileSourceUpsertOne

SetBucketURL sets the "bucket_url" 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) SetEndpointImmutable

func (u *FileSourceUpsertOne) SetEndpointImmutable(v bool) *FileSourceUpsertOne

SetEndpointImmutable sets the "endpoint_immutable" field.

func (*FileSourceUpsertOne) SetKind

SetKind sets the "kind" field.

func (*FileSourceUpsertOne) SetRegion

SetRegion sets the "region" field.

func (*FileSourceUpsertOne) SetStsEndpoint

func (u *FileSourceUpsertOne) SetStsEndpoint(v string) *FileSourceUpsertOne

SetStsEndpoint sets the "sts_endpoint" 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) UpdateBucketURL

func (u *FileSourceUpsertOne) UpdateBucketURL() *FileSourceUpsertOne

UpdateBucketURL sets the "bucket_url" 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) UpdateEndpointImmutable

func (u *FileSourceUpsertOne) UpdateEndpointImmutable() *FileSourceUpsertOne

UpdateEndpointImmutable sets the "endpoint_immutable" 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) UpdateStsEndpoint

func (u *FileSourceUpsertOne) UpdateStsEndpoint() *FileSourceUpsertOne

UpdateStsEndpoint sets the "sts_endpoint" 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"`
	EndpointEqualFold    *string  `json:"endpointEqualFold,omitempty"`
	EndpointContainsFold *string  `json:"endpointContainsFold,omitempty"`

	// "endpoint_immutable" field predicates.
	EndpointImmutable    *bool `json:"endpointImmutable,omitempty"`
	EndpointImmutableNEQ *bool `json:"endpointImmutableNEQ,omitempty"`

	// "sts_endpoint" field predicates.
	StsEndpoint             *string  `json:"stsEndpoint,omitempty"`
	StsEndpointNEQ          *string  `json:"stsEndpointNEQ,omitempty"`
	StsEndpointIn           []string `json:"stsEndpointIn,omitempty"`
	StsEndpointNotIn        []string `json:"stsEndpointNotIn,omitempty"`
	StsEndpointGT           *string  `json:"stsEndpointGT,omitempty"`
	StsEndpointGTE          *string  `json:"stsEndpointGTE,omitempty"`
	StsEndpointLT           *string  `json:"stsEndpointLT,omitempty"`
	StsEndpointLTE          *string  `json:"stsEndpointLTE,omitempty"`
	StsEndpointContains     *string  `json:"stsEndpointContains,omitempty"`
	StsEndpointHasPrefix    *string  `json:"stsEndpointHasPrefix,omitempty"`
	StsEndpointHasSuffix    *string  `json:"stsEndpointHasSuffix,omitempty"`
	StsEndpointEqualFold    *string  `json:"stsEndpointEqualFold,omitempty"`
	StsEndpointContainsFold *string  `json:"stsEndpointContainsFold,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"`
	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"`
	BucketEqualFold    *string  `json:"bucketEqualFold,omitempty"`
	BucketContainsFold *string  `json:"bucketContainsFold,omitempty"`

	// "bucket_url" field predicates.
	BucketURL             *string  `json:"bucketURL,omitempty"`
	BucketURLNEQ          *string  `json:"bucketURLNEQ,omitempty"`
	BucketURLIn           []string `json:"bucketURLIn,omitempty"`
	BucketURLNotIn        []string `json:"bucketURLNotIn,omitempty"`
	BucketURLGT           *string  `json:"bucketURLGT,omitempty"`
	BucketURLGTE          *string  `json:"bucketURLGTE,omitempty"`
	BucketURLLT           *string  `json:"bucketURLLT,omitempty"`
	BucketURLLTE          *string  `json:"bucketURLLTE,omitempty"`
	BucketURLContains     *string  `json:"bucketURLContains,omitempty"`
	BucketURLHasPrefix    *string  `json:"bucketURLHasPrefix,omitempty"`
	BucketURLHasSuffix    *string  `json:"bucketURLHasSuffix,omitempty"`
	BucketURLEqualFold    *string  `json:"bucketURLEqualFold,omitempty"`
	BucketURLContainsFold *string  `json:"bucketURLContainsFold,omitempty"`

	// "identities" edge predicates.
	HasIdentities     *bool                     `json:"hasIdentities,omitempty"`
	HasIdentitiesWith []*FileIdentityWhereInput `json:"hasIdentitiesWith,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 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) ExecContext

func (c *OauthClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OauthClientClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClientClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OauthClientCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClientCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OauthClientCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClientCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OauthClientDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OauthClientDelete) ExecX

func (ocd *OauthClientDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OauthClientDelete) QueryContext

func (c *OauthClientDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OauthClientMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClientMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OauthClientQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClientQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c OauthClientSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OauthClientSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OauthClientUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClientUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableGrantTypes

func (ocu *OauthClientUpdate) SetNillableGrantTypes(ot *oauthclient.GrantTypes) *OauthClientUpdate

SetNillableGrantTypes sets the "grant_types" field if the given value is not nil.

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) SetNillableName

func (ocu *OauthClientUpdate) SetNillableName(s *string) *OauthClientUpdate

SetNillableName sets the "name" 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) SetNillableUserID

func (ocu *OauthClientUpdate) SetNillableUserID(i *int) *OauthClientUpdate

SetNillableUserID sets the "user_id" 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) ExecContext

func (c *OauthClientUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OauthClientUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableGrantTypes

func (ocuo *OauthClientUpdateOne) SetNillableGrantTypes(ot *oauthclient.GrantTypes) *OauthClientUpdateOne

SetNillableGrantTypes sets the "grant_types" field if the given value is not nil.

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) SetNillableName

func (ocuo *OauthClientUpdateOne) SetNillableName(s *string) *OauthClientUpdateOne

SetNillableName sets the "name" 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) SetNillableUserID

func (ocuo *OauthClientUpdateOne) SetNillableUserID(i *int) *OauthClientUpdateOne

SetNillableUserID sets the "user_id" 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"`
	// 自定义域名
	CustomDomain []string `json:"custom_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"`
	// 组织本位币
	LocalCurrency string `json:"local_currency,omitempty"`
	Logo *types.OrgLogo `json:"logo,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) ExecContext

func (c *Org) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Org) FileIdentities

func (o *Org) FileIdentities(ctx context.Context) (result []*FileIdentity, 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) NamedFileIdentities

func (o *Org) NamedFileIdentities(name string) ([]*FileIdentity, error)

NamedFileIdentities returns the FileIdentities 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) NamedOrgQuota

func (o *Org) NamedOrgQuota(name string) ([]*Quota, error)

NamedOrgQuota returns the OrgQuota 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) OrgQuota

func (o *Org) OrgQuota(ctx context.Context) (result []*Quota, err error)

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) QueryContext

func (c *Org) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Org) QueryFileIdentities

func (o *Org) QueryFileIdentities() *FileIdentityQuery

QueryFileIdentities queries the "file_identities" 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) QueryOrgQuota

func (o *Org) QueryOrgQuota() *QuotaQuery

QueryOrgQuota queries the "org_quota" 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) QueryUserPasswordPolicy

func (o *Org) QueryUserPasswordPolicy() *UserPasswordPolicyQuery

QueryUserPasswordPolicy queries the "user_password_policy" 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) UserPasswordPolicy

func (o *Org) UserPasswordPolicy(ctx context.Context) (*UserPasswordPolicy, error)

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) ExecContext

func (c *OrgApp) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgApp) QueryApp

func (oa *OrgApp) QueryApp() *AppQuery

QueryApp queries the "app" edge of the OrgApp entity.

func (*OrgApp) QueryContext

func (c *OrgApp) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgAppClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgAppClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgAppCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgAppCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgAppCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgAppCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgAppDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgAppDelete) ExecX

func (oad *OrgAppDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgAppDelete) QueryContext

func (c *OrgAppDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgAppMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgAppMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgAppQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgAppQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c OrgAppSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OrgAppSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgAppUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgAppUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableAppID

func (oau *OrgAppUpdate) SetNillableAppID(i *int) *OrgAppUpdate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OrgAppUpdate) SetNillableOrgID

func (oau *OrgAppUpdate) SetNillableOrgID(i *int) *OrgAppUpdate

SetNillableOrgID sets the "org_id" field if the given value is not nil.

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) ExecContext

func (c *OrgAppUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgAppUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableAppID

func (oauo *OrgAppUpdateOne) SetNillableAppID(i *int) *OrgAppUpdateOne

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*OrgAppUpdateOne) SetNillableOrgID

func (oauo *OrgAppUpdateOne) SetNillableOrgID(i *int) *OrgAppUpdateOne

SetNillableOrgID sets the "org_id" field if the given value is not nil.

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) ExecContext

func (c *OrgClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrgClient) QueryFileIdentities

func (c *OrgClient) QueryFileIdentities(o *Org) *FileIdentityQuery

QueryFileIdentities queries the file_identities 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) QueryOrgQuota

func (c *OrgClient) QueryOrgQuota(o *Org) *QuotaQuery

QueryOrgQuota queries the org_quota 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) QueryUserPasswordPolicy

func (c *OrgClient) QueryUserPasswordPolicy(o *Org) *UserPasswordPolicyQuery

QueryUserPasswordPolicy queries the user_password_policy 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) AddFileIdentities

func (oc *OrgCreate) AddFileIdentities(f ...*FileIdentity) *OrgCreate

AddFileIdentities adds the "file_identities" edges to the FileIdentity entity.

func (*OrgCreate) AddFileIdentityIDs

func (oc *OrgCreate) AddFileIdentityIDs(ids ...int) *OrgCreate

AddFileIdentityIDs adds the "file_identities" edge to the FileIdentity entity by IDs.

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) AddOrgQuota

func (oc *OrgCreate) AddOrgQuota(q ...*Quota) *OrgCreate

AddOrgQuota adds the "org_quota" edges to the Quota entity.

func (*OrgCreate) AddOrgQuotumIDs

func (oc *OrgCreate) AddOrgQuotumIDs(ids ...int) *OrgCreate

AddOrgQuotumIDs adds the "org_quota" edge to the Quota 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) ExecContext

func (c *OrgCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetCustomDomain

func (oc *OrgCreate) SetCustomDomain(s []string) *OrgCreate

SetCustomDomain sets the "custom_domain" 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) SetLocalCurrency

func (oc *OrgCreate) SetLocalCurrency(s string) *OrgCreate

SetLocalCurrency sets the "local_currency" field.

func (oc *OrgCreate) SetLogo(tl *types.OrgLogo) *OrgCreate

SetLogo sets the "logo" 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) SetNillableKind

func (oc *OrgCreate) SetNillableKind(o *org.Kind) *OrgCreate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*OrgCreate) SetNillableLocalCurrency

func (oc *OrgCreate) SetNillableLocalCurrency(s *string) *OrgCreate

SetNillableLocalCurrency sets the "local_currency" 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) SetNillableUserPasswordPolicyID

func (oc *OrgCreate) SetNillableUserPasswordPolicyID(id *int) *OrgCreate

SetNillableUserPasswordPolicyID sets the "user_password_policy" edge to the UserPasswordPolicy entity by ID 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.

func (*OrgCreate) SetUserPasswordPolicy

func (oc *OrgCreate) SetUserPasswordPolicy(u *UserPasswordPolicy) *OrgCreate

SetUserPasswordPolicy sets the "user_password_policy" edge to the UserPasswordPolicy entity.

func (*OrgCreate) SetUserPasswordPolicyID

func (oc *OrgCreate) SetUserPasswordPolicyID(id int) *OrgCreate

SetUserPasswordPolicyID sets the "user_password_policy" edge to the UserPasswordPolicy entity by ID.

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) ExecContext

func (c *OrgCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgDelete) ExecX

func (od *OrgDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgDelete) QueryContext

func (c *OrgDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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"`
	// 组织下文件凭证
	FileIdentities []*FileIdentity `json:"file_identities,omitempty"`
	// 组织下密码策略
	UserPasswordPolicy *UserPasswordPolicy `json:"user_password_policy,omitempty"`
	// 组织下登录策略
	OrgQuota []*Quota `json:"org_quota,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) FileIdentitiesOrErr

func (e OrgEdges) FileIdentitiesOrErr() ([]*FileIdentity, error)

FileIdentitiesOrErr returns the FileIdentities 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) OrgQuotaOrErr

func (e OrgEdges) OrgQuotaOrErr() ([]*Quota, error)

OrgQuotaOrErr returns the OrgQuota 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) UserPasswordPolicyOrErr

func (e OrgEdges) UserPasswordPolicyOrErr() (*UserPasswordPolicy, error)

UserPasswordPolicyOrErr returns the UserPasswordPolicy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

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) AddFileIdentityIDs

func (m *OrgMutation) AddFileIdentityIDs(ids ...int)

AddFileIdentityIDs adds the "file_identities" edge to the FileIdentity entity by ids.

func (*OrgMutation) AddOrgAppIDs

func (m *OrgMutation) AddOrgAppIDs(ids ...int)

AddOrgAppIDs adds the "org_app" edge to the OrgApp entity by ids.

func (*OrgMutation) AddOrgQuotumIDs

func (m *OrgMutation) AddOrgQuotumIDs(ids ...int)

AddOrgQuotumIDs adds the "org_quota" edge to the Quota 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) AppendCustomDomain

func (m *OrgMutation) AppendCustomDomain(s []string)

AppendCustomDomain adds s to the "custom_domain" field.

func (*OrgMutation) AppendedCustomDomain

func (m *OrgMutation) AppendedCustomDomain() ([]string, bool)

AppendedCustomDomain returns the list of values that were appended to the "custom_domain" 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) ClearCustomDomain

func (m *OrgMutation) ClearCustomDomain()

ClearCustomDomain clears the value of the "custom_domain" 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) ClearFileIdentities

func (m *OrgMutation) ClearFileIdentities()

ClearFileIdentities clears the "file_identities" edge to the FileIdentity entity.

func (*OrgMutation) ClearLocalCurrency

func (m *OrgMutation) ClearLocalCurrency()

ClearLocalCurrency clears the value of the "local_currency" field.

func (m *OrgMutation) ClearLogo()

ClearLogo clears the value of the "logo" field.

func (*OrgMutation) ClearOrgApp

func (m *OrgMutation) ClearOrgApp()

ClearOrgApp clears the "org_app" edge to the OrgApp entity.

func (*OrgMutation) ClearOrgQuota

func (m *OrgMutation) ClearOrgQuota()

ClearOrgQuota clears the "org_quota" edge to the Quota 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) ClearUserPasswordPolicy

func (m *OrgMutation) ClearUserPasswordPolicy()

ClearUserPasswordPolicy clears the "user_password_policy" edge to the UserPasswordPolicy entity.

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) CustomDomain

func (m *OrgMutation) CustomDomain() (r []string, exists bool)

CustomDomain returns the value of the "custom_domain" field in the mutation.

func (*OrgMutation) CustomDomainCleared

func (m *OrgMutation) CustomDomainCleared() bool

CustomDomainCleared returns if the "custom_domain" field was cleared in this 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) ExecContext

func (c *OrgMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) FileIdentitiesCleared

func (m *OrgMutation) FileIdentitiesCleared() bool

FileIdentitiesCleared reports if the "file_identities" edge to the FileIdentity entity was cleared.

func (*OrgMutation) FileIdentitiesIDs

func (m *OrgMutation) FileIdentitiesIDs() (ids []int)

FileIdentitiesIDs returns the "file_identities" edge IDs in the mutation.

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) LocalCurrency

func (m *OrgMutation) LocalCurrency() (r string, exists bool)

LocalCurrency returns the value of the "local_currency" field in the mutation.

func (*OrgMutation) LocalCurrencyCleared

func (m *OrgMutation) LocalCurrencyCleared() bool

LocalCurrencyCleared returns if the "local_currency" field was cleared in this mutation.

func (m *OrgMutation) Logo() (r *types.OrgLogo, exists bool)

Logo returns the value of the "logo" field in the mutation.

func (*OrgMutation) LogoCleared

func (m *OrgMutation) LogoCleared() bool

LogoCleared returns if the "logo" field was cleared in this 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) OldCustomDomain

func (m *OrgMutation) OldCustomDomain(ctx context.Context) (v []string, err error)

OldCustomDomain returns the old "custom_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) 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) OldLocalCurrency

func (m *OrgMutation) OldLocalCurrency(ctx context.Context) (v string, err error)

OldLocalCurrency returns the old "local_currency" 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 (m *OrgMutation) OldLogo(ctx context.Context) (v *types.OrgLogo, err error)

OldLogo returns the old "logo" 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) OrgQuotaCleared

func (m *OrgMutation) OrgQuotaCleared() bool

OrgQuotaCleared reports if the "org_quota" edge to the Quota entity was cleared.

func (*OrgMutation) OrgQuotaIDs

func (m *OrgMutation) OrgQuotaIDs() (ids []int)

OrgQuotaIDs returns the "org_quota" 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) QueryContext

func (c *OrgMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemoveFileIdentityIDs

func (m *OrgMutation) RemoveFileIdentityIDs(ids ...int)

RemoveFileIdentityIDs removes the "file_identities" edge to the FileIdentity 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) RemoveOrgQuotumIDs

func (m *OrgMutation) RemoveOrgQuotumIDs(ids ...int)

RemoveOrgQuotumIDs removes the "org_quota" edge to the Quota 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) RemovedFileIdentitiesIDs

func (m *OrgMutation) RemovedFileIdentitiesIDs() (ids []int)

RemovedFileIdentities returns the removed IDs of the "file_identities" edge to the FileIdentity entity.

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) RemovedOrgQuotaIDs

func (m *OrgMutation) RemovedOrgQuotaIDs() (ids []int)

RemovedOrgQuota returns the removed IDs of the "org_quota" edge to the Quota 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) ResetCustomDomain

func (m *OrgMutation) ResetCustomDomain()

ResetCustomDomain resets all changes to the "custom_domain" 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) ResetFileIdentities

func (m *OrgMutation) ResetFileIdentities()

ResetFileIdentities resets all changes to the "file_identities" edge.

func (*OrgMutation) ResetKind

func (m *OrgMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*OrgMutation) ResetLocalCurrency

func (m *OrgMutation) ResetLocalCurrency()

ResetLocalCurrency resets all changes to the "local_currency" field.

func (m *OrgMutation) ResetLogo()

ResetLogo resets all changes to the "logo" 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) ResetOrgQuota

func (m *OrgMutation) ResetOrgQuota()

ResetOrgQuota resets all changes to the "org_quota" 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) ResetUserPasswordPolicy

func (m *OrgMutation) ResetUserPasswordPolicy()

ResetUserPasswordPolicy resets all changes to the "user_password_policy" edge.

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) SetCustomDomain

func (m *OrgMutation) SetCustomDomain(s []string)

SetCustomDomain sets the "custom_domain" 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) SetLocalCurrency

func (m *OrgMutation) SetLocalCurrency(s string)

SetLocalCurrency sets the "local_currency" field.

func (m *OrgMutation) SetLogo(tl *types.OrgLogo)

SetLogo sets the "logo" 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) SetUserPasswordPolicyID

func (m *OrgMutation) SetUserPasswordPolicyID(id int)

SetUserPasswordPolicyID sets the "user_password_policy" edge to the UserPasswordPolicy entity by id.

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) UserPasswordPolicyCleared

func (m *OrgMutation) UserPasswordPolicyCleared() bool

UserPasswordPolicyCleared reports if the "user_password_policy" edge to the UserPasswordPolicy entity was cleared.

func (*OrgMutation) UserPasswordPolicyID

func (m *OrgMutation) UserPasswordPolicyID() (id int, exists bool)

UserPasswordPolicyID returns the "user_password_policy" edge ID in the mutation.

func (*OrgMutation) UserPasswordPolicyIDs

func (m *OrgMutation) UserPasswordPolicyIDs() (ids []int)

UserPasswordPolicyIDs returns the "user_password_policy" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserPasswordPolicyID instead. It exists only for internal usage by the builders.

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) App

func (op *OrgPolicy) App(ctx context.Context) (*App, error)

func (*OrgPolicy) AppPolicy

func (op *OrgPolicy) AppPolicy(ctx context.Context) (*AppPolicy, error)

func (*OrgPolicy) ExecContext

func (c *OrgPolicy) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryApp

func (op *OrgPolicy) QueryApp() *AppQuery

QueryApp queries the "app" edge of the OrgPolicy entity.

func (*OrgPolicy) QueryAppPolicy

func (op *OrgPolicy) QueryAppPolicy() *AppPolicyQuery

QueryAppPolicy queries the "app_policy" edge of the OrgPolicy entity.

func (*OrgPolicy) QueryContext

func (c *OrgPolicy) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgPolicyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryApp

func (c *OrgPolicyClient) QueryApp(op *OrgPolicy) *AppQuery

QueryApp queries the app edge of a OrgPolicy.

func (*OrgPolicyClient) QueryAppPolicy

func (c *OrgPolicyClient) QueryAppPolicy(op *OrgPolicy) *AppPolicyQuery

QueryAppPolicy queries the app_policy edge of a OrgPolicy.

func (*OrgPolicyClient) QueryContext

func (c *OrgPolicyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgPolicyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgPolicyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetApp

func (opc *OrgPolicyCreate) SetApp(a *App) *OrgPolicyCreate

SetApp sets the "app" edge to the App entity.

func (*OrgPolicyCreate) SetAppID

func (opc *OrgPolicyCreate) SetAppID(i int) *OrgPolicyCreate

SetAppID sets the "app_id" field.

func (*OrgPolicyCreate) SetAppPolicy

func (opc *OrgPolicyCreate) SetAppPolicy(a *AppPolicy) *OrgPolicyCreate

SetAppPolicy sets the "app_policy" edge to the AppPolicy entity.

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) ExecContext

func (c *OrgPolicyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgPolicyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgPolicyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgPolicyDelete) ExecX

func (opd *OrgPolicyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgPolicyDelete) QueryContext

func (c *OrgPolicyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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"`
	// AppPolicy holds the value of the app_policy edge.
	AppPolicy *AppPolicy `json:"app_policy,omitempty"`
	// App holds the value of the app edge.
	App *App `json:"app,omitempty"`
	// contains filtered or unexported fields
}

OrgPolicyEdges holds the relations/edges for other nodes in the graph.

func (OrgPolicyEdges) AppOrErr

func (e OrgPolicyEdges) 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 (OrgPolicyEdges) AppPolicyOrErr

func (e OrgPolicyEdges) AppPolicyOrErr() (*AppPolicy, error)

AppPolicyOrErr returns the AppPolicy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

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) 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) 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) AppCleared

func (m *OrgPolicyMutation) AppCleared() bool

AppCleared reports if the "app" edge to the App entity was cleared.

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) AppIDs

func (m *OrgPolicyMutation) 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 (*OrgPolicyMutation) AppPolicyCleared

func (m *OrgPolicyMutation) AppPolicyCleared() bool

AppPolicyCleared reports if the "app_policy" edge to the AppPolicy entity was cleared.

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) AppPolicyIDs

func (m *OrgPolicyMutation) AppPolicyIDs() (ids []int)

AppPolicyIDs returns the "app_policy" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AppPolicyID instead. It exists only for internal usage by the builders.

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) ClearApp

func (m *OrgPolicyMutation) ClearApp()

ClearApp clears the "app" edge to the App entity.

func (*OrgPolicyMutation) ClearAppID

func (m *OrgPolicyMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyMutation) ClearAppPolicy

func (m *OrgPolicyMutation) ClearAppPolicy()

ClearAppPolicy clears the "app_policy" edge to the AppPolicy entity.

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) ExecContext

func (c *OrgPolicyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgPolicyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ResetApp

func (m *OrgPolicyMutation) ResetApp()

ResetApp resets all changes to the "app" edge.

func (*OrgPolicyMutation) ResetAppID

func (m *OrgPolicyMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*OrgPolicyMutation) ResetAppPolicy

func (m *OrgPolicyMutation) ResetAppPolicy()

ResetAppPolicy resets all changes to the "app_policy" edge.

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) ExecContext

func (c *OrgPolicyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryApp

func (opq *OrgPolicyQuery) QueryApp() *AppQuery

QueryApp chains the current query on the "app" edge.

func (*OrgPolicyQuery) QueryAppPolicy

func (opq *OrgPolicyQuery) QueryAppPolicy() *AppPolicyQuery

QueryAppPolicy chains the current query on the "app_policy" edge.

func (*OrgPolicyQuery) QueryContext

func (c *OrgPolicyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) WithApp

func (opq *OrgPolicyQuery) WithApp(opts ...func(*AppQuery)) *OrgPolicyQuery

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 (*OrgPolicyQuery) WithAppPolicy

func (opq *OrgPolicyQuery) WithAppPolicy(opts ...func(*AppPolicyQuery)) *OrgPolicyQuery

WithAppPolicy tells the query-builder to eager-load the nodes that are connected to the "app_policy" edge. The optional arguments are used to configure the query builder of the edge.

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) ExecContext

func (c OrgPolicySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OrgPolicySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) 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) ClearApp

func (opu *OrgPolicyUpdate) ClearApp() *OrgPolicyUpdate

ClearApp clears the "app" edge to the App entity.

func (*OrgPolicyUpdate) ClearAppID

func (opu *OrgPolicyUpdate) ClearAppID() *OrgPolicyUpdate

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyUpdate) ClearAppPolicy

func (opu *OrgPolicyUpdate) ClearAppPolicy() *OrgPolicyUpdate

ClearAppPolicy clears the "app_policy" edge to the AppPolicy entity.

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) ExecContext

func (c *OrgPolicyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgPolicyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetApp

func (opu *OrgPolicyUpdate) SetApp(a *App) *OrgPolicyUpdate

SetApp sets the "app" edge to the App entity.

func (*OrgPolicyUpdate) SetAppID

func (opu *OrgPolicyUpdate) SetAppID(i int) *OrgPolicyUpdate

SetAppID sets the "app_id" field.

func (*OrgPolicyUpdate) SetAppPolicy

func (opu *OrgPolicyUpdate) SetAppPolicy(a *AppPolicy) *OrgPolicyUpdate

SetAppPolicy sets the "app_policy" edge to the AppPolicy entity.

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) SetNillableName

func (opu *OrgPolicyUpdate) SetNillableName(s *string) *OrgPolicyUpdate

SetNillableName sets the "name" 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) 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) ClearApp

func (opuo *OrgPolicyUpdateOne) ClearApp() *OrgPolicyUpdateOne

ClearApp clears the "app" edge to the App entity.

func (*OrgPolicyUpdateOne) ClearAppID

func (opuo *OrgPolicyUpdateOne) ClearAppID() *OrgPolicyUpdateOne

ClearAppID clears the value of the "app_id" field.

func (*OrgPolicyUpdateOne) ClearAppPolicy

func (opuo *OrgPolicyUpdateOne) ClearAppPolicy() *OrgPolicyUpdateOne

ClearAppPolicy clears the "app_policy" edge to the AppPolicy entity.

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) ExecContext

func (c *OrgPolicyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgPolicyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetApp

func (opuo *OrgPolicyUpdateOne) SetApp(a *App) *OrgPolicyUpdateOne

SetApp sets the "app" edge to the App entity.

func (*OrgPolicyUpdateOne) SetAppID

func (opuo *OrgPolicyUpdateOne) SetAppID(i int) *OrgPolicyUpdateOne

SetAppID sets the "app_id" field.

func (*OrgPolicyUpdateOne) SetAppPolicy

func (opuo *OrgPolicyUpdateOne) SetAppPolicy(a *AppPolicy) *OrgPolicyUpdateOne

SetAppPolicy sets the "app_policy" edge to the AppPolicy entity.

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) SetNillableName

func (opuo *OrgPolicyUpdateOne) SetNillableName(s *string) *OrgPolicyUpdateOne

SetNillableName sets the "name" 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) 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) 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) 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"`
	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"`

	// "app_policy" edge predicates.
	HasAppPolicy     *bool                  `json:"hasAppPolicy,omitempty"`
	HasAppPolicyWith []*AppPolicyWhereInput `json:"hasAppPolicyWith,omitempty"`

	// "app" edge predicates.
	HasApp     *bool            `json:"hasApp,omitempty"`
	HasAppWith []*AppWhereInput `json:"hasAppWith,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) ExecContext

func (c *OrgQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrgQuery) QueryFileIdentities

func (oq *OrgQuery) QueryFileIdentities() *FileIdentityQuery

QueryFileIdentities chains the current query on the "file_identities" edge.

func (*OrgQuery) QueryOrgApp

func (oq *OrgQuery) QueryOrgApp() *OrgAppQuery

QueryOrgApp chains the current query on the "org_app" edge.

func (*OrgQuery) QueryOrgQuota

func (oq *OrgQuery) QueryOrgQuota() *QuotaQuery

QueryOrgQuota chains the current query on the "org_quota" 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) QueryUserPasswordPolicy

func (oq *OrgQuery) QueryUserPasswordPolicy() *UserPasswordPolicyQuery

QueryUserPasswordPolicy chains the current query on the "user_password_policy" 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) WithFileIdentities

func (oq *OrgQuery) WithFileIdentities(opts ...func(*FileIdentityQuery)) *OrgQuery

WithFileIdentities tells the query-builder to eager-load the nodes that are connected to the "file_identities" 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) WithNamedFileIdentities

func (oq *OrgQuery) WithNamedFileIdentities(name string, opts ...func(*FileIdentityQuery)) *OrgQuery

WithNamedFileIdentities tells the query-builder to eager-load the nodes that are connected to the "file_identities" 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) WithNamedOrgQuota

func (oq *OrgQuery) WithNamedOrgQuota(name string, opts ...func(*QuotaQuery)) *OrgQuery

WithNamedOrgQuota tells the query-builder to eager-load the nodes that are connected to the "org_quota" 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) WithOrgQuota

func (oq *OrgQuery) WithOrgQuota(opts ...func(*QuotaQuery)) *OrgQuery

WithOrgQuota tells the query-builder to eager-load the nodes that are connected to the "org_quota" 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) WithUserPasswordPolicy

func (oq *OrgQuery) WithUserPasswordPolicy(opts ...func(*UserPasswordPolicyQuery)) *OrgQuery

WithUserPasswordPolicy tells the query-builder to eager-load the nodes that are connected to the "user_password_policy" 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) ExecContext

func (c *OrgRole) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRole) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableID

func (orc *OrgRoleCreate) SetNillableID(i *int) *OrgRoleCreate

SetNillableID sets the "id" 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) ExecContext

func (c *OrgRoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgRoleDelete) ExecX

func (ord *OrgRoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleDelete) QueryContext

func (c *OrgRoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c OrgRoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OrgRoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableKind

func (oru *OrgRoleUpdate) SetNillableKind(o *orgrole.Kind) *OrgRoleUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*OrgRoleUpdate) SetNillableName

func (oru *OrgRoleUpdate) SetNillableName(s *string) *OrgRoleUpdate

SetNillableName sets the "name" 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) ExecContext

func (c *OrgRoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableKind

func (oruo *OrgRoleUpdateOne) SetNillableKind(o *orgrole.Kind) *OrgRoleUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*OrgRoleUpdateOne) SetNillableName

func (oruo *OrgRoleUpdateOne) SetNillableName(s *string) *OrgRoleUpdateOne

SetNillableName sets the "name" 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) ExecContext

func (c *OrgRoleUser) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgRoleUser) QueryContext

func (c *OrgRoleUser) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgRoleUserDelete) ExecX

func (orud *OrgRoleUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserDelete) QueryContext

func (c *OrgRoleUserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c OrgRoleUserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OrgRoleUserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgRoleUserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableOrgID

func (oruu *OrgRoleUserUpdate) SetNillableOrgID(i *int) *OrgRoleUserUpdate

SetNillableOrgID sets the "org_id" field if the given value is not nil.

func (*OrgRoleUserUpdate) SetNillableOrgRoleID

func (oruu *OrgRoleUserUpdate) SetNillableOrgRoleID(i *int) *OrgRoleUserUpdate

SetNillableOrgRoleID sets the "org_role_id" field if the given value is not nil.

func (*OrgRoleUserUpdate) SetNillableOrgUserID

func (oruu *OrgRoleUserUpdate) SetNillableOrgUserID(i *int) *OrgRoleUserUpdate

SetNillableOrgUserID sets the "org_user_id" field if the given value is not nil.

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) SetNillableUserID

func (oruu *OrgRoleUserUpdate) SetNillableUserID(i *int) *OrgRoleUserUpdate

SetNillableUserID sets the "user_id" 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) ExecContext

func (c *OrgRoleUserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgRoleUserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableOrgID

func (oruuo *OrgRoleUserUpdateOne) SetNillableOrgID(i *int) *OrgRoleUserUpdateOne

SetNillableOrgID sets the "org_id" field if the given value is not nil.

func (*OrgRoleUserUpdateOne) SetNillableOrgRoleID

func (oruuo *OrgRoleUserUpdateOne) SetNillableOrgRoleID(i *int) *OrgRoleUserUpdateOne

SetNillableOrgRoleID sets the "org_role_id" field if the given value is not nil.

func (*OrgRoleUserUpdateOne) SetNillableOrgUserID

func (oruuo *OrgRoleUserUpdateOne) SetNillableOrgUserID(i *int) *OrgRoleUserUpdateOne

SetNillableOrgUserID sets the "org_user_id" field if the given value is not nil.

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) SetNillableUserID

func (oruuo *OrgRoleUserUpdateOne) SetNillableUserID(i *int) *OrgRoleUserUpdateOne

SetNillableUserID sets the "user_id" 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) ExecContext

func (c OrgSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OrgSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) AddFileIdentities

func (ou *OrgUpdate) AddFileIdentities(f ...*FileIdentity) *OrgUpdate

AddFileIdentities adds the "file_identities" edges to the FileIdentity entity.

func (*OrgUpdate) AddFileIdentityIDs

func (ou *OrgUpdate) AddFileIdentityIDs(ids ...int) *OrgUpdate

AddFileIdentityIDs adds the "file_identities" edge to the FileIdentity entity by IDs.

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) AddOrgQuota

func (ou *OrgUpdate) AddOrgQuota(q ...*Quota) *OrgUpdate

AddOrgQuota adds the "org_quota" edges to the Quota entity.

func (*OrgUpdate) AddOrgQuotumIDs

func (ou *OrgUpdate) AddOrgQuotumIDs(ids ...int) *OrgUpdate

AddOrgQuotumIDs adds the "org_quota" edge to the Quota 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) AppendCustomDomain

func (ou *OrgUpdate) AppendCustomDomain(s []string) *OrgUpdate

AppendCustomDomain appends s to the "custom_domain" field.

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) ClearCustomDomain

func (ou *OrgUpdate) ClearCustomDomain() *OrgUpdate

ClearCustomDomain clears the value of the "custom_domain" 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) ClearFileIdentities

func (ou *OrgUpdate) ClearFileIdentities() *OrgUpdate

ClearFileIdentities clears all "file_identities" edges to the FileIdentity entity.

func (*OrgUpdate) ClearLocalCurrency

func (ou *OrgUpdate) ClearLocalCurrency() *OrgUpdate

ClearLocalCurrency clears the value of the "local_currency" field.

func (ou *OrgUpdate) ClearLogo() *OrgUpdate

ClearLogo clears the value of the "logo" field.

func (*OrgUpdate) ClearOrgApp

func (ou *OrgUpdate) ClearOrgApp() *OrgUpdate

ClearOrgApp clears all "org_app" edges to the OrgApp entity.

func (*OrgUpdate) ClearOrgQuota

func (ou *OrgUpdate) ClearOrgQuota() *OrgUpdate

ClearOrgQuota clears all "org_quota" edges to the Quota 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) ClearUserPasswordPolicy

func (ou *OrgUpdate) ClearUserPasswordPolicy() *OrgUpdate

ClearUserPasswordPolicy clears the "user_password_policy" edge to the UserPasswordPolicy entity.

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) ExecContext

func (c *OrgUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemoveFileIdentities

func (ou *OrgUpdate) RemoveFileIdentities(f ...*FileIdentity) *OrgUpdate

RemoveFileIdentities removes "file_identities" edges to FileIdentity entities.

func (*OrgUpdate) RemoveFileIdentityIDs

func (ou *OrgUpdate) RemoveFileIdentityIDs(ids ...int) *OrgUpdate

RemoveFileIdentityIDs removes the "file_identities" edge to FileIdentity entities by IDs.

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) RemoveOrgQuota

func (ou *OrgUpdate) RemoveOrgQuota(q ...*Quota) *OrgUpdate

RemoveOrgQuota removes "org_quota" edges to Quota entities.

func (*OrgUpdate) RemoveOrgQuotumIDs

func (ou *OrgUpdate) RemoveOrgQuotumIDs(ids ...int) *OrgUpdate

RemoveOrgQuotumIDs removes the "org_quota" edge to Quota 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) SetCustomDomain

func (ou *OrgUpdate) SetCustomDomain(s []string) *OrgUpdate

SetCustomDomain sets the "custom_domain" 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) SetLocalCurrency

func (ou *OrgUpdate) SetLocalCurrency(s string) *OrgUpdate

SetLocalCurrency sets the "local_currency" field.

func (ou *OrgUpdate) SetLogo(tl *types.OrgLogo) *OrgUpdate

SetLogo sets the "logo" 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) SetNillableLocalCurrency

func (ou *OrgUpdate) SetNillableLocalCurrency(s *string) *OrgUpdate

SetNillableLocalCurrency sets the "local_currency" field if the given value is not nil.

func (*OrgUpdate) SetNillableName

func (ou *OrgUpdate) SetNillableName(s *string) *OrgUpdate

SetNillableName sets the "name" 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) SetNillableUserPasswordPolicyID

func (ou *OrgUpdate) SetNillableUserPasswordPolicyID(id *int) *OrgUpdate

SetNillableUserPasswordPolicyID sets the "user_password_policy" edge to the UserPasswordPolicy entity by ID 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) SetUserPasswordPolicy

func (ou *OrgUpdate) SetUserPasswordPolicy(u *UserPasswordPolicy) *OrgUpdate

SetUserPasswordPolicy sets the "user_password_policy" edge to the UserPasswordPolicy entity.

func (*OrgUpdate) SetUserPasswordPolicyID

func (ou *OrgUpdate) SetUserPasswordPolicyID(id int) *OrgUpdate

SetUserPasswordPolicyID sets the "user_password_policy" edge to the UserPasswordPolicy entity by ID.

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) AddFileIdentities

func (ouo *OrgUpdateOne) AddFileIdentities(f ...*FileIdentity) *OrgUpdateOne

AddFileIdentities adds the "file_identities" edges to the FileIdentity entity.

func (*OrgUpdateOne) AddFileIdentityIDs

func (ouo *OrgUpdateOne) AddFileIdentityIDs(ids ...int) *OrgUpdateOne

AddFileIdentityIDs adds the "file_identities" edge to the FileIdentity entity by IDs.

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) AddOrgQuota

func (ouo *OrgUpdateOne) AddOrgQuota(q ...*Quota) *OrgUpdateOne

AddOrgQuota adds the "org_quota" edges to the Quota entity.

func (*OrgUpdateOne) AddOrgQuotumIDs

func (ouo *OrgUpdateOne) AddOrgQuotumIDs(ids ...int) *OrgUpdateOne

AddOrgQuotumIDs adds the "org_quota" edge to the Quota 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) AppendCustomDomain

func (ouo *OrgUpdateOne) AppendCustomDomain(s []string) *OrgUpdateOne

AppendCustomDomain appends s to the "custom_domain" field.

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) ClearCustomDomain

func (ouo *OrgUpdateOne) ClearCustomDomain() *OrgUpdateOne

ClearCustomDomain clears the value of the "custom_domain" 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) ClearFileIdentities

func (ouo *OrgUpdateOne) ClearFileIdentities() *OrgUpdateOne

ClearFileIdentities clears all "file_identities" edges to the FileIdentity entity.

func (*OrgUpdateOne) ClearLocalCurrency

func (ouo *OrgUpdateOne) ClearLocalCurrency() *OrgUpdateOne

ClearLocalCurrency clears the value of the "local_currency" field.

func (ouo *OrgUpdateOne) ClearLogo() *OrgUpdateOne

ClearLogo clears the value of the "logo" field.

func (*OrgUpdateOne) ClearOrgApp

func (ouo *OrgUpdateOne) ClearOrgApp() *OrgUpdateOne

ClearOrgApp clears all "org_app" edges to the OrgApp entity.

func (*OrgUpdateOne) ClearOrgQuota

func (ouo *OrgUpdateOne) ClearOrgQuota() *OrgUpdateOne

ClearOrgQuota clears all "org_quota" edges to the Quota 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) ClearUserPasswordPolicy

func (ouo *OrgUpdateOne) ClearUserPasswordPolicy() *OrgUpdateOne

ClearUserPasswordPolicy clears the "user_password_policy" edge to the UserPasswordPolicy entity.

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) ExecContext

func (c *OrgUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemoveFileIdentities

func (ouo *OrgUpdateOne) RemoveFileIdentities(f ...*FileIdentity) *OrgUpdateOne

RemoveFileIdentities removes "file_identities" edges to FileIdentity entities.

func (*OrgUpdateOne) RemoveFileIdentityIDs

func (ouo *OrgUpdateOne) RemoveFileIdentityIDs(ids ...int) *OrgUpdateOne

RemoveFileIdentityIDs removes the "file_identities" edge to FileIdentity entities by IDs.

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) RemoveOrgQuota

func (ouo *OrgUpdateOne) RemoveOrgQuota(q ...*Quota) *OrgUpdateOne

RemoveOrgQuota removes "org_quota" edges to Quota entities.

func (*OrgUpdateOne) RemoveOrgQuotumIDs

func (ouo *OrgUpdateOne) RemoveOrgQuotumIDs(ids ...int) *OrgUpdateOne

RemoveOrgQuotumIDs removes the "org_quota" edge to Quota 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) SetCustomDomain

func (ouo *OrgUpdateOne) SetCustomDomain(s []string) *OrgUpdateOne

SetCustomDomain sets the "custom_domain" 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) SetLocalCurrency

func (ouo *OrgUpdateOne) SetLocalCurrency(s string) *OrgUpdateOne

SetLocalCurrency sets the "local_currency" field.

func (ouo *OrgUpdateOne) SetLogo(tl *types.OrgLogo) *OrgUpdateOne

SetLogo sets the "logo" 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) SetNillableLocalCurrency

func (ouo *OrgUpdateOne) SetNillableLocalCurrency(s *string) *OrgUpdateOne

SetNillableLocalCurrency sets the "local_currency" field if the given value is not nil.

func (*OrgUpdateOne) SetNillableName

func (ouo *OrgUpdateOne) SetNillableName(s *string) *OrgUpdateOne

SetNillableName sets the "name" 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) SetNillableUserPasswordPolicyID

func (ouo *OrgUpdateOne) SetNillableUserPasswordPolicyID(id *int) *OrgUpdateOne

SetNillableUserPasswordPolicyID sets the "user_password_policy" edge to the UserPasswordPolicy entity by ID 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) SetUserPasswordPolicy

func (ouo *OrgUpdateOne) SetUserPasswordPolicy(u *UserPasswordPolicy) *OrgUpdateOne

SetUserPasswordPolicy sets the "user_password_policy" edge to the UserPasswordPolicy entity.

func (*OrgUpdateOne) SetUserPasswordPolicyID

func (ouo *OrgUpdateOne) SetUserPasswordPolicyID(id int) *OrgUpdateOne

SetUserPasswordPolicyID sets the "user_password_policy" edge to the UserPasswordPolicy entity by ID.

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) ClearCustomDomain

func (u *OrgUpsert) ClearCustomDomain() *OrgUpsert

ClearCustomDomain clears the value of the "custom_domain" 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) ClearLocalCurrency

func (u *OrgUpsert) ClearLocalCurrency() *OrgUpsert

ClearLocalCurrency clears the value of the "local_currency" field.

func (u *OrgUpsert) ClearLogo() *OrgUpsert

ClearLogo clears the value of the "logo" 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) SetCustomDomain

func (u *OrgUpsert) SetCustomDomain(v []string) *OrgUpsert

SetCustomDomain sets the "custom_domain" 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) SetLocalCurrency

func (u *OrgUpsert) SetLocalCurrency(v string) *OrgUpsert

SetLocalCurrency sets the "local_currency" field.

func (u *OrgUpsert) SetLogo(v *types.OrgLogo) *OrgUpsert

SetLogo sets the "logo" 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) UpdateCustomDomain

func (u *OrgUpsert) UpdateCustomDomain() *OrgUpsert

UpdateCustomDomain sets the "custom_domain" 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) UpdateLocalCurrency

func (u *OrgUpsert) UpdateLocalCurrency() *OrgUpsert

UpdateLocalCurrency sets the "local_currency" field to the value that was provided on create.

func (u *OrgUpsert) UpdateLogo() *OrgUpsert

UpdateLogo sets the "logo" 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) ClearCustomDomain

func (u *OrgUpsertBulk) ClearCustomDomain() *OrgUpsertBulk

ClearCustomDomain clears the value of the "custom_domain" 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) ClearLocalCurrency

func (u *OrgUpsertBulk) ClearLocalCurrency() *OrgUpsertBulk

ClearLocalCurrency clears the value of the "local_currency" field.

func (u *OrgUpsertBulk) ClearLogo() *OrgUpsertBulk

ClearLogo clears the value of the "logo" 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) SetCustomDomain

func (u *OrgUpsertBulk) SetCustomDomain(v []string) *OrgUpsertBulk

SetCustomDomain sets the "custom_domain" 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) SetLocalCurrency

func (u *OrgUpsertBulk) SetLocalCurrency(v string) *OrgUpsertBulk

SetLocalCurrency sets the "local_currency" field.

func (u *OrgUpsertBulk) SetLogo(v *types.OrgLogo) *OrgUpsertBulk

SetLogo sets the "logo" 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) UpdateCustomDomain

func (u *OrgUpsertBulk) UpdateCustomDomain() *OrgUpsertBulk

UpdateCustomDomain sets the "custom_domain" 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) UpdateLocalCurrency

func (u *OrgUpsertBulk) UpdateLocalCurrency() *OrgUpsertBulk

UpdateLocalCurrency sets the "local_currency" field to the value that was provided on create.

func (u *OrgUpsertBulk) UpdateLogo() *OrgUpsertBulk

UpdateLogo sets the "logo" 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) ClearCustomDomain

func (u *OrgUpsertOne) ClearCustomDomain() *OrgUpsertOne

ClearCustomDomain clears the value of the "custom_domain" 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) ClearLocalCurrency

func (u *OrgUpsertOne) ClearLocalCurrency() *OrgUpsertOne

ClearLocalCurrency clears the value of the "local_currency" field.

func (u *OrgUpsertOne) ClearLogo() *OrgUpsertOne

ClearLogo clears the value of the "logo" 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) SetCustomDomain

func (u *OrgUpsertOne) SetCustomDomain(v []string) *OrgUpsertOne

SetCustomDomain sets the "custom_domain" 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) SetLocalCurrency

func (u *OrgUpsertOne) SetLocalCurrency(v string) *OrgUpsertOne

SetLocalCurrency sets the "local_currency" field.

func (u *OrgUpsertOne) SetLogo(v *types.OrgLogo) *OrgUpsertOne

SetLogo sets the "logo" 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) UpdateCustomDomain

func (u *OrgUpsertOne) UpdateCustomDomain() *OrgUpsertOne

UpdateCustomDomain sets the "custom_domain" 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) UpdateLocalCurrency

func (u *OrgUpsertOne) UpdateLocalCurrency() *OrgUpsertOne

UpdateLocalCurrency sets the "local_currency" field to the value that was provided on create.

func (u *OrgUpsertOne) UpdateLogo() *OrgUpsertOne

UpdateLogo sets the "logo" 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"`
	// 用户类型,区分内部及外部用户
	UserType orguser.UserType `json:"user_type,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) ExecContext

func (c *OrgUser) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUser) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableUserType

func (ouc *OrgUserCreate) SetNillableUserType(ot *orguser.UserType) *OrgUserCreate

SetNillableUserType sets the "user_type" 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.

func (*OrgUserCreate) SetUserType

func (ouc *OrgUserCreate) SetUserType(ot orguser.UserType) *OrgUserCreate

SetUserType sets the "user_type" 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) ExecContext

func (c *OrgUserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgUserDelete) ExecX

func (oud *OrgUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserDelete) QueryContext

func (c *OrgUserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) OldUserType

func (m *OrgUserMutation) OldUserType(ctx context.Context) (v orguser.UserType, err error)

OldUserType returns the old "user_type" 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) QueryContext

func (c *OrgUserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ResetUserType

func (m *OrgUserMutation) ResetUserType()

ResetUserType resets all changes to the "user_type" 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) SetUserType

func (m *OrgUserMutation) SetUserType(ot orguser.UserType)

SetUserType sets the "user_type" 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) UserType

func (m *OrgUserMutation) UserType() (r orguser.UserType, exists bool)

UserType returns the value of the "user_type" field in the mutation.

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"`
	// 客户端偏好设置
	ClientPreferences []types.ClientPreference `json:"client_preferences,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) ExecContext

func (c *OrgUserPreference) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserPreference) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserPreferenceClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserPreferenceClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserPreferenceCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserPreferenceCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetClientPreferences

func (oupc *OrgUserPreferenceCreate) SetClientPreferences(tp []types.ClientPreference) *OrgUserPreferenceCreate

SetClientPreferences sets the "client_preferences" field.

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) ExecContext

func (c *OrgUserPreferenceCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserPreferenceCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserPreferenceDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrgUserPreferenceDelete) ExecX

func (oupd *OrgUserPreferenceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgUserPreferenceDelete) QueryContext

func (c *OrgUserPreferenceDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) AppendClientPreferences

func (m *OrgUserPreferenceMutation) AppendClientPreferences(tp []types.ClientPreference)

AppendClientPreferences adds tp to the "client_preferences" field.

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) AppendedClientPreferences

func (m *OrgUserPreferenceMutation) AppendedClientPreferences() ([]types.ClientPreference, bool)

AppendedClientPreferences returns the list of values that were appended to the "client_preferences" field in this mutation.

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) ClearClientPreferences

func (m *OrgUserPreferenceMutation) ClearClientPreferences()

ClearClientPreferences clears the value of the "client_preferences" field.

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) ClientPreferences

func (m *OrgUserPreferenceMutation) ClientPreferences() (r []types.ClientPreference, exists bool)

ClientPreferences returns the value of the "client_preferences" field in the mutation.

func (*OrgUserPreferenceMutation) ClientPreferencesCleared

func (m *OrgUserPreferenceMutation) ClientPreferencesCleared() bool

ClientPreferencesCleared returns if the "client_preferences" field was cleared in this mutation.

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) ExecContext

func (c *OrgUserPreferenceMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) OldClientPreferences

func (m *OrgUserPreferenceMutation) OldClientPreferences(ctx context.Context) (v []types.ClientPreference, err error)

OldClientPreferences returns the old "client_preferences" 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) 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) QueryContext

func (c *OrgUserPreferenceMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ResetClientPreferences

func (m *OrgUserPreferenceMutation) ResetClientPreferences()

ResetClientPreferences resets all changes to the "client_preferences" field.

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) SetClientPreferences

func (m *OrgUserPreferenceMutation) SetClientPreferences(tp []types.ClientPreference)

SetClientPreferences sets the "client_preferences" 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) ExecContext

func (c *OrgUserPreferenceQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserPreferenceQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c OrgUserPreferenceSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OrgUserPreferenceSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) AppendClientPreferences

func (oupu *OrgUserPreferenceUpdate) AppendClientPreferences(tp []types.ClientPreference) *OrgUserPreferenceUpdate

AppendClientPreferences appends tp to the "client_preferences" 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) ClearClientPreferences

func (oupu *OrgUserPreferenceUpdate) ClearClientPreferences() *OrgUserPreferenceUpdate

ClearClientPreferences clears the value of the "client_preferences" 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) ExecContext

func (c *OrgUserPreferenceUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserPreferenceUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetClientPreferences

func (oupu *OrgUserPreferenceUpdate) SetClientPreferences(tp []types.ClientPreference) *OrgUserPreferenceUpdate

SetClientPreferences sets the "client_preferences" field.

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) SetNillableUserID

func (oupu *OrgUserPreferenceUpdate) SetNillableUserID(i *int) *OrgUserPreferenceUpdate

SetNillableUserID sets the "user_id" 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) AppendClientPreferences

func (oupuo *OrgUserPreferenceUpdateOne) AppendClientPreferences(tp []types.ClientPreference) *OrgUserPreferenceUpdateOne

AppendClientPreferences appends tp to the "client_preferences" 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) ClearClientPreferences

func (oupuo *OrgUserPreferenceUpdateOne) ClearClientPreferences() *OrgUserPreferenceUpdateOne

ClearClientPreferences clears the value of the "client_preferences" 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) ExecContext

func (c *OrgUserPreferenceUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserPreferenceUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetClientPreferences

SetClientPreferences sets the "client_preferences" field.

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) SetNillableUserID

func (oupuo *OrgUserPreferenceUpdateOne) SetNillableUserID(i *int) *OrgUserPreferenceUpdateOne

SetNillableUserID sets the "user_id" 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) ClearClientPreferences

func (u *OrgUserPreferenceUpsert) ClearClientPreferences() *OrgUserPreferenceUpsert

ClearClientPreferences clears the value of the "client_preferences" 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) SetClientPreferences

SetClientPreferences sets the "client_preferences" 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) UpdateClientPreferences

func (u *OrgUserPreferenceUpsert) UpdateClientPreferences() *OrgUserPreferenceUpsert

UpdateClientPreferences sets the "client_preferences" field to the value that was provided on create.

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) ClearClientPreferences

func (u *OrgUserPreferenceUpsertBulk) ClearClientPreferences() *OrgUserPreferenceUpsertBulk

ClearClientPreferences clears the value of the "client_preferences" 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) SetClientPreferences

SetClientPreferences sets the "client_preferences" field.

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) UpdateClientPreferences

func (u *OrgUserPreferenceUpsertBulk) UpdateClientPreferences() *OrgUserPreferenceUpsertBulk

UpdateClientPreferences sets the "client_preferences" field to the value that was provided on create.

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) ClearClientPreferences

func (u *OrgUserPreferenceUpsertOne) ClearClientPreferences() *OrgUserPreferenceUpsertOne

ClearClientPreferences clears the value of the "client_preferences" 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) SetClientPreferences

SetClientPreferences sets the "client_preferences" field.

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) UpdateClientPreferences

func (u *OrgUserPreferenceUpsertOne) UpdateClientPreferences() *OrgUserPreferenceUpsertOne

UpdateClientPreferences sets the "client_preferences" field to the value that was provided on create.

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) ExecContext

func (c *OrgUserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c OrgUserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c OrgUserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrgUserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableDisplayName

func (ouu *OrgUserUpdate) SetNillableDisplayName(s *string) *OrgUserUpdate

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

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) SetNillableOrgID

func (ouu *OrgUserUpdate) SetNillableOrgID(i *int) *OrgUserUpdate

SetNillableOrgID sets the "org_id" 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) SetNillableUserID

func (ouu *OrgUserUpdate) SetNillableUserID(i *int) *OrgUserUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OrgUserUpdate) SetNillableUserType

func (ouu *OrgUserUpdate) SetNillableUserType(ot *orguser.UserType) *OrgUserUpdate

SetNillableUserType sets the "user_type" 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) SetUserType

func (ouu *OrgUserUpdate) SetUserType(ot orguser.UserType) *OrgUserUpdate

SetUserType sets the "user_type" 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) ExecContext

func (c *OrgUserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrgUserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableDisplayName

func (ouuo *OrgUserUpdateOne) SetNillableDisplayName(s *string) *OrgUserUpdateOne

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

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) SetNillableOrgID

func (ouuo *OrgUserUpdateOne) SetNillableOrgID(i *int) *OrgUserUpdateOne

SetNillableOrgID sets the "org_id" 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) SetNillableUserID

func (ouuo *OrgUserUpdateOne) SetNillableUserID(i *int) *OrgUserUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*OrgUserUpdateOne) SetNillableUserType

func (ouuo *OrgUserUpdateOne) SetNillableUserType(ot *orguser.UserType) *OrgUserUpdateOne

SetNillableUserType sets the "user_type" 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) SetUserType

func (ouuo *OrgUserUpdateOne) SetUserType(ot orguser.UserType) *OrgUserUpdateOne

SetUserType sets the "user_type" 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) SetUserType

func (u *OrgUserUpsert) SetUserType(v orguser.UserType) *OrgUserUpsert

SetUserType sets the "user_type" 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.

func (*OrgUserUpsert) UpdateUserType

func (u *OrgUserUpsert) UpdateUserType() *OrgUserUpsert

UpdateUserType sets the "user_type" 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) SetUserType

SetUserType sets the "user_type" 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.

func (*OrgUserUpsertBulk) UpdateUserType

func (u *OrgUserUpsertBulk) UpdateUserType() *OrgUserUpsertBulk

UpdateUserType sets the "user_type" 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) SetUserType

SetUserType sets the "user_type" 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.

func (*OrgUserUpsertOne) UpdateUserType

func (u *OrgUserUpsertOne) UpdateUserType() *OrgUserUpsertOne

UpdateUserType sets the "user_type" 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"`

	// "user_type" field predicates.
	UserType      *orguser.UserType  `json:"userType,omitempty"`
	UserTypeNEQ   *orguser.UserType  `json:"userTypeNEQ,omitempty"`
	UserTypeIn    []orguser.UserType `json:"userTypeIn,omitempty"`
	UserTypeNotIn []orguser.UserType `json:"userTypeNotIn,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"`

	// "local_currency" field predicates.
	LocalCurrency             *string  `json:"localCurrency,omitempty"`
	LocalCurrencyNEQ          *string  `json:"localCurrencyNEQ,omitempty"`
	LocalCurrencyIn           []string `json:"localCurrencyIn,omitempty"`
	LocalCurrencyNotIn        []string `json:"localCurrencyNotIn,omitempty"`
	LocalCurrencyGT           *string  `json:"localCurrencyGT,omitempty"`
	LocalCurrencyGTE          *string  `json:"localCurrencyGTE,omitempty"`
	LocalCurrencyLT           *string  `json:"localCurrencyLT,omitempty"`
	LocalCurrencyLTE          *string  `json:"localCurrencyLTE,omitempty"`
	LocalCurrencyContains     *string  `json:"localCurrencyContains,omitempty"`
	LocalCurrencyHasPrefix    *string  `json:"localCurrencyHasPrefix,omitempty"`
	LocalCurrencyHasSuffix    *string  `json:"localCurrencyHasSuffix,omitempty"`
	LocalCurrencyIsNil        bool     `json:"localCurrencyIsNil,omitempty"`
	LocalCurrencyNotNil       bool     `json:"localCurrencyNotNil,omitempty"`
	LocalCurrencyEqualFold    *string  `json:"localCurrencyEqualFold,omitempty"`
	LocalCurrencyContainsFold *string  `json:"localCurrencyContainsFold,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"`

	// "file_identities" edge predicates.
	HasFileIdentities     *bool                     `json:"hasFileIdentities,omitempty"`
	HasFileIdentitiesWith []*FileIdentityWhereInput `json:"hasFileIdentitiesWith,omitempty"`

	// "user_password_policy" edge predicates.
	HasUserPasswordPolicy     *bool                           `json:"hasUserPasswordPolicy,omitempty"`
	HasUserPasswordPolicyWith []*UserPasswordPolicyWhereInput `json:"hasUserPasswordPolicyWith,omitempty"`

	// "org_quota" edge predicates.
	HasOrgQuota     *bool              `json:"hasOrgQuota,omitempty"`
	HasOrgQuotaWith []*QuotaWhereInput `json:"hasOrgQuotaWith,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) ExecContext

func (c *Permission) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *Permission) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *PermissionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *PermissionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *PermissionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PermissionDelete) ExecX

func (pd *PermissionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PermissionDelete) QueryContext

func (c *PermissionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *PermissionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *PermissionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c PermissionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c PermissionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *PermissionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *PermissionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *PermissionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 Quota

type Quota 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,来源于root的组织ID.
	TenantID int `json:"tenant_id,omitempty"`
	// 来源于用户ID
	UserID int `json:"user_id,omitempty"`
	// 配额项ID
	QuotaItemID int `json:"quota_item_id,omitempty"`
	// 限制值
	Limit int64 `json:"limit,omitempty"`
	// 已使用值
	Used int64 `json:"used,omitempty"`
	// 生效时间
	StartAt time.Time `json:"start_at,omitempty"`
	// 过期时间
	EndAt time.Time `json:"end_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the QuotaQuery when eager-loading is set.
	Edges QuotaEdges `json:"edges"`
	// contains filtered or unexported fields
}

Quota is the model entity for the Quota schema.

func (*Quota) ExecContext

func (c *Quota) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Quota) GlobalID

func (q *Quota) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Quota node.

func (*Quota) IsNode

func (*Quota) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Quota) QueryContext

func (c *Quota) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Quota) QueryQuotaItem

func (q *Quota) QueryQuotaItem() *QuotaItemQuery

QueryQuotaItem queries the "quota_item" edge of the Quota entity.

func (*Quota) QueryQuotaOrg

func (q *Quota) QueryQuotaOrg() *OrgQuery

QueryQuotaOrg queries the "quota_org" edge of the Quota entity.

func (*Quota) QueryQuotaUser

func (q *Quota) QueryQuotaUser() *UserQuery

QueryQuotaUser queries the "quota_user" edge of the Quota entity.

func (*Quota) QuotaItem

func (q *Quota) QuotaItem(ctx context.Context) (*QuotaItem, error)

func (*Quota) QuotaOrg

func (q *Quota) QuotaOrg(ctx context.Context) (*Org, error)

func (*Quota) QuotaUser

func (q *Quota) QuotaUser(ctx context.Context) (*User, error)

func (*Quota) String

func (q *Quota) String() string

String implements the fmt.Stringer.

func (*Quota) ToEdge

func (q *Quota) ToEdge(order *QuotaOrder) *QuotaEdge

ToEdge converts Quota into QuotaEdge.

func (*Quota) Unwrap

func (q *Quota) Unwrap() *Quota

Unwrap unwraps the Quota 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 (*Quota) Update

func (q *Quota) Update() *QuotaUpdateOne

Update returns a builder for updating this Quota. Note that you need to call Quota.Unwrap() before calling this method if this Quota was returned from a transaction, and the transaction was committed or rolled back.

func (*Quota) Value

func (q *Quota) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Quota. This includes values selected through modifiers, order, etc.

type QuotaClient

type QuotaClient struct {
	// contains filtered or unexported fields
}

QuotaClient is a client for the Quota schema.

func NewQuotaClient

func NewQuotaClient(c config) *QuotaClient

NewQuotaClient returns a client for the Quota from the given config.

func (*QuotaClient) Create

func (c *QuotaClient) Create() *QuotaCreate

Create returns a builder for creating a Quota entity.

func (*QuotaClient) CreateBulk

func (c *QuotaClient) CreateBulk(builders ...*QuotaCreate) *QuotaCreateBulk

CreateBulk returns a builder for creating a bulk of Quota entities.

func (*QuotaClient) Delete

func (c *QuotaClient) Delete() *QuotaDelete

Delete returns a delete builder for Quota.

func (*QuotaClient) DeleteOne

func (c *QuotaClient) DeleteOne(q *Quota) *QuotaDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*QuotaClient) DeleteOneID

func (c *QuotaClient) DeleteOneID(id int) *QuotaDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*QuotaClient) ExecContext

func (c *QuotaClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaClient) Get

func (c *QuotaClient) Get(ctx context.Context, id int) (*Quota, error)

Get returns a Quota entity by its id.

func (*QuotaClient) GetX

func (c *QuotaClient) GetX(ctx context.Context, id int) *Quota

GetX is like Get, but panics if an error occurs.

func (*QuotaClient) Hooks

func (c *QuotaClient) Hooks() []Hook

Hooks returns the client hooks.

func (*QuotaClient) Intercept

func (c *QuotaClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `quota.Intercept(f(g(h())))`.

func (*QuotaClient) Interceptors

func (c *QuotaClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*QuotaClient) MapCreateBulk

func (c *QuotaClient) MapCreateBulk(slice any, setFunc func(*QuotaCreate, int)) *QuotaCreateBulk

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 (*QuotaClient) Query

func (c *QuotaClient) Query() *QuotaQuery

Query returns a query builder for Quota.

func (*QuotaClient) QueryContext

func (c *QuotaClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaClient) QueryQuotaItem

func (c *QuotaClient) QueryQuotaItem(q *Quota) *QuotaItemQuery

QueryQuotaItem queries the quota_item edge of a Quota.

func (*QuotaClient) QueryQuotaOrg

func (c *QuotaClient) QueryQuotaOrg(q *Quota) *OrgQuery

QueryQuotaOrg queries the quota_org edge of a Quota.

func (*QuotaClient) QueryQuotaUser

func (c *QuotaClient) QueryQuotaUser(q *Quota) *UserQuery

QueryQuotaUser queries the quota_user edge of a Quota.

func (*QuotaClient) Update

func (c *QuotaClient) Update() *QuotaUpdate

Update returns an update builder for Quota.

func (*QuotaClient) UpdateOne

func (c *QuotaClient) UpdateOne(q *Quota) *QuotaUpdateOne

UpdateOne returns an update builder for the given entity.

func (*QuotaClient) UpdateOneID

func (c *QuotaClient) UpdateOneID(id int) *QuotaUpdateOne

UpdateOneID returns an update builder for the given id.

func (*QuotaClient) Use

func (c *QuotaClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `quota.Hooks(f(g(h())))`.

type QuotaConnection

type QuotaConnection struct {
	Edges      []*QuotaEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

QuotaConnection is the connection containing edges to Quota.

type QuotaCreate

type QuotaCreate struct {
	// contains filtered or unexported fields
}

QuotaCreate is the builder for creating a Quota entity.

func (*QuotaCreate) Exec

func (qc *QuotaCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaCreate) ExecContext

func (c *QuotaCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaCreate) ExecX

func (qc *QuotaCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaCreate) Mutation

func (qc *QuotaCreate) Mutation() *QuotaMutation

Mutation returns the QuotaMutation object of the builder.

func (*QuotaCreate) OnConflict

func (qc *QuotaCreate) OnConflict(opts ...sql.ConflictOption) *QuotaUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Quota.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.QuotaUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*QuotaCreate) OnConflictColumns

func (qc *QuotaCreate) OnConflictColumns(columns ...string) *QuotaUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Quota.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*QuotaCreate) QueryContext

func (c *QuotaCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaCreate) Save

func (qc *QuotaCreate) Save(ctx context.Context) (*Quota, error)

Save creates the Quota in the database.

func (*QuotaCreate) SaveX

func (qc *QuotaCreate) SaveX(ctx context.Context) *Quota

SaveX calls Save and panics if Save returns an error.

func (*QuotaCreate) SetCreatedAt

func (qc *QuotaCreate) SetCreatedAt(t time.Time) *QuotaCreate

SetCreatedAt sets the "created_at" field.

func (*QuotaCreate) SetCreatedBy

func (qc *QuotaCreate) SetCreatedBy(i int) *QuotaCreate

SetCreatedBy sets the "created_by" field.

func (*QuotaCreate) SetEndAt

func (qc *QuotaCreate) SetEndAt(t time.Time) *QuotaCreate

SetEndAt sets the "end_at" field.

func (*QuotaCreate) SetID

func (qc *QuotaCreate) SetID(i int) *QuotaCreate

SetID sets the "id" field.

func (*QuotaCreate) SetInput

func (c *QuotaCreate) SetInput(i CreateQuotaInput) *QuotaCreate

SetInput applies the change-set in the CreateQuotaInput on the QuotaCreate builder.

func (*QuotaCreate) SetLimit

func (qc *QuotaCreate) SetLimit(i int64) *QuotaCreate

SetLimit sets the "limit" field.

func (*QuotaCreate) SetNillableCreatedAt

func (qc *QuotaCreate) SetNillableCreatedAt(t *time.Time) *QuotaCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*QuotaCreate) SetNillableEndAt

func (qc *QuotaCreate) SetNillableEndAt(t *time.Time) *QuotaCreate

SetNillableEndAt sets the "end_at" field if the given value is not nil.

func (*QuotaCreate) SetNillableQuotaOrgID

func (qc *QuotaCreate) SetNillableQuotaOrgID(id *int) *QuotaCreate

SetNillableQuotaOrgID sets the "quota_org" edge to the Org entity by ID if the given value is not nil.

func (*QuotaCreate) SetNillableQuotaUserID

func (qc *QuotaCreate) SetNillableQuotaUserID(id *int) *QuotaCreate

SetNillableQuotaUserID sets the "quota_user" edge to the User entity by ID if the given value is not nil.

func (*QuotaCreate) SetNillableStartAt

func (qc *QuotaCreate) SetNillableStartAt(t *time.Time) *QuotaCreate

SetNillableStartAt sets the "start_at" field if the given value is not nil.

func (*QuotaCreate) SetNillableTenantID

func (qc *QuotaCreate) SetNillableTenantID(i *int) *QuotaCreate

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*QuotaCreate) SetNillableUpdatedAt

func (qc *QuotaCreate) SetNillableUpdatedAt(t *time.Time) *QuotaCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*QuotaCreate) SetNillableUpdatedBy

func (qc *QuotaCreate) SetNillableUpdatedBy(i *int) *QuotaCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*QuotaCreate) SetNillableUsed

func (qc *QuotaCreate) SetNillableUsed(i *int64) *QuotaCreate

SetNillableUsed sets the "used" field if the given value is not nil.

func (*QuotaCreate) SetNillableUserID

func (qc *QuotaCreate) SetNillableUserID(i *int) *QuotaCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*QuotaCreate) SetQuotaItem

func (qc *QuotaCreate) SetQuotaItem(q *QuotaItem) *QuotaCreate

SetQuotaItem sets the "quota_item" edge to the QuotaItem entity.

func (*QuotaCreate) SetQuotaItemID

func (qc *QuotaCreate) SetQuotaItemID(i int) *QuotaCreate

SetQuotaItemID sets the "quota_item_id" field.

func (*QuotaCreate) SetQuotaOrg

func (qc *QuotaCreate) SetQuotaOrg(o *Org) *QuotaCreate

SetQuotaOrg sets the "quota_org" edge to the Org entity.

func (*QuotaCreate) SetQuotaOrgID

func (qc *QuotaCreate) SetQuotaOrgID(id int) *QuotaCreate

SetQuotaOrgID sets the "quota_org" edge to the Org entity by ID.

func (*QuotaCreate) SetQuotaUser

func (qc *QuotaCreate) SetQuotaUser(u *User) *QuotaCreate

SetQuotaUser sets the "quota_user" edge to the User entity.

func (*QuotaCreate) SetQuotaUserID

func (qc *QuotaCreate) SetQuotaUserID(id int) *QuotaCreate

SetQuotaUserID sets the "quota_user" edge to the User entity by ID.

func (*QuotaCreate) SetStartAt

func (qc *QuotaCreate) SetStartAt(t time.Time) *QuotaCreate

SetStartAt sets the "start_at" field.

func (*QuotaCreate) SetTenantID

func (qc *QuotaCreate) SetTenantID(i int) *QuotaCreate

SetTenantID sets the "tenant_id" field.

func (*QuotaCreate) SetUpdatedAt

func (qc *QuotaCreate) SetUpdatedAt(t time.Time) *QuotaCreate

SetUpdatedAt sets the "updated_at" field.

func (*QuotaCreate) SetUpdatedBy

func (qc *QuotaCreate) SetUpdatedBy(i int) *QuotaCreate

SetUpdatedBy sets the "updated_by" field.

func (*QuotaCreate) SetUsed

func (qc *QuotaCreate) SetUsed(i int64) *QuotaCreate

SetUsed sets the "used" field.

func (*QuotaCreate) SetUserID

func (qc *QuotaCreate) SetUserID(i int) *QuotaCreate

SetUserID sets the "user_id" field.

type QuotaCreateBulk

type QuotaCreateBulk struct {
	// contains filtered or unexported fields
}

QuotaCreateBulk is the builder for creating many Quota entities in bulk.

func (*QuotaCreateBulk) Exec

func (qcb *QuotaCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaCreateBulk) ExecContext

func (c *QuotaCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaCreateBulk) ExecX

func (qcb *QuotaCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaCreateBulk) OnConflict

func (qcb *QuotaCreateBulk) OnConflict(opts ...sql.ConflictOption) *QuotaUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Quota.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.QuotaUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*QuotaCreateBulk) OnConflictColumns

func (qcb *QuotaCreateBulk) OnConflictColumns(columns ...string) *QuotaUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Quota.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*QuotaCreateBulk) QueryContext

func (c *QuotaCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaCreateBulk) Save

func (qcb *QuotaCreateBulk) Save(ctx context.Context) ([]*Quota, error)

Save creates the Quota entities in the database.

func (*QuotaCreateBulk) SaveX

func (qcb *QuotaCreateBulk) SaveX(ctx context.Context) []*Quota

SaveX is like Save, but panics if an error occurs.

type QuotaDelete

type QuotaDelete struct {
	// contains filtered or unexported fields
}

QuotaDelete is the builder for deleting a Quota entity.

func (*QuotaDelete) Exec

func (qd *QuotaDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*QuotaDelete) ExecContext

func (c *QuotaDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaDelete) ExecX

func (qd *QuotaDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*QuotaDelete) QueryContext

func (c *QuotaDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaDelete) Where

func (qd *QuotaDelete) Where(ps ...predicate.Quota) *QuotaDelete

Where appends a list predicates to the QuotaDelete builder.

type QuotaDeleteOne

type QuotaDeleteOne struct {
	// contains filtered or unexported fields
}

QuotaDeleteOne is the builder for deleting a single Quota entity.

func (*QuotaDeleteOne) Exec

func (qdo *QuotaDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*QuotaDeleteOne) ExecX

func (qdo *QuotaDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaDeleteOne) Where

func (qdo *QuotaDeleteOne) Where(ps ...predicate.Quota) *QuotaDeleteOne

Where appends a list predicates to the QuotaDelete builder.

type QuotaEdge

type QuotaEdge struct {
	Node   *Quota `json:"node"`
	Cursor Cursor `json:"cursor"`
}

QuotaEdge is the edge representation of Quota.

type QuotaEdges

type QuotaEdges struct {
	// 配额定义
	QuotaItem *QuotaItem `json:"quota_item,omitempty"`
	// 配额关联租户
	QuotaOrg *Org `json:"quota_org,omitempty"`
	// 配额关联用户
	QuotaUser *User `json:"quota_user,omitempty"`
	// contains filtered or unexported fields
}

QuotaEdges holds the relations/edges for other nodes in the graph.

func (QuotaEdges) QuotaItemOrErr

func (e QuotaEdges) QuotaItemOrErr() (*QuotaItem, error)

QuotaItemOrErr returns the QuotaItem value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (QuotaEdges) QuotaOrgOrErr

func (e QuotaEdges) QuotaOrgOrErr() (*Org, error)

QuotaOrgOrErr returns the QuotaOrg value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (QuotaEdges) QuotaUserOrErr

func (e QuotaEdges) QuotaUserOrErr() (*User, error)

QuotaUserOrErr returns the QuotaUser value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type QuotaGroupBy

type QuotaGroupBy struct {
	// contains filtered or unexported fields
}

QuotaGroupBy is the group-by builder for Quota entities.

func (*QuotaGroupBy) Aggregate

func (qgb *QuotaGroupBy) Aggregate(fns ...AggregateFunc) *QuotaGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*QuotaGroupBy) Bool

func (s *QuotaGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) BoolX

func (s *QuotaGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*QuotaGroupBy) Bools

func (s *QuotaGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) BoolsX

func (s *QuotaGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*QuotaGroupBy) Float64

func (s *QuotaGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) Float64X

func (s *QuotaGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*QuotaGroupBy) Float64s

func (s *QuotaGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) Float64sX

func (s *QuotaGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*QuotaGroupBy) Int

func (s *QuotaGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) IntX

func (s *QuotaGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*QuotaGroupBy) Ints

func (s *QuotaGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) IntsX

func (s *QuotaGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*QuotaGroupBy) Scan

func (qgb *QuotaGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*QuotaGroupBy) ScanX

func (s *QuotaGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*QuotaGroupBy) String

func (s *QuotaGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) StringX

func (s *QuotaGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*QuotaGroupBy) Strings

func (s *QuotaGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*QuotaGroupBy) StringsX

func (s *QuotaGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type QuotaItem

type QuotaItem 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"`
	// 配额项代码,如: users,orgs
	Code string `json:"code,omitempty"`
	// 配额项名称
	Name string `json:"name,omitempty"`
	// 描述
	Description string `json:"description,omitempty"`
	// 资源类型
	ResourceType quotaitem.ResourceType `json:"resource_type,omitempty"`
	// 单位,如: 个,MB,GB
	Unit string `json:"unit,omitempty"`
	// 是否启用
	Active bool `json:"active,omitempty"`
	// 默认限制值
	DefaultLimit int64 `json:"default_limit,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the QuotaItemQuery when eager-loading is set.
	Edges QuotaItemEdges `json:"edges"`
	// contains filtered or unexported fields
}

QuotaItem is the model entity for the QuotaItem schema.

func (*QuotaItem) ExecContext

func (c *QuotaItem) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItem) GlobalID

func (qi *QuotaItem) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given QuotaItem node.

func (*QuotaItem) IsNode

func (*QuotaItem) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*QuotaItem) NamedQuota

func (qi *QuotaItem) NamedQuota(name string) ([]*Quota, error)

NamedQuota returns the Quota named value or an error if the edge was not loaded in eager-loading with this name.

func (*QuotaItem) QueryContext

func (c *QuotaItem) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItem) QueryQuota

func (qi *QuotaItem) QueryQuota() *QuotaQuery

QueryQuota queries the "quota" edge of the QuotaItem entity.

func (*QuotaItem) Quota

func (qi *QuotaItem) Quota(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *QuotaOrder, where *QuotaWhereInput,
) (*QuotaConnection, error)

func (*QuotaItem) String

func (qi *QuotaItem) String() string

String implements the fmt.Stringer.

func (*QuotaItem) ToEdge

func (qi *QuotaItem) ToEdge(order *QuotaItemOrder) *QuotaItemEdge

ToEdge converts QuotaItem into QuotaItemEdge.

func (*QuotaItem) Unwrap

func (qi *QuotaItem) Unwrap() *QuotaItem

Unwrap unwraps the QuotaItem 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 (*QuotaItem) Update

func (qi *QuotaItem) Update() *QuotaItemUpdateOne

Update returns a builder for updating this QuotaItem. Note that you need to call QuotaItem.Unwrap() before calling this method if this QuotaItem was returned from a transaction, and the transaction was committed or rolled back.

func (*QuotaItem) Value

func (qi *QuotaItem) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the QuotaItem. This includes values selected through modifiers, order, etc.

type QuotaItemClient

type QuotaItemClient struct {
	// contains filtered or unexported fields
}

QuotaItemClient is a client for the QuotaItem schema.

func NewQuotaItemClient

func NewQuotaItemClient(c config) *QuotaItemClient

NewQuotaItemClient returns a client for the QuotaItem from the given config.

func (*QuotaItemClient) Create

func (c *QuotaItemClient) Create() *QuotaItemCreate

Create returns a builder for creating a QuotaItem entity.

func (*QuotaItemClient) CreateBulk

func (c *QuotaItemClient) CreateBulk(builders ...*QuotaItemCreate) *QuotaItemCreateBulk

CreateBulk returns a builder for creating a bulk of QuotaItem entities.

func (*QuotaItemClient) Delete

func (c *QuotaItemClient) Delete() *QuotaItemDelete

Delete returns a delete builder for QuotaItem.

func (*QuotaItemClient) DeleteOne

func (c *QuotaItemClient) DeleteOne(qi *QuotaItem) *QuotaItemDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*QuotaItemClient) DeleteOneID

func (c *QuotaItemClient) DeleteOneID(id int) *QuotaItemDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*QuotaItemClient) ExecContext

func (c *QuotaItemClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemClient) Get

func (c *QuotaItemClient) Get(ctx context.Context, id int) (*QuotaItem, error)

Get returns a QuotaItem entity by its id.

func (*QuotaItemClient) GetX

func (c *QuotaItemClient) GetX(ctx context.Context, id int) *QuotaItem

GetX is like Get, but panics if an error occurs.

func (*QuotaItemClient) Hooks

func (c *QuotaItemClient) Hooks() []Hook

Hooks returns the client hooks.

func (*QuotaItemClient) Intercept

func (c *QuotaItemClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `quotaitem.Intercept(f(g(h())))`.

func (*QuotaItemClient) Interceptors

func (c *QuotaItemClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*QuotaItemClient) MapCreateBulk

func (c *QuotaItemClient) MapCreateBulk(slice any, setFunc func(*QuotaItemCreate, int)) *QuotaItemCreateBulk

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 (*QuotaItemClient) Query

func (c *QuotaItemClient) Query() *QuotaItemQuery

Query returns a query builder for QuotaItem.

func (*QuotaItemClient) QueryContext

func (c *QuotaItemClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemClient) QueryQuota

func (c *QuotaItemClient) QueryQuota(qi *QuotaItem) *QuotaQuery

QueryQuota queries the quota edge of a QuotaItem.

func (*QuotaItemClient) Update

func (c *QuotaItemClient) Update() *QuotaItemUpdate

Update returns an update builder for QuotaItem.

func (*QuotaItemClient) UpdateOne

func (c *QuotaItemClient) UpdateOne(qi *QuotaItem) *QuotaItemUpdateOne

UpdateOne returns an update builder for the given entity.

func (*QuotaItemClient) UpdateOneID

func (c *QuotaItemClient) UpdateOneID(id int) *QuotaItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*QuotaItemClient) Use

func (c *QuotaItemClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `quotaitem.Hooks(f(g(h())))`.

type QuotaItemConnection

type QuotaItemConnection struct {
	Edges      []*QuotaItemEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

QuotaItemConnection is the connection containing edges to QuotaItem.

type QuotaItemCreate

type QuotaItemCreate struct {
	// contains filtered or unexported fields
}

QuotaItemCreate is the builder for creating a QuotaItem entity.

func (*QuotaItemCreate) AddQuota

func (qic *QuotaItemCreate) AddQuota(q ...*Quota) *QuotaItemCreate

AddQuota adds the "quota" edges to the Quota entity.

func (*QuotaItemCreate) AddQuotumIDs

func (qic *QuotaItemCreate) AddQuotumIDs(ids ...int) *QuotaItemCreate

AddQuotumIDs adds the "quota" edge to the Quota entity by IDs.

func (*QuotaItemCreate) Exec

func (qic *QuotaItemCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaItemCreate) ExecContext

func (c *QuotaItemCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemCreate) ExecX

func (qic *QuotaItemCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemCreate) Mutation

func (qic *QuotaItemCreate) Mutation() *QuotaItemMutation

Mutation returns the QuotaItemMutation object of the builder.

func (*QuotaItemCreate) OnConflict

func (qic *QuotaItemCreate) OnConflict(opts ...sql.ConflictOption) *QuotaItemUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.QuotaItem.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.QuotaItemUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*QuotaItemCreate) OnConflictColumns

func (qic *QuotaItemCreate) OnConflictColumns(columns ...string) *QuotaItemUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.QuotaItem.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*QuotaItemCreate) QueryContext

func (c *QuotaItemCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemCreate) Save

func (qic *QuotaItemCreate) Save(ctx context.Context) (*QuotaItem, error)

Save creates the QuotaItem in the database.

func (*QuotaItemCreate) SaveX

func (qic *QuotaItemCreate) SaveX(ctx context.Context) *QuotaItem

SaveX calls Save and panics if Save returns an error.

func (*QuotaItemCreate) SetActive

func (qic *QuotaItemCreate) SetActive(b bool) *QuotaItemCreate

SetActive sets the "active" field.

func (*QuotaItemCreate) SetCode

func (qic *QuotaItemCreate) SetCode(s string) *QuotaItemCreate

SetCode sets the "code" field.

func (*QuotaItemCreate) SetCreatedAt

func (qic *QuotaItemCreate) SetCreatedAt(t time.Time) *QuotaItemCreate

SetCreatedAt sets the "created_at" field.

func (*QuotaItemCreate) SetCreatedBy

func (qic *QuotaItemCreate) SetCreatedBy(i int) *QuotaItemCreate

SetCreatedBy sets the "created_by" field.

func (*QuotaItemCreate) SetDefaultLimit

func (qic *QuotaItemCreate) SetDefaultLimit(i int64) *QuotaItemCreate

SetDefaultLimit sets the "default_limit" field.

func (*QuotaItemCreate) SetDescription

func (qic *QuotaItemCreate) SetDescription(s string) *QuotaItemCreate

SetDescription sets the "description" field.

func (*QuotaItemCreate) SetID

func (qic *QuotaItemCreate) SetID(i int) *QuotaItemCreate

SetID sets the "id" field.

func (*QuotaItemCreate) SetInput

SetInput applies the change-set in the CreateQuotaItemInput on the QuotaItemCreate builder.

func (*QuotaItemCreate) SetName

func (qic *QuotaItemCreate) SetName(s string) *QuotaItemCreate

SetName sets the "name" field.

func (*QuotaItemCreate) SetNillableActive

func (qic *QuotaItemCreate) SetNillableActive(b *bool) *QuotaItemCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*QuotaItemCreate) SetNillableCreatedAt

func (qic *QuotaItemCreate) SetNillableCreatedAt(t *time.Time) *QuotaItemCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*QuotaItemCreate) SetNillableDefaultLimit

func (qic *QuotaItemCreate) SetNillableDefaultLimit(i *int64) *QuotaItemCreate

SetNillableDefaultLimit sets the "default_limit" field if the given value is not nil.

func (*QuotaItemCreate) SetNillableDescription

func (qic *QuotaItemCreate) SetNillableDescription(s *string) *QuotaItemCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*QuotaItemCreate) SetNillableUnit

func (qic *QuotaItemCreate) SetNillableUnit(s *string) *QuotaItemCreate

SetNillableUnit sets the "unit" field if the given value is not nil.

func (*QuotaItemCreate) SetNillableUpdatedAt

func (qic *QuotaItemCreate) SetNillableUpdatedAt(t *time.Time) *QuotaItemCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*QuotaItemCreate) SetNillableUpdatedBy

func (qic *QuotaItemCreate) SetNillableUpdatedBy(i *int) *QuotaItemCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*QuotaItemCreate) SetResourceType

func (qic *QuotaItemCreate) SetResourceType(qt quotaitem.ResourceType) *QuotaItemCreate

SetResourceType sets the "resource_type" field.

func (*QuotaItemCreate) SetUnit

func (qic *QuotaItemCreate) SetUnit(s string) *QuotaItemCreate

SetUnit sets the "unit" field.

func (*QuotaItemCreate) SetUpdatedAt

func (qic *QuotaItemCreate) SetUpdatedAt(t time.Time) *QuotaItemCreate

SetUpdatedAt sets the "updated_at" field.

func (*QuotaItemCreate) SetUpdatedBy

func (qic *QuotaItemCreate) SetUpdatedBy(i int) *QuotaItemCreate

SetUpdatedBy sets the "updated_by" field.

type QuotaItemCreateBulk

type QuotaItemCreateBulk struct {
	// contains filtered or unexported fields
}

QuotaItemCreateBulk is the builder for creating many QuotaItem entities in bulk.

func (*QuotaItemCreateBulk) Exec

func (qicb *QuotaItemCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaItemCreateBulk) ExecContext

func (c *QuotaItemCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemCreateBulk) ExecX

func (qicb *QuotaItemCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemCreateBulk) OnConflict

func (qicb *QuotaItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *QuotaItemUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.QuotaItem.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.QuotaItemUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*QuotaItemCreateBulk) OnConflictColumns

func (qicb *QuotaItemCreateBulk) OnConflictColumns(columns ...string) *QuotaItemUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.QuotaItem.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*QuotaItemCreateBulk) QueryContext

func (c *QuotaItemCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemCreateBulk) Save

func (qicb *QuotaItemCreateBulk) Save(ctx context.Context) ([]*QuotaItem, error)

Save creates the QuotaItem entities in the database.

func (*QuotaItemCreateBulk) SaveX

func (qicb *QuotaItemCreateBulk) SaveX(ctx context.Context) []*QuotaItem

SaveX is like Save, but panics if an error occurs.

type QuotaItemDelete

type QuotaItemDelete struct {
	// contains filtered or unexported fields
}

QuotaItemDelete is the builder for deleting a QuotaItem entity.

func (*QuotaItemDelete) Exec

func (qid *QuotaItemDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*QuotaItemDelete) ExecContext

func (c *QuotaItemDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemDelete) ExecX

func (qid *QuotaItemDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemDelete) QueryContext

func (c *QuotaItemDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemDelete) Where

Where appends a list predicates to the QuotaItemDelete builder.

type QuotaItemDeleteOne

type QuotaItemDeleteOne struct {
	// contains filtered or unexported fields
}

QuotaItemDeleteOne is the builder for deleting a single QuotaItem entity.

func (*QuotaItemDeleteOne) Exec

func (qido *QuotaItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*QuotaItemDeleteOne) ExecX

func (qido *QuotaItemDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemDeleteOne) Where

Where appends a list predicates to the QuotaItemDelete builder.

type QuotaItemEdge

type QuotaItemEdge struct {
	Node   *QuotaItem `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

QuotaItemEdge is the edge representation of QuotaItem.

type QuotaItemEdges

type QuotaItemEdges struct {
	// Quota holds the value of the quota edge.
	Quota []*Quota `json:"quota,omitempty"`
	// contains filtered or unexported fields
}

QuotaItemEdges holds the relations/edges for other nodes in the graph.

func (QuotaItemEdges) QuotaOrErr

func (e QuotaItemEdges) QuotaOrErr() ([]*Quota, error)

QuotaOrErr returns the Quota value or an error if the edge was not loaded in eager-loading.

type QuotaItemGroupBy

type QuotaItemGroupBy struct {
	// contains filtered or unexported fields
}

QuotaItemGroupBy is the group-by builder for QuotaItem entities.

func (*QuotaItemGroupBy) Aggregate

func (qigb *QuotaItemGroupBy) Aggregate(fns ...AggregateFunc) *QuotaItemGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*QuotaItemGroupBy) Bool

func (s *QuotaItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) BoolX

func (s *QuotaItemGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*QuotaItemGroupBy) Bools

func (s *QuotaItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) BoolsX

func (s *QuotaItemGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*QuotaItemGroupBy) Float64

func (s *QuotaItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) Float64X

func (s *QuotaItemGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*QuotaItemGroupBy) Float64s

func (s *QuotaItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) Float64sX

func (s *QuotaItemGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*QuotaItemGroupBy) Int

func (s *QuotaItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) IntX

func (s *QuotaItemGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*QuotaItemGroupBy) Ints

func (s *QuotaItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) IntsX

func (s *QuotaItemGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*QuotaItemGroupBy) Scan

func (qigb *QuotaItemGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*QuotaItemGroupBy) ScanX

func (s *QuotaItemGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*QuotaItemGroupBy) String

func (s *QuotaItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) StringX

func (s *QuotaItemGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*QuotaItemGroupBy) Strings

func (s *QuotaItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*QuotaItemGroupBy) StringsX

func (s *QuotaItemGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type QuotaItemMutation

type QuotaItemMutation struct {
	// contains filtered or unexported fields
}

QuotaItemMutation represents an operation that mutates the QuotaItem nodes in the graph.

func (*QuotaItemMutation) Active

func (m *QuotaItemMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*QuotaItemMutation) AddCreatedBy

func (m *QuotaItemMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*QuotaItemMutation) AddDefaultLimit

func (m *QuotaItemMutation) AddDefaultLimit(i int64)

AddDefaultLimit adds i to the "default_limit" field.

func (*QuotaItemMutation) AddField

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) AddQuotumIDs

func (m *QuotaItemMutation) AddQuotumIDs(ids ...int)

AddQuotumIDs adds the "quota" edge to the Quota entity by ids.

func (*QuotaItemMutation) AddUpdatedBy

func (m *QuotaItemMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*QuotaItemMutation) AddedCreatedBy

func (m *QuotaItemMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*QuotaItemMutation) AddedDefaultLimit

func (m *QuotaItemMutation) AddedDefaultLimit() (r int64, exists bool)

AddedDefaultLimit returns the value that was added to the "default_limit" field in this mutation.

func (*QuotaItemMutation) AddedEdges

func (m *QuotaItemMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*QuotaItemMutation) AddedField

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) AddedFields

func (m *QuotaItemMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*QuotaItemMutation) AddedIDs

func (m *QuotaItemMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*QuotaItemMutation) AddedUpdatedBy

func (m *QuotaItemMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*QuotaItemMutation) ClearDefaultLimit

func (m *QuotaItemMutation) ClearDefaultLimit()

ClearDefaultLimit clears the value of the "default_limit" field.

func (*QuotaItemMutation) ClearDescription

func (m *QuotaItemMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*QuotaItemMutation) ClearEdge

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) ClearField

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) ClearQuota

func (m *QuotaItemMutation) ClearQuota()

ClearQuota clears the "quota" edge to the Quota entity.

func (*QuotaItemMutation) ClearUnit

func (m *QuotaItemMutation) ClearUnit()

ClearUnit clears the value of the "unit" field.

func (*QuotaItemMutation) ClearUpdatedAt

func (m *QuotaItemMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaItemMutation) ClearUpdatedBy

func (m *QuotaItemMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaItemMutation) ClearedEdges

func (m *QuotaItemMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*QuotaItemMutation) ClearedFields

func (m *QuotaItemMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (QuotaItemMutation) Client

func (m QuotaItemMutation) 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 (*QuotaItemMutation) Code

func (m *QuotaItemMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*QuotaItemMutation) CreatedAt

func (m *QuotaItemMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*QuotaItemMutation) CreatedBy

func (m *QuotaItemMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*QuotaItemMutation) DefaultLimit

func (m *QuotaItemMutation) DefaultLimit() (r int64, exists bool)

DefaultLimit returns the value of the "default_limit" field in the mutation.

func (*QuotaItemMutation) DefaultLimitCleared

func (m *QuotaItemMutation) DefaultLimitCleared() bool

DefaultLimitCleared returns if the "default_limit" field was cleared in this mutation.

func (*QuotaItemMutation) Description

func (m *QuotaItemMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*QuotaItemMutation) DescriptionCleared

func (m *QuotaItemMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*QuotaItemMutation) EdgeCleared

func (m *QuotaItemMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*QuotaItemMutation) ExecContext

func (c *QuotaItemMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemMutation) Field

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) FieldCleared

func (m *QuotaItemMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*QuotaItemMutation) Fields

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) ID

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) IDs

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) Name

func (m *QuotaItemMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*QuotaItemMutation) OldActive

func (m *QuotaItemMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldCode

func (m *QuotaItemMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldCreatedAt

func (m *QuotaItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldCreatedBy

func (m *QuotaItemMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldDefaultLimit

func (m *QuotaItemMutation) OldDefaultLimit(ctx context.Context) (v int64, err error)

OldDefaultLimit returns the old "default_limit" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldDescription

func (m *QuotaItemMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldField

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) OldName

func (m *QuotaItemMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldResourceType

func (m *QuotaItemMutation) OldResourceType(ctx context.Context) (v quotaitem.ResourceType, err error)

OldResourceType returns the old "resource_type" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldUnit

func (m *QuotaItemMutation) OldUnit(ctx context.Context) (v string, err error)

OldUnit returns the old "unit" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldUpdatedAt

func (m *QuotaItemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) OldUpdatedBy

func (m *QuotaItemMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the QuotaItem entity. If the QuotaItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaItemMutation) Op

func (m *QuotaItemMutation) Op() Op

Op returns the operation name.

func (*QuotaItemMutation) QueryContext

func (c *QuotaItemMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemMutation) QuotaCleared

func (m *QuotaItemMutation) QuotaCleared() bool

QuotaCleared reports if the "quota" edge to the Quota entity was cleared.

func (*QuotaItemMutation) QuotaIDs

func (m *QuotaItemMutation) QuotaIDs() (ids []int)

QuotaIDs returns the "quota" edge IDs in the mutation.

func (*QuotaItemMutation) RemoveQuotumIDs

func (m *QuotaItemMutation) RemoveQuotumIDs(ids ...int)

RemoveQuotumIDs removes the "quota" edge to the Quota entity by IDs.

func (*QuotaItemMutation) RemovedEdges

func (m *QuotaItemMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*QuotaItemMutation) RemovedIDs

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) RemovedQuotaIDs

func (m *QuotaItemMutation) RemovedQuotaIDs() (ids []int)

RemovedQuota returns the removed IDs of the "quota" edge to the Quota entity.

func (*QuotaItemMutation) ResetActive

func (m *QuotaItemMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*QuotaItemMutation) ResetCode

func (m *QuotaItemMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*QuotaItemMutation) ResetCreatedAt

func (m *QuotaItemMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*QuotaItemMutation) ResetCreatedBy

func (m *QuotaItemMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*QuotaItemMutation) ResetDefaultLimit

func (m *QuotaItemMutation) ResetDefaultLimit()

ResetDefaultLimit resets all changes to the "default_limit" field.

func (*QuotaItemMutation) ResetDescription

func (m *QuotaItemMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*QuotaItemMutation) ResetEdge

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) ResetField

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) ResetName

func (m *QuotaItemMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*QuotaItemMutation) ResetQuota

func (m *QuotaItemMutation) ResetQuota()

ResetQuota resets all changes to the "quota" edge.

func (*QuotaItemMutation) ResetResourceType

func (m *QuotaItemMutation) ResetResourceType()

ResetResourceType resets all changes to the "resource_type" field.

func (*QuotaItemMutation) ResetUnit

func (m *QuotaItemMutation) ResetUnit()

ResetUnit resets all changes to the "unit" field.

func (*QuotaItemMutation) ResetUpdatedAt

func (m *QuotaItemMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*QuotaItemMutation) ResetUpdatedBy

func (m *QuotaItemMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*QuotaItemMutation) ResourceType

func (m *QuotaItemMutation) ResourceType() (r quotaitem.ResourceType, exists bool)

ResourceType returns the value of the "resource_type" field in the mutation.

func (*QuotaItemMutation) SetActive

func (m *QuotaItemMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*QuotaItemMutation) SetCode

func (m *QuotaItemMutation) SetCode(s string)

SetCode sets the "code" field.

func (*QuotaItemMutation) SetCreatedAt

func (m *QuotaItemMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*QuotaItemMutation) SetCreatedBy

func (m *QuotaItemMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*QuotaItemMutation) SetDefaultLimit

func (m *QuotaItemMutation) SetDefaultLimit(i int64)

SetDefaultLimit sets the "default_limit" field.

func (*QuotaItemMutation) SetDescription

func (m *QuotaItemMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*QuotaItemMutation) SetField

func (m *QuotaItemMutation) 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 (*QuotaItemMutation) SetID

func (m *QuotaItemMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of QuotaItem entities.

func (*QuotaItemMutation) SetName

func (m *QuotaItemMutation) SetName(s string)

SetName sets the "name" field.

func (*QuotaItemMutation) SetOp

func (m *QuotaItemMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*QuotaItemMutation) SetResourceType

func (m *QuotaItemMutation) SetResourceType(qt quotaitem.ResourceType)

SetResourceType sets the "resource_type" field.

func (*QuotaItemMutation) SetUnit

func (m *QuotaItemMutation) SetUnit(s string)

SetUnit sets the "unit" field.

func (*QuotaItemMutation) SetUpdatedAt

func (m *QuotaItemMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*QuotaItemMutation) SetUpdatedBy

func (m *QuotaItemMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (QuotaItemMutation) Tx

func (m QuotaItemMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*QuotaItemMutation) Type

func (m *QuotaItemMutation) Type() string

Type returns the node type of this mutation (QuotaItem).

func (*QuotaItemMutation) Unit

func (m *QuotaItemMutation) Unit() (r string, exists bool)

Unit returns the value of the "unit" field in the mutation.

func (*QuotaItemMutation) UnitCleared

func (m *QuotaItemMutation) UnitCleared() bool

UnitCleared returns if the "unit" field was cleared in this mutation.

func (*QuotaItemMutation) UpdatedAt

func (m *QuotaItemMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*QuotaItemMutation) UpdatedAtCleared

func (m *QuotaItemMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*QuotaItemMutation) UpdatedBy

func (m *QuotaItemMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*QuotaItemMutation) UpdatedByCleared

func (m *QuotaItemMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*QuotaItemMutation) Where

func (m *QuotaItemMutation) Where(ps ...predicate.QuotaItem)

Where appends a list predicates to the QuotaItemMutation builder.

func (*QuotaItemMutation) WhereP

func (m *QuotaItemMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the QuotaItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type QuotaItemOrder

type QuotaItemOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *QuotaItemOrderField `json:"field"`
}

QuotaItemOrder defines the ordering of QuotaItem.

type QuotaItemOrderField

type QuotaItemOrderField struct {
	// Value extracts the ordering value from the given QuotaItem.
	Value func(*QuotaItem) (ent.Value, error)
	// contains filtered or unexported fields
}

QuotaItemOrderField defines the ordering field of QuotaItem.

func (QuotaItemOrderField) MarshalGQL

func (f QuotaItemOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (QuotaItemOrderField) String

func (f QuotaItemOrderField) String() string

String implement fmt.Stringer interface.

func (*QuotaItemOrderField) UnmarshalGQL

func (f *QuotaItemOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type QuotaItemPaginateOption

type QuotaItemPaginateOption func(*quotaitemPager) error

QuotaItemPaginateOption enables pagination customization.

func WithQuotaItemFilter

func WithQuotaItemFilter(filter func(*QuotaItemQuery) (*QuotaItemQuery, error)) QuotaItemPaginateOption

WithQuotaItemFilter configures pagination filter.

func WithQuotaItemOrder

func WithQuotaItemOrder(order *QuotaItemOrder) QuotaItemPaginateOption

WithQuotaItemOrder configures pagination ordering.

type QuotaItemQuery

type QuotaItemQuery struct {
	// contains filtered or unexported fields
}

QuotaItemQuery is the builder for querying QuotaItem entities.

func (*QuotaItemQuery) Aggregate

func (qiq *QuotaItemQuery) Aggregate(fns ...AggregateFunc) *QuotaItemSelect

Aggregate returns a QuotaItemSelect configured with the given aggregations.

func (*QuotaItemQuery) All

func (qiq *QuotaItemQuery) All(ctx context.Context) ([]*QuotaItem, error)

All executes the query and returns a list of QuotaItems.

func (*QuotaItemQuery) AllX

func (qiq *QuotaItemQuery) AllX(ctx context.Context) []*QuotaItem

AllX is like All, but panics if an error occurs.

func (*QuotaItemQuery) Clone

func (qiq *QuotaItemQuery) Clone() *QuotaItemQuery

Clone returns a duplicate of the QuotaItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*QuotaItemQuery) CollectFields

func (qi *QuotaItemQuery) CollectFields(ctx context.Context, satisfies ...string) (*QuotaItemQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*QuotaItemQuery) Count

func (qiq *QuotaItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*QuotaItemQuery) CountX

func (qiq *QuotaItemQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*QuotaItemQuery) ExecContext

func (c *QuotaItemQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemQuery) Exist

func (qiq *QuotaItemQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*QuotaItemQuery) ExistX

func (qiq *QuotaItemQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*QuotaItemQuery) First

func (qiq *QuotaItemQuery) First(ctx context.Context) (*QuotaItem, error)

First returns the first QuotaItem entity from the query. Returns a *NotFoundError when no QuotaItem was found.

func (*QuotaItemQuery) FirstID

func (qiq *QuotaItemQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first QuotaItem ID from the query. Returns a *NotFoundError when no QuotaItem ID was found.

func (*QuotaItemQuery) FirstIDX

func (qiq *QuotaItemQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*QuotaItemQuery) FirstX

func (qiq *QuotaItemQuery) FirstX(ctx context.Context) *QuotaItem

FirstX is like First, but panics if an error occurs.

func (*QuotaItemQuery) GroupBy

func (qiq *QuotaItemQuery) GroupBy(field string, fields ...string) *QuotaItemGroupBy

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.QuotaItem.Query().
	GroupBy(quotaitem.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*QuotaItemQuery) IDs

func (qiq *QuotaItemQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of QuotaItem IDs.

func (*QuotaItemQuery) IDsX

func (qiq *QuotaItemQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*QuotaItemQuery) Limit

func (qiq *QuotaItemQuery) Limit(limit int) *QuotaItemQuery

Limit the number of records to be returned by this query.

func (*QuotaItemQuery) Offset

func (qiq *QuotaItemQuery) Offset(offset int) *QuotaItemQuery

Offset to start from.

func (*QuotaItemQuery) Only

func (qiq *QuotaItemQuery) Only(ctx context.Context) (*QuotaItem, error)

Only returns a single QuotaItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one QuotaItem entity is found. Returns a *NotFoundError when no QuotaItem entities are found.

func (*QuotaItemQuery) OnlyID

func (qiq *QuotaItemQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only QuotaItem ID in the query. Returns a *NotSingularError when more than one QuotaItem ID is found. Returns a *NotFoundError when no entities are found.

func (*QuotaItemQuery) OnlyIDX

func (qiq *QuotaItemQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*QuotaItemQuery) OnlyX

func (qiq *QuotaItemQuery) OnlyX(ctx context.Context) *QuotaItem

OnlyX is like Only, but panics if an error occurs.

func (*QuotaItemQuery) Order

Order specifies how the records should be ordered.

func (*QuotaItemQuery) Paginate

func (qi *QuotaItemQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...QuotaItemPaginateOption,
) (*QuotaItemConnection, error)

Paginate executes the query and returns a relay based cursor connection to QuotaItem.

func (*QuotaItemQuery) QueryContext

func (c *QuotaItemQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemQuery) QueryQuota

func (qiq *QuotaItemQuery) QueryQuota() *QuotaQuery

QueryQuota chains the current query on the "quota" edge.

func (*QuotaItemQuery) Select

func (qiq *QuotaItemQuery) Select(fields ...string) *QuotaItemSelect

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.QuotaItem.Query().
	Select(quotaitem.FieldCreatedBy).
	Scan(ctx, &v)

func (*QuotaItemQuery) Unique

func (qiq *QuotaItemQuery) Unique(unique bool) *QuotaItemQuery

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 (*QuotaItemQuery) Where

func (qiq *QuotaItemQuery) Where(ps ...predicate.QuotaItem) *QuotaItemQuery

Where adds a new predicate for the QuotaItemQuery builder.

func (*QuotaItemQuery) WithNamedQuota

func (qiq *QuotaItemQuery) WithNamedQuota(name string, opts ...func(*QuotaQuery)) *QuotaItemQuery

WithNamedQuota tells the query-builder to eager-load the nodes that are connected to the "quota" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*QuotaItemQuery) WithQuota

func (qiq *QuotaItemQuery) WithQuota(opts ...func(*QuotaQuery)) *QuotaItemQuery

WithQuota tells the query-builder to eager-load the nodes that are connected to the "quota" edge. The optional arguments are used to configure the query builder of the edge.

type QuotaItemSelect

type QuotaItemSelect struct {
	*QuotaItemQuery
	// contains filtered or unexported fields
}

QuotaItemSelect is the builder for selecting fields of QuotaItem entities.

func (*QuotaItemSelect) Aggregate

func (qis *QuotaItemSelect) Aggregate(fns ...AggregateFunc) *QuotaItemSelect

Aggregate adds the given aggregation functions to the selector query.

func (*QuotaItemSelect) Bool

func (s *QuotaItemSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) BoolX

func (s *QuotaItemSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*QuotaItemSelect) Bools

func (s *QuotaItemSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) BoolsX

func (s *QuotaItemSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (QuotaItemSelect) ExecContext

func (c QuotaItemSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemSelect) Float64

func (s *QuotaItemSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) Float64X

func (s *QuotaItemSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*QuotaItemSelect) Float64s

func (s *QuotaItemSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) Float64sX

func (s *QuotaItemSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*QuotaItemSelect) Int

func (s *QuotaItemSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) IntX

func (s *QuotaItemSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*QuotaItemSelect) Ints

func (s *QuotaItemSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) IntsX

func (s *QuotaItemSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (QuotaItemSelect) QueryContext

func (c QuotaItemSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemSelect) Scan

func (qis *QuotaItemSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*QuotaItemSelect) ScanX

func (s *QuotaItemSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*QuotaItemSelect) String

func (s *QuotaItemSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) StringX

func (s *QuotaItemSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*QuotaItemSelect) Strings

func (s *QuotaItemSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*QuotaItemSelect) StringsX

func (s *QuotaItemSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type QuotaItemUpdate

type QuotaItemUpdate struct {
	// contains filtered or unexported fields
}

QuotaItemUpdate is the builder for updating QuotaItem entities.

func (*QuotaItemUpdate) AddDefaultLimit

func (qiu *QuotaItemUpdate) AddDefaultLimit(i int64) *QuotaItemUpdate

AddDefaultLimit adds i to the "default_limit" field.

func (*QuotaItemUpdate) AddQuota

func (qiu *QuotaItemUpdate) AddQuota(q ...*Quota) *QuotaItemUpdate

AddQuota adds the "quota" edges to the Quota entity.

func (*QuotaItemUpdate) AddQuotumIDs

func (qiu *QuotaItemUpdate) AddQuotumIDs(ids ...int) *QuotaItemUpdate

AddQuotumIDs adds the "quota" edge to the Quota entity by IDs.

func (*QuotaItemUpdate) AddUpdatedBy

func (qiu *QuotaItemUpdate) AddUpdatedBy(i int) *QuotaItemUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*QuotaItemUpdate) ClearDefaultLimit

func (qiu *QuotaItemUpdate) ClearDefaultLimit() *QuotaItemUpdate

ClearDefaultLimit clears the value of the "default_limit" field.

func (*QuotaItemUpdate) ClearDescription

func (qiu *QuotaItemUpdate) ClearDescription() *QuotaItemUpdate

ClearDescription clears the value of the "description" field.

func (*QuotaItemUpdate) ClearQuota

func (qiu *QuotaItemUpdate) ClearQuota() *QuotaItemUpdate

ClearQuota clears all "quota" edges to the Quota entity.

func (*QuotaItemUpdate) ClearUnit

func (qiu *QuotaItemUpdate) ClearUnit() *QuotaItemUpdate

ClearUnit clears the value of the "unit" field.

func (*QuotaItemUpdate) ClearUpdatedAt

func (qiu *QuotaItemUpdate) ClearUpdatedAt() *QuotaItemUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaItemUpdate) ClearUpdatedBy

func (qiu *QuotaItemUpdate) ClearUpdatedBy() *QuotaItemUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaItemUpdate) Exec

func (qiu *QuotaItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaItemUpdate) ExecContext

func (c *QuotaItemUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemUpdate) ExecX

func (qiu *QuotaItemUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemUpdate) Mutation

func (qiu *QuotaItemUpdate) Mutation() *QuotaItemMutation

Mutation returns the QuotaItemMutation object of the builder.

func (*QuotaItemUpdate) QueryContext

func (c *QuotaItemUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemUpdate) RemoveQuota

func (qiu *QuotaItemUpdate) RemoveQuota(q ...*Quota) *QuotaItemUpdate

RemoveQuota removes "quota" edges to Quota entities.

func (*QuotaItemUpdate) RemoveQuotumIDs

func (qiu *QuotaItemUpdate) RemoveQuotumIDs(ids ...int) *QuotaItemUpdate

RemoveQuotumIDs removes the "quota" edge to Quota entities by IDs.

func (*QuotaItemUpdate) Save

func (qiu *QuotaItemUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*QuotaItemUpdate) SaveX

func (qiu *QuotaItemUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*QuotaItemUpdate) SetActive

func (qiu *QuotaItemUpdate) SetActive(b bool) *QuotaItemUpdate

SetActive sets the "active" field.

func (*QuotaItemUpdate) SetCode

func (qiu *QuotaItemUpdate) SetCode(s string) *QuotaItemUpdate

SetCode sets the "code" field.

func (*QuotaItemUpdate) SetDefaultLimit

func (qiu *QuotaItemUpdate) SetDefaultLimit(i int64) *QuotaItemUpdate

SetDefaultLimit sets the "default_limit" field.

func (*QuotaItemUpdate) SetDescription

func (qiu *QuotaItemUpdate) SetDescription(s string) *QuotaItemUpdate

SetDescription sets the "description" field.

func (*QuotaItemUpdate) SetInput

SetInput applies the change-set in the UpdateQuotaItemInput on the QuotaItemUpdate builder.

func (*QuotaItemUpdate) SetName

func (qiu *QuotaItemUpdate) SetName(s string) *QuotaItemUpdate

SetName sets the "name" field.

func (*QuotaItemUpdate) SetNillableActive

func (qiu *QuotaItemUpdate) SetNillableActive(b *bool) *QuotaItemUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableCode

func (qiu *QuotaItemUpdate) SetNillableCode(s *string) *QuotaItemUpdate

SetNillableCode sets the "code" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableDefaultLimit

func (qiu *QuotaItemUpdate) SetNillableDefaultLimit(i *int64) *QuotaItemUpdate

SetNillableDefaultLimit sets the "default_limit" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableDescription

func (qiu *QuotaItemUpdate) SetNillableDescription(s *string) *QuotaItemUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableName

func (qiu *QuotaItemUpdate) SetNillableName(s *string) *QuotaItemUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableResourceType

func (qiu *QuotaItemUpdate) SetNillableResourceType(qt *quotaitem.ResourceType) *QuotaItemUpdate

SetNillableResourceType sets the "resource_type" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableUnit

func (qiu *QuotaItemUpdate) SetNillableUnit(s *string) *QuotaItemUpdate

SetNillableUnit sets the "unit" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableUpdatedAt

func (qiu *QuotaItemUpdate) SetNillableUpdatedAt(t *time.Time) *QuotaItemUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*QuotaItemUpdate) SetNillableUpdatedBy

func (qiu *QuotaItemUpdate) SetNillableUpdatedBy(i *int) *QuotaItemUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*QuotaItemUpdate) SetResourceType

func (qiu *QuotaItemUpdate) SetResourceType(qt quotaitem.ResourceType) *QuotaItemUpdate

SetResourceType sets the "resource_type" field.

func (*QuotaItemUpdate) SetUnit

func (qiu *QuotaItemUpdate) SetUnit(s string) *QuotaItemUpdate

SetUnit sets the "unit" field.

func (*QuotaItemUpdate) SetUpdatedAt

func (qiu *QuotaItemUpdate) SetUpdatedAt(t time.Time) *QuotaItemUpdate

SetUpdatedAt sets the "updated_at" field.

func (*QuotaItemUpdate) SetUpdatedBy

func (qiu *QuotaItemUpdate) SetUpdatedBy(i int) *QuotaItemUpdate

SetUpdatedBy sets the "updated_by" field.

func (*QuotaItemUpdate) Where

Where appends a list predicates to the QuotaItemUpdate builder.

type QuotaItemUpdateOne

type QuotaItemUpdateOne struct {
	// contains filtered or unexported fields
}

QuotaItemUpdateOne is the builder for updating a single QuotaItem entity.

func (*QuotaItemUpdateOne) AddDefaultLimit

func (qiuo *QuotaItemUpdateOne) AddDefaultLimit(i int64) *QuotaItemUpdateOne

AddDefaultLimit adds i to the "default_limit" field.

func (*QuotaItemUpdateOne) AddQuota

func (qiuo *QuotaItemUpdateOne) AddQuota(q ...*Quota) *QuotaItemUpdateOne

AddQuota adds the "quota" edges to the Quota entity.

func (*QuotaItemUpdateOne) AddQuotumIDs

func (qiuo *QuotaItemUpdateOne) AddQuotumIDs(ids ...int) *QuotaItemUpdateOne

AddQuotumIDs adds the "quota" edge to the Quota entity by IDs.

func (*QuotaItemUpdateOne) AddUpdatedBy

func (qiuo *QuotaItemUpdateOne) AddUpdatedBy(i int) *QuotaItemUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*QuotaItemUpdateOne) ClearDefaultLimit

func (qiuo *QuotaItemUpdateOne) ClearDefaultLimit() *QuotaItemUpdateOne

ClearDefaultLimit clears the value of the "default_limit" field.

func (*QuotaItemUpdateOne) ClearDescription

func (qiuo *QuotaItemUpdateOne) ClearDescription() *QuotaItemUpdateOne

ClearDescription clears the value of the "description" field.

func (*QuotaItemUpdateOne) ClearQuota

func (qiuo *QuotaItemUpdateOne) ClearQuota() *QuotaItemUpdateOne

ClearQuota clears all "quota" edges to the Quota entity.

func (*QuotaItemUpdateOne) ClearUnit

func (qiuo *QuotaItemUpdateOne) ClearUnit() *QuotaItemUpdateOne

ClearUnit clears the value of the "unit" field.

func (*QuotaItemUpdateOne) ClearUpdatedAt

func (qiuo *QuotaItemUpdateOne) ClearUpdatedAt() *QuotaItemUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaItemUpdateOne) ClearUpdatedBy

func (qiuo *QuotaItemUpdateOne) ClearUpdatedBy() *QuotaItemUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaItemUpdateOne) Exec

func (qiuo *QuotaItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*QuotaItemUpdateOne) ExecContext

func (c *QuotaItemUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaItemUpdateOne) ExecX

func (qiuo *QuotaItemUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemUpdateOne) Mutation

func (qiuo *QuotaItemUpdateOne) Mutation() *QuotaItemMutation

Mutation returns the QuotaItemMutation object of the builder.

func (*QuotaItemUpdateOne) QueryContext

func (c *QuotaItemUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaItemUpdateOne) RemoveQuota

func (qiuo *QuotaItemUpdateOne) RemoveQuota(q ...*Quota) *QuotaItemUpdateOne

RemoveQuota removes "quota" edges to Quota entities.

func (*QuotaItemUpdateOne) RemoveQuotumIDs

func (qiuo *QuotaItemUpdateOne) RemoveQuotumIDs(ids ...int) *QuotaItemUpdateOne

RemoveQuotumIDs removes the "quota" edge to Quota entities by IDs.

func (*QuotaItemUpdateOne) Save

func (qiuo *QuotaItemUpdateOne) Save(ctx context.Context) (*QuotaItem, error)

Save executes the query and returns the updated QuotaItem entity.

func (*QuotaItemUpdateOne) SaveX

func (qiuo *QuotaItemUpdateOne) SaveX(ctx context.Context) *QuotaItem

SaveX is like Save, but panics if an error occurs.

func (*QuotaItemUpdateOne) Select

func (qiuo *QuotaItemUpdateOne) Select(field string, fields ...string) *QuotaItemUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*QuotaItemUpdateOne) SetActive

func (qiuo *QuotaItemUpdateOne) SetActive(b bool) *QuotaItemUpdateOne

SetActive sets the "active" field.

func (*QuotaItemUpdateOne) SetCode

func (qiuo *QuotaItemUpdateOne) SetCode(s string) *QuotaItemUpdateOne

SetCode sets the "code" field.

func (*QuotaItemUpdateOne) SetDefaultLimit

func (qiuo *QuotaItemUpdateOne) SetDefaultLimit(i int64) *QuotaItemUpdateOne

SetDefaultLimit sets the "default_limit" field.

func (*QuotaItemUpdateOne) SetDescription

func (qiuo *QuotaItemUpdateOne) SetDescription(s string) *QuotaItemUpdateOne

SetDescription sets the "description" field.

func (*QuotaItemUpdateOne) SetInput

SetInput applies the change-set in the UpdateQuotaItemInput on the QuotaItemUpdateOne builder.

func (*QuotaItemUpdateOne) SetName

func (qiuo *QuotaItemUpdateOne) SetName(s string) *QuotaItemUpdateOne

SetName sets the "name" field.

func (*QuotaItemUpdateOne) SetNillableActive

func (qiuo *QuotaItemUpdateOne) SetNillableActive(b *bool) *QuotaItemUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableCode

func (qiuo *QuotaItemUpdateOne) SetNillableCode(s *string) *QuotaItemUpdateOne

SetNillableCode sets the "code" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableDefaultLimit

func (qiuo *QuotaItemUpdateOne) SetNillableDefaultLimit(i *int64) *QuotaItemUpdateOne

SetNillableDefaultLimit sets the "default_limit" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableDescription

func (qiuo *QuotaItemUpdateOne) SetNillableDescription(s *string) *QuotaItemUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableName

func (qiuo *QuotaItemUpdateOne) SetNillableName(s *string) *QuotaItemUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableResourceType

func (qiuo *QuotaItemUpdateOne) SetNillableResourceType(qt *quotaitem.ResourceType) *QuotaItemUpdateOne

SetNillableResourceType sets the "resource_type" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableUnit

func (qiuo *QuotaItemUpdateOne) SetNillableUnit(s *string) *QuotaItemUpdateOne

SetNillableUnit sets the "unit" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableUpdatedAt

func (qiuo *QuotaItemUpdateOne) SetNillableUpdatedAt(t *time.Time) *QuotaItemUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetNillableUpdatedBy

func (qiuo *QuotaItemUpdateOne) SetNillableUpdatedBy(i *int) *QuotaItemUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*QuotaItemUpdateOne) SetResourceType

func (qiuo *QuotaItemUpdateOne) SetResourceType(qt quotaitem.ResourceType) *QuotaItemUpdateOne

SetResourceType sets the "resource_type" field.

func (*QuotaItemUpdateOne) SetUnit

func (qiuo *QuotaItemUpdateOne) SetUnit(s string) *QuotaItemUpdateOne

SetUnit sets the "unit" field.

func (*QuotaItemUpdateOne) SetUpdatedAt

func (qiuo *QuotaItemUpdateOne) SetUpdatedAt(t time.Time) *QuotaItemUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*QuotaItemUpdateOne) SetUpdatedBy

func (qiuo *QuotaItemUpdateOne) SetUpdatedBy(i int) *QuotaItemUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*QuotaItemUpdateOne) Where

Where appends a list predicates to the QuotaItemUpdate builder.

type QuotaItemUpsert

type QuotaItemUpsert struct {
	*sql.UpdateSet
}

QuotaItemUpsert is the "OnConflict" setter.

func (*QuotaItemUpsert) AddDefaultLimit

func (u *QuotaItemUpsert) AddDefaultLimit(v int64) *QuotaItemUpsert

AddDefaultLimit adds v to the "default_limit" field.

func (*QuotaItemUpsert) AddUpdatedBy

func (u *QuotaItemUpsert) AddUpdatedBy(v int) *QuotaItemUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*QuotaItemUpsert) ClearDefaultLimit

func (u *QuotaItemUpsert) ClearDefaultLimit() *QuotaItemUpsert

ClearDefaultLimit clears the value of the "default_limit" field.

func (*QuotaItemUpsert) ClearDescription

func (u *QuotaItemUpsert) ClearDescription() *QuotaItemUpsert

ClearDescription clears the value of the "description" field.

func (*QuotaItemUpsert) ClearUnit

func (u *QuotaItemUpsert) ClearUnit() *QuotaItemUpsert

ClearUnit clears the value of the "unit" field.

func (*QuotaItemUpsert) ClearUpdatedAt

func (u *QuotaItemUpsert) ClearUpdatedAt() *QuotaItemUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaItemUpsert) ClearUpdatedBy

func (u *QuotaItemUpsert) ClearUpdatedBy() *QuotaItemUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaItemUpsert) SetActive

func (u *QuotaItemUpsert) SetActive(v bool) *QuotaItemUpsert

SetActive sets the "active" field.

func (*QuotaItemUpsert) SetCode

func (u *QuotaItemUpsert) SetCode(v string) *QuotaItemUpsert

SetCode sets the "code" field.

func (*QuotaItemUpsert) SetDefaultLimit

func (u *QuotaItemUpsert) SetDefaultLimit(v int64) *QuotaItemUpsert

SetDefaultLimit sets the "default_limit" field.

func (*QuotaItemUpsert) SetDescription

func (u *QuotaItemUpsert) SetDescription(v string) *QuotaItemUpsert

SetDescription sets the "description" field.

func (*QuotaItemUpsert) SetName

func (u *QuotaItemUpsert) SetName(v string) *QuotaItemUpsert

SetName sets the "name" field.

func (*QuotaItemUpsert) SetResourceType

func (u *QuotaItemUpsert) SetResourceType(v quotaitem.ResourceType) *QuotaItemUpsert

SetResourceType sets the "resource_type" field.

func (*QuotaItemUpsert) SetUnit

func (u *QuotaItemUpsert) SetUnit(v string) *QuotaItemUpsert

SetUnit sets the "unit" field.

func (*QuotaItemUpsert) SetUpdatedAt

func (u *QuotaItemUpsert) SetUpdatedAt(v time.Time) *QuotaItemUpsert

SetUpdatedAt sets the "updated_at" field.

func (*QuotaItemUpsert) SetUpdatedBy

func (u *QuotaItemUpsert) SetUpdatedBy(v int) *QuotaItemUpsert

SetUpdatedBy sets the "updated_by" field.

func (*QuotaItemUpsert) UpdateActive

func (u *QuotaItemUpsert) UpdateActive() *QuotaItemUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateCode

func (u *QuotaItemUpsert) UpdateCode() *QuotaItemUpsert

UpdateCode sets the "code" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateDefaultLimit

func (u *QuotaItemUpsert) UpdateDefaultLimit() *QuotaItemUpsert

UpdateDefaultLimit sets the "default_limit" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateDescription

func (u *QuotaItemUpsert) UpdateDescription() *QuotaItemUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateName

func (u *QuotaItemUpsert) UpdateName() *QuotaItemUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateResourceType

func (u *QuotaItemUpsert) UpdateResourceType() *QuotaItemUpsert

UpdateResourceType sets the "resource_type" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateUnit

func (u *QuotaItemUpsert) UpdateUnit() *QuotaItemUpsert

UpdateUnit sets the "unit" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateUpdatedAt

func (u *QuotaItemUpsert) UpdateUpdatedAt() *QuotaItemUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QuotaItemUpsert) UpdateUpdatedBy

func (u *QuotaItemUpsert) UpdateUpdatedBy() *QuotaItemUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type QuotaItemUpsertBulk

type QuotaItemUpsertBulk struct {
	// contains filtered or unexported fields
}

QuotaItemUpsertBulk is the builder for "upsert"-ing a bulk of QuotaItem nodes.

func (*QuotaItemUpsertBulk) AddDefaultLimit

func (u *QuotaItemUpsertBulk) AddDefaultLimit(v int64) *QuotaItemUpsertBulk

AddDefaultLimit adds v to the "default_limit" field.

func (*QuotaItemUpsertBulk) AddUpdatedBy

func (u *QuotaItemUpsertBulk) AddUpdatedBy(v int) *QuotaItemUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*QuotaItemUpsertBulk) ClearDefaultLimit

func (u *QuotaItemUpsertBulk) ClearDefaultLimit() *QuotaItemUpsertBulk

ClearDefaultLimit clears the value of the "default_limit" field.

func (*QuotaItemUpsertBulk) ClearDescription

func (u *QuotaItemUpsertBulk) ClearDescription() *QuotaItemUpsertBulk

ClearDescription clears the value of the "description" field.

func (*QuotaItemUpsertBulk) ClearUnit

func (u *QuotaItemUpsertBulk) ClearUnit() *QuotaItemUpsertBulk

ClearUnit clears the value of the "unit" field.

func (*QuotaItemUpsertBulk) ClearUpdatedAt

func (u *QuotaItemUpsertBulk) ClearUpdatedAt() *QuotaItemUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaItemUpsertBulk) ClearUpdatedBy

func (u *QuotaItemUpsertBulk) ClearUpdatedBy() *QuotaItemUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaItemUpsertBulk) DoNothing

func (u *QuotaItemUpsertBulk) DoNothing() *QuotaItemUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*QuotaItemUpsertBulk) Exec

Exec executes the query.

func (*QuotaItemUpsertBulk) ExecX

func (u *QuotaItemUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.QuotaItem.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*QuotaItemUpsertBulk) SetActive

func (u *QuotaItemUpsertBulk) SetActive(v bool) *QuotaItemUpsertBulk

SetActive sets the "active" field.

func (*QuotaItemUpsertBulk) SetCode

SetCode sets the "code" field.

func (*QuotaItemUpsertBulk) SetDefaultLimit

func (u *QuotaItemUpsertBulk) SetDefaultLimit(v int64) *QuotaItemUpsertBulk

SetDefaultLimit sets the "default_limit" field.

func (*QuotaItemUpsertBulk) SetDescription

func (u *QuotaItemUpsertBulk) SetDescription(v string) *QuotaItemUpsertBulk

SetDescription sets the "description" field.

func (*QuotaItemUpsertBulk) SetName

SetName sets the "name" field.

func (*QuotaItemUpsertBulk) SetResourceType

SetResourceType sets the "resource_type" field.

func (*QuotaItemUpsertBulk) SetUnit

SetUnit sets the "unit" field.

func (*QuotaItemUpsertBulk) SetUpdatedAt

func (u *QuotaItemUpsertBulk) SetUpdatedAt(v time.Time) *QuotaItemUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*QuotaItemUpsertBulk) SetUpdatedBy

func (u *QuotaItemUpsertBulk) SetUpdatedBy(v int) *QuotaItemUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*QuotaItemUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the QuotaItemCreateBulk.OnConflict documentation for more info.

func (*QuotaItemUpsertBulk) UpdateActive

func (u *QuotaItemUpsertBulk) UpdateActive() *QuotaItemUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateCode

func (u *QuotaItemUpsertBulk) UpdateCode() *QuotaItemUpsertBulk

UpdateCode sets the "code" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateDefaultLimit

func (u *QuotaItemUpsertBulk) UpdateDefaultLimit() *QuotaItemUpsertBulk

UpdateDefaultLimit sets the "default_limit" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateDescription

func (u *QuotaItemUpsertBulk) UpdateDescription() *QuotaItemUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateName

func (u *QuotaItemUpsertBulk) UpdateName() *QuotaItemUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateNewValues

func (u *QuotaItemUpsertBulk) UpdateNewValues() *QuotaItemUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.QuotaItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(quotaitem.FieldID)
		}),
	).
	Exec(ctx)

func (*QuotaItemUpsertBulk) UpdateResourceType

func (u *QuotaItemUpsertBulk) UpdateResourceType() *QuotaItemUpsertBulk

UpdateResourceType sets the "resource_type" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateUnit

func (u *QuotaItemUpsertBulk) UpdateUnit() *QuotaItemUpsertBulk

UpdateUnit sets the "unit" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateUpdatedAt

func (u *QuotaItemUpsertBulk) UpdateUpdatedAt() *QuotaItemUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QuotaItemUpsertBulk) UpdateUpdatedBy

func (u *QuotaItemUpsertBulk) UpdateUpdatedBy() *QuotaItemUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type QuotaItemUpsertOne

type QuotaItemUpsertOne struct {
	// contains filtered or unexported fields
}

QuotaItemUpsertOne is the builder for "upsert"-ing

one QuotaItem node.

func (*QuotaItemUpsertOne) AddDefaultLimit

func (u *QuotaItemUpsertOne) AddDefaultLimit(v int64) *QuotaItemUpsertOne

AddDefaultLimit adds v to the "default_limit" field.

func (*QuotaItemUpsertOne) AddUpdatedBy

func (u *QuotaItemUpsertOne) AddUpdatedBy(v int) *QuotaItemUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*QuotaItemUpsertOne) ClearDefaultLimit

func (u *QuotaItemUpsertOne) ClearDefaultLimit() *QuotaItemUpsertOne

ClearDefaultLimit clears the value of the "default_limit" field.

func (*QuotaItemUpsertOne) ClearDescription

func (u *QuotaItemUpsertOne) ClearDescription() *QuotaItemUpsertOne

ClearDescription clears the value of the "description" field.

func (*QuotaItemUpsertOne) ClearUnit

func (u *QuotaItemUpsertOne) ClearUnit() *QuotaItemUpsertOne

ClearUnit clears the value of the "unit" field.

func (*QuotaItemUpsertOne) ClearUpdatedAt

func (u *QuotaItemUpsertOne) ClearUpdatedAt() *QuotaItemUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaItemUpsertOne) ClearUpdatedBy

func (u *QuotaItemUpsertOne) ClearUpdatedBy() *QuotaItemUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaItemUpsertOne) DoNothing

func (u *QuotaItemUpsertOne) DoNothing() *QuotaItemUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*QuotaItemUpsertOne) Exec

func (u *QuotaItemUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaItemUpsertOne) ExecX

func (u *QuotaItemUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaItemUpsertOne) ID

func (u *QuotaItemUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*QuotaItemUpsertOne) IDX

func (u *QuotaItemUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*QuotaItemUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.QuotaItem.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*QuotaItemUpsertOne) SetActive

func (u *QuotaItemUpsertOne) SetActive(v bool) *QuotaItemUpsertOne

SetActive sets the "active" field.

func (*QuotaItemUpsertOne) SetCode

SetCode sets the "code" field.

func (*QuotaItemUpsertOne) SetDefaultLimit

func (u *QuotaItemUpsertOne) SetDefaultLimit(v int64) *QuotaItemUpsertOne

SetDefaultLimit sets the "default_limit" field.

func (*QuotaItemUpsertOne) SetDescription

func (u *QuotaItemUpsertOne) SetDescription(v string) *QuotaItemUpsertOne

SetDescription sets the "description" field.

func (*QuotaItemUpsertOne) SetName

SetName sets the "name" field.

func (*QuotaItemUpsertOne) SetResourceType

SetResourceType sets the "resource_type" field.

func (*QuotaItemUpsertOne) SetUnit

SetUnit sets the "unit" field.

func (*QuotaItemUpsertOne) SetUpdatedAt

func (u *QuotaItemUpsertOne) SetUpdatedAt(v time.Time) *QuotaItemUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*QuotaItemUpsertOne) SetUpdatedBy

func (u *QuotaItemUpsertOne) SetUpdatedBy(v int) *QuotaItemUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*QuotaItemUpsertOne) Update

func (u *QuotaItemUpsertOne) Update(set func(*QuotaItemUpsert)) *QuotaItemUpsertOne

Update allows overriding fields `UPDATE` values. See the QuotaItemCreate.OnConflict documentation for more info.

func (*QuotaItemUpsertOne) UpdateActive

func (u *QuotaItemUpsertOne) UpdateActive() *QuotaItemUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateCode

func (u *QuotaItemUpsertOne) UpdateCode() *QuotaItemUpsertOne

UpdateCode sets the "code" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateDefaultLimit

func (u *QuotaItemUpsertOne) UpdateDefaultLimit() *QuotaItemUpsertOne

UpdateDefaultLimit sets the "default_limit" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateDescription

func (u *QuotaItemUpsertOne) UpdateDescription() *QuotaItemUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateName

func (u *QuotaItemUpsertOne) UpdateName() *QuotaItemUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateNewValues

func (u *QuotaItemUpsertOne) UpdateNewValues() *QuotaItemUpsertOne

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.QuotaItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(quotaitem.FieldID)
		}),
	).
	Exec(ctx)

func (*QuotaItemUpsertOne) UpdateResourceType

func (u *QuotaItemUpsertOne) UpdateResourceType() *QuotaItemUpsertOne

UpdateResourceType sets the "resource_type" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateUnit

func (u *QuotaItemUpsertOne) UpdateUnit() *QuotaItemUpsertOne

UpdateUnit sets the "unit" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateUpdatedAt

func (u *QuotaItemUpsertOne) UpdateUpdatedAt() *QuotaItemUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QuotaItemUpsertOne) UpdateUpdatedBy

func (u *QuotaItemUpsertOne) UpdateUpdatedBy() *QuotaItemUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type QuotaItemWhereInput

type QuotaItemWhereInput struct {
	Predicates []predicate.QuotaItem  `json:"-"`
	Not        *QuotaItemWhereInput   `json:"not,omitempty"`
	Or         []*QuotaItemWhereInput `json:"or,omitempty"`
	And        []*QuotaItemWhereInput `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"`

	// "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"`

	// "resource_type" field predicates.
	ResourceType      *quotaitem.ResourceType  `json:"resourceType,omitempty"`
	ResourceTypeNEQ   *quotaitem.ResourceType  `json:"resourceTypeNEQ,omitempty"`
	ResourceTypeIn    []quotaitem.ResourceType `json:"resourceTypeIn,omitempty"`
	ResourceTypeNotIn []quotaitem.ResourceType `json:"resourceTypeNotIn,omitempty"`

	// "active" field predicates.
	Active    *bool `json:"active,omitempty"`
	ActiveNEQ *bool `json:"activeNEQ,omitempty"`

	// "default_limit" field predicates.
	DefaultLimit       *int64  `json:"defaultLimit,omitempty"`
	DefaultLimitNEQ    *int64  `json:"defaultLimitNEQ,omitempty"`
	DefaultLimitIn     []int64 `json:"defaultLimitIn,omitempty"`
	DefaultLimitNotIn  []int64 `json:"defaultLimitNotIn,omitempty"`
	DefaultLimitGT     *int64  `json:"defaultLimitGT,omitempty"`
	DefaultLimitGTE    *int64  `json:"defaultLimitGTE,omitempty"`
	DefaultLimitLT     *int64  `json:"defaultLimitLT,omitempty"`
	DefaultLimitLTE    *int64  `json:"defaultLimitLTE,omitempty"`
	DefaultLimitIsNil  bool    `json:"defaultLimitIsNil,omitempty"`
	DefaultLimitNotNil bool    `json:"defaultLimitNotNil,omitempty"`

	// "quota" edge predicates.
	HasQuota     *bool              `json:"hasQuota,omitempty"`
	HasQuotaWith []*QuotaWhereInput `json:"hasQuotaWith,omitempty"`
}

QuotaItemWhereInput represents a where input for filtering QuotaItem queries.

func (*QuotaItemWhereInput) AddPredicates

func (i *QuotaItemWhereInput) AddPredicates(predicates ...predicate.QuotaItem)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*QuotaItemWhereInput) Filter

Filter applies the QuotaItemWhereInput filter on the QuotaItemQuery builder.

func (*QuotaItemWhereInput) P

P returns a predicate for filtering quotaitems. An error is returned if the input is empty or invalid.

type QuotaItems

type QuotaItems []*QuotaItem

QuotaItems is a parsable slice of QuotaItem.

type QuotaMutation

type QuotaMutation struct {
	// contains filtered or unexported fields
}

QuotaMutation represents an operation that mutates the Quota nodes in the graph.

func (*QuotaMutation) AddCreatedBy

func (m *QuotaMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*QuotaMutation) AddField

func (m *QuotaMutation) 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 (*QuotaMutation) AddLimit

func (m *QuotaMutation) AddLimit(i int64)

AddLimit adds i to the "limit" field.

func (*QuotaMutation) AddUpdatedBy

func (m *QuotaMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*QuotaMutation) AddUsed

func (m *QuotaMutation) AddUsed(i int64)

AddUsed adds i to the "used" field.

func (*QuotaMutation) AddedCreatedBy

func (m *QuotaMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*QuotaMutation) AddedEdges

func (m *QuotaMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*QuotaMutation) AddedField

func (m *QuotaMutation) 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 (*QuotaMutation) AddedFields

func (m *QuotaMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*QuotaMutation) AddedIDs

func (m *QuotaMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*QuotaMutation) AddedLimit

func (m *QuotaMutation) AddedLimit() (r int64, exists bool)

AddedLimit returns the value that was added to the "limit" field in this mutation.

func (*QuotaMutation) AddedUpdatedBy

func (m *QuotaMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*QuotaMutation) AddedUsed

func (m *QuotaMutation) AddedUsed() (r int64, exists bool)

AddedUsed returns the value that was added to the "used" field in this mutation.

func (*QuotaMutation) ClearEdge

func (m *QuotaMutation) 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 (*QuotaMutation) ClearEndAt

func (m *QuotaMutation) ClearEndAt()

ClearEndAt clears the value of the "end_at" field.

func (*QuotaMutation) ClearField

func (m *QuotaMutation) 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 (*QuotaMutation) ClearQuotaItem

func (m *QuotaMutation) ClearQuotaItem()

ClearQuotaItem clears the "quota_item" edge to the QuotaItem entity.

func (*QuotaMutation) ClearQuotaOrg

func (m *QuotaMutation) ClearQuotaOrg()

ClearQuotaOrg clears the "quota_org" edge to the Org entity.

func (*QuotaMutation) ClearQuotaUser

func (m *QuotaMutation) ClearQuotaUser()

ClearQuotaUser clears the "quota_user" edge to the User entity.

func (*QuotaMutation) ClearStartAt

func (m *QuotaMutation) ClearStartAt()

ClearStartAt clears the value of the "start_at" field.

func (*QuotaMutation) ClearTenantID

func (m *QuotaMutation) ClearTenantID()

ClearTenantID clears the value of the "tenant_id" field.

func (*QuotaMutation) ClearUpdatedAt

func (m *QuotaMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaMutation) ClearUpdatedBy

func (m *QuotaMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaMutation) ClearUserID

func (m *QuotaMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*QuotaMutation) ClearedEdges

func (m *QuotaMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*QuotaMutation) ClearedFields

func (m *QuotaMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (QuotaMutation) Client

func (m QuotaMutation) 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 (*QuotaMutation) CreatedAt

func (m *QuotaMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*QuotaMutation) CreatedBy

func (m *QuotaMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*QuotaMutation) EdgeCleared

func (m *QuotaMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*QuotaMutation) EndAt

func (m *QuotaMutation) EndAt() (r time.Time, exists bool)

EndAt returns the value of the "end_at" field in the mutation.

func (*QuotaMutation) EndAtCleared

func (m *QuotaMutation) EndAtCleared() bool

EndAtCleared returns if the "end_at" field was cleared in this mutation.

func (*QuotaMutation) ExecContext

func (c *QuotaMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaMutation) Field

func (m *QuotaMutation) 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 (*QuotaMutation) FieldCleared

func (m *QuotaMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*QuotaMutation) Fields

func (m *QuotaMutation) 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 (*QuotaMutation) ID

func (m *QuotaMutation) 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 (*QuotaMutation) IDs

func (m *QuotaMutation) 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 (*QuotaMutation) Limit

func (m *QuotaMutation) Limit() (r int64, exists bool)

Limit returns the value of the "limit" field in the mutation.

func (*QuotaMutation) OldCreatedAt

func (m *QuotaMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldCreatedBy

func (m *QuotaMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldEndAt

func (m *QuotaMutation) OldEndAt(ctx context.Context) (v time.Time, err error)

OldEndAt returns the old "end_at" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldField

func (m *QuotaMutation) 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 (*QuotaMutation) OldLimit

func (m *QuotaMutation) OldLimit(ctx context.Context) (v int64, err error)

OldLimit returns the old "limit" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldQuotaItemID

func (m *QuotaMutation) OldQuotaItemID(ctx context.Context) (v int, err error)

OldQuotaItemID returns the old "quota_item_id" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldStartAt

func (m *QuotaMutation) OldStartAt(ctx context.Context) (v time.Time, err error)

OldStartAt returns the old "start_at" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldTenantID

func (m *QuotaMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldUpdatedAt

func (m *QuotaMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldUpdatedBy

func (m *QuotaMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldUsed

func (m *QuotaMutation) OldUsed(ctx context.Context) (v int64, err error)

OldUsed returns the old "used" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) OldUserID

func (m *QuotaMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the Quota entity. If the Quota object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QuotaMutation) Op

func (m *QuotaMutation) Op() Op

Op returns the operation name.

func (*QuotaMutation) QueryContext

func (c *QuotaMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaMutation) QuotaItemCleared

func (m *QuotaMutation) QuotaItemCleared() bool

QuotaItemCleared reports if the "quota_item" edge to the QuotaItem entity was cleared.

func (*QuotaMutation) QuotaItemID

func (m *QuotaMutation) QuotaItemID() (r int, exists bool)

QuotaItemID returns the value of the "quota_item_id" field in the mutation.

func (*QuotaMutation) QuotaItemIDs

func (m *QuotaMutation) QuotaItemIDs() (ids []int)

QuotaItemIDs returns the "quota_item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QuotaItemID instead. It exists only for internal usage by the builders.

func (*QuotaMutation) QuotaOrgCleared

func (m *QuotaMutation) QuotaOrgCleared() bool

QuotaOrgCleared reports if the "quota_org" edge to the Org entity was cleared.

func (*QuotaMutation) QuotaOrgID

func (m *QuotaMutation) QuotaOrgID() (id int, exists bool)

QuotaOrgID returns the "quota_org" edge ID in the mutation.

func (*QuotaMutation) QuotaOrgIDs

func (m *QuotaMutation) QuotaOrgIDs() (ids []int)

QuotaOrgIDs returns the "quota_org" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QuotaOrgID instead. It exists only for internal usage by the builders.

func (*QuotaMutation) QuotaUserCleared

func (m *QuotaMutation) QuotaUserCleared() bool

QuotaUserCleared reports if the "quota_user" edge to the User entity was cleared.

func (*QuotaMutation) QuotaUserID

func (m *QuotaMutation) QuotaUserID() (id int, exists bool)

QuotaUserID returns the "quota_user" edge ID in the mutation.

func (*QuotaMutation) QuotaUserIDs

func (m *QuotaMutation) QuotaUserIDs() (ids []int)

QuotaUserIDs returns the "quota_user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QuotaUserID instead. It exists only for internal usage by the builders.

func (*QuotaMutation) RemovedEdges

func (m *QuotaMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*QuotaMutation) RemovedIDs

func (m *QuotaMutation) 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 (*QuotaMutation) ResetCreatedAt

func (m *QuotaMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*QuotaMutation) ResetCreatedBy

func (m *QuotaMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*QuotaMutation) ResetEdge

func (m *QuotaMutation) 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 (*QuotaMutation) ResetEndAt

func (m *QuotaMutation) ResetEndAt()

ResetEndAt resets all changes to the "end_at" field.

func (*QuotaMutation) ResetField

func (m *QuotaMutation) 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 (*QuotaMutation) ResetLimit

func (m *QuotaMutation) ResetLimit()

ResetLimit resets all changes to the "limit" field.

func (*QuotaMutation) ResetQuotaItem

func (m *QuotaMutation) ResetQuotaItem()

ResetQuotaItem resets all changes to the "quota_item" edge.

func (*QuotaMutation) ResetQuotaItemID

func (m *QuotaMutation) ResetQuotaItemID()

ResetQuotaItemID resets all changes to the "quota_item_id" field.

func (*QuotaMutation) ResetQuotaOrg

func (m *QuotaMutation) ResetQuotaOrg()

ResetQuotaOrg resets all changes to the "quota_org" edge.

func (*QuotaMutation) ResetQuotaUser

func (m *QuotaMutation) ResetQuotaUser()

ResetQuotaUser resets all changes to the "quota_user" edge.

func (*QuotaMutation) ResetStartAt

func (m *QuotaMutation) ResetStartAt()

ResetStartAt resets all changes to the "start_at" field.

func (*QuotaMutation) ResetTenantID

func (m *QuotaMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*QuotaMutation) ResetUpdatedAt

func (m *QuotaMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*QuotaMutation) ResetUpdatedBy

func (m *QuotaMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*QuotaMutation) ResetUsed

func (m *QuotaMutation) ResetUsed()

ResetUsed resets all changes to the "used" field.

func (*QuotaMutation) ResetUserID

func (m *QuotaMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*QuotaMutation) SetCreatedAt

func (m *QuotaMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*QuotaMutation) SetCreatedBy

func (m *QuotaMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*QuotaMutation) SetEndAt

func (m *QuotaMutation) SetEndAt(t time.Time)

SetEndAt sets the "end_at" field.

func (*QuotaMutation) SetField

func (m *QuotaMutation) 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 (*QuotaMutation) SetID

func (m *QuotaMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Quota entities.

func (*QuotaMutation) SetLimit

func (m *QuotaMutation) SetLimit(i int64)

SetLimit sets the "limit" field.

func (*QuotaMutation) SetOp

func (m *QuotaMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*QuotaMutation) SetQuotaItemID

func (m *QuotaMutation) SetQuotaItemID(i int)

SetQuotaItemID sets the "quota_item_id" field.

func (*QuotaMutation) SetQuotaOrgID

func (m *QuotaMutation) SetQuotaOrgID(id int)

SetQuotaOrgID sets the "quota_org" edge to the Org entity by id.

func (*QuotaMutation) SetQuotaUserID

func (m *QuotaMutation) SetQuotaUserID(id int)

SetQuotaUserID sets the "quota_user" edge to the User entity by id.

func (*QuotaMutation) SetStartAt

func (m *QuotaMutation) SetStartAt(t time.Time)

SetStartAt sets the "start_at" field.

func (*QuotaMutation) SetTenantID

func (m *QuotaMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*QuotaMutation) SetUpdatedAt

func (m *QuotaMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*QuotaMutation) SetUpdatedBy

func (m *QuotaMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*QuotaMutation) SetUsed

func (m *QuotaMutation) SetUsed(i int64)

SetUsed sets the "used" field.

func (*QuotaMutation) SetUserID

func (m *QuotaMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*QuotaMutation) StartAt

func (m *QuotaMutation) StartAt() (r time.Time, exists bool)

StartAt returns the value of the "start_at" field in the mutation.

func (*QuotaMutation) StartAtCleared

func (m *QuotaMutation) StartAtCleared() bool

StartAtCleared returns if the "start_at" field was cleared in this mutation.

func (*QuotaMutation) TenantID

func (m *QuotaMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (*QuotaMutation) TenantIDCleared

func (m *QuotaMutation) TenantIDCleared() bool

TenantIDCleared returns if the "tenant_id" field was cleared in this mutation.

func (QuotaMutation) Tx

func (m QuotaMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*QuotaMutation) Type

func (m *QuotaMutation) Type() string

Type returns the node type of this mutation (Quota).

func (*QuotaMutation) UpdatedAt

func (m *QuotaMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*QuotaMutation) UpdatedAtCleared

func (m *QuotaMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*QuotaMutation) UpdatedBy

func (m *QuotaMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*QuotaMutation) UpdatedByCleared

func (m *QuotaMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*QuotaMutation) Used

func (m *QuotaMutation) Used() (r int64, exists bool)

Used returns the value of the "used" field in the mutation.

func (*QuotaMutation) UserID

func (m *QuotaMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*QuotaMutation) UserIDCleared

func (m *QuotaMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*QuotaMutation) Where

func (m *QuotaMutation) Where(ps ...predicate.Quota)

Where appends a list predicates to the QuotaMutation builder.

func (*QuotaMutation) WhereP

func (m *QuotaMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the QuotaMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type QuotaOrder

type QuotaOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *QuotaOrderField `json:"field"`
}

QuotaOrder defines the ordering of Quota.

type QuotaOrderField

type QuotaOrderField struct {
	// Value extracts the ordering value from the given Quota.
	Value func(*Quota) (ent.Value, error)
	// contains filtered or unexported fields
}

QuotaOrderField defines the ordering field of Quota.

func (QuotaOrderField) MarshalGQL

func (f QuotaOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (QuotaOrderField) String

func (f QuotaOrderField) String() string

String implement fmt.Stringer interface.

func (*QuotaOrderField) UnmarshalGQL

func (f *QuotaOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type QuotaPaginateOption

type QuotaPaginateOption func(*quotaPager) error

QuotaPaginateOption enables pagination customization.

func WithQuotaFilter

func WithQuotaFilter(filter func(*QuotaQuery) (*QuotaQuery, error)) QuotaPaginateOption

WithQuotaFilter configures pagination filter.

func WithQuotaOrder

func WithQuotaOrder(order *QuotaOrder) QuotaPaginateOption

WithQuotaOrder configures pagination ordering.

type QuotaQuery

type QuotaQuery struct {
	// contains filtered or unexported fields
}

QuotaQuery is the builder for querying Quota entities.

func (*QuotaQuery) Aggregate

func (qq *QuotaQuery) Aggregate(fns ...AggregateFunc) *QuotaSelect

Aggregate returns a QuotaSelect configured with the given aggregations.

func (*QuotaQuery) All

func (qq *QuotaQuery) All(ctx context.Context) ([]*Quota, error)

All executes the query and returns a list of QuotaSlice.

func (*QuotaQuery) AllX

func (qq *QuotaQuery) AllX(ctx context.Context) []*Quota

AllX is like All, but panics if an error occurs.

func (*QuotaQuery) Clone

func (qq *QuotaQuery) Clone() *QuotaQuery

Clone returns a duplicate of the QuotaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*QuotaQuery) CollectFields

func (q *QuotaQuery) CollectFields(ctx context.Context, satisfies ...string) (*QuotaQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*QuotaQuery) Count

func (qq *QuotaQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*QuotaQuery) CountX

func (qq *QuotaQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*QuotaQuery) ExecContext

func (c *QuotaQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaQuery) Exist

func (qq *QuotaQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*QuotaQuery) ExistX

func (qq *QuotaQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*QuotaQuery) First

func (qq *QuotaQuery) First(ctx context.Context) (*Quota, error)

First returns the first Quota entity from the query. Returns a *NotFoundError when no Quota was found.

func (*QuotaQuery) FirstID

func (qq *QuotaQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Quota ID from the query. Returns a *NotFoundError when no Quota ID was found.

func (*QuotaQuery) FirstIDX

func (qq *QuotaQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*QuotaQuery) FirstX

func (qq *QuotaQuery) FirstX(ctx context.Context) *Quota

FirstX is like First, but panics if an error occurs.

func (*QuotaQuery) GroupBy

func (qq *QuotaQuery) GroupBy(field string, fields ...string) *QuotaGroupBy

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.Quota.Query().
	GroupBy(quota.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*QuotaQuery) IDs

func (qq *QuotaQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Quota IDs.

func (*QuotaQuery) IDsX

func (qq *QuotaQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*QuotaQuery) Limit

func (qq *QuotaQuery) Limit(limit int) *QuotaQuery

Limit the number of records to be returned by this query.

func (*QuotaQuery) Offset

func (qq *QuotaQuery) Offset(offset int) *QuotaQuery

Offset to start from.

func (*QuotaQuery) Only

func (qq *QuotaQuery) Only(ctx context.Context) (*Quota, error)

Only returns a single Quota entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Quota entity is found. Returns a *NotFoundError when no Quota entities are found.

func (*QuotaQuery) OnlyID

func (qq *QuotaQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Quota ID in the query. Returns a *NotSingularError when more than one Quota ID is found. Returns a *NotFoundError when no entities are found.

func (*QuotaQuery) OnlyIDX

func (qq *QuotaQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*QuotaQuery) OnlyX

func (qq *QuotaQuery) OnlyX(ctx context.Context) *Quota

OnlyX is like Only, but panics if an error occurs.

func (*QuotaQuery) Order

func (qq *QuotaQuery) Order(o ...quota.OrderOption) *QuotaQuery

Order specifies how the records should be ordered.

func (*QuotaQuery) Paginate

func (q *QuotaQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...QuotaPaginateOption,
) (*QuotaConnection, error)

Paginate executes the query and returns a relay based cursor connection to Quota.

func (*QuotaQuery) QueryContext

func (c *QuotaQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaQuery) QueryQuotaItem

func (qq *QuotaQuery) QueryQuotaItem() *QuotaItemQuery

QueryQuotaItem chains the current query on the "quota_item" edge.

func (*QuotaQuery) QueryQuotaOrg

func (qq *QuotaQuery) QueryQuotaOrg() *OrgQuery

QueryQuotaOrg chains the current query on the "quota_org" edge.

func (*QuotaQuery) QueryQuotaUser

func (qq *QuotaQuery) QueryQuotaUser() *UserQuery

QueryQuotaUser chains the current query on the "quota_user" edge.

func (*QuotaQuery) Select

func (qq *QuotaQuery) Select(fields ...string) *QuotaSelect

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.Quota.Query().
	Select(quota.FieldCreatedBy).
	Scan(ctx, &v)

func (*QuotaQuery) Unique

func (qq *QuotaQuery) Unique(unique bool) *QuotaQuery

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 (*QuotaQuery) Where

func (qq *QuotaQuery) Where(ps ...predicate.Quota) *QuotaQuery

Where adds a new predicate for the QuotaQuery builder.

func (*QuotaQuery) WithQuotaItem

func (qq *QuotaQuery) WithQuotaItem(opts ...func(*QuotaItemQuery)) *QuotaQuery

WithQuotaItem tells the query-builder to eager-load the nodes that are connected to the "quota_item" edge. The optional arguments are used to configure the query builder of the edge.

func (*QuotaQuery) WithQuotaOrg

func (qq *QuotaQuery) WithQuotaOrg(opts ...func(*OrgQuery)) *QuotaQuery

WithQuotaOrg tells the query-builder to eager-load the nodes that are connected to the "quota_org" edge. The optional arguments are used to configure the query builder of the edge.

func (*QuotaQuery) WithQuotaUser

func (qq *QuotaQuery) WithQuotaUser(opts ...func(*UserQuery)) *QuotaQuery

WithQuotaUser tells the query-builder to eager-load the nodes that are connected to the "quota_user" edge. The optional arguments are used to configure the query builder of the edge.

type QuotaSelect

type QuotaSelect struct {
	*QuotaQuery
	// contains filtered or unexported fields
}

QuotaSelect is the builder for selecting fields of Quota entities.

func (*QuotaSelect) Aggregate

func (qs *QuotaSelect) Aggregate(fns ...AggregateFunc) *QuotaSelect

Aggregate adds the given aggregation functions to the selector query.

func (*QuotaSelect) Bool

func (s *QuotaSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) BoolX

func (s *QuotaSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*QuotaSelect) Bools

func (s *QuotaSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) BoolsX

func (s *QuotaSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (QuotaSelect) ExecContext

func (c QuotaSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaSelect) Float64

func (s *QuotaSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) Float64X

func (s *QuotaSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*QuotaSelect) Float64s

func (s *QuotaSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) Float64sX

func (s *QuotaSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*QuotaSelect) Int

func (s *QuotaSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) IntX

func (s *QuotaSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*QuotaSelect) Ints

func (s *QuotaSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) IntsX

func (s *QuotaSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (QuotaSelect) QueryContext

func (c QuotaSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaSelect) Scan

func (qs *QuotaSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*QuotaSelect) ScanX

func (s *QuotaSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*QuotaSelect) String

func (s *QuotaSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) StringX

func (s *QuotaSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*QuotaSelect) Strings

func (s *QuotaSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*QuotaSelect) StringsX

func (s *QuotaSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type QuotaSlice

type QuotaSlice []*Quota

QuotaSlice is a parsable slice of Quota.

type QuotaUpdate

type QuotaUpdate struct {
	// contains filtered or unexported fields
}

QuotaUpdate is the builder for updating Quota entities.

func (*QuotaUpdate) AddLimit

func (qu *QuotaUpdate) AddLimit(i int64) *QuotaUpdate

AddLimit adds i to the "limit" field.

func (*QuotaUpdate) AddUpdatedBy

func (qu *QuotaUpdate) AddUpdatedBy(i int) *QuotaUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*QuotaUpdate) AddUsed

func (qu *QuotaUpdate) AddUsed(i int64) *QuotaUpdate

AddUsed adds i to the "used" field.

func (*QuotaUpdate) ClearEndAt

func (qu *QuotaUpdate) ClearEndAt() *QuotaUpdate

ClearEndAt clears the value of the "end_at" field.

func (*QuotaUpdate) ClearQuotaItem

func (qu *QuotaUpdate) ClearQuotaItem() *QuotaUpdate

ClearQuotaItem clears the "quota_item" edge to the QuotaItem entity.

func (*QuotaUpdate) ClearQuotaOrg

func (qu *QuotaUpdate) ClearQuotaOrg() *QuotaUpdate

ClearQuotaOrg clears the "quota_org" edge to the Org entity.

func (*QuotaUpdate) ClearQuotaUser

func (qu *QuotaUpdate) ClearQuotaUser() *QuotaUpdate

ClearQuotaUser clears the "quota_user" edge to the User entity.

func (*QuotaUpdate) ClearStartAt

func (qu *QuotaUpdate) ClearStartAt() *QuotaUpdate

ClearStartAt clears the value of the "start_at" field.

func (*QuotaUpdate) ClearTenantID

func (qu *QuotaUpdate) ClearTenantID() *QuotaUpdate

ClearTenantID clears the value of the "tenant_id" field.

func (*QuotaUpdate) ClearUpdatedAt

func (qu *QuotaUpdate) ClearUpdatedAt() *QuotaUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaUpdate) ClearUpdatedBy

func (qu *QuotaUpdate) ClearUpdatedBy() *QuotaUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaUpdate) ClearUserID

func (qu *QuotaUpdate) ClearUserID() *QuotaUpdate

ClearUserID clears the value of the "user_id" field.

func (*QuotaUpdate) Exec

func (qu *QuotaUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaUpdate) ExecContext

func (c *QuotaUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaUpdate) ExecX

func (qu *QuotaUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaUpdate) Mutation

func (qu *QuotaUpdate) Mutation() *QuotaMutation

Mutation returns the QuotaMutation object of the builder.

func (*QuotaUpdate) QueryContext

func (c *QuotaUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaUpdate) Save

func (qu *QuotaUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*QuotaUpdate) SaveX

func (qu *QuotaUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*QuotaUpdate) SetEndAt

func (qu *QuotaUpdate) SetEndAt(t time.Time) *QuotaUpdate

SetEndAt sets the "end_at" field.

func (*QuotaUpdate) SetInput

func (c *QuotaUpdate) SetInput(i UpdateQuotaInput) *QuotaUpdate

SetInput applies the change-set in the UpdateQuotaInput on the QuotaUpdate builder.

func (*QuotaUpdate) SetLimit

func (qu *QuotaUpdate) SetLimit(i int64) *QuotaUpdate

SetLimit sets the "limit" field.

func (*QuotaUpdate) SetNillableEndAt

func (qu *QuotaUpdate) SetNillableEndAt(t *time.Time) *QuotaUpdate

SetNillableEndAt sets the "end_at" field if the given value is not nil.

func (*QuotaUpdate) SetNillableLimit

func (qu *QuotaUpdate) SetNillableLimit(i *int64) *QuotaUpdate

SetNillableLimit sets the "limit" field if the given value is not nil.

func (*QuotaUpdate) SetNillableQuotaItemID

func (qu *QuotaUpdate) SetNillableQuotaItemID(i *int) *QuotaUpdate

SetNillableQuotaItemID sets the "quota_item_id" field if the given value is not nil.

func (*QuotaUpdate) SetNillableQuotaOrgID

func (qu *QuotaUpdate) SetNillableQuotaOrgID(id *int) *QuotaUpdate

SetNillableQuotaOrgID sets the "quota_org" edge to the Org entity by ID if the given value is not nil.

func (*QuotaUpdate) SetNillableQuotaUserID

func (qu *QuotaUpdate) SetNillableQuotaUserID(id *int) *QuotaUpdate

SetNillableQuotaUserID sets the "quota_user" edge to the User entity by ID if the given value is not nil.

func (*QuotaUpdate) SetNillableStartAt

func (qu *QuotaUpdate) SetNillableStartAt(t *time.Time) *QuotaUpdate

SetNillableStartAt sets the "start_at" field if the given value is not nil.

func (*QuotaUpdate) SetNillableTenantID

func (qu *QuotaUpdate) SetNillableTenantID(i *int) *QuotaUpdate

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*QuotaUpdate) SetNillableUpdatedAt

func (qu *QuotaUpdate) SetNillableUpdatedAt(t *time.Time) *QuotaUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*QuotaUpdate) SetNillableUpdatedBy

func (qu *QuotaUpdate) SetNillableUpdatedBy(i *int) *QuotaUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*QuotaUpdate) SetNillableUsed

func (qu *QuotaUpdate) SetNillableUsed(i *int64) *QuotaUpdate

SetNillableUsed sets the "used" field if the given value is not nil.

func (*QuotaUpdate) SetNillableUserID

func (qu *QuotaUpdate) SetNillableUserID(i *int) *QuotaUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*QuotaUpdate) SetQuotaItem

func (qu *QuotaUpdate) SetQuotaItem(q *QuotaItem) *QuotaUpdate

SetQuotaItem sets the "quota_item" edge to the QuotaItem entity.

func (*QuotaUpdate) SetQuotaItemID

func (qu *QuotaUpdate) SetQuotaItemID(i int) *QuotaUpdate

SetQuotaItemID sets the "quota_item_id" field.

func (*QuotaUpdate) SetQuotaOrg

func (qu *QuotaUpdate) SetQuotaOrg(o *Org) *QuotaUpdate

SetQuotaOrg sets the "quota_org" edge to the Org entity.

func (*QuotaUpdate) SetQuotaOrgID

func (qu *QuotaUpdate) SetQuotaOrgID(id int) *QuotaUpdate

SetQuotaOrgID sets the "quota_org" edge to the Org entity by ID.

func (*QuotaUpdate) SetQuotaUser

func (qu *QuotaUpdate) SetQuotaUser(u *User) *QuotaUpdate

SetQuotaUser sets the "quota_user" edge to the User entity.

func (*QuotaUpdate) SetQuotaUserID

func (qu *QuotaUpdate) SetQuotaUserID(id int) *QuotaUpdate

SetQuotaUserID sets the "quota_user" edge to the User entity by ID.

func (*QuotaUpdate) SetStartAt

func (qu *QuotaUpdate) SetStartAt(t time.Time) *QuotaUpdate

SetStartAt sets the "start_at" field.

func (*QuotaUpdate) SetTenantID

func (qu *QuotaUpdate) SetTenantID(i int) *QuotaUpdate

SetTenantID sets the "tenant_id" field.

func (*QuotaUpdate) SetUpdatedAt

func (qu *QuotaUpdate) SetUpdatedAt(t time.Time) *QuotaUpdate

SetUpdatedAt sets the "updated_at" field.

func (*QuotaUpdate) SetUpdatedBy

func (qu *QuotaUpdate) SetUpdatedBy(i int) *QuotaUpdate

SetUpdatedBy sets the "updated_by" field.

func (*QuotaUpdate) SetUsed

func (qu *QuotaUpdate) SetUsed(i int64) *QuotaUpdate

SetUsed sets the "used" field.

func (*QuotaUpdate) SetUserID

func (qu *QuotaUpdate) SetUserID(i int) *QuotaUpdate

SetUserID sets the "user_id" field.

func (*QuotaUpdate) Where

func (qu *QuotaUpdate) Where(ps ...predicate.Quota) *QuotaUpdate

Where appends a list predicates to the QuotaUpdate builder.

type QuotaUpdateOne

type QuotaUpdateOne struct {
	// contains filtered or unexported fields
}

QuotaUpdateOne is the builder for updating a single Quota entity.

func (*QuotaUpdateOne) AddLimit

func (quo *QuotaUpdateOne) AddLimit(i int64) *QuotaUpdateOne

AddLimit adds i to the "limit" field.

func (*QuotaUpdateOne) AddUpdatedBy

func (quo *QuotaUpdateOne) AddUpdatedBy(i int) *QuotaUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*QuotaUpdateOne) AddUsed

func (quo *QuotaUpdateOne) AddUsed(i int64) *QuotaUpdateOne

AddUsed adds i to the "used" field.

func (*QuotaUpdateOne) ClearEndAt

func (quo *QuotaUpdateOne) ClearEndAt() *QuotaUpdateOne

ClearEndAt clears the value of the "end_at" field.

func (*QuotaUpdateOne) ClearQuotaItem

func (quo *QuotaUpdateOne) ClearQuotaItem() *QuotaUpdateOne

ClearQuotaItem clears the "quota_item" edge to the QuotaItem entity.

func (*QuotaUpdateOne) ClearQuotaOrg

func (quo *QuotaUpdateOne) ClearQuotaOrg() *QuotaUpdateOne

ClearQuotaOrg clears the "quota_org" edge to the Org entity.

func (*QuotaUpdateOne) ClearQuotaUser

func (quo *QuotaUpdateOne) ClearQuotaUser() *QuotaUpdateOne

ClearQuotaUser clears the "quota_user" edge to the User entity.

func (*QuotaUpdateOne) ClearStartAt

func (quo *QuotaUpdateOne) ClearStartAt() *QuotaUpdateOne

ClearStartAt clears the value of the "start_at" field.

func (*QuotaUpdateOne) ClearTenantID

func (quo *QuotaUpdateOne) ClearTenantID() *QuotaUpdateOne

ClearTenantID clears the value of the "tenant_id" field.

func (*QuotaUpdateOne) ClearUpdatedAt

func (quo *QuotaUpdateOne) ClearUpdatedAt() *QuotaUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaUpdateOne) ClearUpdatedBy

func (quo *QuotaUpdateOne) ClearUpdatedBy() *QuotaUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaUpdateOne) ClearUserID

func (quo *QuotaUpdateOne) ClearUserID() *QuotaUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*QuotaUpdateOne) Exec

func (quo *QuotaUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*QuotaUpdateOne) ExecContext

func (c *QuotaUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*QuotaUpdateOne) ExecX

func (quo *QuotaUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaUpdateOne) Mutation

func (quo *QuotaUpdateOne) Mutation() *QuotaMutation

Mutation returns the QuotaMutation object of the builder.

func (*QuotaUpdateOne) QueryContext

func (c *QuotaUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*QuotaUpdateOne) Save

func (quo *QuotaUpdateOne) Save(ctx context.Context) (*Quota, error)

Save executes the query and returns the updated Quota entity.

func (*QuotaUpdateOne) SaveX

func (quo *QuotaUpdateOne) SaveX(ctx context.Context) *Quota

SaveX is like Save, but panics if an error occurs.

func (*QuotaUpdateOne) Select

func (quo *QuotaUpdateOne) Select(field string, fields ...string) *QuotaUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*QuotaUpdateOne) SetEndAt

func (quo *QuotaUpdateOne) SetEndAt(t time.Time) *QuotaUpdateOne

SetEndAt sets the "end_at" field.

func (*QuotaUpdateOne) SetInput

SetInput applies the change-set in the UpdateQuotaInput on the QuotaUpdateOne builder.

func (*QuotaUpdateOne) SetLimit

func (quo *QuotaUpdateOne) SetLimit(i int64) *QuotaUpdateOne

SetLimit sets the "limit" field.

func (*QuotaUpdateOne) SetNillableEndAt

func (quo *QuotaUpdateOne) SetNillableEndAt(t *time.Time) *QuotaUpdateOne

SetNillableEndAt sets the "end_at" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableLimit

func (quo *QuotaUpdateOne) SetNillableLimit(i *int64) *QuotaUpdateOne

SetNillableLimit sets the "limit" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableQuotaItemID

func (quo *QuotaUpdateOne) SetNillableQuotaItemID(i *int) *QuotaUpdateOne

SetNillableQuotaItemID sets the "quota_item_id" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableQuotaOrgID

func (quo *QuotaUpdateOne) SetNillableQuotaOrgID(id *int) *QuotaUpdateOne

SetNillableQuotaOrgID sets the "quota_org" edge to the Org entity by ID if the given value is not nil.

func (*QuotaUpdateOne) SetNillableQuotaUserID

func (quo *QuotaUpdateOne) SetNillableQuotaUserID(id *int) *QuotaUpdateOne

SetNillableQuotaUserID sets the "quota_user" edge to the User entity by ID if the given value is not nil.

func (*QuotaUpdateOne) SetNillableStartAt

func (quo *QuotaUpdateOne) SetNillableStartAt(t *time.Time) *QuotaUpdateOne

SetNillableStartAt sets the "start_at" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableTenantID

func (quo *QuotaUpdateOne) SetNillableTenantID(i *int) *QuotaUpdateOne

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableUpdatedAt

func (quo *QuotaUpdateOne) SetNillableUpdatedAt(t *time.Time) *QuotaUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableUpdatedBy

func (quo *QuotaUpdateOne) SetNillableUpdatedBy(i *int) *QuotaUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableUsed

func (quo *QuotaUpdateOne) SetNillableUsed(i *int64) *QuotaUpdateOne

SetNillableUsed sets the "used" field if the given value is not nil.

func (*QuotaUpdateOne) SetNillableUserID

func (quo *QuotaUpdateOne) SetNillableUserID(i *int) *QuotaUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*QuotaUpdateOne) SetQuotaItem

func (quo *QuotaUpdateOne) SetQuotaItem(q *QuotaItem) *QuotaUpdateOne

SetQuotaItem sets the "quota_item" edge to the QuotaItem entity.

func (*QuotaUpdateOne) SetQuotaItemID

func (quo *QuotaUpdateOne) SetQuotaItemID(i int) *QuotaUpdateOne

SetQuotaItemID sets the "quota_item_id" field.

func (*QuotaUpdateOne) SetQuotaOrg

func (quo *QuotaUpdateOne) SetQuotaOrg(o *Org) *QuotaUpdateOne

SetQuotaOrg sets the "quota_org" edge to the Org entity.

func (*QuotaUpdateOne) SetQuotaOrgID

func (quo *QuotaUpdateOne) SetQuotaOrgID(id int) *QuotaUpdateOne

SetQuotaOrgID sets the "quota_org" edge to the Org entity by ID.

func (*QuotaUpdateOne) SetQuotaUser

func (quo *QuotaUpdateOne) SetQuotaUser(u *User) *QuotaUpdateOne

SetQuotaUser sets the "quota_user" edge to the User entity.

func (*QuotaUpdateOne) SetQuotaUserID

func (quo *QuotaUpdateOne) SetQuotaUserID(id int) *QuotaUpdateOne

SetQuotaUserID sets the "quota_user" edge to the User entity by ID.

func (*QuotaUpdateOne) SetStartAt

func (quo *QuotaUpdateOne) SetStartAt(t time.Time) *QuotaUpdateOne

SetStartAt sets the "start_at" field.

func (*QuotaUpdateOne) SetTenantID

func (quo *QuotaUpdateOne) SetTenantID(i int) *QuotaUpdateOne

SetTenantID sets the "tenant_id" field.

func (*QuotaUpdateOne) SetUpdatedAt

func (quo *QuotaUpdateOne) SetUpdatedAt(t time.Time) *QuotaUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*QuotaUpdateOne) SetUpdatedBy

func (quo *QuotaUpdateOne) SetUpdatedBy(i int) *QuotaUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*QuotaUpdateOne) SetUsed

func (quo *QuotaUpdateOne) SetUsed(i int64) *QuotaUpdateOne

SetUsed sets the "used" field.

func (*QuotaUpdateOne) SetUserID

func (quo *QuotaUpdateOne) SetUserID(i int) *QuotaUpdateOne

SetUserID sets the "user_id" field.

func (*QuotaUpdateOne) Where

func (quo *QuotaUpdateOne) Where(ps ...predicate.Quota) *QuotaUpdateOne

Where appends a list predicates to the QuotaUpdate builder.

type QuotaUpsert

type QuotaUpsert struct {
	*sql.UpdateSet
}

QuotaUpsert is the "OnConflict" setter.

func (*QuotaUpsert) AddLimit

func (u *QuotaUpsert) AddLimit(v int64) *QuotaUpsert

AddLimit adds v to the "limit" field.

func (*QuotaUpsert) AddUpdatedBy

func (u *QuotaUpsert) AddUpdatedBy(v int) *QuotaUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*QuotaUpsert) AddUsed

func (u *QuotaUpsert) AddUsed(v int64) *QuotaUpsert

AddUsed adds v to the "used" field.

func (*QuotaUpsert) ClearEndAt

func (u *QuotaUpsert) ClearEndAt() *QuotaUpsert

ClearEndAt clears the value of the "end_at" field.

func (*QuotaUpsert) ClearStartAt

func (u *QuotaUpsert) ClearStartAt() *QuotaUpsert

ClearStartAt clears the value of the "start_at" field.

func (*QuotaUpsert) ClearTenantID

func (u *QuotaUpsert) ClearTenantID() *QuotaUpsert

ClearTenantID clears the value of the "tenant_id" field.

func (*QuotaUpsert) ClearUpdatedAt

func (u *QuotaUpsert) ClearUpdatedAt() *QuotaUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaUpsert) ClearUpdatedBy

func (u *QuotaUpsert) ClearUpdatedBy() *QuotaUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaUpsert) ClearUserID

func (u *QuotaUpsert) ClearUserID() *QuotaUpsert

ClearUserID clears the value of the "user_id" field.

func (*QuotaUpsert) SetEndAt

func (u *QuotaUpsert) SetEndAt(v time.Time) *QuotaUpsert

SetEndAt sets the "end_at" field.

func (*QuotaUpsert) SetLimit

func (u *QuotaUpsert) SetLimit(v int64) *QuotaUpsert

SetLimit sets the "limit" field.

func (*QuotaUpsert) SetQuotaItemID

func (u *QuotaUpsert) SetQuotaItemID(v int) *QuotaUpsert

SetQuotaItemID sets the "quota_item_id" field.

func (*QuotaUpsert) SetStartAt

func (u *QuotaUpsert) SetStartAt(v time.Time) *QuotaUpsert

SetStartAt sets the "start_at" field.

func (*QuotaUpsert) SetTenantID

func (u *QuotaUpsert) SetTenantID(v int) *QuotaUpsert

SetTenantID sets the "tenant_id" field.

func (*QuotaUpsert) SetUpdatedAt

func (u *QuotaUpsert) SetUpdatedAt(v time.Time) *QuotaUpsert

SetUpdatedAt sets the "updated_at" field.

func (*QuotaUpsert) SetUpdatedBy

func (u *QuotaUpsert) SetUpdatedBy(v int) *QuotaUpsert

SetUpdatedBy sets the "updated_by" field.

func (*QuotaUpsert) SetUsed

func (u *QuotaUpsert) SetUsed(v int64) *QuotaUpsert

SetUsed sets the "used" field.

func (*QuotaUpsert) SetUserID

func (u *QuotaUpsert) SetUserID(v int) *QuotaUpsert

SetUserID sets the "user_id" field.

func (*QuotaUpsert) UpdateEndAt

func (u *QuotaUpsert) UpdateEndAt() *QuotaUpsert

UpdateEndAt sets the "end_at" field to the value that was provided on create.

func (*QuotaUpsert) UpdateLimit

func (u *QuotaUpsert) UpdateLimit() *QuotaUpsert

UpdateLimit sets the "limit" field to the value that was provided on create.

func (*QuotaUpsert) UpdateQuotaItemID

func (u *QuotaUpsert) UpdateQuotaItemID() *QuotaUpsert

UpdateQuotaItemID sets the "quota_item_id" field to the value that was provided on create.

func (*QuotaUpsert) UpdateStartAt

func (u *QuotaUpsert) UpdateStartAt() *QuotaUpsert

UpdateStartAt sets the "start_at" field to the value that was provided on create.

func (*QuotaUpsert) UpdateTenantID

func (u *QuotaUpsert) UpdateTenantID() *QuotaUpsert

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*QuotaUpsert) UpdateUpdatedAt

func (u *QuotaUpsert) UpdateUpdatedAt() *QuotaUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QuotaUpsert) UpdateUpdatedBy

func (u *QuotaUpsert) UpdateUpdatedBy() *QuotaUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*QuotaUpsert) UpdateUsed

func (u *QuotaUpsert) UpdateUsed() *QuotaUpsert

UpdateUsed sets the "used" field to the value that was provided on create.

func (*QuotaUpsert) UpdateUserID

func (u *QuotaUpsert) UpdateUserID() *QuotaUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type QuotaUpsertBulk

type QuotaUpsertBulk struct {
	// contains filtered or unexported fields
}

QuotaUpsertBulk is the builder for "upsert"-ing a bulk of Quota nodes.

func (*QuotaUpsertBulk) AddLimit

func (u *QuotaUpsertBulk) AddLimit(v int64) *QuotaUpsertBulk

AddLimit adds v to the "limit" field.

func (*QuotaUpsertBulk) AddUpdatedBy

func (u *QuotaUpsertBulk) AddUpdatedBy(v int) *QuotaUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*QuotaUpsertBulk) AddUsed

func (u *QuotaUpsertBulk) AddUsed(v int64) *QuotaUpsertBulk

AddUsed adds v to the "used" field.

func (*QuotaUpsertBulk) ClearEndAt

func (u *QuotaUpsertBulk) ClearEndAt() *QuotaUpsertBulk

ClearEndAt clears the value of the "end_at" field.

func (*QuotaUpsertBulk) ClearStartAt

func (u *QuotaUpsertBulk) ClearStartAt() *QuotaUpsertBulk

ClearStartAt clears the value of the "start_at" field.

func (*QuotaUpsertBulk) ClearTenantID

func (u *QuotaUpsertBulk) ClearTenantID() *QuotaUpsertBulk

ClearTenantID clears the value of the "tenant_id" field.

func (*QuotaUpsertBulk) ClearUpdatedAt

func (u *QuotaUpsertBulk) ClearUpdatedAt() *QuotaUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaUpsertBulk) ClearUpdatedBy

func (u *QuotaUpsertBulk) ClearUpdatedBy() *QuotaUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaUpsertBulk) ClearUserID

func (u *QuotaUpsertBulk) ClearUserID() *QuotaUpsertBulk

ClearUserID clears the value of the "user_id" field.

func (*QuotaUpsertBulk) DoNothing

func (u *QuotaUpsertBulk) DoNothing() *QuotaUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*QuotaUpsertBulk) Exec

func (u *QuotaUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaUpsertBulk) ExecX

func (u *QuotaUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaUpsertBulk) Ignore

func (u *QuotaUpsertBulk) Ignore() *QuotaUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Quota.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*QuotaUpsertBulk) SetEndAt

func (u *QuotaUpsertBulk) SetEndAt(v time.Time) *QuotaUpsertBulk

SetEndAt sets the "end_at" field.

func (*QuotaUpsertBulk) SetLimit

func (u *QuotaUpsertBulk) SetLimit(v int64) *QuotaUpsertBulk

SetLimit sets the "limit" field.

func (*QuotaUpsertBulk) SetQuotaItemID

func (u *QuotaUpsertBulk) SetQuotaItemID(v int) *QuotaUpsertBulk

SetQuotaItemID sets the "quota_item_id" field.

func (*QuotaUpsertBulk) SetStartAt

func (u *QuotaUpsertBulk) SetStartAt(v time.Time) *QuotaUpsertBulk

SetStartAt sets the "start_at" field.

func (*QuotaUpsertBulk) SetTenantID

func (u *QuotaUpsertBulk) SetTenantID(v int) *QuotaUpsertBulk

SetTenantID sets the "tenant_id" field.

func (*QuotaUpsertBulk) SetUpdatedAt

func (u *QuotaUpsertBulk) SetUpdatedAt(v time.Time) *QuotaUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*QuotaUpsertBulk) SetUpdatedBy

func (u *QuotaUpsertBulk) SetUpdatedBy(v int) *QuotaUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*QuotaUpsertBulk) SetUsed

func (u *QuotaUpsertBulk) SetUsed(v int64) *QuotaUpsertBulk

SetUsed sets the "used" field.

func (*QuotaUpsertBulk) SetUserID

func (u *QuotaUpsertBulk) SetUserID(v int) *QuotaUpsertBulk

SetUserID sets the "user_id" field.

func (*QuotaUpsertBulk) Update

func (u *QuotaUpsertBulk) Update(set func(*QuotaUpsert)) *QuotaUpsertBulk

Update allows overriding fields `UPDATE` values. See the QuotaCreateBulk.OnConflict documentation for more info.

func (*QuotaUpsertBulk) UpdateEndAt

func (u *QuotaUpsertBulk) UpdateEndAt() *QuotaUpsertBulk

UpdateEndAt sets the "end_at" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateLimit

func (u *QuotaUpsertBulk) UpdateLimit() *QuotaUpsertBulk

UpdateLimit sets the "limit" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateNewValues

func (u *QuotaUpsertBulk) UpdateNewValues() *QuotaUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Quota.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(quota.FieldID)
		}),
	).
	Exec(ctx)

func (*QuotaUpsertBulk) UpdateQuotaItemID

func (u *QuotaUpsertBulk) UpdateQuotaItemID() *QuotaUpsertBulk

UpdateQuotaItemID sets the "quota_item_id" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateStartAt

func (u *QuotaUpsertBulk) UpdateStartAt() *QuotaUpsertBulk

UpdateStartAt sets the "start_at" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateTenantID

func (u *QuotaUpsertBulk) UpdateTenantID() *QuotaUpsertBulk

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateUpdatedAt

func (u *QuotaUpsertBulk) UpdateUpdatedAt() *QuotaUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateUpdatedBy

func (u *QuotaUpsertBulk) UpdateUpdatedBy() *QuotaUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateUsed

func (u *QuotaUpsertBulk) UpdateUsed() *QuotaUpsertBulk

UpdateUsed sets the "used" field to the value that was provided on create.

func (*QuotaUpsertBulk) UpdateUserID

func (u *QuotaUpsertBulk) UpdateUserID() *QuotaUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type QuotaUpsertOne

type QuotaUpsertOne struct {
	// contains filtered or unexported fields
}

QuotaUpsertOne is the builder for "upsert"-ing

one Quota node.

func (*QuotaUpsertOne) AddLimit

func (u *QuotaUpsertOne) AddLimit(v int64) *QuotaUpsertOne

AddLimit adds v to the "limit" field.

func (*QuotaUpsertOne) AddUpdatedBy

func (u *QuotaUpsertOne) AddUpdatedBy(v int) *QuotaUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*QuotaUpsertOne) AddUsed

func (u *QuotaUpsertOne) AddUsed(v int64) *QuotaUpsertOne

AddUsed adds v to the "used" field.

func (*QuotaUpsertOne) ClearEndAt

func (u *QuotaUpsertOne) ClearEndAt() *QuotaUpsertOne

ClearEndAt clears the value of the "end_at" field.

func (*QuotaUpsertOne) ClearStartAt

func (u *QuotaUpsertOne) ClearStartAt() *QuotaUpsertOne

ClearStartAt clears the value of the "start_at" field.

func (*QuotaUpsertOne) ClearTenantID

func (u *QuotaUpsertOne) ClearTenantID() *QuotaUpsertOne

ClearTenantID clears the value of the "tenant_id" field.

func (*QuotaUpsertOne) ClearUpdatedAt

func (u *QuotaUpsertOne) ClearUpdatedAt() *QuotaUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*QuotaUpsertOne) ClearUpdatedBy

func (u *QuotaUpsertOne) ClearUpdatedBy() *QuotaUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*QuotaUpsertOne) ClearUserID

func (u *QuotaUpsertOne) ClearUserID() *QuotaUpsertOne

ClearUserID clears the value of the "user_id" field.

func (*QuotaUpsertOne) DoNothing

func (u *QuotaUpsertOne) DoNothing() *QuotaUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*QuotaUpsertOne) Exec

func (u *QuotaUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*QuotaUpsertOne) ExecX

func (u *QuotaUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QuotaUpsertOne) ID

func (u *QuotaUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*QuotaUpsertOne) IDX

func (u *QuotaUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*QuotaUpsertOne) Ignore

func (u *QuotaUpsertOne) Ignore() *QuotaUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Quota.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*QuotaUpsertOne) SetEndAt

func (u *QuotaUpsertOne) SetEndAt(v time.Time) *QuotaUpsertOne

SetEndAt sets the "end_at" field.

func (*QuotaUpsertOne) SetLimit

func (u *QuotaUpsertOne) SetLimit(v int64) *QuotaUpsertOne

SetLimit sets the "limit" field.

func (*QuotaUpsertOne) SetQuotaItemID

func (u *QuotaUpsertOne) SetQuotaItemID(v int) *QuotaUpsertOne

SetQuotaItemID sets the "quota_item_id" field.

func (*QuotaUpsertOne) SetStartAt

func (u *QuotaUpsertOne) SetStartAt(v time.Time) *QuotaUpsertOne

SetStartAt sets the "start_at" field.

func (*QuotaUpsertOne) SetTenantID

func (u *QuotaUpsertOne) SetTenantID(v int) *QuotaUpsertOne

SetTenantID sets the "tenant_id" field.

func (*QuotaUpsertOne) SetUpdatedAt

func (u *QuotaUpsertOne) SetUpdatedAt(v time.Time) *QuotaUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*QuotaUpsertOne) SetUpdatedBy

func (u *QuotaUpsertOne) SetUpdatedBy(v int) *QuotaUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*QuotaUpsertOne) SetUsed

func (u *QuotaUpsertOne) SetUsed(v int64) *QuotaUpsertOne

SetUsed sets the "used" field.

func (*QuotaUpsertOne) SetUserID

func (u *QuotaUpsertOne) SetUserID(v int) *QuotaUpsertOne

SetUserID sets the "user_id" field.

func (*QuotaUpsertOne) Update

func (u *QuotaUpsertOne) Update(set func(*QuotaUpsert)) *QuotaUpsertOne

Update allows overriding fields `UPDATE` values. See the QuotaCreate.OnConflict documentation for more info.

func (*QuotaUpsertOne) UpdateEndAt

func (u *QuotaUpsertOne) UpdateEndAt() *QuotaUpsertOne

UpdateEndAt sets the "end_at" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateLimit

func (u *QuotaUpsertOne) UpdateLimit() *QuotaUpsertOne

UpdateLimit sets the "limit" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateNewValues

func (u *QuotaUpsertOne) UpdateNewValues() *QuotaUpsertOne

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.Quota.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(quota.FieldID)
		}),
	).
	Exec(ctx)

func (*QuotaUpsertOne) UpdateQuotaItemID

func (u *QuotaUpsertOne) UpdateQuotaItemID() *QuotaUpsertOne

UpdateQuotaItemID sets the "quota_item_id" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateStartAt

func (u *QuotaUpsertOne) UpdateStartAt() *QuotaUpsertOne

UpdateStartAt sets the "start_at" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateTenantID

func (u *QuotaUpsertOne) UpdateTenantID() *QuotaUpsertOne

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateUpdatedAt

func (u *QuotaUpsertOne) UpdateUpdatedAt() *QuotaUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateUpdatedBy

func (u *QuotaUpsertOne) UpdateUpdatedBy() *QuotaUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateUsed

func (u *QuotaUpsertOne) UpdateUsed() *QuotaUpsertOne

UpdateUsed sets the "used" field to the value that was provided on create.

func (*QuotaUpsertOne) UpdateUserID

func (u *QuotaUpsertOne) UpdateUserID() *QuotaUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type QuotaWhereInput

type QuotaWhereInput struct {
	Predicates []predicate.Quota  `json:"-"`
	Not        *QuotaWhereInput   `json:"not,omitempty"`
	Or         []*QuotaWhereInput `json:"or,omitempty"`
	And        []*QuotaWhereInput `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"`

	// "tenant_id" field predicates.
	TenantID       *int  `json:"tenantID,omitempty"`
	TenantIDNEQ    *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn     []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn  []int `json:"tenantIDNotIn,omitempty"`
	TenantIDIsNil  bool  `json:"tenantIDIsNil,omitempty"`
	TenantIDNotNil bool  `json:"tenantIDNotNil,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"`

	// "quota_item_id" field predicates.
	QuotaItemID      *int  `json:"quotaItemID,omitempty"`
	QuotaItemIDNEQ   *int  `json:"quotaItemIDNEQ,omitempty"`
	QuotaItemIDIn    []int `json:"quotaItemIDIn,omitempty"`
	QuotaItemIDNotIn []int `json:"quotaItemIDNotIn,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"`

	// "quota_item" edge predicates.
	HasQuotaItem     *bool                  `json:"hasQuotaItem,omitempty"`
	HasQuotaItemWith []*QuotaItemWhereInput `json:"hasQuotaItemWith,omitempty"`

	// "quota_org" edge predicates.
	HasQuotaOrg     *bool            `json:"hasQuotaOrg,omitempty"`
	HasQuotaOrgWith []*OrgWhereInput `json:"hasQuotaOrgWith,omitempty"`

	// "quota_user" edge predicates.
	HasQuotaUser     *bool             `json:"hasQuotaUser,omitempty"`
	HasQuotaUserWith []*UserWhereInput `json:"hasQuotaUserWith,omitempty"`
}

QuotaWhereInput represents a where input for filtering Quota queries.

func (*QuotaWhereInput) AddPredicates

func (i *QuotaWhereInput) AddPredicates(predicates ...predicate.Quota)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*QuotaWhereInput) Filter

func (i *QuotaWhereInput) Filter(q *QuotaQuery) (*QuotaQuery, error)

Filter applies the QuotaWhereInput filter on the QuotaQuery builder.

func (*QuotaWhereInput) P

P returns a predicate for filtering quotaslice. An error is returned if the input is empty or invalid.

type Region

type Region 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,0为顶级
	ParentID int `json:"parent_id,omitempty"`
	// 地区中文名称
	Name string `json:"name,omitempty"`
	// 地区英文名称
	NameEn string `json:"name_en,omitempty"`
	// 编码
	ShortCode string `json:"short_code,omitempty"`
	// 邮政编码
	ZipCode string `json:"zip_code,omitempty"`
	// 国家id
	CountryID *int `json:"country_id,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 RegionQuery when eager-loading is set.
	Edges RegionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Region is the model entity for the Region schema.

func (*Region) Children

func (r *Region) Children(ctx context.Context) (result []*Region, err error)

func (*Region) Country

func (r *Region) Country(ctx context.Context) (*Country, error)

func (*Region) ExecContext

func (c *Region) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Region) GlobalID

func (r *Region) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Region node.

func (*Region) IsNode

func (*Region) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Region) NamedChildren

func (r *Region) NamedChildren(name string) ([]*Region, error)

NamedChildren returns the Children named value or an error if the edge was not loaded in eager-loading with this name.

func (*Region) Parent

func (r *Region) Parent(ctx context.Context) (*Region, error)

func (*Region) QueryChildren

func (r *Region) QueryChildren() *RegionQuery

QueryChildren queries the "children" edge of the Region entity.

func (*Region) QueryContext

func (c *Region) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Region) QueryCountry

func (r *Region) QueryCountry() *CountryQuery

QueryCountry queries the "country" edge of the Region entity.

func (*Region) QueryParent

func (r *Region) QueryParent() *RegionQuery

QueryParent queries the "parent" edge of the Region entity.

func (*Region) String

func (r *Region) String() string

String implements the fmt.Stringer.

func (*Region) ToEdge

func (r *Region) ToEdge(order *RegionOrder) *RegionEdge

ToEdge converts Region into RegionEdge.

func (*Region) Unwrap

func (r *Region) Unwrap() *Region

Unwrap unwraps the Region 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 (*Region) Update

func (r *Region) Update() *RegionUpdateOne

Update returns a builder for updating this Region. Note that you need to call Region.Unwrap() before calling this method if this Region was returned from a transaction, and the transaction was committed or rolled back.

func (*Region) Value

func (r *Region) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Region. This includes values selected through modifiers, order, etc.

type RegionClient

type RegionClient struct {
	// contains filtered or unexported fields
}

RegionClient is a client for the Region schema.

func NewRegionClient

func NewRegionClient(c config) *RegionClient

NewRegionClient returns a client for the Region from the given config.

func (*RegionClient) Create

func (c *RegionClient) Create() *RegionCreate

Create returns a builder for creating a Region entity.

func (*RegionClient) CreateBulk

func (c *RegionClient) CreateBulk(builders ...*RegionCreate) *RegionCreateBulk

CreateBulk returns a builder for creating a bulk of Region entities.

func (*RegionClient) Delete

func (c *RegionClient) Delete() *RegionDelete

Delete returns a delete builder for Region.

func (*RegionClient) DeleteOne

func (c *RegionClient) DeleteOne(r *Region) *RegionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RegionClient) DeleteOneID

func (c *RegionClient) DeleteOneID(id int) *RegionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RegionClient) ExecContext

func (c *RegionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionClient) Get

func (c *RegionClient) Get(ctx context.Context, id int) (*Region, error)

Get returns a Region entity by its id.

func (*RegionClient) GetX

func (c *RegionClient) GetX(ctx context.Context, id int) *Region

GetX is like Get, but panics if an error occurs.

func (*RegionClient) Hooks

func (c *RegionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RegionClient) Intercept

func (c *RegionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `region.Intercept(f(g(h())))`.

func (*RegionClient) Interceptors

func (c *RegionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RegionClient) MapCreateBulk

func (c *RegionClient) MapCreateBulk(slice any, setFunc func(*RegionCreate, int)) *RegionCreateBulk

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 (*RegionClient) Query

func (c *RegionClient) Query() *RegionQuery

Query returns a query builder for Region.

func (*RegionClient) QueryChildren

func (c *RegionClient) QueryChildren(r *Region) *RegionQuery

QueryChildren queries the children edge of a Region.

func (*RegionClient) QueryContext

func (c *RegionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionClient) QueryCountry

func (c *RegionClient) QueryCountry(r *Region) *CountryQuery

QueryCountry queries the country edge of a Region.

func (*RegionClient) QueryParent

func (c *RegionClient) QueryParent(r *Region) *RegionQuery

QueryParent queries the parent edge of a Region.

func (*RegionClient) Update

func (c *RegionClient) Update() *RegionUpdate

Update returns an update builder for Region.

func (*RegionClient) UpdateOne

func (c *RegionClient) UpdateOne(r *Region) *RegionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RegionClient) UpdateOneID

func (c *RegionClient) UpdateOneID(id int) *RegionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RegionClient) Use

func (c *RegionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `region.Hooks(f(g(h())))`.

type RegionConnection

type RegionConnection struct {
	Edges      []*RegionEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

RegionConnection is the connection containing edges to Region.

type RegionCreate

type RegionCreate struct {
	// contains filtered or unexported fields
}

RegionCreate is the builder for creating a Region entity.

func (*RegionCreate) AddChildIDs

func (rc *RegionCreate) AddChildIDs(ids ...int) *RegionCreate

AddChildIDs adds the "children" edge to the Region entity by IDs.

func (*RegionCreate) AddChildren

func (rc *RegionCreate) AddChildren(r ...*Region) *RegionCreate

AddChildren adds the "children" edges to the Region entity.

func (*RegionCreate) Exec

func (rc *RegionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RegionCreate) ExecContext

func (c *RegionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionCreate) ExecX

func (rc *RegionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RegionCreate) Mutation

func (rc *RegionCreate) Mutation() *RegionMutation

Mutation returns the RegionMutation object of the builder.

func (*RegionCreate) OnConflict

func (rc *RegionCreate) OnConflict(opts ...sql.ConflictOption) *RegionUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Region.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.RegionUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*RegionCreate) OnConflictColumns

func (rc *RegionCreate) OnConflictColumns(columns ...string) *RegionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Region.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RegionCreate) QueryContext

func (c *RegionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionCreate) Save

func (rc *RegionCreate) Save(ctx context.Context) (*Region, error)

Save creates the Region in the database.

func (*RegionCreate) SaveX

func (rc *RegionCreate) SaveX(ctx context.Context) *Region

SaveX calls Save and panics if Save returns an error.

func (*RegionCreate) SetCountry

func (rc *RegionCreate) SetCountry(c *Country) *RegionCreate

SetCountry sets the "country" edge to the Country entity.

func (*RegionCreate) SetCountryID

func (rc *RegionCreate) SetCountryID(i int) *RegionCreate

SetCountryID sets the "country_id" field.

func (*RegionCreate) SetCreatedAt

func (rc *RegionCreate) SetCreatedAt(t time.Time) *RegionCreate

SetCreatedAt sets the "created_at" field.

func (*RegionCreate) SetCreatedBy

func (rc *RegionCreate) SetCreatedBy(i int) *RegionCreate

SetCreatedBy sets the "created_by" field.

func (*RegionCreate) SetDisplaySort

func (rc *RegionCreate) SetDisplaySort(i int32) *RegionCreate

SetDisplaySort sets the "display_sort" field.

func (*RegionCreate) SetID

func (rc *RegionCreate) SetID(i int) *RegionCreate

SetID sets the "id" field.

func (*RegionCreate) SetInput

SetInput applies the change-set in the CreateRegionInput on the RegionCreate builder.

func (*RegionCreate) SetName

func (rc *RegionCreate) SetName(s string) *RegionCreate

SetName sets the "name" field.

func (*RegionCreate) SetNameEn

func (rc *RegionCreate) SetNameEn(s string) *RegionCreate

SetNameEn sets the "name_en" field.

func (*RegionCreate) SetNillableCountryID

func (rc *RegionCreate) SetNillableCountryID(i *int) *RegionCreate

SetNillableCountryID sets the "country_id" field if the given value is not nil.

func (*RegionCreate) SetNillableCreatedAt

func (rc *RegionCreate) SetNillableCreatedAt(t *time.Time) *RegionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RegionCreate) SetNillableDisplaySort

func (rc *RegionCreate) SetNillableDisplaySort(i *int32) *RegionCreate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*RegionCreate) SetNillableName

func (rc *RegionCreate) SetNillableName(s *string) *RegionCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*RegionCreate) SetNillableNameEn

func (rc *RegionCreate) SetNillableNameEn(s *string) *RegionCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*RegionCreate) SetNillableParentID

func (rc *RegionCreate) SetNillableParentID(i *int) *RegionCreate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*RegionCreate) SetNillableShortCode

func (rc *RegionCreate) SetNillableShortCode(s *string) *RegionCreate

SetNillableShortCode sets the "short_code" field if the given value is not nil.

func (*RegionCreate) SetNillableStatus

func (rc *RegionCreate) SetNillableStatus(ts *typex.SimpleStatus) *RegionCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RegionCreate) SetNillableUpdatedAt

func (rc *RegionCreate) SetNillableUpdatedAt(t *time.Time) *RegionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RegionCreate) SetNillableUpdatedBy

func (rc *RegionCreate) SetNillableUpdatedBy(i *int) *RegionCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*RegionCreate) SetNillableZipCode

func (rc *RegionCreate) SetNillableZipCode(s *string) *RegionCreate

SetNillableZipCode sets the "zip_code" field if the given value is not nil.

func (*RegionCreate) SetParent

func (rc *RegionCreate) SetParent(r *Region) *RegionCreate

SetParent sets the "parent" edge to the Region entity.

func (*RegionCreate) SetParentID

func (rc *RegionCreate) SetParentID(i int) *RegionCreate

SetParentID sets the "parent_id" field.

func (*RegionCreate) SetShortCode

func (rc *RegionCreate) SetShortCode(s string) *RegionCreate

SetShortCode sets the "short_code" field.

func (*RegionCreate) SetStatus

func (rc *RegionCreate) SetStatus(ts typex.SimpleStatus) *RegionCreate

SetStatus sets the "status" field.

func (*RegionCreate) SetUpdatedAt

func (rc *RegionCreate) SetUpdatedAt(t time.Time) *RegionCreate

SetUpdatedAt sets the "updated_at" field.

func (*RegionCreate) SetUpdatedBy

func (rc *RegionCreate) SetUpdatedBy(i int) *RegionCreate

SetUpdatedBy sets the "updated_by" field.

func (*RegionCreate) SetZipCode

func (rc *RegionCreate) SetZipCode(s string) *RegionCreate

SetZipCode sets the "zip_code" field.

type RegionCreateBulk

type RegionCreateBulk struct {
	// contains filtered or unexported fields
}

RegionCreateBulk is the builder for creating many Region entities in bulk.

func (*RegionCreateBulk) Exec

func (rcb *RegionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RegionCreateBulk) ExecContext

func (c *RegionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionCreateBulk) ExecX

func (rcb *RegionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RegionCreateBulk) OnConflict

func (rcb *RegionCreateBulk) OnConflict(opts ...sql.ConflictOption) *RegionUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Region.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.RegionUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*RegionCreateBulk) OnConflictColumns

func (rcb *RegionCreateBulk) OnConflictColumns(columns ...string) *RegionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Region.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RegionCreateBulk) QueryContext

func (c *RegionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionCreateBulk) Save

func (rcb *RegionCreateBulk) Save(ctx context.Context) ([]*Region, error)

Save creates the Region entities in the database.

func (*RegionCreateBulk) SaveX

func (rcb *RegionCreateBulk) SaveX(ctx context.Context) []*Region

SaveX is like Save, but panics if an error occurs.

type RegionDelete

type RegionDelete struct {
	// contains filtered or unexported fields
}

RegionDelete is the builder for deleting a Region entity.

func (*RegionDelete) Exec

func (rd *RegionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RegionDelete) ExecContext

func (c *RegionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionDelete) ExecX

func (rd *RegionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RegionDelete) QueryContext

func (c *RegionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionDelete) Where

func (rd *RegionDelete) Where(ps ...predicate.Region) *RegionDelete

Where appends a list predicates to the RegionDelete builder.

type RegionDeleteOne

type RegionDeleteOne struct {
	// contains filtered or unexported fields
}

RegionDeleteOne is the builder for deleting a single Region entity.

func (*RegionDeleteOne) Exec

func (rdo *RegionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RegionDeleteOne) ExecX

func (rdo *RegionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RegionDeleteOne) Where

func (rdo *RegionDeleteOne) Where(ps ...predicate.Region) *RegionDeleteOne

Where appends a list predicates to the RegionDelete builder.

type RegionEdge

type RegionEdge struct {
	Node   *Region `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

RegionEdge is the edge representation of Region.

type RegionEdges

type RegionEdges struct {
	// Parent holds the value of the parent edge.
	Parent *Region `json:"parent,omitempty"`
	// Children holds the value of the children edge.
	Children []*Region `json:"children,omitempty"`
	// Country holds the value of the country edge.
	Country *Country `json:"country,omitempty"`
	// contains filtered or unexported fields
}

RegionEdges holds the relations/edges for other nodes in the graph.

func (RegionEdges) ChildrenOrErr

func (e RegionEdges) ChildrenOrErr() ([]*Region, error)

ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.

func (RegionEdges) CountryOrErr

func (e RegionEdges) CountryOrErr() (*Country, error)

CountryOrErr returns the Country value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (RegionEdges) ParentOrErr

func (e RegionEdges) ParentOrErr() (*Region, error)

ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type RegionGroupBy

type RegionGroupBy struct {
	// contains filtered or unexported fields
}

RegionGroupBy is the group-by builder for Region entities.

func (*RegionGroupBy) Aggregate

func (rgb *RegionGroupBy) Aggregate(fns ...AggregateFunc) *RegionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RegionGroupBy) Bool

func (s *RegionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) BoolX

func (s *RegionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RegionGroupBy) Bools

func (s *RegionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) BoolsX

func (s *RegionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RegionGroupBy) Float64

func (s *RegionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) Float64X

func (s *RegionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RegionGroupBy) Float64s

func (s *RegionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) Float64sX

func (s *RegionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RegionGroupBy) Int

func (s *RegionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) IntX

func (s *RegionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RegionGroupBy) Ints

func (s *RegionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) IntsX

func (s *RegionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RegionGroupBy) Scan

func (rgb *RegionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RegionGroupBy) ScanX

func (s *RegionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RegionGroupBy) String

func (s *RegionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) StringX

func (s *RegionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RegionGroupBy) Strings

func (s *RegionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RegionGroupBy) StringsX

func (s *RegionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RegionMutation

type RegionMutation struct {
	// contains filtered or unexported fields
}

RegionMutation represents an operation that mutates the Region nodes in the graph.

func (*RegionMutation) AddChildIDs

func (m *RegionMutation) AddChildIDs(ids ...int)

AddChildIDs adds the "children" edge to the Region entity by ids.

func (*RegionMutation) AddCreatedBy

func (m *RegionMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*RegionMutation) AddDisplaySort

func (m *RegionMutation) AddDisplaySort(i int32)

AddDisplaySort adds i to the "display_sort" field.

func (*RegionMutation) AddField

func (m *RegionMutation) 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 (*RegionMutation) AddUpdatedBy

func (m *RegionMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*RegionMutation) AddedCreatedBy

func (m *RegionMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*RegionMutation) AddedDisplaySort

func (m *RegionMutation) AddedDisplaySort() (r int32, exists bool)

AddedDisplaySort returns the value that was added to the "display_sort" field in this mutation.

func (*RegionMutation) AddedEdges

func (m *RegionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RegionMutation) AddedField

func (m *RegionMutation) 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 (*RegionMutation) AddedFields

func (m *RegionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RegionMutation) AddedIDs

func (m *RegionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RegionMutation) AddedUpdatedBy

func (m *RegionMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*RegionMutation) ChildrenCleared

func (m *RegionMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the Region entity was cleared.

func (*RegionMutation) ChildrenIDs

func (m *RegionMutation) ChildrenIDs() (ids []int)

ChildrenIDs returns the "children" edge IDs in the mutation.

func (*RegionMutation) ClearChildren

func (m *RegionMutation) ClearChildren()

ClearChildren clears the "children" edge to the Region entity.

func (*RegionMutation) ClearCountry

func (m *RegionMutation) ClearCountry()

ClearCountry clears the "country" edge to the Country entity.

func (*RegionMutation) ClearCountryID

func (m *RegionMutation) ClearCountryID()

ClearCountryID clears the value of the "country_id" field.

func (*RegionMutation) ClearDisplaySort

func (m *RegionMutation) ClearDisplaySort()

ClearDisplaySort clears the value of the "display_sort" field.

func (*RegionMutation) ClearEdge

func (m *RegionMutation) 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 (*RegionMutation) ClearField

func (m *RegionMutation) 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 (*RegionMutation) ClearName

func (m *RegionMutation) ClearName()

ClearName clears the value of the "name" field.

func (*RegionMutation) ClearNameEn

func (m *RegionMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*RegionMutation) ClearParent

func (m *RegionMutation) ClearParent()

ClearParent clears the "parent" edge to the Region entity.

func (*RegionMutation) ClearParentID

func (m *RegionMutation) ClearParentID()

ClearParentID clears the value of the "parent_id" field.

func (*RegionMutation) ClearShortCode

func (m *RegionMutation) ClearShortCode()

ClearShortCode clears the value of the "short_code" field.

func (*RegionMutation) ClearStatus

func (m *RegionMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*RegionMutation) ClearUpdatedAt

func (m *RegionMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RegionMutation) ClearUpdatedBy

func (m *RegionMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*RegionMutation) ClearZipCode

func (m *RegionMutation) ClearZipCode()

ClearZipCode clears the value of the "zip_code" field.

func (*RegionMutation) ClearedEdges

func (m *RegionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RegionMutation) ClearedFields

func (m *RegionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RegionMutation) Client

func (m RegionMutation) 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 (*RegionMutation) CountryCleared

func (m *RegionMutation) CountryCleared() bool

CountryCleared reports if the "country" edge to the Country entity was cleared.

func (*RegionMutation) CountryID

func (m *RegionMutation) CountryID() (r int, exists bool)

CountryID returns the value of the "country_id" field in the mutation.

func (*RegionMutation) CountryIDCleared

func (m *RegionMutation) CountryIDCleared() bool

CountryIDCleared returns if the "country_id" field was cleared in this mutation.

func (*RegionMutation) CountryIDs

func (m *RegionMutation) CountryIDs() (ids []int)

CountryIDs returns the "country" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CountryID instead. It exists only for internal usage by the builders.

func (*RegionMutation) CreatedAt

func (m *RegionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RegionMutation) CreatedBy

func (m *RegionMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*RegionMutation) DisplaySort

func (m *RegionMutation) DisplaySort() (r int32, exists bool)

DisplaySort returns the value of the "display_sort" field in the mutation.

func (*RegionMutation) DisplaySortCleared

func (m *RegionMutation) DisplaySortCleared() bool

DisplaySortCleared returns if the "display_sort" field was cleared in this mutation.

func (*RegionMutation) EdgeCleared

func (m *RegionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RegionMutation) ExecContext

func (c *RegionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionMutation) Field

func (m *RegionMutation) 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 (*RegionMutation) FieldCleared

func (m *RegionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RegionMutation) Fields

func (m *RegionMutation) 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 (*RegionMutation) ID

func (m *RegionMutation) 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 (*RegionMutation) IDs

func (m *RegionMutation) 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 (*RegionMutation) Name

func (m *RegionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RegionMutation) NameCleared

func (m *RegionMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*RegionMutation) NameEn

func (m *RegionMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*RegionMutation) NameEnCleared

func (m *RegionMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*RegionMutation) OldCountryID

func (m *RegionMutation) OldCountryID(ctx context.Context) (v *int, err error)

OldCountryID returns the old "country_id" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldCreatedAt

func (m *RegionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldCreatedBy

func (m *RegionMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldDisplaySort

func (m *RegionMutation) OldDisplaySort(ctx context.Context) (v int32, err error)

OldDisplaySort returns the old "display_sort" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldField

func (m *RegionMutation) 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 (*RegionMutation) OldName

func (m *RegionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldNameEn

func (m *RegionMutation) OldNameEn(ctx context.Context) (v string, err error)

OldNameEn returns the old "name_en" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldParentID

func (m *RegionMutation) OldParentID(ctx context.Context) (v int, err error)

OldParentID returns the old "parent_id" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldShortCode

func (m *RegionMutation) OldShortCode(ctx context.Context) (v string, err error)

OldShortCode returns the old "short_code" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldStatus

func (m *RegionMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldUpdatedAt

func (m *RegionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldUpdatedBy

func (m *RegionMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) OldZipCode

func (m *RegionMutation) OldZipCode(ctx context.Context) (v string, err error)

OldZipCode returns the old "zip_code" field's value of the Region entity. If the Region object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RegionMutation) Op

func (m *RegionMutation) Op() Op

Op returns the operation name.

func (*RegionMutation) ParentCleared

func (m *RegionMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the Region entity was cleared.

func (*RegionMutation) ParentID

func (m *RegionMutation) ParentID() (r int, exists bool)

ParentID returns the value of the "parent_id" field in the mutation.

func (*RegionMutation) ParentIDCleared

func (m *RegionMutation) ParentIDCleared() bool

ParentIDCleared returns if the "parent_id" field was cleared in this mutation.

func (*RegionMutation) ParentIDs

func (m *RegionMutation) 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 (*RegionMutation) QueryContext

func (c *RegionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionMutation) RemoveChildIDs

func (m *RegionMutation) RemoveChildIDs(ids ...int)

RemoveChildIDs removes the "children" edge to the Region entity by IDs.

func (*RegionMutation) RemovedChildrenIDs

func (m *RegionMutation) RemovedChildrenIDs() (ids []int)

RemovedChildren returns the removed IDs of the "children" edge to the Region entity.

func (*RegionMutation) RemovedEdges

func (m *RegionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RegionMutation) RemovedIDs

func (m *RegionMutation) 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 (*RegionMutation) ResetChildren

func (m *RegionMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

func (*RegionMutation) ResetCountry

func (m *RegionMutation) ResetCountry()

ResetCountry resets all changes to the "country" edge.

func (*RegionMutation) ResetCountryID

func (m *RegionMutation) ResetCountryID()

ResetCountryID resets all changes to the "country_id" field.

func (*RegionMutation) ResetCreatedAt

func (m *RegionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RegionMutation) ResetCreatedBy

func (m *RegionMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*RegionMutation) ResetDisplaySort

func (m *RegionMutation) ResetDisplaySort()

ResetDisplaySort resets all changes to the "display_sort" field.

func (*RegionMutation) ResetEdge

func (m *RegionMutation) 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 (*RegionMutation) ResetField

func (m *RegionMutation) 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 (*RegionMutation) ResetName

func (m *RegionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RegionMutation) ResetNameEn

func (m *RegionMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*RegionMutation) ResetParent

func (m *RegionMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*RegionMutation) ResetParentID

func (m *RegionMutation) ResetParentID()

ResetParentID resets all changes to the "parent_id" field.

func (*RegionMutation) ResetShortCode

func (m *RegionMutation) ResetShortCode()

ResetShortCode resets all changes to the "short_code" field.

func (*RegionMutation) ResetStatus

func (m *RegionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*RegionMutation) ResetUpdatedAt

func (m *RegionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RegionMutation) ResetUpdatedBy

func (m *RegionMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*RegionMutation) ResetZipCode

func (m *RegionMutation) ResetZipCode()

ResetZipCode resets all changes to the "zip_code" field.

func (*RegionMutation) SetCountryID

func (m *RegionMutation) SetCountryID(i int)

SetCountryID sets the "country_id" field.

func (*RegionMutation) SetCreatedAt

func (m *RegionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RegionMutation) SetCreatedBy

func (m *RegionMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*RegionMutation) SetDisplaySort

func (m *RegionMutation) SetDisplaySort(i int32)

SetDisplaySort sets the "display_sort" field.

func (*RegionMutation) SetField

func (m *RegionMutation) 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 (*RegionMutation) SetID

func (m *RegionMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Region entities.

func (*RegionMutation) SetName

func (m *RegionMutation) SetName(s string)

SetName sets the "name" field.

func (*RegionMutation) SetNameEn

func (m *RegionMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*RegionMutation) SetOp

func (m *RegionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RegionMutation) SetParentID

func (m *RegionMutation) SetParentID(i int)

SetParentID sets the "parent_id" field.

func (*RegionMutation) SetShortCode

func (m *RegionMutation) SetShortCode(s string)

SetShortCode sets the "short_code" field.

func (*RegionMutation) SetStatus

func (m *RegionMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*RegionMutation) SetUpdatedAt

func (m *RegionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*RegionMutation) SetUpdatedBy

func (m *RegionMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*RegionMutation) SetZipCode

func (m *RegionMutation) SetZipCode(s string)

SetZipCode sets the "zip_code" field.

func (*RegionMutation) ShortCode

func (m *RegionMutation) ShortCode() (r string, exists bool)

ShortCode returns the value of the "short_code" field in the mutation.

func (*RegionMutation) ShortCodeCleared

func (m *RegionMutation) ShortCodeCleared() bool

ShortCodeCleared returns if the "short_code" field was cleared in this mutation.

func (*RegionMutation) Status

func (m *RegionMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*RegionMutation) StatusCleared

func (m *RegionMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (RegionMutation) Tx

func (m RegionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RegionMutation) Type

func (m *RegionMutation) Type() string

Type returns the node type of this mutation (Region).

func (*RegionMutation) UpdatedAt

func (m *RegionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RegionMutation) UpdatedAtCleared

func (m *RegionMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*RegionMutation) UpdatedBy

func (m *RegionMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*RegionMutation) UpdatedByCleared

func (m *RegionMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*RegionMutation) Where

func (m *RegionMutation) Where(ps ...predicate.Region)

Where appends a list predicates to the RegionMutation builder.

func (*RegionMutation) WhereP

func (m *RegionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RegionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*RegionMutation) ZipCode

func (m *RegionMutation) ZipCode() (r string, exists bool)

ZipCode returns the value of the "zip_code" field in the mutation.

func (*RegionMutation) ZipCodeCleared

func (m *RegionMutation) ZipCodeCleared() bool

ZipCodeCleared returns if the "zip_code" field was cleared in this mutation.

type RegionOrder

type RegionOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *RegionOrderField `json:"field"`
}

RegionOrder defines the ordering of Region.

type RegionOrderField

type RegionOrderField struct {
	// Value extracts the ordering value from the given Region.
	Value func(*Region) (ent.Value, error)
	// contains filtered or unexported fields
}

RegionOrderField defines the ordering field of Region.

func (RegionOrderField) MarshalGQL

func (f RegionOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (RegionOrderField) String

func (f RegionOrderField) String() string

String implement fmt.Stringer interface.

func (*RegionOrderField) UnmarshalGQL

func (f *RegionOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type RegionPaginateOption

type RegionPaginateOption func(*regionPager) error

RegionPaginateOption enables pagination customization.

func WithRegionFilter

func WithRegionFilter(filter func(*RegionQuery) (*RegionQuery, error)) RegionPaginateOption

WithRegionFilter configures pagination filter.

func WithRegionOrder

func WithRegionOrder(order *RegionOrder) RegionPaginateOption

WithRegionOrder configures pagination ordering.

type RegionQuery

type RegionQuery struct {
	// contains filtered or unexported fields
}

RegionQuery is the builder for querying Region entities.

func (*RegionQuery) Aggregate

func (rq *RegionQuery) Aggregate(fns ...AggregateFunc) *RegionSelect

Aggregate returns a RegionSelect configured with the given aggregations.

func (*RegionQuery) All

func (rq *RegionQuery) All(ctx context.Context) ([]*Region, error)

All executes the query and returns a list of Regions.

func (*RegionQuery) AllX

func (rq *RegionQuery) AllX(ctx context.Context) []*Region

AllX is like All, but panics if an error occurs.

func (*RegionQuery) Clone

func (rq *RegionQuery) Clone() *RegionQuery

Clone returns a duplicate of the RegionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RegionQuery) CollectFields

func (r *RegionQuery) CollectFields(ctx context.Context, satisfies ...string) (*RegionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*RegionQuery) Count

func (rq *RegionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RegionQuery) CountX

func (rq *RegionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RegionQuery) ExecContext

func (c *RegionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionQuery) Exist

func (rq *RegionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RegionQuery) ExistX

func (rq *RegionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RegionQuery) First

func (rq *RegionQuery) First(ctx context.Context) (*Region, error)

First returns the first Region entity from the query. Returns a *NotFoundError when no Region was found.

func (*RegionQuery) FirstID

func (rq *RegionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Region ID from the query. Returns a *NotFoundError when no Region ID was found.

func (*RegionQuery) FirstIDX

func (rq *RegionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RegionQuery) FirstX

func (rq *RegionQuery) FirstX(ctx context.Context) *Region

FirstX is like First, but panics if an error occurs.

func (*RegionQuery) GroupBy

func (rq *RegionQuery) GroupBy(field string, fields ...string) *RegionGroupBy

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.Region.Query().
	GroupBy(region.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RegionQuery) IDs

func (rq *RegionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Region IDs.

func (*RegionQuery) IDsX

func (rq *RegionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RegionQuery) Limit

func (rq *RegionQuery) Limit(limit int) *RegionQuery

Limit the number of records to be returned by this query.

func (*RegionQuery) Offset

func (rq *RegionQuery) Offset(offset int) *RegionQuery

Offset to start from.

func (*RegionQuery) Only

func (rq *RegionQuery) Only(ctx context.Context) (*Region, error)

Only returns a single Region entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Region entity is found. Returns a *NotFoundError when no Region entities are found.

func (*RegionQuery) OnlyID

func (rq *RegionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Region ID in the query. Returns a *NotSingularError when more than one Region ID is found. Returns a *NotFoundError when no entities are found.

func (*RegionQuery) OnlyIDX

func (rq *RegionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RegionQuery) OnlyX

func (rq *RegionQuery) OnlyX(ctx context.Context) *Region

OnlyX is like Only, but panics if an error occurs.

func (*RegionQuery) Order

func (rq *RegionQuery) Order(o ...region.OrderOption) *RegionQuery

Order specifies how the records should be ordered.

func (*RegionQuery) Paginate

func (r *RegionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...RegionPaginateOption,
) (*RegionConnection, error)

Paginate executes the query and returns a relay based cursor connection to Region.

func (*RegionQuery) QueryChildren

func (rq *RegionQuery) QueryChildren() *RegionQuery

QueryChildren chains the current query on the "children" edge.

func (*RegionQuery) QueryContext

func (c *RegionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionQuery) QueryCountry

func (rq *RegionQuery) QueryCountry() *CountryQuery

QueryCountry chains the current query on the "country" edge.

func (*RegionQuery) QueryParent

func (rq *RegionQuery) QueryParent() *RegionQuery

QueryParent chains the current query on the "parent" edge.

func (*RegionQuery) Select

func (rq *RegionQuery) Select(fields ...string) *RegionSelect

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.Region.Query().
	Select(region.FieldCreatedBy).
	Scan(ctx, &v)

func (*RegionQuery) Unique

func (rq *RegionQuery) Unique(unique bool) *RegionQuery

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 (*RegionQuery) Where

func (rq *RegionQuery) Where(ps ...predicate.Region) *RegionQuery

Where adds a new predicate for the RegionQuery builder.

func (*RegionQuery) WithChildren

func (rq *RegionQuery) WithChildren(opts ...func(*RegionQuery)) *RegionQuery

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 (*RegionQuery) WithCountry

func (rq *RegionQuery) WithCountry(opts ...func(*CountryQuery)) *RegionQuery

WithCountry tells the query-builder to eager-load the nodes that are connected to the "country" edge. The optional arguments are used to configure the query builder of the edge.

func (*RegionQuery) WithNamedChildren

func (rq *RegionQuery) WithNamedChildren(name string, opts ...func(*RegionQuery)) *RegionQuery

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 (*RegionQuery) WithParent

func (rq *RegionQuery) WithParent(opts ...func(*RegionQuery)) *RegionQuery

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.

type RegionSelect

type RegionSelect struct {
	*RegionQuery
	// contains filtered or unexported fields
}

RegionSelect is the builder for selecting fields of Region entities.

func (*RegionSelect) Aggregate

func (rs *RegionSelect) Aggregate(fns ...AggregateFunc) *RegionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RegionSelect) Bool

func (s *RegionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RegionSelect) BoolX

func (s *RegionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RegionSelect) Bools

func (s *RegionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RegionSelect) BoolsX

func (s *RegionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (RegionSelect) ExecContext

func (c RegionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionSelect) Float64

func (s *RegionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RegionSelect) Float64X

func (s *RegionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RegionSelect) Float64s

func (s *RegionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RegionSelect) Float64sX

func (s *RegionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RegionSelect) Int

func (s *RegionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RegionSelect) IntX

func (s *RegionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RegionSelect) Ints

func (s *RegionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RegionSelect) IntsX

func (s *RegionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (RegionSelect) QueryContext

func (c RegionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionSelect) Scan

func (rs *RegionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RegionSelect) ScanX

func (s *RegionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RegionSelect) String

func (s *RegionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RegionSelect) StringX

func (s *RegionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RegionSelect) Strings

func (s *RegionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RegionSelect) StringsX

func (s *RegionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RegionUpdate

type RegionUpdate struct {
	// contains filtered or unexported fields
}

RegionUpdate is the builder for updating Region entities.

func (*RegionUpdate) AddChildIDs

func (ru *RegionUpdate) AddChildIDs(ids ...int) *RegionUpdate

AddChildIDs adds the "children" edge to the Region entity by IDs.

func (*RegionUpdate) AddChildren

func (ru *RegionUpdate) AddChildren(r ...*Region) *RegionUpdate

AddChildren adds the "children" edges to the Region entity.

func (*RegionUpdate) AddDisplaySort

func (ru *RegionUpdate) AddDisplaySort(i int32) *RegionUpdate

AddDisplaySort adds i to the "display_sort" field.

func (*RegionUpdate) AddUpdatedBy

func (ru *RegionUpdate) AddUpdatedBy(i int) *RegionUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*RegionUpdate) ClearChildren

func (ru *RegionUpdate) ClearChildren() *RegionUpdate

ClearChildren clears all "children" edges to the Region entity.

func (*RegionUpdate) ClearCountry

func (ru *RegionUpdate) ClearCountry() *RegionUpdate

ClearCountry clears the "country" edge to the Country entity.

func (*RegionUpdate) ClearCountryID

func (ru *RegionUpdate) ClearCountryID() *RegionUpdate

ClearCountryID clears the value of the "country_id" field.

func (*RegionUpdate) ClearDisplaySort

func (ru *RegionUpdate) ClearDisplaySort() *RegionUpdate

ClearDisplaySort clears the value of the "display_sort" field.

func (*RegionUpdate) ClearName

func (ru *RegionUpdate) ClearName() *RegionUpdate

ClearName clears the value of the "name" field.

func (*RegionUpdate) ClearNameEn

func (ru *RegionUpdate) ClearNameEn() *RegionUpdate

ClearNameEn clears the value of the "name_en" field.

func (*RegionUpdate) ClearParent

func (ru *RegionUpdate) ClearParent() *RegionUpdate

ClearParent clears the "parent" edge to the Region entity.

func (*RegionUpdate) ClearParentID

func (ru *RegionUpdate) ClearParentID() *RegionUpdate

ClearParentID clears the value of the "parent_id" field.

func (*RegionUpdate) ClearShortCode

func (ru *RegionUpdate) ClearShortCode() *RegionUpdate

ClearShortCode clears the value of the "short_code" field.

func (*RegionUpdate) ClearStatus

func (ru *RegionUpdate) ClearStatus() *RegionUpdate

ClearStatus clears the value of the "status" field.

func (*RegionUpdate) ClearUpdatedAt

func (ru *RegionUpdate) ClearUpdatedAt() *RegionUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RegionUpdate) ClearUpdatedBy

func (ru *RegionUpdate) ClearUpdatedBy() *RegionUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*RegionUpdate) ClearZipCode

func (ru *RegionUpdate) ClearZipCode() *RegionUpdate

ClearZipCode clears the value of the "zip_code" field.

func (*RegionUpdate) Exec

func (ru *RegionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RegionUpdate) ExecContext

func (c *RegionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionUpdate) ExecX

func (ru *RegionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RegionUpdate) Mutation

func (ru *RegionUpdate) Mutation() *RegionMutation

Mutation returns the RegionMutation object of the builder.

func (*RegionUpdate) QueryContext

func (c *RegionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionUpdate) RemoveChildIDs

func (ru *RegionUpdate) RemoveChildIDs(ids ...int) *RegionUpdate

RemoveChildIDs removes the "children" edge to Region entities by IDs.

func (*RegionUpdate) RemoveChildren

func (ru *RegionUpdate) RemoveChildren(r ...*Region) *RegionUpdate

RemoveChildren removes "children" edges to Region entities.

func (*RegionUpdate) Save

func (ru *RegionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RegionUpdate) SaveX

func (ru *RegionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RegionUpdate) SetCountry

func (ru *RegionUpdate) SetCountry(c *Country) *RegionUpdate

SetCountry sets the "country" edge to the Country entity.

func (*RegionUpdate) SetCountryID

func (ru *RegionUpdate) SetCountryID(i int) *RegionUpdate

SetCountryID sets the "country_id" field.

func (*RegionUpdate) SetDisplaySort

func (ru *RegionUpdate) SetDisplaySort(i int32) *RegionUpdate

SetDisplaySort sets the "display_sort" field.

func (*RegionUpdate) SetInput

SetInput applies the change-set in the UpdateRegionInput on the RegionUpdate builder.

func (*RegionUpdate) SetName

func (ru *RegionUpdate) SetName(s string) *RegionUpdate

SetName sets the "name" field.

func (*RegionUpdate) SetNameEn

func (ru *RegionUpdate) SetNameEn(s string) *RegionUpdate

SetNameEn sets the "name_en" field.

func (*RegionUpdate) SetNillableCountryID

func (ru *RegionUpdate) SetNillableCountryID(i *int) *RegionUpdate

SetNillableCountryID sets the "country_id" field if the given value is not nil.

func (*RegionUpdate) SetNillableDisplaySort

func (ru *RegionUpdate) SetNillableDisplaySort(i *int32) *RegionUpdate

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*RegionUpdate) SetNillableName

func (ru *RegionUpdate) SetNillableName(s *string) *RegionUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*RegionUpdate) SetNillableNameEn

func (ru *RegionUpdate) SetNillableNameEn(s *string) *RegionUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*RegionUpdate) SetNillableParentID

func (ru *RegionUpdate) SetNillableParentID(i *int) *RegionUpdate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*RegionUpdate) SetNillableShortCode

func (ru *RegionUpdate) SetNillableShortCode(s *string) *RegionUpdate

SetNillableShortCode sets the "short_code" field if the given value is not nil.

func (*RegionUpdate) SetNillableStatus

func (ru *RegionUpdate) SetNillableStatus(ts *typex.SimpleStatus) *RegionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RegionUpdate) SetNillableUpdatedAt

func (ru *RegionUpdate) SetNillableUpdatedAt(t *time.Time) *RegionUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RegionUpdate) SetNillableUpdatedBy

func (ru *RegionUpdate) SetNillableUpdatedBy(i *int) *RegionUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*RegionUpdate) SetNillableZipCode

func (ru *RegionUpdate) SetNillableZipCode(s *string) *RegionUpdate

SetNillableZipCode sets the "zip_code" field if the given value is not nil.

func (*RegionUpdate) SetParent

func (ru *RegionUpdate) SetParent(r *Region) *RegionUpdate

SetParent sets the "parent" edge to the Region entity.

func (*RegionUpdate) SetParentID

func (ru *RegionUpdate) SetParentID(i int) *RegionUpdate

SetParentID sets the "parent_id" field.

func (*RegionUpdate) SetShortCode

func (ru *RegionUpdate) SetShortCode(s string) *RegionUpdate

SetShortCode sets the "short_code" field.

func (*RegionUpdate) SetStatus

func (ru *RegionUpdate) SetStatus(ts typex.SimpleStatus) *RegionUpdate

SetStatus sets the "status" field.

func (*RegionUpdate) SetUpdatedAt

func (ru *RegionUpdate) SetUpdatedAt(t time.Time) *RegionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RegionUpdate) SetUpdatedBy

func (ru *RegionUpdate) SetUpdatedBy(i int) *RegionUpdate

SetUpdatedBy sets the "updated_by" field.

func (*RegionUpdate) SetZipCode

func (ru *RegionUpdate) SetZipCode(s string) *RegionUpdate

SetZipCode sets the "zip_code" field.

func (*RegionUpdate) Where

func (ru *RegionUpdate) Where(ps ...predicate.Region) *RegionUpdate

Where appends a list predicates to the RegionUpdate builder.

type RegionUpdateOne

type RegionUpdateOne struct {
	// contains filtered or unexported fields
}

RegionUpdateOne is the builder for updating a single Region entity.

func (*RegionUpdateOne) AddChildIDs

func (ruo *RegionUpdateOne) AddChildIDs(ids ...int) *RegionUpdateOne

AddChildIDs adds the "children" edge to the Region entity by IDs.

func (*RegionUpdateOne) AddChildren

func (ruo *RegionUpdateOne) AddChildren(r ...*Region) *RegionUpdateOne

AddChildren adds the "children" edges to the Region entity.

func (*RegionUpdateOne) AddDisplaySort

func (ruo *RegionUpdateOne) AddDisplaySort(i int32) *RegionUpdateOne

AddDisplaySort adds i to the "display_sort" field.

func (*RegionUpdateOne) AddUpdatedBy

func (ruo *RegionUpdateOne) AddUpdatedBy(i int) *RegionUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*RegionUpdateOne) ClearChildren

func (ruo *RegionUpdateOne) ClearChildren() *RegionUpdateOne

ClearChildren clears all "children" edges to the Region entity.

func (*RegionUpdateOne) ClearCountry

func (ruo *RegionUpdateOne) ClearCountry() *RegionUpdateOne

ClearCountry clears the "country" edge to the Country entity.

func (*RegionUpdateOne) ClearCountryID

func (ruo *RegionUpdateOne) ClearCountryID() *RegionUpdateOne

ClearCountryID clears the value of the "country_id" field.

func (*RegionUpdateOne) ClearDisplaySort

func (ruo *RegionUpdateOne) ClearDisplaySort() *RegionUpdateOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*RegionUpdateOne) ClearName

func (ruo *RegionUpdateOne) ClearName() *RegionUpdateOne

ClearName clears the value of the "name" field.

func (*RegionUpdateOne) ClearNameEn

func (ruo *RegionUpdateOne) ClearNameEn() *RegionUpdateOne

ClearNameEn clears the value of the "name_en" field.

func (*RegionUpdateOne) ClearParent

func (ruo *RegionUpdateOne) ClearParent() *RegionUpdateOne

ClearParent clears the "parent" edge to the Region entity.

func (*RegionUpdateOne) ClearParentID

func (ruo *RegionUpdateOne) ClearParentID() *RegionUpdateOne

ClearParentID clears the value of the "parent_id" field.

func (*RegionUpdateOne) ClearShortCode

func (ruo *RegionUpdateOne) ClearShortCode() *RegionUpdateOne

ClearShortCode clears the value of the "short_code" field.

func (*RegionUpdateOne) ClearStatus

func (ruo *RegionUpdateOne) ClearStatus() *RegionUpdateOne

ClearStatus clears the value of the "status" field.

func (*RegionUpdateOne) ClearUpdatedAt

func (ruo *RegionUpdateOne) ClearUpdatedAt() *RegionUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RegionUpdateOne) ClearUpdatedBy

func (ruo *RegionUpdateOne) ClearUpdatedBy() *RegionUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*RegionUpdateOne) ClearZipCode

func (ruo *RegionUpdateOne) ClearZipCode() *RegionUpdateOne

ClearZipCode clears the value of the "zip_code" field.

func (*RegionUpdateOne) Exec

func (ruo *RegionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RegionUpdateOne) ExecContext

func (c *RegionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RegionUpdateOne) ExecX

func (ruo *RegionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RegionUpdateOne) Mutation

func (ruo *RegionUpdateOne) Mutation() *RegionMutation

Mutation returns the RegionMutation object of the builder.

func (*RegionUpdateOne) QueryContext

func (c *RegionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RegionUpdateOne) RemoveChildIDs

func (ruo *RegionUpdateOne) RemoveChildIDs(ids ...int) *RegionUpdateOne

RemoveChildIDs removes the "children" edge to Region entities by IDs.

func (*RegionUpdateOne) RemoveChildren

func (ruo *RegionUpdateOne) RemoveChildren(r ...*Region) *RegionUpdateOne

RemoveChildren removes "children" edges to Region entities.

func (*RegionUpdateOne) Save

func (ruo *RegionUpdateOne) Save(ctx context.Context) (*Region, error)

Save executes the query and returns the updated Region entity.

func (*RegionUpdateOne) SaveX

func (ruo *RegionUpdateOne) SaveX(ctx context.Context) *Region

SaveX is like Save, but panics if an error occurs.

func (*RegionUpdateOne) Select

func (ruo *RegionUpdateOne) Select(field string, fields ...string) *RegionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RegionUpdateOne) SetCountry

func (ruo *RegionUpdateOne) SetCountry(c *Country) *RegionUpdateOne

SetCountry sets the "country" edge to the Country entity.

func (*RegionUpdateOne) SetCountryID

func (ruo *RegionUpdateOne) SetCountryID(i int) *RegionUpdateOne

SetCountryID sets the "country_id" field.

func (*RegionUpdateOne) SetDisplaySort

func (ruo *RegionUpdateOne) SetDisplaySort(i int32) *RegionUpdateOne

SetDisplaySort sets the "display_sort" field.

func (*RegionUpdateOne) SetInput

SetInput applies the change-set in the UpdateRegionInput on the RegionUpdateOne builder.

func (*RegionUpdateOne) SetName

func (ruo *RegionUpdateOne) SetName(s string) *RegionUpdateOne

SetName sets the "name" field.

func (*RegionUpdateOne) SetNameEn

func (ruo *RegionUpdateOne) SetNameEn(s string) *RegionUpdateOne

SetNameEn sets the "name_en" field.

func (*RegionUpdateOne) SetNillableCountryID

func (ruo *RegionUpdateOne) SetNillableCountryID(i *int) *RegionUpdateOne

SetNillableCountryID sets the "country_id" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableDisplaySort

func (ruo *RegionUpdateOne) SetNillableDisplaySort(i *int32) *RegionUpdateOne

SetNillableDisplaySort sets the "display_sort" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableName

func (ruo *RegionUpdateOne) SetNillableName(s *string) *RegionUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableNameEn

func (ruo *RegionUpdateOne) SetNillableNameEn(s *string) *RegionUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableParentID

func (ruo *RegionUpdateOne) SetNillableParentID(i *int) *RegionUpdateOne

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableShortCode

func (ruo *RegionUpdateOne) SetNillableShortCode(s *string) *RegionUpdateOne

SetNillableShortCode sets the "short_code" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableStatus

func (ruo *RegionUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *RegionUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableUpdatedAt

func (ruo *RegionUpdateOne) SetNillableUpdatedAt(t *time.Time) *RegionUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableUpdatedBy

func (ruo *RegionUpdateOne) SetNillableUpdatedBy(i *int) *RegionUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*RegionUpdateOne) SetNillableZipCode

func (ruo *RegionUpdateOne) SetNillableZipCode(s *string) *RegionUpdateOne

SetNillableZipCode sets the "zip_code" field if the given value is not nil.

func (*RegionUpdateOne) SetParent

func (ruo *RegionUpdateOne) SetParent(r *Region) *RegionUpdateOne

SetParent sets the "parent" edge to the Region entity.

func (*RegionUpdateOne) SetParentID

func (ruo *RegionUpdateOne) SetParentID(i int) *RegionUpdateOne

SetParentID sets the "parent_id" field.

func (*RegionUpdateOne) SetShortCode

func (ruo *RegionUpdateOne) SetShortCode(s string) *RegionUpdateOne

SetShortCode sets the "short_code" field.

func (*RegionUpdateOne) SetStatus

func (ruo *RegionUpdateOne) SetStatus(ts typex.SimpleStatus) *RegionUpdateOne

SetStatus sets the "status" field.

func (*RegionUpdateOne) SetUpdatedAt

func (ruo *RegionUpdateOne) SetUpdatedAt(t time.Time) *RegionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*RegionUpdateOne) SetUpdatedBy

func (ruo *RegionUpdateOne) SetUpdatedBy(i int) *RegionUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*RegionUpdateOne) SetZipCode

func (ruo *RegionUpdateOne) SetZipCode(s string) *RegionUpdateOne

SetZipCode sets the "zip_code" field.

func (*RegionUpdateOne) Where

func (ruo *RegionUpdateOne) Where(ps ...predicate.Region) *RegionUpdateOne

Where appends a list predicates to the RegionUpdate builder.

type RegionUpsert

type RegionUpsert struct {
	*sql.UpdateSet
}

RegionUpsert is the "OnConflict" setter.

func (*RegionUpsert) AddDisplaySort

func (u *RegionUpsert) AddDisplaySort(v int32) *RegionUpsert

AddDisplaySort adds v to the "display_sort" field.

func (*RegionUpsert) AddUpdatedBy

func (u *RegionUpsert) AddUpdatedBy(v int) *RegionUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*RegionUpsert) ClearCountryID

func (u *RegionUpsert) ClearCountryID() *RegionUpsert

ClearCountryID clears the value of the "country_id" field.

func (*RegionUpsert) ClearDisplaySort

func (u *RegionUpsert) ClearDisplaySort() *RegionUpsert

ClearDisplaySort clears the value of the "display_sort" field.

func (*RegionUpsert) ClearName

func (u *RegionUpsert) ClearName() *RegionUpsert

ClearName clears the value of the "name" field.

func (*RegionUpsert) ClearNameEn

func (u *RegionUpsert) ClearNameEn() *RegionUpsert

ClearNameEn clears the value of the "name_en" field.

func (*RegionUpsert) ClearParentID

func (u *RegionUpsert) ClearParentID() *RegionUpsert

ClearParentID clears the value of the "parent_id" field.

func (*RegionUpsert) ClearShortCode

func (u *RegionUpsert) ClearShortCode() *RegionUpsert

ClearShortCode clears the value of the "short_code" field.

func (*RegionUpsert) ClearStatus

func (u *RegionUpsert) ClearStatus() *RegionUpsert

ClearStatus clears the value of the "status" field.

func (*RegionUpsert) ClearUpdatedAt

func (u *RegionUpsert) ClearUpdatedAt() *RegionUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RegionUpsert) ClearUpdatedBy

func (u *RegionUpsert) ClearUpdatedBy() *RegionUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*RegionUpsert) ClearZipCode

func (u *RegionUpsert) ClearZipCode() *RegionUpsert

ClearZipCode clears the value of the "zip_code" field.

func (*RegionUpsert) SetCountryID

func (u *RegionUpsert) SetCountryID(v int) *RegionUpsert

SetCountryID sets the "country_id" field.

func (*RegionUpsert) SetDisplaySort

func (u *RegionUpsert) SetDisplaySort(v int32) *RegionUpsert

SetDisplaySort sets the "display_sort" field.

func (*RegionUpsert) SetName

func (u *RegionUpsert) SetName(v string) *RegionUpsert

SetName sets the "name" field.

func (*RegionUpsert) SetNameEn

func (u *RegionUpsert) SetNameEn(v string) *RegionUpsert

SetNameEn sets the "name_en" field.

func (*RegionUpsert) SetParentID

func (u *RegionUpsert) SetParentID(v int) *RegionUpsert

SetParentID sets the "parent_id" field.

func (*RegionUpsert) SetShortCode

func (u *RegionUpsert) SetShortCode(v string) *RegionUpsert

SetShortCode sets the "short_code" field.

func (*RegionUpsert) SetStatus

func (u *RegionUpsert) SetStatus(v typex.SimpleStatus) *RegionUpsert

SetStatus sets the "status" field.

func (*RegionUpsert) SetUpdatedAt

func (u *RegionUpsert) SetUpdatedAt(v time.Time) *RegionUpsert

SetUpdatedAt sets the "updated_at" field.

func (*RegionUpsert) SetUpdatedBy

func (u *RegionUpsert) SetUpdatedBy(v int) *RegionUpsert

SetUpdatedBy sets the "updated_by" field.

func (*RegionUpsert) SetZipCode

func (u *RegionUpsert) SetZipCode(v string) *RegionUpsert

SetZipCode sets the "zip_code" field.

func (*RegionUpsert) UpdateCountryID

func (u *RegionUpsert) UpdateCountryID() *RegionUpsert

UpdateCountryID sets the "country_id" field to the value that was provided on create.

func (*RegionUpsert) UpdateDisplaySort

func (u *RegionUpsert) UpdateDisplaySort() *RegionUpsert

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*RegionUpsert) UpdateName

func (u *RegionUpsert) UpdateName() *RegionUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*RegionUpsert) UpdateNameEn

func (u *RegionUpsert) UpdateNameEn() *RegionUpsert

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*RegionUpsert) UpdateParentID

func (u *RegionUpsert) UpdateParentID() *RegionUpsert

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*RegionUpsert) UpdateShortCode

func (u *RegionUpsert) UpdateShortCode() *RegionUpsert

UpdateShortCode sets the "short_code" field to the value that was provided on create.

func (*RegionUpsert) UpdateStatus

func (u *RegionUpsert) UpdateStatus() *RegionUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RegionUpsert) UpdateUpdatedAt

func (u *RegionUpsert) UpdateUpdatedAt() *RegionUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RegionUpsert) UpdateUpdatedBy

func (u *RegionUpsert) UpdateUpdatedBy() *RegionUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*RegionUpsert) UpdateZipCode

func (u *RegionUpsert) UpdateZipCode() *RegionUpsert

UpdateZipCode sets the "zip_code" field to the value that was provided on create.

type RegionUpsertBulk

type RegionUpsertBulk struct {
	// contains filtered or unexported fields
}

RegionUpsertBulk is the builder for "upsert"-ing a bulk of Region nodes.

func (*RegionUpsertBulk) AddDisplaySort

func (u *RegionUpsertBulk) AddDisplaySort(v int32) *RegionUpsertBulk

AddDisplaySort adds v to the "display_sort" field.

func (*RegionUpsertBulk) AddUpdatedBy

func (u *RegionUpsertBulk) AddUpdatedBy(v int) *RegionUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*RegionUpsertBulk) ClearCountryID

func (u *RegionUpsertBulk) ClearCountryID() *RegionUpsertBulk

ClearCountryID clears the value of the "country_id" field.

func (*RegionUpsertBulk) ClearDisplaySort

func (u *RegionUpsertBulk) ClearDisplaySort() *RegionUpsertBulk

ClearDisplaySort clears the value of the "display_sort" field.

func (*RegionUpsertBulk) ClearName

func (u *RegionUpsertBulk) ClearName() *RegionUpsertBulk

ClearName clears the value of the "name" field.

func (*RegionUpsertBulk) ClearNameEn

func (u *RegionUpsertBulk) ClearNameEn() *RegionUpsertBulk

ClearNameEn clears the value of the "name_en" field.

func (*RegionUpsertBulk) ClearParentID

func (u *RegionUpsertBulk) ClearParentID() *RegionUpsertBulk

ClearParentID clears the value of the "parent_id" field.

func (*RegionUpsertBulk) ClearShortCode

func (u *RegionUpsertBulk) ClearShortCode() *RegionUpsertBulk

ClearShortCode clears the value of the "short_code" field.

func (*RegionUpsertBulk) ClearStatus

func (u *RegionUpsertBulk) ClearStatus() *RegionUpsertBulk

ClearStatus clears the value of the "status" field.

func (*RegionUpsertBulk) ClearUpdatedAt

func (u *RegionUpsertBulk) ClearUpdatedAt() *RegionUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RegionUpsertBulk) ClearUpdatedBy

func (u *RegionUpsertBulk) ClearUpdatedBy() *RegionUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*RegionUpsertBulk) ClearZipCode

func (u *RegionUpsertBulk) ClearZipCode() *RegionUpsertBulk

ClearZipCode clears the value of the "zip_code" field.

func (*RegionUpsertBulk) DoNothing

func (u *RegionUpsertBulk) DoNothing() *RegionUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RegionUpsertBulk) Exec

func (u *RegionUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RegionUpsertBulk) ExecX

func (u *RegionUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RegionUpsertBulk) Ignore

func (u *RegionUpsertBulk) Ignore() *RegionUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Region.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RegionUpsertBulk) SetCountryID

func (u *RegionUpsertBulk) SetCountryID(v int) *RegionUpsertBulk

SetCountryID sets the "country_id" field.

func (*RegionUpsertBulk) SetDisplaySort

func (u *RegionUpsertBulk) SetDisplaySort(v int32) *RegionUpsertBulk

SetDisplaySort sets the "display_sort" field.

func (*RegionUpsertBulk) SetName

func (u *RegionUpsertBulk) SetName(v string) *RegionUpsertBulk

SetName sets the "name" field.

func (*RegionUpsertBulk) SetNameEn

func (u *RegionUpsertBulk) SetNameEn(v string) *RegionUpsertBulk

SetNameEn sets the "name_en" field.

func (*RegionUpsertBulk) SetParentID

func (u *RegionUpsertBulk) SetParentID(v int) *RegionUpsertBulk

SetParentID sets the "parent_id" field.

func (*RegionUpsertBulk) SetShortCode

func (u *RegionUpsertBulk) SetShortCode(v string) *RegionUpsertBulk

SetShortCode sets the "short_code" field.

func (*RegionUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*RegionUpsertBulk) SetUpdatedAt

func (u *RegionUpsertBulk) SetUpdatedAt(v time.Time) *RegionUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*RegionUpsertBulk) SetUpdatedBy

func (u *RegionUpsertBulk) SetUpdatedBy(v int) *RegionUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*RegionUpsertBulk) SetZipCode

func (u *RegionUpsertBulk) SetZipCode(v string) *RegionUpsertBulk

SetZipCode sets the "zip_code" field.

func (*RegionUpsertBulk) Update

func (u *RegionUpsertBulk) Update(set func(*RegionUpsert)) *RegionUpsertBulk

Update allows overriding fields `UPDATE` values. See the RegionCreateBulk.OnConflict documentation for more info.

func (*RegionUpsertBulk) UpdateCountryID

func (u *RegionUpsertBulk) UpdateCountryID() *RegionUpsertBulk

UpdateCountryID sets the "country_id" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateDisplaySort

func (u *RegionUpsertBulk) UpdateDisplaySort() *RegionUpsertBulk

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateName

func (u *RegionUpsertBulk) UpdateName() *RegionUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateNameEn

func (u *RegionUpsertBulk) UpdateNameEn() *RegionUpsertBulk

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateNewValues

func (u *RegionUpsertBulk) UpdateNewValues() *RegionUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Region.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(region.FieldID)
		}),
	).
	Exec(ctx)

func (*RegionUpsertBulk) UpdateParentID

func (u *RegionUpsertBulk) UpdateParentID() *RegionUpsertBulk

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateShortCode

func (u *RegionUpsertBulk) UpdateShortCode() *RegionUpsertBulk

UpdateShortCode sets the "short_code" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateStatus

func (u *RegionUpsertBulk) UpdateStatus() *RegionUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateUpdatedAt

func (u *RegionUpsertBulk) UpdateUpdatedAt() *RegionUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateUpdatedBy

func (u *RegionUpsertBulk) UpdateUpdatedBy() *RegionUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*RegionUpsertBulk) UpdateZipCode

func (u *RegionUpsertBulk) UpdateZipCode() *RegionUpsertBulk

UpdateZipCode sets the "zip_code" field to the value that was provided on create.

type RegionUpsertOne

type RegionUpsertOne struct {
	// contains filtered or unexported fields
}

RegionUpsertOne is the builder for "upsert"-ing

one Region node.

func (*RegionUpsertOne) AddDisplaySort

func (u *RegionUpsertOne) AddDisplaySort(v int32) *RegionUpsertOne

AddDisplaySort adds v to the "display_sort" field.

func (*RegionUpsertOne) AddUpdatedBy

func (u *RegionUpsertOne) AddUpdatedBy(v int) *RegionUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*RegionUpsertOne) ClearCountryID

func (u *RegionUpsertOne) ClearCountryID() *RegionUpsertOne

ClearCountryID clears the value of the "country_id" field.

func (*RegionUpsertOne) ClearDisplaySort

func (u *RegionUpsertOne) ClearDisplaySort() *RegionUpsertOne

ClearDisplaySort clears the value of the "display_sort" field.

func (*RegionUpsertOne) ClearName

func (u *RegionUpsertOne) ClearName() *RegionUpsertOne

ClearName clears the value of the "name" field.

func (*RegionUpsertOne) ClearNameEn

func (u *RegionUpsertOne) ClearNameEn() *RegionUpsertOne

ClearNameEn clears the value of the "name_en" field.

func (*RegionUpsertOne) ClearParentID

func (u *RegionUpsertOne) ClearParentID() *RegionUpsertOne

ClearParentID clears the value of the "parent_id" field.

func (*RegionUpsertOne) ClearShortCode

func (u *RegionUpsertOne) ClearShortCode() *RegionUpsertOne

ClearShortCode clears the value of the "short_code" field.

func (*RegionUpsertOne) ClearStatus

func (u *RegionUpsertOne) ClearStatus() *RegionUpsertOne

ClearStatus clears the value of the "status" field.

func (*RegionUpsertOne) ClearUpdatedAt

func (u *RegionUpsertOne) ClearUpdatedAt() *RegionUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*RegionUpsertOne) ClearUpdatedBy

func (u *RegionUpsertOne) ClearUpdatedBy() *RegionUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*RegionUpsertOne) ClearZipCode

func (u *RegionUpsertOne) ClearZipCode() *RegionUpsertOne

ClearZipCode clears the value of the "zip_code" field.

func (*RegionUpsertOne) DoNothing

func (u *RegionUpsertOne) DoNothing() *RegionUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RegionUpsertOne) Exec

func (u *RegionUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*RegionUpsertOne) ExecX

func (u *RegionUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RegionUpsertOne) ID

func (u *RegionUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RegionUpsertOne) IDX

func (u *RegionUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*RegionUpsertOne) Ignore

func (u *RegionUpsertOne) Ignore() *RegionUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Region.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RegionUpsertOne) SetCountryID

func (u *RegionUpsertOne) SetCountryID(v int) *RegionUpsertOne

SetCountryID sets the "country_id" field.

func (*RegionUpsertOne) SetDisplaySort

func (u *RegionUpsertOne) SetDisplaySort(v int32) *RegionUpsertOne

SetDisplaySort sets the "display_sort" field.

func (*RegionUpsertOne) SetName

func (u *RegionUpsertOne) SetName(v string) *RegionUpsertOne

SetName sets the "name" field.

func (*RegionUpsertOne) SetNameEn

func (u *RegionUpsertOne) SetNameEn(v string) *RegionUpsertOne

SetNameEn sets the "name_en" field.

func (*RegionUpsertOne) SetParentID

func (u *RegionUpsertOne) SetParentID(v int) *RegionUpsertOne

SetParentID sets the "parent_id" field.

func (*RegionUpsertOne) SetShortCode

func (u *RegionUpsertOne) SetShortCode(v string) *RegionUpsertOne

SetShortCode sets the "short_code" field.

func (*RegionUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*RegionUpsertOne) SetUpdatedAt

func (u *RegionUpsertOne) SetUpdatedAt(v time.Time) *RegionUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*RegionUpsertOne) SetUpdatedBy

func (u *RegionUpsertOne) SetUpdatedBy(v int) *RegionUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*RegionUpsertOne) SetZipCode

func (u *RegionUpsertOne) SetZipCode(v string) *RegionUpsertOne

SetZipCode sets the "zip_code" field.

func (*RegionUpsertOne) Update

func (u *RegionUpsertOne) Update(set func(*RegionUpsert)) *RegionUpsertOne

Update allows overriding fields `UPDATE` values. See the RegionCreate.OnConflict documentation for more info.

func (*RegionUpsertOne) UpdateCountryID

func (u *RegionUpsertOne) UpdateCountryID() *RegionUpsertOne

UpdateCountryID sets the "country_id" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateDisplaySort

func (u *RegionUpsertOne) UpdateDisplaySort() *RegionUpsertOne

UpdateDisplaySort sets the "display_sort" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateName

func (u *RegionUpsertOne) UpdateName() *RegionUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateNameEn

func (u *RegionUpsertOne) UpdateNameEn() *RegionUpsertOne

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateNewValues

func (u *RegionUpsertOne) UpdateNewValues() *RegionUpsertOne

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.Region.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(region.FieldID)
		}),
	).
	Exec(ctx)

func (*RegionUpsertOne) UpdateParentID

func (u *RegionUpsertOne) UpdateParentID() *RegionUpsertOne

UpdateParentID sets the "parent_id" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateShortCode

func (u *RegionUpsertOne) UpdateShortCode() *RegionUpsertOne

UpdateShortCode sets the "short_code" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateStatus

func (u *RegionUpsertOne) UpdateStatus() *RegionUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateUpdatedAt

func (u *RegionUpsertOne) UpdateUpdatedAt() *RegionUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateUpdatedBy

func (u *RegionUpsertOne) UpdateUpdatedBy() *RegionUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*RegionUpsertOne) UpdateZipCode

func (u *RegionUpsertOne) UpdateZipCode() *RegionUpsertOne

UpdateZipCode sets the "zip_code" field to the value that was provided on create.

type RegionWhereInput

type RegionWhereInput struct {
	Predicates []predicate.Region  `json:"-"`
	Not        *RegionWhereInput   `json:"not,omitempty"`
	Or         []*RegionWhereInput `json:"or,omitempty"`
	And        []*RegionWhereInput `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"`

	// "parent_id" field predicates.
	ParentID       *int  `json:"parentID,omitempty"`
	ParentIDNEQ    *int  `json:"parentIDNEQ,omitempty"`
	ParentIDIn     []int `json:"parentIDIn,omitempty"`
	ParentIDNotIn  []int `json:"parentIDNotIn,omitempty"`
	ParentIDIsNil  bool  `json:"parentIDIsNil,omitempty"`
	ParentIDNotNil bool  `json:"parentIDNotNil,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"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,omitempty"`

	// "short_code" field predicates.
	ShortCode             *string  `json:"shortCode,omitempty"`
	ShortCodeNEQ          *string  `json:"shortCodeNEQ,omitempty"`
	ShortCodeIn           []string `json:"shortCodeIn,omitempty"`
	ShortCodeNotIn        []string `json:"shortCodeNotIn,omitempty"`
	ShortCodeGT           *string  `json:"shortCodeGT,omitempty"`
	ShortCodeGTE          *string  `json:"shortCodeGTE,omitempty"`
	ShortCodeLT           *string  `json:"shortCodeLT,omitempty"`
	ShortCodeLTE          *string  `json:"shortCodeLTE,omitempty"`
	ShortCodeContains     *string  `json:"shortCodeContains,omitempty"`
	ShortCodeHasPrefix    *string  `json:"shortCodeHasPrefix,omitempty"`
	ShortCodeHasSuffix    *string  `json:"shortCodeHasSuffix,omitempty"`
	ShortCodeIsNil        bool     `json:"shortCodeIsNil,omitempty"`
	ShortCodeNotNil       bool     `json:"shortCodeNotNil,omitempty"`
	ShortCodeEqualFold    *string  `json:"shortCodeEqualFold,omitempty"`
	ShortCodeContainsFold *string  `json:"shortCodeContainsFold,omitempty"`

	// "zip_code" field predicates.
	ZipCode             *string  `json:"zipCode,omitempty"`
	ZipCodeNEQ          *string  `json:"zipCodeNEQ,omitempty"`
	ZipCodeIn           []string `json:"zipCodeIn,omitempty"`
	ZipCodeNotIn        []string `json:"zipCodeNotIn,omitempty"`
	ZipCodeGT           *string  `json:"zipCodeGT,omitempty"`
	ZipCodeGTE          *string  `json:"zipCodeGTE,omitempty"`
	ZipCodeLT           *string  `json:"zipCodeLT,omitempty"`
	ZipCodeLTE          *string  `json:"zipCodeLTE,omitempty"`
	ZipCodeContains     *string  `json:"zipCodeContains,omitempty"`
	ZipCodeHasPrefix    *string  `json:"zipCodeHasPrefix,omitempty"`
	ZipCodeHasSuffix    *string  `json:"zipCodeHasSuffix,omitempty"`
	ZipCodeIsNil        bool     `json:"zipCodeIsNil,omitempty"`
	ZipCodeNotNil       bool     `json:"zipCodeNotNil,omitempty"`
	ZipCodeEqualFold    *string  `json:"zipCodeEqualFold,omitempty"`
	ZipCodeContainsFold *string  `json:"zipCodeContainsFold,omitempty"`

	// "country_id" field predicates.
	CountryID       *int  `json:"countryID,omitempty"`
	CountryIDNEQ    *int  `json:"countryIDNEQ,omitempty"`
	CountryIDIn     []int `json:"countryIDIn,omitempty"`
	CountryIDNotIn  []int `json:"countryIDNotIn,omitempty"`
	CountryIDIsNil  bool  `json:"countryIDIsNil,omitempty"`
	CountryIDNotNil bool  `json:"countryIDNotNil,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"`

	// "parent" edge predicates.
	HasParent     *bool               `json:"hasParent,omitempty"`
	HasParentWith []*RegionWhereInput `json:"hasParentWith,omitempty"`

	// "children" edge predicates.
	HasChildren     *bool               `json:"hasChildren,omitempty"`
	HasChildrenWith []*RegionWhereInput `json:"hasChildrenWith,omitempty"`

	// "country" edge predicates.
	HasCountry     *bool                `json:"hasCountry,omitempty"`
	HasCountryWith []*CountryWhereInput `json:"hasCountryWith,omitempty"`
}

RegionWhereInput represents a where input for filtering Region queries.

func (*RegionWhereInput) AddPredicates

func (i *RegionWhereInput) AddPredicates(predicates ...predicate.Region)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*RegionWhereInput) Filter

func (i *RegionWhereInput) Filter(q *RegionQuery) (*RegionQuery, error)

Filter applies the RegionWhereInput filter on the RegionQuery builder.

func (*RegionWhereInput) P

P returns a predicate for filtering regions. An error is returned if the input is empty or invalid.

type Regions

type Regions []*Region

Regions is a parsable slice of Region.

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 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
	// AppPolicyView is the client for interacting with the AppPolicyView builders.
	AppPolicyView *AppPolicyViewClient
	// 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
	// Country is the client for interacting with the Country builders.
	Country *CountryClient
	// Currency is the client for interacting with the Currency builders.
	Currency *CurrencyClient
	// FileIdentity is the client for interacting with the FileIdentity builders.
	FileIdentity *FileIdentityClient
	// 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
	// Quota is the client for interacting with the Quota builders.
	Quota *QuotaClient
	// QuotaItem is the client for interacting with the QuotaItem builders.
	QuotaItem *QuotaItemClient
	// Region is the client for interacting with the Region builders.
	Region *RegionClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserAddr is the client for interacting with the UserAddr builders.
	UserAddr *UserAddrClient
	// 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
	// UserPasswordPolicy is the client for interacting with the UserPasswordPolicy builders.
	UserPasswordPolicy *UserPasswordPolicyClient
	// 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) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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
	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
	ClearPolicyViews          bool
	AddPolicyViewIDs          []int
	RemovePolicyViewIDs       []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 {
	Kind           *appmenu.Kind
	Name           *string
	ClearIcon      bool
	Icon           *string
	ClearRoute     bool
	Route          *string
	ClearComments  bool
	Comments       *string
	ClearStatus    bool
	Status         *typex.SimpleStatus
	ClearAction    bool
	ActionID       *int
	ParentID       *int
	ClearChildren  bool
	AddChildIDs    []int
	RemoveChildIDs []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 {
	Kind                *apppolicy.Kind
	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
	ClearOrgPolicies    bool
	AddOrgPolicyIDs     []int
	RemoveOrgPolicyIDs  []int
	ClearPolicyViews    bool
	AddPolicyViewIDs    []int
	RemovePolicyViewIDs []int
}

UpdateAppPolicyInput represents a mutation input for updating apppolicies.

func (*UpdateAppPolicyInput) Mutate

Mutate applies the UpdateAppPolicyInput on the AppPolicyMutation builder.

type UpdateAppPolicyViewInput

type UpdateAppPolicyViewInput struct {
	Kind           *apppolicyview.Kind
	Name           *string
	ClearComments  bool
	Comments       *string
	ClearAppPolicy bool
	AppPolicyID    *int
	ParentID       *int
	ClearChildren  bool
	AddChildIDs    []int
	RemoveChildIDs []int
}

UpdateAppPolicyViewInput represents a mutation input for updating apppolicyviews.

func (*UpdateAppPolicyViewInput) Mutate

Mutate applies the UpdateAppPolicyViewInput on the AppPolicyViewMutation 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 UpdateCountryInput

type UpdateCountryInput struct {
	ClearName       bool
	Name            *string
	ClearNameEn     bool
	NameEn          *string
	Code            *string
	ClearStatus     bool
	Status          *typex.SimpleStatus
	ClearRegions    bool
	AddRegionIDs    []int
	RemoveRegionIDs []int
}

UpdateCountryInput represents a mutation input for updating countries.

func (*UpdateCountryInput) Mutate

func (i *UpdateCountryInput) Mutate(m *CountryMutation)

Mutate applies the UpdateCountryInput on the CountryMutation builder.

type UpdateCurrencyInput

type UpdateCurrencyInput struct {
	Code      *string
	Name      *string
	ClearSign bool
	Sign      *string
	Status    *typex.SimpleStatus
}

UpdateCurrencyInput represents a mutation input for updating currencies.

func (*UpdateCurrencyInput) Mutate

func (i *UpdateCurrencyInput) Mutate(m *CurrencyMutation)

Mutate applies the UpdateCurrencyInput on the CurrencyMutation builder.

type UpdateFileIdentityInput

type UpdateFileIdentityInput struct {
	AccessKeyID          *string
	AccessKeySecret      *string
	RoleArn              *string
	ClearPolicy          bool
	Policy               *string
	ClearDurationSeconds bool
	DurationSeconds      *int
	ClearComments        bool
	Comments             *string
	SourceID             *int
}

UpdateFileIdentityInput represents a mutation input for updating fileidentities.

func (*UpdateFileIdentityInput) Mutate

Mutate applies the UpdateFileIdentityInput on the FileIdentityMutation builder.

type UpdateFileSourceInput

type UpdateFileSourceInput struct {
	Kind              *filesource.Kind
	ClearComments     bool
	Comments          *string
	Endpoint          *string
	EndpointImmutable *bool
	StsEndpoint       *string
	Region            *string
	Bucket            *string
	BucketURL         *string
	ClearIdentities   bool
	AddIdentityIDs    []int
	RemoveIdentityIDs []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
	ClearCustomDomain       bool
	CustomDomain            []string
	AppendCustomDomain      []string
	Name                    *string
	ClearProfile            bool
	Profile                 *string
	ClearStatus             bool
	Status                  *typex.SimpleStatus
	ClearCountryCode        bool
	CountryCode             *string
	ClearTimezone           bool
	Timezone                *string
	ClearLocalCurrency      bool
	LocalCurrency           *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
	ClearFileIdentities     bool
	AddFileIdentityIDs      []int
	RemoveFileIdentityIDs   []int
	ClearUserPasswordPolicy bool
	UserPasswordPolicyID    *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 {
	Name                *string
	ClearComments       bool
	Comments            *string
	Rules               []*types.PolicyRule
	AppendRules         []*types.PolicyRule
	ClearPermissions    bool
	AddPermissionIDs    []int
	RemovePermissionIDs []int
	ClearAppPolicy      bool
	AppPolicyID         *int
	ClearApp            bool
	AppID               *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
	UserType    *orguser.UserType
	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
	ClearClientPreferences  bool
	ClientPreferences       []types.ClientPreference
	AppendClientPreferences []types.ClientPreference
}

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 UpdateQuotaInput

type UpdateQuotaInput struct {
	Limit          *int64
	ClearStartAt   bool
	StartAt        *time.Time
	ClearEndAt     bool
	EndAt          *time.Time
	QuotaItemID    *int
	ClearQuotaOrg  bool
	QuotaOrgID     *int
	ClearQuotaUser bool
	QuotaUserID    *int
}

UpdateQuotaInput represents a mutation input for updating quotaslice.

func (*UpdateQuotaInput) Mutate

func (i *UpdateQuotaInput) Mutate(m *QuotaMutation)

Mutate applies the UpdateQuotaInput on the QuotaMutation builder.

type UpdateQuotaItemInput

type UpdateQuotaItemInput struct {
	Code              *string
	Name              *string
	ClearDescription  bool
	Description       *string
	ResourceType      *quotaitem.ResourceType
	ClearUnit         bool
	Unit              *string
	Active            *bool
	ClearDefaultLimit bool
	DefaultLimit      *int64
	ClearQuota        bool
	AddQuotumIDs      []int
	RemoveQuotumIDs   []int
}

UpdateQuotaItemInput represents a mutation input for updating quotaitems.

func (*UpdateQuotaItemInput) Mutate

Mutate applies the UpdateQuotaItemInput on the QuotaItemMutation builder.

type UpdateRegionInput

type UpdateRegionInput struct {
	ClearName      bool
	Name           *string
	ClearNameEn    bool
	NameEn         *string
	ClearShortCode bool
	ShortCode      *string
	ClearZipCode   bool
	ZipCode        *string
	ClearStatus    bool
	Status         *typex.SimpleStatus
	ClearParent    bool
	ParentID       *int
	ClearChildren  bool
	AddChildIDs    []int
	RemoveChildIDs []int
	ClearCountry   bool
	CountryID      *int
}

UpdateRegionInput represents a mutation input for updating regions.

func (*UpdateRegionInput) Mutate

func (i *UpdateRegionInput) Mutate(m *RegionMutation)

Mutate applies the UpdateRegionInput on the RegionMutation builder.

type UpdateUserAddrInput

type UpdateUserAddrInput struct {
	ClearAddr    bool
	Addr         *string
	ClearEmail   bool
	Email        *string
	ClearFax     bool
	Fax          *string
	ClearZipCode bool
	ZipCode      *string
	ClearTel     bool
	Tel          *string
	ClearMobile  bool
	Mobile       *string
	ClearName    bool
	Name         *string
	IsDefault    *bool
	ClearRegion  bool
	RegionID     *int
}

UpdateUserAddrInput represents a mutation input for updating useraddrs.

func (*UpdateUserAddrInput) Mutate

func (i *UpdateUserAddrInput) Mutate(m *UserAddrMutation)

Mutate applies the UpdateUserAddrInput on the UserAddrMutation builder.

type UpdateUserDeviceInput

type UpdateUserDeviceInput struct {
	DeviceUID          *string
	ClearDeviceName    bool
	DeviceName         *string
	ClearSystemName    bool
	SystemName         *string
	ClearSystemVersion bool
	SystemVersion      *string
	ClearAppVersion    bool
	AppVersion         *string
	ClearDeviceModel   bool
	DeviceModel        *string
	ClearStatus        bool
	Status             *typex.SimpleStatus
	ClearComments      bool
	Comments           *string
}

UpdateUserDeviceInput represents a mutation input for updating userdevices.

func (*UpdateUserDeviceInput) Mutate

Mutate applies the UpdateUserDeviceInput on the UserDeviceMutation 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
	ClearComments    bool
	Comments         *string
	ClearAvatar      bool
	Avatar           *string
	Gender           *user.Gender
	ClearFirstName   bool
	FirstName        *string
	ClearMiddleName  bool
	MiddleName       *string
	ClearLastName    bool
	LastName         *string
	ClearLang        bool
	Lang             *string
	ClearCitizenship bool
	CitizenshipID    *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 UpdateUserPasswordPolicyInput

type UpdateUserPasswordPolicyInput struct {
	ClearLength               bool
	Length                    *int32
	ClearIncludeElement       bool
	IncludeElement            *int32
	ClearIncludeChar          bool
	IncludeChar               *int32
	ClearAllowIncludeUserName bool
	AllowIncludeUserName      *bool
	ClearInvalidDay           bool
	InvalidDay                *int32
	ClearInvalidLoginLimit    bool
	InvalidLoginLimit         *bool
	ClearRetry                bool
	Retry                     *int32
	ClearCaptchaTimes         bool
	CaptchaTimes              *int32
}

UpdateUserPasswordPolicyInput represents a mutation input for updating userpasswordpolicies.

func (*UpdateUserPasswordPolicyInput) Mutate

Mutate applies the UpdateUserPasswordPolicyInput on the UserPasswordPolicyMutation 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"`
	// 用户类型
	UserType user.UserType `json:"user_type,omitempty"`
	// 创建类型,邀请,注册,手工创建
	CreationType user.CreationType `json:"creation_type,omitempty"`
	// 注册时IP
	RegisterIP *string `json:"register_ip,omitempty"`
	// 状态
	Status types.UserStatus `json:"status,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 头像地址
	Avatar string `json:"avatar,omitempty"`
	// 性别
	Gender user.Gender `json:"gender,omitempty"`
	// 国籍
	CitizenshipID *int `json:"citizenship_id,omitempty"`
	// 名字
	FirstName string `json:"first_name,omitempty"`
	// 中间名
	MiddleName string `json:"middle_name,omitempty"`
	// 姓氏
	LastName string `json:"last_name,omitempty"`
	// 语言
	Lang string `json:"lang,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) Addresses

func (u *User) Addresses(ctx context.Context) (result []*UserAddr, err error)

func (*User) Citizenship

func (u *User) Citizenship(ctx context.Context) (*Country, error)

func (*User) Devices

func (u *User) Devices(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *UserDeviceOrder, where *UserDeviceWhereInput,
) (*UserDeviceConnection, error)

func (*User) ExecContext

func (c *User) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) NamedAddresses

func (u *User) NamedAddresses(name string) ([]*UserAddr, error)

NamedAddresses returns the Addresses named value or an error if the edge was not loaded in eager-loading with this name.

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) NamedUserQuota

func (u *User) NamedUserQuota(name string) ([]*Quota, error)

NamedUserQuota returns the UserQuota 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) QueryAddresses

func (u *User) QueryAddresses() *UserAddrQuery

QueryAddresses queries the "addresses" edge of the User entity.

func (*User) QueryCitizenship

func (u *User) QueryCitizenship() *CountryQuery

QueryCitizenship queries the "citizenship" edge of the User entity.

func (*User) QueryContext

func (c *User) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) QueryUserQuota

func (u *User) QueryUserQuota() *QuotaQuery

QueryUserQuota queries the "user_quota" 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) UserQuota

func (u *User) UserQuota(ctx context.Context) (result []*Quota, err error)

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 UserAddr

type UserAddr 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"`
	// 地址类型,contact:基本信息,delivery:收货地址
	AddrType useraddr.AddrType `json:"addr_type,omitempty"`
	// 地址地区:市
	RegionID *int `json:"region_id,omitempty"`
	// 详细地址
	Addr string `json:"addr,omitempty"`
	// 邮箱
	Email string `json:"email,omitempty"`
	// 传真
	Fax string `json:"fax,omitempty"`
	// 邮编
	ZipCode string `json:"zip_code,omitempty"`
	// 电话
	Tel string `json:"tel,omitempty"`
	// 手机
	Mobile string `json:"mobile,omitempty"`
	// 联系人名称
	Name string `json:"name,omitempty"`
	// 是否默认地址,类型为delivery时使用
	IsDefault bool `json:"is_default,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserAddrQuery when eager-loading is set.
	Edges UserAddrEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserAddr is the model entity for the UserAddr schema.

func (*UserAddr) ExecContext

func (c *UserAddr) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddr) GlobalID

func (ua *UserAddr) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given UserAddr node.

func (*UserAddr) IsNode

func (*UserAddr) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*UserAddr) QueryContext

func (c *UserAddr) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddr) QueryRegion

func (ua *UserAddr) QueryRegion() *RegionQuery

QueryRegion queries the "region" edge of the UserAddr entity.

func (*UserAddr) QueryUser

func (ua *UserAddr) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserAddr entity.

func (*UserAddr) Region

func (ua *UserAddr) Region(ctx context.Context) (*Region, error)

func (*UserAddr) String

func (ua *UserAddr) String() string

String implements the fmt.Stringer.

func (*UserAddr) ToEdge

func (ua *UserAddr) ToEdge(order *UserAddrOrder) *UserAddrEdge

ToEdge converts UserAddr into UserAddrEdge.

func (*UserAddr) Unwrap

func (ua *UserAddr) Unwrap() *UserAddr

Unwrap unwraps the UserAddr 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 (*UserAddr) Update

func (ua *UserAddr) Update() *UserAddrUpdateOne

Update returns a builder for updating this UserAddr. Note that you need to call UserAddr.Unwrap() before calling this method if this UserAddr was returned from a transaction, and the transaction was committed or rolled back.

func (*UserAddr) User

func (ua *UserAddr) User(ctx context.Context) (*User, error)

func (*UserAddr) Value

func (ua *UserAddr) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserAddr. This includes values selected through modifiers, order, etc.

type UserAddrClient

type UserAddrClient struct {
	// contains filtered or unexported fields
}

UserAddrClient is a client for the UserAddr schema.

func NewUserAddrClient

func NewUserAddrClient(c config) *UserAddrClient

NewUserAddrClient returns a client for the UserAddr from the given config.

func (*UserAddrClient) Create

func (c *UserAddrClient) Create() *UserAddrCreate

Create returns a builder for creating a UserAddr entity.

func (*UserAddrClient) CreateBulk

func (c *UserAddrClient) CreateBulk(builders ...*UserAddrCreate) *UserAddrCreateBulk

CreateBulk returns a builder for creating a bulk of UserAddr entities.

func (*UserAddrClient) Delete

func (c *UserAddrClient) Delete() *UserAddrDelete

Delete returns a delete builder for UserAddr.

func (*UserAddrClient) DeleteOne

func (c *UserAddrClient) DeleteOne(ua *UserAddr) *UserAddrDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserAddrClient) DeleteOneID

func (c *UserAddrClient) DeleteOneID(id int) *UserAddrDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserAddrClient) ExecContext

func (c *UserAddrClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrClient) Get

func (c *UserAddrClient) Get(ctx context.Context, id int) (*UserAddr, error)

Get returns a UserAddr entity by its id.

func (*UserAddrClient) GetX

func (c *UserAddrClient) GetX(ctx context.Context, id int) *UserAddr

GetX is like Get, but panics if an error occurs.

func (*UserAddrClient) Hooks

func (c *UserAddrClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserAddrClient) Intercept

func (c *UserAddrClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `useraddr.Intercept(f(g(h())))`.

func (*UserAddrClient) Interceptors

func (c *UserAddrClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserAddrClient) MapCreateBulk

func (c *UserAddrClient) MapCreateBulk(slice any, setFunc func(*UserAddrCreate, int)) *UserAddrCreateBulk

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 (*UserAddrClient) Query

func (c *UserAddrClient) Query() *UserAddrQuery

Query returns a query builder for UserAddr.

func (*UserAddrClient) QueryContext

func (c *UserAddrClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrClient) QueryRegion

func (c *UserAddrClient) QueryRegion(ua *UserAddr) *RegionQuery

QueryRegion queries the region edge of a UserAddr.

func (*UserAddrClient) QueryUser

func (c *UserAddrClient) QueryUser(ua *UserAddr) *UserQuery

QueryUser queries the user edge of a UserAddr.

func (*UserAddrClient) Update

func (c *UserAddrClient) Update() *UserAddrUpdate

Update returns an update builder for UserAddr.

func (*UserAddrClient) UpdateOne

func (c *UserAddrClient) UpdateOne(ua *UserAddr) *UserAddrUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserAddrClient) UpdateOneID

func (c *UserAddrClient) UpdateOneID(id int) *UserAddrUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserAddrClient) Use

func (c *UserAddrClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `useraddr.Hooks(f(g(h())))`.

type UserAddrConnection

type UserAddrConnection struct {
	Edges      []*UserAddrEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

UserAddrConnection is the connection containing edges to UserAddr.

type UserAddrCreate

type UserAddrCreate struct {
	// contains filtered or unexported fields
}

UserAddrCreate is the builder for creating a UserAddr entity.

func (*UserAddrCreate) Exec

func (uac *UserAddrCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserAddrCreate) ExecContext

func (c *UserAddrCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrCreate) ExecX

func (uac *UserAddrCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrCreate) Mutation

func (uac *UserAddrCreate) Mutation() *UserAddrMutation

Mutation returns the UserAddrMutation object of the builder.

func (*UserAddrCreate) OnConflict

func (uac *UserAddrCreate) OnConflict(opts ...sql.ConflictOption) *UserAddrUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserAddr.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.UserAddrUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserAddrCreate) OnConflictColumns

func (uac *UserAddrCreate) OnConflictColumns(columns ...string) *UserAddrUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserAddr.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserAddrCreate) QueryContext

func (c *UserAddrCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrCreate) Save

func (uac *UserAddrCreate) Save(ctx context.Context) (*UserAddr, error)

Save creates the UserAddr in the database.

func (*UserAddrCreate) SaveX

func (uac *UserAddrCreate) SaveX(ctx context.Context) *UserAddr

SaveX calls Save and panics if Save returns an error.

func (*UserAddrCreate) SetAddr

func (uac *UserAddrCreate) SetAddr(s string) *UserAddrCreate

SetAddr sets the "addr" field.

func (*UserAddrCreate) SetAddrType

func (uac *UserAddrCreate) SetAddrType(ut useraddr.AddrType) *UserAddrCreate

SetAddrType sets the "addr_type" field.

func (*UserAddrCreate) SetCreatedAt

func (uac *UserAddrCreate) SetCreatedAt(t time.Time) *UserAddrCreate

SetCreatedAt sets the "created_at" field.

func (*UserAddrCreate) SetCreatedBy

func (uac *UserAddrCreate) SetCreatedBy(i int) *UserAddrCreate

SetCreatedBy sets the "created_by" field.

func (*UserAddrCreate) SetEmail

func (uac *UserAddrCreate) SetEmail(s string) *UserAddrCreate

SetEmail sets the "email" field.

func (*UserAddrCreate) SetFax

func (uac *UserAddrCreate) SetFax(s string) *UserAddrCreate

SetFax sets the "fax" field.

func (*UserAddrCreate) SetID

func (uac *UserAddrCreate) SetID(i int) *UserAddrCreate

SetID sets the "id" field.

func (*UserAddrCreate) SetInput

SetInput applies the change-set in the CreateUserAddrInput on the UserAddrCreate builder.

func (*UserAddrCreate) SetIsDefault

func (uac *UserAddrCreate) SetIsDefault(b bool) *UserAddrCreate

SetIsDefault sets the "is_default" field.

func (*UserAddrCreate) SetMobile

func (uac *UserAddrCreate) SetMobile(s string) *UserAddrCreate

SetMobile sets the "mobile" field.

func (*UserAddrCreate) SetName

func (uac *UserAddrCreate) SetName(s string) *UserAddrCreate

SetName sets the "name" field.

func (*UserAddrCreate) SetNillableAddr

func (uac *UserAddrCreate) SetNillableAddr(s *string) *UserAddrCreate

SetNillableAddr sets the "addr" field if the given value is not nil.

func (*UserAddrCreate) SetNillableCreatedAt

func (uac *UserAddrCreate) SetNillableCreatedAt(t *time.Time) *UserAddrCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserAddrCreate) SetNillableEmail

func (uac *UserAddrCreate) SetNillableEmail(s *string) *UserAddrCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserAddrCreate) SetNillableFax

func (uac *UserAddrCreate) SetNillableFax(s *string) *UserAddrCreate

SetNillableFax sets the "fax" field if the given value is not nil.

func (*UserAddrCreate) SetNillableIsDefault

func (uac *UserAddrCreate) SetNillableIsDefault(b *bool) *UserAddrCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*UserAddrCreate) SetNillableMobile

func (uac *UserAddrCreate) SetNillableMobile(s *string) *UserAddrCreate

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserAddrCreate) SetNillableName

func (uac *UserAddrCreate) SetNillableName(s *string) *UserAddrCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*UserAddrCreate) SetNillableRegionID

func (uac *UserAddrCreate) SetNillableRegionID(i *int) *UserAddrCreate

SetNillableRegionID sets the "region_id" field if the given value is not nil.

func (*UserAddrCreate) SetNillableTel

func (uac *UserAddrCreate) SetNillableTel(s *string) *UserAddrCreate

SetNillableTel sets the "tel" field if the given value is not nil.

func (*UserAddrCreate) SetNillableUpdatedAt

func (uac *UserAddrCreate) SetNillableUpdatedAt(t *time.Time) *UserAddrCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserAddrCreate) SetNillableUpdatedBy

func (uac *UserAddrCreate) SetNillableUpdatedBy(i *int) *UserAddrCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserAddrCreate) SetNillableUserID

func (uac *UserAddrCreate) SetNillableUserID(i *int) *UserAddrCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*UserAddrCreate) SetNillableZipCode

func (uac *UserAddrCreate) SetNillableZipCode(s *string) *UserAddrCreate

SetNillableZipCode sets the "zip_code" field if the given value is not nil.

func (*UserAddrCreate) SetRegion

func (uac *UserAddrCreate) SetRegion(r *Region) *UserAddrCreate

SetRegion sets the "region" edge to the Region entity.

func (*UserAddrCreate) SetRegionID

func (uac *UserAddrCreate) SetRegionID(i int) *UserAddrCreate

SetRegionID sets the "region_id" field.

func (*UserAddrCreate) SetTel

func (uac *UserAddrCreate) SetTel(s string) *UserAddrCreate

SetTel sets the "tel" field.

func (*UserAddrCreate) SetUpdatedAt

func (uac *UserAddrCreate) SetUpdatedAt(t time.Time) *UserAddrCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserAddrCreate) SetUpdatedBy

func (uac *UserAddrCreate) SetUpdatedBy(i int) *UserAddrCreate

SetUpdatedBy sets the "updated_by" field.

func (*UserAddrCreate) SetUser

func (uac *UserAddrCreate) SetUser(u *User) *UserAddrCreate

SetUser sets the "user" edge to the User entity.

func (*UserAddrCreate) SetUserID

func (uac *UserAddrCreate) SetUserID(i int) *UserAddrCreate

SetUserID sets the "user_id" field.

func (*UserAddrCreate) SetZipCode

func (uac *UserAddrCreate) SetZipCode(s string) *UserAddrCreate

SetZipCode sets the "zip_code" field.

type UserAddrCreateBulk

type UserAddrCreateBulk struct {
	// contains filtered or unexported fields
}

UserAddrCreateBulk is the builder for creating many UserAddr entities in bulk.

func (*UserAddrCreateBulk) Exec

func (uacb *UserAddrCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserAddrCreateBulk) ExecContext

func (c *UserAddrCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrCreateBulk) ExecX

func (uacb *UserAddrCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrCreateBulk) OnConflict

func (uacb *UserAddrCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserAddrUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserAddr.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.UserAddrUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserAddrCreateBulk) OnConflictColumns

func (uacb *UserAddrCreateBulk) OnConflictColumns(columns ...string) *UserAddrUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserAddr.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserAddrCreateBulk) QueryContext

func (c *UserAddrCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrCreateBulk) Save

func (uacb *UserAddrCreateBulk) Save(ctx context.Context) ([]*UserAddr, error)

Save creates the UserAddr entities in the database.

func (*UserAddrCreateBulk) SaveX

func (uacb *UserAddrCreateBulk) SaveX(ctx context.Context) []*UserAddr

SaveX is like Save, but panics if an error occurs.

type UserAddrDelete

type UserAddrDelete struct {
	// contains filtered or unexported fields
}

UserAddrDelete is the builder for deleting a UserAddr entity.

func (*UserAddrDelete) Exec

func (uad *UserAddrDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserAddrDelete) ExecContext

func (c *UserAddrDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrDelete) ExecX

func (uad *UserAddrDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrDelete) QueryContext

func (c *UserAddrDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrDelete) Where

func (uad *UserAddrDelete) Where(ps ...predicate.UserAddr) *UserAddrDelete

Where appends a list predicates to the UserAddrDelete builder.

type UserAddrDeleteOne

type UserAddrDeleteOne struct {
	// contains filtered or unexported fields
}

UserAddrDeleteOne is the builder for deleting a single UserAddr entity.

func (*UserAddrDeleteOne) Exec

func (uado *UserAddrDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserAddrDeleteOne) ExecX

func (uado *UserAddrDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrDeleteOne) Where

Where appends a list predicates to the UserAddrDelete builder.

type UserAddrEdge

type UserAddrEdge struct {
	Node   *UserAddr `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

UserAddrEdge is the edge representation of UserAddr.

type UserAddrEdges

type UserAddrEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// 地区信息
	Region *Region `json:"region,omitempty"`
	// contains filtered or unexported fields
}

UserAddrEdges holds the relations/edges for other nodes in the graph.

func (UserAddrEdges) RegionOrErr

func (e UserAddrEdges) RegionOrErr() (*Region, error)

RegionOrErr returns the Region value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserAddrEdges) UserOrErr

func (e UserAddrEdges) 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 UserAddrGroupBy

type UserAddrGroupBy struct {
	// contains filtered or unexported fields
}

UserAddrGroupBy is the group-by builder for UserAddr entities.

func (*UserAddrGroupBy) Aggregate

func (uagb *UserAddrGroupBy) Aggregate(fns ...AggregateFunc) *UserAddrGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserAddrGroupBy) Bool

func (s *UserAddrGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) BoolX

func (s *UserAddrGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserAddrGroupBy) Bools

func (s *UserAddrGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) BoolsX

func (s *UserAddrGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserAddrGroupBy) Float64

func (s *UserAddrGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) Float64X

func (s *UserAddrGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserAddrGroupBy) Float64s

func (s *UserAddrGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) Float64sX

func (s *UserAddrGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserAddrGroupBy) Int

func (s *UserAddrGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) IntX

func (s *UserAddrGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserAddrGroupBy) Ints

func (s *UserAddrGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) IntsX

func (s *UserAddrGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserAddrGroupBy) Scan

func (uagb *UserAddrGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserAddrGroupBy) ScanX

func (s *UserAddrGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserAddrGroupBy) String

func (s *UserAddrGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) StringX

func (s *UserAddrGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserAddrGroupBy) Strings

func (s *UserAddrGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserAddrGroupBy) StringsX

func (s *UserAddrGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserAddrMutation

type UserAddrMutation struct {
	// contains filtered or unexported fields
}

UserAddrMutation represents an operation that mutates the UserAddr nodes in the graph.

func (*UserAddrMutation) AddCreatedBy

func (m *UserAddrMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*UserAddrMutation) AddField

func (m *UserAddrMutation) 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 (*UserAddrMutation) AddUpdatedBy

func (m *UserAddrMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*UserAddrMutation) AddedCreatedBy

func (m *UserAddrMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*UserAddrMutation) AddedEdges

func (m *UserAddrMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserAddrMutation) AddedField

func (m *UserAddrMutation) 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 (*UserAddrMutation) AddedFields

func (m *UserAddrMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserAddrMutation) AddedIDs

func (m *UserAddrMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserAddrMutation) AddedUpdatedBy

func (m *UserAddrMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*UserAddrMutation) Addr

func (m *UserAddrMutation) Addr() (r string, exists bool)

Addr returns the value of the "addr" field in the mutation.

func (*UserAddrMutation) AddrCleared

func (m *UserAddrMutation) AddrCleared() bool

AddrCleared returns if the "addr" field was cleared in this mutation.

func (*UserAddrMutation) AddrType

func (m *UserAddrMutation) AddrType() (r useraddr.AddrType, exists bool)

AddrType returns the value of the "addr_type" field in the mutation.

func (*UserAddrMutation) ClearAddr

func (m *UserAddrMutation) ClearAddr()

ClearAddr clears the value of the "addr" field.

func (*UserAddrMutation) ClearEdge

func (m *UserAddrMutation) 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 (*UserAddrMutation) ClearEmail

func (m *UserAddrMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*UserAddrMutation) ClearFax

func (m *UserAddrMutation) ClearFax()

ClearFax clears the value of the "fax" field.

func (*UserAddrMutation) ClearField

func (m *UserAddrMutation) 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 (*UserAddrMutation) ClearMobile

func (m *UserAddrMutation) ClearMobile()

ClearMobile clears the value of the "mobile" field.

func (*UserAddrMutation) ClearName

func (m *UserAddrMutation) ClearName()

ClearName clears the value of the "name" field.

func (*UserAddrMutation) ClearRegion

func (m *UserAddrMutation) ClearRegion()

ClearRegion clears the "region" edge to the Region entity.

func (*UserAddrMutation) ClearRegionID

func (m *UserAddrMutation) ClearRegionID()

ClearRegionID clears the value of the "region_id" field.

func (*UserAddrMutation) ClearTel

func (m *UserAddrMutation) ClearTel()

ClearTel clears the value of the "tel" field.

func (*UserAddrMutation) ClearUpdatedAt

func (m *UserAddrMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserAddrMutation) ClearUpdatedBy

func (m *UserAddrMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserAddrMutation) ClearUser

func (m *UserAddrMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserAddrMutation) ClearUserID

func (m *UserAddrMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*UserAddrMutation) ClearZipCode

func (m *UserAddrMutation) ClearZipCode()

ClearZipCode clears the value of the "zip_code" field.

func (*UserAddrMutation) ClearedEdges

func (m *UserAddrMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserAddrMutation) ClearedFields

func (m *UserAddrMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserAddrMutation) Client

func (m UserAddrMutation) 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 (*UserAddrMutation) CreatedAt

func (m *UserAddrMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserAddrMutation) CreatedBy

func (m *UserAddrMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*UserAddrMutation) EdgeCleared

func (m *UserAddrMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserAddrMutation) Email

func (m *UserAddrMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserAddrMutation) EmailCleared

func (m *UserAddrMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*UserAddrMutation) ExecContext

func (c *UserAddrMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrMutation) Fax

func (m *UserAddrMutation) Fax() (r string, exists bool)

Fax returns the value of the "fax" field in the mutation.

func (*UserAddrMutation) FaxCleared

func (m *UserAddrMutation) FaxCleared() bool

FaxCleared returns if the "fax" field was cleared in this mutation.

func (*UserAddrMutation) Field

func (m *UserAddrMutation) 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 (*UserAddrMutation) FieldCleared

func (m *UserAddrMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserAddrMutation) Fields

func (m *UserAddrMutation) 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 (*UserAddrMutation) ID

func (m *UserAddrMutation) 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 (*UserAddrMutation) IDs

func (m *UserAddrMutation) 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 (*UserAddrMutation) IsDefault

func (m *UserAddrMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*UserAddrMutation) Mobile

func (m *UserAddrMutation) Mobile() (r string, exists bool)

Mobile returns the value of the "mobile" field in the mutation.

func (*UserAddrMutation) MobileCleared

func (m *UserAddrMutation) MobileCleared() bool

MobileCleared returns if the "mobile" field was cleared in this mutation.

func (*UserAddrMutation) Name

func (m *UserAddrMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserAddrMutation) NameCleared

func (m *UserAddrMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*UserAddrMutation) OldAddr

func (m *UserAddrMutation) OldAddr(ctx context.Context) (v string, err error)

OldAddr returns the old "addr" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldAddrType

func (m *UserAddrMutation) OldAddrType(ctx context.Context) (v useraddr.AddrType, err error)

OldAddrType returns the old "addr_type" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldCreatedAt

func (m *UserAddrMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldCreatedBy

func (m *UserAddrMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldEmail

func (m *UserAddrMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldFax

func (m *UserAddrMutation) OldFax(ctx context.Context) (v string, err error)

OldFax returns the old "fax" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldField

func (m *UserAddrMutation) 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 (*UserAddrMutation) OldIsDefault

func (m *UserAddrMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldMobile

func (m *UserAddrMutation) OldMobile(ctx context.Context) (v string, err error)

OldMobile returns the old "mobile" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldName

func (m *UserAddrMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldRegionID

func (m *UserAddrMutation) OldRegionID(ctx context.Context) (v *int, err error)

OldRegionID returns the old "region_id" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldTel

func (m *UserAddrMutation) OldTel(ctx context.Context) (v string, err error)

OldTel returns the old "tel" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldUpdatedAt

func (m *UserAddrMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldUpdatedBy

func (m *UserAddrMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldUserID

func (m *UserAddrMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) OldZipCode

func (m *UserAddrMutation) OldZipCode(ctx context.Context) (v string, err error)

OldZipCode returns the old "zip_code" field's value of the UserAddr entity. If the UserAddr object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserAddrMutation) Op

func (m *UserAddrMutation) Op() Op

Op returns the operation name.

func (*UserAddrMutation) QueryContext

func (c *UserAddrMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrMutation) RegionCleared

func (m *UserAddrMutation) RegionCleared() bool

RegionCleared reports if the "region" edge to the Region entity was cleared.

func (*UserAddrMutation) RegionID

func (m *UserAddrMutation) RegionID() (r int, exists bool)

RegionID returns the value of the "region_id" field in the mutation.

func (*UserAddrMutation) RegionIDCleared

func (m *UserAddrMutation) RegionIDCleared() bool

RegionIDCleared returns if the "region_id" field was cleared in this mutation.

func (*UserAddrMutation) RegionIDs

func (m *UserAddrMutation) RegionIDs() (ids []int)

RegionIDs returns the "region" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RegionID instead. It exists only for internal usage by the builders.

func (*UserAddrMutation) RemovedEdges

func (m *UserAddrMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserAddrMutation) RemovedIDs

func (m *UserAddrMutation) 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 (*UserAddrMutation) ResetAddr

func (m *UserAddrMutation) ResetAddr()

ResetAddr resets all changes to the "addr" field.

func (*UserAddrMutation) ResetAddrType

func (m *UserAddrMutation) ResetAddrType()

ResetAddrType resets all changes to the "addr_type" field.

func (*UserAddrMutation) ResetCreatedAt

func (m *UserAddrMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserAddrMutation) ResetCreatedBy

func (m *UserAddrMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*UserAddrMutation) ResetEdge

func (m *UserAddrMutation) 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 (*UserAddrMutation) ResetEmail

func (m *UserAddrMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserAddrMutation) ResetFax

func (m *UserAddrMutation) ResetFax()

ResetFax resets all changes to the "fax" field.

func (*UserAddrMutation) ResetField

func (m *UserAddrMutation) 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 (*UserAddrMutation) ResetIsDefault

func (m *UserAddrMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*UserAddrMutation) ResetMobile

func (m *UserAddrMutation) ResetMobile()

ResetMobile resets all changes to the "mobile" field.

func (*UserAddrMutation) ResetName

func (m *UserAddrMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserAddrMutation) ResetRegion

func (m *UserAddrMutation) ResetRegion()

ResetRegion resets all changes to the "region" edge.

func (*UserAddrMutation) ResetRegionID

func (m *UserAddrMutation) ResetRegionID()

ResetRegionID resets all changes to the "region_id" field.

func (*UserAddrMutation) ResetTel

func (m *UserAddrMutation) ResetTel()

ResetTel resets all changes to the "tel" field.

func (*UserAddrMutation) ResetUpdatedAt

func (m *UserAddrMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserAddrMutation) ResetUpdatedBy

func (m *UserAddrMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*UserAddrMutation) ResetUser

func (m *UserAddrMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserAddrMutation) ResetUserID

func (m *UserAddrMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UserAddrMutation) ResetZipCode

func (m *UserAddrMutation) ResetZipCode()

ResetZipCode resets all changes to the "zip_code" field.

func (*UserAddrMutation) SetAddr

func (m *UserAddrMutation) SetAddr(s string)

SetAddr sets the "addr" field.

func (*UserAddrMutation) SetAddrType

func (m *UserAddrMutation) SetAddrType(ut useraddr.AddrType)

SetAddrType sets the "addr_type" field.

func (*UserAddrMutation) SetCreatedAt

func (m *UserAddrMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserAddrMutation) SetCreatedBy

func (m *UserAddrMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*UserAddrMutation) SetEmail

func (m *UserAddrMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserAddrMutation) SetFax

func (m *UserAddrMutation) SetFax(s string)

SetFax sets the "fax" field.

func (*UserAddrMutation) SetField

func (m *UserAddrMutation) 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 (*UserAddrMutation) SetID

func (m *UserAddrMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UserAddr entities.

func (*UserAddrMutation) SetIsDefault

func (m *UserAddrMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*UserAddrMutation) SetMobile

func (m *UserAddrMutation) SetMobile(s string)

SetMobile sets the "mobile" field.

func (*UserAddrMutation) SetName

func (m *UserAddrMutation) SetName(s string)

SetName sets the "name" field.

func (*UserAddrMutation) SetOp

func (m *UserAddrMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserAddrMutation) SetRegionID

func (m *UserAddrMutation) SetRegionID(i int)

SetRegionID sets the "region_id" field.

func (*UserAddrMutation) SetTel

func (m *UserAddrMutation) SetTel(s string)

SetTel sets the "tel" field.

func (*UserAddrMutation) SetUpdatedAt

func (m *UserAddrMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserAddrMutation) SetUpdatedBy

func (m *UserAddrMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*UserAddrMutation) SetUserID

func (m *UserAddrMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*UserAddrMutation) SetZipCode

func (m *UserAddrMutation) SetZipCode(s string)

SetZipCode sets the "zip_code" field.

func (*UserAddrMutation) Tel

func (m *UserAddrMutation) Tel() (r string, exists bool)

Tel returns the value of the "tel" field in the mutation.

func (*UserAddrMutation) TelCleared

func (m *UserAddrMutation) TelCleared() bool

TelCleared returns if the "tel" field was cleared in this mutation.

func (UserAddrMutation) Tx

func (m UserAddrMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserAddrMutation) Type

func (m *UserAddrMutation) Type() string

Type returns the node type of this mutation (UserAddr).

func (*UserAddrMutation) UpdatedAt

func (m *UserAddrMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserAddrMutation) UpdatedAtCleared

func (m *UserAddrMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*UserAddrMutation) UpdatedBy

func (m *UserAddrMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*UserAddrMutation) UpdatedByCleared

func (m *UserAddrMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*UserAddrMutation) UserCleared

func (m *UserAddrMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserAddrMutation) UserID

func (m *UserAddrMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UserAddrMutation) UserIDCleared

func (m *UserAddrMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*UserAddrMutation) UserIDs

func (m *UserAddrMutation) 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 (*UserAddrMutation) Where

func (m *UserAddrMutation) Where(ps ...predicate.UserAddr)

Where appends a list predicates to the UserAddrMutation builder.

func (*UserAddrMutation) WhereP

func (m *UserAddrMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserAddrMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*UserAddrMutation) ZipCode

func (m *UserAddrMutation) ZipCode() (r string, exists bool)

ZipCode returns the value of the "zip_code" field in the mutation.

func (*UserAddrMutation) ZipCodeCleared

func (m *UserAddrMutation) ZipCodeCleared() bool

ZipCodeCleared returns if the "zip_code" field was cleared in this mutation.

type UserAddrOrder

type UserAddrOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *UserAddrOrderField `json:"field"`
}

UserAddrOrder defines the ordering of UserAddr.

type UserAddrOrderField

type UserAddrOrderField struct {
	// Value extracts the ordering value from the given UserAddr.
	Value func(*UserAddr) (ent.Value, error)
	// contains filtered or unexported fields
}

UserAddrOrderField defines the ordering field of UserAddr.

func (UserAddrOrderField) MarshalGQL

func (f UserAddrOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserAddrOrderField) String

func (f UserAddrOrderField) String() string

String implement fmt.Stringer interface.

func (*UserAddrOrderField) UnmarshalGQL

func (f *UserAddrOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserAddrPaginateOption

type UserAddrPaginateOption func(*useraddrPager) error

UserAddrPaginateOption enables pagination customization.

func WithUserAddrFilter

func WithUserAddrFilter(filter func(*UserAddrQuery) (*UserAddrQuery, error)) UserAddrPaginateOption

WithUserAddrFilter configures pagination filter.

func WithUserAddrOrder

func WithUserAddrOrder(order *UserAddrOrder) UserAddrPaginateOption

WithUserAddrOrder configures pagination ordering.

type UserAddrQuery

type UserAddrQuery struct {
	// contains filtered or unexported fields
}

UserAddrQuery is the builder for querying UserAddr entities.

func (*UserAddrQuery) Aggregate

func (uaq *UserAddrQuery) Aggregate(fns ...AggregateFunc) *UserAddrSelect

Aggregate returns a UserAddrSelect configured with the given aggregations.

func (*UserAddrQuery) All

func (uaq *UserAddrQuery) All(ctx context.Context) ([]*UserAddr, error)

All executes the query and returns a list of UserAddrs.

func (*UserAddrQuery) AllX

func (uaq *UserAddrQuery) AllX(ctx context.Context) []*UserAddr

AllX is like All, but panics if an error occurs.

func (*UserAddrQuery) Clone

func (uaq *UserAddrQuery) Clone() *UserAddrQuery

Clone returns a duplicate of the UserAddrQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserAddrQuery) CollectFields

func (ua *UserAddrQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserAddrQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserAddrQuery) Count

func (uaq *UserAddrQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserAddrQuery) CountX

func (uaq *UserAddrQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserAddrQuery) ExecContext

func (c *UserAddrQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrQuery) Exist

func (uaq *UserAddrQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserAddrQuery) ExistX

func (uaq *UserAddrQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserAddrQuery) First

func (uaq *UserAddrQuery) First(ctx context.Context) (*UserAddr, error)

First returns the first UserAddr entity from the query. Returns a *NotFoundError when no UserAddr was found.

func (*UserAddrQuery) FirstID

func (uaq *UserAddrQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserAddr ID from the query. Returns a *NotFoundError when no UserAddr ID was found.

func (*UserAddrQuery) FirstIDX

func (uaq *UserAddrQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserAddrQuery) FirstX

func (uaq *UserAddrQuery) FirstX(ctx context.Context) *UserAddr

FirstX is like First, but panics if an error occurs.

func (*UserAddrQuery) GroupBy

func (uaq *UserAddrQuery) GroupBy(field string, fields ...string) *UserAddrGroupBy

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.UserAddr.Query().
	GroupBy(useraddr.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserAddrQuery) IDs

func (uaq *UserAddrQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserAddr IDs.

func (*UserAddrQuery) IDsX

func (uaq *UserAddrQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserAddrQuery) Limit

func (uaq *UserAddrQuery) Limit(limit int) *UserAddrQuery

Limit the number of records to be returned by this query.

func (*UserAddrQuery) Offset

func (uaq *UserAddrQuery) Offset(offset int) *UserAddrQuery

Offset to start from.

func (*UserAddrQuery) Only

func (uaq *UserAddrQuery) Only(ctx context.Context) (*UserAddr, error)

Only returns a single UserAddr entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserAddr entity is found. Returns a *NotFoundError when no UserAddr entities are found.

func (*UserAddrQuery) OnlyID

func (uaq *UserAddrQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserAddr ID in the query. Returns a *NotSingularError when more than one UserAddr ID is found. Returns a *NotFoundError when no entities are found.

func (*UserAddrQuery) OnlyIDX

func (uaq *UserAddrQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserAddrQuery) OnlyX

func (uaq *UserAddrQuery) OnlyX(ctx context.Context) *UserAddr

OnlyX is like Only, but panics if an error occurs.

func (*UserAddrQuery) Order

func (uaq *UserAddrQuery) Order(o ...useraddr.OrderOption) *UserAddrQuery

Order specifies how the records should be ordered.

func (*UserAddrQuery) Paginate

func (ua *UserAddrQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserAddrPaginateOption,
) (*UserAddrConnection, error)

Paginate executes the query and returns a relay based cursor connection to UserAddr.

func (*UserAddrQuery) QueryContext

func (c *UserAddrQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrQuery) QueryRegion

func (uaq *UserAddrQuery) QueryRegion() *RegionQuery

QueryRegion chains the current query on the "region" edge.

func (*UserAddrQuery) QueryUser

func (uaq *UserAddrQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserAddrQuery) Select

func (uaq *UserAddrQuery) Select(fields ...string) *UserAddrSelect

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.UserAddr.Query().
	Select(useraddr.FieldCreatedBy).
	Scan(ctx, &v)

func (*UserAddrQuery) Unique

func (uaq *UserAddrQuery) Unique(unique bool) *UserAddrQuery

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 (*UserAddrQuery) Where

func (uaq *UserAddrQuery) Where(ps ...predicate.UserAddr) *UserAddrQuery

Where adds a new predicate for the UserAddrQuery builder.

func (*UserAddrQuery) WithRegion

func (uaq *UserAddrQuery) WithRegion(opts ...func(*RegionQuery)) *UserAddrQuery

WithRegion tells the query-builder to eager-load the nodes that are connected to the "region" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserAddrQuery) WithUser

func (uaq *UserAddrQuery) WithUser(opts ...func(*UserQuery)) *UserAddrQuery

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 UserAddrSelect

type UserAddrSelect struct {
	*UserAddrQuery
	// contains filtered or unexported fields
}

UserAddrSelect is the builder for selecting fields of UserAddr entities.

func (*UserAddrSelect) Aggregate

func (uas *UserAddrSelect) Aggregate(fns ...AggregateFunc) *UserAddrSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserAddrSelect) Bool

func (s *UserAddrSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) BoolX

func (s *UserAddrSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserAddrSelect) Bools

func (s *UserAddrSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) BoolsX

func (s *UserAddrSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UserAddrSelect) ExecContext

func (c UserAddrSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrSelect) Float64

func (s *UserAddrSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) Float64X

func (s *UserAddrSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserAddrSelect) Float64s

func (s *UserAddrSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) Float64sX

func (s *UserAddrSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserAddrSelect) Int

func (s *UserAddrSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) IntX

func (s *UserAddrSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserAddrSelect) Ints

func (s *UserAddrSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) IntsX

func (s *UserAddrSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (UserAddrSelect) QueryContext

func (c UserAddrSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrSelect) Scan

func (uas *UserAddrSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserAddrSelect) ScanX

func (s *UserAddrSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserAddrSelect) String

func (s *UserAddrSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) StringX

func (s *UserAddrSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserAddrSelect) Strings

func (s *UserAddrSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserAddrSelect) StringsX

func (s *UserAddrSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserAddrUpdate

type UserAddrUpdate struct {
	// contains filtered or unexported fields
}

UserAddrUpdate is the builder for updating UserAddr entities.

func (*UserAddrUpdate) AddUpdatedBy

func (uau *UserAddrUpdate) AddUpdatedBy(i int) *UserAddrUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*UserAddrUpdate) ClearAddr

func (uau *UserAddrUpdate) ClearAddr() *UserAddrUpdate

ClearAddr clears the value of the "addr" field.

func (*UserAddrUpdate) ClearEmail

func (uau *UserAddrUpdate) ClearEmail() *UserAddrUpdate

ClearEmail clears the value of the "email" field.

func (*UserAddrUpdate) ClearFax

func (uau *UserAddrUpdate) ClearFax() *UserAddrUpdate

ClearFax clears the value of the "fax" field.

func (*UserAddrUpdate) ClearMobile

func (uau *UserAddrUpdate) ClearMobile() *UserAddrUpdate

ClearMobile clears the value of the "mobile" field.

func (*UserAddrUpdate) ClearName

func (uau *UserAddrUpdate) ClearName() *UserAddrUpdate

ClearName clears the value of the "name" field.

func (*UserAddrUpdate) ClearRegion

func (uau *UserAddrUpdate) ClearRegion() *UserAddrUpdate

ClearRegion clears the "region" edge to the Region entity.

func (*UserAddrUpdate) ClearRegionID

func (uau *UserAddrUpdate) ClearRegionID() *UserAddrUpdate

ClearRegionID clears the value of the "region_id" field.

func (*UserAddrUpdate) ClearTel

func (uau *UserAddrUpdate) ClearTel() *UserAddrUpdate

ClearTel clears the value of the "tel" field.

func (*UserAddrUpdate) ClearUpdatedAt

func (uau *UserAddrUpdate) ClearUpdatedAt() *UserAddrUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserAddrUpdate) ClearUpdatedBy

func (uau *UserAddrUpdate) ClearUpdatedBy() *UserAddrUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserAddrUpdate) ClearZipCode

func (uau *UserAddrUpdate) ClearZipCode() *UserAddrUpdate

ClearZipCode clears the value of the "zip_code" field.

func (*UserAddrUpdate) Exec

func (uau *UserAddrUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserAddrUpdate) ExecContext

func (c *UserAddrUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrUpdate) ExecX

func (uau *UserAddrUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrUpdate) Mutation

func (uau *UserAddrUpdate) Mutation() *UserAddrMutation

Mutation returns the UserAddrMutation object of the builder.

func (*UserAddrUpdate) QueryContext

func (c *UserAddrUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrUpdate) Save

func (uau *UserAddrUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserAddrUpdate) SaveX

func (uau *UserAddrUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserAddrUpdate) SetAddr

func (uau *UserAddrUpdate) SetAddr(s string) *UserAddrUpdate

SetAddr sets the "addr" field.

func (*UserAddrUpdate) SetAddrType

func (uau *UserAddrUpdate) SetAddrType(ut useraddr.AddrType) *UserAddrUpdate

SetAddrType sets the "addr_type" field.

func (*UserAddrUpdate) SetEmail

func (uau *UserAddrUpdate) SetEmail(s string) *UserAddrUpdate

SetEmail sets the "email" field.

func (*UserAddrUpdate) SetFax

func (uau *UserAddrUpdate) SetFax(s string) *UserAddrUpdate

SetFax sets the "fax" field.

func (*UserAddrUpdate) SetInput

SetInput applies the change-set in the UpdateUserAddrInput on the UserAddrUpdate builder.

func (*UserAddrUpdate) SetIsDefault

func (uau *UserAddrUpdate) SetIsDefault(b bool) *UserAddrUpdate

SetIsDefault sets the "is_default" field.

func (*UserAddrUpdate) SetMobile

func (uau *UserAddrUpdate) SetMobile(s string) *UserAddrUpdate

SetMobile sets the "mobile" field.

func (*UserAddrUpdate) SetName

func (uau *UserAddrUpdate) SetName(s string) *UserAddrUpdate

SetName sets the "name" field.

func (*UserAddrUpdate) SetNillableAddr

func (uau *UserAddrUpdate) SetNillableAddr(s *string) *UserAddrUpdate

SetNillableAddr sets the "addr" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableAddrType

func (uau *UserAddrUpdate) SetNillableAddrType(ut *useraddr.AddrType) *UserAddrUpdate

SetNillableAddrType sets the "addr_type" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableEmail

func (uau *UserAddrUpdate) SetNillableEmail(s *string) *UserAddrUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableFax

func (uau *UserAddrUpdate) SetNillableFax(s *string) *UserAddrUpdate

SetNillableFax sets the "fax" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableIsDefault

func (uau *UserAddrUpdate) SetNillableIsDefault(b *bool) *UserAddrUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableMobile

func (uau *UserAddrUpdate) SetNillableMobile(s *string) *UserAddrUpdate

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableName

func (uau *UserAddrUpdate) SetNillableName(s *string) *UserAddrUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableRegionID

func (uau *UserAddrUpdate) SetNillableRegionID(i *int) *UserAddrUpdate

SetNillableRegionID sets the "region_id" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableTel

func (uau *UserAddrUpdate) SetNillableTel(s *string) *UserAddrUpdate

SetNillableTel sets the "tel" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableUpdatedAt

func (uau *UserAddrUpdate) SetNillableUpdatedAt(t *time.Time) *UserAddrUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableUpdatedBy

func (uau *UserAddrUpdate) SetNillableUpdatedBy(i *int) *UserAddrUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserAddrUpdate) SetNillableZipCode

func (uau *UserAddrUpdate) SetNillableZipCode(s *string) *UserAddrUpdate

SetNillableZipCode sets the "zip_code" field if the given value is not nil.

func (*UserAddrUpdate) SetRegion

func (uau *UserAddrUpdate) SetRegion(r *Region) *UserAddrUpdate

SetRegion sets the "region" edge to the Region entity.

func (*UserAddrUpdate) SetRegionID

func (uau *UserAddrUpdate) SetRegionID(i int) *UserAddrUpdate

SetRegionID sets the "region_id" field.

func (*UserAddrUpdate) SetTel

func (uau *UserAddrUpdate) SetTel(s string) *UserAddrUpdate

SetTel sets the "tel" field.

func (*UserAddrUpdate) SetUpdatedAt

func (uau *UserAddrUpdate) SetUpdatedAt(t time.Time) *UserAddrUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserAddrUpdate) SetUpdatedBy

func (uau *UserAddrUpdate) SetUpdatedBy(i int) *UserAddrUpdate

SetUpdatedBy sets the "updated_by" field.

func (*UserAddrUpdate) SetZipCode

func (uau *UserAddrUpdate) SetZipCode(s string) *UserAddrUpdate

SetZipCode sets the "zip_code" field.

func (*UserAddrUpdate) Where

func (uau *UserAddrUpdate) Where(ps ...predicate.UserAddr) *UserAddrUpdate

Where appends a list predicates to the UserAddrUpdate builder.

type UserAddrUpdateOne

type UserAddrUpdateOne struct {
	// contains filtered or unexported fields
}

UserAddrUpdateOne is the builder for updating a single UserAddr entity.

func (*UserAddrUpdateOne) AddUpdatedBy

func (uauo *UserAddrUpdateOne) AddUpdatedBy(i int) *UserAddrUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*UserAddrUpdateOne) ClearAddr

func (uauo *UserAddrUpdateOne) ClearAddr() *UserAddrUpdateOne

ClearAddr clears the value of the "addr" field.

func (*UserAddrUpdateOne) ClearEmail

func (uauo *UserAddrUpdateOne) ClearEmail() *UserAddrUpdateOne

ClearEmail clears the value of the "email" field.

func (*UserAddrUpdateOne) ClearFax

func (uauo *UserAddrUpdateOne) ClearFax() *UserAddrUpdateOne

ClearFax clears the value of the "fax" field.

func (*UserAddrUpdateOne) ClearMobile

func (uauo *UserAddrUpdateOne) ClearMobile() *UserAddrUpdateOne

ClearMobile clears the value of the "mobile" field.

func (*UserAddrUpdateOne) ClearName

func (uauo *UserAddrUpdateOne) ClearName() *UserAddrUpdateOne

ClearName clears the value of the "name" field.

func (*UserAddrUpdateOne) ClearRegion

func (uauo *UserAddrUpdateOne) ClearRegion() *UserAddrUpdateOne

ClearRegion clears the "region" edge to the Region entity.

func (*UserAddrUpdateOne) ClearRegionID

func (uauo *UserAddrUpdateOne) ClearRegionID() *UserAddrUpdateOne

ClearRegionID clears the value of the "region_id" field.

func (*UserAddrUpdateOne) ClearTel

func (uauo *UserAddrUpdateOne) ClearTel() *UserAddrUpdateOne

ClearTel clears the value of the "tel" field.

func (*UserAddrUpdateOne) ClearUpdatedAt

func (uauo *UserAddrUpdateOne) ClearUpdatedAt() *UserAddrUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserAddrUpdateOne) ClearUpdatedBy

func (uauo *UserAddrUpdateOne) ClearUpdatedBy() *UserAddrUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserAddrUpdateOne) ClearZipCode

func (uauo *UserAddrUpdateOne) ClearZipCode() *UserAddrUpdateOne

ClearZipCode clears the value of the "zip_code" field.

func (*UserAddrUpdateOne) Exec

func (uauo *UserAddrUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserAddrUpdateOne) ExecContext

func (c *UserAddrUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserAddrUpdateOne) ExecX

func (uauo *UserAddrUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrUpdateOne) Mutation

func (uauo *UserAddrUpdateOne) Mutation() *UserAddrMutation

Mutation returns the UserAddrMutation object of the builder.

func (*UserAddrUpdateOne) QueryContext

func (c *UserAddrUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserAddrUpdateOne) Save

func (uauo *UserAddrUpdateOne) Save(ctx context.Context) (*UserAddr, error)

Save executes the query and returns the updated UserAddr entity.

func (*UserAddrUpdateOne) SaveX

func (uauo *UserAddrUpdateOne) SaveX(ctx context.Context) *UserAddr

SaveX is like Save, but panics if an error occurs.

func (*UserAddrUpdateOne) Select

func (uauo *UserAddrUpdateOne) Select(field string, fields ...string) *UserAddrUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserAddrUpdateOne) SetAddr

func (uauo *UserAddrUpdateOne) SetAddr(s string) *UserAddrUpdateOne

SetAddr sets the "addr" field.

func (*UserAddrUpdateOne) SetAddrType

func (uauo *UserAddrUpdateOne) SetAddrType(ut useraddr.AddrType) *UserAddrUpdateOne

SetAddrType sets the "addr_type" field.

func (*UserAddrUpdateOne) SetEmail

func (uauo *UserAddrUpdateOne) SetEmail(s string) *UserAddrUpdateOne

SetEmail sets the "email" field.

func (*UserAddrUpdateOne) SetFax

func (uauo *UserAddrUpdateOne) SetFax(s string) *UserAddrUpdateOne

SetFax sets the "fax" field.

func (*UserAddrUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserAddrInput on the UserAddrUpdateOne builder.

func (*UserAddrUpdateOne) SetIsDefault

func (uauo *UserAddrUpdateOne) SetIsDefault(b bool) *UserAddrUpdateOne

SetIsDefault sets the "is_default" field.

func (*UserAddrUpdateOne) SetMobile

func (uauo *UserAddrUpdateOne) SetMobile(s string) *UserAddrUpdateOne

SetMobile sets the "mobile" field.

func (*UserAddrUpdateOne) SetName

func (uauo *UserAddrUpdateOne) SetName(s string) *UserAddrUpdateOne

SetName sets the "name" field.

func (*UserAddrUpdateOne) SetNillableAddr

func (uauo *UserAddrUpdateOne) SetNillableAddr(s *string) *UserAddrUpdateOne

SetNillableAddr sets the "addr" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableAddrType

func (uauo *UserAddrUpdateOne) SetNillableAddrType(ut *useraddr.AddrType) *UserAddrUpdateOne

SetNillableAddrType sets the "addr_type" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableEmail

func (uauo *UserAddrUpdateOne) SetNillableEmail(s *string) *UserAddrUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableFax

func (uauo *UserAddrUpdateOne) SetNillableFax(s *string) *UserAddrUpdateOne

SetNillableFax sets the "fax" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableIsDefault

func (uauo *UserAddrUpdateOne) SetNillableIsDefault(b *bool) *UserAddrUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableMobile

func (uauo *UserAddrUpdateOne) SetNillableMobile(s *string) *UserAddrUpdateOne

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableName

func (uauo *UserAddrUpdateOne) SetNillableName(s *string) *UserAddrUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableRegionID

func (uauo *UserAddrUpdateOne) SetNillableRegionID(i *int) *UserAddrUpdateOne

SetNillableRegionID sets the "region_id" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableTel

func (uauo *UserAddrUpdateOne) SetNillableTel(s *string) *UserAddrUpdateOne

SetNillableTel sets the "tel" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableUpdatedAt

func (uauo *UserAddrUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserAddrUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableUpdatedBy

func (uauo *UserAddrUpdateOne) SetNillableUpdatedBy(i *int) *UserAddrUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserAddrUpdateOne) SetNillableZipCode

func (uauo *UserAddrUpdateOne) SetNillableZipCode(s *string) *UserAddrUpdateOne

SetNillableZipCode sets the "zip_code" field if the given value is not nil.

func (*UserAddrUpdateOne) SetRegion

func (uauo *UserAddrUpdateOne) SetRegion(r *Region) *UserAddrUpdateOne

SetRegion sets the "region" edge to the Region entity.

func (*UserAddrUpdateOne) SetRegionID

func (uauo *UserAddrUpdateOne) SetRegionID(i int) *UserAddrUpdateOne

SetRegionID sets the "region_id" field.

func (*UserAddrUpdateOne) SetTel

func (uauo *UserAddrUpdateOne) SetTel(s string) *UserAddrUpdateOne

SetTel sets the "tel" field.

func (*UserAddrUpdateOne) SetUpdatedAt

func (uauo *UserAddrUpdateOne) SetUpdatedAt(t time.Time) *UserAddrUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserAddrUpdateOne) SetUpdatedBy

func (uauo *UserAddrUpdateOne) SetUpdatedBy(i int) *UserAddrUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*UserAddrUpdateOne) SetZipCode

func (uauo *UserAddrUpdateOne) SetZipCode(s string) *UserAddrUpdateOne

SetZipCode sets the "zip_code" field.

func (*UserAddrUpdateOne) Where

Where appends a list predicates to the UserAddrUpdate builder.

type UserAddrUpsert

type UserAddrUpsert struct {
	*sql.UpdateSet
}

UserAddrUpsert is the "OnConflict" setter.

func (*UserAddrUpsert) AddUpdatedBy

func (u *UserAddrUpsert) AddUpdatedBy(v int) *UserAddrUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*UserAddrUpsert) ClearAddr

func (u *UserAddrUpsert) ClearAddr() *UserAddrUpsert

ClearAddr clears the value of the "addr" field.

func (*UserAddrUpsert) ClearEmail

func (u *UserAddrUpsert) ClearEmail() *UserAddrUpsert

ClearEmail clears the value of the "email" field.

func (*UserAddrUpsert) ClearFax

func (u *UserAddrUpsert) ClearFax() *UserAddrUpsert

ClearFax clears the value of the "fax" field.

func (*UserAddrUpsert) ClearMobile

func (u *UserAddrUpsert) ClearMobile() *UserAddrUpsert

ClearMobile clears the value of the "mobile" field.

func (*UserAddrUpsert) ClearName

func (u *UserAddrUpsert) ClearName() *UserAddrUpsert

ClearName clears the value of the "name" field.

func (*UserAddrUpsert) ClearRegionID

func (u *UserAddrUpsert) ClearRegionID() *UserAddrUpsert

ClearRegionID clears the value of the "region_id" field.

func (*UserAddrUpsert) ClearTel

func (u *UserAddrUpsert) ClearTel() *UserAddrUpsert

ClearTel clears the value of the "tel" field.

func (*UserAddrUpsert) ClearUpdatedAt

func (u *UserAddrUpsert) ClearUpdatedAt() *UserAddrUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserAddrUpsert) ClearUpdatedBy

func (u *UserAddrUpsert) ClearUpdatedBy() *UserAddrUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserAddrUpsert) ClearZipCode

func (u *UserAddrUpsert) ClearZipCode() *UserAddrUpsert

ClearZipCode clears the value of the "zip_code" field.

func (*UserAddrUpsert) SetAddr

func (u *UserAddrUpsert) SetAddr(v string) *UserAddrUpsert

SetAddr sets the "addr" field.

func (*UserAddrUpsert) SetAddrType

func (u *UserAddrUpsert) SetAddrType(v useraddr.AddrType) *UserAddrUpsert

SetAddrType sets the "addr_type" field.

func (*UserAddrUpsert) SetEmail

func (u *UserAddrUpsert) SetEmail(v string) *UserAddrUpsert

SetEmail sets the "email" field.

func (*UserAddrUpsert) SetFax

func (u *UserAddrUpsert) SetFax(v string) *UserAddrUpsert

SetFax sets the "fax" field.

func (*UserAddrUpsert) SetIsDefault

func (u *UserAddrUpsert) SetIsDefault(v bool) *UserAddrUpsert

SetIsDefault sets the "is_default" field.

func (*UserAddrUpsert) SetMobile

func (u *UserAddrUpsert) SetMobile(v string) *UserAddrUpsert

SetMobile sets the "mobile" field.

func (*UserAddrUpsert) SetName

func (u *UserAddrUpsert) SetName(v string) *UserAddrUpsert

SetName sets the "name" field.

func (*UserAddrUpsert) SetRegionID

func (u *UserAddrUpsert) SetRegionID(v int) *UserAddrUpsert

SetRegionID sets the "region_id" field.

func (*UserAddrUpsert) SetTel

func (u *UserAddrUpsert) SetTel(v string) *UserAddrUpsert

SetTel sets the "tel" field.

func (*UserAddrUpsert) SetUpdatedAt

func (u *UserAddrUpsert) SetUpdatedAt(v time.Time) *UserAddrUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserAddrUpsert) SetUpdatedBy

func (u *UserAddrUpsert) SetUpdatedBy(v int) *UserAddrUpsert

SetUpdatedBy sets the "updated_by" field.

func (*UserAddrUpsert) SetZipCode

func (u *UserAddrUpsert) SetZipCode(v string) *UserAddrUpsert

SetZipCode sets the "zip_code" field.

func (*UserAddrUpsert) UpdateAddr

func (u *UserAddrUpsert) UpdateAddr() *UserAddrUpsert

UpdateAddr sets the "addr" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateAddrType

func (u *UserAddrUpsert) UpdateAddrType() *UserAddrUpsert

UpdateAddrType sets the "addr_type" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateEmail

func (u *UserAddrUpsert) UpdateEmail() *UserAddrUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateFax

func (u *UserAddrUpsert) UpdateFax() *UserAddrUpsert

UpdateFax sets the "fax" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateIsDefault

func (u *UserAddrUpsert) UpdateIsDefault() *UserAddrUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateMobile

func (u *UserAddrUpsert) UpdateMobile() *UserAddrUpsert

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateName

func (u *UserAddrUpsert) UpdateName() *UserAddrUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateRegionID

func (u *UserAddrUpsert) UpdateRegionID() *UserAddrUpsert

UpdateRegionID sets the "region_id" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateTel

func (u *UserAddrUpsert) UpdateTel() *UserAddrUpsert

UpdateTel sets the "tel" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateUpdatedAt

func (u *UserAddrUpsert) UpdateUpdatedAt() *UserAddrUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateUpdatedBy

func (u *UserAddrUpsert) UpdateUpdatedBy() *UserAddrUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserAddrUpsert) UpdateZipCode

func (u *UserAddrUpsert) UpdateZipCode() *UserAddrUpsert

UpdateZipCode sets the "zip_code" field to the value that was provided on create.

type UserAddrUpsertBulk

type UserAddrUpsertBulk struct {
	// contains filtered or unexported fields
}

UserAddrUpsertBulk is the builder for "upsert"-ing a bulk of UserAddr nodes.

func (*UserAddrUpsertBulk) AddUpdatedBy

func (u *UserAddrUpsertBulk) AddUpdatedBy(v int) *UserAddrUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*UserAddrUpsertBulk) ClearAddr

func (u *UserAddrUpsertBulk) ClearAddr() *UserAddrUpsertBulk

ClearAddr clears the value of the "addr" field.

func (*UserAddrUpsertBulk) ClearEmail

func (u *UserAddrUpsertBulk) ClearEmail() *UserAddrUpsertBulk

ClearEmail clears the value of the "email" field.

func (*UserAddrUpsertBulk) ClearFax

func (u *UserAddrUpsertBulk) ClearFax() *UserAddrUpsertBulk

ClearFax clears the value of the "fax" field.

func (*UserAddrUpsertBulk) ClearMobile

func (u *UserAddrUpsertBulk) ClearMobile() *UserAddrUpsertBulk

ClearMobile clears the value of the "mobile" field.

func (*UserAddrUpsertBulk) ClearName

func (u *UserAddrUpsertBulk) ClearName() *UserAddrUpsertBulk

ClearName clears the value of the "name" field.

func (*UserAddrUpsertBulk) ClearRegionID

func (u *UserAddrUpsertBulk) ClearRegionID() *UserAddrUpsertBulk

ClearRegionID clears the value of the "region_id" field.

func (*UserAddrUpsertBulk) ClearTel

func (u *UserAddrUpsertBulk) ClearTel() *UserAddrUpsertBulk

ClearTel clears the value of the "tel" field.

func (*UserAddrUpsertBulk) ClearUpdatedAt

func (u *UserAddrUpsertBulk) ClearUpdatedAt() *UserAddrUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserAddrUpsertBulk) ClearUpdatedBy

func (u *UserAddrUpsertBulk) ClearUpdatedBy() *UserAddrUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserAddrUpsertBulk) ClearZipCode

func (u *UserAddrUpsertBulk) ClearZipCode() *UserAddrUpsertBulk

ClearZipCode clears the value of the "zip_code" field.

func (*UserAddrUpsertBulk) DoNothing

func (u *UserAddrUpsertBulk) DoNothing() *UserAddrUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserAddrUpsertBulk) Exec

func (u *UserAddrUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserAddrUpsertBulk) ExecX

func (u *UserAddrUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserAddr.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserAddrUpsertBulk) SetAddr

SetAddr sets the "addr" field.

func (*UserAddrUpsertBulk) SetAddrType

SetAddrType sets the "addr_type" field.

func (*UserAddrUpsertBulk) SetEmail

SetEmail sets the "email" field.

func (*UserAddrUpsertBulk) SetFax

SetFax sets the "fax" field.

func (*UserAddrUpsertBulk) SetIsDefault

func (u *UserAddrUpsertBulk) SetIsDefault(v bool) *UserAddrUpsertBulk

SetIsDefault sets the "is_default" field.

func (*UserAddrUpsertBulk) SetMobile

func (u *UserAddrUpsertBulk) SetMobile(v string) *UserAddrUpsertBulk

SetMobile sets the "mobile" field.

func (*UserAddrUpsertBulk) SetName

SetName sets the "name" field.

func (*UserAddrUpsertBulk) SetRegionID

func (u *UserAddrUpsertBulk) SetRegionID(v int) *UserAddrUpsertBulk

SetRegionID sets the "region_id" field.

func (*UserAddrUpsertBulk) SetTel

SetTel sets the "tel" field.

func (*UserAddrUpsertBulk) SetUpdatedAt

func (u *UserAddrUpsertBulk) SetUpdatedAt(v time.Time) *UserAddrUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*UserAddrUpsertBulk) SetUpdatedBy

func (u *UserAddrUpsertBulk) SetUpdatedBy(v int) *UserAddrUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*UserAddrUpsertBulk) SetZipCode

func (u *UserAddrUpsertBulk) SetZipCode(v string) *UserAddrUpsertBulk

SetZipCode sets the "zip_code" field.

func (*UserAddrUpsertBulk) Update

func (u *UserAddrUpsertBulk) Update(set func(*UserAddrUpsert)) *UserAddrUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserAddrCreateBulk.OnConflict documentation for more info.

func (*UserAddrUpsertBulk) UpdateAddr

func (u *UserAddrUpsertBulk) UpdateAddr() *UserAddrUpsertBulk

UpdateAddr sets the "addr" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateAddrType

func (u *UserAddrUpsertBulk) UpdateAddrType() *UserAddrUpsertBulk

UpdateAddrType sets the "addr_type" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateEmail

func (u *UserAddrUpsertBulk) UpdateEmail() *UserAddrUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateFax

func (u *UserAddrUpsertBulk) UpdateFax() *UserAddrUpsertBulk

UpdateFax sets the "fax" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateIsDefault

func (u *UserAddrUpsertBulk) UpdateIsDefault() *UserAddrUpsertBulk

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateMobile

func (u *UserAddrUpsertBulk) UpdateMobile() *UserAddrUpsertBulk

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateName

func (u *UserAddrUpsertBulk) UpdateName() *UserAddrUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateNewValues

func (u *UserAddrUpsertBulk) UpdateNewValues() *UserAddrUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserAddr.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(useraddr.FieldID)
		}),
	).
	Exec(ctx)

func (*UserAddrUpsertBulk) UpdateRegionID

func (u *UserAddrUpsertBulk) UpdateRegionID() *UserAddrUpsertBulk

UpdateRegionID sets the "region_id" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateTel

func (u *UserAddrUpsertBulk) UpdateTel() *UserAddrUpsertBulk

UpdateTel sets the "tel" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateUpdatedAt

func (u *UserAddrUpsertBulk) UpdateUpdatedAt() *UserAddrUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateUpdatedBy

func (u *UserAddrUpsertBulk) UpdateUpdatedBy() *UserAddrUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserAddrUpsertBulk) UpdateZipCode

func (u *UserAddrUpsertBulk) UpdateZipCode() *UserAddrUpsertBulk

UpdateZipCode sets the "zip_code" field to the value that was provided on create.

type UserAddrUpsertOne

type UserAddrUpsertOne struct {
	// contains filtered or unexported fields
}

UserAddrUpsertOne is the builder for "upsert"-ing

one UserAddr node.

func (*UserAddrUpsertOne) AddUpdatedBy

func (u *UserAddrUpsertOne) AddUpdatedBy(v int) *UserAddrUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*UserAddrUpsertOne) ClearAddr

func (u *UserAddrUpsertOne) ClearAddr() *UserAddrUpsertOne

ClearAddr clears the value of the "addr" field.

func (*UserAddrUpsertOne) ClearEmail

func (u *UserAddrUpsertOne) ClearEmail() *UserAddrUpsertOne

ClearEmail clears the value of the "email" field.

func (*UserAddrUpsertOne) ClearFax

func (u *UserAddrUpsertOne) ClearFax() *UserAddrUpsertOne

ClearFax clears the value of the "fax" field.

func (*UserAddrUpsertOne) ClearMobile

func (u *UserAddrUpsertOne) ClearMobile() *UserAddrUpsertOne

ClearMobile clears the value of the "mobile" field.

func (*UserAddrUpsertOne) ClearName

func (u *UserAddrUpsertOne) ClearName() *UserAddrUpsertOne

ClearName clears the value of the "name" field.

func (*UserAddrUpsertOne) ClearRegionID

func (u *UserAddrUpsertOne) ClearRegionID() *UserAddrUpsertOne

ClearRegionID clears the value of the "region_id" field.

func (*UserAddrUpsertOne) ClearTel

func (u *UserAddrUpsertOne) ClearTel() *UserAddrUpsertOne

ClearTel clears the value of the "tel" field.

func (*UserAddrUpsertOne) ClearUpdatedAt

func (u *UserAddrUpsertOne) ClearUpdatedAt() *UserAddrUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserAddrUpsertOne) ClearUpdatedBy

func (u *UserAddrUpsertOne) ClearUpdatedBy() *UserAddrUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserAddrUpsertOne) ClearZipCode

func (u *UserAddrUpsertOne) ClearZipCode() *UserAddrUpsertOne

ClearZipCode clears the value of the "zip_code" field.

func (*UserAddrUpsertOne) DoNothing

func (u *UserAddrUpsertOne) DoNothing() *UserAddrUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserAddrUpsertOne) Exec

func (u *UserAddrUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserAddrUpsertOne) ExecX

func (u *UserAddrUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserAddrUpsertOne) ID

func (u *UserAddrUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserAddrUpsertOne) IDX

func (u *UserAddrUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserAddrUpsertOne) Ignore

func (u *UserAddrUpsertOne) Ignore() *UserAddrUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserAddr.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserAddrUpsertOne) SetAddr

SetAddr sets the "addr" field.

func (*UserAddrUpsertOne) SetAddrType

SetAddrType sets the "addr_type" field.

func (*UserAddrUpsertOne) SetEmail

func (u *UserAddrUpsertOne) SetEmail(v string) *UserAddrUpsertOne

SetEmail sets the "email" field.

func (*UserAddrUpsertOne) SetFax

SetFax sets the "fax" field.

func (*UserAddrUpsertOne) SetIsDefault

func (u *UserAddrUpsertOne) SetIsDefault(v bool) *UserAddrUpsertOne

SetIsDefault sets the "is_default" field.

func (*UserAddrUpsertOne) SetMobile

func (u *UserAddrUpsertOne) SetMobile(v string) *UserAddrUpsertOne

SetMobile sets the "mobile" field.

func (*UserAddrUpsertOne) SetName

SetName sets the "name" field.

func (*UserAddrUpsertOne) SetRegionID

func (u *UserAddrUpsertOne) SetRegionID(v int) *UserAddrUpsertOne

SetRegionID sets the "region_id" field.

func (*UserAddrUpsertOne) SetTel

SetTel sets the "tel" field.

func (*UserAddrUpsertOne) SetUpdatedAt

func (u *UserAddrUpsertOne) SetUpdatedAt(v time.Time) *UserAddrUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*UserAddrUpsertOne) SetUpdatedBy

func (u *UserAddrUpsertOne) SetUpdatedBy(v int) *UserAddrUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*UserAddrUpsertOne) SetZipCode

func (u *UserAddrUpsertOne) SetZipCode(v string) *UserAddrUpsertOne

SetZipCode sets the "zip_code" field.

func (*UserAddrUpsertOne) Update

func (u *UserAddrUpsertOne) Update(set func(*UserAddrUpsert)) *UserAddrUpsertOne

Update allows overriding fields `UPDATE` values. See the UserAddrCreate.OnConflict documentation for more info.

func (*UserAddrUpsertOne) UpdateAddr

func (u *UserAddrUpsertOne) UpdateAddr() *UserAddrUpsertOne

UpdateAddr sets the "addr" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateAddrType

func (u *UserAddrUpsertOne) UpdateAddrType() *UserAddrUpsertOne

UpdateAddrType sets the "addr_type" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateEmail

func (u *UserAddrUpsertOne) UpdateEmail() *UserAddrUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateFax

func (u *UserAddrUpsertOne) UpdateFax() *UserAddrUpsertOne

UpdateFax sets the "fax" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateIsDefault

func (u *UserAddrUpsertOne) UpdateIsDefault() *UserAddrUpsertOne

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateMobile

func (u *UserAddrUpsertOne) UpdateMobile() *UserAddrUpsertOne

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateName

func (u *UserAddrUpsertOne) UpdateName() *UserAddrUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateNewValues

func (u *UserAddrUpsertOne) UpdateNewValues() *UserAddrUpsertOne

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.UserAddr.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(useraddr.FieldID)
		}),
	).
	Exec(ctx)

func (*UserAddrUpsertOne) UpdateRegionID

func (u *UserAddrUpsertOne) UpdateRegionID() *UserAddrUpsertOne

UpdateRegionID sets the "region_id" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateTel

func (u *UserAddrUpsertOne) UpdateTel() *UserAddrUpsertOne

UpdateTel sets the "tel" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateUpdatedAt

func (u *UserAddrUpsertOne) UpdateUpdatedAt() *UserAddrUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateUpdatedBy

func (u *UserAddrUpsertOne) UpdateUpdatedBy() *UserAddrUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*UserAddrUpsertOne) UpdateZipCode

func (u *UserAddrUpsertOne) UpdateZipCode() *UserAddrUpsertOne

UpdateZipCode sets the "zip_code" field to the value that was provided on create.

type UserAddrWhereInput

type UserAddrWhereInput struct {
	Predicates []predicate.UserAddr  `json:"-"`
	Not        *UserAddrWhereInput   `json:"not,omitempty"`
	Or         []*UserAddrWhereInput `json:"or,omitempty"`
	And        []*UserAddrWhereInput `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"`

	// "addr_type" field predicates.
	AddrType      *useraddr.AddrType  `json:"addrType,omitempty"`
	AddrTypeNEQ   *useraddr.AddrType  `json:"addrTypeNEQ,omitempty"`
	AddrTypeIn    []useraddr.AddrType `json:"addrTypeIn,omitempty"`
	AddrTypeNotIn []useraddr.AddrType `json:"addrTypeNotIn,omitempty"`

	// "region_id" field predicates.
	RegionID       *int  `json:"regionID,omitempty"`
	RegionIDNEQ    *int  `json:"regionIDNEQ,omitempty"`
	RegionIDIn     []int `json:"regionIDIn,omitempty"`
	RegionIDNotIn  []int `json:"regionIDNotIn,omitempty"`
	RegionIDIsNil  bool  `json:"regionIDIsNil,omitempty"`
	RegionIDNotNil bool  `json:"regionIDNotNil,omitempty"`

	// "addr" field predicates.
	Addr             *string  `json:"addr,omitempty"`
	AddrNEQ          *string  `json:"addrNEQ,omitempty"`
	AddrIn           []string `json:"addrIn,omitempty"`
	AddrNotIn        []string `json:"addrNotIn,omitempty"`
	AddrGT           *string  `json:"addrGT,omitempty"`
	AddrGTE          *string  `json:"addrGTE,omitempty"`
	AddrLT           *string  `json:"addrLT,omitempty"`
	AddrLTE          *string  `json:"addrLTE,omitempty"`
	AddrContains     *string  `json:"addrContains,omitempty"`
	AddrHasPrefix    *string  `json:"addrHasPrefix,omitempty"`
	AddrHasSuffix    *string  `json:"addrHasSuffix,omitempty"`
	AddrIsNil        bool     `json:"addrIsNil,omitempty"`
	AddrNotNil       bool     `json:"addrNotNil,omitempty"`
	AddrEqualFold    *string  `json:"addrEqualFold,omitempty"`
	AddrContainsFold *string  `json:"addrContainsFold,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"`

	// "fax" field predicates.
	Fax             *string  `json:"fax,omitempty"`
	FaxNEQ          *string  `json:"faxNEQ,omitempty"`
	FaxIn           []string `json:"faxIn,omitempty"`
	FaxNotIn        []string `json:"faxNotIn,omitempty"`
	FaxGT           *string  `json:"faxGT,omitempty"`
	FaxGTE          *string  `json:"faxGTE,omitempty"`
	FaxLT           *string  `json:"faxLT,omitempty"`
	FaxLTE          *string  `json:"faxLTE,omitempty"`
	FaxContains     *string  `json:"faxContains,omitempty"`
	FaxHasPrefix    *string  `json:"faxHasPrefix,omitempty"`
	FaxHasSuffix    *string  `json:"faxHasSuffix,omitempty"`
	FaxIsNil        bool     `json:"faxIsNil,omitempty"`
	FaxNotNil       bool     `json:"faxNotNil,omitempty"`
	FaxEqualFold    *string  `json:"faxEqualFold,omitempty"`
	FaxContainsFold *string  `json:"faxContainsFold,omitempty"`

	// "zip_code" field predicates.
	ZipCode             *string  `json:"zipCode,omitempty"`
	ZipCodeNEQ          *string  `json:"zipCodeNEQ,omitempty"`
	ZipCodeIn           []string `json:"zipCodeIn,omitempty"`
	ZipCodeNotIn        []string `json:"zipCodeNotIn,omitempty"`
	ZipCodeGT           *string  `json:"zipCodeGT,omitempty"`
	ZipCodeGTE          *string  `json:"zipCodeGTE,omitempty"`
	ZipCodeLT           *string  `json:"zipCodeLT,omitempty"`
	ZipCodeLTE          *string  `json:"zipCodeLTE,omitempty"`
	ZipCodeContains     *string  `json:"zipCodeContains,omitempty"`
	ZipCodeHasPrefix    *string  `json:"zipCodeHasPrefix,omitempty"`
	ZipCodeHasSuffix    *string  `json:"zipCodeHasSuffix,omitempty"`
	ZipCodeIsNil        bool     `json:"zipCodeIsNil,omitempty"`
	ZipCodeNotNil       bool     `json:"zipCodeNotNil,omitempty"`
	ZipCodeEqualFold    *string  `json:"zipCodeEqualFold,omitempty"`
	ZipCodeContainsFold *string  `json:"zipCodeContainsFold,omitempty"`

	// "tel" field predicates.
	Tel             *string  `json:"tel,omitempty"`
	TelNEQ          *string  `json:"telNEQ,omitempty"`
	TelIn           []string `json:"telIn,omitempty"`
	TelNotIn        []string `json:"telNotIn,omitempty"`
	TelGT           *string  `json:"telGT,omitempty"`
	TelGTE          *string  `json:"telGTE,omitempty"`
	TelLT           *string  `json:"telLT,omitempty"`
	TelLTE          *string  `json:"telLTE,omitempty"`
	TelContains     *string  `json:"telContains,omitempty"`
	TelHasPrefix    *string  `json:"telHasPrefix,omitempty"`
	TelHasSuffix    *string  `json:"telHasSuffix,omitempty"`
	TelIsNil        bool     `json:"telIsNil,omitempty"`
	TelNotNil       bool     `json:"telNotNil,omitempty"`
	TelEqualFold    *string  `json:"telEqualFold,omitempty"`
	TelContainsFold *string  `json:"telContainsFold,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"`

	// "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"`
	NameIsNil        bool     `json:"nameIsNil,omitempty"`
	NameNotNil       bool     `json:"nameNotNil,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "is_default" field predicates.
	IsDefault    *bool `json:"isDefault,omitempty"`
	IsDefaultNEQ *bool `json:"isDefaultNEQ,omitempty"`

	// "user" edge predicates.
	HasUser     *bool             `json:"hasUser,omitempty"`
	HasUserWith []*UserWhereInput `json:"hasUserWith,omitempty"`

	// "region" edge predicates.
	HasRegion     *bool               `json:"hasRegion,omitempty"`
	HasRegionWith []*RegionWhereInput `json:"hasRegionWith,omitempty"`
}

UserAddrWhereInput represents a where input for filtering UserAddr queries.

func (*UserAddrWhereInput) AddPredicates

func (i *UserAddrWhereInput) AddPredicates(predicates ...predicate.UserAddr)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserAddrWhereInput) Filter

Filter applies the UserAddrWhereInput filter on the UserAddrQuery builder.

func (*UserAddrWhereInput) P

P returns a predicate for filtering useraddrs. An error is returned if the input is empty or invalid.

type UserAddrs

type UserAddrs []*UserAddr

UserAddrs is a parsable slice of UserAddr.

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) ExecContext

func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryAddresses

func (c *UserClient) QueryAddresses(u *User) *UserAddrQuery

QueryAddresses queries the addresses edge of a User.

func (*UserClient) QueryCitizenship

func (c *UserClient) QueryCitizenship(u *User) *CountryQuery

QueryCitizenship queries the citizenship edge of a User.

func (*UserClient) QueryContext

func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) QueryUserQuota

func (c *UserClient) QueryUserQuota(u *User) *QuotaQuery

QueryUserQuota queries the user_quota 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) AddAddressIDs

func (uc *UserCreate) AddAddressIDs(ids ...int) *UserCreate

AddAddressIDs adds the "addresses" edge to the UserAddr entity by IDs.

func (*UserCreate) AddAddresses

func (uc *UserCreate) AddAddresses(u ...*UserAddr) *UserCreate

AddAddresses adds the "addresses" edges to the UserAddr 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) AddUserQuota

func (uc *UserCreate) AddUserQuota(q ...*Quota) *UserCreate

AddUserQuota adds the "user_quota" edges to the Quota entity.

func (*UserCreate) AddUserQuotumIDs

func (uc *UserCreate) AddUserQuotumIDs(ids ...int) *UserCreate

AddUserQuotumIDs adds the "user_quota" edge to the Quota entity by IDs.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecContext

func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetAvatar

func (uc *UserCreate) SetAvatar(s string) *UserCreate

SetAvatar sets the "avatar" field.

func (*UserCreate) SetCitizenship

func (uc *UserCreate) SetCitizenship(c *Country) *UserCreate

SetCitizenship sets the "citizenship" edge to the Country entity.

func (*UserCreate) SetCitizenshipID

func (uc *UserCreate) SetCitizenshipID(i int) *UserCreate

SetCitizenshipID sets the "citizenship_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) SetFirstName

func (uc *UserCreate) SetFirstName(s string) *UserCreate

SetFirstName sets the "first_name" field.

func (*UserCreate) SetGender

func (uc *UserCreate) SetGender(u user.Gender) *UserCreate

SetGender sets the "gender" 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) SetLang

func (uc *UserCreate) SetLang(s string) *UserCreate

SetLang sets the "lang" field.

func (*UserCreate) SetLastName

func (uc *UserCreate) SetLastName(s string) *UserCreate

SetLastName sets the "last_name" field.

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) SetMiddleName

func (uc *UserCreate) SetMiddleName(s string) *UserCreate

SetMiddleName sets the "middle_name" field.

func (*UserCreate) SetNillableAvatar

func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate

SetNillableAvatar sets the "avatar" field if the given value is not nil.

func (*UserCreate) SetNillableCitizenshipID

func (uc *UserCreate) SetNillableCitizenshipID(i *int) *UserCreate

SetNillableCitizenshipID sets the "citizenship_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) SetNillableFirstName

func (uc *UserCreate) SetNillableFirstName(s *string) *UserCreate

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserCreate) SetNillableGender

func (uc *UserCreate) SetNillableGender(u *user.Gender) *UserCreate

SetNillableGender sets the "gender" field if the given value is not nil.

func (*UserCreate) SetNillableLang

func (uc *UserCreate) SetNillableLang(s *string) *UserCreate

SetNillableLang sets the "lang" field if the given value is not nil.

func (*UserCreate) SetNillableLastName

func (uc *UserCreate) SetNillableLastName(s *string) *UserCreate

SetNillableLastName sets the "last_name" 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) SetNillableMiddleName

func (uc *UserCreate) SetNillableMiddleName(s *string) *UserCreate

SetNillableMiddleName sets the "middle_name" field if the given value is not nil.

func (*UserCreate) SetNillableStatus

func (uc *UserCreate) SetNillableStatus(ts *types.UserStatus) *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 types.UserStatus) *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) ExecContext

func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) QueryContext

func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 string `json:"device_name,omitempty"`
	// 系统名称
	SystemName string `json:"system_name,omitempty"`
	// 系统版本
	SystemVersion string `json:"system_version,omitempty"`
	// app版本
	AppVersion string `json:"app_version,omitempty"`
	// 设备型号
	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) ExecContext

func (c *UserDevice) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDevice) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserDeviceClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDeviceClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserDeviceCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDeviceCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetInput

SetInput applies the change-set in the CreateUserDeviceInput on the UserDeviceCreate builder.

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) ExecContext

func (c *UserDeviceCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDeviceCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserDeviceDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserDeviceDelete) ExecX

func (udd *UserDeviceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDeviceDelete) QueryContext

func (c *UserDeviceDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserDeviceMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDeviceMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserDeviceQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDeviceQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c UserDeviceSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c UserDeviceSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserDeviceUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDeviceUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetInput

SetInput applies the change-set in the UpdateUserDeviceInput on the UserDeviceUpdate builder.

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) SetNillableDeviceUID

func (udu *UserDeviceUpdate) SetNillableDeviceUID(s *string) *UserDeviceUpdate

SetNillableDeviceUID sets the "device_uid" 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) ExecContext

func (c *UserDeviceUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserDeviceUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetInput

SetInput applies the change-set in the UpdateUserDeviceInput on the UserDeviceUpdateOne builder.

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) SetNillableDeviceUID

func (uduo *UserDeviceUpdateOne) SetNillableDeviceUID(s *string) *UserDeviceUpdateOne

SetNillableDeviceUID sets the "device_uid" 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"`
	// 用户联系信息
	Addresses []*UserAddr `json:"addresses,omitempty"`
	// 国籍信息
	Citizenship *Country `json:"citizenship,omitempty"`
	// 用户配额
	UserQuota []*Quota `json:"user_quota,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) AddressesOrErr

func (e UserEdges) AddressesOrErr() ([]*UserAddr, error)

AddressesOrErr returns the Addresses value or an error if the edge was not loaded in eager-loading.

func (UserEdges) CitizenshipOrErr

func (e UserEdges) CitizenshipOrErr() (*Country, error)

CitizenshipOrErr returns the Citizenship value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

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.

func (UserEdges) UserQuotaOrErr

func (e UserEdges) UserQuotaOrErr() ([]*Quota, error)

UserQuotaOrErr returns the UserQuota 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) ExecContext

func (c *UserIdentity) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentity) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserIdentityClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentityClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserIdentityCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentityCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserIdentityCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentityCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserIdentityDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserIdentityDelete) ExecX

func (uid *UserIdentityDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserIdentityDelete) QueryContext

func (c *UserIdentityDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserIdentityMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentityMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserIdentityQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentityQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c UserIdentitySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c UserIdentitySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserIdentityUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentityUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableKind

func (uiu *UserIdentityUpdate) SetNillableKind(u *useridentity.Kind) *UserIdentityUpdate

SetNillableKind sets the "kind" 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) ExecContext

func (c *UserIdentityUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserIdentityUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableKind

func (uiuo *UserIdentityUpdateOne) SetNillableKind(u *useridentity.Kind) *UserIdentityUpdateOne

SetNillableKind sets the "kind" 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) ExecContext

func (c *UserLoginProfile) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfile) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserLoginProfileClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfileClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserLoginProfileCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfileCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableVerifyDevice

func (ulpc *UserLoginProfileCreate) SetNillableVerifyDevice(b *bool) *UserLoginProfileCreate

SetNillableVerifyDevice sets the "verify_device" 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) ExecContext

func (c *UserLoginProfileCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfileCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserLoginProfileDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserLoginProfileDelete) ExecX

func (ulpd *UserLoginProfileDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserLoginProfileDelete) QueryContext

func (c *UserLoginProfileDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserLoginProfileMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfileMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserLoginProfileQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfileQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c UserLoginProfileSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c UserLoginProfileSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserLoginProfileUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfileUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableSetKind

SetNillableSetKind sets the "set_kind" 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) SetNillableVerifyDevice

func (ulpu *UserLoginProfileUpdate) SetNillableVerifyDevice(b *bool) *UserLoginProfileUpdate

SetNillableVerifyDevice sets the "verify_device" 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) ExecContext

func (c *UserLoginProfileUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserLoginProfileUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableSetKind

SetNillableSetKind sets the "set_kind" 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) SetNillableVerifyDevice

func (ulpuo *UserLoginProfileUpdateOne) SetNillableVerifyDevice(b *bool) *UserLoginProfileUpdateOne

SetNillableVerifyDevice sets the "verify_device" 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) AddAddressIDs

func (m *UserMutation) AddAddressIDs(ids ...int)

AddAddressIDs adds the "addresses" edge to the UserAddr entity by ids.

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) AddUserQuotumIDs

func (m *UserMutation) AddUserQuotumIDs(ids ...int)

AddUserQuotumIDs adds the "user_quota" edge to the Quota entity by ids.

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) AddressesCleared

func (m *UserMutation) AddressesCleared() bool

AddressesCleared reports if the "addresses" edge to the UserAddr entity was cleared.

func (*UserMutation) AddressesIDs

func (m *UserMutation) AddressesIDs() (ids []int)

AddressesIDs returns the "addresses" edge IDs in the mutation.

func (*UserMutation) Avatar

func (m *UserMutation) Avatar() (r string, exists bool)

Avatar returns the value of the "avatar" field in the mutation.

func (*UserMutation) AvatarCleared

func (m *UserMutation) AvatarCleared() bool

AvatarCleared returns if the "avatar" field was cleared in this mutation.

func (*UserMutation) CitizenshipCleared

func (m *UserMutation) CitizenshipCleared() bool

CitizenshipCleared reports if the "citizenship" edge to the Country entity was cleared.

func (*UserMutation) CitizenshipID

func (m *UserMutation) CitizenshipID() (r int, exists bool)

CitizenshipID returns the value of the "citizenship_id" field in the mutation.

func (*UserMutation) CitizenshipIDCleared

func (m *UserMutation) CitizenshipIDCleared() bool

CitizenshipIDCleared returns if the "citizenship_id" field was cleared in this mutation.

func (*UserMutation) CitizenshipIDs

func (m *UserMutation) CitizenshipIDs() (ids []int)

CitizenshipIDs returns the "citizenship" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CitizenshipID instead. It exists only for internal usage by the builders.

func (*UserMutation) ClearAddresses

func (m *UserMutation) ClearAddresses()

ClearAddresses clears the "addresses" edge to the UserAddr entity.

func (*UserMutation) ClearAvatar

func (m *UserMutation) ClearAvatar()

ClearAvatar clears the value of the "avatar" field.

func (*UserMutation) ClearCitizenship

func (m *UserMutation) ClearCitizenship()

ClearCitizenship clears the "citizenship" edge to the Country entity.

func (*UserMutation) ClearCitizenshipID

func (m *UserMutation) ClearCitizenshipID()

ClearCitizenshipID clears the value of the "citizenship_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) 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) ClearFirstName

func (m *UserMutation) ClearFirstName()

ClearFirstName clears the value of the "first_name" field.

func (*UserMutation) ClearIdentities

func (m *UserMutation) ClearIdentities()

ClearIdentities clears the "identities" edge to the UserIdentity entity.

func (*UserMutation) ClearLang

func (m *UserMutation) ClearLang()

ClearLang clears the value of the "lang" field.

func (*UserMutation) ClearLastName

func (m *UserMutation) ClearLastName()

ClearLastName clears the value of the "last_name" field.

func (*UserMutation) ClearLoginProfile

func (m *UserMutation) ClearLoginProfile()

ClearLoginProfile clears the "login_profile" edge to the UserLoginProfile entity.

func (*UserMutation) ClearMiddleName

func (m *UserMutation) ClearMiddleName()

ClearMiddleName clears the value of the "middle_name" 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) ClearUserQuota

func (m *UserMutation) ClearUserQuota()

ClearUserQuota clears the "user_quota" edge to the Quota entity.

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) ExecContext

func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) FirstName

func (m *UserMutation) FirstName() (r string, exists bool)

FirstName returns the value of the "first_name" field in the mutation.

func (*UserMutation) FirstNameCleared

func (m *UserMutation) FirstNameCleared() bool

FirstNameCleared returns if the "first_name" field was cleared in this mutation.

func (*UserMutation) Gender

func (m *UserMutation) Gender() (r user.Gender, exists bool)

Gender returns the value of the "gender" field in the mutation.

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) Lang

func (m *UserMutation) Lang() (r string, exists bool)

Lang returns the value of the "lang" field in the mutation.

func (*UserMutation) LangCleared

func (m *UserMutation) LangCleared() bool

LangCleared returns if the "lang" field was cleared in this mutation.

func (*UserMutation) LastName

func (m *UserMutation) LastName() (r string, exists bool)

LastName returns the value of the "last_name" field in the mutation.

func (*UserMutation) LastNameCleared

func (m *UserMutation) LastNameCleared() bool

LastNameCleared returns if the "last_name" field was cleared in this 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) MiddleName

func (m *UserMutation) MiddleName() (r string, exists bool)

MiddleName returns the value of the "middle_name" field in the mutation.

func (*UserMutation) MiddleNameCleared

func (m *UserMutation) MiddleNameCleared() bool

MiddleNameCleared returns if the "middle_name" 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) OldAvatar

func (m *UserMutation) OldAvatar(ctx context.Context) (v string, err error)

OldAvatar returns the old "avatar" 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) OldCitizenshipID

func (m *UserMutation) OldCitizenshipID(ctx context.Context) (v *int, err error)

OldCitizenshipID returns the old "citizenship_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) 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) OldFirstName

func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)

OldFirstName returns the old "first_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) OldGender

func (m *UserMutation) OldGender(ctx context.Context) (v user.Gender, err error)

OldGender returns the old "gender" 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) OldLang

func (m *UserMutation) OldLang(ctx context.Context) (v string, err error)

OldLang returns the old "lang" 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) OldLastName

func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)

OldLastName returns the old "last_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) OldMiddleName

func (m *UserMutation) OldMiddleName(ctx context.Context) (v string, err error)

OldMiddleName returns the old "middle_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) 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 types.UserStatus, 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) QueryContext

func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) RemoveAddressIDs

func (m *UserMutation) RemoveAddressIDs(ids ...int)

RemoveAddressIDs removes the "addresses" edge to the UserAddr entity by IDs.

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) RemoveUserQuotumIDs

func (m *UserMutation) RemoveUserQuotumIDs(ids ...int)

RemoveUserQuotumIDs removes the "user_quota" edge to the Quota entity by IDs.

func (*UserMutation) RemovedAddressesIDs

func (m *UserMutation) RemovedAddressesIDs() (ids []int)

RemovedAddresses returns the removed IDs of the "addresses" edge to the UserAddr entity.

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) RemovedUserQuotaIDs

func (m *UserMutation) RemovedUserQuotaIDs() (ids []int)

RemovedUserQuota returns the removed IDs of the "user_quota" edge to the Quota entity.

func (*UserMutation) ResetAddresses

func (m *UserMutation) ResetAddresses()

ResetAddresses resets all changes to the "addresses" edge.

func (*UserMutation) ResetAvatar

func (m *UserMutation) ResetAvatar()

ResetAvatar resets all changes to the "avatar" field.

func (*UserMutation) ResetCitizenship

func (m *UserMutation) ResetCitizenship()

ResetCitizenship resets all changes to the "citizenship" edge.

func (*UserMutation) ResetCitizenshipID

func (m *UserMutation) ResetCitizenshipID()

ResetCitizenshipID resets all changes to the "citizenship_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) 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) ResetFirstName

func (m *UserMutation) ResetFirstName()

ResetFirstName resets all changes to the "first_name" field.

func (*UserMutation) ResetGender

func (m *UserMutation) ResetGender()

ResetGender resets all changes to the "gender" field.

func (*UserMutation) ResetIdentities

func (m *UserMutation) ResetIdentities()

ResetIdentities resets all changes to the "identities" edge.

func (*UserMutation) ResetLang

func (m *UserMutation) ResetLang()

ResetLang resets all changes to the "lang" field.

func (*UserMutation) ResetLastName

func (m *UserMutation) ResetLastName()

ResetLastName resets all changes to the "last_name" field.

func (*UserMutation) ResetLoginProfile

func (m *UserMutation) ResetLoginProfile()

ResetLoginProfile resets all changes to the "login_profile" edge.

func (*UserMutation) ResetMiddleName

func (m *UserMutation) ResetMiddleName()

ResetMiddleName resets all changes to the "middle_name" 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) ResetUserQuota

func (m *UserMutation) ResetUserQuota()

ResetUserQuota resets all changes to the "user_quota" edge.

func (*UserMutation) ResetUserType

func (m *UserMutation) ResetUserType()

ResetUserType resets all changes to the "user_type" field.

func (*UserMutation) SetAvatar

func (m *UserMutation) SetAvatar(s string)

SetAvatar sets the "avatar" field.

func (*UserMutation) SetCitizenshipID

func (m *UserMutation) SetCitizenshipID(i int)

SetCitizenshipID sets the "citizenship_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) 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) SetFirstName

func (m *UserMutation) SetFirstName(s string)

SetFirstName sets the "first_name" field.

func (*UserMutation) SetGender

func (m *UserMutation) SetGender(u user.Gender)

SetGender sets the "gender" field.

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) SetLang

func (m *UserMutation) SetLang(s string)

SetLang sets the "lang" field.

func (*UserMutation) SetLastName

func (m *UserMutation) SetLastName(s string)

SetLastName sets the "last_name" field.

func (*UserMutation) SetLoginProfileID

func (m *UserMutation) SetLoginProfileID(id int)

SetLoginProfileID sets the "login_profile" edge to the UserLoginProfile entity by id.

func (*UserMutation) SetMiddleName

func (m *UserMutation) SetMiddleName(s string)

SetMiddleName sets the "middle_name" 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 types.UserStatus)

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 types.UserStatus, 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) UserQuotaCleared

func (m *UserMutation) UserQuotaCleared() bool

UserQuotaCleared reports if the "user_quota" edge to the Quota entity was cleared.

func (*UserMutation) UserQuotaIDs

func (m *UserMutation) UserQuotaIDs() (ids []int)

UserQuotaIDs returns the "user_quota" edge IDs in the 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) ExecContext

func (c *UserPassword) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPassword) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserPasswordClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPasswordClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserPasswordCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPasswordCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserPasswordCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPasswordCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserPasswordDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordDelete) ExecX

func (upd *UserPasswordDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordDelete) QueryContext

func (c *UserPasswordDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserPasswordMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPasswordMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 UserPasswordPolicies

type UserPasswordPolicies []*UserPasswordPolicy

UserPasswordPolicies is a parsable slice of UserPasswordPolicy.

type UserPasswordPolicy

type UserPasswordPolicy 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
	TenantID int `json:"tenant_id,omitempty"`
	// 密码最短长度,长度应在6-32位之间
	Length int32 `json:"length,omitempty"`
	// 必须包含的元素,异或:1-小写字母,2-大写字母,4-数字,8-符号
	IncludeElement int32 `json:"include_element,omitempty"`
	// 最少包含的不同字符数,最多8个,0代表不限制
	IncludeChar int32 `json:"include_char,omitempty"`
	// 是否允许包含用户名
	AllowIncludeUserName bool `json:"allow_include_user_name,omitempty"`
	// 有效天数,最大1095天,0代表不过期
	InvalidDay int32 `json:"invalid_day,omitempty"`
	// 过期后是否限制登录
	InvalidLoginLimit bool `json:"invalid_login_limit,omitempty"`
	// 一小时内密码错误最多尝试次数,最大32次,0代表不限次数
	Retry int32 `json:"retry,omitempty"`
	// 密码错误多少次出现验证码,最大5次,0代表不出现验证码
	CaptchaTimes int32 `json:"captcha_times,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserPasswordPolicyQuery when eager-loading is set.
	Edges UserPasswordPolicyEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserPasswordPolicy is the model entity for the UserPasswordPolicy schema.

func (*UserPasswordPolicy) ExecContext

func (c *UserPasswordPolicy) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicy) GlobalID

func (upp *UserPasswordPolicy) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given UserPasswordPolicy node.

func (*UserPasswordPolicy) IsNode

func (*UserPasswordPolicy) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*UserPasswordPolicy) Org

func (upp *UserPasswordPolicy) Org(ctx context.Context) (*Org, error)

func (*UserPasswordPolicy) QueryContext

func (c *UserPasswordPolicy) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicy) QueryOrg

func (upp *UserPasswordPolicy) QueryOrg() *OrgQuery

QueryOrg queries the "org" edge of the UserPasswordPolicy entity.

func (*UserPasswordPolicy) String

func (upp *UserPasswordPolicy) String() string

String implements the fmt.Stringer.

func (*UserPasswordPolicy) ToEdge

ToEdge converts UserPasswordPolicy into UserPasswordPolicyEdge.

func (*UserPasswordPolicy) Unwrap

func (upp *UserPasswordPolicy) Unwrap() *UserPasswordPolicy

Unwrap unwraps the UserPasswordPolicy 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 (*UserPasswordPolicy) Update

Update returns a builder for updating this UserPasswordPolicy. Note that you need to call UserPasswordPolicy.Unwrap() before calling this method if this UserPasswordPolicy was returned from a transaction, and the transaction was committed or rolled back.

func (*UserPasswordPolicy) Value

func (upp *UserPasswordPolicy) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserPasswordPolicy. This includes values selected through modifiers, order, etc.

type UserPasswordPolicyClient

type UserPasswordPolicyClient struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyClient is a client for the UserPasswordPolicy schema.

func NewUserPasswordPolicyClient

func NewUserPasswordPolicyClient(c config) *UserPasswordPolicyClient

NewUserPasswordPolicyClient returns a client for the UserPasswordPolicy from the given config.

func (*UserPasswordPolicyClient) Create

Create returns a builder for creating a UserPasswordPolicy entity.

func (*UserPasswordPolicyClient) CreateBulk

CreateBulk returns a builder for creating a bulk of UserPasswordPolicy entities.

func (*UserPasswordPolicyClient) Delete

Delete returns a delete builder for UserPasswordPolicy.

func (*UserPasswordPolicyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserPasswordPolicyClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserPasswordPolicyClient) ExecContext

func (c *UserPasswordPolicyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyClient) Get

Get returns a UserPasswordPolicy entity by its id.

func (*UserPasswordPolicyClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserPasswordPolicyClient) Hooks

func (c *UserPasswordPolicyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserPasswordPolicyClient) Intercept

func (c *UserPasswordPolicyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userpasswordpolicy.Intercept(f(g(h())))`.

func (*UserPasswordPolicyClient) Interceptors

func (c *UserPasswordPolicyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserPasswordPolicyClient) MapCreateBulk

func (c *UserPasswordPolicyClient) MapCreateBulk(slice any, setFunc func(*UserPasswordPolicyCreate, int)) *UserPasswordPolicyCreateBulk

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 (*UserPasswordPolicyClient) Query

Query returns a query builder for UserPasswordPolicy.

func (*UserPasswordPolicyClient) QueryContext

func (c *UserPasswordPolicyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyClient) QueryOrg

QueryOrg queries the org edge of a UserPasswordPolicy.

func (*UserPasswordPolicyClient) Update

Update returns an update builder for UserPasswordPolicy.

func (*UserPasswordPolicyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserPasswordPolicyClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*UserPasswordPolicyClient) Use

func (c *UserPasswordPolicyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userpasswordpolicy.Hooks(f(g(h())))`.

type UserPasswordPolicyConnection

type UserPasswordPolicyConnection struct {
	Edges      []*UserPasswordPolicyEdge `json:"edges"`
	PageInfo   PageInfo                  `json:"pageInfo"`
	TotalCount int                       `json:"totalCount"`
}

UserPasswordPolicyConnection is the connection containing edges to UserPasswordPolicy.

type UserPasswordPolicyCreate

type UserPasswordPolicyCreate struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyCreate is the builder for creating a UserPasswordPolicy entity.

func (*UserPasswordPolicyCreate) Exec

Exec executes the query.

func (*UserPasswordPolicyCreate) ExecContext

func (c *UserPasswordPolicyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyCreate) ExecX

func (uppc *UserPasswordPolicyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyCreate) Mutation

Mutation returns the UserPasswordPolicyMutation object of the builder.

func (*UserPasswordPolicyCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserPasswordPolicy.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.UserPasswordPolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserPasswordPolicyCreate) OnConflictColumns

func (uppc *UserPasswordPolicyCreate) OnConflictColumns(columns ...string) *UserPasswordPolicyUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserPasswordPolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserPasswordPolicyCreate) QueryContext

func (c *UserPasswordPolicyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyCreate) Save

Save creates the UserPasswordPolicy in the database.

func (*UserPasswordPolicyCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserPasswordPolicyCreate) SetAllowIncludeUserName

func (uppc *UserPasswordPolicyCreate) SetAllowIncludeUserName(b bool) *UserPasswordPolicyCreate

SetAllowIncludeUserName sets the "allow_include_user_name" field.

func (*UserPasswordPolicyCreate) SetCaptchaTimes

func (uppc *UserPasswordPolicyCreate) SetCaptchaTimes(i int32) *UserPasswordPolicyCreate

SetCaptchaTimes sets the "captcha_times" field.

func (*UserPasswordPolicyCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*UserPasswordPolicyCreate) SetCreatedBy

func (uppc *UserPasswordPolicyCreate) SetCreatedBy(i int) *UserPasswordPolicyCreate

SetCreatedBy sets the "created_by" field.

func (*UserPasswordPolicyCreate) SetID

SetID sets the "id" field.

func (*UserPasswordPolicyCreate) SetIncludeChar

func (uppc *UserPasswordPolicyCreate) SetIncludeChar(i int32) *UserPasswordPolicyCreate

SetIncludeChar sets the "include_char" field.

func (*UserPasswordPolicyCreate) SetIncludeElement

func (uppc *UserPasswordPolicyCreate) SetIncludeElement(i int32) *UserPasswordPolicyCreate

SetIncludeElement sets the "include_element" field.

func (*UserPasswordPolicyCreate) SetInput

SetInput applies the change-set in the CreateUserPasswordPolicyInput on the UserPasswordPolicyCreate builder.

func (*UserPasswordPolicyCreate) SetInvalidDay

SetInvalidDay sets the "invalid_day" field.

func (*UserPasswordPolicyCreate) SetInvalidLoginLimit

func (uppc *UserPasswordPolicyCreate) SetInvalidLoginLimit(b bool) *UserPasswordPolicyCreate

SetInvalidLoginLimit sets the "invalid_login_limit" field.

func (*UserPasswordPolicyCreate) SetLength

SetLength sets the "length" field.

func (*UserPasswordPolicyCreate) SetNillableAllowIncludeUserName

func (uppc *UserPasswordPolicyCreate) SetNillableAllowIncludeUserName(b *bool) *UserPasswordPolicyCreate

SetNillableAllowIncludeUserName sets the "allow_include_user_name" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableCaptchaTimes

func (uppc *UserPasswordPolicyCreate) SetNillableCaptchaTimes(i *int32) *UserPasswordPolicyCreate

SetNillableCaptchaTimes sets the "captcha_times" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableCreatedAt

func (uppc *UserPasswordPolicyCreate) SetNillableCreatedAt(t *time.Time) *UserPasswordPolicyCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableIncludeChar

func (uppc *UserPasswordPolicyCreate) SetNillableIncludeChar(i *int32) *UserPasswordPolicyCreate

SetNillableIncludeChar sets the "include_char" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableIncludeElement

func (uppc *UserPasswordPolicyCreate) SetNillableIncludeElement(i *int32) *UserPasswordPolicyCreate

SetNillableIncludeElement sets the "include_element" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableInvalidDay

func (uppc *UserPasswordPolicyCreate) SetNillableInvalidDay(i *int32) *UserPasswordPolicyCreate

SetNillableInvalidDay sets the "invalid_day" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableInvalidLoginLimit

func (uppc *UserPasswordPolicyCreate) SetNillableInvalidLoginLimit(b *bool) *UserPasswordPolicyCreate

SetNillableInvalidLoginLimit sets the "invalid_login_limit" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableLength

func (uppc *UserPasswordPolicyCreate) SetNillableLength(i *int32) *UserPasswordPolicyCreate

SetNillableLength sets the "length" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableOrgID

func (uppc *UserPasswordPolicyCreate) SetNillableOrgID(id *int) *UserPasswordPolicyCreate

SetNillableOrgID sets the "org" edge to the Org entity by ID if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableRetry

func (uppc *UserPasswordPolicyCreate) SetNillableRetry(i *int32) *UserPasswordPolicyCreate

SetNillableRetry sets the "retry" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableTenantID

func (uppc *UserPasswordPolicyCreate) SetNillableTenantID(i *int) *UserPasswordPolicyCreate

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableUpdatedAt

func (uppc *UserPasswordPolicyCreate) SetNillableUpdatedAt(t *time.Time) *UserPasswordPolicyCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetNillableUpdatedBy

func (uppc *UserPasswordPolicyCreate) SetNillableUpdatedBy(i *int) *UserPasswordPolicyCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserPasswordPolicyCreate) SetOrg

SetOrg sets the "org" edge to the Org entity.

func (*UserPasswordPolicyCreate) SetOrgID

SetOrgID sets the "org" edge to the Org entity by ID.

func (*UserPasswordPolicyCreate) SetRetry

SetRetry sets the "retry" field.

func (*UserPasswordPolicyCreate) SetTenantID

SetTenantID sets the "tenant_id" field.

func (*UserPasswordPolicyCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordPolicyCreate) SetUpdatedBy

func (uppc *UserPasswordPolicyCreate) SetUpdatedBy(i int) *UserPasswordPolicyCreate

SetUpdatedBy sets the "updated_by" field.

type UserPasswordPolicyCreateBulk

type UserPasswordPolicyCreateBulk struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyCreateBulk is the builder for creating many UserPasswordPolicy entities in bulk.

func (*UserPasswordPolicyCreateBulk) Exec

Exec executes the query.

func (*UserPasswordPolicyCreateBulk) ExecContext

func (c *UserPasswordPolicyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyCreateBulk) ExecX

func (uppcb *UserPasswordPolicyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserPasswordPolicy.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.UserPasswordPolicyUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*UserPasswordPolicyCreateBulk) OnConflictColumns

func (uppcb *UserPasswordPolicyCreateBulk) OnConflictColumns(columns ...string) *UserPasswordPolicyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserPasswordPolicy.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserPasswordPolicyCreateBulk) QueryContext

func (c *UserPasswordPolicyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyCreateBulk) Save

Save creates the UserPasswordPolicy entities in the database.

func (*UserPasswordPolicyCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type UserPasswordPolicyDelete

type UserPasswordPolicyDelete struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyDelete is the builder for deleting a UserPasswordPolicy entity.

func (*UserPasswordPolicyDelete) Exec

func (uppd *UserPasswordPolicyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserPasswordPolicyDelete) ExecContext

func (c *UserPasswordPolicyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyDelete) ExecX

func (uppd *UserPasswordPolicyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyDelete) QueryContext

func (c *UserPasswordPolicyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyDelete) Where

Where appends a list predicates to the UserPasswordPolicyDelete builder.

type UserPasswordPolicyDeleteOne

type UserPasswordPolicyDeleteOne struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyDeleteOne is the builder for deleting a single UserPasswordPolicy entity.

func (*UserPasswordPolicyDeleteOne) Exec

Exec executes the deletion query.

func (*UserPasswordPolicyDeleteOne) ExecX

func (uppdo *UserPasswordPolicyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyDeleteOne) Where

Where appends a list predicates to the UserPasswordPolicyDelete builder.

type UserPasswordPolicyEdge

type UserPasswordPolicyEdge struct {
	Node   *UserPasswordPolicy `json:"node"`
	Cursor Cursor              `json:"cursor"`
}

UserPasswordPolicyEdge is the edge representation of UserPasswordPolicy.

type UserPasswordPolicyEdges

type UserPasswordPolicyEdges struct {
	// Org holds the value of the org edge.
	Org *Org `json:"org,omitempty"`
	// contains filtered or unexported fields
}

UserPasswordPolicyEdges holds the relations/edges for other nodes in the graph.

func (UserPasswordPolicyEdges) OrgOrErr

func (e UserPasswordPolicyEdges) 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 UserPasswordPolicyGroupBy

type UserPasswordPolicyGroupBy struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyGroupBy is the group-by builder for UserPasswordPolicy entities.

func (*UserPasswordPolicyGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*UserPasswordPolicyGroupBy) Bool

func (s *UserPasswordPolicyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) BoolX

func (s *UserPasswordPolicyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) Bools

func (s *UserPasswordPolicyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) BoolsX

func (s *UserPasswordPolicyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) Float64

func (s *UserPasswordPolicyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) Float64X

func (s *UserPasswordPolicyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) Float64s

func (s *UserPasswordPolicyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) Float64sX

func (s *UserPasswordPolicyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) Int

func (s *UserPasswordPolicyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) IntX

func (s *UserPasswordPolicyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) Ints

func (s *UserPasswordPolicyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) IntsX

func (s *UserPasswordPolicyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) Scan

func (uppgb *UserPasswordPolicyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserPasswordPolicyGroupBy) ScanX

func (s *UserPasswordPolicyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) String

func (s *UserPasswordPolicyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) StringX

func (s *UserPasswordPolicyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserPasswordPolicyGroupBy) Strings

func (s *UserPasswordPolicyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicyGroupBy) StringsX

func (s *UserPasswordPolicyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserPasswordPolicyMutation

type UserPasswordPolicyMutation struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyMutation represents an operation that mutates the UserPasswordPolicy nodes in the graph.

func (*UserPasswordPolicyMutation) AddCaptchaTimes

func (m *UserPasswordPolicyMutation) AddCaptchaTimes(i int32)

AddCaptchaTimes adds i to the "captcha_times" field.

func (*UserPasswordPolicyMutation) AddCreatedBy

func (m *UserPasswordPolicyMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*UserPasswordPolicyMutation) AddField

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) AddIncludeChar

func (m *UserPasswordPolicyMutation) AddIncludeChar(i int32)

AddIncludeChar adds i to the "include_char" field.

func (*UserPasswordPolicyMutation) AddIncludeElement

func (m *UserPasswordPolicyMutation) AddIncludeElement(i int32)

AddIncludeElement adds i to the "include_element" field.

func (*UserPasswordPolicyMutation) AddInvalidDay

func (m *UserPasswordPolicyMutation) AddInvalidDay(i int32)

AddInvalidDay adds i to the "invalid_day" field.

func (*UserPasswordPolicyMutation) AddLength

func (m *UserPasswordPolicyMutation) AddLength(i int32)

AddLength adds i to the "length" field.

func (*UserPasswordPolicyMutation) AddRetry

func (m *UserPasswordPolicyMutation) AddRetry(i int32)

AddRetry adds i to the "retry" field.

func (*UserPasswordPolicyMutation) AddUpdatedBy

func (m *UserPasswordPolicyMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*UserPasswordPolicyMutation) AddedCaptchaTimes

func (m *UserPasswordPolicyMutation) AddedCaptchaTimes() (r int32, exists bool)

AddedCaptchaTimes returns the value that was added to the "captcha_times" field in this mutation.

func (*UserPasswordPolicyMutation) AddedCreatedBy

func (m *UserPasswordPolicyMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*UserPasswordPolicyMutation) AddedEdges

func (m *UserPasswordPolicyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserPasswordPolicyMutation) AddedField

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) AddedFields

func (m *UserPasswordPolicyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserPasswordPolicyMutation) AddedIDs

func (m *UserPasswordPolicyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserPasswordPolicyMutation) AddedIncludeChar

func (m *UserPasswordPolicyMutation) AddedIncludeChar() (r int32, exists bool)

AddedIncludeChar returns the value that was added to the "include_char" field in this mutation.

func (*UserPasswordPolicyMutation) AddedIncludeElement

func (m *UserPasswordPolicyMutation) AddedIncludeElement() (r int32, exists bool)

AddedIncludeElement returns the value that was added to the "include_element" field in this mutation.

func (*UserPasswordPolicyMutation) AddedInvalidDay

func (m *UserPasswordPolicyMutation) AddedInvalidDay() (r int32, exists bool)

AddedInvalidDay returns the value that was added to the "invalid_day" field in this mutation.

func (*UserPasswordPolicyMutation) AddedLength

func (m *UserPasswordPolicyMutation) AddedLength() (r int32, exists bool)

AddedLength returns the value that was added to the "length" field in this mutation.

func (*UserPasswordPolicyMutation) AddedRetry

func (m *UserPasswordPolicyMutation) AddedRetry() (r int32, exists bool)

AddedRetry returns the value that was added to the "retry" field in this mutation.

func (*UserPasswordPolicyMutation) AddedUpdatedBy

func (m *UserPasswordPolicyMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*UserPasswordPolicyMutation) AllowIncludeUserName

func (m *UserPasswordPolicyMutation) AllowIncludeUserName() (r bool, exists bool)

AllowIncludeUserName returns the value of the "allow_include_user_name" field in the mutation.

func (*UserPasswordPolicyMutation) AllowIncludeUserNameCleared

func (m *UserPasswordPolicyMutation) AllowIncludeUserNameCleared() bool

AllowIncludeUserNameCleared returns if the "allow_include_user_name" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) CaptchaTimes

func (m *UserPasswordPolicyMutation) CaptchaTimes() (r int32, exists bool)

CaptchaTimes returns the value of the "captcha_times" field in the mutation.

func (*UserPasswordPolicyMutation) CaptchaTimesCleared

func (m *UserPasswordPolicyMutation) CaptchaTimesCleared() bool

CaptchaTimesCleared returns if the "captcha_times" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) ClearAllowIncludeUserName

func (m *UserPasswordPolicyMutation) ClearAllowIncludeUserName()

ClearAllowIncludeUserName clears the value of the "allow_include_user_name" field.

func (*UserPasswordPolicyMutation) ClearCaptchaTimes

func (m *UserPasswordPolicyMutation) ClearCaptchaTimes()

ClearCaptchaTimes clears the value of the "captcha_times" field.

func (*UserPasswordPolicyMutation) ClearEdge

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) ClearField

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) ClearIncludeChar

func (m *UserPasswordPolicyMutation) ClearIncludeChar()

ClearIncludeChar clears the value of the "include_char" field.

func (*UserPasswordPolicyMutation) ClearIncludeElement

func (m *UserPasswordPolicyMutation) ClearIncludeElement()

ClearIncludeElement clears the value of the "include_element" field.

func (*UserPasswordPolicyMutation) ClearInvalidDay

func (m *UserPasswordPolicyMutation) ClearInvalidDay()

ClearInvalidDay clears the value of the "invalid_day" field.

func (*UserPasswordPolicyMutation) ClearInvalidLoginLimit

func (m *UserPasswordPolicyMutation) ClearInvalidLoginLimit()

ClearInvalidLoginLimit clears the value of the "invalid_login_limit" field.

func (*UserPasswordPolicyMutation) ClearLength

func (m *UserPasswordPolicyMutation) ClearLength()

ClearLength clears the value of the "length" field.

func (*UserPasswordPolicyMutation) ClearOrg

func (m *UserPasswordPolicyMutation) ClearOrg()

ClearOrg clears the "org" edge to the Org entity.

func (*UserPasswordPolicyMutation) ClearRetry

func (m *UserPasswordPolicyMutation) ClearRetry()

ClearRetry clears the value of the "retry" field.

func (*UserPasswordPolicyMutation) ClearTenantID

func (m *UserPasswordPolicyMutation) ClearTenantID()

ClearTenantID clears the value of the "tenant_id" field.

func (*UserPasswordPolicyMutation) ClearUpdatedAt

func (m *UserPasswordPolicyMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordPolicyMutation) ClearUpdatedBy

func (m *UserPasswordPolicyMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordPolicyMutation) ClearedEdges

func (m *UserPasswordPolicyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserPasswordPolicyMutation) ClearedFields

func (m *UserPasswordPolicyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserPasswordPolicyMutation) Client

func (m UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) CreatedAt

func (m *UserPasswordPolicyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserPasswordPolicyMutation) CreatedBy

func (m *UserPasswordPolicyMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*UserPasswordPolicyMutation) EdgeCleared

func (m *UserPasswordPolicyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserPasswordPolicyMutation) ExecContext

func (c *UserPasswordPolicyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyMutation) Field

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) FieldCleared

func (m *UserPasswordPolicyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserPasswordPolicyMutation) Fields

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) ID

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) IncludeChar

func (m *UserPasswordPolicyMutation) IncludeChar() (r int32, exists bool)

IncludeChar returns the value of the "include_char" field in the mutation.

func (*UserPasswordPolicyMutation) IncludeCharCleared

func (m *UserPasswordPolicyMutation) IncludeCharCleared() bool

IncludeCharCleared returns if the "include_char" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) IncludeElement

func (m *UserPasswordPolicyMutation) IncludeElement() (r int32, exists bool)

IncludeElement returns the value of the "include_element" field in the mutation.

func (*UserPasswordPolicyMutation) IncludeElementCleared

func (m *UserPasswordPolicyMutation) IncludeElementCleared() bool

IncludeElementCleared returns if the "include_element" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) InvalidDay

func (m *UserPasswordPolicyMutation) InvalidDay() (r int32, exists bool)

InvalidDay returns the value of the "invalid_day" field in the mutation.

func (*UserPasswordPolicyMutation) InvalidDayCleared

func (m *UserPasswordPolicyMutation) InvalidDayCleared() bool

InvalidDayCleared returns if the "invalid_day" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) InvalidLoginLimit

func (m *UserPasswordPolicyMutation) InvalidLoginLimit() (r bool, exists bool)

InvalidLoginLimit returns the value of the "invalid_login_limit" field in the mutation.

func (*UserPasswordPolicyMutation) InvalidLoginLimitCleared

func (m *UserPasswordPolicyMutation) InvalidLoginLimitCleared() bool

InvalidLoginLimitCleared returns if the "invalid_login_limit" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) Length

func (m *UserPasswordPolicyMutation) Length() (r int32, exists bool)

Length returns the value of the "length" field in the mutation.

func (*UserPasswordPolicyMutation) LengthCleared

func (m *UserPasswordPolicyMutation) LengthCleared() bool

LengthCleared returns if the "length" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) OldAllowIncludeUserName

func (m *UserPasswordPolicyMutation) OldAllowIncludeUserName(ctx context.Context) (v bool, err error)

OldAllowIncludeUserName returns the old "allow_include_user_name" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldCaptchaTimes

func (m *UserPasswordPolicyMutation) OldCaptchaTimes(ctx context.Context) (v int32, err error)

OldCaptchaTimes returns the old "captcha_times" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldCreatedAt

func (m *UserPasswordPolicyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldCreatedBy

func (m *UserPasswordPolicyMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldField

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) OldIncludeChar

func (m *UserPasswordPolicyMutation) OldIncludeChar(ctx context.Context) (v int32, err error)

OldIncludeChar returns the old "include_char" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldIncludeElement

func (m *UserPasswordPolicyMutation) OldIncludeElement(ctx context.Context) (v int32, err error)

OldIncludeElement returns the old "include_element" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldInvalidDay

func (m *UserPasswordPolicyMutation) OldInvalidDay(ctx context.Context) (v int32, err error)

OldInvalidDay returns the old "invalid_day" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldInvalidLoginLimit

func (m *UserPasswordPolicyMutation) OldInvalidLoginLimit(ctx context.Context) (v bool, err error)

OldInvalidLoginLimit returns the old "invalid_login_limit" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldLength

func (m *UserPasswordPolicyMutation) OldLength(ctx context.Context) (v int32, err error)

OldLength returns the old "length" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldRetry

func (m *UserPasswordPolicyMutation) OldRetry(ctx context.Context) (v int32, err error)

OldRetry returns the old "retry" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldTenantID

func (m *UserPasswordPolicyMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldUpdatedAt

func (m *UserPasswordPolicyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) OldUpdatedBy

func (m *UserPasswordPolicyMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the UserPasswordPolicy entity. If the UserPasswordPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserPasswordPolicyMutation) Op

Op returns the operation name.

func (*UserPasswordPolicyMutation) OrgCleared

func (m *UserPasswordPolicyMutation) OrgCleared() bool

OrgCleared reports if the "org" edge to the Org entity was cleared.

func (*UserPasswordPolicyMutation) OrgID

func (m *UserPasswordPolicyMutation) OrgID() (id int, exists bool)

OrgID returns the "org" edge ID in the mutation.

func (*UserPasswordPolicyMutation) OrgIDs

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) QueryContext

func (c *UserPasswordPolicyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyMutation) RemovedEdges

func (m *UserPasswordPolicyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserPasswordPolicyMutation) RemovedIDs

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) ResetAllowIncludeUserName

func (m *UserPasswordPolicyMutation) ResetAllowIncludeUserName()

ResetAllowIncludeUserName resets all changes to the "allow_include_user_name" field.

func (*UserPasswordPolicyMutation) ResetCaptchaTimes

func (m *UserPasswordPolicyMutation) ResetCaptchaTimes()

ResetCaptchaTimes resets all changes to the "captcha_times" field.

func (*UserPasswordPolicyMutation) ResetCreatedAt

func (m *UserPasswordPolicyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserPasswordPolicyMutation) ResetCreatedBy

func (m *UserPasswordPolicyMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*UserPasswordPolicyMutation) ResetEdge

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) ResetField

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) ResetIncludeChar

func (m *UserPasswordPolicyMutation) ResetIncludeChar()

ResetIncludeChar resets all changes to the "include_char" field.

func (*UserPasswordPolicyMutation) ResetIncludeElement

func (m *UserPasswordPolicyMutation) ResetIncludeElement()

ResetIncludeElement resets all changes to the "include_element" field.

func (*UserPasswordPolicyMutation) ResetInvalidDay

func (m *UserPasswordPolicyMutation) ResetInvalidDay()

ResetInvalidDay resets all changes to the "invalid_day" field.

func (*UserPasswordPolicyMutation) ResetInvalidLoginLimit

func (m *UserPasswordPolicyMutation) ResetInvalidLoginLimit()

ResetInvalidLoginLimit resets all changes to the "invalid_login_limit" field.

func (*UserPasswordPolicyMutation) ResetLength

func (m *UserPasswordPolicyMutation) ResetLength()

ResetLength resets all changes to the "length" field.

func (*UserPasswordPolicyMutation) ResetOrg

func (m *UserPasswordPolicyMutation) ResetOrg()

ResetOrg resets all changes to the "org" edge.

func (*UserPasswordPolicyMutation) ResetRetry

func (m *UserPasswordPolicyMutation) ResetRetry()

ResetRetry resets all changes to the "retry" field.

func (*UserPasswordPolicyMutation) ResetTenantID

func (m *UserPasswordPolicyMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*UserPasswordPolicyMutation) ResetUpdatedAt

func (m *UserPasswordPolicyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserPasswordPolicyMutation) ResetUpdatedBy

func (m *UserPasswordPolicyMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*UserPasswordPolicyMutation) Retry

func (m *UserPasswordPolicyMutation) Retry() (r int32, exists bool)

Retry returns the value of the "retry" field in the mutation.

func (*UserPasswordPolicyMutation) RetryCleared

func (m *UserPasswordPolicyMutation) RetryCleared() bool

RetryCleared returns if the "retry" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) SetAllowIncludeUserName

func (m *UserPasswordPolicyMutation) SetAllowIncludeUserName(b bool)

SetAllowIncludeUserName sets the "allow_include_user_name" field.

func (*UserPasswordPolicyMutation) SetCaptchaTimes

func (m *UserPasswordPolicyMutation) SetCaptchaTimes(i int32)

SetCaptchaTimes sets the "captcha_times" field.

func (*UserPasswordPolicyMutation) SetCreatedAt

func (m *UserPasswordPolicyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserPasswordPolicyMutation) SetCreatedBy

func (m *UserPasswordPolicyMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*UserPasswordPolicyMutation) SetField

func (m *UserPasswordPolicyMutation) 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 (*UserPasswordPolicyMutation) SetID

func (m *UserPasswordPolicyMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UserPasswordPolicy entities.

func (*UserPasswordPolicyMutation) SetIncludeChar

func (m *UserPasswordPolicyMutation) SetIncludeChar(i int32)

SetIncludeChar sets the "include_char" field.

func (*UserPasswordPolicyMutation) SetIncludeElement

func (m *UserPasswordPolicyMutation) SetIncludeElement(i int32)

SetIncludeElement sets the "include_element" field.

func (*UserPasswordPolicyMutation) SetInvalidDay

func (m *UserPasswordPolicyMutation) SetInvalidDay(i int32)

SetInvalidDay sets the "invalid_day" field.

func (*UserPasswordPolicyMutation) SetInvalidLoginLimit

func (m *UserPasswordPolicyMutation) SetInvalidLoginLimit(b bool)

SetInvalidLoginLimit sets the "invalid_login_limit" field.

func (*UserPasswordPolicyMutation) SetLength

func (m *UserPasswordPolicyMutation) SetLength(i int32)

SetLength sets the "length" field.

func (*UserPasswordPolicyMutation) SetOp

func (m *UserPasswordPolicyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserPasswordPolicyMutation) SetOrgID

func (m *UserPasswordPolicyMutation) SetOrgID(id int)

SetOrgID sets the "org" edge to the Org entity by id.

func (*UserPasswordPolicyMutation) SetRetry

func (m *UserPasswordPolicyMutation) SetRetry(i int32)

SetRetry sets the "retry" field.

func (*UserPasswordPolicyMutation) SetTenantID

func (m *UserPasswordPolicyMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*UserPasswordPolicyMutation) SetUpdatedAt

func (m *UserPasswordPolicyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordPolicyMutation) SetUpdatedBy

func (m *UserPasswordPolicyMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordPolicyMutation) TenantID

func (m *UserPasswordPolicyMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (*UserPasswordPolicyMutation) TenantIDCleared

func (m *UserPasswordPolicyMutation) TenantIDCleared() bool

TenantIDCleared returns if the "tenant_id" field was cleared in this mutation.

func (UserPasswordPolicyMutation) Tx

func (m UserPasswordPolicyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserPasswordPolicyMutation) Type

Type returns the node type of this mutation (UserPasswordPolicy).

func (*UserPasswordPolicyMutation) UpdatedAt

func (m *UserPasswordPolicyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserPasswordPolicyMutation) UpdatedAtCleared

func (m *UserPasswordPolicyMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) UpdatedBy

func (m *UserPasswordPolicyMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*UserPasswordPolicyMutation) UpdatedByCleared

func (m *UserPasswordPolicyMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*UserPasswordPolicyMutation) Where

Where appends a list predicates to the UserPasswordPolicyMutation builder.

func (*UserPasswordPolicyMutation) WhereP

func (m *UserPasswordPolicyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserPasswordPolicyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserPasswordPolicyOrder

type UserPasswordPolicyOrder struct {
	Direction OrderDirection                `json:"direction"`
	Field     *UserPasswordPolicyOrderField `json:"field"`
}

UserPasswordPolicyOrder defines the ordering of UserPasswordPolicy.

type UserPasswordPolicyOrderField

type UserPasswordPolicyOrderField struct {
	// Value extracts the ordering value from the given UserPasswordPolicy.
	Value func(*UserPasswordPolicy) (ent.Value, error)
	// contains filtered or unexported fields
}

UserPasswordPolicyOrderField defines the ordering field of UserPasswordPolicy.

func (UserPasswordPolicyOrderField) MarshalGQL

func (f UserPasswordPolicyOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (UserPasswordPolicyOrderField) String

String implement fmt.Stringer interface.

func (*UserPasswordPolicyOrderField) UnmarshalGQL

func (f *UserPasswordPolicyOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type UserPasswordPolicyPaginateOption

type UserPasswordPolicyPaginateOption func(*userpasswordpolicyPager) error

UserPasswordPolicyPaginateOption enables pagination customization.

func WithUserPasswordPolicyFilter

func WithUserPasswordPolicyFilter(filter func(*UserPasswordPolicyQuery) (*UserPasswordPolicyQuery, error)) UserPasswordPolicyPaginateOption

WithUserPasswordPolicyFilter configures pagination filter.

func WithUserPasswordPolicyOrder

func WithUserPasswordPolicyOrder(order *UserPasswordPolicyOrder) UserPasswordPolicyPaginateOption

WithUserPasswordPolicyOrder configures pagination ordering.

type UserPasswordPolicyQuery

type UserPasswordPolicyQuery struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyQuery is the builder for querying UserPasswordPolicy entities.

func (*UserPasswordPolicyQuery) Aggregate

Aggregate returns a UserPasswordPolicySelect configured with the given aggregations.

func (*UserPasswordPolicyQuery) All

All executes the query and returns a list of UserPasswordPolicies.

func (*UserPasswordPolicyQuery) AllX

AllX is like All, but panics if an error occurs.

func (*UserPasswordPolicyQuery) Clone

Clone returns a duplicate of the UserPasswordPolicyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserPasswordPolicyQuery) CollectFields

func (upp *UserPasswordPolicyQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserPasswordPolicyQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserPasswordPolicyQuery) Count

func (uppq *UserPasswordPolicyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserPasswordPolicyQuery) CountX

func (uppq *UserPasswordPolicyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserPasswordPolicyQuery) ExecContext

func (c *UserPasswordPolicyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyQuery) Exist

func (uppq *UserPasswordPolicyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserPasswordPolicyQuery) ExistX

func (uppq *UserPasswordPolicyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserPasswordPolicyQuery) First

First returns the first UserPasswordPolicy entity from the query. Returns a *NotFoundError when no UserPasswordPolicy was found.

func (*UserPasswordPolicyQuery) FirstID

func (uppq *UserPasswordPolicyQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserPasswordPolicy ID from the query. Returns a *NotFoundError when no UserPasswordPolicy ID was found.

func (*UserPasswordPolicyQuery) FirstIDX

func (uppq *UserPasswordPolicyQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserPasswordPolicyQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*UserPasswordPolicyQuery) GroupBy

func (uppq *UserPasswordPolicyQuery) GroupBy(field string, fields ...string) *UserPasswordPolicyGroupBy

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.UserPasswordPolicy.Query().
	GroupBy(userpasswordpolicy.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserPasswordPolicyQuery) IDs

func (uppq *UserPasswordPolicyQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserPasswordPolicy IDs.

func (*UserPasswordPolicyQuery) IDsX

func (uppq *UserPasswordPolicyQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserPasswordPolicyQuery) Limit

Limit the number of records to be returned by this query.

func (*UserPasswordPolicyQuery) Offset

func (uppq *UserPasswordPolicyQuery) Offset(offset int) *UserPasswordPolicyQuery

Offset to start from.

func (*UserPasswordPolicyQuery) Only

Only returns a single UserPasswordPolicy entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserPasswordPolicy entity is found. Returns a *NotFoundError when no UserPasswordPolicy entities are found.

func (*UserPasswordPolicyQuery) OnlyID

func (uppq *UserPasswordPolicyQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserPasswordPolicy ID in the query. Returns a *NotSingularError when more than one UserPasswordPolicy ID is found. Returns a *NotFoundError when no entities are found.

func (*UserPasswordPolicyQuery) OnlyIDX

func (uppq *UserPasswordPolicyQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserPasswordPolicyQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*UserPasswordPolicyQuery) Order

Order specifies how the records should be ordered.

func (*UserPasswordPolicyQuery) Paginate

func (upp *UserPasswordPolicyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserPasswordPolicyPaginateOption,
) (*UserPasswordPolicyConnection, error)

Paginate executes the query and returns a relay based cursor connection to UserPasswordPolicy.

func (*UserPasswordPolicyQuery) QueryContext

func (c *UserPasswordPolicyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyQuery) QueryOrg

func (uppq *UserPasswordPolicyQuery) QueryOrg() *OrgQuery

QueryOrg chains the current query on the "org" edge.

func (*UserPasswordPolicyQuery) Select

func (uppq *UserPasswordPolicyQuery) Select(fields ...string) *UserPasswordPolicySelect

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.UserPasswordPolicy.Query().
	Select(userpasswordpolicy.FieldCreatedBy).
	Scan(ctx, &v)

func (*UserPasswordPolicyQuery) Unique

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 (*UserPasswordPolicyQuery) Where

Where adds a new predicate for the UserPasswordPolicyQuery builder.

func (*UserPasswordPolicyQuery) WithOrg

func (uppq *UserPasswordPolicyQuery) WithOrg(opts ...func(*OrgQuery)) *UserPasswordPolicyQuery

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 UserPasswordPolicySelect

type UserPasswordPolicySelect struct {
	*UserPasswordPolicyQuery
	// contains filtered or unexported fields
}

UserPasswordPolicySelect is the builder for selecting fields of UserPasswordPolicy entities.

func (*UserPasswordPolicySelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*UserPasswordPolicySelect) Bool

func (s *UserPasswordPolicySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) BoolX

func (s *UserPasswordPolicySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserPasswordPolicySelect) Bools

func (s *UserPasswordPolicySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) BoolsX

func (s *UserPasswordPolicySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UserPasswordPolicySelect) ExecContext

func (c UserPasswordPolicySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicySelect) Float64

func (s *UserPasswordPolicySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) Float64X

func (s *UserPasswordPolicySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserPasswordPolicySelect) Float64s

func (s *UserPasswordPolicySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) Float64sX

func (s *UserPasswordPolicySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserPasswordPolicySelect) Int

func (s *UserPasswordPolicySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) IntX

func (s *UserPasswordPolicySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserPasswordPolicySelect) Ints

func (s *UserPasswordPolicySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) IntsX

func (s *UserPasswordPolicySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (UserPasswordPolicySelect) QueryContext

func (c UserPasswordPolicySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicySelect) Scan

func (upps *UserPasswordPolicySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserPasswordPolicySelect) ScanX

func (s *UserPasswordPolicySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserPasswordPolicySelect) String

func (s *UserPasswordPolicySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) StringX

func (s *UserPasswordPolicySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserPasswordPolicySelect) Strings

func (s *UserPasswordPolicySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserPasswordPolicySelect) StringsX

func (s *UserPasswordPolicySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserPasswordPolicyUpdate

type UserPasswordPolicyUpdate struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyUpdate is the builder for updating UserPasswordPolicy entities.

func (*UserPasswordPolicyUpdate) AddCaptchaTimes

func (uppu *UserPasswordPolicyUpdate) AddCaptchaTimes(i int32) *UserPasswordPolicyUpdate

AddCaptchaTimes adds i to the "captcha_times" field.

func (*UserPasswordPolicyUpdate) AddIncludeChar

func (uppu *UserPasswordPolicyUpdate) AddIncludeChar(i int32) *UserPasswordPolicyUpdate

AddIncludeChar adds i to the "include_char" field.

func (*UserPasswordPolicyUpdate) AddIncludeElement

func (uppu *UserPasswordPolicyUpdate) AddIncludeElement(i int32) *UserPasswordPolicyUpdate

AddIncludeElement adds i to the "include_element" field.

func (*UserPasswordPolicyUpdate) AddInvalidDay

AddInvalidDay adds i to the "invalid_day" field.

func (*UserPasswordPolicyUpdate) AddLength

AddLength adds i to the "length" field.

func (*UserPasswordPolicyUpdate) AddRetry

AddRetry adds i to the "retry" field.

func (*UserPasswordPolicyUpdate) AddUpdatedBy

func (uppu *UserPasswordPolicyUpdate) AddUpdatedBy(i int) *UserPasswordPolicyUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*UserPasswordPolicyUpdate) ClearAllowIncludeUserName

func (uppu *UserPasswordPolicyUpdate) ClearAllowIncludeUserName() *UserPasswordPolicyUpdate

ClearAllowIncludeUserName clears the value of the "allow_include_user_name" field.

func (*UserPasswordPolicyUpdate) ClearCaptchaTimes

func (uppu *UserPasswordPolicyUpdate) ClearCaptchaTimes() *UserPasswordPolicyUpdate

ClearCaptchaTimes clears the value of the "captcha_times" field.

func (*UserPasswordPolicyUpdate) ClearIncludeChar

func (uppu *UserPasswordPolicyUpdate) ClearIncludeChar() *UserPasswordPolicyUpdate

ClearIncludeChar clears the value of the "include_char" field.

func (*UserPasswordPolicyUpdate) ClearIncludeElement

func (uppu *UserPasswordPolicyUpdate) ClearIncludeElement() *UserPasswordPolicyUpdate

ClearIncludeElement clears the value of the "include_element" field.

func (*UserPasswordPolicyUpdate) ClearInvalidDay

func (uppu *UserPasswordPolicyUpdate) ClearInvalidDay() *UserPasswordPolicyUpdate

ClearInvalidDay clears the value of the "invalid_day" field.

func (*UserPasswordPolicyUpdate) ClearInvalidLoginLimit

func (uppu *UserPasswordPolicyUpdate) ClearInvalidLoginLimit() *UserPasswordPolicyUpdate

ClearInvalidLoginLimit clears the value of the "invalid_login_limit" field.

func (*UserPasswordPolicyUpdate) ClearLength

ClearLength clears the value of the "length" field.

func (*UserPasswordPolicyUpdate) ClearRetry

ClearRetry clears the value of the "retry" field.

func (*UserPasswordPolicyUpdate) ClearUpdatedAt

func (uppu *UserPasswordPolicyUpdate) ClearUpdatedAt() *UserPasswordPolicyUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordPolicyUpdate) ClearUpdatedBy

func (uppu *UserPasswordPolicyUpdate) ClearUpdatedBy() *UserPasswordPolicyUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordPolicyUpdate) Exec

Exec executes the query.

func (*UserPasswordPolicyUpdate) ExecContext

func (c *UserPasswordPolicyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyUpdate) ExecX

func (uppu *UserPasswordPolicyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyUpdate) Mutation

Mutation returns the UserPasswordPolicyMutation object of the builder.

func (*UserPasswordPolicyUpdate) QueryContext

func (c *UserPasswordPolicyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyUpdate) Save

func (uppu *UserPasswordPolicyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserPasswordPolicyUpdate) SaveX

func (uppu *UserPasswordPolicyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserPasswordPolicyUpdate) SetAllowIncludeUserName

func (uppu *UserPasswordPolicyUpdate) SetAllowIncludeUserName(b bool) *UserPasswordPolicyUpdate

SetAllowIncludeUserName sets the "allow_include_user_name" field.

func (*UserPasswordPolicyUpdate) SetCaptchaTimes

func (uppu *UserPasswordPolicyUpdate) SetCaptchaTimes(i int32) *UserPasswordPolicyUpdate

SetCaptchaTimes sets the "captcha_times" field.

func (*UserPasswordPolicyUpdate) SetIncludeChar

func (uppu *UserPasswordPolicyUpdate) SetIncludeChar(i int32) *UserPasswordPolicyUpdate

SetIncludeChar sets the "include_char" field.

func (*UserPasswordPolicyUpdate) SetIncludeElement

func (uppu *UserPasswordPolicyUpdate) SetIncludeElement(i int32) *UserPasswordPolicyUpdate

SetIncludeElement sets the "include_element" field.

func (*UserPasswordPolicyUpdate) SetInput

SetInput applies the change-set in the UpdateUserPasswordPolicyInput on the UserPasswordPolicyUpdate builder.

func (*UserPasswordPolicyUpdate) SetInvalidDay

SetInvalidDay sets the "invalid_day" field.

func (*UserPasswordPolicyUpdate) SetInvalidLoginLimit

func (uppu *UserPasswordPolicyUpdate) SetInvalidLoginLimit(b bool) *UserPasswordPolicyUpdate

SetInvalidLoginLimit sets the "invalid_login_limit" field.

func (*UserPasswordPolicyUpdate) SetLength

SetLength sets the "length" field.

func (*UserPasswordPolicyUpdate) SetNillableAllowIncludeUserName

func (uppu *UserPasswordPolicyUpdate) SetNillableAllowIncludeUserName(b *bool) *UserPasswordPolicyUpdate

SetNillableAllowIncludeUserName sets the "allow_include_user_name" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableCaptchaTimes

func (uppu *UserPasswordPolicyUpdate) SetNillableCaptchaTimes(i *int32) *UserPasswordPolicyUpdate

SetNillableCaptchaTimes sets the "captcha_times" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableIncludeChar

func (uppu *UserPasswordPolicyUpdate) SetNillableIncludeChar(i *int32) *UserPasswordPolicyUpdate

SetNillableIncludeChar sets the "include_char" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableIncludeElement

func (uppu *UserPasswordPolicyUpdate) SetNillableIncludeElement(i *int32) *UserPasswordPolicyUpdate

SetNillableIncludeElement sets the "include_element" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableInvalidDay

func (uppu *UserPasswordPolicyUpdate) SetNillableInvalidDay(i *int32) *UserPasswordPolicyUpdate

SetNillableInvalidDay sets the "invalid_day" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableInvalidLoginLimit

func (uppu *UserPasswordPolicyUpdate) SetNillableInvalidLoginLimit(b *bool) *UserPasswordPolicyUpdate

SetNillableInvalidLoginLimit sets the "invalid_login_limit" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableLength

func (uppu *UserPasswordPolicyUpdate) SetNillableLength(i *int32) *UserPasswordPolicyUpdate

SetNillableLength sets the "length" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableRetry

func (uppu *UserPasswordPolicyUpdate) SetNillableRetry(i *int32) *UserPasswordPolicyUpdate

SetNillableRetry sets the "retry" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableUpdatedAt

func (uppu *UserPasswordPolicyUpdate) SetNillableUpdatedAt(t *time.Time) *UserPasswordPolicyUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetNillableUpdatedBy

func (uppu *UserPasswordPolicyUpdate) SetNillableUpdatedBy(i *int) *UserPasswordPolicyUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserPasswordPolicyUpdate) SetRetry

SetRetry sets the "retry" field.

func (*UserPasswordPolicyUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordPolicyUpdate) SetUpdatedBy

func (uppu *UserPasswordPolicyUpdate) SetUpdatedBy(i int) *UserPasswordPolicyUpdate

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordPolicyUpdate) Where

Where appends a list predicates to the UserPasswordPolicyUpdate builder.

type UserPasswordPolicyUpdateOne

type UserPasswordPolicyUpdateOne struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyUpdateOne is the builder for updating a single UserPasswordPolicy entity.

func (*UserPasswordPolicyUpdateOne) AddCaptchaTimes

AddCaptchaTimes adds i to the "captcha_times" field.

func (*UserPasswordPolicyUpdateOne) AddIncludeChar

AddIncludeChar adds i to the "include_char" field.

func (*UserPasswordPolicyUpdateOne) AddIncludeElement

func (uppuo *UserPasswordPolicyUpdateOne) AddIncludeElement(i int32) *UserPasswordPolicyUpdateOne

AddIncludeElement adds i to the "include_element" field.

func (*UserPasswordPolicyUpdateOne) AddInvalidDay

AddInvalidDay adds i to the "invalid_day" field.

func (*UserPasswordPolicyUpdateOne) AddLength

AddLength adds i to the "length" field.

func (*UserPasswordPolicyUpdateOne) AddRetry

AddRetry adds i to the "retry" field.

func (*UserPasswordPolicyUpdateOne) AddUpdatedBy

AddUpdatedBy adds i to the "updated_by" field.

func (*UserPasswordPolicyUpdateOne) ClearAllowIncludeUserName

func (uppuo *UserPasswordPolicyUpdateOne) ClearAllowIncludeUserName() *UserPasswordPolicyUpdateOne

ClearAllowIncludeUserName clears the value of the "allow_include_user_name" field.

func (*UserPasswordPolicyUpdateOne) ClearCaptchaTimes

func (uppuo *UserPasswordPolicyUpdateOne) ClearCaptchaTimes() *UserPasswordPolicyUpdateOne

ClearCaptchaTimes clears the value of the "captcha_times" field.

func (*UserPasswordPolicyUpdateOne) ClearIncludeChar

func (uppuo *UserPasswordPolicyUpdateOne) ClearIncludeChar() *UserPasswordPolicyUpdateOne

ClearIncludeChar clears the value of the "include_char" field.

func (*UserPasswordPolicyUpdateOne) ClearIncludeElement

func (uppuo *UserPasswordPolicyUpdateOne) ClearIncludeElement() *UserPasswordPolicyUpdateOne

ClearIncludeElement clears the value of the "include_element" field.

func (*UserPasswordPolicyUpdateOne) ClearInvalidDay

func (uppuo *UserPasswordPolicyUpdateOne) ClearInvalidDay() *UserPasswordPolicyUpdateOne

ClearInvalidDay clears the value of the "invalid_day" field.

func (*UserPasswordPolicyUpdateOne) ClearInvalidLoginLimit

func (uppuo *UserPasswordPolicyUpdateOne) ClearInvalidLoginLimit() *UserPasswordPolicyUpdateOne

ClearInvalidLoginLimit clears the value of the "invalid_login_limit" field.

func (*UserPasswordPolicyUpdateOne) ClearLength

ClearLength clears the value of the "length" field.

func (*UserPasswordPolicyUpdateOne) ClearRetry

ClearRetry clears the value of the "retry" field.

func (*UserPasswordPolicyUpdateOne) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordPolicyUpdateOne) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordPolicyUpdateOne) Exec

Exec executes the query on the entity.

func (*UserPasswordPolicyUpdateOne) ExecContext

func (c *UserPasswordPolicyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserPasswordPolicyUpdateOne) ExecX

func (uppuo *UserPasswordPolicyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyUpdateOne) Mutation

Mutation returns the UserPasswordPolicyMutation object of the builder.

func (*UserPasswordPolicyUpdateOne) QueryContext

func (c *UserPasswordPolicyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserPasswordPolicyUpdateOne) Save

Save executes the query and returns the updated UserPasswordPolicy entity.

func (*UserPasswordPolicyUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserPasswordPolicyUpdateOne) Select

func (uppuo *UserPasswordPolicyUpdateOne) Select(field string, fields ...string) *UserPasswordPolicyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserPasswordPolicyUpdateOne) SetAllowIncludeUserName

func (uppuo *UserPasswordPolicyUpdateOne) SetAllowIncludeUserName(b bool) *UserPasswordPolicyUpdateOne

SetAllowIncludeUserName sets the "allow_include_user_name" field.

func (*UserPasswordPolicyUpdateOne) SetCaptchaTimes

SetCaptchaTimes sets the "captcha_times" field.

func (*UserPasswordPolicyUpdateOne) SetIncludeChar

SetIncludeChar sets the "include_char" field.

func (*UserPasswordPolicyUpdateOne) SetIncludeElement

func (uppuo *UserPasswordPolicyUpdateOne) SetIncludeElement(i int32) *UserPasswordPolicyUpdateOne

SetIncludeElement sets the "include_element" field.

func (*UserPasswordPolicyUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserPasswordPolicyInput on the UserPasswordPolicyUpdateOne builder.

func (*UserPasswordPolicyUpdateOne) SetInvalidDay

SetInvalidDay sets the "invalid_day" field.

func (*UserPasswordPolicyUpdateOne) SetInvalidLoginLimit

func (uppuo *UserPasswordPolicyUpdateOne) SetInvalidLoginLimit(b bool) *UserPasswordPolicyUpdateOne

SetInvalidLoginLimit sets the "invalid_login_limit" field.

func (*UserPasswordPolicyUpdateOne) SetLength

SetLength sets the "length" field.

func (*UserPasswordPolicyUpdateOne) SetNillableAllowIncludeUserName

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableAllowIncludeUserName(b *bool) *UserPasswordPolicyUpdateOne

SetNillableAllowIncludeUserName sets the "allow_include_user_name" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableCaptchaTimes

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableCaptchaTimes(i *int32) *UserPasswordPolicyUpdateOne

SetNillableCaptchaTimes sets the "captcha_times" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableIncludeChar

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableIncludeChar(i *int32) *UserPasswordPolicyUpdateOne

SetNillableIncludeChar sets the "include_char" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableIncludeElement

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableIncludeElement(i *int32) *UserPasswordPolicyUpdateOne

SetNillableIncludeElement sets the "include_element" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableInvalidDay

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableInvalidDay(i *int32) *UserPasswordPolicyUpdateOne

SetNillableInvalidDay sets the "invalid_day" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableInvalidLoginLimit

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableInvalidLoginLimit(b *bool) *UserPasswordPolicyUpdateOne

SetNillableInvalidLoginLimit sets the "invalid_login_limit" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableLength

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableLength(i *int32) *UserPasswordPolicyUpdateOne

SetNillableLength sets the "length" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableRetry

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableRetry(i *int32) *UserPasswordPolicyUpdateOne

SetNillableRetry sets the "retry" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableUpdatedAt

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserPasswordPolicyUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetNillableUpdatedBy

func (uppuo *UserPasswordPolicyUpdateOne) SetNillableUpdatedBy(i *int) *UserPasswordPolicyUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*UserPasswordPolicyUpdateOne) SetRetry

SetRetry sets the "retry" field.

func (*UserPasswordPolicyUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordPolicyUpdateOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordPolicyUpdateOne) Where

Where appends a list predicates to the UserPasswordPolicyUpdate builder.

type UserPasswordPolicyUpsert

type UserPasswordPolicyUpsert struct {
	*sql.UpdateSet
}

UserPasswordPolicyUpsert is the "OnConflict" setter.

func (*UserPasswordPolicyUpsert) AddCaptchaTimes

AddCaptchaTimes adds v to the "captcha_times" field.

func (*UserPasswordPolicyUpsert) AddIncludeChar

AddIncludeChar adds v to the "include_char" field.

func (*UserPasswordPolicyUpsert) AddIncludeElement

func (u *UserPasswordPolicyUpsert) AddIncludeElement(v int32) *UserPasswordPolicyUpsert

AddIncludeElement adds v to the "include_element" field.

func (*UserPasswordPolicyUpsert) AddInvalidDay

AddInvalidDay adds v to the "invalid_day" field.

func (*UserPasswordPolicyUpsert) AddLength

AddLength adds v to the "length" field.

func (*UserPasswordPolicyUpsert) AddRetry

AddRetry adds v to the "retry" field.

func (*UserPasswordPolicyUpsert) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserPasswordPolicyUpsert) ClearAllowIncludeUserName

func (u *UserPasswordPolicyUpsert) ClearAllowIncludeUserName() *UserPasswordPolicyUpsert

ClearAllowIncludeUserName clears the value of the "allow_include_user_name" field.

func (*UserPasswordPolicyUpsert) ClearCaptchaTimes

func (u *UserPasswordPolicyUpsert) ClearCaptchaTimes() *UserPasswordPolicyUpsert

ClearCaptchaTimes clears the value of the "captcha_times" field.

func (*UserPasswordPolicyUpsert) ClearIncludeChar

func (u *UserPasswordPolicyUpsert) ClearIncludeChar() *UserPasswordPolicyUpsert

ClearIncludeChar clears the value of the "include_char" field.

func (*UserPasswordPolicyUpsert) ClearIncludeElement

func (u *UserPasswordPolicyUpsert) ClearIncludeElement() *UserPasswordPolicyUpsert

ClearIncludeElement clears the value of the "include_element" field.

func (*UserPasswordPolicyUpsert) ClearInvalidDay

func (u *UserPasswordPolicyUpsert) ClearInvalidDay() *UserPasswordPolicyUpsert

ClearInvalidDay clears the value of the "invalid_day" field.

func (*UserPasswordPolicyUpsert) ClearInvalidLoginLimit

func (u *UserPasswordPolicyUpsert) ClearInvalidLoginLimit() *UserPasswordPolicyUpsert

ClearInvalidLoginLimit clears the value of the "invalid_login_limit" field.

func (*UserPasswordPolicyUpsert) ClearLength

ClearLength clears the value of the "length" field.

func (*UserPasswordPolicyUpsert) ClearRetry

ClearRetry clears the value of the "retry" field.

func (*UserPasswordPolicyUpsert) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordPolicyUpsert) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordPolicyUpsert) SetAllowIncludeUserName

func (u *UserPasswordPolicyUpsert) SetAllowIncludeUserName(v bool) *UserPasswordPolicyUpsert

SetAllowIncludeUserName sets the "allow_include_user_name" field.

func (*UserPasswordPolicyUpsert) SetCaptchaTimes

SetCaptchaTimes sets the "captcha_times" field.

func (*UserPasswordPolicyUpsert) SetIncludeChar

SetIncludeChar sets the "include_char" field.

func (*UserPasswordPolicyUpsert) SetIncludeElement

func (u *UserPasswordPolicyUpsert) SetIncludeElement(v int32) *UserPasswordPolicyUpsert

SetIncludeElement sets the "include_element" field.

func (*UserPasswordPolicyUpsert) SetInvalidDay

SetInvalidDay sets the "invalid_day" field.

func (*UserPasswordPolicyUpsert) SetInvalidLoginLimit

func (u *UserPasswordPolicyUpsert) SetInvalidLoginLimit(v bool) *UserPasswordPolicyUpsert

SetInvalidLoginLimit sets the "invalid_login_limit" field.

func (*UserPasswordPolicyUpsert) SetLength

SetLength sets the "length" field.

func (*UserPasswordPolicyUpsert) SetRetry

SetRetry sets the "retry" field.

func (*UserPasswordPolicyUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordPolicyUpsert) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordPolicyUpsert) UpdateAllowIncludeUserName

func (u *UserPasswordPolicyUpsert) UpdateAllowIncludeUserName() *UserPasswordPolicyUpsert

UpdateAllowIncludeUserName sets the "allow_include_user_name" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateCaptchaTimes

func (u *UserPasswordPolicyUpsert) UpdateCaptchaTimes() *UserPasswordPolicyUpsert

UpdateCaptchaTimes sets the "captcha_times" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateIncludeChar

func (u *UserPasswordPolicyUpsert) UpdateIncludeChar() *UserPasswordPolicyUpsert

UpdateIncludeChar sets the "include_char" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateIncludeElement

func (u *UserPasswordPolicyUpsert) UpdateIncludeElement() *UserPasswordPolicyUpsert

UpdateIncludeElement sets the "include_element" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateInvalidDay

func (u *UserPasswordPolicyUpsert) UpdateInvalidDay() *UserPasswordPolicyUpsert

UpdateInvalidDay sets the "invalid_day" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateInvalidLoginLimit

func (u *UserPasswordPolicyUpsert) UpdateInvalidLoginLimit() *UserPasswordPolicyUpsert

UpdateInvalidLoginLimit sets the "invalid_login_limit" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateLength

UpdateLength sets the "length" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateRetry

UpdateRetry sets the "retry" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateUpdatedAt

func (u *UserPasswordPolicyUpsert) UpdateUpdatedAt() *UserPasswordPolicyUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserPasswordPolicyUpsert) UpdateUpdatedBy

func (u *UserPasswordPolicyUpsert) UpdateUpdatedBy() *UserPasswordPolicyUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserPasswordPolicyUpsertBulk

type UserPasswordPolicyUpsertBulk struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyUpsertBulk is the builder for "upsert"-ing a bulk of UserPasswordPolicy nodes.

func (*UserPasswordPolicyUpsertBulk) AddCaptchaTimes

AddCaptchaTimes adds v to the "captcha_times" field.

func (*UserPasswordPolicyUpsertBulk) AddIncludeChar

AddIncludeChar adds v to the "include_char" field.

func (*UserPasswordPolicyUpsertBulk) AddIncludeElement

AddIncludeElement adds v to the "include_element" field.

func (*UserPasswordPolicyUpsertBulk) AddInvalidDay

AddInvalidDay adds v to the "invalid_day" field.

func (*UserPasswordPolicyUpsertBulk) AddLength

AddLength adds v to the "length" field.

func (*UserPasswordPolicyUpsertBulk) AddRetry

AddRetry adds v to the "retry" field.

func (*UserPasswordPolicyUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserPasswordPolicyUpsertBulk) ClearAllowIncludeUserName

func (u *UserPasswordPolicyUpsertBulk) ClearAllowIncludeUserName() *UserPasswordPolicyUpsertBulk

ClearAllowIncludeUserName clears the value of the "allow_include_user_name" field.

func (*UserPasswordPolicyUpsertBulk) ClearCaptchaTimes

ClearCaptchaTimes clears the value of the "captcha_times" field.

func (*UserPasswordPolicyUpsertBulk) ClearIncludeChar

ClearIncludeChar clears the value of the "include_char" field.

func (*UserPasswordPolicyUpsertBulk) ClearIncludeElement

ClearIncludeElement clears the value of the "include_element" field.

func (*UserPasswordPolicyUpsertBulk) ClearInvalidDay

ClearInvalidDay clears the value of the "invalid_day" field.

func (*UserPasswordPolicyUpsertBulk) ClearInvalidLoginLimit

func (u *UserPasswordPolicyUpsertBulk) ClearInvalidLoginLimit() *UserPasswordPolicyUpsertBulk

ClearInvalidLoginLimit clears the value of the "invalid_login_limit" field.

func (*UserPasswordPolicyUpsertBulk) ClearLength

ClearLength clears the value of the "length" field.

func (*UserPasswordPolicyUpsertBulk) ClearRetry

ClearRetry clears the value of the "retry" field.

func (*UserPasswordPolicyUpsertBulk) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordPolicyUpsertBulk) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordPolicyUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserPasswordPolicyUpsertBulk) Exec

Exec executes the query.

func (*UserPasswordPolicyUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserPasswordPolicy.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserPasswordPolicyUpsertBulk) SetAllowIncludeUserName

func (u *UserPasswordPolicyUpsertBulk) SetAllowIncludeUserName(v bool) *UserPasswordPolicyUpsertBulk

SetAllowIncludeUserName sets the "allow_include_user_name" field.

func (*UserPasswordPolicyUpsertBulk) SetCaptchaTimes

SetCaptchaTimes sets the "captcha_times" field.

func (*UserPasswordPolicyUpsertBulk) SetIncludeChar

SetIncludeChar sets the "include_char" field.

func (*UserPasswordPolicyUpsertBulk) SetIncludeElement

SetIncludeElement sets the "include_element" field.

func (*UserPasswordPolicyUpsertBulk) SetInvalidDay

SetInvalidDay sets the "invalid_day" field.

func (*UserPasswordPolicyUpsertBulk) SetInvalidLoginLimit

SetInvalidLoginLimit sets the "invalid_login_limit" field.

func (*UserPasswordPolicyUpsertBulk) SetLength

SetLength sets the "length" field.

func (*UserPasswordPolicyUpsertBulk) SetRetry

SetRetry sets the "retry" field.

func (*UserPasswordPolicyUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordPolicyUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordPolicyUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserPasswordPolicyCreateBulk.OnConflict documentation for more info.

func (*UserPasswordPolicyUpsertBulk) UpdateAllowIncludeUserName

func (u *UserPasswordPolicyUpsertBulk) UpdateAllowIncludeUserName() *UserPasswordPolicyUpsertBulk

UpdateAllowIncludeUserName sets the "allow_include_user_name" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateCaptchaTimes

UpdateCaptchaTimes sets the "captcha_times" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateIncludeChar

UpdateIncludeChar sets the "include_char" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateIncludeElement

UpdateIncludeElement sets the "include_element" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateInvalidDay

UpdateInvalidDay sets the "invalid_day" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateInvalidLoginLimit

func (u *UserPasswordPolicyUpsertBulk) UpdateInvalidLoginLimit() *UserPasswordPolicyUpsertBulk

UpdateInvalidLoginLimit sets the "invalid_login_limit" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateLength

UpdateLength sets the "length" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserPasswordPolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userpasswordpolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*UserPasswordPolicyUpsertBulk) UpdateRetry

UpdateRetry sets the "retry" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertBulk) UpdateUpdatedBy

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserPasswordPolicyUpsertOne

type UserPasswordPolicyUpsertOne struct {
	// contains filtered or unexported fields
}

UserPasswordPolicyUpsertOne is the builder for "upsert"-ing

one UserPasswordPolicy node.

func (*UserPasswordPolicyUpsertOne) AddCaptchaTimes

AddCaptchaTimes adds v to the "captcha_times" field.

func (*UserPasswordPolicyUpsertOne) AddIncludeChar

AddIncludeChar adds v to the "include_char" field.

func (*UserPasswordPolicyUpsertOne) AddIncludeElement

AddIncludeElement adds v to the "include_element" field.

func (*UserPasswordPolicyUpsertOne) AddInvalidDay

AddInvalidDay adds v to the "invalid_day" field.

func (*UserPasswordPolicyUpsertOne) AddLength

AddLength adds v to the "length" field.

func (*UserPasswordPolicyUpsertOne) AddRetry

AddRetry adds v to the "retry" field.

func (*UserPasswordPolicyUpsertOne) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*UserPasswordPolicyUpsertOne) ClearAllowIncludeUserName

func (u *UserPasswordPolicyUpsertOne) ClearAllowIncludeUserName() *UserPasswordPolicyUpsertOne

ClearAllowIncludeUserName clears the value of the "allow_include_user_name" field.

func (*UserPasswordPolicyUpsertOne) ClearCaptchaTimes

ClearCaptchaTimes clears the value of the "captcha_times" field.

func (*UserPasswordPolicyUpsertOne) ClearIncludeChar

ClearIncludeChar clears the value of the "include_char" field.

func (*UserPasswordPolicyUpsertOne) ClearIncludeElement

func (u *UserPasswordPolicyUpsertOne) ClearIncludeElement() *UserPasswordPolicyUpsertOne

ClearIncludeElement clears the value of the "include_element" field.

func (*UserPasswordPolicyUpsertOne) ClearInvalidDay

ClearInvalidDay clears the value of the "invalid_day" field.

func (*UserPasswordPolicyUpsertOne) ClearInvalidLoginLimit

func (u *UserPasswordPolicyUpsertOne) ClearInvalidLoginLimit() *UserPasswordPolicyUpsertOne

ClearInvalidLoginLimit clears the value of the "invalid_login_limit" field.

func (*UserPasswordPolicyUpsertOne) ClearLength

ClearLength clears the value of the "length" field.

func (*UserPasswordPolicyUpsertOne) ClearRetry

ClearRetry clears the value of the "retry" field.

func (*UserPasswordPolicyUpsertOne) ClearUpdatedAt

ClearUpdatedAt clears the value of the "updated_at" field.

func (*UserPasswordPolicyUpsertOne) ClearUpdatedBy

ClearUpdatedBy clears the value of the "updated_by" field.

func (*UserPasswordPolicyUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserPasswordPolicyUpsertOne) Exec

Exec executes the query.

func (*UserPasswordPolicyUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserPasswordPolicyUpsertOne) ID

func (u *UserPasswordPolicyUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserPasswordPolicyUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserPasswordPolicyUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserPasswordPolicy.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserPasswordPolicyUpsertOne) SetAllowIncludeUserName

func (u *UserPasswordPolicyUpsertOne) SetAllowIncludeUserName(v bool) *UserPasswordPolicyUpsertOne

SetAllowIncludeUserName sets the "allow_include_user_name" field.

func (*UserPasswordPolicyUpsertOne) SetCaptchaTimes

SetCaptchaTimes sets the "captcha_times" field.

func (*UserPasswordPolicyUpsertOne) SetIncludeChar

SetIncludeChar sets the "include_char" field.

func (*UserPasswordPolicyUpsertOne) SetIncludeElement

SetIncludeElement sets the "include_element" field.

func (*UserPasswordPolicyUpsertOne) SetInvalidDay

SetInvalidDay sets the "invalid_day" field.

func (*UserPasswordPolicyUpsertOne) SetInvalidLoginLimit

func (u *UserPasswordPolicyUpsertOne) SetInvalidLoginLimit(v bool) *UserPasswordPolicyUpsertOne

SetInvalidLoginLimit sets the "invalid_login_limit" field.

func (*UserPasswordPolicyUpsertOne) SetLength

SetLength sets the "length" field.

func (*UserPasswordPolicyUpsertOne) SetRetry

SetRetry sets the "retry" field.

func (*UserPasswordPolicyUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UserPasswordPolicyUpsertOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*UserPasswordPolicyUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserPasswordPolicyCreate.OnConflict documentation for more info.

func (*UserPasswordPolicyUpsertOne) UpdateAllowIncludeUserName

func (u *UserPasswordPolicyUpsertOne) UpdateAllowIncludeUserName() *UserPasswordPolicyUpsertOne

UpdateAllowIncludeUserName sets the "allow_include_user_name" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateCaptchaTimes

UpdateCaptchaTimes sets the "captcha_times" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateIncludeChar

UpdateIncludeChar sets the "include_char" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateIncludeElement

func (u *UserPasswordPolicyUpsertOne) UpdateIncludeElement() *UserPasswordPolicyUpsertOne

UpdateIncludeElement sets the "include_element" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateInvalidDay

UpdateInvalidDay sets the "invalid_day" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateInvalidLoginLimit

func (u *UserPasswordPolicyUpsertOne) UpdateInvalidLoginLimit() *UserPasswordPolicyUpsertOne

UpdateInvalidLoginLimit sets the "invalid_login_limit" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateLength

UpdateLength sets the "length" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) 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.UserPasswordPolicy.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(userpasswordpolicy.FieldID)
		}),
	).
	Exec(ctx)

func (*UserPasswordPolicyUpsertOne) UpdateRetry

UpdateRetry sets the "retry" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserPasswordPolicyUpsertOne) UpdateUpdatedBy

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type UserPasswordPolicyWhereInput

type UserPasswordPolicyWhereInput struct {
	Predicates []predicate.UserPasswordPolicy  `json:"-"`
	Not        *UserPasswordPolicyWhereInput   `json:"not,omitempty"`
	Or         []*UserPasswordPolicyWhereInput `json:"or,omitempty"`
	And        []*UserPasswordPolicyWhereInput `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"`

	// "tenant_id" field predicates.
	TenantID       *int  `json:"tenantID,omitempty"`
	TenantIDNEQ    *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn     []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn  []int `json:"tenantIDNotIn,omitempty"`
	TenantIDIsNil  bool  `json:"tenantIDIsNil,omitempty"`
	TenantIDNotNil bool  `json:"tenantIDNotNil,omitempty"`

	// "length" field predicates.
	Length       *int32  `json:"length,omitempty"`
	LengthNEQ    *int32  `json:"lengthNEQ,omitempty"`
	LengthIn     []int32 `json:"lengthIn,omitempty"`
	LengthNotIn  []int32 `json:"lengthNotIn,omitempty"`
	LengthGT     *int32  `json:"lengthGT,omitempty"`
	LengthGTE    *int32  `json:"lengthGTE,omitempty"`
	LengthLT     *int32  `json:"lengthLT,omitempty"`
	LengthLTE    *int32  `json:"lengthLTE,omitempty"`
	LengthIsNil  bool    `json:"lengthIsNil,omitempty"`
	LengthNotNil bool    `json:"lengthNotNil,omitempty"`

	// "include_element" field predicates.
	IncludeElement       *int32  `json:"includeElement,omitempty"`
	IncludeElementNEQ    *int32  `json:"includeElementNEQ,omitempty"`
	IncludeElementIn     []int32 `json:"includeElementIn,omitempty"`
	IncludeElementNotIn  []int32 `json:"includeElementNotIn,omitempty"`
	IncludeElementGT     *int32  `json:"includeElementGT,omitempty"`
	IncludeElementGTE    *int32  `json:"includeElementGTE,omitempty"`
	IncludeElementLT     *int32  `json:"includeElementLT,omitempty"`
	IncludeElementLTE    *int32  `json:"includeElementLTE,omitempty"`
	IncludeElementIsNil  bool    `json:"includeElementIsNil,omitempty"`
	IncludeElementNotNil bool    `json:"includeElementNotNil,omitempty"`

	// "include_char" field predicates.
	IncludeChar       *int32  `json:"includeChar,omitempty"`
	IncludeCharNEQ    *int32  `json:"includeCharNEQ,omitempty"`
	IncludeCharIn     []int32 `json:"includeCharIn,omitempty"`
	IncludeCharNotIn  []int32 `json:"includeCharNotIn,omitempty"`
	IncludeCharGT     *int32  `json:"includeCharGT,omitempty"`
	IncludeCharGTE    *int32  `json:"includeCharGTE,omitempty"`
	IncludeCharLT     *int32  `json:"includeCharLT,omitempty"`
	IncludeCharLTE    *int32  `json:"includeCharLTE,omitempty"`
	IncludeCharIsNil  bool    `json:"includeCharIsNil,omitempty"`
	IncludeCharNotNil bool    `json:"includeCharNotNil,omitempty"`

	// "allow_include_user_name" field predicates.
	AllowIncludeUserName       *bool `json:"allowIncludeUserName,omitempty"`
	AllowIncludeUserNameNEQ    *bool `json:"allowIncludeUserNameNEQ,omitempty"`
	AllowIncludeUserNameIsNil  bool  `json:"allowIncludeUserNameIsNil,omitempty"`
	AllowIncludeUserNameNotNil bool  `json:"allowIncludeUserNameNotNil,omitempty"`

	// "invalid_day" field predicates.
	InvalidDay       *int32  `json:"invalidDay,omitempty"`
	InvalidDayNEQ    *int32  `json:"invalidDayNEQ,omitempty"`
	InvalidDayIn     []int32 `json:"invalidDayIn,omitempty"`
	InvalidDayNotIn  []int32 `json:"invalidDayNotIn,omitempty"`
	InvalidDayGT     *int32  `json:"invalidDayGT,omitempty"`
	InvalidDayGTE    *int32  `json:"invalidDayGTE,omitempty"`
	InvalidDayLT     *int32  `json:"invalidDayLT,omitempty"`
	InvalidDayLTE    *int32  `json:"invalidDayLTE,omitempty"`
	InvalidDayIsNil  bool    `json:"invalidDayIsNil,omitempty"`
	InvalidDayNotNil bool    `json:"invalidDayNotNil,omitempty"`

	// "invalid_login_limit" field predicates.
	InvalidLoginLimit       *bool `json:"invalidLoginLimit,omitempty"`
	InvalidLoginLimitNEQ    *bool `json:"invalidLoginLimitNEQ,omitempty"`
	InvalidLoginLimitIsNil  bool  `json:"invalidLoginLimitIsNil,omitempty"`
	InvalidLoginLimitNotNil bool  `json:"invalidLoginLimitNotNil,omitempty"`

	// "retry" field predicates.
	Retry       *int32  `json:"retry,omitempty"`
	RetryNEQ    *int32  `json:"retryNEQ,omitempty"`
	RetryIn     []int32 `json:"retryIn,omitempty"`
	RetryNotIn  []int32 `json:"retryNotIn,omitempty"`
	RetryGT     *int32  `json:"retryGT,omitempty"`
	RetryGTE    *int32  `json:"retryGTE,omitempty"`
	RetryLT     *int32  `json:"retryLT,omitempty"`
	RetryLTE    *int32  `json:"retryLTE,omitempty"`
	RetryIsNil  bool    `json:"retryIsNil,omitempty"`
	RetryNotNil bool    `json:"retryNotNil,omitempty"`

	// "captcha_times" field predicates.
	CaptchaTimes       *int32  `json:"captchaTimes,omitempty"`
	CaptchaTimesNEQ    *int32  `json:"captchaTimesNEQ,omitempty"`
	CaptchaTimesIn     []int32 `json:"captchaTimesIn,omitempty"`
	CaptchaTimesNotIn  []int32 `json:"captchaTimesNotIn,omitempty"`
	CaptchaTimesGT     *int32  `json:"captchaTimesGT,omitempty"`
	CaptchaTimesGTE    *int32  `json:"captchaTimesGTE,omitempty"`
	CaptchaTimesLT     *int32  `json:"captchaTimesLT,omitempty"`
	CaptchaTimesLTE    *int32  `json:"captchaTimesLTE,omitempty"`
	CaptchaTimesIsNil  bool    `json:"captchaTimesIsNil,omitempty"`
	CaptchaTimesNotNil bool    `json:"captchaTimesNotNil,omitempty"`

	// "org" edge predicates.
	HasOrg     *bool            `json:"hasOrg,omitempty"`
	HasOrgWith []*OrgWhereInput `json:"hasOrgWith,omitempty"`
}

UserPasswordPolicyWhereInput represents a where input for filtering UserPasswordPolicy queries.

func (*UserPasswordPolicyWhereInput) AddPredicates

func (i *UserPasswordPolicyWhereInput) AddPredicates(predicates ...predicate.UserPasswordPolicy)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*UserPasswordPolicyWhereInput) Filter

Filter applies the UserPasswordPolicyWhereInput filter on the UserPasswordPolicyQuery builder.

func (*UserPasswordPolicyWhereInput) P

P returns a predicate for filtering userpasswordpolicies. An error is returned if the input is empty or invalid.

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) ExecContext

func (c *UserPasswordQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPasswordQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c UserPasswordSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c UserPasswordSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *UserPasswordUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPasswordUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableSalt

func (upu *UserPasswordUpdate) SetNillableSalt(s *string) *UserPasswordUpdate

SetNillableSalt sets the "salt" field if the given value is not nil.

func (*UserPasswordUpdate) SetNillableScene

func (upu *UserPasswordUpdate) SetNillableScene(u *userpassword.Scene) *UserPasswordUpdate

SetNillableScene sets the "scene" 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) ExecContext

func (c *UserPasswordUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserPasswordUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillableSalt

func (upuo *UserPasswordUpdateOne) SetNillableSalt(s *string) *UserPasswordUpdateOne

SetNillableSalt sets the "salt" field if the given value is not nil.

func (*UserPasswordUpdateOne) SetNillableScene

func (upuo *UserPasswordUpdateOne) SetNillableScene(u *userpassword.Scene) *UserPasswordUpdateOne

SetNillableScene sets the "scene" 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) ExecContext

func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryAddresses

func (uq *UserQuery) QueryAddresses() *UserAddrQuery

QueryAddresses chains the current query on the "addresses" edge.

func (*UserQuery) QueryCitizenship

func (uq *UserQuery) QueryCitizenship() *CountryQuery

QueryCitizenship chains the current query on the "citizenship" edge.

func (*UserQuery) QueryContext

func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) QueryUserQuota

func (uq *UserQuery) QueryUserQuota() *QuotaQuery

QueryUserQuota chains the current query on the "user_quota" 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) WithAddresses

func (uq *UserQuery) WithAddresses(opts ...func(*UserAddrQuery)) *UserQuery

WithAddresses tells the query-builder to eager-load the nodes that are connected to the "addresses" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithCitizenship

func (uq *UserQuery) WithCitizenship(opts ...func(*CountryQuery)) *UserQuery

WithCitizenship tells the query-builder to eager-load the nodes that are connected to the "citizenship" edge. The optional arguments are used to configure the query builder of the edge.

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) WithNamedAddresses

func (uq *UserQuery) WithNamedAddresses(name string, opts ...func(*UserAddrQuery)) *UserQuery

WithNamedAddresses tells the query-builder to eager-load the nodes that are connected to the "addresses" edge with the given name. 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) WithNamedUserQuota

func (uq *UserQuery) WithNamedUserQuota(name string, opts ...func(*QuotaQuery)) *UserQuery

WithNamedUserQuota tells the query-builder to eager-load the nodes that are connected to the "user_quota" 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.

func (*UserQuery) WithUserQuota

func (uq *UserQuery) WithUserQuota(opts ...func(*QuotaQuery)) *UserQuery

WithUserQuota tells the query-builder to eager-load the nodes that are connected to the "user_quota" 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) ExecContext

func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) AddAddressIDs

func (uu *UserUpdate) AddAddressIDs(ids ...int) *UserUpdate

AddAddressIDs adds the "addresses" edge to the UserAddr entity by IDs.

func (*UserUpdate) AddAddresses

func (uu *UserUpdate) AddAddresses(u ...*UserAddr) *UserUpdate

AddAddresses adds the "addresses" edges to the UserAddr entity.

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) AddUserQuota

func (uu *UserUpdate) AddUserQuota(q ...*Quota) *UserUpdate

AddUserQuota adds the "user_quota" edges to the Quota entity.

func (*UserUpdate) AddUserQuotumIDs

func (uu *UserUpdate) AddUserQuotumIDs(ids ...int) *UserUpdate

AddUserQuotumIDs adds the "user_quota" edge to the Quota entity by IDs.

func (*UserUpdate) ClearAddresses

func (uu *UserUpdate) ClearAddresses() *UserUpdate

ClearAddresses clears all "addresses" edges to the UserAddr entity.

func (*UserUpdate) ClearAvatar

func (uu *UserUpdate) ClearAvatar() *UserUpdate

ClearAvatar clears the value of the "avatar" field.

func (*UserUpdate) ClearCitizenship

func (uu *UserUpdate) ClearCitizenship() *UserUpdate

ClearCitizenship clears the "citizenship" edge to the Country entity.

func (*UserUpdate) ClearCitizenshipID

func (uu *UserUpdate) ClearCitizenshipID() *UserUpdate

ClearCitizenshipID clears the value of the "citizenship_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) ClearFirstName

func (uu *UserUpdate) ClearFirstName() *UserUpdate

ClearFirstName clears the value of the "first_name" field.

func (*UserUpdate) ClearIdentities

func (uu *UserUpdate) ClearIdentities() *UserUpdate

ClearIdentities clears all "identities" edges to the UserIdentity entity.

func (*UserUpdate) ClearLang

func (uu *UserUpdate) ClearLang() *UserUpdate

ClearLang clears the value of the "lang" field.

func (*UserUpdate) ClearLastName

func (uu *UserUpdate) ClearLastName() *UserUpdate

ClearLastName clears the value of the "last_name" field.

func (*UserUpdate) ClearLoginProfile

func (uu *UserUpdate) ClearLoginProfile() *UserUpdate

ClearLoginProfile clears the "login_profile" edge to the UserLoginProfile entity.

func (*UserUpdate) ClearMiddleName

func (uu *UserUpdate) ClearMiddleName() *UserUpdate

ClearMiddleName clears the value of the "middle_name" 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) ClearUserQuota

func (uu *UserUpdate) ClearUserQuota() *UserUpdate

ClearUserQuota clears all "user_quota" edges to the Quota entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecContext

func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserUpdate) RemoveAddressIDs

func (uu *UserUpdate) RemoveAddressIDs(ids ...int) *UserUpdate

RemoveAddressIDs removes the "addresses" edge to UserAddr entities by IDs.

func (*UserUpdate) RemoveAddresses

func (uu *UserUpdate) RemoveAddresses(u ...*UserAddr) *UserUpdate

RemoveAddresses removes "addresses" edges to UserAddr entities.

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) RemoveUserQuota

func (uu *UserUpdate) RemoveUserQuota(q ...*Quota) *UserUpdate

RemoveUserQuota removes "user_quota" edges to Quota entities.

func (*UserUpdate) RemoveUserQuotumIDs

func (uu *UserUpdate) RemoveUserQuotumIDs(ids ...int) *UserUpdate

RemoveUserQuotumIDs removes the "user_quota" edge to Quota entities by IDs.

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) SetAvatar

func (uu *UserUpdate) SetAvatar(s string) *UserUpdate

SetAvatar sets the "avatar" field.

func (*UserUpdate) SetCitizenship

func (uu *UserUpdate) SetCitizenship(c *Country) *UserUpdate

SetCitizenship sets the "citizenship" edge to the Country entity.

func (*UserUpdate) SetCitizenshipID

func (uu *UserUpdate) SetCitizenshipID(i int) *UserUpdate

SetCitizenshipID sets the "citizenship_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) SetFirstName

func (uu *UserUpdate) SetFirstName(s string) *UserUpdate

SetFirstName sets the "first_name" field.

func (*UserUpdate) SetGender

func (uu *UserUpdate) SetGender(u user.Gender) *UserUpdate

SetGender sets the "gender" 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) SetLang

func (uu *UserUpdate) SetLang(s string) *UserUpdate

SetLang sets the "lang" field.

func (*UserUpdate) SetLastName

func (uu *UserUpdate) SetLastName(s string) *UserUpdate

SetLastName sets the "last_name" field.

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) SetMiddleName

func (uu *UserUpdate) SetMiddleName(s string) *UserUpdate

SetMiddleName sets the "middle_name" field.

func (*UserUpdate) SetNillableAvatar

func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate

SetNillableAvatar sets the "avatar" field if the given value is not nil.

func (*UserUpdate) SetNillableCitizenshipID

func (uu *UserUpdate) SetNillableCitizenshipID(i *int) *UserUpdate

SetNillableCitizenshipID sets the "citizenship_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) SetNillableCreationType

func (uu *UserUpdate) SetNillableCreationType(ut *user.CreationType) *UserUpdate

SetNillableCreationType sets the "creation_type" 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) SetNillableDisplayName

func (uu *UserUpdate) SetNillableDisplayName(s *string) *UserUpdate

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

func (*UserUpdate) SetNillableFirstName

func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserUpdate) SetNillableGender

func (uu *UserUpdate) SetNillableGender(u *user.Gender) *UserUpdate

SetNillableGender sets the "gender" field if the given value is not nil.

func (*UserUpdate) SetNillableLang

func (uu *UserUpdate) SetNillableLang(s *string) *UserUpdate

SetNillableLang sets the "lang" field if the given value is not nil.

func (*UserUpdate) SetNillableLastName

func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate

SetNillableLastName sets the "last_name" 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) SetNillableMiddleName

func (uu *UserUpdate) SetNillableMiddleName(s *string) *UserUpdate

SetNillableMiddleName sets the "middle_name" field if the given value is not nil.

func (*UserUpdate) SetNillablePrincipalName

func (uu *UserUpdate) SetNillablePrincipalName(s *string) *UserUpdate

SetNillablePrincipalName sets the "principal_name" field if the given value is not nil.

func (*UserUpdate) SetNillableRegisterIP

func (uu *UserUpdate) SetNillableRegisterIP(s *string) *UserUpdate

SetNillableRegisterIP sets the "register_ip" field if the given value is not nil.

func (*UserUpdate) SetNillableStatus

func (uu *UserUpdate) SetNillableStatus(ts *types.UserStatus) *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) SetNillableUserType

func (uu *UserUpdate) SetNillableUserType(ut *user.UserType) *UserUpdate

SetNillableUserType sets the "user_type" 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 types.UserStatus) *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) AddAddressIDs

func (uuo *UserUpdateOne) AddAddressIDs(ids ...int) *UserUpdateOne

AddAddressIDs adds the "addresses" edge to the UserAddr entity by IDs.

func (*UserUpdateOne) AddAddresses

func (uuo *UserUpdateOne) AddAddresses(u ...*UserAddr) *UserUpdateOne

AddAddresses adds the "addresses" edges to the UserAddr entity.

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) AddUserQuota

func (uuo *UserUpdateOne) AddUserQuota(q ...*Quota) *UserUpdateOne

AddUserQuota adds the "user_quota" edges to the Quota entity.

func (*UserUpdateOne) AddUserQuotumIDs

func (uuo *UserUpdateOne) AddUserQuotumIDs(ids ...int) *UserUpdateOne

AddUserQuotumIDs adds the "user_quota" edge to the Quota entity by IDs.

func (*UserUpdateOne) ClearAddresses

func (uuo *UserUpdateOne) ClearAddresses() *UserUpdateOne

ClearAddresses clears all "addresses" edges to the UserAddr entity.

func (*UserUpdateOne) ClearAvatar

func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne

ClearAvatar clears the value of the "avatar" field.

func (*UserUpdateOne) ClearCitizenship

func (uuo *UserUpdateOne) ClearCitizenship() *UserUpdateOne

ClearCitizenship clears the "citizenship" edge to the Country entity.

func (*UserUpdateOne) ClearCitizenshipID

func (uuo *UserUpdateOne) ClearCitizenshipID() *UserUpdateOne

ClearCitizenshipID clears the value of the "citizenship_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) ClearFirstName

func (uuo *UserUpdateOne) ClearFirstName() *UserUpdateOne

ClearFirstName clears the value of the "first_name" field.

func (*UserUpdateOne) ClearIdentities

func (uuo *UserUpdateOne) ClearIdentities() *UserUpdateOne

ClearIdentities clears all "identities" edges to the UserIdentity entity.

func (*UserUpdateOne) ClearLang

func (uuo *UserUpdateOne) ClearLang() *UserUpdateOne

ClearLang clears the value of the "lang" field.

func (*UserUpdateOne) ClearLastName

func (uuo *UserUpdateOne) ClearLastName() *UserUpdateOne

ClearLastName clears the value of the "last_name" field.

func (*UserUpdateOne) ClearLoginProfile

func (uuo *UserUpdateOne) ClearLoginProfile() *UserUpdateOne

ClearLoginProfile clears the "login_profile" edge to the UserLoginProfile entity.

func (*UserUpdateOne) ClearMiddleName

func (uuo *UserUpdateOne) ClearMiddleName() *UserUpdateOne

ClearMiddleName clears the value of the "middle_name" 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) ClearUserQuota

func (uuo *UserUpdateOne) ClearUserQuota() *UserUpdateOne

ClearUserQuota clears all "user_quota" edges to the Quota entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecContext

func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserUpdateOne) RemoveAddressIDs

func (uuo *UserUpdateOne) RemoveAddressIDs(ids ...int) *UserUpdateOne

RemoveAddressIDs removes the "addresses" edge to UserAddr entities by IDs.

func (*UserUpdateOne) RemoveAddresses

func (uuo *UserUpdateOne) RemoveAddresses(u ...*UserAddr) *UserUpdateOne

RemoveAddresses removes "addresses" edges to UserAddr entities.

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) RemoveUserQuota

func (uuo *UserUpdateOne) RemoveUserQuota(q ...*Quota) *UserUpdateOne

RemoveUserQuota removes "user_quota" edges to Quota entities.

func (*UserUpdateOne) RemoveUserQuotumIDs

func (uuo *UserUpdateOne) RemoveUserQuotumIDs(ids ...int) *UserUpdateOne

RemoveUserQuotumIDs removes the "user_quota" edge to Quota entities by IDs.

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) SetAvatar

func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne

SetAvatar sets the "avatar" field.

func (*UserUpdateOne) SetCitizenship

func (uuo *UserUpdateOne) SetCitizenship(c *Country) *UserUpdateOne

SetCitizenship sets the "citizenship" edge to the Country entity.

func (*UserUpdateOne) SetCitizenshipID

func (uuo *UserUpdateOne) SetCitizenshipID(i int) *UserUpdateOne

SetCitizenshipID sets the "citizenship_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) SetFirstName

func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne

SetFirstName sets the "first_name" field.

func (*UserUpdateOne) SetGender

func (uuo *UserUpdateOne) SetGender(u user.Gender) *UserUpdateOne

SetGender sets the "gender" field.

func (*UserUpdateOne) SetInput

SetInput applies the change-set in the UpdateUserInput on the UserUpdateOne builder.

func (*UserUpdateOne) SetLang

func (uuo *UserUpdateOne) SetLang(s string) *UserUpdateOne

SetLang sets the "lang" field.

func (*UserUpdateOne) SetLastName

func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne

SetLastName sets the "last_name" field.

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) SetMiddleName

func (uuo *UserUpdateOne) SetMiddleName(s string) *UserUpdateOne

SetMiddleName sets the "middle_name" field.

func (*UserUpdateOne) SetNillableAvatar

func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne

SetNillableAvatar sets the "avatar" field if the given value is not nil.

func (*UserUpdateOne) SetNillableCitizenshipID

func (uuo *UserUpdateOne) SetNillableCitizenshipID(i *int) *UserUpdateOne

SetNillableCitizenshipID sets the "citizenship_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) SetNillableCreationType

func (uuo *UserUpdateOne) SetNillableCreationType(ut *user.CreationType) *UserUpdateOne

SetNillableCreationType sets the "creation_type" 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) SetNillableDisplayName

func (uuo *UserUpdateOne) SetNillableDisplayName(s *string) *UserUpdateOne

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableFirstName

func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableGender

func (uuo *UserUpdateOne) SetNillableGender(u *user.Gender) *UserUpdateOne

SetNillableGender sets the "gender" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLang

func (uuo *UserUpdateOne) SetNillableLang(s *string) *UserUpdateOne

SetNillableLang sets the "lang" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLastName

func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne

SetNillableLastName sets the "last_name" 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) SetNillableMiddleName

func (uuo *UserUpdateOne) SetNillableMiddleName(s *string) *UserUpdateOne

SetNillableMiddleName sets the "middle_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePrincipalName

func (uuo *UserUpdateOne) SetNillablePrincipalName(s *string) *UserUpdateOne

SetNillablePrincipalName sets the "principal_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableRegisterIP

func (uuo *UserUpdateOne) SetNillableRegisterIP(s *string) *UserUpdateOne

SetNillableRegisterIP sets the "register_ip" field if the given value is not nil.

func (*UserUpdateOne) SetNillableStatus

func (uuo *UserUpdateOne) SetNillableStatus(ts *types.UserStatus) *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) SetNillableUserType

func (uuo *UserUpdateOne) SetNillableUserType(ut *user.UserType) *UserUpdateOne

SetNillableUserType sets the "user_type" 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 types.UserStatus) *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) AddUpdatedBy

func (u *UserUpsert) AddUpdatedBy(v int) *UserUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*UserUpsert) ClearAvatar

func (u *UserUpsert) ClearAvatar() *UserUpsert

ClearAvatar clears the value of the "avatar" field.

func (*UserUpsert) ClearCitizenshipID

func (u *UserUpsert) ClearCitizenshipID() *UserUpsert

ClearCitizenshipID clears the value of the "citizenship_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) ClearFirstName

func (u *UserUpsert) ClearFirstName() *UserUpsert

ClearFirstName clears the value of the "first_name" field.

func (*UserUpsert) ClearLang

func (u *UserUpsert) ClearLang() *UserUpsert

ClearLang clears the value of the "lang" field.

func (*UserUpsert) ClearLastName

func (u *UserUpsert) ClearLastName() *UserUpsert

ClearLastName clears the value of the "last_name" field.

func (*UserUpsert) ClearMiddleName

func (u *UserUpsert) ClearMiddleName() *UserUpsert

ClearMiddleName clears the value of the "middle_name" 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) SetAvatar

func (u *UserUpsert) SetAvatar(v string) *UserUpsert

SetAvatar sets the "avatar" field.

func (*UserUpsert) SetCitizenshipID

func (u *UserUpsert) SetCitizenshipID(v int) *UserUpsert

SetCitizenshipID sets the "citizenship_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) SetFirstName

func (u *UserUpsert) SetFirstName(v string) *UserUpsert

SetFirstName sets the "first_name" field.

func (*UserUpsert) SetGender

func (u *UserUpsert) SetGender(v user.Gender) *UserUpsert

SetGender sets the "gender" field.

func (*UserUpsert) SetLang

func (u *UserUpsert) SetLang(v string) *UserUpsert

SetLang sets the "lang" field.

func (*UserUpsert) SetLastName

func (u *UserUpsert) SetLastName(v string) *UserUpsert

SetLastName sets the "last_name" field.

func (*UserUpsert) SetMiddleName

func (u *UserUpsert) SetMiddleName(v string) *UserUpsert

SetMiddleName sets the "middle_name" 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 types.UserStatus) *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) UpdateAvatar

func (u *UserUpsert) UpdateAvatar() *UserUpsert

UpdateAvatar sets the "avatar" field to the value that was provided on create.

func (*UserUpsert) UpdateCitizenshipID

func (u *UserUpsert) UpdateCitizenshipID() *UserUpsert

UpdateCitizenshipID sets the "citizenship_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) UpdateFirstName

func (u *UserUpsert) UpdateFirstName() *UserUpsert

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsert) UpdateGender

func (u *UserUpsert) UpdateGender() *UserUpsert

UpdateGender sets the "gender" field to the value that was provided on create.

func (*UserUpsert) UpdateLang

func (u *UserUpsert) UpdateLang() *UserUpsert

UpdateLang sets the "lang" field to the value that was provided on create.

func (*UserUpsert) UpdateLastName

func (u *UserUpsert) UpdateLastName() *UserUpsert

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsert) UpdateMiddleName

func (u *UserUpsert) UpdateMiddleName() *UserUpsert

UpdateMiddleName sets the "middle_name" 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) AddUpdatedBy

func (u *UserUpsertBulk) AddUpdatedBy(v int) *UserUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*UserUpsertBulk) ClearAvatar

func (u *UserUpsertBulk) ClearAvatar() *UserUpsertBulk

ClearAvatar clears the value of the "avatar" field.

func (*UserUpsertBulk) ClearCitizenshipID

func (u *UserUpsertBulk) ClearCitizenshipID() *UserUpsertBulk

ClearCitizenshipID clears the value of the "citizenship_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) ClearFirstName

func (u *UserUpsertBulk) ClearFirstName() *UserUpsertBulk

ClearFirstName clears the value of the "first_name" field.

func (*UserUpsertBulk) ClearLang

func (u *UserUpsertBulk) ClearLang() *UserUpsertBulk

ClearLang clears the value of the "lang" field.

func (*UserUpsertBulk) ClearLastName

func (u *UserUpsertBulk) ClearLastName() *UserUpsertBulk

ClearLastName clears the value of the "last_name" field.

func (*UserUpsertBulk) ClearMiddleName

func (u *UserUpsertBulk) ClearMiddleName() *UserUpsertBulk

ClearMiddleName clears the value of the "middle_name" 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) SetAvatar

func (u *UserUpsertBulk) SetAvatar(v string) *UserUpsertBulk

SetAvatar sets the "avatar" field.

func (*UserUpsertBulk) SetCitizenshipID

func (u *UserUpsertBulk) SetCitizenshipID(v int) *UserUpsertBulk

SetCitizenshipID sets the "citizenship_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) SetFirstName

func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk

SetFirstName sets the "first_name" field.

func (*UserUpsertBulk) SetGender

func (u *UserUpsertBulk) SetGender(v user.Gender) *UserUpsertBulk

SetGender sets the "gender" field.

func (*UserUpsertBulk) SetLang

func (u *UserUpsertBulk) SetLang(v string) *UserUpsertBulk

SetLang sets the "lang" field.

func (*UserUpsertBulk) SetLastName

func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk

SetLastName sets the "last_name" field.

func (*UserUpsertBulk) SetMiddleName

func (u *UserUpsertBulk) SetMiddleName(v string) *UserUpsertBulk

SetMiddleName sets the "middle_name" 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

func (u *UserUpsertBulk) SetStatus(v types.UserStatus) *UserUpsertBulk

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) UpdateAvatar

func (u *UserUpsertBulk) UpdateAvatar() *UserUpsertBulk

UpdateAvatar sets the "avatar" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateCitizenshipID

func (u *UserUpsertBulk) UpdateCitizenshipID() *UserUpsertBulk

UpdateCitizenshipID sets the "citizenship_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) UpdateFirstName

func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateGender

func (u *UserUpsertBulk) UpdateGender() *UserUpsertBulk

UpdateGender sets the "gender" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLang

func (u *UserUpsertBulk) UpdateLang() *UserUpsertBulk

UpdateLang sets the "lang" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLastName

func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateMiddleName

func (u *UserUpsertBulk) UpdateMiddleName() *UserUpsertBulk

UpdateMiddleName sets the "middle_name" 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) AddUpdatedBy

func (u *UserUpsertOne) AddUpdatedBy(v int) *UserUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*UserUpsertOne) ClearAvatar

func (u *UserUpsertOne) ClearAvatar() *UserUpsertOne

ClearAvatar clears the value of the "avatar" field.

func (*UserUpsertOne) ClearCitizenshipID

func (u *UserUpsertOne) ClearCitizenshipID() *UserUpsertOne

ClearCitizenshipID clears the value of the "citizenship_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) ClearFirstName

func (u *UserUpsertOne) ClearFirstName() *UserUpsertOne

ClearFirstName clears the value of the "first_name" field.

func (*UserUpsertOne) ClearLang

func (u *UserUpsertOne) ClearLang() *UserUpsertOne

ClearLang clears the value of the "lang" field.

func (*UserUpsertOne) ClearLastName

func (u *UserUpsertOne) ClearLastName() *UserUpsertOne

ClearLastName clears the value of the "last_name" field.

func (*UserUpsertOne) ClearMiddleName

func (u *UserUpsertOne) ClearMiddleName() *UserUpsertOne

ClearMiddleName clears the value of the "middle_name" 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) SetAvatar

func (u *UserUpsertOne) SetAvatar(v string) *UserUpsertOne

SetAvatar sets the "avatar" field.

func (*UserUpsertOne) SetCitizenshipID

func (u *UserUpsertOne) SetCitizenshipID(v int) *UserUpsertOne

SetCitizenshipID sets the "citizenship_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) SetFirstName

func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne

SetFirstName sets the "first_name" field.

func (*UserUpsertOne) SetGender

func (u *UserUpsertOne) SetGender(v user.Gender) *UserUpsertOne

SetGender sets the "gender" field.

func (*UserUpsertOne) SetLang

func (u *UserUpsertOne) SetLang(v string) *UserUpsertOne

SetLang sets the "lang" field.

func (*UserUpsertOne) SetLastName

func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne

SetLastName sets the "last_name" field.

func (*UserUpsertOne) SetMiddleName

func (u *UserUpsertOne) SetMiddleName(v string) *UserUpsertOne

SetMiddleName sets the "middle_name" 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 types.UserStatus) *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) UpdateAvatar

func (u *UserUpsertOne) UpdateAvatar() *UserUpsertOne

UpdateAvatar sets the "avatar" field to the value that was provided on create.

func (*UserUpsertOne) UpdateCitizenshipID

func (u *UserUpsertOne) UpdateCitizenshipID() *UserUpsertOne

UpdateCitizenshipID sets the "citizenship_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) UpdateFirstName

func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne

UpdateFirstName sets the "first_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateGender

func (u *UserUpsertOne) UpdateGender() *UserUpsertOne

UpdateGender sets the "gender" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLang

func (u *UserUpsertOne) UpdateLang() *UserUpsertOne

UpdateLang sets the "lang" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLastName

func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne

UpdateLastName sets the "last_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateMiddleName

func (u *UserUpsertOne) UpdateMiddleName() *UserUpsertOne

UpdateMiddleName sets the "middle_name" 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"`

	// "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       *types.UserStatus  `json:"status,omitempty"`
	StatusNEQ    *types.UserStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []types.UserStatus `json:"statusIn,omitempty"`
	StatusNotIn  []types.UserStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool               `json:"statusIsNil,omitempty"`
	StatusNotNil bool               `json:"statusNotNil,omitempty"`

	// "gender" field predicates.
	Gender      *user.Gender  `json:"gender,omitempty"`
	GenderNEQ   *user.Gender  `json:"genderNEQ,omitempty"`
	GenderIn    []user.Gender `json:"genderIn,omitempty"`
	GenderNotIn []user.Gender `json:"genderNotIn,omitempty"`

	// "citizenship_id" field predicates.
	CitizenshipID       *int  `json:"citizenshipID,omitempty"`
	CitizenshipIDNEQ    *int  `json:"citizenshipIDNEQ,omitempty"`
	CitizenshipIDIn     []int `json:"citizenshipIDIn,omitempty"`
	CitizenshipIDNotIn  []int `json:"citizenshipIDNotIn,omitempty"`
	CitizenshipIDIsNil  bool  `json:"citizenshipIDIsNil,omitempty"`
	CitizenshipIDNotNil bool  `json:"citizenshipIDNotNil,omitempty"`

	// "first_name" field predicates.
	FirstName             *string  `json:"firstName,omitempty"`
	FirstNameNEQ          *string  `json:"firstNameNEQ,omitempty"`
	FirstNameIn           []string `json:"firstNameIn,omitempty"`
	FirstNameNotIn        []string `json:"firstNameNotIn,omitempty"`
	FirstNameGT           *string  `json:"firstNameGT,omitempty"`
	FirstNameGTE          *string  `json:"firstNameGTE,omitempty"`
	FirstNameLT           *string  `json:"firstNameLT,omitempty"`
	FirstNameLTE          *string  `json:"firstNameLTE,omitempty"`
	FirstNameContains     *string  `json:"firstNameContains,omitempty"`
	FirstNameHasPrefix    *string  `json:"firstNameHasPrefix,omitempty"`
	FirstNameHasSuffix    *string  `json:"firstNameHasSuffix,omitempty"`
	FirstNameIsNil        bool     `json:"firstNameIsNil,omitempty"`
	FirstNameNotNil       bool     `json:"firstNameNotNil,omitempty"`
	FirstNameEqualFold    *string  `json:"firstNameEqualFold,omitempty"`
	FirstNameContainsFold *string  `json:"firstNameContainsFold,omitempty"`

	// "middle_name" field predicates.
	MiddleName             *string  `json:"middleName,omitempty"`
	MiddleNameNEQ          *string  `json:"middleNameNEQ,omitempty"`
	MiddleNameIn           []string `json:"middleNameIn,omitempty"`
	MiddleNameNotIn        []string `json:"middleNameNotIn,omitempty"`
	MiddleNameGT           *string  `json:"middleNameGT,omitempty"`
	MiddleNameGTE          *string  `json:"middleNameGTE,omitempty"`
	MiddleNameLT           *string  `json:"middleNameLT,omitempty"`
	MiddleNameLTE          *string  `json:"middleNameLTE,omitempty"`
	MiddleNameContains     *string  `json:"middleNameContains,omitempty"`
	MiddleNameHasPrefix    *string  `json:"middleNameHasPrefix,omitempty"`
	MiddleNameHasSuffix    *string  `json:"middleNameHasSuffix,omitempty"`
	MiddleNameIsNil        bool     `json:"middleNameIsNil,omitempty"`
	MiddleNameNotNil       bool     `json:"middleNameNotNil,omitempty"`
	MiddleNameEqualFold    *string  `json:"middleNameEqualFold,omitempty"`
	MiddleNameContainsFold *string  `json:"middleNameContainsFold,omitempty"`

	// "last_name" field predicates.
	LastName             *string  `json:"lastName,omitempty"`
	LastNameNEQ          *string  `json:"lastNameNEQ,omitempty"`
	LastNameIn           []string `json:"lastNameIn,omitempty"`
	LastNameNotIn        []string `json:"lastNameNotIn,omitempty"`
	LastNameGT           *string  `json:"lastNameGT,omitempty"`
	LastNameGTE          *string  `json:"lastNameGTE,omitempty"`
	LastNameLT           *string  `json:"lastNameLT,omitempty"`
	LastNameLTE          *string  `json:"lastNameLTE,omitempty"`
	LastNameContains     *string  `json:"lastNameContains,omitempty"`
	LastNameHasPrefix    *string  `json:"lastNameHasPrefix,omitempty"`
	LastNameHasSuffix    *string  `json:"lastNameHasSuffix,omitempty"`
	LastNameIsNil        bool     `json:"lastNameIsNil,omitempty"`
	LastNameNotNil       bool     `json:"lastNameNotNil,omitempty"`
	LastNameEqualFold    *string  `json:"lastNameEqualFold,omitempty"`
	LastNameContainsFold *string  `json:"lastNameContainsFold,omitempty"`

	// "lang" field predicates.
	Lang             *string  `json:"lang,omitempty"`
	LangNEQ          *string  `json:"langNEQ,omitempty"`
	LangIn           []string `json:"langIn,omitempty"`
	LangNotIn        []string `json:"langNotIn,omitempty"`
	LangGT           *string  `json:"langGT,omitempty"`
	LangGTE          *string  `json:"langGTE,omitempty"`
	LangLT           *string  `json:"langLT,omitempty"`
	LangLTE          *string  `json:"langLTE,omitempty"`
	LangContains     *string  `json:"langContains,omitempty"`
	LangHasPrefix    *string  `json:"langHasPrefix,omitempty"`
	LangHasSuffix    *string  `json:"langHasSuffix,omitempty"`
	LangIsNil        bool     `json:"langIsNil,omitempty"`
	LangNotNil       bool     `json:"langNotNil,omitempty"`
	LangEqualFold    *string  `json:"langEqualFold,omitempty"`
	LangContainsFold *string  `json:"langContainsFold,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"`

	// "addresses" edge predicates.
	HasAddresses     *bool                 `json:"hasAddresses,omitempty"`
	HasAddressesWith []*UserAddrWhereInput `json:"hasAddressesWith,omitempty"`

	// "citizenship" edge predicates.
	HasCitizenship     *bool                `json:"hasCitizenship,omitempty"`
	HasCitizenshipWith []*CountryWhereInput `json:"hasCitizenshipWith,omitempty"`

	// "user_quota" edge predicates.
	HasUserQuota     *bool              `json:"hasUserQuota,omitempty"`
	HasUserQuotaWith []*QuotaWhereInput `json:"hasUserQuotaWith,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