ent

package
v0.0.0-...-f60b9ba Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

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.
	TypeOrganization       = "Organization"
	TypeOrganizationParent = "OrganizationParent"
	TypeOrganizationPerson = "OrganizationPerson"
	TypePerson             = "Person"
)

Variables

This section is empty.

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 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.

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 Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// OrganizationParent is the client for interacting with the OrganizationParent builders.
	OrganizationParent *OrganizationParentClient
	// OrganizationPerson is the client for interacting with the OrganizationPerson builders.
	OrganizationPerson *OrganizationPersonClient
	// Person is the client for interacting with the Person builders.
	Person *PersonClient
	// 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().
	Organization.
	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) 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 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 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 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 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 Organization

type Organization struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// DateCreated holds the value of the "date_created" field.
	DateCreated time.Time `json:"date_created,omitempty"`
	// DateUpdated holds the value of the "date_updated" field.
	DateUpdated time.Time `json:"date_updated,omitempty"`
	// PublicID holds the value of the "public_id" field.
	PublicID string `json:"public_id,omitempty"`
	// Identifier holds the value of the "identifier" field.
	Identifier []string `json:"identifier,omitempty"`
	// IdentifierValues holds the value of the "identifier_values" field.
	IdentifierValues []string `json:"identifier_values,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Acronym holds the value of the "acronym" field.
	Acronym string `json:"acronym,omitempty"`
	// NameDut holds the value of the "name_dut" field.
	NameDut string `json:"name_dut,omitempty"`
	// NameEng holds the value of the "name_eng" field.
	NameEng string `json:"name_eng,omitempty"`
	// contains filtered or unexported fields
}

Organization is the model entity for the Organization schema.

func (*Organization) ExecContext

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

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

func (*Organization) QueryContext

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

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

func (*Organization) String

func (o *Organization) String() string

String implements the fmt.Stringer.

func (*Organization) Unwrap

func (o *Organization) Unwrap() *Organization

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

func (o *Organization) Update() *OrganizationUpdateOne

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

func (*Organization) Value

func (o *Organization) Value(name string) (ent.Value, error)

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

type OrganizationClient

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

OrganizationClient is a client for the Organization schema.

func NewOrganizationClient

func NewOrganizationClient(c config) *OrganizationClient

NewOrganizationClient returns a client for the Organization from the given config.

func (*OrganizationClient) Create

Create returns a builder for creating a Organization entity.

func (*OrganizationClient) CreateBulk

func (c *OrganizationClient) CreateBulk(builders ...*OrganizationCreate) *OrganizationCreateBulk

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

func (*OrganizationClient) Delete

Delete returns a delete builder for Organization.

func (*OrganizationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrganizationClient) DeleteOneID

func (c *OrganizationClient) DeleteOneID(id int) *OrganizationDeleteOne

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

func (*OrganizationClient) ExecContext

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

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

func (*OrganizationClient) Get

Get returns a Organization entity by its id.

func (*OrganizationClient) GetX

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

func (*OrganizationClient) Hooks

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

Hooks returns the client hooks.

func (*OrganizationClient) Intercept

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

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

func (*OrganizationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OrganizationClient) Query

Query returns a query builder for Organization.

func (*OrganizationClient) QueryContext

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

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

func (*OrganizationClient) Update

Update returns an update builder for Organization.

func (*OrganizationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrganizationClient) UpdateOneID

func (c *OrganizationClient) UpdateOneID(id int) *OrganizationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrganizationClient) Use

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

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

type OrganizationCreate

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

OrganizationCreate is the builder for creating a Organization entity.

func (*OrganizationCreate) Exec

func (oc *OrganizationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrganizationCreate) ExecContext

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

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

func (*OrganizationCreate) ExecX

func (oc *OrganizationCreate) ExecX(ctx context.Context)

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

func (*OrganizationCreate) Mutation

func (oc *OrganizationCreate) Mutation() *OrganizationMutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationCreate) OnConflict

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

client.Organization.Create().
	SetDateCreated(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.OrganizationUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*OrganizationCreate) OnConflictColumns

func (oc *OrganizationCreate) OnConflictColumns(columns ...string) *OrganizationUpsertOne

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

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

func (*OrganizationCreate) QueryContext

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

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

func (*OrganizationCreate) Save

Save creates the Organization in the database.

func (*OrganizationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OrganizationCreate) SetAcronym

func (oc *OrganizationCreate) SetAcronym(s string) *OrganizationCreate

SetAcronym sets the "acronym" field.

func (*OrganizationCreate) SetDateCreated

func (oc *OrganizationCreate) SetDateCreated(t time.Time) *OrganizationCreate

SetDateCreated sets the "date_created" field.

func (*OrganizationCreate) SetDateUpdated

func (oc *OrganizationCreate) SetDateUpdated(t time.Time) *OrganizationCreate

SetDateUpdated sets the "date_updated" field.

func (*OrganizationCreate) SetIdentifier

func (oc *OrganizationCreate) SetIdentifier(s []string) *OrganizationCreate

SetIdentifier sets the "identifier" field.

func (*OrganizationCreate) SetIdentifierValues

func (oc *OrganizationCreate) SetIdentifierValues(s []string) *OrganizationCreate

SetIdentifierValues sets the "identifier_values" field.

func (*OrganizationCreate) SetNameDut

func (oc *OrganizationCreate) SetNameDut(s string) *OrganizationCreate

SetNameDut sets the "name_dut" field.

func (*OrganizationCreate) SetNameEng

func (oc *OrganizationCreate) SetNameEng(s string) *OrganizationCreate

SetNameEng sets the "name_eng" field.

func (*OrganizationCreate) SetNillableAcronym

func (oc *OrganizationCreate) SetNillableAcronym(s *string) *OrganizationCreate

SetNillableAcronym sets the "acronym" field if the given value is not nil.

func (*OrganizationCreate) SetNillableDateCreated

func (oc *OrganizationCreate) SetNillableDateCreated(t *time.Time) *OrganizationCreate

SetNillableDateCreated sets the "date_created" field if the given value is not nil.

func (*OrganizationCreate) SetNillableDateUpdated

func (oc *OrganizationCreate) SetNillableDateUpdated(t *time.Time) *OrganizationCreate

SetNillableDateUpdated sets the "date_updated" field if the given value is not nil.

func (*OrganizationCreate) SetNillableNameDut

func (oc *OrganizationCreate) SetNillableNameDut(s *string) *OrganizationCreate

SetNillableNameDut sets the "name_dut" field if the given value is not nil.

func (*OrganizationCreate) SetNillableNameEng

func (oc *OrganizationCreate) SetNillableNameEng(s *string) *OrganizationCreate

SetNillableNameEng sets the "name_eng" field if the given value is not nil.

func (*OrganizationCreate) SetNillablePublicID

func (oc *OrganizationCreate) SetNillablePublicID(s *string) *OrganizationCreate

SetNillablePublicID sets the "public_id" field if the given value is not nil.

func (*OrganizationCreate) SetNillableType

func (oc *OrganizationCreate) SetNillableType(s *string) *OrganizationCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*OrganizationCreate) SetPublicID

func (oc *OrganizationCreate) SetPublicID(s string) *OrganizationCreate

SetPublicID sets the "public_id" field.

func (*OrganizationCreate) SetType

SetType sets the "type" field.

type OrganizationCreateBulk

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

OrganizationCreateBulk is the builder for creating many Organization entities in bulk.

func (*OrganizationCreateBulk) Exec

Exec executes the query.

func (*OrganizationCreateBulk) ExecContext

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

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

func (*OrganizationCreateBulk) ExecX

func (ocb *OrganizationCreateBulk) ExecX(ctx context.Context)

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

func (*OrganizationCreateBulk) OnConflict

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

client.Organization.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.OrganizationUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*OrganizationCreateBulk) OnConflictColumns

func (ocb *OrganizationCreateBulk) OnConflictColumns(columns ...string) *OrganizationUpsertBulk

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

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

func (*OrganizationCreateBulk) QueryContext

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

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

func (*OrganizationCreateBulk) Save

Save creates the Organization entities in the database.

func (*OrganizationCreateBulk) SaveX

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

type OrganizationDelete

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

OrganizationDelete is the builder for deleting a Organization entity.

func (*OrganizationDelete) Exec

func (od *OrganizationDelete) Exec(ctx context.Context) (int, error)

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

func (*OrganizationDelete) ExecContext

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

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

func (*OrganizationDelete) ExecX

func (od *OrganizationDelete) ExecX(ctx context.Context) int

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

func (*OrganizationDelete) QueryContext

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

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

func (*OrganizationDelete) Where

Where appends a list predicates to the OrganizationDelete builder.

type OrganizationDeleteOne

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

OrganizationDeleteOne is the builder for deleting a single Organization entity.

func (*OrganizationDeleteOne) Exec

func (odo *OrganizationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrganizationDeleteOne) ExecX

func (odo *OrganizationDeleteOne) ExecX(ctx context.Context)

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

func (*OrganizationDeleteOne) Where

Where appends a list predicates to the OrganizationDelete builder.

type OrganizationGroupBy

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

OrganizationGroupBy is the group-by builder for Organization entities.

func (*OrganizationGroupBy) Aggregate

func (ogb *OrganizationGroupBy) Aggregate(fns ...AggregateFunc) *OrganizationGroupBy

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

func (*OrganizationGroupBy) Bool

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

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

func (*OrganizationGroupBy) BoolX

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

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

func (*OrganizationGroupBy) Bools

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

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

func (*OrganizationGroupBy) BoolsX

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

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

func (*OrganizationGroupBy) Float64

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

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

func (*OrganizationGroupBy) Float64X

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

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

func (*OrganizationGroupBy) Float64s

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

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

func (*OrganizationGroupBy) Float64sX

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

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

func (*OrganizationGroupBy) Int

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

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

func (*OrganizationGroupBy) IntX

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

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

func (*OrganizationGroupBy) Ints

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

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

func (*OrganizationGroupBy) IntsX

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

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

func (*OrganizationGroupBy) Scan

func (ogb *OrganizationGroupBy) Scan(ctx context.Context, v any) error

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

func (*OrganizationGroupBy) ScanX

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

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

func (*OrganizationGroupBy) String

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

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

func (*OrganizationGroupBy) StringX

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

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

func (*OrganizationGroupBy) Strings

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

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

func (*OrganizationGroupBy) StringsX

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

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

type OrganizationMutation

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

OrganizationMutation represents an operation that mutates the Organization nodes in the graph.

func (*OrganizationMutation) Acronym

func (m *OrganizationMutation) Acronym() (r string, exists bool)

Acronym returns the value of the "acronym" field in the mutation.

func (*OrganizationMutation) AcronymCleared

func (m *OrganizationMutation) AcronymCleared() bool

AcronymCleared returns if the "acronym" field was cleared in this mutation.

func (*OrganizationMutation) AddField

func (m *OrganizationMutation) 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 (*OrganizationMutation) AddedEdges

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

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

func (*OrganizationMutation) AddedField

func (m *OrganizationMutation) 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 (*OrganizationMutation) AddedFields

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

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

func (*OrganizationMutation) AddedIDs

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

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

func (*OrganizationMutation) AppendIdentifier

func (m *OrganizationMutation) AppendIdentifier(s []string)

AppendIdentifier adds s to the "identifier" field.

func (*OrganizationMutation) AppendIdentifierValues

func (m *OrganizationMutation) AppendIdentifierValues(s []string)

AppendIdentifierValues adds s to the "identifier_values" field.

func (*OrganizationMutation) AppendedIdentifier

func (m *OrganizationMutation) AppendedIdentifier() ([]string, bool)

AppendedIdentifier returns the list of values that were appended to the "identifier" field in this mutation.

func (*OrganizationMutation) AppendedIdentifierValues

func (m *OrganizationMutation) AppendedIdentifierValues() ([]string, bool)

AppendedIdentifierValues returns the list of values that were appended to the "identifier_values" field in this mutation.

func (*OrganizationMutation) ClearAcronym

func (m *OrganizationMutation) ClearAcronym()

ClearAcronym clears the value of the "acronym" field.

func (*OrganizationMutation) ClearEdge

func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearField

func (m *OrganizationMutation) 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 (*OrganizationMutation) ClearIdentifier

func (m *OrganizationMutation) ClearIdentifier()

ClearIdentifier clears the value of the "identifier" field.

func (*OrganizationMutation) ClearIdentifierValues

func (m *OrganizationMutation) ClearIdentifierValues()

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*OrganizationMutation) ClearNameDut

func (m *OrganizationMutation) ClearNameDut()

ClearNameDut clears the value of the "name_dut" field.

func (*OrganizationMutation) ClearNameEng

func (m *OrganizationMutation) ClearNameEng()

ClearNameEng clears the value of the "name_eng" field.

func (*OrganizationMutation) ClearedEdges

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

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

func (*OrganizationMutation) ClearedFields

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

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

func (OrganizationMutation) Client

func (m OrganizationMutation) 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 (*OrganizationMutation) DateCreated

func (m *OrganizationMutation) DateCreated() (r time.Time, exists bool)

DateCreated returns the value of the "date_created" field in the mutation.

func (*OrganizationMutation) DateUpdated

func (m *OrganizationMutation) DateUpdated() (r time.Time, exists bool)

DateUpdated returns the value of the "date_updated" field in the mutation.

func (*OrganizationMutation) EdgeCleared

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

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

func (*OrganizationMutation) ExecContext

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

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

func (*OrganizationMutation) Field

func (m *OrganizationMutation) 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 (*OrganizationMutation) FieldCleared

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

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

func (*OrganizationMutation) Fields

func (m *OrganizationMutation) 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 (*OrganizationMutation) GetType

func (m *OrganizationMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*OrganizationMutation) ID

func (m *OrganizationMutation) 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 (*OrganizationMutation) IDs

func (m *OrganizationMutation) 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 (*OrganizationMutation) Identifier

func (m *OrganizationMutation) Identifier() (r []string, exists bool)

Identifier returns the value of the "identifier" field in the mutation.

func (*OrganizationMutation) IdentifierCleared

func (m *OrganizationMutation) IdentifierCleared() bool

IdentifierCleared returns if the "identifier" field was cleared in this mutation.

func (*OrganizationMutation) IdentifierValues

func (m *OrganizationMutation) IdentifierValues() (r []string, exists bool)

IdentifierValues returns the value of the "identifier_values" field in the mutation.

func (*OrganizationMutation) IdentifierValuesCleared

func (m *OrganizationMutation) IdentifierValuesCleared() bool

IdentifierValuesCleared returns if the "identifier_values" field was cleared in this mutation.

func (*OrganizationMutation) NameDut

func (m *OrganizationMutation) NameDut() (r string, exists bool)

NameDut returns the value of the "name_dut" field in the mutation.

func (*OrganizationMutation) NameDutCleared

func (m *OrganizationMutation) NameDutCleared() bool

NameDutCleared returns if the "name_dut" field was cleared in this mutation.

func (*OrganizationMutation) NameEng

func (m *OrganizationMutation) NameEng() (r string, exists bool)

NameEng returns the value of the "name_eng" field in the mutation.

func (*OrganizationMutation) NameEngCleared

func (m *OrganizationMutation) NameEngCleared() bool

NameEngCleared returns if the "name_eng" field was cleared in this mutation.

func (*OrganizationMutation) OldAcronym

func (m *OrganizationMutation) OldAcronym(ctx context.Context) (v string, err error)

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

func (*OrganizationMutation) OldDateCreated

func (m *OrganizationMutation) OldDateCreated(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationMutation) OldDateUpdated

func (m *OrganizationMutation) OldDateUpdated(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationMutation) OldField

func (m *OrganizationMutation) 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 (*OrganizationMutation) OldIdentifier

func (m *OrganizationMutation) OldIdentifier(ctx context.Context) (v []string, err error)

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

func (*OrganizationMutation) OldIdentifierValues

func (m *OrganizationMutation) OldIdentifierValues(ctx context.Context) (v []string, err error)

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

func (*OrganizationMutation) OldNameDut

func (m *OrganizationMutation) OldNameDut(ctx context.Context) (v string, err error)

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

func (*OrganizationMutation) OldNameEng

func (m *OrganizationMutation) OldNameEng(ctx context.Context) (v string, err error)

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

func (*OrganizationMutation) OldPublicID

func (m *OrganizationMutation) OldPublicID(ctx context.Context) (v string, err error)

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

func (*OrganizationMutation) OldType

func (m *OrganizationMutation) OldType(ctx context.Context) (v string, err error)

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

func (*OrganizationMutation) Op

func (m *OrganizationMutation) Op() Op

Op returns the operation name.

func (*OrganizationMutation) PublicID

func (m *OrganizationMutation) PublicID() (r string, exists bool)

PublicID returns the value of the "public_id" field in the mutation.

func (*OrganizationMutation) QueryContext

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

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

func (*OrganizationMutation) RemovedEdges

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

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

func (*OrganizationMutation) RemovedIDs

func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetAcronym

func (m *OrganizationMutation) ResetAcronym()

ResetAcronym resets all changes to the "acronym" field.

func (*OrganizationMutation) ResetDateCreated

func (m *OrganizationMutation) ResetDateCreated()

ResetDateCreated resets all changes to the "date_created" field.

func (*OrganizationMutation) ResetDateUpdated

func (m *OrganizationMutation) ResetDateUpdated()

ResetDateUpdated resets all changes to the "date_updated" field.

func (*OrganizationMutation) ResetEdge

func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetField

func (m *OrganizationMutation) 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 (*OrganizationMutation) ResetIdentifier

func (m *OrganizationMutation) ResetIdentifier()

ResetIdentifier resets all changes to the "identifier" field.

func (*OrganizationMutation) ResetIdentifierValues

func (m *OrganizationMutation) ResetIdentifierValues()

ResetIdentifierValues resets all changes to the "identifier_values" field.

func (*OrganizationMutation) ResetNameDut

func (m *OrganizationMutation) ResetNameDut()

ResetNameDut resets all changes to the "name_dut" field.

func (*OrganizationMutation) ResetNameEng

func (m *OrganizationMutation) ResetNameEng()

ResetNameEng resets all changes to the "name_eng" field.

func (*OrganizationMutation) ResetPublicID

func (m *OrganizationMutation) ResetPublicID()

ResetPublicID resets all changes to the "public_id" field.

func (*OrganizationMutation) ResetType

func (m *OrganizationMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*OrganizationMutation) SetAcronym

func (m *OrganizationMutation) SetAcronym(s string)

SetAcronym sets the "acronym" field.

func (*OrganizationMutation) SetDateCreated

func (m *OrganizationMutation) SetDateCreated(t time.Time)

SetDateCreated sets the "date_created" field.

func (*OrganizationMutation) SetDateUpdated

func (m *OrganizationMutation) SetDateUpdated(t time.Time)

SetDateUpdated sets the "date_updated" field.

func (*OrganizationMutation) SetField

func (m *OrganizationMutation) 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 (*OrganizationMutation) SetIdentifier

func (m *OrganizationMutation) SetIdentifier(s []string)

SetIdentifier sets the "identifier" field.

func (*OrganizationMutation) SetIdentifierValues

func (m *OrganizationMutation) SetIdentifierValues(s []string)

SetIdentifierValues sets the "identifier_values" field.

func (*OrganizationMutation) SetNameDut

func (m *OrganizationMutation) SetNameDut(s string)

SetNameDut sets the "name_dut" field.

func (*OrganizationMutation) SetNameEng

func (m *OrganizationMutation) SetNameEng(s string)

SetNameEng sets the "name_eng" field.

func (*OrganizationMutation) SetOp

func (m *OrganizationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrganizationMutation) SetPublicID

func (m *OrganizationMutation) SetPublicID(s string)

SetPublicID sets the "public_id" field.

func (*OrganizationMutation) SetType

func (m *OrganizationMutation) SetType(s string)

SetType sets the "type" field.

func (OrganizationMutation) Tx

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

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

func (*OrganizationMutation) Type

func (m *OrganizationMutation) Type() string

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

func (*OrganizationMutation) Where

Where appends a list predicates to the OrganizationMutation builder.

func (*OrganizationMutation) WhereP

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

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

type OrganizationParent

type OrganizationParent struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// DateCreated holds the value of the "date_created" field.
	DateCreated time.Time `json:"date_created,omitempty"`
	// DateUpdated holds the value of the "date_updated" field.
	DateUpdated time.Time `json:"date_updated,omitempty"`
	// ParentOrganizationID holds the value of the "parent_organization_id" field.
	ParentOrganizationID int `json:"parent_organization_id,omitempty"`
	// OrganizationID holds the value of the "organization_id" field.
	OrganizationID int `json:"organization_id,omitempty"`
	// From holds the value of the "from" field.
	From time.Time `json:"from,omitempty"`
	// Until holds the value of the "until" field.
	Until *time.Time `json:"until,omitempty"`
	// contains filtered or unexported fields
}

OrganizationParent is the model entity for the OrganizationParent schema.

func (*OrganizationParent) ExecContext

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

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

func (*OrganizationParent) QueryContext

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

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

func (*OrganizationParent) String

func (op *OrganizationParent) String() string

String implements the fmt.Stringer.

func (*OrganizationParent) Unwrap

func (op *OrganizationParent) Unwrap() *OrganizationParent

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

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

func (*OrganizationParent) Value

func (op *OrganizationParent) Value(name string) (ent.Value, error)

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

type OrganizationParentClient

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

OrganizationParentClient is a client for the OrganizationParent schema.

func NewOrganizationParentClient

func NewOrganizationParentClient(c config) *OrganizationParentClient

NewOrganizationParentClient returns a client for the OrganizationParent from the given config.

func (*OrganizationParentClient) Create

Create returns a builder for creating a OrganizationParent entity.

func (*OrganizationParentClient) CreateBulk

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

func (*OrganizationParentClient) Delete

Delete returns a delete builder for OrganizationParent.

func (*OrganizationParentClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrganizationParentClient) DeleteOneID

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

func (*OrganizationParentClient) ExecContext

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

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

func (*OrganizationParentClient) Get

Get returns a OrganizationParent entity by its id.

func (*OrganizationParentClient) GetX

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

func (*OrganizationParentClient) Hooks

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

Hooks returns the client hooks.

func (*OrganizationParentClient) Intercept

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

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

func (*OrganizationParentClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OrganizationParentClient) Query

Query returns a query builder for OrganizationParent.

func (*OrganizationParentClient) QueryContext

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

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

func (*OrganizationParentClient) Update

Update returns an update builder for OrganizationParent.

func (*OrganizationParentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrganizationParentClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OrganizationParentClient) Use

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

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

type OrganizationParentCreate

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

OrganizationParentCreate is the builder for creating a OrganizationParent entity.

func (*OrganizationParentCreate) Exec

Exec executes the query.

func (*OrganizationParentCreate) ExecContext

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

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

func (*OrganizationParentCreate) ExecX

func (opc *OrganizationParentCreate) ExecX(ctx context.Context)

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

func (*OrganizationParentCreate) Mutation

Mutation returns the OrganizationParentMutation object of the builder.

func (*OrganizationParentCreate) OnConflict

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

client.OrganizationParent.Create().
	SetDateCreated(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.OrganizationParentUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*OrganizationParentCreate) OnConflictColumns

func (opc *OrganizationParentCreate) OnConflictColumns(columns ...string) *OrganizationParentUpsertOne

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

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

func (*OrganizationParentCreate) QueryContext

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

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

func (*OrganizationParentCreate) Save

Save creates the OrganizationParent in the database.

func (*OrganizationParentCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OrganizationParentCreate) SetDateCreated

SetDateCreated sets the "date_created" field.

func (*OrganizationParentCreate) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationParentCreate) SetFrom

SetFrom sets the "from" field.

func (*OrganizationParentCreate) SetNillableDateCreated

func (opc *OrganizationParentCreate) SetNillableDateCreated(t *time.Time) *OrganizationParentCreate

SetNillableDateCreated sets the "date_created" field if the given value is not nil.

func (*OrganizationParentCreate) SetNillableDateUpdated

func (opc *OrganizationParentCreate) SetNillableDateUpdated(t *time.Time) *OrganizationParentCreate

SetNillableDateUpdated sets the "date_updated" field if the given value is not nil.

func (*OrganizationParentCreate) SetNillableFrom

func (opc *OrganizationParentCreate) SetNillableFrom(t *time.Time) *OrganizationParentCreate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*OrganizationParentCreate) SetNillableUntil

func (opc *OrganizationParentCreate) SetNillableUntil(t *time.Time) *OrganizationParentCreate

SetNillableUntil sets the "until" field if the given value is not nil.

func (*OrganizationParentCreate) SetOrganizationID

func (opc *OrganizationParentCreate) SetOrganizationID(i int) *OrganizationParentCreate

SetOrganizationID sets the "organization_id" field.

func (*OrganizationParentCreate) SetParentOrganizationID

func (opc *OrganizationParentCreate) SetParentOrganizationID(i int) *OrganizationParentCreate

SetParentOrganizationID sets the "parent_organization_id" field.

func (*OrganizationParentCreate) SetUntil

SetUntil sets the "until" field.

type OrganizationParentCreateBulk

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

OrganizationParentCreateBulk is the builder for creating many OrganizationParent entities in bulk.

func (*OrganizationParentCreateBulk) Exec

Exec executes the query.

func (*OrganizationParentCreateBulk) ExecContext

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

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

func (*OrganizationParentCreateBulk) ExecX

func (opcb *OrganizationParentCreateBulk) ExecX(ctx context.Context)

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

func (*OrganizationParentCreateBulk) OnConflict

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

client.OrganizationParent.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.OrganizationParentUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*OrganizationParentCreateBulk) OnConflictColumns

func (opcb *OrganizationParentCreateBulk) OnConflictColumns(columns ...string) *OrganizationParentUpsertBulk

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

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

func (*OrganizationParentCreateBulk) QueryContext

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

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

func (*OrganizationParentCreateBulk) Save

Save creates the OrganizationParent entities in the database.

func (*OrganizationParentCreateBulk) SaveX

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

type OrganizationParentDelete

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

OrganizationParentDelete is the builder for deleting a OrganizationParent entity.

func (*OrganizationParentDelete) Exec

func (opd *OrganizationParentDelete) Exec(ctx context.Context) (int, error)

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

func (*OrganizationParentDelete) ExecContext

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

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

func (*OrganizationParentDelete) ExecX

func (opd *OrganizationParentDelete) ExecX(ctx context.Context) int

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

func (*OrganizationParentDelete) QueryContext

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

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

func (*OrganizationParentDelete) Where

Where appends a list predicates to the OrganizationParentDelete builder.

type OrganizationParentDeleteOne

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

OrganizationParentDeleteOne is the builder for deleting a single OrganizationParent entity.

func (*OrganizationParentDeleteOne) Exec

Exec executes the deletion query.

func (*OrganizationParentDeleteOne) ExecX

func (opdo *OrganizationParentDeleteOne) ExecX(ctx context.Context)

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

func (*OrganizationParentDeleteOne) Where

Where appends a list predicates to the OrganizationParentDelete builder.

type OrganizationParentGroupBy

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

OrganizationParentGroupBy is the group-by builder for OrganizationParent entities.

func (*OrganizationParentGroupBy) Aggregate

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

func (*OrganizationParentGroupBy) Bool

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

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

func (*OrganizationParentGroupBy) BoolX

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

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

func (*OrganizationParentGroupBy) Bools

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

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

func (*OrganizationParentGroupBy) BoolsX

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

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

func (*OrganizationParentGroupBy) Float64

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

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

func (*OrganizationParentGroupBy) Float64X

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

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

func (*OrganizationParentGroupBy) Float64s

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

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

func (*OrganizationParentGroupBy) Float64sX

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

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

func (*OrganizationParentGroupBy) Int

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

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

func (*OrganizationParentGroupBy) IntX

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

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

func (*OrganizationParentGroupBy) Ints

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

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

func (*OrganizationParentGroupBy) IntsX

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

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

func (*OrganizationParentGroupBy) Scan

func (opgb *OrganizationParentGroupBy) Scan(ctx context.Context, v any) error

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

func (*OrganizationParentGroupBy) ScanX

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

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

func (*OrganizationParentGroupBy) String

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

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

func (*OrganizationParentGroupBy) StringX

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

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

func (*OrganizationParentGroupBy) Strings

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

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

func (*OrganizationParentGroupBy) StringsX

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

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

type OrganizationParentMutation

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

OrganizationParentMutation represents an operation that mutates the OrganizationParent nodes in the graph.

func (*OrganizationParentMutation) AddField

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) AddOrganizationID

func (m *OrganizationParentMutation) AddOrganizationID(i int)

AddOrganizationID adds i to the "organization_id" field.

func (*OrganizationParentMutation) AddParentOrganizationID

func (m *OrganizationParentMutation) AddParentOrganizationID(i int)

AddParentOrganizationID adds i to the "parent_organization_id" field.

func (*OrganizationParentMutation) AddedEdges

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

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

func (*OrganizationParentMutation) AddedField

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) AddedFields

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

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

func (*OrganizationParentMutation) AddedIDs

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

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

func (*OrganizationParentMutation) AddedOrganizationID

func (m *OrganizationParentMutation) AddedOrganizationID() (r int, exists bool)

AddedOrganizationID returns the value that was added to the "organization_id" field in this mutation.

func (*OrganizationParentMutation) AddedParentOrganizationID

func (m *OrganizationParentMutation) AddedParentOrganizationID() (r int, exists bool)

AddedParentOrganizationID returns the value that was added to the "parent_organization_id" field in this mutation.

func (*OrganizationParentMutation) ClearEdge

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) ClearField

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) ClearUntil

func (m *OrganizationParentMutation) ClearUntil()

ClearUntil clears the value of the "until" field.

func (*OrganizationParentMutation) ClearedEdges

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

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

func (*OrganizationParentMutation) ClearedFields

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

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

func (OrganizationParentMutation) Client

func (m OrganizationParentMutation) 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 (*OrganizationParentMutation) DateCreated

func (m *OrganizationParentMutation) DateCreated() (r time.Time, exists bool)

DateCreated returns the value of the "date_created" field in the mutation.

func (*OrganizationParentMutation) DateUpdated

func (m *OrganizationParentMutation) DateUpdated() (r time.Time, exists bool)

DateUpdated returns the value of the "date_updated" field in the mutation.

func (*OrganizationParentMutation) EdgeCleared

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

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

func (*OrganizationParentMutation) ExecContext

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

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

func (*OrganizationParentMutation) Field

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) FieldCleared

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

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

func (*OrganizationParentMutation) Fields

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) From

func (m *OrganizationParentMutation) From() (r time.Time, exists bool)

From returns the value of the "from" field in the mutation.

func (*OrganizationParentMutation) ID

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) 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 (*OrganizationParentMutation) OldDateCreated

func (m *OrganizationParentMutation) OldDateCreated(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationParentMutation) OldDateUpdated

func (m *OrganizationParentMutation) OldDateUpdated(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationParentMutation) OldField

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) OldFrom

func (m *OrganizationParentMutation) OldFrom(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationParentMutation) OldOrganizationID

func (m *OrganizationParentMutation) OldOrganizationID(ctx context.Context) (v int, err error)

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

func (*OrganizationParentMutation) OldParentOrganizationID

func (m *OrganizationParentMutation) OldParentOrganizationID(ctx context.Context) (v int, err error)

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

func (*OrganizationParentMutation) OldUntil

func (m *OrganizationParentMutation) OldUntil(ctx context.Context) (v *time.Time, err error)

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

func (*OrganizationParentMutation) Op

Op returns the operation name.

func (*OrganizationParentMutation) OrganizationID

func (m *OrganizationParentMutation) OrganizationID() (r int, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*OrganizationParentMutation) ParentOrganizationID

func (m *OrganizationParentMutation) ParentOrganizationID() (r int, exists bool)

ParentOrganizationID returns the value of the "parent_organization_id" field in the mutation.

func (*OrganizationParentMutation) QueryContext

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

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

func (*OrganizationParentMutation) RemovedEdges

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

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

func (*OrganizationParentMutation) RemovedIDs

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) ResetDateCreated

func (m *OrganizationParentMutation) ResetDateCreated()

ResetDateCreated resets all changes to the "date_created" field.

func (*OrganizationParentMutation) ResetDateUpdated

func (m *OrganizationParentMutation) ResetDateUpdated()

ResetDateUpdated resets all changes to the "date_updated" field.

func (*OrganizationParentMutation) ResetEdge

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) ResetField

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) ResetFrom

func (m *OrganizationParentMutation) ResetFrom()

ResetFrom resets all changes to the "from" field.

func (*OrganizationParentMutation) ResetOrganizationID

func (m *OrganizationParentMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*OrganizationParentMutation) ResetParentOrganizationID

func (m *OrganizationParentMutation) ResetParentOrganizationID()

ResetParentOrganizationID resets all changes to the "parent_organization_id" field.

func (*OrganizationParentMutation) ResetUntil

func (m *OrganizationParentMutation) ResetUntil()

ResetUntil resets all changes to the "until" field.

func (*OrganizationParentMutation) SetDateCreated

func (m *OrganizationParentMutation) SetDateCreated(t time.Time)

SetDateCreated sets the "date_created" field.

func (*OrganizationParentMutation) SetDateUpdated

func (m *OrganizationParentMutation) SetDateUpdated(t time.Time)

SetDateUpdated sets the "date_updated" field.

func (*OrganizationParentMutation) SetField

func (m *OrganizationParentMutation) 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 (*OrganizationParentMutation) SetFrom

func (m *OrganizationParentMutation) SetFrom(t time.Time)

SetFrom sets the "from" field.

func (*OrganizationParentMutation) SetOp

func (m *OrganizationParentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrganizationParentMutation) SetOrganizationID

func (m *OrganizationParentMutation) SetOrganizationID(i int)

SetOrganizationID sets the "organization_id" field.

func (*OrganizationParentMutation) SetParentOrganizationID

func (m *OrganizationParentMutation) SetParentOrganizationID(i int)

SetParentOrganizationID sets the "parent_organization_id" field.

func (*OrganizationParentMutation) SetUntil

func (m *OrganizationParentMutation) SetUntil(t time.Time)

SetUntil sets the "until" field.

func (OrganizationParentMutation) Tx

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

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

func (*OrganizationParentMutation) Type

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

func (*OrganizationParentMutation) Until

func (m *OrganizationParentMutation) Until() (r time.Time, exists bool)

Until returns the value of the "until" field in the mutation.

func (*OrganizationParentMutation) UntilCleared

func (m *OrganizationParentMutation) UntilCleared() bool

UntilCleared returns if the "until" field was cleared in this mutation.

func (*OrganizationParentMutation) Where

Where appends a list predicates to the OrganizationParentMutation builder.

func (*OrganizationParentMutation) WhereP

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

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

type OrganizationParentQuery

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

OrganizationParentQuery is the builder for querying OrganizationParent entities.

func (*OrganizationParentQuery) Aggregate

Aggregate returns a OrganizationParentSelect configured with the given aggregations.

func (*OrganizationParentQuery) All

All executes the query and returns a list of OrganizationParents.

func (*OrganizationParentQuery) AllX

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

func (*OrganizationParentQuery) Clone

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

func (*OrganizationParentQuery) Count

func (opq *OrganizationParentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrganizationParentQuery) CountX

func (opq *OrganizationParentQuery) CountX(ctx context.Context) int

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

func (*OrganizationParentQuery) ExecContext

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

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

func (*OrganizationParentQuery) Exist

func (opq *OrganizationParentQuery) Exist(ctx context.Context) (bool, error)

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

func (*OrganizationParentQuery) ExistX

func (opq *OrganizationParentQuery) ExistX(ctx context.Context) bool

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

func (*OrganizationParentQuery) First

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

func (*OrganizationParentQuery) FirstID

func (opq *OrganizationParentQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*OrganizationParentQuery) FirstIDX

func (opq *OrganizationParentQuery) FirstIDX(ctx context.Context) int

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

func (*OrganizationParentQuery) FirstX

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

func (*OrganizationParentQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*OrganizationParentQuery) ForUpdate

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*OrganizationParentQuery) GroupBy

func (opq *OrganizationParentQuery) GroupBy(field string, fields ...string) *OrganizationParentGroupBy

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrganizationParent.Query().
	GroupBy(organizationparent.FieldDateCreated).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrganizationParentQuery) IDs

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

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

func (*OrganizationParentQuery) IDsX

func (opq *OrganizationParentQuery) IDsX(ctx context.Context) []int

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

func (*OrganizationParentQuery) Limit

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

func (*OrganizationParentQuery) Modify

func (opq *OrganizationParentQuery) Modify(modifiers ...func(s *sql.Selector)) *OrganizationParentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OrganizationParentQuery) Offset

Offset to start from.

func (*OrganizationParentQuery) Only

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

func (*OrganizationParentQuery) OnlyID

func (opq *OrganizationParentQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*OrganizationParentQuery) OnlyIDX

func (opq *OrganizationParentQuery) OnlyIDX(ctx context.Context) int

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

func (*OrganizationParentQuery) OnlyX

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

func (*OrganizationParentQuery) Order

Order specifies how the records should be ordered.

func (*OrganizationParentQuery) QueryContext

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

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

func (*OrganizationParentQuery) Select

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
}

client.OrganizationParent.Query().
	Select(organizationparent.FieldDateCreated).
	Scan(ctx, &v)

func (*OrganizationParentQuery) 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 (*OrganizationParentQuery) Where

Where adds a new predicate for the OrganizationParentQuery builder.

type OrganizationParentSelect

type OrganizationParentSelect struct {
	*OrganizationParentQuery
	// contains filtered or unexported fields
}

OrganizationParentSelect is the builder for selecting fields of OrganizationParent entities.

func (*OrganizationParentSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*OrganizationParentSelect) Bool

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

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

func (*OrganizationParentSelect) BoolX

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

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

func (*OrganizationParentSelect) Bools

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

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

func (*OrganizationParentSelect) BoolsX

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

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

func (OrganizationParentSelect) ExecContext

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

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

func (*OrganizationParentSelect) Float64

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

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

func (*OrganizationParentSelect) Float64X

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

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

func (*OrganizationParentSelect) Float64s

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

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

func (*OrganizationParentSelect) Float64sX

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

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

func (*OrganizationParentSelect) Int

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

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

func (*OrganizationParentSelect) IntX

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

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

func (*OrganizationParentSelect) Ints

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

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

func (*OrganizationParentSelect) IntsX

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

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

func (*OrganizationParentSelect) Modify

func (ops *OrganizationParentSelect) Modify(modifiers ...func(s *sql.Selector)) *OrganizationParentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (OrganizationParentSelect) QueryContext

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

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

func (*OrganizationParentSelect) Scan

func (ops *OrganizationParentSelect) Scan(ctx context.Context, v any) error

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

func (*OrganizationParentSelect) ScanX

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

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

func (*OrganizationParentSelect) String

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

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

func (*OrganizationParentSelect) StringX

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

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

func (*OrganizationParentSelect) Strings

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

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

func (*OrganizationParentSelect) StringsX

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

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

type OrganizationParentUpdate

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

OrganizationParentUpdate is the builder for updating OrganizationParent entities.

func (*OrganizationParentUpdate) AddOrganizationID

func (opu *OrganizationParentUpdate) AddOrganizationID(i int) *OrganizationParentUpdate

AddOrganizationID adds i to the "organization_id" field.

func (*OrganizationParentUpdate) AddParentOrganizationID

func (opu *OrganizationParentUpdate) AddParentOrganizationID(i int) *OrganizationParentUpdate

AddParentOrganizationID adds i to the "parent_organization_id" field.

func (*OrganizationParentUpdate) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationParentUpdate) Exec

Exec executes the query.

func (*OrganizationParentUpdate) ExecContext

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

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

func (*OrganizationParentUpdate) ExecX

func (opu *OrganizationParentUpdate) ExecX(ctx context.Context)

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

func (*OrganizationParentUpdate) Modify

func (opu *OrganizationParentUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationParentUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationParentUpdate) Mutation

Mutation returns the OrganizationParentMutation object of the builder.

func (*OrganizationParentUpdate) QueryContext

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

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

func (*OrganizationParentUpdate) Save

func (opu *OrganizationParentUpdate) Save(ctx context.Context) (int, error)

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

func (*OrganizationParentUpdate) SaveX

func (opu *OrganizationParentUpdate) SaveX(ctx context.Context) int

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

func (*OrganizationParentUpdate) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationParentUpdate) SetFrom

SetFrom sets the "from" field.

func (*OrganizationParentUpdate) SetNillableFrom

func (opu *OrganizationParentUpdate) SetNillableFrom(t *time.Time) *OrganizationParentUpdate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*OrganizationParentUpdate) SetNillableUntil

func (opu *OrganizationParentUpdate) SetNillableUntil(t *time.Time) *OrganizationParentUpdate

SetNillableUntil sets the "until" field if the given value is not nil.

func (*OrganizationParentUpdate) SetOrganizationID

func (opu *OrganizationParentUpdate) SetOrganizationID(i int) *OrganizationParentUpdate

SetOrganizationID sets the "organization_id" field.

func (*OrganizationParentUpdate) SetParentOrganizationID

func (opu *OrganizationParentUpdate) SetParentOrganizationID(i int) *OrganizationParentUpdate

SetParentOrganizationID sets the "parent_organization_id" field.

func (*OrganizationParentUpdate) SetUntil

SetUntil sets the "until" field.

func (*OrganizationParentUpdate) Where

Where appends a list predicates to the OrganizationParentUpdate builder.

type OrganizationParentUpdateOne

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

OrganizationParentUpdateOne is the builder for updating a single OrganizationParent entity.

func (*OrganizationParentUpdateOne) AddOrganizationID

func (opuo *OrganizationParentUpdateOne) AddOrganizationID(i int) *OrganizationParentUpdateOne

AddOrganizationID adds i to the "organization_id" field.

func (*OrganizationParentUpdateOne) AddParentOrganizationID

func (opuo *OrganizationParentUpdateOne) AddParentOrganizationID(i int) *OrganizationParentUpdateOne

AddParentOrganizationID adds i to the "parent_organization_id" field.

func (*OrganizationParentUpdateOne) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationParentUpdateOne) Exec

Exec executes the query on the entity.

func (*OrganizationParentUpdateOne) ExecContext

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

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

func (*OrganizationParentUpdateOne) ExecX

func (opuo *OrganizationParentUpdateOne) ExecX(ctx context.Context)

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

func (*OrganizationParentUpdateOne) Modify

func (opuo *OrganizationParentUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationParentUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationParentUpdateOne) Mutation

Mutation returns the OrganizationParentMutation object of the builder.

func (*OrganizationParentUpdateOne) QueryContext

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

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

func (*OrganizationParentUpdateOne) Save

Save executes the query and returns the updated OrganizationParent entity.

func (*OrganizationParentUpdateOne) SaveX

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

func (*OrganizationParentUpdateOne) Select

func (opuo *OrganizationParentUpdateOne) Select(field string, fields ...string) *OrganizationParentUpdateOne

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

func (*OrganizationParentUpdateOne) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationParentUpdateOne) SetFrom

SetFrom sets the "from" field.

func (*OrganizationParentUpdateOne) SetNillableFrom

SetNillableFrom sets the "from" field if the given value is not nil.

func (*OrganizationParentUpdateOne) SetNillableUntil

SetNillableUntil sets the "until" field if the given value is not nil.

func (*OrganizationParentUpdateOne) SetOrganizationID

func (opuo *OrganizationParentUpdateOne) SetOrganizationID(i int) *OrganizationParentUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*OrganizationParentUpdateOne) SetParentOrganizationID

func (opuo *OrganizationParentUpdateOne) SetParentOrganizationID(i int) *OrganizationParentUpdateOne

SetParentOrganizationID sets the "parent_organization_id" field.

func (*OrganizationParentUpdateOne) SetUntil

SetUntil sets the "until" field.

func (*OrganizationParentUpdateOne) Where

Where appends a list predicates to the OrganizationParentUpdate builder.

type OrganizationParentUpsert

type OrganizationParentUpsert struct {
	*sql.UpdateSet
}

OrganizationParentUpsert is the "OnConflict" setter.

func (*OrganizationParentUpsert) AddOrganizationID

func (u *OrganizationParentUpsert) AddOrganizationID(v int) *OrganizationParentUpsert

AddOrganizationID adds v to the "organization_id" field.

func (*OrganizationParentUpsert) AddParentOrganizationID

func (u *OrganizationParentUpsert) AddParentOrganizationID(v int) *OrganizationParentUpsert

AddParentOrganizationID adds v to the "parent_organization_id" field.

func (*OrganizationParentUpsert) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationParentUpsert) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationParentUpsert) SetFrom

SetFrom sets the "from" field.

func (*OrganizationParentUpsert) SetOrganizationID

func (u *OrganizationParentUpsert) SetOrganizationID(v int) *OrganizationParentUpsert

SetOrganizationID sets the "organization_id" field.

func (*OrganizationParentUpsert) SetParentOrganizationID

func (u *OrganizationParentUpsert) SetParentOrganizationID(v int) *OrganizationParentUpsert

SetParentOrganizationID sets the "parent_organization_id" field.

func (*OrganizationParentUpsert) SetUntil

SetUntil sets the "until" field.

func (*OrganizationParentUpsert) UpdateDateUpdated

func (u *OrganizationParentUpsert) UpdateDateUpdated() *OrganizationParentUpsert

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationParentUpsert) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*OrganizationParentUpsert) UpdateOrganizationID

func (u *OrganizationParentUpsert) UpdateOrganizationID() *OrganizationParentUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OrganizationParentUpsert) UpdateParentOrganizationID

func (u *OrganizationParentUpsert) UpdateParentOrganizationID() *OrganizationParentUpsert

UpdateParentOrganizationID sets the "parent_organization_id" field to the value that was provided on create.

func (*OrganizationParentUpsert) UpdateUntil

UpdateUntil sets the "until" field to the value that was provided on create.

type OrganizationParentUpsertBulk

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

OrganizationParentUpsertBulk is the builder for "upsert"-ing a bulk of OrganizationParent nodes.

func (*OrganizationParentUpsertBulk) AddOrganizationID

AddOrganizationID adds v to the "organization_id" field.

func (*OrganizationParentUpsertBulk) AddParentOrganizationID

func (u *OrganizationParentUpsertBulk) AddParentOrganizationID(v int) *OrganizationParentUpsertBulk

AddParentOrganizationID adds v to the "parent_organization_id" field.

func (*OrganizationParentUpsertBulk) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationParentUpsertBulk) DoNothing

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

func (*OrganizationParentUpsertBulk) Exec

Exec executes the query.

func (*OrganizationParentUpsertBulk) ExecX

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

func (*OrganizationParentUpsertBulk) Ignore

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

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

func (*OrganizationParentUpsertBulk) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationParentUpsertBulk) SetFrom

SetFrom sets the "from" field.

func (*OrganizationParentUpsertBulk) SetOrganizationID

SetOrganizationID sets the "organization_id" field.

func (*OrganizationParentUpsertBulk) SetParentOrganizationID

func (u *OrganizationParentUpsertBulk) SetParentOrganizationID(v int) *OrganizationParentUpsertBulk

SetParentOrganizationID sets the "parent_organization_id" field.

func (*OrganizationParentUpsertBulk) SetUntil

SetUntil sets the "until" field.

func (*OrganizationParentUpsertBulk) Update

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

func (*OrganizationParentUpsertBulk) UpdateDateUpdated

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationParentUpsertBulk) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*OrganizationParentUpsertBulk) UpdateNewValues

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

client.OrganizationParent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OrganizationParentUpsertBulk) UpdateOrganizationID

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OrganizationParentUpsertBulk) UpdateParentOrganizationID

func (u *OrganizationParentUpsertBulk) UpdateParentOrganizationID() *OrganizationParentUpsertBulk

UpdateParentOrganizationID sets the "parent_organization_id" field to the value that was provided on create.

func (*OrganizationParentUpsertBulk) UpdateUntil

UpdateUntil sets the "until" field to the value that was provided on create.

type OrganizationParentUpsertOne

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

OrganizationParentUpsertOne is the builder for "upsert"-ing

one OrganizationParent node.

func (*OrganizationParentUpsertOne) AddOrganizationID

AddOrganizationID adds v to the "organization_id" field.

func (*OrganizationParentUpsertOne) AddParentOrganizationID

func (u *OrganizationParentUpsertOne) AddParentOrganizationID(v int) *OrganizationParentUpsertOne

AddParentOrganizationID adds v to the "parent_organization_id" field.

func (*OrganizationParentUpsertOne) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationParentUpsertOne) DoNothing

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

func (*OrganizationParentUpsertOne) Exec

Exec executes the query.

func (*OrganizationParentUpsertOne) ExecX

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

func (*OrganizationParentUpsertOne) ID

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

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

func (*OrganizationParentUpsertOne) IDX

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

func (*OrganizationParentUpsertOne) Ignore

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

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

func (*OrganizationParentUpsertOne) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationParentUpsertOne) SetFrom

SetFrom sets the "from" field.

func (*OrganizationParentUpsertOne) SetOrganizationID

SetOrganizationID sets the "organization_id" field.

func (*OrganizationParentUpsertOne) SetParentOrganizationID

func (u *OrganizationParentUpsertOne) SetParentOrganizationID(v int) *OrganizationParentUpsertOne

SetParentOrganizationID sets the "parent_organization_id" field.

func (*OrganizationParentUpsertOne) SetUntil

SetUntil sets the "until" field.

func (*OrganizationParentUpsertOne) Update

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

func (*OrganizationParentUpsertOne) UpdateDateUpdated

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationParentUpsertOne) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*OrganizationParentUpsertOne) UpdateNewValues

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

client.OrganizationParent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OrganizationParentUpsertOne) UpdateOrganizationID

func (u *OrganizationParentUpsertOne) UpdateOrganizationID() *OrganizationParentUpsertOne

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OrganizationParentUpsertOne) UpdateParentOrganizationID

func (u *OrganizationParentUpsertOne) UpdateParentOrganizationID() *OrganizationParentUpsertOne

UpdateParentOrganizationID sets the "parent_organization_id" field to the value that was provided on create.

func (*OrganizationParentUpsertOne) UpdateUntil

UpdateUntil sets the "until" field to the value that was provided on create.

type OrganizationParents

type OrganizationParents []*OrganizationParent

OrganizationParents is a parsable slice of OrganizationParent.

type OrganizationPerson

type OrganizationPerson struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// DateCreated holds the value of the "date_created" field.
	DateCreated time.Time `json:"date_created,omitempty"`
	// DateUpdated holds the value of the "date_updated" field.
	DateUpdated time.Time `json:"date_updated,omitempty"`
	// OrganizationID holds the value of the "organization_id" field.
	OrganizationID int `json:"organization_id,omitempty"`
	// PersonID holds the value of the "person_id" field.
	PersonID int `json:"person_id,omitempty"`
	// From holds the value of the "from" field.
	From time.Time `json:"from,omitempty"`
	// Until holds the value of the "until" field.
	Until *time.Time `json:"until,omitempty"`
	// contains filtered or unexported fields
}

OrganizationPerson is the model entity for the OrganizationPerson schema.

func (*OrganizationPerson) ExecContext

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

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

func (*OrganizationPerson) QueryContext

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

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

func (*OrganizationPerson) String

func (op *OrganizationPerson) String() string

String implements the fmt.Stringer.

func (*OrganizationPerson) Unwrap

func (op *OrganizationPerson) Unwrap() *OrganizationPerson

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

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

func (*OrganizationPerson) Value

func (op *OrganizationPerson) Value(name string) (ent.Value, error)

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

type OrganizationPersonClient

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

OrganizationPersonClient is a client for the OrganizationPerson schema.

func NewOrganizationPersonClient

func NewOrganizationPersonClient(c config) *OrganizationPersonClient

NewOrganizationPersonClient returns a client for the OrganizationPerson from the given config.

func (*OrganizationPersonClient) Create

Create returns a builder for creating a OrganizationPerson entity.

func (*OrganizationPersonClient) CreateBulk

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

func (*OrganizationPersonClient) Delete

Delete returns a delete builder for OrganizationPerson.

func (*OrganizationPersonClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrganizationPersonClient) DeleteOneID

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

func (*OrganizationPersonClient) ExecContext

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

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

func (*OrganizationPersonClient) Get

Get returns a OrganizationPerson entity by its id.

func (*OrganizationPersonClient) GetX

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

func (*OrganizationPersonClient) Hooks

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

Hooks returns the client hooks.

func (*OrganizationPersonClient) Intercept

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

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

func (*OrganizationPersonClient) Interceptors

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

Interceptors returns the client interceptors.

func (*OrganizationPersonClient) Query

Query returns a query builder for OrganizationPerson.

func (*OrganizationPersonClient) QueryContext

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

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

func (*OrganizationPersonClient) Update

Update returns an update builder for OrganizationPerson.

func (*OrganizationPersonClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrganizationPersonClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OrganizationPersonClient) Use

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

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

type OrganizationPersonCreate

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

OrganizationPersonCreate is the builder for creating a OrganizationPerson entity.

func (*OrganizationPersonCreate) Exec

Exec executes the query.

func (*OrganizationPersonCreate) ExecContext

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

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

func (*OrganizationPersonCreate) ExecX

func (opc *OrganizationPersonCreate) ExecX(ctx context.Context)

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

func (*OrganizationPersonCreate) Mutation

Mutation returns the OrganizationPersonMutation object of the builder.

func (*OrganizationPersonCreate) OnConflict

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

client.OrganizationPerson.Create().
	SetDateCreated(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.OrganizationPersonUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*OrganizationPersonCreate) OnConflictColumns

func (opc *OrganizationPersonCreate) OnConflictColumns(columns ...string) *OrganizationPersonUpsertOne

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

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

func (*OrganizationPersonCreate) QueryContext

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

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

func (*OrganizationPersonCreate) Save

Save creates the OrganizationPerson in the database.

func (*OrganizationPersonCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OrganizationPersonCreate) SetDateCreated

SetDateCreated sets the "date_created" field.

func (*OrganizationPersonCreate) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationPersonCreate) SetFrom

SetFrom sets the "from" field.

func (*OrganizationPersonCreate) SetNillableDateCreated

func (opc *OrganizationPersonCreate) SetNillableDateCreated(t *time.Time) *OrganizationPersonCreate

SetNillableDateCreated sets the "date_created" field if the given value is not nil.

func (*OrganizationPersonCreate) SetNillableDateUpdated

func (opc *OrganizationPersonCreate) SetNillableDateUpdated(t *time.Time) *OrganizationPersonCreate

SetNillableDateUpdated sets the "date_updated" field if the given value is not nil.

func (*OrganizationPersonCreate) SetNillableFrom

func (opc *OrganizationPersonCreate) SetNillableFrom(t *time.Time) *OrganizationPersonCreate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*OrganizationPersonCreate) SetNillableUntil

func (opc *OrganizationPersonCreate) SetNillableUntil(t *time.Time) *OrganizationPersonCreate

SetNillableUntil sets the "until" field if the given value is not nil.

func (*OrganizationPersonCreate) SetOrganizationID

func (opc *OrganizationPersonCreate) SetOrganizationID(i int) *OrganizationPersonCreate

SetOrganizationID sets the "organization_id" field.

func (*OrganizationPersonCreate) SetPersonID

SetPersonID sets the "person_id" field.

func (*OrganizationPersonCreate) SetUntil

SetUntil sets the "until" field.

type OrganizationPersonCreateBulk

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

OrganizationPersonCreateBulk is the builder for creating many OrganizationPerson entities in bulk.

func (*OrganizationPersonCreateBulk) Exec

Exec executes the query.

func (*OrganizationPersonCreateBulk) ExecContext

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

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

func (*OrganizationPersonCreateBulk) ExecX

func (opcb *OrganizationPersonCreateBulk) ExecX(ctx context.Context)

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

func (*OrganizationPersonCreateBulk) OnConflict

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

client.OrganizationPerson.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.OrganizationPersonUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*OrganizationPersonCreateBulk) OnConflictColumns

func (opcb *OrganizationPersonCreateBulk) OnConflictColumns(columns ...string) *OrganizationPersonUpsertBulk

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

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

func (*OrganizationPersonCreateBulk) QueryContext

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

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

func (*OrganizationPersonCreateBulk) Save

Save creates the OrganizationPerson entities in the database.

func (*OrganizationPersonCreateBulk) SaveX

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

type OrganizationPersonDelete

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

OrganizationPersonDelete is the builder for deleting a OrganizationPerson entity.

func (*OrganizationPersonDelete) Exec

func (opd *OrganizationPersonDelete) Exec(ctx context.Context) (int, error)

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

func (*OrganizationPersonDelete) ExecContext

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

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

func (*OrganizationPersonDelete) ExecX

func (opd *OrganizationPersonDelete) ExecX(ctx context.Context) int

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

func (*OrganizationPersonDelete) QueryContext

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

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

func (*OrganizationPersonDelete) Where

Where appends a list predicates to the OrganizationPersonDelete builder.

type OrganizationPersonDeleteOne

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

OrganizationPersonDeleteOne is the builder for deleting a single OrganizationPerson entity.

func (*OrganizationPersonDeleteOne) Exec

Exec executes the deletion query.

func (*OrganizationPersonDeleteOne) ExecX

func (opdo *OrganizationPersonDeleteOne) ExecX(ctx context.Context)

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

func (*OrganizationPersonDeleteOne) Where

Where appends a list predicates to the OrganizationPersonDelete builder.

type OrganizationPersonGroupBy

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

OrganizationPersonGroupBy is the group-by builder for OrganizationPerson entities.

func (*OrganizationPersonGroupBy) Aggregate

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

func (*OrganizationPersonGroupBy) Bool

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

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

func (*OrganizationPersonGroupBy) BoolX

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

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

func (*OrganizationPersonGroupBy) Bools

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

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

func (*OrganizationPersonGroupBy) BoolsX

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

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

func (*OrganizationPersonGroupBy) Float64

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

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

func (*OrganizationPersonGroupBy) Float64X

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

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

func (*OrganizationPersonGroupBy) Float64s

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

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

func (*OrganizationPersonGroupBy) Float64sX

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

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

func (*OrganizationPersonGroupBy) Int

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

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

func (*OrganizationPersonGroupBy) IntX

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

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

func (*OrganizationPersonGroupBy) Ints

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

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

func (*OrganizationPersonGroupBy) IntsX

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

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

func (*OrganizationPersonGroupBy) Scan

func (opgb *OrganizationPersonGroupBy) Scan(ctx context.Context, v any) error

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

func (*OrganizationPersonGroupBy) ScanX

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

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

func (*OrganizationPersonGroupBy) String

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

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

func (*OrganizationPersonGroupBy) StringX

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

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

func (*OrganizationPersonGroupBy) Strings

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

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

func (*OrganizationPersonGroupBy) StringsX

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

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

type OrganizationPersonMutation

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

OrganizationPersonMutation represents an operation that mutates the OrganizationPerson nodes in the graph.

func (*OrganizationPersonMutation) AddField

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) AddOrganizationID

func (m *OrganizationPersonMutation) AddOrganizationID(i int)

AddOrganizationID adds i to the "organization_id" field.

func (*OrganizationPersonMutation) AddPersonID

func (m *OrganizationPersonMutation) AddPersonID(i int)

AddPersonID adds i to the "person_id" field.

func (*OrganizationPersonMutation) AddedEdges

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

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

func (*OrganizationPersonMutation) AddedField

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) AddedFields

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

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

func (*OrganizationPersonMutation) AddedIDs

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

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

func (*OrganizationPersonMutation) AddedOrganizationID

func (m *OrganizationPersonMutation) AddedOrganizationID() (r int, exists bool)

AddedOrganizationID returns the value that was added to the "organization_id" field in this mutation.

func (*OrganizationPersonMutation) AddedPersonID

func (m *OrganizationPersonMutation) AddedPersonID() (r int, exists bool)

AddedPersonID returns the value that was added to the "person_id" field in this mutation.

func (*OrganizationPersonMutation) ClearEdge

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) ClearField

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) ClearUntil

func (m *OrganizationPersonMutation) ClearUntil()

ClearUntil clears the value of the "until" field.

func (*OrganizationPersonMutation) ClearedEdges

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

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

func (*OrganizationPersonMutation) ClearedFields

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

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

func (OrganizationPersonMutation) Client

func (m OrganizationPersonMutation) 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 (*OrganizationPersonMutation) DateCreated

func (m *OrganizationPersonMutation) DateCreated() (r time.Time, exists bool)

DateCreated returns the value of the "date_created" field in the mutation.

func (*OrganizationPersonMutation) DateUpdated

func (m *OrganizationPersonMutation) DateUpdated() (r time.Time, exists bool)

DateUpdated returns the value of the "date_updated" field in the mutation.

func (*OrganizationPersonMutation) EdgeCleared

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

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

func (*OrganizationPersonMutation) ExecContext

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

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

func (*OrganizationPersonMutation) Field

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) FieldCleared

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

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

func (*OrganizationPersonMutation) Fields

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) From

func (m *OrganizationPersonMutation) From() (r time.Time, exists bool)

From returns the value of the "from" field in the mutation.

func (*OrganizationPersonMutation) ID

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) 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 (*OrganizationPersonMutation) OldDateCreated

func (m *OrganizationPersonMutation) OldDateCreated(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationPersonMutation) OldDateUpdated

func (m *OrganizationPersonMutation) OldDateUpdated(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationPersonMutation) OldField

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) OldFrom

func (m *OrganizationPersonMutation) OldFrom(ctx context.Context) (v time.Time, err error)

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

func (*OrganizationPersonMutation) OldOrganizationID

func (m *OrganizationPersonMutation) OldOrganizationID(ctx context.Context) (v int, err error)

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

func (*OrganizationPersonMutation) OldPersonID

func (m *OrganizationPersonMutation) OldPersonID(ctx context.Context) (v int, err error)

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

func (*OrganizationPersonMutation) OldUntil

func (m *OrganizationPersonMutation) OldUntil(ctx context.Context) (v *time.Time, err error)

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

func (*OrganizationPersonMutation) Op

Op returns the operation name.

func (*OrganizationPersonMutation) OrganizationID

func (m *OrganizationPersonMutation) OrganizationID() (r int, exists bool)

OrganizationID returns the value of the "organization_id" field in the mutation.

func (*OrganizationPersonMutation) PersonID

func (m *OrganizationPersonMutation) PersonID() (r int, exists bool)

PersonID returns the value of the "person_id" field in the mutation.

func (*OrganizationPersonMutation) QueryContext

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

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

func (*OrganizationPersonMutation) RemovedEdges

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

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

func (*OrganizationPersonMutation) RemovedIDs

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) ResetDateCreated

func (m *OrganizationPersonMutation) ResetDateCreated()

ResetDateCreated resets all changes to the "date_created" field.

func (*OrganizationPersonMutation) ResetDateUpdated

func (m *OrganizationPersonMutation) ResetDateUpdated()

ResetDateUpdated resets all changes to the "date_updated" field.

func (*OrganizationPersonMutation) ResetEdge

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) ResetField

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) ResetFrom

func (m *OrganizationPersonMutation) ResetFrom()

ResetFrom resets all changes to the "from" field.

func (*OrganizationPersonMutation) ResetOrganizationID

func (m *OrganizationPersonMutation) ResetOrganizationID()

ResetOrganizationID resets all changes to the "organization_id" field.

func (*OrganizationPersonMutation) ResetPersonID

func (m *OrganizationPersonMutation) ResetPersonID()

ResetPersonID resets all changes to the "person_id" field.

func (*OrganizationPersonMutation) ResetUntil

func (m *OrganizationPersonMutation) ResetUntil()

ResetUntil resets all changes to the "until" field.

func (*OrganizationPersonMutation) SetDateCreated

func (m *OrganizationPersonMutation) SetDateCreated(t time.Time)

SetDateCreated sets the "date_created" field.

func (*OrganizationPersonMutation) SetDateUpdated

func (m *OrganizationPersonMutation) SetDateUpdated(t time.Time)

SetDateUpdated sets the "date_updated" field.

func (*OrganizationPersonMutation) SetField

func (m *OrganizationPersonMutation) 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 (*OrganizationPersonMutation) SetFrom

func (m *OrganizationPersonMutation) SetFrom(t time.Time)

SetFrom sets the "from" field.

func (*OrganizationPersonMutation) SetOp

func (m *OrganizationPersonMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrganizationPersonMutation) SetOrganizationID

func (m *OrganizationPersonMutation) SetOrganizationID(i int)

SetOrganizationID sets the "organization_id" field.

func (*OrganizationPersonMutation) SetPersonID

func (m *OrganizationPersonMutation) SetPersonID(i int)

SetPersonID sets the "person_id" field.

func (*OrganizationPersonMutation) SetUntil

func (m *OrganizationPersonMutation) SetUntil(t time.Time)

SetUntil sets the "until" field.

func (OrganizationPersonMutation) Tx

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

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

func (*OrganizationPersonMutation) Type

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

func (*OrganizationPersonMutation) Until

func (m *OrganizationPersonMutation) Until() (r time.Time, exists bool)

Until returns the value of the "until" field in the mutation.

func (*OrganizationPersonMutation) UntilCleared

func (m *OrganizationPersonMutation) UntilCleared() bool

UntilCleared returns if the "until" field was cleared in this mutation.

func (*OrganizationPersonMutation) Where

Where appends a list predicates to the OrganizationPersonMutation builder.

func (*OrganizationPersonMutation) WhereP

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

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

type OrganizationPersonQuery

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

OrganizationPersonQuery is the builder for querying OrganizationPerson entities.

func (*OrganizationPersonQuery) Aggregate

Aggregate returns a OrganizationPersonSelect configured with the given aggregations.

func (*OrganizationPersonQuery) All

All executes the query and returns a list of OrganizationPersons.

func (*OrganizationPersonQuery) AllX

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

func (*OrganizationPersonQuery) Clone

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

func (*OrganizationPersonQuery) Count

func (opq *OrganizationPersonQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrganizationPersonQuery) CountX

func (opq *OrganizationPersonQuery) CountX(ctx context.Context) int

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

func (*OrganizationPersonQuery) ExecContext

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

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

func (*OrganizationPersonQuery) Exist

func (opq *OrganizationPersonQuery) Exist(ctx context.Context) (bool, error)

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

func (*OrganizationPersonQuery) ExistX

func (opq *OrganizationPersonQuery) ExistX(ctx context.Context) bool

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

func (*OrganizationPersonQuery) First

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

func (*OrganizationPersonQuery) FirstID

func (opq *OrganizationPersonQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*OrganizationPersonQuery) FirstIDX

func (opq *OrganizationPersonQuery) FirstIDX(ctx context.Context) int

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

func (*OrganizationPersonQuery) FirstX

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

func (*OrganizationPersonQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*OrganizationPersonQuery) ForUpdate

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*OrganizationPersonQuery) GroupBy

func (opq *OrganizationPersonQuery) GroupBy(field string, fields ...string) *OrganizationPersonGroupBy

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrganizationPerson.Query().
	GroupBy(organizationperson.FieldDateCreated).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrganizationPersonQuery) IDs

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

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

func (*OrganizationPersonQuery) IDsX

func (opq *OrganizationPersonQuery) IDsX(ctx context.Context) []int

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

func (*OrganizationPersonQuery) Limit

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

func (*OrganizationPersonQuery) Modify

func (opq *OrganizationPersonQuery) Modify(modifiers ...func(s *sql.Selector)) *OrganizationPersonSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OrganizationPersonQuery) Offset

Offset to start from.

func (*OrganizationPersonQuery) Only

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

func (*OrganizationPersonQuery) OnlyID

func (opq *OrganizationPersonQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*OrganizationPersonQuery) OnlyIDX

func (opq *OrganizationPersonQuery) OnlyIDX(ctx context.Context) int

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

func (*OrganizationPersonQuery) OnlyX

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

func (*OrganizationPersonQuery) Order

Order specifies how the records should be ordered.

func (*OrganizationPersonQuery) QueryContext

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

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

func (*OrganizationPersonQuery) Select

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
}

client.OrganizationPerson.Query().
	Select(organizationperson.FieldDateCreated).
	Scan(ctx, &v)

func (*OrganizationPersonQuery) 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 (*OrganizationPersonQuery) Where

Where adds a new predicate for the OrganizationPersonQuery builder.

type OrganizationPersonSelect

type OrganizationPersonSelect struct {
	*OrganizationPersonQuery
	// contains filtered or unexported fields
}

OrganizationPersonSelect is the builder for selecting fields of OrganizationPerson entities.

func (*OrganizationPersonSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*OrganizationPersonSelect) Bool

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

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

func (*OrganizationPersonSelect) BoolX

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

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

func (*OrganizationPersonSelect) Bools

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

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

func (*OrganizationPersonSelect) BoolsX

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

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

func (OrganizationPersonSelect) ExecContext

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

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

func (*OrganizationPersonSelect) Float64

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

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

func (*OrganizationPersonSelect) Float64X

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

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

func (*OrganizationPersonSelect) Float64s

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

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

func (*OrganizationPersonSelect) Float64sX

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

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

func (*OrganizationPersonSelect) Int

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

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

func (*OrganizationPersonSelect) IntX

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

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

func (*OrganizationPersonSelect) Ints

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

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

func (*OrganizationPersonSelect) IntsX

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

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

func (*OrganizationPersonSelect) Modify

func (ops *OrganizationPersonSelect) Modify(modifiers ...func(s *sql.Selector)) *OrganizationPersonSelect

Modify adds a query modifier for attaching custom logic to queries.

func (OrganizationPersonSelect) QueryContext

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

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

func (*OrganizationPersonSelect) Scan

func (ops *OrganizationPersonSelect) Scan(ctx context.Context, v any) error

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

func (*OrganizationPersonSelect) ScanX

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

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

func (*OrganizationPersonSelect) String

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

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

func (*OrganizationPersonSelect) StringX

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

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

func (*OrganizationPersonSelect) Strings

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

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

func (*OrganizationPersonSelect) StringsX

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

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

type OrganizationPersonUpdate

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

OrganizationPersonUpdate is the builder for updating OrganizationPerson entities.

func (*OrganizationPersonUpdate) AddOrganizationID

func (opu *OrganizationPersonUpdate) AddOrganizationID(i int) *OrganizationPersonUpdate

AddOrganizationID adds i to the "organization_id" field.

func (*OrganizationPersonUpdate) AddPersonID

AddPersonID adds i to the "person_id" field.

func (*OrganizationPersonUpdate) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationPersonUpdate) Exec

Exec executes the query.

func (*OrganizationPersonUpdate) ExecContext

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

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

func (*OrganizationPersonUpdate) ExecX

func (opu *OrganizationPersonUpdate) ExecX(ctx context.Context)

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

func (*OrganizationPersonUpdate) Modify

func (opu *OrganizationPersonUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationPersonUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationPersonUpdate) Mutation

Mutation returns the OrganizationPersonMutation object of the builder.

func (*OrganizationPersonUpdate) QueryContext

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

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

func (*OrganizationPersonUpdate) Save

func (opu *OrganizationPersonUpdate) Save(ctx context.Context) (int, error)

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

func (*OrganizationPersonUpdate) SaveX

func (opu *OrganizationPersonUpdate) SaveX(ctx context.Context) int

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

func (*OrganizationPersonUpdate) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationPersonUpdate) SetFrom

SetFrom sets the "from" field.

func (*OrganizationPersonUpdate) SetNillableFrom

func (opu *OrganizationPersonUpdate) SetNillableFrom(t *time.Time) *OrganizationPersonUpdate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*OrganizationPersonUpdate) SetNillableUntil

func (opu *OrganizationPersonUpdate) SetNillableUntil(t *time.Time) *OrganizationPersonUpdate

SetNillableUntil sets the "until" field if the given value is not nil.

func (*OrganizationPersonUpdate) SetOrganizationID

func (opu *OrganizationPersonUpdate) SetOrganizationID(i int) *OrganizationPersonUpdate

SetOrganizationID sets the "organization_id" field.

func (*OrganizationPersonUpdate) SetPersonID

SetPersonID sets the "person_id" field.

func (*OrganizationPersonUpdate) SetUntil

SetUntil sets the "until" field.

func (*OrganizationPersonUpdate) Where

Where appends a list predicates to the OrganizationPersonUpdate builder.

type OrganizationPersonUpdateOne

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

OrganizationPersonUpdateOne is the builder for updating a single OrganizationPerson entity.

func (*OrganizationPersonUpdateOne) AddOrganizationID

func (opuo *OrganizationPersonUpdateOne) AddOrganizationID(i int) *OrganizationPersonUpdateOne

AddOrganizationID adds i to the "organization_id" field.

func (*OrganizationPersonUpdateOne) AddPersonID

AddPersonID adds i to the "person_id" field.

func (*OrganizationPersonUpdateOne) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationPersonUpdateOne) Exec

Exec executes the query on the entity.

func (*OrganizationPersonUpdateOne) ExecContext

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

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

func (*OrganizationPersonUpdateOne) ExecX

func (opuo *OrganizationPersonUpdateOne) ExecX(ctx context.Context)

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

func (*OrganizationPersonUpdateOne) Modify

func (opuo *OrganizationPersonUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationPersonUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationPersonUpdateOne) Mutation

Mutation returns the OrganizationPersonMutation object of the builder.

func (*OrganizationPersonUpdateOne) QueryContext

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

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

func (*OrganizationPersonUpdateOne) Save

Save executes the query and returns the updated OrganizationPerson entity.

func (*OrganizationPersonUpdateOne) SaveX

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

func (*OrganizationPersonUpdateOne) Select

func (opuo *OrganizationPersonUpdateOne) Select(field string, fields ...string) *OrganizationPersonUpdateOne

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

func (*OrganizationPersonUpdateOne) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationPersonUpdateOne) SetFrom

SetFrom sets the "from" field.

func (*OrganizationPersonUpdateOne) SetNillableFrom

SetNillableFrom sets the "from" field if the given value is not nil.

func (*OrganizationPersonUpdateOne) SetNillableUntil

SetNillableUntil sets the "until" field if the given value is not nil.

func (*OrganizationPersonUpdateOne) SetOrganizationID

func (opuo *OrganizationPersonUpdateOne) SetOrganizationID(i int) *OrganizationPersonUpdateOne

SetOrganizationID sets the "organization_id" field.

func (*OrganizationPersonUpdateOne) SetPersonID

SetPersonID sets the "person_id" field.

func (*OrganizationPersonUpdateOne) SetUntil

SetUntil sets the "until" field.

func (*OrganizationPersonUpdateOne) Where

Where appends a list predicates to the OrganizationPersonUpdate builder.

type OrganizationPersonUpsert

type OrganizationPersonUpsert struct {
	*sql.UpdateSet
}

OrganizationPersonUpsert is the "OnConflict" setter.

func (*OrganizationPersonUpsert) AddOrganizationID

func (u *OrganizationPersonUpsert) AddOrganizationID(v int) *OrganizationPersonUpsert

AddOrganizationID adds v to the "organization_id" field.

func (*OrganizationPersonUpsert) AddPersonID

AddPersonID adds v to the "person_id" field.

func (*OrganizationPersonUpsert) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationPersonUpsert) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationPersonUpsert) SetFrom

SetFrom sets the "from" field.

func (*OrganizationPersonUpsert) SetOrganizationID

func (u *OrganizationPersonUpsert) SetOrganizationID(v int) *OrganizationPersonUpsert

SetOrganizationID sets the "organization_id" field.

func (*OrganizationPersonUpsert) SetPersonID

SetPersonID sets the "person_id" field.

func (*OrganizationPersonUpsert) SetUntil

SetUntil sets the "until" field.

func (*OrganizationPersonUpsert) UpdateDateUpdated

func (u *OrganizationPersonUpsert) UpdateDateUpdated() *OrganizationPersonUpsert

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationPersonUpsert) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*OrganizationPersonUpsert) UpdateOrganizationID

func (u *OrganizationPersonUpsert) UpdateOrganizationID() *OrganizationPersonUpsert

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OrganizationPersonUpsert) UpdatePersonID

UpdatePersonID sets the "person_id" field to the value that was provided on create.

func (*OrganizationPersonUpsert) UpdateUntil

UpdateUntil sets the "until" field to the value that was provided on create.

type OrganizationPersonUpsertBulk

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

OrganizationPersonUpsertBulk is the builder for "upsert"-ing a bulk of OrganizationPerson nodes.

func (*OrganizationPersonUpsertBulk) AddOrganizationID

AddOrganizationID adds v to the "organization_id" field.

func (*OrganizationPersonUpsertBulk) AddPersonID

AddPersonID adds v to the "person_id" field.

func (*OrganizationPersonUpsertBulk) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationPersonUpsertBulk) DoNothing

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

func (*OrganizationPersonUpsertBulk) Exec

Exec executes the query.

func (*OrganizationPersonUpsertBulk) ExecX

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

func (*OrganizationPersonUpsertBulk) Ignore

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

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

func (*OrganizationPersonUpsertBulk) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationPersonUpsertBulk) SetFrom

SetFrom sets the "from" field.

func (*OrganizationPersonUpsertBulk) SetOrganizationID

SetOrganizationID sets the "organization_id" field.

func (*OrganizationPersonUpsertBulk) SetPersonID

SetPersonID sets the "person_id" field.

func (*OrganizationPersonUpsertBulk) SetUntil

SetUntil sets the "until" field.

func (*OrganizationPersonUpsertBulk) Update

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

func (*OrganizationPersonUpsertBulk) UpdateDateUpdated

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationPersonUpsertBulk) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*OrganizationPersonUpsertBulk) UpdateNewValues

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

client.OrganizationPerson.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OrganizationPersonUpsertBulk) UpdateOrganizationID

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OrganizationPersonUpsertBulk) UpdatePersonID

UpdatePersonID sets the "person_id" field to the value that was provided on create.

func (*OrganizationPersonUpsertBulk) UpdateUntil

UpdateUntil sets the "until" field to the value that was provided on create.

type OrganizationPersonUpsertOne

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

OrganizationPersonUpsertOne is the builder for "upsert"-ing

one OrganizationPerson node.

func (*OrganizationPersonUpsertOne) AddOrganizationID

AddOrganizationID adds v to the "organization_id" field.

func (*OrganizationPersonUpsertOne) AddPersonID

AddPersonID adds v to the "person_id" field.

func (*OrganizationPersonUpsertOne) ClearUntil

ClearUntil clears the value of the "until" field.

func (*OrganizationPersonUpsertOne) DoNothing

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

func (*OrganizationPersonUpsertOne) Exec

Exec executes the query.

func (*OrganizationPersonUpsertOne) ExecX

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

func (*OrganizationPersonUpsertOne) ID

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

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

func (*OrganizationPersonUpsertOne) IDX

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

func (*OrganizationPersonUpsertOne) Ignore

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

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

func (*OrganizationPersonUpsertOne) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationPersonUpsertOne) SetFrom

SetFrom sets the "from" field.

func (*OrganizationPersonUpsertOne) SetOrganizationID

SetOrganizationID sets the "organization_id" field.

func (*OrganizationPersonUpsertOne) SetPersonID

SetPersonID sets the "person_id" field.

func (*OrganizationPersonUpsertOne) SetUntil

SetUntil sets the "until" field.

func (*OrganizationPersonUpsertOne) Update

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

func (*OrganizationPersonUpsertOne) UpdateDateUpdated

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationPersonUpsertOne) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*OrganizationPersonUpsertOne) UpdateNewValues

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

client.OrganizationPerson.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OrganizationPersonUpsertOne) UpdateOrganizationID

func (u *OrganizationPersonUpsertOne) UpdateOrganizationID() *OrganizationPersonUpsertOne

UpdateOrganizationID sets the "organization_id" field to the value that was provided on create.

func (*OrganizationPersonUpsertOne) UpdatePersonID

UpdatePersonID sets the "person_id" field to the value that was provided on create.

func (*OrganizationPersonUpsertOne) UpdateUntil

UpdateUntil sets the "until" field to the value that was provided on create.

type OrganizationPersons

type OrganizationPersons []*OrganizationPerson

OrganizationPersons is a parsable slice of OrganizationPerson.

type OrganizationQuery

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

OrganizationQuery is the builder for querying Organization entities.

func (*OrganizationQuery) Aggregate

func (oq *OrganizationQuery) Aggregate(fns ...AggregateFunc) *OrganizationSelect

Aggregate returns a OrganizationSelect configured with the given aggregations.

func (*OrganizationQuery) All

func (oq *OrganizationQuery) All(ctx context.Context) ([]*Organization, error)

All executes the query and returns a list of Organizations.

func (*OrganizationQuery) AllX

func (oq *OrganizationQuery) AllX(ctx context.Context) []*Organization

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

func (*OrganizationQuery) Clone

func (oq *OrganizationQuery) Clone() *OrganizationQuery

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

func (*OrganizationQuery) Count

func (oq *OrganizationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrganizationQuery) CountX

func (oq *OrganizationQuery) CountX(ctx context.Context) int

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

func (*OrganizationQuery) ExecContext

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

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

func (*OrganizationQuery) Exist

func (oq *OrganizationQuery) Exist(ctx context.Context) (bool, error)

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

func (*OrganizationQuery) ExistX

func (oq *OrganizationQuery) ExistX(ctx context.Context) bool

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

func (*OrganizationQuery) First

func (oq *OrganizationQuery) First(ctx context.Context) (*Organization, error)

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

func (*OrganizationQuery) FirstID

func (oq *OrganizationQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*OrganizationQuery) FirstIDX

func (oq *OrganizationQuery) FirstIDX(ctx context.Context) int

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

func (*OrganizationQuery) FirstX

func (oq *OrganizationQuery) FirstX(ctx context.Context) *Organization

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

func (*OrganizationQuery) ForShare

func (oq *OrganizationQuery) ForShare(opts ...sql.LockOption) *OrganizationQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*OrganizationQuery) ForUpdate

func (oq *OrganizationQuery) ForUpdate(opts ...sql.LockOption) *OrganizationQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*OrganizationQuery) GroupBy

func (oq *OrganizationQuery) GroupBy(field string, fields ...string) *OrganizationGroupBy

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Organization.Query().
	GroupBy(organization.FieldDateCreated).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrganizationQuery) IDs

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

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

func (*OrganizationQuery) IDsX

func (oq *OrganizationQuery) IDsX(ctx context.Context) []int

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

func (*OrganizationQuery) Limit

func (oq *OrganizationQuery) Limit(limit int) *OrganizationQuery

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

func (*OrganizationQuery) Modify

func (oq *OrganizationQuery) Modify(modifiers ...func(s *sql.Selector)) *OrganizationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*OrganizationQuery) Offset

func (oq *OrganizationQuery) Offset(offset int) *OrganizationQuery

Offset to start from.

func (*OrganizationQuery) Only

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

func (*OrganizationQuery) OnlyID

func (oq *OrganizationQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*OrganizationQuery) OnlyIDX

func (oq *OrganizationQuery) OnlyIDX(ctx context.Context) int

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

func (*OrganizationQuery) OnlyX

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

func (*OrganizationQuery) Order

Order specifies how the records should be ordered.

func (*OrganizationQuery) QueryContext

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

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

func (*OrganizationQuery) Select

func (oq *OrganizationQuery) Select(fields ...string) *OrganizationSelect

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
}

client.Organization.Query().
	Select(organization.FieldDateCreated).
	Scan(ctx, &v)

func (*OrganizationQuery) Unique

func (oq *OrganizationQuery) Unique(unique bool) *OrganizationQuery

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 (*OrganizationQuery) Where

Where adds a new predicate for the OrganizationQuery builder.

type OrganizationSelect

type OrganizationSelect struct {
	*OrganizationQuery
	// contains filtered or unexported fields
}

OrganizationSelect is the builder for selecting fields of Organization entities.

func (*OrganizationSelect) Aggregate

func (os *OrganizationSelect) Aggregate(fns ...AggregateFunc) *OrganizationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrganizationSelect) Bool

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

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

func (*OrganizationSelect) BoolX

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

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

func (*OrganizationSelect) Bools

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

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

func (*OrganizationSelect) BoolsX

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

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

func (OrganizationSelect) ExecContext

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

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

func (*OrganizationSelect) Float64

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

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

func (*OrganizationSelect) Float64X

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

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

func (*OrganizationSelect) Float64s

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

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

func (*OrganizationSelect) Float64sX

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

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

func (*OrganizationSelect) Int

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

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

func (*OrganizationSelect) IntX

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

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

func (*OrganizationSelect) Ints

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

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

func (*OrganizationSelect) IntsX

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

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

func (*OrganizationSelect) Modify

func (os *OrganizationSelect) Modify(modifiers ...func(s *sql.Selector)) *OrganizationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (OrganizationSelect) QueryContext

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

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

func (*OrganizationSelect) Scan

func (os *OrganizationSelect) Scan(ctx context.Context, v any) error

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

func (*OrganizationSelect) ScanX

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

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

func (*OrganizationSelect) String

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

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

func (*OrganizationSelect) StringX

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

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

func (*OrganizationSelect) Strings

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

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

func (*OrganizationSelect) StringsX

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

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

type OrganizationUpdate

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

OrganizationUpdate is the builder for updating Organization entities.

func (*OrganizationUpdate) AppendIdentifier

func (ou *OrganizationUpdate) AppendIdentifier(s []string) *OrganizationUpdate

AppendIdentifier appends s to the "identifier" field.

func (*OrganizationUpdate) AppendIdentifierValues

func (ou *OrganizationUpdate) AppendIdentifierValues(s []string) *OrganizationUpdate

AppendIdentifierValues appends s to the "identifier_values" field.

func (*OrganizationUpdate) ClearAcronym

func (ou *OrganizationUpdate) ClearAcronym() *OrganizationUpdate

ClearAcronym clears the value of the "acronym" field.

func (*OrganizationUpdate) ClearIdentifier

func (ou *OrganizationUpdate) ClearIdentifier() *OrganizationUpdate

ClearIdentifier clears the value of the "identifier" field.

func (*OrganizationUpdate) ClearIdentifierValues

func (ou *OrganizationUpdate) ClearIdentifierValues() *OrganizationUpdate

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*OrganizationUpdate) ClearNameDut

func (ou *OrganizationUpdate) ClearNameDut() *OrganizationUpdate

ClearNameDut clears the value of the "name_dut" field.

func (*OrganizationUpdate) ClearNameEng

func (ou *OrganizationUpdate) ClearNameEng() *OrganizationUpdate

ClearNameEng clears the value of the "name_eng" field.

func (*OrganizationUpdate) Exec

func (ou *OrganizationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrganizationUpdate) ExecContext

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

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

func (*OrganizationUpdate) ExecX

func (ou *OrganizationUpdate) ExecX(ctx context.Context)

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

func (*OrganizationUpdate) Modify

func (ou *OrganizationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationUpdate) Mutation

func (ou *OrganizationUpdate) Mutation() *OrganizationMutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationUpdate) QueryContext

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

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

func (*OrganizationUpdate) Save

func (ou *OrganizationUpdate) Save(ctx context.Context) (int, error)

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

func (*OrganizationUpdate) SaveX

func (ou *OrganizationUpdate) SaveX(ctx context.Context) int

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

func (*OrganizationUpdate) SetAcronym

func (ou *OrganizationUpdate) SetAcronym(s string) *OrganizationUpdate

SetAcronym sets the "acronym" field.

func (*OrganizationUpdate) SetDateUpdated

func (ou *OrganizationUpdate) SetDateUpdated(t time.Time) *OrganizationUpdate

SetDateUpdated sets the "date_updated" field.

func (*OrganizationUpdate) SetIdentifier

func (ou *OrganizationUpdate) SetIdentifier(s []string) *OrganizationUpdate

SetIdentifier sets the "identifier" field.

func (*OrganizationUpdate) SetIdentifierValues

func (ou *OrganizationUpdate) SetIdentifierValues(s []string) *OrganizationUpdate

SetIdentifierValues sets the "identifier_values" field.

func (*OrganizationUpdate) SetNameDut

func (ou *OrganizationUpdate) SetNameDut(s string) *OrganizationUpdate

SetNameDut sets the "name_dut" field.

func (*OrganizationUpdate) SetNameEng

func (ou *OrganizationUpdate) SetNameEng(s string) *OrganizationUpdate

SetNameEng sets the "name_eng" field.

func (*OrganizationUpdate) SetNillableAcronym

func (ou *OrganizationUpdate) SetNillableAcronym(s *string) *OrganizationUpdate

SetNillableAcronym sets the "acronym" field if the given value is not nil.

func (*OrganizationUpdate) SetNillableNameDut

func (ou *OrganizationUpdate) SetNillableNameDut(s *string) *OrganizationUpdate

SetNillableNameDut sets the "name_dut" field if the given value is not nil.

func (*OrganizationUpdate) SetNillableNameEng

func (ou *OrganizationUpdate) SetNillableNameEng(s *string) *OrganizationUpdate

SetNillableNameEng sets the "name_eng" field if the given value is not nil.

func (*OrganizationUpdate) SetNillableType

func (ou *OrganizationUpdate) SetNillableType(s *string) *OrganizationUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*OrganizationUpdate) SetType

SetType sets the "type" field.

func (*OrganizationUpdate) Where

Where appends a list predicates to the OrganizationUpdate builder.

type OrganizationUpdateOne

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

OrganizationUpdateOne is the builder for updating a single Organization entity.

func (*OrganizationUpdateOne) AppendIdentifier

func (ouo *OrganizationUpdateOne) AppendIdentifier(s []string) *OrganizationUpdateOne

AppendIdentifier appends s to the "identifier" field.

func (*OrganizationUpdateOne) AppendIdentifierValues

func (ouo *OrganizationUpdateOne) AppendIdentifierValues(s []string) *OrganizationUpdateOne

AppendIdentifierValues appends s to the "identifier_values" field.

func (*OrganizationUpdateOne) ClearAcronym

func (ouo *OrganizationUpdateOne) ClearAcronym() *OrganizationUpdateOne

ClearAcronym clears the value of the "acronym" field.

func (*OrganizationUpdateOne) ClearIdentifier

func (ouo *OrganizationUpdateOne) ClearIdentifier() *OrganizationUpdateOne

ClearIdentifier clears the value of the "identifier" field.

func (*OrganizationUpdateOne) ClearIdentifierValues

func (ouo *OrganizationUpdateOne) ClearIdentifierValues() *OrganizationUpdateOne

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*OrganizationUpdateOne) ClearNameDut

func (ouo *OrganizationUpdateOne) ClearNameDut() *OrganizationUpdateOne

ClearNameDut clears the value of the "name_dut" field.

func (*OrganizationUpdateOne) ClearNameEng

func (ouo *OrganizationUpdateOne) ClearNameEng() *OrganizationUpdateOne

ClearNameEng clears the value of the "name_eng" field.

func (*OrganizationUpdateOne) Exec

func (ouo *OrganizationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrganizationUpdateOne) ExecContext

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

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

func (*OrganizationUpdateOne) ExecX

func (ouo *OrganizationUpdateOne) ExecX(ctx context.Context)

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

func (*OrganizationUpdateOne) Modify

func (ouo *OrganizationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrganizationUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*OrganizationUpdateOne) Mutation

Mutation returns the OrganizationMutation object of the builder.

func (*OrganizationUpdateOne) QueryContext

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

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

func (*OrganizationUpdateOne) Save

Save executes the query and returns the updated Organization entity.

func (*OrganizationUpdateOne) SaveX

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

func (*OrganizationUpdateOne) Select

func (ouo *OrganizationUpdateOne) Select(field string, fields ...string) *OrganizationUpdateOne

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

func (*OrganizationUpdateOne) SetAcronym

SetAcronym sets the "acronym" field.

func (*OrganizationUpdateOne) SetDateUpdated

func (ouo *OrganizationUpdateOne) SetDateUpdated(t time.Time) *OrganizationUpdateOne

SetDateUpdated sets the "date_updated" field.

func (*OrganizationUpdateOne) SetIdentifier

func (ouo *OrganizationUpdateOne) SetIdentifier(s []string) *OrganizationUpdateOne

SetIdentifier sets the "identifier" field.

func (*OrganizationUpdateOne) SetIdentifierValues

func (ouo *OrganizationUpdateOne) SetIdentifierValues(s []string) *OrganizationUpdateOne

SetIdentifierValues sets the "identifier_values" field.

func (*OrganizationUpdateOne) SetNameDut

SetNameDut sets the "name_dut" field.

func (*OrganizationUpdateOne) SetNameEng

SetNameEng sets the "name_eng" field.

func (*OrganizationUpdateOne) SetNillableAcronym

func (ouo *OrganizationUpdateOne) SetNillableAcronym(s *string) *OrganizationUpdateOne

SetNillableAcronym sets the "acronym" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableNameDut

func (ouo *OrganizationUpdateOne) SetNillableNameDut(s *string) *OrganizationUpdateOne

SetNillableNameDut sets the "name_dut" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableNameEng

func (ouo *OrganizationUpdateOne) SetNillableNameEng(s *string) *OrganizationUpdateOne

SetNillableNameEng sets the "name_eng" field if the given value is not nil.

func (*OrganizationUpdateOne) SetNillableType

func (ouo *OrganizationUpdateOne) SetNillableType(s *string) *OrganizationUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*OrganizationUpdateOne) SetType

SetType sets the "type" field.

func (*OrganizationUpdateOne) Where

Where appends a list predicates to the OrganizationUpdate builder.

type OrganizationUpsert

type OrganizationUpsert struct {
	*sql.UpdateSet
}

OrganizationUpsert is the "OnConflict" setter.

func (*OrganizationUpsert) ClearAcronym

func (u *OrganizationUpsert) ClearAcronym() *OrganizationUpsert

ClearAcronym clears the value of the "acronym" field.

func (*OrganizationUpsert) ClearIdentifier

func (u *OrganizationUpsert) ClearIdentifier() *OrganizationUpsert

ClearIdentifier clears the value of the "identifier" field.

func (*OrganizationUpsert) ClearIdentifierValues

func (u *OrganizationUpsert) ClearIdentifierValues() *OrganizationUpsert

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*OrganizationUpsert) ClearNameDut

func (u *OrganizationUpsert) ClearNameDut() *OrganizationUpsert

ClearNameDut clears the value of the "name_dut" field.

func (*OrganizationUpsert) ClearNameEng

func (u *OrganizationUpsert) ClearNameEng() *OrganizationUpsert

ClearNameEng clears the value of the "name_eng" field.

func (*OrganizationUpsert) SetAcronym

func (u *OrganizationUpsert) SetAcronym(v string) *OrganizationUpsert

SetAcronym sets the "acronym" field.

func (*OrganizationUpsert) SetDateUpdated

func (u *OrganizationUpsert) SetDateUpdated(v time.Time) *OrganizationUpsert

SetDateUpdated sets the "date_updated" field.

func (*OrganizationUpsert) SetIdentifier

func (u *OrganizationUpsert) SetIdentifier(v []string) *OrganizationUpsert

SetIdentifier sets the "identifier" field.

func (*OrganizationUpsert) SetIdentifierValues

func (u *OrganizationUpsert) SetIdentifierValues(v []string) *OrganizationUpsert

SetIdentifierValues sets the "identifier_values" field.

func (*OrganizationUpsert) SetNameDut

func (u *OrganizationUpsert) SetNameDut(v string) *OrganizationUpsert

SetNameDut sets the "name_dut" field.

func (*OrganizationUpsert) SetNameEng

func (u *OrganizationUpsert) SetNameEng(v string) *OrganizationUpsert

SetNameEng sets the "name_eng" field.

func (*OrganizationUpsert) SetType

SetType sets the "type" field.

func (*OrganizationUpsert) UpdateAcronym

func (u *OrganizationUpsert) UpdateAcronym() *OrganizationUpsert

UpdateAcronym sets the "acronym" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateDateUpdated

func (u *OrganizationUpsert) UpdateDateUpdated() *OrganizationUpsert

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateIdentifier

func (u *OrganizationUpsert) UpdateIdentifier() *OrganizationUpsert

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateIdentifierValues

func (u *OrganizationUpsert) UpdateIdentifierValues() *OrganizationUpsert

UpdateIdentifierValues sets the "identifier_values" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateNameDut

func (u *OrganizationUpsert) UpdateNameDut() *OrganizationUpsert

UpdateNameDut sets the "name_dut" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateNameEng

func (u *OrganizationUpsert) UpdateNameEng() *OrganizationUpsert

UpdateNameEng sets the "name_eng" field to the value that was provided on create.

func (*OrganizationUpsert) UpdateType

func (u *OrganizationUpsert) UpdateType() *OrganizationUpsert

UpdateType sets the "type" field to the value that was provided on create.

type OrganizationUpsertBulk

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

OrganizationUpsertBulk is the builder for "upsert"-ing a bulk of Organization nodes.

func (*OrganizationUpsertBulk) ClearAcronym

ClearAcronym clears the value of the "acronym" field.

func (*OrganizationUpsertBulk) ClearIdentifier

func (u *OrganizationUpsertBulk) ClearIdentifier() *OrganizationUpsertBulk

ClearIdentifier clears the value of the "identifier" field.

func (*OrganizationUpsertBulk) ClearIdentifierValues

func (u *OrganizationUpsertBulk) ClearIdentifierValues() *OrganizationUpsertBulk

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*OrganizationUpsertBulk) ClearNameDut

ClearNameDut clears the value of the "name_dut" field.

func (*OrganizationUpsertBulk) ClearNameEng

ClearNameEng clears the value of the "name_eng" field.

func (*OrganizationUpsertBulk) DoNothing

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

func (*OrganizationUpsertBulk) Exec

Exec executes the query.

func (*OrganizationUpsertBulk) ExecX

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

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

func (*OrganizationUpsertBulk) Ignore

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

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

func (*OrganizationUpsertBulk) SetAcronym

SetAcronym sets the "acronym" field.

func (*OrganizationUpsertBulk) SetDateUpdated

SetDateUpdated sets the "date_updated" field.

func (*OrganizationUpsertBulk) SetIdentifier

func (u *OrganizationUpsertBulk) SetIdentifier(v []string) *OrganizationUpsertBulk

SetIdentifier sets the "identifier" field.

func (*OrganizationUpsertBulk) SetIdentifierValues

func (u *OrganizationUpsertBulk) SetIdentifierValues(v []string) *OrganizationUpsertBulk

SetIdentifierValues sets the "identifier_values" field.

func (*OrganizationUpsertBulk) SetNameDut

SetNameDut sets the "name_dut" field.

func (*OrganizationUpsertBulk) SetNameEng

SetNameEng sets the "name_eng" field.

func (*OrganizationUpsertBulk) SetType

SetType sets the "type" field.

func (*OrganizationUpsertBulk) Update

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

func (*OrganizationUpsertBulk) UpdateAcronym

func (u *OrganizationUpsertBulk) UpdateAcronym() *OrganizationUpsertBulk

UpdateAcronym sets the "acronym" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateDateUpdated

func (u *OrganizationUpsertBulk) UpdateDateUpdated() *OrganizationUpsertBulk

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateIdentifier

func (u *OrganizationUpsertBulk) UpdateIdentifier() *OrganizationUpsertBulk

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateIdentifierValues

func (u *OrganizationUpsertBulk) UpdateIdentifierValues() *OrganizationUpsertBulk

UpdateIdentifierValues sets the "identifier_values" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateNameDut

func (u *OrganizationUpsertBulk) UpdateNameDut() *OrganizationUpsertBulk

UpdateNameDut sets the "name_dut" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateNameEng

func (u *OrganizationUpsertBulk) UpdateNameEng() *OrganizationUpsertBulk

UpdateNameEng sets the "name_eng" field to the value that was provided on create.

func (*OrganizationUpsertBulk) UpdateNewValues

func (u *OrganizationUpsertBulk) UpdateNewValues() *OrganizationUpsertBulk

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

client.Organization.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OrganizationUpsertBulk) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type OrganizationUpsertOne

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

OrganizationUpsertOne is the builder for "upsert"-ing

one Organization node.

func (*OrganizationUpsertOne) ClearAcronym

func (u *OrganizationUpsertOne) ClearAcronym() *OrganizationUpsertOne

ClearAcronym clears the value of the "acronym" field.

func (*OrganizationUpsertOne) ClearIdentifier

func (u *OrganizationUpsertOne) ClearIdentifier() *OrganizationUpsertOne

ClearIdentifier clears the value of the "identifier" field.

func (*OrganizationUpsertOne) ClearIdentifierValues

func (u *OrganizationUpsertOne) ClearIdentifierValues() *OrganizationUpsertOne

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*OrganizationUpsertOne) ClearNameDut

func (u *OrganizationUpsertOne) ClearNameDut() *OrganizationUpsertOne

ClearNameDut clears the value of the "name_dut" field.

func (*OrganizationUpsertOne) ClearNameEng

func (u *OrganizationUpsertOne) ClearNameEng() *OrganizationUpsertOne

ClearNameEng clears the value of the "name_eng" field.

func (*OrganizationUpsertOne) DoNothing

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

func (*OrganizationUpsertOne) Exec

Exec executes the query.

func (*OrganizationUpsertOne) ExecX

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

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

func (*OrganizationUpsertOne) ID

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

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

func (*OrganizationUpsertOne) IDX

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

func (*OrganizationUpsertOne) Ignore

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

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

func (*OrganizationUpsertOne) SetAcronym

SetAcronym sets the "acronym" field.

func (*OrganizationUpsertOne) SetDateUpdated

func (u *OrganizationUpsertOne) SetDateUpdated(v time.Time) *OrganizationUpsertOne

SetDateUpdated sets the "date_updated" field.

func (*OrganizationUpsertOne) SetIdentifier

func (u *OrganizationUpsertOne) SetIdentifier(v []string) *OrganizationUpsertOne

SetIdentifier sets the "identifier" field.

func (*OrganizationUpsertOne) SetIdentifierValues

func (u *OrganizationUpsertOne) SetIdentifierValues(v []string) *OrganizationUpsertOne

SetIdentifierValues sets the "identifier_values" field.

func (*OrganizationUpsertOne) SetNameDut

SetNameDut sets the "name_dut" field.

func (*OrganizationUpsertOne) SetNameEng

SetNameEng sets the "name_eng" field.

func (*OrganizationUpsertOne) SetType

SetType sets the "type" field.

func (*OrganizationUpsertOne) Update

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

func (*OrganizationUpsertOne) UpdateAcronym

func (u *OrganizationUpsertOne) UpdateAcronym() *OrganizationUpsertOne

UpdateAcronym sets the "acronym" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateDateUpdated

func (u *OrganizationUpsertOne) UpdateDateUpdated() *OrganizationUpsertOne

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateIdentifier

func (u *OrganizationUpsertOne) UpdateIdentifier() *OrganizationUpsertOne

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateIdentifierValues

func (u *OrganizationUpsertOne) UpdateIdentifierValues() *OrganizationUpsertOne

UpdateIdentifierValues sets the "identifier_values" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateNameDut

func (u *OrganizationUpsertOne) UpdateNameDut() *OrganizationUpsertOne

UpdateNameDut sets the "name_dut" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateNameEng

func (u *OrganizationUpsertOne) UpdateNameEng() *OrganizationUpsertOne

UpdateNameEng sets the "name_eng" field to the value that was provided on create.

func (*OrganizationUpsertOne) UpdateNewValues

func (u *OrganizationUpsertOne) UpdateNewValues() *OrganizationUpsertOne

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

client.Organization.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*OrganizationUpsertOne) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

type Organizations

type Organizations []*Organization

Organizations is a parsable slice of Organization.

type Person

type Person struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// DateCreated holds the value of the "date_created" field.
	DateCreated time.Time `json:"date_created,omitempty"`
	// DateUpdated holds the value of the "date_updated" field.
	DateUpdated time.Time `json:"date_updated,omitempty"`
	// PublicID holds the value of the "public_id" field.
	PublicID string `json:"public_id,omitempty"`
	// Identifier holds the value of the "identifier" field.
	Identifier []string `json:"identifier,omitempty"`
	// IdentifierValues holds the value of the "identifier_values" field.
	IdentifierValues []string `json:"identifier_values,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// BirthDate holds the value of the "birth_date" field.
	BirthDate string `json:"birth_date,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// GivenName holds the value of the "given_name" field.
	GivenName string `json:"given_name,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// FamilyName holds the value of the "family_name" field.
	FamilyName string `json:"family_name,omitempty"`
	// JobCategory holds the value of the "job_category" field.
	JobCategory []string `json:"job_category,omitempty"`
	// PreferredGivenName holds the value of the "preferred_given_name" field.
	PreferredGivenName string `json:"preferred_given_name,omitempty"`
	// PreferredFamilyName holds the value of the "preferred_family_name" field.
	PreferredFamilyName string `json:"preferred_family_name,omitempty"`
	// HonorificPrefix holds the value of the "honorific_prefix" field.
	HonorificPrefix string `json:"honorific_prefix,omitempty"`
	// Role holds the value of the "role" field.
	Role []string `json:"role,omitempty"`
	// Settings holds the value of the "settings" field.
	Settings map[string]string `json:"settings,omitempty"`
	// ObjectClass holds the value of the "object_class" field.
	ObjectClass []string `json:"object_class,omitempty"`
	// ExpirationDate holds the value of the "expiration_date" field.
	ExpirationDate string `json:"expiration_date,omitempty"`
	// Token holds the value of the "token" field.
	Token []string `json:"token,omitempty"`
	// contains filtered or unexported fields
}

Person is the model entity for the Person schema.

func (*Person) ExecContext

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

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

func (*Person) QueryContext

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

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

func (*Person) String

func (pe *Person) String() string

String implements the fmt.Stringer.

func (*Person) Unwrap

func (pe *Person) Unwrap() *Person

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

func (pe *Person) Update() *PersonUpdateOne

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

func (*Person) Value

func (pe *Person) Value(name string) (ent.Value, error)

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

type PersonClient

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

PersonClient is a client for the Person schema.

func NewPersonClient

func NewPersonClient(c config) *PersonClient

NewPersonClient returns a client for the Person from the given config.

func (*PersonClient) Create

func (c *PersonClient) Create() *PersonCreate

Create returns a builder for creating a Person entity.

func (*PersonClient) CreateBulk

func (c *PersonClient) CreateBulk(builders ...*PersonCreate) *PersonCreateBulk

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

func (*PersonClient) Delete

func (c *PersonClient) Delete() *PersonDelete

Delete returns a delete builder for Person.

func (*PersonClient) DeleteOne

func (c *PersonClient) DeleteOne(pe *Person) *PersonDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PersonClient) DeleteOneID

func (c *PersonClient) DeleteOneID(id int) *PersonDeleteOne

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

func (*PersonClient) ExecContext

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

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

func (*PersonClient) Get

func (c *PersonClient) Get(ctx context.Context, id int) (*Person, error)

Get returns a Person entity by its id.

func (*PersonClient) GetX

func (c *PersonClient) GetX(ctx context.Context, id int) *Person

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

func (*PersonClient) Hooks

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

Hooks returns the client hooks.

func (*PersonClient) Intercept

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

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

func (*PersonClient) Interceptors

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

Interceptors returns the client interceptors.

func (*PersonClient) Query

func (c *PersonClient) Query() *PersonQuery

Query returns a query builder for Person.

func (*PersonClient) QueryContext

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

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

func (*PersonClient) Update

func (c *PersonClient) Update() *PersonUpdate

Update returns an update builder for Person.

func (*PersonClient) UpdateOne

func (c *PersonClient) UpdateOne(pe *Person) *PersonUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PersonClient) UpdateOneID

func (c *PersonClient) UpdateOneID(id int) *PersonUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PersonClient) Use

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

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

type PersonCreate

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

PersonCreate is the builder for creating a Person entity.

func (*PersonCreate) Exec

func (pc *PersonCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PersonCreate) ExecContext

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

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

func (*PersonCreate) ExecX

func (pc *PersonCreate) ExecX(ctx context.Context)

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

func (*PersonCreate) Mutation

func (pc *PersonCreate) Mutation() *PersonMutation

Mutation returns the PersonMutation object of the builder.

func (*PersonCreate) OnConflict

func (pc *PersonCreate) OnConflict(opts ...sql.ConflictOption) *PersonUpsertOne

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

client.Person.Create().
	SetDateCreated(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.PersonUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*PersonCreate) OnConflictColumns

func (pc *PersonCreate) OnConflictColumns(columns ...string) *PersonUpsertOne

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

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

func (*PersonCreate) QueryContext

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

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

func (*PersonCreate) Save

func (pc *PersonCreate) Save(ctx context.Context) (*Person, error)

Save creates the Person in the database.

func (*PersonCreate) SaveX

func (pc *PersonCreate) SaveX(ctx context.Context) *Person

SaveX calls Save and panics if Save returns an error.

func (*PersonCreate) SetActive

func (pc *PersonCreate) SetActive(b bool) *PersonCreate

SetActive sets the "active" field.

func (*PersonCreate) SetBirthDate

func (pc *PersonCreate) SetBirthDate(s string) *PersonCreate

SetBirthDate sets the "birth_date" field.

func (*PersonCreate) SetDateCreated

func (pc *PersonCreate) SetDateCreated(t time.Time) *PersonCreate

SetDateCreated sets the "date_created" field.

func (*PersonCreate) SetDateUpdated

func (pc *PersonCreate) SetDateUpdated(t time.Time) *PersonCreate

SetDateUpdated sets the "date_updated" field.

func (*PersonCreate) SetEmail

func (pc *PersonCreate) SetEmail(s string) *PersonCreate

SetEmail sets the "email" field.

func (*PersonCreate) SetExpirationDate

func (pc *PersonCreate) SetExpirationDate(s string) *PersonCreate

SetExpirationDate sets the "expiration_date" field.

func (*PersonCreate) SetFamilyName

func (pc *PersonCreate) SetFamilyName(s string) *PersonCreate

SetFamilyName sets the "family_name" field.

func (*PersonCreate) SetGivenName

func (pc *PersonCreate) SetGivenName(s string) *PersonCreate

SetGivenName sets the "given_name" field.

func (*PersonCreate) SetHonorificPrefix

func (pc *PersonCreate) SetHonorificPrefix(s string) *PersonCreate

SetHonorificPrefix sets the "honorific_prefix" field.

func (*PersonCreate) SetIdentifier

func (pc *PersonCreate) SetIdentifier(s []string) *PersonCreate

SetIdentifier sets the "identifier" field.

func (*PersonCreate) SetIdentifierValues

func (pc *PersonCreate) SetIdentifierValues(s []string) *PersonCreate

SetIdentifierValues sets the "identifier_values" field.

func (*PersonCreate) SetJobCategory

func (pc *PersonCreate) SetJobCategory(s []string) *PersonCreate

SetJobCategory sets the "job_category" field.

func (*PersonCreate) SetName

func (pc *PersonCreate) SetName(s string) *PersonCreate

SetName sets the "name" field.

func (*PersonCreate) SetNillableActive

func (pc *PersonCreate) SetNillableActive(b *bool) *PersonCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*PersonCreate) SetNillableBirthDate

func (pc *PersonCreate) SetNillableBirthDate(s *string) *PersonCreate

SetNillableBirthDate sets the "birth_date" field if the given value is not nil.

func (*PersonCreate) SetNillableDateCreated

func (pc *PersonCreate) SetNillableDateCreated(t *time.Time) *PersonCreate

SetNillableDateCreated sets the "date_created" field if the given value is not nil.

func (*PersonCreate) SetNillableDateUpdated

func (pc *PersonCreate) SetNillableDateUpdated(t *time.Time) *PersonCreate

SetNillableDateUpdated sets the "date_updated" field if the given value is not nil.

func (*PersonCreate) SetNillableEmail

func (pc *PersonCreate) SetNillableEmail(s *string) *PersonCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*PersonCreate) SetNillableExpirationDate

func (pc *PersonCreate) SetNillableExpirationDate(s *string) *PersonCreate

SetNillableExpirationDate sets the "expiration_date" field if the given value is not nil.

func (*PersonCreate) SetNillableFamilyName

func (pc *PersonCreate) SetNillableFamilyName(s *string) *PersonCreate

SetNillableFamilyName sets the "family_name" field if the given value is not nil.

func (*PersonCreate) SetNillableGivenName

func (pc *PersonCreate) SetNillableGivenName(s *string) *PersonCreate

SetNillableGivenName sets the "given_name" field if the given value is not nil.

func (*PersonCreate) SetNillableHonorificPrefix

func (pc *PersonCreate) SetNillableHonorificPrefix(s *string) *PersonCreate

SetNillableHonorificPrefix sets the "honorific_prefix" field if the given value is not nil.

func (*PersonCreate) SetNillableName

func (pc *PersonCreate) SetNillableName(s *string) *PersonCreate

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

func (*PersonCreate) SetNillablePreferredFamilyName

func (pc *PersonCreate) SetNillablePreferredFamilyName(s *string) *PersonCreate

SetNillablePreferredFamilyName sets the "preferred_family_name" field if the given value is not nil.

func (*PersonCreate) SetNillablePreferredGivenName

func (pc *PersonCreate) SetNillablePreferredGivenName(s *string) *PersonCreate

SetNillablePreferredGivenName sets the "preferred_given_name" field if the given value is not nil.

func (*PersonCreate) SetNillablePublicID

func (pc *PersonCreate) SetNillablePublicID(s *string) *PersonCreate

SetNillablePublicID sets the "public_id" field if the given value is not nil.

func (*PersonCreate) SetObjectClass

func (pc *PersonCreate) SetObjectClass(s []string) *PersonCreate

SetObjectClass sets the "object_class" field.

func (*PersonCreate) SetPreferredFamilyName

func (pc *PersonCreate) SetPreferredFamilyName(s string) *PersonCreate

SetPreferredFamilyName sets the "preferred_family_name" field.

func (*PersonCreate) SetPreferredGivenName

func (pc *PersonCreate) SetPreferredGivenName(s string) *PersonCreate

SetPreferredGivenName sets the "preferred_given_name" field.

func (*PersonCreate) SetPublicID

func (pc *PersonCreate) SetPublicID(s string) *PersonCreate

SetPublicID sets the "public_id" field.

func (*PersonCreate) SetRole

func (pc *PersonCreate) SetRole(s []string) *PersonCreate

SetRole sets the "role" field.

func (*PersonCreate) SetSettings

func (pc *PersonCreate) SetSettings(m map[string]string) *PersonCreate

SetSettings sets the "settings" field.

func (*PersonCreate) SetToken

func (pc *PersonCreate) SetToken(s []string) *PersonCreate

SetToken sets the "token" field.

type PersonCreateBulk

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

PersonCreateBulk is the builder for creating many Person entities in bulk.

func (*PersonCreateBulk) Exec

func (pcb *PersonCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PersonCreateBulk) ExecContext

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

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

func (*PersonCreateBulk) ExecX

func (pcb *PersonCreateBulk) ExecX(ctx context.Context)

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

func (*PersonCreateBulk) OnConflict

func (pcb *PersonCreateBulk) OnConflict(opts ...sql.ConflictOption) *PersonUpsertBulk

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

client.Person.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.PersonUpsert) {
		SetDateCreated(v+v).
	}).
	Exec(ctx)

func (*PersonCreateBulk) OnConflictColumns

func (pcb *PersonCreateBulk) OnConflictColumns(columns ...string) *PersonUpsertBulk

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

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

func (*PersonCreateBulk) QueryContext

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

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

func (*PersonCreateBulk) Save

func (pcb *PersonCreateBulk) Save(ctx context.Context) ([]*Person, error)

Save creates the Person entities in the database.

func (*PersonCreateBulk) SaveX

func (pcb *PersonCreateBulk) SaveX(ctx context.Context) []*Person

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

type PersonDelete

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

PersonDelete is the builder for deleting a Person entity.

func (*PersonDelete) Exec

func (pd *PersonDelete) Exec(ctx context.Context) (int, error)

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

func (*PersonDelete) ExecContext

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

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

func (*PersonDelete) ExecX

func (pd *PersonDelete) ExecX(ctx context.Context) int

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

func (*PersonDelete) QueryContext

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

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

func (*PersonDelete) Where

func (pd *PersonDelete) Where(ps ...predicate.Person) *PersonDelete

Where appends a list predicates to the PersonDelete builder.

type PersonDeleteOne

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

PersonDeleteOne is the builder for deleting a single Person entity.

func (*PersonDeleteOne) Exec

func (pdo *PersonDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PersonDeleteOne) ExecX

func (pdo *PersonDeleteOne) ExecX(ctx context.Context)

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

func (*PersonDeleteOne) Where

func (pdo *PersonDeleteOne) Where(ps ...predicate.Person) *PersonDeleteOne

Where appends a list predicates to the PersonDelete builder.

type PersonGroupBy

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

PersonGroupBy is the group-by builder for Person entities.

func (*PersonGroupBy) Aggregate

func (pgb *PersonGroupBy) Aggregate(fns ...AggregateFunc) *PersonGroupBy

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

func (*PersonGroupBy) Bool

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

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

func (*PersonGroupBy) BoolX

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

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

func (*PersonGroupBy) Bools

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

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

func (*PersonGroupBy) BoolsX

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

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

func (*PersonGroupBy) Float64

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

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

func (*PersonGroupBy) Float64X

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

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

func (*PersonGroupBy) Float64s

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

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

func (*PersonGroupBy) Float64sX

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

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

func (*PersonGroupBy) Int

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

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

func (*PersonGroupBy) IntX

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

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

func (*PersonGroupBy) Ints

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

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

func (*PersonGroupBy) IntsX

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

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

func (*PersonGroupBy) Scan

func (pgb *PersonGroupBy) Scan(ctx context.Context, v any) error

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

func (*PersonGroupBy) ScanX

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

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

func (*PersonGroupBy) String

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

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

func (*PersonGroupBy) StringX

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

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

func (*PersonGroupBy) Strings

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

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

func (*PersonGroupBy) StringsX

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

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

type PersonMutation

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

PersonMutation represents an operation that mutates the Person nodes in the graph.

func (*PersonMutation) Active

func (m *PersonMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*PersonMutation) AddField

func (m *PersonMutation) 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 (*PersonMutation) AddedEdges

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

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

func (*PersonMutation) AddedField

func (m *PersonMutation) 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 (*PersonMutation) AddedFields

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

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

func (*PersonMutation) AddedIDs

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

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

func (*PersonMutation) AppendIdentifier

func (m *PersonMutation) AppendIdentifier(s []string)

AppendIdentifier adds s to the "identifier" field.

func (*PersonMutation) AppendIdentifierValues

func (m *PersonMutation) AppendIdentifierValues(s []string)

AppendIdentifierValues adds s to the "identifier_values" field.

func (*PersonMutation) AppendJobCategory

func (m *PersonMutation) AppendJobCategory(s []string)

AppendJobCategory adds s to the "job_category" field.

func (*PersonMutation) AppendObjectClass

func (m *PersonMutation) AppendObjectClass(s []string)

AppendObjectClass adds s to the "object_class" field.

func (*PersonMutation) AppendRole

func (m *PersonMutation) AppendRole(s []string)

AppendRole adds s to the "role" field.

func (*PersonMutation) AppendToken

func (m *PersonMutation) AppendToken(s []string)

AppendToken adds s to the "token" field.

func (*PersonMutation) AppendedIdentifier

func (m *PersonMutation) AppendedIdentifier() ([]string, bool)

AppendedIdentifier returns the list of values that were appended to the "identifier" field in this mutation.

func (*PersonMutation) AppendedIdentifierValues

func (m *PersonMutation) AppendedIdentifierValues() ([]string, bool)

AppendedIdentifierValues returns the list of values that were appended to the "identifier_values" field in this mutation.

func (*PersonMutation) AppendedJobCategory

func (m *PersonMutation) AppendedJobCategory() ([]string, bool)

AppendedJobCategory returns the list of values that were appended to the "job_category" field in this mutation.

func (*PersonMutation) AppendedObjectClass

func (m *PersonMutation) AppendedObjectClass() ([]string, bool)

AppendedObjectClass returns the list of values that were appended to the "object_class" field in this mutation.

func (*PersonMutation) AppendedRole

func (m *PersonMutation) AppendedRole() ([]string, bool)

AppendedRole returns the list of values that were appended to the "role" field in this mutation.

func (*PersonMutation) AppendedToken

func (m *PersonMutation) AppendedToken() ([]string, bool)

AppendedToken returns the list of values that were appended to the "token" field in this mutation.

func (*PersonMutation) BirthDate

func (m *PersonMutation) BirthDate() (r string, exists bool)

BirthDate returns the value of the "birth_date" field in the mutation.

func (*PersonMutation) BirthDateCleared

func (m *PersonMutation) BirthDateCleared() bool

BirthDateCleared returns if the "birth_date" field was cleared in this mutation.

func (*PersonMutation) ClearBirthDate

func (m *PersonMutation) ClearBirthDate()

ClearBirthDate clears the value of the "birth_date" field.

func (*PersonMutation) ClearEdge

func (m *PersonMutation) 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 (*PersonMutation) ClearEmail

func (m *PersonMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*PersonMutation) ClearExpirationDate

func (m *PersonMutation) ClearExpirationDate()

ClearExpirationDate clears the value of the "expiration_date" field.

func (*PersonMutation) ClearFamilyName

func (m *PersonMutation) ClearFamilyName()

ClearFamilyName clears the value of the "family_name" field.

func (*PersonMutation) ClearField

func (m *PersonMutation) 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 (*PersonMutation) ClearGivenName

func (m *PersonMutation) ClearGivenName()

ClearGivenName clears the value of the "given_name" field.

func (*PersonMutation) ClearHonorificPrefix

func (m *PersonMutation) ClearHonorificPrefix()

ClearHonorificPrefix clears the value of the "honorific_prefix" field.

func (*PersonMutation) ClearIdentifier

func (m *PersonMutation) ClearIdentifier()

ClearIdentifier clears the value of the "identifier" field.

func (*PersonMutation) ClearIdentifierValues

func (m *PersonMutation) ClearIdentifierValues()

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*PersonMutation) ClearJobCategory

func (m *PersonMutation) ClearJobCategory()

ClearJobCategory clears the value of the "job_category" field.

func (*PersonMutation) ClearName

func (m *PersonMutation) ClearName()

ClearName clears the value of the "name" field.

func (*PersonMutation) ClearObjectClass

func (m *PersonMutation) ClearObjectClass()

ClearObjectClass clears the value of the "object_class" field.

func (*PersonMutation) ClearPreferredFamilyName

func (m *PersonMutation) ClearPreferredFamilyName()

ClearPreferredFamilyName clears the value of the "preferred_family_name" field.

func (*PersonMutation) ClearPreferredGivenName

func (m *PersonMutation) ClearPreferredGivenName()

ClearPreferredGivenName clears the value of the "preferred_given_name" field.

func (*PersonMutation) ClearRole

func (m *PersonMutation) ClearRole()

ClearRole clears the value of the "role" field.

func (*PersonMutation) ClearSettings

func (m *PersonMutation) ClearSettings()

ClearSettings clears the value of the "settings" field.

func (*PersonMutation) ClearToken

func (m *PersonMutation) ClearToken()

ClearToken clears the value of the "token" field.

func (*PersonMutation) ClearedEdges

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

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

func (*PersonMutation) ClearedFields

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

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

func (PersonMutation) Client

func (m PersonMutation) 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 (*PersonMutation) DateCreated

func (m *PersonMutation) DateCreated() (r time.Time, exists bool)

DateCreated returns the value of the "date_created" field in the mutation.

func (*PersonMutation) DateUpdated

func (m *PersonMutation) DateUpdated() (r time.Time, exists bool)

DateUpdated returns the value of the "date_updated" field in the mutation.

func (*PersonMutation) EdgeCleared

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

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

func (*PersonMutation) Email

func (m *PersonMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*PersonMutation) EmailCleared

func (m *PersonMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*PersonMutation) ExecContext

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

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

func (*PersonMutation) ExpirationDate

func (m *PersonMutation) ExpirationDate() (r string, exists bool)

ExpirationDate returns the value of the "expiration_date" field in the mutation.

func (*PersonMutation) ExpirationDateCleared

func (m *PersonMutation) ExpirationDateCleared() bool

ExpirationDateCleared returns if the "expiration_date" field was cleared in this mutation.

func (*PersonMutation) FamilyName

func (m *PersonMutation) FamilyName() (r string, exists bool)

FamilyName returns the value of the "family_name" field in the mutation.

func (*PersonMutation) FamilyNameCleared

func (m *PersonMutation) FamilyNameCleared() bool

FamilyNameCleared returns if the "family_name" field was cleared in this mutation.

func (*PersonMutation) Field

func (m *PersonMutation) 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 (*PersonMutation) FieldCleared

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

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

func (*PersonMutation) Fields

func (m *PersonMutation) 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 (*PersonMutation) GivenName

func (m *PersonMutation) GivenName() (r string, exists bool)

GivenName returns the value of the "given_name" field in the mutation.

func (*PersonMutation) GivenNameCleared

func (m *PersonMutation) GivenNameCleared() bool

GivenNameCleared returns if the "given_name" field was cleared in this mutation.

func (*PersonMutation) HonorificPrefix

func (m *PersonMutation) HonorificPrefix() (r string, exists bool)

HonorificPrefix returns the value of the "honorific_prefix" field in the mutation.

func (*PersonMutation) HonorificPrefixCleared

func (m *PersonMutation) HonorificPrefixCleared() bool

HonorificPrefixCleared returns if the "honorific_prefix" field was cleared in this mutation.

func (*PersonMutation) ID

func (m *PersonMutation) 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 (*PersonMutation) IDs

func (m *PersonMutation) 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 (*PersonMutation) Identifier

func (m *PersonMutation) Identifier() (r []string, exists bool)

Identifier returns the value of the "identifier" field in the mutation.

func (*PersonMutation) IdentifierCleared

func (m *PersonMutation) IdentifierCleared() bool

IdentifierCleared returns if the "identifier" field was cleared in this mutation.

func (*PersonMutation) IdentifierValues

func (m *PersonMutation) IdentifierValues() (r []string, exists bool)

IdentifierValues returns the value of the "identifier_values" field in the mutation.

func (*PersonMutation) IdentifierValuesCleared

func (m *PersonMutation) IdentifierValuesCleared() bool

IdentifierValuesCleared returns if the "identifier_values" field was cleared in this mutation.

func (*PersonMutation) JobCategory

func (m *PersonMutation) JobCategory() (r []string, exists bool)

JobCategory returns the value of the "job_category" field in the mutation.

func (*PersonMutation) JobCategoryCleared

func (m *PersonMutation) JobCategoryCleared() bool

JobCategoryCleared returns if the "job_category" field was cleared in this mutation.

func (*PersonMutation) Name

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

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

func (*PersonMutation) NameCleared

func (m *PersonMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*PersonMutation) ObjectClass

func (m *PersonMutation) ObjectClass() (r []string, exists bool)

ObjectClass returns the value of the "object_class" field in the mutation.

func (*PersonMutation) ObjectClassCleared

func (m *PersonMutation) ObjectClassCleared() bool

ObjectClassCleared returns if the "object_class" field was cleared in this mutation.

func (*PersonMutation) OldActive

func (m *PersonMutation) OldActive(ctx context.Context) (v bool, err error)

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

func (*PersonMutation) OldBirthDate

func (m *PersonMutation) OldBirthDate(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldDateCreated

func (m *PersonMutation) OldDateCreated(ctx context.Context) (v time.Time, err error)

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

func (*PersonMutation) OldDateUpdated

func (m *PersonMutation) OldDateUpdated(ctx context.Context) (v time.Time, err error)

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

func (*PersonMutation) OldEmail

func (m *PersonMutation) OldEmail(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldExpirationDate

func (m *PersonMutation) OldExpirationDate(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldFamilyName

func (m *PersonMutation) OldFamilyName(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldField

func (m *PersonMutation) 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 (*PersonMutation) OldGivenName

func (m *PersonMutation) OldGivenName(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldHonorificPrefix

func (m *PersonMutation) OldHonorificPrefix(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldIdentifier

func (m *PersonMutation) OldIdentifier(ctx context.Context) (v []string, err error)

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

func (*PersonMutation) OldIdentifierValues

func (m *PersonMutation) OldIdentifierValues(ctx context.Context) (v []string, err error)

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

func (*PersonMutation) OldJobCategory

func (m *PersonMutation) OldJobCategory(ctx context.Context) (v []string, err error)

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

func (*PersonMutation) OldName

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

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

func (*PersonMutation) OldObjectClass

func (m *PersonMutation) OldObjectClass(ctx context.Context) (v []string, err error)

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

func (*PersonMutation) OldPreferredFamilyName

func (m *PersonMutation) OldPreferredFamilyName(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldPreferredGivenName

func (m *PersonMutation) OldPreferredGivenName(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldPublicID

func (m *PersonMutation) OldPublicID(ctx context.Context) (v string, err error)

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

func (*PersonMutation) OldRole

func (m *PersonMutation) OldRole(ctx context.Context) (v []string, err error)

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

func (*PersonMutation) OldSettings

func (m *PersonMutation) OldSettings(ctx context.Context) (v map[string]string, err error)

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

func (*PersonMutation) OldToken

func (m *PersonMutation) OldToken(ctx context.Context) (v []string, err error)

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

func (*PersonMutation) Op

func (m *PersonMutation) Op() Op

Op returns the operation name.

func (*PersonMutation) PreferredFamilyName

func (m *PersonMutation) PreferredFamilyName() (r string, exists bool)

PreferredFamilyName returns the value of the "preferred_family_name" field in the mutation.

func (*PersonMutation) PreferredFamilyNameCleared

func (m *PersonMutation) PreferredFamilyNameCleared() bool

PreferredFamilyNameCleared returns if the "preferred_family_name" field was cleared in this mutation.

func (*PersonMutation) PreferredGivenName

func (m *PersonMutation) PreferredGivenName() (r string, exists bool)

PreferredGivenName returns the value of the "preferred_given_name" field in the mutation.

func (*PersonMutation) PreferredGivenNameCleared

func (m *PersonMutation) PreferredGivenNameCleared() bool

PreferredGivenNameCleared returns if the "preferred_given_name" field was cleared in this mutation.

func (*PersonMutation) PublicID

func (m *PersonMutation) PublicID() (r string, exists bool)

PublicID returns the value of the "public_id" field in the mutation.

func (*PersonMutation) QueryContext

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

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

func (*PersonMutation) RemovedEdges

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

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

func (*PersonMutation) RemovedIDs

func (m *PersonMutation) 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 (*PersonMutation) ResetActive

func (m *PersonMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*PersonMutation) ResetBirthDate

func (m *PersonMutation) ResetBirthDate()

ResetBirthDate resets all changes to the "birth_date" field.

func (*PersonMutation) ResetDateCreated

func (m *PersonMutation) ResetDateCreated()

ResetDateCreated resets all changes to the "date_created" field.

func (*PersonMutation) ResetDateUpdated

func (m *PersonMutation) ResetDateUpdated()

ResetDateUpdated resets all changes to the "date_updated" field.

func (*PersonMutation) ResetEdge

func (m *PersonMutation) 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 (*PersonMutation) ResetEmail

func (m *PersonMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*PersonMutation) ResetExpirationDate

func (m *PersonMutation) ResetExpirationDate()

ResetExpirationDate resets all changes to the "expiration_date" field.

func (*PersonMutation) ResetFamilyName

func (m *PersonMutation) ResetFamilyName()

ResetFamilyName resets all changes to the "family_name" field.

func (*PersonMutation) ResetField

func (m *PersonMutation) 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 (*PersonMutation) ResetGivenName

func (m *PersonMutation) ResetGivenName()

ResetGivenName resets all changes to the "given_name" field.

func (*PersonMutation) ResetHonorificPrefix

func (m *PersonMutation) ResetHonorificPrefix()

ResetHonorificPrefix resets all changes to the "honorific_prefix" field.

func (*PersonMutation) ResetIdentifier

func (m *PersonMutation) ResetIdentifier()

ResetIdentifier resets all changes to the "identifier" field.

func (*PersonMutation) ResetIdentifierValues

func (m *PersonMutation) ResetIdentifierValues()

ResetIdentifierValues resets all changes to the "identifier_values" field.

func (*PersonMutation) ResetJobCategory

func (m *PersonMutation) ResetJobCategory()

ResetJobCategory resets all changes to the "job_category" field.

func (*PersonMutation) ResetName

func (m *PersonMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PersonMutation) ResetObjectClass

func (m *PersonMutation) ResetObjectClass()

ResetObjectClass resets all changes to the "object_class" field.

func (*PersonMutation) ResetPreferredFamilyName

func (m *PersonMutation) ResetPreferredFamilyName()

ResetPreferredFamilyName resets all changes to the "preferred_family_name" field.

func (*PersonMutation) ResetPreferredGivenName

func (m *PersonMutation) ResetPreferredGivenName()

ResetPreferredGivenName resets all changes to the "preferred_given_name" field.

func (*PersonMutation) ResetPublicID

func (m *PersonMutation) ResetPublicID()

ResetPublicID resets all changes to the "public_id" field.

func (*PersonMutation) ResetRole

func (m *PersonMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*PersonMutation) ResetSettings

func (m *PersonMutation) ResetSettings()

ResetSettings resets all changes to the "settings" field.

func (*PersonMutation) ResetToken

func (m *PersonMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*PersonMutation) Role

func (m *PersonMutation) Role() (r []string, exists bool)

Role returns the value of the "role" field in the mutation.

func (*PersonMutation) RoleCleared

func (m *PersonMutation) RoleCleared() bool

RoleCleared returns if the "role" field was cleared in this mutation.

func (*PersonMutation) SetActive

func (m *PersonMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*PersonMutation) SetBirthDate

func (m *PersonMutation) SetBirthDate(s string)

SetBirthDate sets the "birth_date" field.

func (*PersonMutation) SetDateCreated

func (m *PersonMutation) SetDateCreated(t time.Time)

SetDateCreated sets the "date_created" field.

func (*PersonMutation) SetDateUpdated

func (m *PersonMutation) SetDateUpdated(t time.Time)

SetDateUpdated sets the "date_updated" field.

func (*PersonMutation) SetEmail

func (m *PersonMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*PersonMutation) SetExpirationDate

func (m *PersonMutation) SetExpirationDate(s string)

SetExpirationDate sets the "expiration_date" field.

func (*PersonMutation) SetFamilyName

func (m *PersonMutation) SetFamilyName(s string)

SetFamilyName sets the "family_name" field.

func (*PersonMutation) SetField

func (m *PersonMutation) 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 (*PersonMutation) SetGivenName

func (m *PersonMutation) SetGivenName(s string)

SetGivenName sets the "given_name" field.

func (*PersonMutation) SetHonorificPrefix

func (m *PersonMutation) SetHonorificPrefix(s string)

SetHonorificPrefix sets the "honorific_prefix" field.

func (*PersonMutation) SetIdentifier

func (m *PersonMutation) SetIdentifier(s []string)

SetIdentifier sets the "identifier" field.

func (*PersonMutation) SetIdentifierValues

func (m *PersonMutation) SetIdentifierValues(s []string)

SetIdentifierValues sets the "identifier_values" field.

func (*PersonMutation) SetJobCategory

func (m *PersonMutation) SetJobCategory(s []string)

SetJobCategory sets the "job_category" field.

func (*PersonMutation) SetName

func (m *PersonMutation) SetName(s string)

SetName sets the "name" field.

func (*PersonMutation) SetObjectClass

func (m *PersonMutation) SetObjectClass(s []string)

SetObjectClass sets the "object_class" field.

func (*PersonMutation) SetOp

func (m *PersonMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PersonMutation) SetPreferredFamilyName

func (m *PersonMutation) SetPreferredFamilyName(s string)

SetPreferredFamilyName sets the "preferred_family_name" field.

func (*PersonMutation) SetPreferredGivenName

func (m *PersonMutation) SetPreferredGivenName(s string)

SetPreferredGivenName sets the "preferred_given_name" field.

func (*PersonMutation) SetPublicID

func (m *PersonMutation) SetPublicID(s string)

SetPublicID sets the "public_id" field.

func (*PersonMutation) SetRole

func (m *PersonMutation) SetRole(s []string)

SetRole sets the "role" field.

func (*PersonMutation) SetSettings

func (m *PersonMutation) SetSettings(value map[string]string)

SetSettings sets the "settings" field.

func (*PersonMutation) SetToken

func (m *PersonMutation) SetToken(s []string)

SetToken sets the "token" field.

func (*PersonMutation) Settings

func (m *PersonMutation) Settings() (r map[string]string, exists bool)

Settings returns the value of the "settings" field in the mutation.

func (*PersonMutation) SettingsCleared

func (m *PersonMutation) SettingsCleared() bool

SettingsCleared returns if the "settings" field was cleared in this mutation.

func (*PersonMutation) Token

func (m *PersonMutation) Token() (r []string, exists bool)

Token returns the value of the "token" field in the mutation.

func (*PersonMutation) TokenCleared

func (m *PersonMutation) TokenCleared() bool

TokenCleared returns if the "token" field was cleared in this mutation.

func (PersonMutation) Tx

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

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

func (*PersonMutation) Type

func (m *PersonMutation) Type() string

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

func (*PersonMutation) Where

func (m *PersonMutation) Where(ps ...predicate.Person)

Where appends a list predicates to the PersonMutation builder.

func (*PersonMutation) WhereP

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

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

type PersonQuery

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

PersonQuery is the builder for querying Person entities.

func (*PersonQuery) Aggregate

func (pq *PersonQuery) Aggregate(fns ...AggregateFunc) *PersonSelect

Aggregate returns a PersonSelect configured with the given aggregations.

func (*PersonQuery) All

func (pq *PersonQuery) All(ctx context.Context) ([]*Person, error)

All executes the query and returns a list of Persons.

func (*PersonQuery) AllX

func (pq *PersonQuery) AllX(ctx context.Context) []*Person

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

func (*PersonQuery) Clone

func (pq *PersonQuery) Clone() *PersonQuery

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

func (*PersonQuery) Count

func (pq *PersonQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PersonQuery) CountX

func (pq *PersonQuery) CountX(ctx context.Context) int

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

func (*PersonQuery) ExecContext

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

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

func (*PersonQuery) Exist

func (pq *PersonQuery) Exist(ctx context.Context) (bool, error)

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

func (*PersonQuery) ExistX

func (pq *PersonQuery) ExistX(ctx context.Context) bool

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

func (*PersonQuery) First

func (pq *PersonQuery) First(ctx context.Context) (*Person, error)

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

func (*PersonQuery) FirstID

func (pq *PersonQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*PersonQuery) FirstIDX

func (pq *PersonQuery) FirstIDX(ctx context.Context) int

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

func (*PersonQuery) FirstX

func (pq *PersonQuery) FirstX(ctx context.Context) *Person

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

func (*PersonQuery) ForShare

func (pq *PersonQuery) ForShare(opts ...sql.LockOption) *PersonQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*PersonQuery) ForUpdate

func (pq *PersonQuery) ForUpdate(opts ...sql.LockOption) *PersonQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*PersonQuery) GroupBy

func (pq *PersonQuery) GroupBy(field string, fields ...string) *PersonGroupBy

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Person.Query().
	GroupBy(person.FieldDateCreated).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PersonQuery) IDs

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

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

func (*PersonQuery) IDsX

func (pq *PersonQuery) IDsX(ctx context.Context) []int

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

func (*PersonQuery) Limit

func (pq *PersonQuery) Limit(limit int) *PersonQuery

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

func (*PersonQuery) Modify

func (pq *PersonQuery) Modify(modifiers ...func(s *sql.Selector)) *PersonSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*PersonQuery) Offset

func (pq *PersonQuery) Offset(offset int) *PersonQuery

Offset to start from.

func (*PersonQuery) Only

func (pq *PersonQuery) Only(ctx context.Context) (*Person, error)

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

func (*PersonQuery) OnlyID

func (pq *PersonQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*PersonQuery) OnlyIDX

func (pq *PersonQuery) OnlyIDX(ctx context.Context) int

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

func (*PersonQuery) OnlyX

func (pq *PersonQuery) OnlyX(ctx context.Context) *Person

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

func (*PersonQuery) Order

func (pq *PersonQuery) Order(o ...person.OrderOption) *PersonQuery

Order specifies how the records should be ordered.

func (*PersonQuery) QueryContext

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

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

func (*PersonQuery) Select

func (pq *PersonQuery) Select(fields ...string) *PersonSelect

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 {
	DateCreated time.Time `json:"date_created,omitempty"`
}

client.Person.Query().
	Select(person.FieldDateCreated).
	Scan(ctx, &v)

func (*PersonQuery) Unique

func (pq *PersonQuery) Unique(unique bool) *PersonQuery

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 (*PersonQuery) Where

func (pq *PersonQuery) Where(ps ...predicate.Person) *PersonQuery

Where adds a new predicate for the PersonQuery builder.

type PersonSelect

type PersonSelect struct {
	*PersonQuery
	// contains filtered or unexported fields
}

PersonSelect is the builder for selecting fields of Person entities.

func (*PersonSelect) Aggregate

func (ps *PersonSelect) Aggregate(fns ...AggregateFunc) *PersonSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PersonSelect) Bool

func (s *PersonSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PersonSelect) BoolX

func (s *PersonSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PersonSelect) Bools

func (s *PersonSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PersonSelect) BoolsX

func (s *PersonSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (PersonSelect) ExecContext

func (c PersonSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PersonSelect) Float64

func (s *PersonSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PersonSelect) Float64X

func (s *PersonSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PersonSelect) Float64s

func (s *PersonSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PersonSelect) Float64sX

func (s *PersonSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PersonSelect) Int

func (s *PersonSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PersonSelect) IntX

func (s *PersonSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PersonSelect) Ints

func (s *PersonSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PersonSelect) IntsX

func (s *PersonSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PersonSelect) Modify

func (ps *PersonSelect) Modify(modifiers ...func(s *sql.Selector)) *PersonSelect

Modify adds a query modifier for attaching custom logic to queries.

func (PersonSelect) QueryContext

func (c PersonSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PersonSelect) Scan

func (ps *PersonSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PersonSelect) ScanX

func (s *PersonSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PersonSelect) String

func (s *PersonSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PersonSelect) StringX

func (s *PersonSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PersonSelect) Strings

func (s *PersonSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PersonSelect) StringsX

func (s *PersonSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PersonUpdate

type PersonUpdate struct {
	// contains filtered or unexported fields
}

PersonUpdate is the builder for updating Person entities.

func (*PersonUpdate) AppendIdentifier

func (pu *PersonUpdate) AppendIdentifier(s []string) *PersonUpdate

AppendIdentifier appends s to the "identifier" field.

func (*PersonUpdate) AppendIdentifierValues

func (pu *PersonUpdate) AppendIdentifierValues(s []string) *PersonUpdate

AppendIdentifierValues appends s to the "identifier_values" field.

func (*PersonUpdate) AppendJobCategory

func (pu *PersonUpdate) AppendJobCategory(s []string) *PersonUpdate

AppendJobCategory appends s to the "job_category" field.

func (*PersonUpdate) AppendObjectClass

func (pu *PersonUpdate) AppendObjectClass(s []string) *PersonUpdate

AppendObjectClass appends s to the "object_class" field.

func (*PersonUpdate) AppendRole

func (pu *PersonUpdate) AppendRole(s []string) *PersonUpdate

AppendRole appends s to the "role" field.

func (*PersonUpdate) AppendToken

func (pu *PersonUpdate) AppendToken(s []string) *PersonUpdate

AppendToken appends s to the "token" field.

func (*PersonUpdate) ClearBirthDate

func (pu *PersonUpdate) ClearBirthDate() *PersonUpdate

ClearBirthDate clears the value of the "birth_date" field.

func (*PersonUpdate) ClearEmail

func (pu *PersonUpdate) ClearEmail() *PersonUpdate

ClearEmail clears the value of the "email" field.

func (*PersonUpdate) ClearExpirationDate

func (pu *PersonUpdate) ClearExpirationDate() *PersonUpdate

ClearExpirationDate clears the value of the "expiration_date" field.

func (*PersonUpdate) ClearFamilyName

func (pu *PersonUpdate) ClearFamilyName() *PersonUpdate

ClearFamilyName clears the value of the "family_name" field.

func (*PersonUpdate) ClearGivenName

func (pu *PersonUpdate) ClearGivenName() *PersonUpdate

ClearGivenName clears the value of the "given_name" field.

func (*PersonUpdate) ClearHonorificPrefix

func (pu *PersonUpdate) ClearHonorificPrefix() *PersonUpdate

ClearHonorificPrefix clears the value of the "honorific_prefix" field.

func (*PersonUpdate) ClearIdentifier

func (pu *PersonUpdate) ClearIdentifier() *PersonUpdate

ClearIdentifier clears the value of the "identifier" field.

func (*PersonUpdate) ClearIdentifierValues

func (pu *PersonUpdate) ClearIdentifierValues() *PersonUpdate

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*PersonUpdate) ClearJobCategory

func (pu *PersonUpdate) ClearJobCategory() *PersonUpdate

ClearJobCategory clears the value of the "job_category" field.

func (*PersonUpdate) ClearName

func (pu *PersonUpdate) ClearName() *PersonUpdate

ClearName clears the value of the "name" field.

func (*PersonUpdate) ClearObjectClass

func (pu *PersonUpdate) ClearObjectClass() *PersonUpdate

ClearObjectClass clears the value of the "object_class" field.

func (*PersonUpdate) ClearPreferredFamilyName

func (pu *PersonUpdate) ClearPreferredFamilyName() *PersonUpdate

ClearPreferredFamilyName clears the value of the "preferred_family_name" field.

func (*PersonUpdate) ClearPreferredGivenName

func (pu *PersonUpdate) ClearPreferredGivenName() *PersonUpdate

ClearPreferredGivenName clears the value of the "preferred_given_name" field.

func (*PersonUpdate) ClearRole

func (pu *PersonUpdate) ClearRole() *PersonUpdate

ClearRole clears the value of the "role" field.

func (*PersonUpdate) ClearSettings

func (pu *PersonUpdate) ClearSettings() *PersonUpdate

ClearSettings clears the value of the "settings" field.

func (*PersonUpdate) ClearToken

func (pu *PersonUpdate) ClearToken() *PersonUpdate

ClearToken clears the value of the "token" field.

func (*PersonUpdate) Exec

func (pu *PersonUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PersonUpdate) ExecContext

func (c *PersonUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PersonUpdate) ExecX

func (pu *PersonUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PersonUpdate) Modify

func (pu *PersonUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PersonUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PersonUpdate) Mutation

func (pu *PersonUpdate) Mutation() *PersonMutation

Mutation returns the PersonMutation object of the builder.

func (*PersonUpdate) QueryContext

func (c *PersonUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PersonUpdate) Save

func (pu *PersonUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PersonUpdate) SaveX

func (pu *PersonUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PersonUpdate) SetActive

func (pu *PersonUpdate) SetActive(b bool) *PersonUpdate

SetActive sets the "active" field.

func (*PersonUpdate) SetBirthDate

func (pu *PersonUpdate) SetBirthDate(s string) *PersonUpdate

SetBirthDate sets the "birth_date" field.

func (*PersonUpdate) SetDateUpdated

func (pu *PersonUpdate) SetDateUpdated(t time.Time) *PersonUpdate

SetDateUpdated sets the "date_updated" field.

func (*PersonUpdate) SetEmail

func (pu *PersonUpdate) SetEmail(s string) *PersonUpdate

SetEmail sets the "email" field.

func (*PersonUpdate) SetExpirationDate

func (pu *PersonUpdate) SetExpirationDate(s string) *PersonUpdate

SetExpirationDate sets the "expiration_date" field.

func (*PersonUpdate) SetFamilyName

func (pu *PersonUpdate) SetFamilyName(s string) *PersonUpdate

SetFamilyName sets the "family_name" field.

func (*PersonUpdate) SetGivenName

func (pu *PersonUpdate) SetGivenName(s string) *PersonUpdate

SetGivenName sets the "given_name" field.

func (*PersonUpdate) SetHonorificPrefix

func (pu *PersonUpdate) SetHonorificPrefix(s string) *PersonUpdate

SetHonorificPrefix sets the "honorific_prefix" field.

func (*PersonUpdate) SetIdentifier

func (pu *PersonUpdate) SetIdentifier(s []string) *PersonUpdate

SetIdentifier sets the "identifier" field.

func (*PersonUpdate) SetIdentifierValues

func (pu *PersonUpdate) SetIdentifierValues(s []string) *PersonUpdate

SetIdentifierValues sets the "identifier_values" field.

func (*PersonUpdate) SetJobCategory

func (pu *PersonUpdate) SetJobCategory(s []string) *PersonUpdate

SetJobCategory sets the "job_category" field.

func (*PersonUpdate) SetName

func (pu *PersonUpdate) SetName(s string) *PersonUpdate

SetName sets the "name" field.

func (*PersonUpdate) SetNillableActive

func (pu *PersonUpdate) SetNillableActive(b *bool) *PersonUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*PersonUpdate) SetNillableBirthDate

func (pu *PersonUpdate) SetNillableBirthDate(s *string) *PersonUpdate

SetNillableBirthDate sets the "birth_date" field if the given value is not nil.

func (*PersonUpdate) SetNillableEmail

func (pu *PersonUpdate) SetNillableEmail(s *string) *PersonUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*PersonUpdate) SetNillableExpirationDate

func (pu *PersonUpdate) SetNillableExpirationDate(s *string) *PersonUpdate

SetNillableExpirationDate sets the "expiration_date" field if the given value is not nil.

func (*PersonUpdate) SetNillableFamilyName

func (pu *PersonUpdate) SetNillableFamilyName(s *string) *PersonUpdate

SetNillableFamilyName sets the "family_name" field if the given value is not nil.

func (*PersonUpdate) SetNillableGivenName

func (pu *PersonUpdate) SetNillableGivenName(s *string) *PersonUpdate

SetNillableGivenName sets the "given_name" field if the given value is not nil.

func (*PersonUpdate) SetNillableHonorificPrefix

func (pu *PersonUpdate) SetNillableHonorificPrefix(s *string) *PersonUpdate

SetNillableHonorificPrefix sets the "honorific_prefix" field if the given value is not nil.

func (*PersonUpdate) SetNillableName

func (pu *PersonUpdate) SetNillableName(s *string) *PersonUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*PersonUpdate) SetNillablePreferredFamilyName

func (pu *PersonUpdate) SetNillablePreferredFamilyName(s *string) *PersonUpdate

SetNillablePreferredFamilyName sets the "preferred_family_name" field if the given value is not nil.

func (*PersonUpdate) SetNillablePreferredGivenName

func (pu *PersonUpdate) SetNillablePreferredGivenName(s *string) *PersonUpdate

SetNillablePreferredGivenName sets the "preferred_given_name" field if the given value is not nil.

func (*PersonUpdate) SetObjectClass

func (pu *PersonUpdate) SetObjectClass(s []string) *PersonUpdate

SetObjectClass sets the "object_class" field.

func (*PersonUpdate) SetPreferredFamilyName

func (pu *PersonUpdate) SetPreferredFamilyName(s string) *PersonUpdate

SetPreferredFamilyName sets the "preferred_family_name" field.

func (*PersonUpdate) SetPreferredGivenName

func (pu *PersonUpdate) SetPreferredGivenName(s string) *PersonUpdate

SetPreferredGivenName sets the "preferred_given_name" field.

func (*PersonUpdate) SetRole

func (pu *PersonUpdate) SetRole(s []string) *PersonUpdate

SetRole sets the "role" field.

func (*PersonUpdate) SetSettings

func (pu *PersonUpdate) SetSettings(m map[string]string) *PersonUpdate

SetSettings sets the "settings" field.

func (*PersonUpdate) SetToken

func (pu *PersonUpdate) SetToken(s []string) *PersonUpdate

SetToken sets the "token" field.

func (*PersonUpdate) Where

func (pu *PersonUpdate) Where(ps ...predicate.Person) *PersonUpdate

Where appends a list predicates to the PersonUpdate builder.

type PersonUpdateOne

type PersonUpdateOne struct {
	// contains filtered or unexported fields
}

PersonUpdateOne is the builder for updating a single Person entity.

func (*PersonUpdateOne) AppendIdentifier

func (puo *PersonUpdateOne) AppendIdentifier(s []string) *PersonUpdateOne

AppendIdentifier appends s to the "identifier" field.

func (*PersonUpdateOne) AppendIdentifierValues

func (puo *PersonUpdateOne) AppendIdentifierValues(s []string) *PersonUpdateOne

AppendIdentifierValues appends s to the "identifier_values" field.

func (*PersonUpdateOne) AppendJobCategory

func (puo *PersonUpdateOne) AppendJobCategory(s []string) *PersonUpdateOne

AppendJobCategory appends s to the "job_category" field.

func (*PersonUpdateOne) AppendObjectClass

func (puo *PersonUpdateOne) AppendObjectClass(s []string) *PersonUpdateOne

AppendObjectClass appends s to the "object_class" field.

func (*PersonUpdateOne) AppendRole

func (puo *PersonUpdateOne) AppendRole(s []string) *PersonUpdateOne

AppendRole appends s to the "role" field.

func (*PersonUpdateOne) AppendToken

func (puo *PersonUpdateOne) AppendToken(s []string) *PersonUpdateOne

AppendToken appends s to the "token" field.

func (*PersonUpdateOne) ClearBirthDate

func (puo *PersonUpdateOne) ClearBirthDate() *PersonUpdateOne

ClearBirthDate clears the value of the "birth_date" field.

func (*PersonUpdateOne) ClearEmail

func (puo *PersonUpdateOne) ClearEmail() *PersonUpdateOne

ClearEmail clears the value of the "email" field.

func (*PersonUpdateOne) ClearExpirationDate

func (puo *PersonUpdateOne) ClearExpirationDate() *PersonUpdateOne

ClearExpirationDate clears the value of the "expiration_date" field.

func (*PersonUpdateOne) ClearFamilyName

func (puo *PersonUpdateOne) ClearFamilyName() *PersonUpdateOne

ClearFamilyName clears the value of the "family_name" field.

func (*PersonUpdateOne) ClearGivenName

func (puo *PersonUpdateOne) ClearGivenName() *PersonUpdateOne

ClearGivenName clears the value of the "given_name" field.

func (*PersonUpdateOne) ClearHonorificPrefix

func (puo *PersonUpdateOne) ClearHonorificPrefix() *PersonUpdateOne

ClearHonorificPrefix clears the value of the "honorific_prefix" field.

func (*PersonUpdateOne) ClearIdentifier

func (puo *PersonUpdateOne) ClearIdentifier() *PersonUpdateOne

ClearIdentifier clears the value of the "identifier" field.

func (*PersonUpdateOne) ClearIdentifierValues

func (puo *PersonUpdateOne) ClearIdentifierValues() *PersonUpdateOne

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*PersonUpdateOne) ClearJobCategory

func (puo *PersonUpdateOne) ClearJobCategory() *PersonUpdateOne

ClearJobCategory clears the value of the "job_category" field.

func (*PersonUpdateOne) ClearName

func (puo *PersonUpdateOne) ClearName() *PersonUpdateOne

ClearName clears the value of the "name" field.

func (*PersonUpdateOne) ClearObjectClass

func (puo *PersonUpdateOne) ClearObjectClass() *PersonUpdateOne

ClearObjectClass clears the value of the "object_class" field.

func (*PersonUpdateOne) ClearPreferredFamilyName

func (puo *PersonUpdateOne) ClearPreferredFamilyName() *PersonUpdateOne

ClearPreferredFamilyName clears the value of the "preferred_family_name" field.

func (*PersonUpdateOne) ClearPreferredGivenName

func (puo *PersonUpdateOne) ClearPreferredGivenName() *PersonUpdateOne

ClearPreferredGivenName clears the value of the "preferred_given_name" field.

func (*PersonUpdateOne) ClearRole

func (puo *PersonUpdateOne) ClearRole() *PersonUpdateOne

ClearRole clears the value of the "role" field.

func (*PersonUpdateOne) ClearSettings

func (puo *PersonUpdateOne) ClearSettings() *PersonUpdateOne

ClearSettings clears the value of the "settings" field.

func (*PersonUpdateOne) ClearToken

func (puo *PersonUpdateOne) ClearToken() *PersonUpdateOne

ClearToken clears the value of the "token" field.

func (*PersonUpdateOne) Exec

func (puo *PersonUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PersonUpdateOne) ExecContext

func (c *PersonUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PersonUpdateOne) ExecX

func (puo *PersonUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PersonUpdateOne) Modify

func (puo *PersonUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PersonUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PersonUpdateOne) Mutation

func (puo *PersonUpdateOne) Mutation() *PersonMutation

Mutation returns the PersonMutation object of the builder.

func (*PersonUpdateOne) QueryContext

func (c *PersonUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PersonUpdateOne) Save

func (puo *PersonUpdateOne) Save(ctx context.Context) (*Person, error)

Save executes the query and returns the updated Person entity.

func (*PersonUpdateOne) SaveX

func (puo *PersonUpdateOne) SaveX(ctx context.Context) *Person

SaveX is like Save, but panics if an error occurs.

func (*PersonUpdateOne) Select

func (puo *PersonUpdateOne) Select(field string, fields ...string) *PersonUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PersonUpdateOne) SetActive

func (puo *PersonUpdateOne) SetActive(b bool) *PersonUpdateOne

SetActive sets the "active" field.

func (*PersonUpdateOne) SetBirthDate

func (puo *PersonUpdateOne) SetBirthDate(s string) *PersonUpdateOne

SetBirthDate sets the "birth_date" field.

func (*PersonUpdateOne) SetDateUpdated

func (puo *PersonUpdateOne) SetDateUpdated(t time.Time) *PersonUpdateOne

SetDateUpdated sets the "date_updated" field.

func (*PersonUpdateOne) SetEmail

func (puo *PersonUpdateOne) SetEmail(s string) *PersonUpdateOne

SetEmail sets the "email" field.

func (*PersonUpdateOne) SetExpirationDate

func (puo *PersonUpdateOne) SetExpirationDate(s string) *PersonUpdateOne

SetExpirationDate sets the "expiration_date" field.

func (*PersonUpdateOne) SetFamilyName

func (puo *PersonUpdateOne) SetFamilyName(s string) *PersonUpdateOne

SetFamilyName sets the "family_name" field.

func (*PersonUpdateOne) SetGivenName

func (puo *PersonUpdateOne) SetGivenName(s string) *PersonUpdateOne

SetGivenName sets the "given_name" field.

func (*PersonUpdateOne) SetHonorificPrefix

func (puo *PersonUpdateOne) SetHonorificPrefix(s string) *PersonUpdateOne

SetHonorificPrefix sets the "honorific_prefix" field.

func (*PersonUpdateOne) SetIdentifier

func (puo *PersonUpdateOne) SetIdentifier(s []string) *PersonUpdateOne

SetIdentifier sets the "identifier" field.

func (*PersonUpdateOne) SetIdentifierValues

func (puo *PersonUpdateOne) SetIdentifierValues(s []string) *PersonUpdateOne

SetIdentifierValues sets the "identifier_values" field.

func (*PersonUpdateOne) SetJobCategory

func (puo *PersonUpdateOne) SetJobCategory(s []string) *PersonUpdateOne

SetJobCategory sets the "job_category" field.

func (*PersonUpdateOne) SetName

func (puo *PersonUpdateOne) SetName(s string) *PersonUpdateOne

SetName sets the "name" field.

func (*PersonUpdateOne) SetNillableActive

func (puo *PersonUpdateOne) SetNillableActive(b *bool) *PersonUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*PersonUpdateOne) SetNillableBirthDate

func (puo *PersonUpdateOne) SetNillableBirthDate(s *string) *PersonUpdateOne

SetNillableBirthDate sets the "birth_date" field if the given value is not nil.

func (*PersonUpdateOne) SetNillableEmail

func (puo *PersonUpdateOne) SetNillableEmail(s *string) *PersonUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*PersonUpdateOne) SetNillableExpirationDate

func (puo *PersonUpdateOne) SetNillableExpirationDate(s *string) *PersonUpdateOne

SetNillableExpirationDate sets the "expiration_date" field if the given value is not nil.

func (*PersonUpdateOne) SetNillableFamilyName

func (puo *PersonUpdateOne) SetNillableFamilyName(s *string) *PersonUpdateOne

SetNillableFamilyName sets the "family_name" field if the given value is not nil.

func (*PersonUpdateOne) SetNillableGivenName

func (puo *PersonUpdateOne) SetNillableGivenName(s *string) *PersonUpdateOne

SetNillableGivenName sets the "given_name" field if the given value is not nil.

func (*PersonUpdateOne) SetNillableHonorificPrefix

func (puo *PersonUpdateOne) SetNillableHonorificPrefix(s *string) *PersonUpdateOne

SetNillableHonorificPrefix sets the "honorific_prefix" field if the given value is not nil.

func (*PersonUpdateOne) SetNillableName

func (puo *PersonUpdateOne) SetNillableName(s *string) *PersonUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*PersonUpdateOne) SetNillablePreferredFamilyName

func (puo *PersonUpdateOne) SetNillablePreferredFamilyName(s *string) *PersonUpdateOne

SetNillablePreferredFamilyName sets the "preferred_family_name" field if the given value is not nil.

func (*PersonUpdateOne) SetNillablePreferredGivenName

func (puo *PersonUpdateOne) SetNillablePreferredGivenName(s *string) *PersonUpdateOne

SetNillablePreferredGivenName sets the "preferred_given_name" field if the given value is not nil.

func (*PersonUpdateOne) SetObjectClass

func (puo *PersonUpdateOne) SetObjectClass(s []string) *PersonUpdateOne

SetObjectClass sets the "object_class" field.

func (*PersonUpdateOne) SetPreferredFamilyName

func (puo *PersonUpdateOne) SetPreferredFamilyName(s string) *PersonUpdateOne

SetPreferredFamilyName sets the "preferred_family_name" field.

func (*PersonUpdateOne) SetPreferredGivenName

func (puo *PersonUpdateOne) SetPreferredGivenName(s string) *PersonUpdateOne

SetPreferredGivenName sets the "preferred_given_name" field.

func (*PersonUpdateOne) SetRole

func (puo *PersonUpdateOne) SetRole(s []string) *PersonUpdateOne

SetRole sets the "role" field.

func (*PersonUpdateOne) SetSettings

func (puo *PersonUpdateOne) SetSettings(m map[string]string) *PersonUpdateOne

SetSettings sets the "settings" field.

func (*PersonUpdateOne) SetToken

func (puo *PersonUpdateOne) SetToken(s []string) *PersonUpdateOne

SetToken sets the "token" field.

func (*PersonUpdateOne) Where

func (puo *PersonUpdateOne) Where(ps ...predicate.Person) *PersonUpdateOne

Where appends a list predicates to the PersonUpdate builder.

type PersonUpsert

type PersonUpsert struct {
	*sql.UpdateSet
}

PersonUpsert is the "OnConflict" setter.

func (*PersonUpsert) ClearBirthDate

func (u *PersonUpsert) ClearBirthDate() *PersonUpsert

ClearBirthDate clears the value of the "birth_date" field.

func (*PersonUpsert) ClearEmail

func (u *PersonUpsert) ClearEmail() *PersonUpsert

ClearEmail clears the value of the "email" field.

func (*PersonUpsert) ClearExpirationDate

func (u *PersonUpsert) ClearExpirationDate() *PersonUpsert

ClearExpirationDate clears the value of the "expiration_date" field.

func (*PersonUpsert) ClearFamilyName

func (u *PersonUpsert) ClearFamilyName() *PersonUpsert

ClearFamilyName clears the value of the "family_name" field.

func (*PersonUpsert) ClearGivenName

func (u *PersonUpsert) ClearGivenName() *PersonUpsert

ClearGivenName clears the value of the "given_name" field.

func (*PersonUpsert) ClearHonorificPrefix

func (u *PersonUpsert) ClearHonorificPrefix() *PersonUpsert

ClearHonorificPrefix clears the value of the "honorific_prefix" field.

func (*PersonUpsert) ClearIdentifier

func (u *PersonUpsert) ClearIdentifier() *PersonUpsert

ClearIdentifier clears the value of the "identifier" field.

func (*PersonUpsert) ClearIdentifierValues

func (u *PersonUpsert) ClearIdentifierValues() *PersonUpsert

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*PersonUpsert) ClearJobCategory

func (u *PersonUpsert) ClearJobCategory() *PersonUpsert

ClearJobCategory clears the value of the "job_category" field.

func (*PersonUpsert) ClearName

func (u *PersonUpsert) ClearName() *PersonUpsert

ClearName clears the value of the "name" field.

func (*PersonUpsert) ClearObjectClass

func (u *PersonUpsert) ClearObjectClass() *PersonUpsert

ClearObjectClass clears the value of the "object_class" field.

func (*PersonUpsert) ClearPreferredFamilyName

func (u *PersonUpsert) ClearPreferredFamilyName() *PersonUpsert

ClearPreferredFamilyName clears the value of the "preferred_family_name" field.

func (*PersonUpsert) ClearPreferredGivenName

func (u *PersonUpsert) ClearPreferredGivenName() *PersonUpsert

ClearPreferredGivenName clears the value of the "preferred_given_name" field.

func (*PersonUpsert) ClearRole

func (u *PersonUpsert) ClearRole() *PersonUpsert

ClearRole clears the value of the "role" field.

func (*PersonUpsert) ClearSettings

func (u *PersonUpsert) ClearSettings() *PersonUpsert

ClearSettings clears the value of the "settings" field.

func (*PersonUpsert) ClearToken

func (u *PersonUpsert) ClearToken() *PersonUpsert

ClearToken clears the value of the "token" field.

func (*PersonUpsert) SetActive

func (u *PersonUpsert) SetActive(v bool) *PersonUpsert

SetActive sets the "active" field.

func (*PersonUpsert) SetBirthDate

func (u *PersonUpsert) SetBirthDate(v string) *PersonUpsert

SetBirthDate sets the "birth_date" field.

func (*PersonUpsert) SetDateUpdated

func (u *PersonUpsert) SetDateUpdated(v time.Time) *PersonUpsert

SetDateUpdated sets the "date_updated" field.

func (*PersonUpsert) SetEmail

func (u *PersonUpsert) SetEmail(v string) *PersonUpsert

SetEmail sets the "email" field.

func (*PersonUpsert) SetExpirationDate

func (u *PersonUpsert) SetExpirationDate(v string) *PersonUpsert

SetExpirationDate sets the "expiration_date" field.

func (*PersonUpsert) SetFamilyName

func (u *PersonUpsert) SetFamilyName(v string) *PersonUpsert

SetFamilyName sets the "family_name" field.

func (*PersonUpsert) SetGivenName

func (u *PersonUpsert) SetGivenName(v string) *PersonUpsert

SetGivenName sets the "given_name" field.

func (*PersonUpsert) SetHonorificPrefix

func (u *PersonUpsert) SetHonorificPrefix(v string) *PersonUpsert

SetHonorificPrefix sets the "honorific_prefix" field.

func (*PersonUpsert) SetIdentifier

func (u *PersonUpsert) SetIdentifier(v []string) *PersonUpsert

SetIdentifier sets the "identifier" field.

func (*PersonUpsert) SetIdentifierValues

func (u *PersonUpsert) SetIdentifierValues(v []string) *PersonUpsert

SetIdentifierValues sets the "identifier_values" field.

func (*PersonUpsert) SetJobCategory

func (u *PersonUpsert) SetJobCategory(v []string) *PersonUpsert

SetJobCategory sets the "job_category" field.

func (*PersonUpsert) SetName

func (u *PersonUpsert) SetName(v string) *PersonUpsert

SetName sets the "name" field.

func (*PersonUpsert) SetObjectClass

func (u *PersonUpsert) SetObjectClass(v []string) *PersonUpsert

SetObjectClass sets the "object_class" field.

func (*PersonUpsert) SetPreferredFamilyName

func (u *PersonUpsert) SetPreferredFamilyName(v string) *PersonUpsert

SetPreferredFamilyName sets the "preferred_family_name" field.

func (*PersonUpsert) SetPreferredGivenName

func (u *PersonUpsert) SetPreferredGivenName(v string) *PersonUpsert

SetPreferredGivenName sets the "preferred_given_name" field.

func (*PersonUpsert) SetRole

func (u *PersonUpsert) SetRole(v []string) *PersonUpsert

SetRole sets the "role" field.

func (*PersonUpsert) SetSettings

func (u *PersonUpsert) SetSettings(v map[string]string) *PersonUpsert

SetSettings sets the "settings" field.

func (*PersonUpsert) SetToken

func (u *PersonUpsert) SetToken(v []string) *PersonUpsert

SetToken sets the "token" field.

func (*PersonUpsert) UpdateActive

func (u *PersonUpsert) UpdateActive() *PersonUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*PersonUpsert) UpdateBirthDate

func (u *PersonUpsert) UpdateBirthDate() *PersonUpsert

UpdateBirthDate sets the "birth_date" field to the value that was provided on create.

func (*PersonUpsert) UpdateDateUpdated

func (u *PersonUpsert) UpdateDateUpdated() *PersonUpsert

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*PersonUpsert) UpdateEmail

func (u *PersonUpsert) UpdateEmail() *PersonUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*PersonUpsert) UpdateExpirationDate

func (u *PersonUpsert) UpdateExpirationDate() *PersonUpsert

UpdateExpirationDate sets the "expiration_date" field to the value that was provided on create.

func (*PersonUpsert) UpdateFamilyName

func (u *PersonUpsert) UpdateFamilyName() *PersonUpsert

UpdateFamilyName sets the "family_name" field to the value that was provided on create.

func (*PersonUpsert) UpdateGivenName

func (u *PersonUpsert) UpdateGivenName() *PersonUpsert

UpdateGivenName sets the "given_name" field to the value that was provided on create.

func (*PersonUpsert) UpdateHonorificPrefix

func (u *PersonUpsert) UpdateHonorificPrefix() *PersonUpsert

UpdateHonorificPrefix sets the "honorific_prefix" field to the value that was provided on create.

func (*PersonUpsert) UpdateIdentifier

func (u *PersonUpsert) UpdateIdentifier() *PersonUpsert

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*PersonUpsert) UpdateIdentifierValues

func (u *PersonUpsert) UpdateIdentifierValues() *PersonUpsert

UpdateIdentifierValues sets the "identifier_values" field to the value that was provided on create.

func (*PersonUpsert) UpdateJobCategory

func (u *PersonUpsert) UpdateJobCategory() *PersonUpsert

UpdateJobCategory sets the "job_category" field to the value that was provided on create.

func (*PersonUpsert) UpdateName

func (u *PersonUpsert) UpdateName() *PersonUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*PersonUpsert) UpdateObjectClass

func (u *PersonUpsert) UpdateObjectClass() *PersonUpsert

UpdateObjectClass sets the "object_class" field to the value that was provided on create.

func (*PersonUpsert) UpdatePreferredFamilyName

func (u *PersonUpsert) UpdatePreferredFamilyName() *PersonUpsert

UpdatePreferredFamilyName sets the "preferred_family_name" field to the value that was provided on create.

func (*PersonUpsert) UpdatePreferredGivenName

func (u *PersonUpsert) UpdatePreferredGivenName() *PersonUpsert

UpdatePreferredGivenName sets the "preferred_given_name" field to the value that was provided on create.

func (*PersonUpsert) UpdateRole

func (u *PersonUpsert) UpdateRole() *PersonUpsert

UpdateRole sets the "role" field to the value that was provided on create.

func (*PersonUpsert) UpdateSettings

func (u *PersonUpsert) UpdateSettings() *PersonUpsert

UpdateSettings sets the "settings" field to the value that was provided on create.

func (*PersonUpsert) UpdateToken

func (u *PersonUpsert) UpdateToken() *PersonUpsert

UpdateToken sets the "token" field to the value that was provided on create.

type PersonUpsertBulk

type PersonUpsertBulk struct {
	// contains filtered or unexported fields
}

PersonUpsertBulk is the builder for "upsert"-ing a bulk of Person nodes.

func (*PersonUpsertBulk) ClearBirthDate

func (u *PersonUpsertBulk) ClearBirthDate() *PersonUpsertBulk

ClearBirthDate clears the value of the "birth_date" field.

func (*PersonUpsertBulk) ClearEmail

func (u *PersonUpsertBulk) ClearEmail() *PersonUpsertBulk

ClearEmail clears the value of the "email" field.

func (*PersonUpsertBulk) ClearExpirationDate

func (u *PersonUpsertBulk) ClearExpirationDate() *PersonUpsertBulk

ClearExpirationDate clears the value of the "expiration_date" field.

func (*PersonUpsertBulk) ClearFamilyName

func (u *PersonUpsertBulk) ClearFamilyName() *PersonUpsertBulk

ClearFamilyName clears the value of the "family_name" field.

func (*PersonUpsertBulk) ClearGivenName

func (u *PersonUpsertBulk) ClearGivenName() *PersonUpsertBulk

ClearGivenName clears the value of the "given_name" field.

func (*PersonUpsertBulk) ClearHonorificPrefix

func (u *PersonUpsertBulk) ClearHonorificPrefix() *PersonUpsertBulk

ClearHonorificPrefix clears the value of the "honorific_prefix" field.

func (*PersonUpsertBulk) ClearIdentifier

func (u *PersonUpsertBulk) ClearIdentifier() *PersonUpsertBulk

ClearIdentifier clears the value of the "identifier" field.

func (*PersonUpsertBulk) ClearIdentifierValues

func (u *PersonUpsertBulk) ClearIdentifierValues() *PersonUpsertBulk

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*PersonUpsertBulk) ClearJobCategory

func (u *PersonUpsertBulk) ClearJobCategory() *PersonUpsertBulk

ClearJobCategory clears the value of the "job_category" field.

func (*PersonUpsertBulk) ClearName

func (u *PersonUpsertBulk) ClearName() *PersonUpsertBulk

ClearName clears the value of the "name" field.

func (*PersonUpsertBulk) ClearObjectClass

func (u *PersonUpsertBulk) ClearObjectClass() *PersonUpsertBulk

ClearObjectClass clears the value of the "object_class" field.

func (*PersonUpsertBulk) ClearPreferredFamilyName

func (u *PersonUpsertBulk) ClearPreferredFamilyName() *PersonUpsertBulk

ClearPreferredFamilyName clears the value of the "preferred_family_name" field.

func (*PersonUpsertBulk) ClearPreferredGivenName

func (u *PersonUpsertBulk) ClearPreferredGivenName() *PersonUpsertBulk

ClearPreferredGivenName clears the value of the "preferred_given_name" field.

func (*PersonUpsertBulk) ClearRole

func (u *PersonUpsertBulk) ClearRole() *PersonUpsertBulk

ClearRole clears the value of the "role" field.

func (*PersonUpsertBulk) ClearSettings

func (u *PersonUpsertBulk) ClearSettings() *PersonUpsertBulk

ClearSettings clears the value of the "settings" field.

func (*PersonUpsertBulk) ClearToken

func (u *PersonUpsertBulk) ClearToken() *PersonUpsertBulk

ClearToken clears the value of the "token" field.

func (*PersonUpsertBulk) DoNothing

func (u *PersonUpsertBulk) DoNothing() *PersonUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PersonUpsertBulk) Exec

func (u *PersonUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PersonUpsertBulk) ExecX

func (u *PersonUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PersonUpsertBulk) Ignore

func (u *PersonUpsertBulk) Ignore() *PersonUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Person.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PersonUpsertBulk) SetActive

func (u *PersonUpsertBulk) SetActive(v bool) *PersonUpsertBulk

SetActive sets the "active" field.

func (*PersonUpsertBulk) SetBirthDate

func (u *PersonUpsertBulk) SetBirthDate(v string) *PersonUpsertBulk

SetBirthDate sets the "birth_date" field.

func (*PersonUpsertBulk) SetDateUpdated

func (u *PersonUpsertBulk) SetDateUpdated(v time.Time) *PersonUpsertBulk

SetDateUpdated sets the "date_updated" field.

func (*PersonUpsertBulk) SetEmail

func (u *PersonUpsertBulk) SetEmail(v string) *PersonUpsertBulk

SetEmail sets the "email" field.

func (*PersonUpsertBulk) SetExpirationDate

func (u *PersonUpsertBulk) SetExpirationDate(v string) *PersonUpsertBulk

SetExpirationDate sets the "expiration_date" field.

func (*PersonUpsertBulk) SetFamilyName

func (u *PersonUpsertBulk) SetFamilyName(v string) *PersonUpsertBulk

SetFamilyName sets the "family_name" field.

func (*PersonUpsertBulk) SetGivenName

func (u *PersonUpsertBulk) SetGivenName(v string) *PersonUpsertBulk

SetGivenName sets the "given_name" field.

func (*PersonUpsertBulk) SetHonorificPrefix

func (u *PersonUpsertBulk) SetHonorificPrefix(v string) *PersonUpsertBulk

SetHonorificPrefix sets the "honorific_prefix" field.

func (*PersonUpsertBulk) SetIdentifier

func (u *PersonUpsertBulk) SetIdentifier(v []string) *PersonUpsertBulk

SetIdentifier sets the "identifier" field.

func (*PersonUpsertBulk) SetIdentifierValues

func (u *PersonUpsertBulk) SetIdentifierValues(v []string) *PersonUpsertBulk

SetIdentifierValues sets the "identifier_values" field.

func (*PersonUpsertBulk) SetJobCategory

func (u *PersonUpsertBulk) SetJobCategory(v []string) *PersonUpsertBulk

SetJobCategory sets the "job_category" field.

func (*PersonUpsertBulk) SetName

func (u *PersonUpsertBulk) SetName(v string) *PersonUpsertBulk

SetName sets the "name" field.

func (*PersonUpsertBulk) SetObjectClass

func (u *PersonUpsertBulk) SetObjectClass(v []string) *PersonUpsertBulk

SetObjectClass sets the "object_class" field.

func (*PersonUpsertBulk) SetPreferredFamilyName

func (u *PersonUpsertBulk) SetPreferredFamilyName(v string) *PersonUpsertBulk

SetPreferredFamilyName sets the "preferred_family_name" field.

func (*PersonUpsertBulk) SetPreferredGivenName

func (u *PersonUpsertBulk) SetPreferredGivenName(v string) *PersonUpsertBulk

SetPreferredGivenName sets the "preferred_given_name" field.

func (*PersonUpsertBulk) SetRole

func (u *PersonUpsertBulk) SetRole(v []string) *PersonUpsertBulk

SetRole sets the "role" field.

func (*PersonUpsertBulk) SetSettings

func (u *PersonUpsertBulk) SetSettings(v map[string]string) *PersonUpsertBulk

SetSettings sets the "settings" field.

func (*PersonUpsertBulk) SetToken

func (u *PersonUpsertBulk) SetToken(v []string) *PersonUpsertBulk

SetToken sets the "token" field.

func (*PersonUpsertBulk) Update

func (u *PersonUpsertBulk) Update(set func(*PersonUpsert)) *PersonUpsertBulk

Update allows overriding fields `UPDATE` values. See the PersonCreateBulk.OnConflict documentation for more info.

func (*PersonUpsertBulk) UpdateActive

func (u *PersonUpsertBulk) UpdateActive() *PersonUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateBirthDate

func (u *PersonUpsertBulk) UpdateBirthDate() *PersonUpsertBulk

UpdateBirthDate sets the "birth_date" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateDateUpdated

func (u *PersonUpsertBulk) UpdateDateUpdated() *PersonUpsertBulk

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateEmail

func (u *PersonUpsertBulk) UpdateEmail() *PersonUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateExpirationDate

func (u *PersonUpsertBulk) UpdateExpirationDate() *PersonUpsertBulk

UpdateExpirationDate sets the "expiration_date" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateFamilyName

func (u *PersonUpsertBulk) UpdateFamilyName() *PersonUpsertBulk

UpdateFamilyName sets the "family_name" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateGivenName

func (u *PersonUpsertBulk) UpdateGivenName() *PersonUpsertBulk

UpdateGivenName sets the "given_name" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateHonorificPrefix

func (u *PersonUpsertBulk) UpdateHonorificPrefix() *PersonUpsertBulk

UpdateHonorificPrefix sets the "honorific_prefix" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateIdentifier

func (u *PersonUpsertBulk) UpdateIdentifier() *PersonUpsertBulk

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateIdentifierValues

func (u *PersonUpsertBulk) UpdateIdentifierValues() *PersonUpsertBulk

UpdateIdentifierValues sets the "identifier_values" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateJobCategory

func (u *PersonUpsertBulk) UpdateJobCategory() *PersonUpsertBulk

UpdateJobCategory sets the "job_category" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateName

func (u *PersonUpsertBulk) UpdateName() *PersonUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateNewValues

func (u *PersonUpsertBulk) UpdateNewValues() *PersonUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Person.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PersonUpsertBulk) UpdateObjectClass

func (u *PersonUpsertBulk) UpdateObjectClass() *PersonUpsertBulk

UpdateObjectClass sets the "object_class" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdatePreferredFamilyName

func (u *PersonUpsertBulk) UpdatePreferredFamilyName() *PersonUpsertBulk

UpdatePreferredFamilyName sets the "preferred_family_name" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdatePreferredGivenName

func (u *PersonUpsertBulk) UpdatePreferredGivenName() *PersonUpsertBulk

UpdatePreferredGivenName sets the "preferred_given_name" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateRole

func (u *PersonUpsertBulk) UpdateRole() *PersonUpsertBulk

UpdateRole sets the "role" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateSettings

func (u *PersonUpsertBulk) UpdateSettings() *PersonUpsertBulk

UpdateSettings sets the "settings" field to the value that was provided on create.

func (*PersonUpsertBulk) UpdateToken

func (u *PersonUpsertBulk) UpdateToken() *PersonUpsertBulk

UpdateToken sets the "token" field to the value that was provided on create.

type PersonUpsertOne

type PersonUpsertOne struct {
	// contains filtered or unexported fields
}

PersonUpsertOne is the builder for "upsert"-ing

one Person node.

func (*PersonUpsertOne) ClearBirthDate

func (u *PersonUpsertOne) ClearBirthDate() *PersonUpsertOne

ClearBirthDate clears the value of the "birth_date" field.

func (*PersonUpsertOne) ClearEmail

func (u *PersonUpsertOne) ClearEmail() *PersonUpsertOne

ClearEmail clears the value of the "email" field.

func (*PersonUpsertOne) ClearExpirationDate

func (u *PersonUpsertOne) ClearExpirationDate() *PersonUpsertOne

ClearExpirationDate clears the value of the "expiration_date" field.

func (*PersonUpsertOne) ClearFamilyName

func (u *PersonUpsertOne) ClearFamilyName() *PersonUpsertOne

ClearFamilyName clears the value of the "family_name" field.

func (*PersonUpsertOne) ClearGivenName

func (u *PersonUpsertOne) ClearGivenName() *PersonUpsertOne

ClearGivenName clears the value of the "given_name" field.

func (*PersonUpsertOne) ClearHonorificPrefix

func (u *PersonUpsertOne) ClearHonorificPrefix() *PersonUpsertOne

ClearHonorificPrefix clears the value of the "honorific_prefix" field.

func (*PersonUpsertOne) ClearIdentifier

func (u *PersonUpsertOne) ClearIdentifier() *PersonUpsertOne

ClearIdentifier clears the value of the "identifier" field.

func (*PersonUpsertOne) ClearIdentifierValues

func (u *PersonUpsertOne) ClearIdentifierValues() *PersonUpsertOne

ClearIdentifierValues clears the value of the "identifier_values" field.

func (*PersonUpsertOne) ClearJobCategory

func (u *PersonUpsertOne) ClearJobCategory() *PersonUpsertOne

ClearJobCategory clears the value of the "job_category" field.

func (*PersonUpsertOne) ClearName

func (u *PersonUpsertOne) ClearName() *PersonUpsertOne

ClearName clears the value of the "name" field.

func (*PersonUpsertOne) ClearObjectClass

func (u *PersonUpsertOne) ClearObjectClass() *PersonUpsertOne

ClearObjectClass clears the value of the "object_class" field.

func (*PersonUpsertOne) ClearPreferredFamilyName

func (u *PersonUpsertOne) ClearPreferredFamilyName() *PersonUpsertOne

ClearPreferredFamilyName clears the value of the "preferred_family_name" field.

func (*PersonUpsertOne) ClearPreferredGivenName

func (u *PersonUpsertOne) ClearPreferredGivenName() *PersonUpsertOne

ClearPreferredGivenName clears the value of the "preferred_given_name" field.

func (*PersonUpsertOne) ClearRole

func (u *PersonUpsertOne) ClearRole() *PersonUpsertOne

ClearRole clears the value of the "role" field.

func (*PersonUpsertOne) ClearSettings

func (u *PersonUpsertOne) ClearSettings() *PersonUpsertOne

ClearSettings clears the value of the "settings" field.

func (*PersonUpsertOne) ClearToken

func (u *PersonUpsertOne) ClearToken() *PersonUpsertOne

ClearToken clears the value of the "token" field.

func (*PersonUpsertOne) DoNothing

func (u *PersonUpsertOne) DoNothing() *PersonUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PersonUpsertOne) Exec

func (u *PersonUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*PersonUpsertOne) ExecX

func (u *PersonUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PersonUpsertOne) ID

func (u *PersonUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PersonUpsertOne) IDX

func (u *PersonUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*PersonUpsertOne) Ignore

func (u *PersonUpsertOne) Ignore() *PersonUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Person.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PersonUpsertOne) SetActive

func (u *PersonUpsertOne) SetActive(v bool) *PersonUpsertOne

SetActive sets the "active" field.

func (*PersonUpsertOne) SetBirthDate

func (u *PersonUpsertOne) SetBirthDate(v string) *PersonUpsertOne

SetBirthDate sets the "birth_date" field.

func (*PersonUpsertOne) SetDateUpdated

func (u *PersonUpsertOne) SetDateUpdated(v time.Time) *PersonUpsertOne

SetDateUpdated sets the "date_updated" field.

func (*PersonUpsertOne) SetEmail

func (u *PersonUpsertOne) SetEmail(v string) *PersonUpsertOne

SetEmail sets the "email" field.

func (*PersonUpsertOne) SetExpirationDate

func (u *PersonUpsertOne) SetExpirationDate(v string) *PersonUpsertOne

SetExpirationDate sets the "expiration_date" field.

func (*PersonUpsertOne) SetFamilyName

func (u *PersonUpsertOne) SetFamilyName(v string) *PersonUpsertOne

SetFamilyName sets the "family_name" field.

func (*PersonUpsertOne) SetGivenName

func (u *PersonUpsertOne) SetGivenName(v string) *PersonUpsertOne

SetGivenName sets the "given_name" field.

func (*PersonUpsertOne) SetHonorificPrefix

func (u *PersonUpsertOne) SetHonorificPrefix(v string) *PersonUpsertOne

SetHonorificPrefix sets the "honorific_prefix" field.

func (*PersonUpsertOne) SetIdentifier

func (u *PersonUpsertOne) SetIdentifier(v []string) *PersonUpsertOne

SetIdentifier sets the "identifier" field.

func (*PersonUpsertOne) SetIdentifierValues

func (u *PersonUpsertOne) SetIdentifierValues(v []string) *PersonUpsertOne

SetIdentifierValues sets the "identifier_values" field.

func (*PersonUpsertOne) SetJobCategory

func (u *PersonUpsertOne) SetJobCategory(v []string) *PersonUpsertOne

SetJobCategory sets the "job_category" field.

func (*PersonUpsertOne) SetName

func (u *PersonUpsertOne) SetName(v string) *PersonUpsertOne

SetName sets the "name" field.

func (*PersonUpsertOne) SetObjectClass

func (u *PersonUpsertOne) SetObjectClass(v []string) *PersonUpsertOne

SetObjectClass sets the "object_class" field.

func (*PersonUpsertOne) SetPreferredFamilyName

func (u *PersonUpsertOne) SetPreferredFamilyName(v string) *PersonUpsertOne

SetPreferredFamilyName sets the "preferred_family_name" field.

func (*PersonUpsertOne) SetPreferredGivenName

func (u *PersonUpsertOne) SetPreferredGivenName(v string) *PersonUpsertOne

SetPreferredGivenName sets the "preferred_given_name" field.

func (*PersonUpsertOne) SetRole

func (u *PersonUpsertOne) SetRole(v []string) *PersonUpsertOne

SetRole sets the "role" field.

func (*PersonUpsertOne) SetSettings

func (u *PersonUpsertOne) SetSettings(v map[string]string) *PersonUpsertOne

SetSettings sets the "settings" field.

func (*PersonUpsertOne) SetToken

func (u *PersonUpsertOne) SetToken(v []string) *PersonUpsertOne

SetToken sets the "token" field.

func (*PersonUpsertOne) Update

func (u *PersonUpsertOne) Update(set func(*PersonUpsert)) *PersonUpsertOne

Update allows overriding fields `UPDATE` values. See the PersonCreate.OnConflict documentation for more info.

func (*PersonUpsertOne) UpdateActive

func (u *PersonUpsertOne) UpdateActive() *PersonUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateBirthDate

func (u *PersonUpsertOne) UpdateBirthDate() *PersonUpsertOne

UpdateBirthDate sets the "birth_date" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateDateUpdated

func (u *PersonUpsertOne) UpdateDateUpdated() *PersonUpsertOne

UpdateDateUpdated sets the "date_updated" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateEmail

func (u *PersonUpsertOne) UpdateEmail() *PersonUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateExpirationDate

func (u *PersonUpsertOne) UpdateExpirationDate() *PersonUpsertOne

UpdateExpirationDate sets the "expiration_date" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateFamilyName

func (u *PersonUpsertOne) UpdateFamilyName() *PersonUpsertOne

UpdateFamilyName sets the "family_name" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateGivenName

func (u *PersonUpsertOne) UpdateGivenName() *PersonUpsertOne

UpdateGivenName sets the "given_name" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateHonorificPrefix

func (u *PersonUpsertOne) UpdateHonorificPrefix() *PersonUpsertOne

UpdateHonorificPrefix sets the "honorific_prefix" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateIdentifier

func (u *PersonUpsertOne) UpdateIdentifier() *PersonUpsertOne

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateIdentifierValues

func (u *PersonUpsertOne) UpdateIdentifierValues() *PersonUpsertOne

UpdateIdentifierValues sets the "identifier_values" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateJobCategory

func (u *PersonUpsertOne) UpdateJobCategory() *PersonUpsertOne

UpdateJobCategory sets the "job_category" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateName

func (u *PersonUpsertOne) UpdateName() *PersonUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateNewValues

func (u *PersonUpsertOne) UpdateNewValues() *PersonUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Person.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PersonUpsertOne) UpdateObjectClass

func (u *PersonUpsertOne) UpdateObjectClass() *PersonUpsertOne

UpdateObjectClass sets the "object_class" field to the value that was provided on create.

func (*PersonUpsertOne) UpdatePreferredFamilyName

func (u *PersonUpsertOne) UpdatePreferredFamilyName() *PersonUpsertOne

UpdatePreferredFamilyName sets the "preferred_family_name" field to the value that was provided on create.

func (*PersonUpsertOne) UpdatePreferredGivenName

func (u *PersonUpsertOne) UpdatePreferredGivenName() *PersonUpsertOne

UpdatePreferredGivenName sets the "preferred_given_name" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateRole

func (u *PersonUpsertOne) UpdateRole() *PersonUpsertOne

UpdateRole sets the "role" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateSettings

func (u *PersonUpsertOne) UpdateSettings() *PersonUpsertOne

UpdateSettings sets the "settings" field to the value that was provided on create.

func (*PersonUpsertOne) UpdateToken

func (u *PersonUpsertOne) UpdateToken() *PersonUpsertOne

UpdateToken sets the "token" field to the value that was provided on create.

type Persons

type Persons []*Person

Persons is a parsable slice of Person.

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 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 {

	// Organization is the client for interacting with the Organization builders.
	Organization *OrganizationClient
	// OrganizationParent is the client for interacting with the OrganizationParent builders.
	OrganizationParent *OrganizationParentClient
	// OrganizationPerson is the client for interacting with the OrganizationPerson builders.
	OrganizationPerson *OrganizationPersonClient
	// Person is the client for interacting with the Person builders.
	Person *PersonClient
	// 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 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL