ent

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 32 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.
	TypeAccount              = "Account"
	TypeBank                 = "Bank"
	TypeBinaryItem           = "BinaryItem"
	TypeBranch               = "Branch"
	TypeCard                 = "Card"
	TypeCardNetwork          = "CardNetwork"
	TypeEntity               = "Entity"
	TypeEntityAddress        = "EntityAddress"
	TypeEntityContactPoint   = "EntityContactPoint"
	TypeEntityTaxInformation = "EntityTaxInformation"
	TypePreference           = "Preference"
	TypeProduct              = "Product"
	TypeRoutingNumber        = "RoutingNumber"
	TypeTransaction          = "Transaction"
)

Variables

This section is empty.

Functions

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 validaton 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 Account

type Account struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Number holds the value of the "number" field.
	Number string `json:"number,omitempty"`
	// ParentId holds the value of the "parentId" field.
	ParentId uuid.UUID `json:"parentId,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// DateCreated holds the value of the "dateCreated" field.
	DateCreated time.Time `json:"dateCreated,omitempty"`
	// DateOpened holds the value of the "dateOpened" field.
	DateOpened time.Time `json:"dateOpened,omitempty"`
	// DateLastUpdated holds the value of the "dateLastUpdated" field.
	DateLastUpdated time.Time `json:"dateLastUpdated,omitempty"`
	// DateClosed holds the value of the "dateClosed" field.
	DateClosed time.Time `json:"dateClosed,omitempty"`
	// CurrencyCode holds the value of the "currencyCode" field.
	CurrencyCode string `json:"currencyCode,omitempty"`
	// Status holds the value of the "status" field.
	Status account.Status `json:"status,omitempty"`
	// Source holds the value of the "source" field.
	Source string `json:"source,omitempty"`
	// InterestReporting holds the value of the "interestReporting" field.
	InterestReporting bool `json:"interestReporting,omitempty"`
	// CurrentBalance holds the value of the "currentBalance" field.
	CurrentBalance float32 `json:"currentBalance,omitempty"`
	// AvailableBalance holds the value of the "availableBalance" field.
	AvailableBalance float32 `json:"availableBalance,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AccountQuery when eager-loading is set.
	Edges AccountEdges `json:"edges"`
	// contains filtered or unexported fields
}

Account is the model entity for the Account schema.

func (*Account) QueryBranch

func (a *Account) QueryBranch() *BranchQuery

QueryBranch queries the "branch" edge of the Account entity.

func (*Account) QueryCards

func (a *Account) QueryCards() *CardQuery

QueryCards queries the "cards" edge of the Account entity.

func (*Account) QueryOwners

func (a *Account) QueryOwners() *EntityQuery

QueryOwners queries the "owners" edge of the Account entity.

func (*Account) QueryPreferences

func (a *Account) QueryPreferences() *PreferenceQuery

QueryPreferences queries the "preferences" edge of the Account entity.

func (*Account) QueryProduct

func (a *Account) QueryProduct() *ProductQuery

QueryProduct queries the "product" edge of the Account entity.

func (*Account) QueryRoutingnumbers

func (a *Account) QueryRoutingnumbers() *RoutingNumberQuery

QueryRoutingnumbers queries the "routingnumbers" edge of the Account entity.

func (*Account) QueryTransactions

func (a *Account) QueryTransactions() *TransactionQuery

QueryTransactions queries the "transactions" edge of the Account entity.

func (*Account) String

func (a *Account) String() string

String implements the fmt.Stringer.

func (*Account) Unwrap

func (a *Account) Unwrap() *Account

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

func (a *Account) Update() *AccountUpdateOne

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

type AccountClient

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

AccountClient is a client for the Account schema.

func NewAccountClient

func NewAccountClient(c config) *AccountClient

NewAccountClient returns a client for the Account from the given config.

func (*AccountClient) Create

func (c *AccountClient) Create() *AccountCreate

Create returns a create builder for Account.

func (*AccountClient) CreateBulk

func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk

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

func (*AccountClient) Delete

func (c *AccountClient) Delete() *AccountDelete

Delete returns a delete builder for Account.

func (*AccountClient) DeleteOne

func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*AccountClient) DeleteOneID

func (c *AccountClient) DeleteOneID(id uuid.UUID) *AccountDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*AccountClient) Get

func (c *AccountClient) Get(ctx context.Context, id uuid.UUID) (*Account, error)

Get returns a Account entity by its id.

func (*AccountClient) GetX

func (c *AccountClient) GetX(ctx context.Context, id uuid.UUID) *Account

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

func (*AccountClient) Hooks

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

Hooks returns the client hooks.

func (*AccountClient) Query

func (c *AccountClient) Query() *AccountQuery

Query returns a query builder for Account.

func (*AccountClient) QueryBranch

func (c *AccountClient) QueryBranch(a *Account) *BranchQuery

QueryBranch queries the branch edge of a Account.

func (*AccountClient) QueryCards

func (c *AccountClient) QueryCards(a *Account) *CardQuery

QueryCards queries the cards edge of a Account.

func (*AccountClient) QueryOwners

func (c *AccountClient) QueryOwners(a *Account) *EntityQuery

QueryOwners queries the owners edge of a Account.

func (*AccountClient) QueryPreferences

func (c *AccountClient) QueryPreferences(a *Account) *PreferenceQuery

QueryPreferences queries the preferences edge of a Account.

func (*AccountClient) QueryProduct

func (c *AccountClient) QueryProduct(a *Account) *ProductQuery

QueryProduct queries the product edge of a Account.

func (*AccountClient) QueryRoutingnumbers

func (c *AccountClient) QueryRoutingnumbers(a *Account) *RoutingNumberQuery

QueryRoutingnumbers queries the routingnumbers edge of a Account.

func (*AccountClient) QueryTransactions

func (c *AccountClient) QueryTransactions(a *Account) *TransactionQuery

QueryTransactions queries the transactions edge of a Account.

func (*AccountClient) Update

func (c *AccountClient) Update() *AccountUpdate

Update returns an update builder for Account.

func (*AccountClient) UpdateOne

func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AccountClient) UpdateOneID

func (c *AccountClient) UpdateOneID(id uuid.UUID) *AccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AccountClient) Use

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

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

type AccountCreate

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

AccountCreate is the builder for creating a Account entity.

func (*AccountCreate) AddCardIDs

func (ac *AccountCreate) AddCardIDs(ids ...int) *AccountCreate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*AccountCreate) AddCards

func (ac *AccountCreate) AddCards(c ...*Card) *AccountCreate

AddCards adds the "cards" edges to the Card entity.

func (*AccountCreate) AddOwnerIDs

func (ac *AccountCreate) AddOwnerIDs(ids ...uuid.UUID) *AccountCreate

AddOwnerIDs adds the "owners" edge to the Entity entity by IDs.

func (*AccountCreate) AddOwners

func (ac *AccountCreate) AddOwners(e ...*Entity) *AccountCreate

AddOwners adds the "owners" edges to the Entity entity.

func (*AccountCreate) AddPreferenceIDs

func (ac *AccountCreate) AddPreferenceIDs(ids ...int) *AccountCreate

AddPreferenceIDs adds the "preferences" edge to the Preference entity by IDs.

func (*AccountCreate) AddPreferences

func (ac *AccountCreate) AddPreferences(p ...*Preference) *AccountCreate

AddPreferences adds the "preferences" edges to the Preference entity.

func (*AccountCreate) AddRoutingnumberIDs

func (ac *AccountCreate) AddRoutingnumberIDs(ids ...int) *AccountCreate

AddRoutingnumberIDs adds the "routingnumbers" edge to the RoutingNumber entity by IDs.

func (*AccountCreate) AddRoutingnumbers

func (ac *AccountCreate) AddRoutingnumbers(r ...*RoutingNumber) *AccountCreate

AddRoutingnumbers adds the "routingnumbers" edges to the RoutingNumber entity.

func (*AccountCreate) AddTransactionIDs

func (ac *AccountCreate) AddTransactionIDs(ids ...uuid.UUID) *AccountCreate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*AccountCreate) AddTransactions

func (ac *AccountCreate) AddTransactions(t ...*Transaction) *AccountCreate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*AccountCreate) Mutation

func (ac *AccountCreate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountCreate) Save

func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)

Save creates the Account in the database.

func (*AccountCreate) SaveX

func (ac *AccountCreate) SaveX(ctx context.Context) *Account

SaveX calls Save and panics if Save returns an error.

func (*AccountCreate) SetAvailableBalance

func (ac *AccountCreate) SetAvailableBalance(f float32) *AccountCreate

SetAvailableBalance sets the "availableBalance" field.

func (*AccountCreate) SetBranch

func (ac *AccountCreate) SetBranch(b *Branch) *AccountCreate

SetBranch sets the "branch" edge to the Branch entity.

func (*AccountCreate) SetBranchID

func (ac *AccountCreate) SetBranchID(id int) *AccountCreate

SetBranchID sets the "branch" edge to the Branch entity by ID.

func (*AccountCreate) SetCurrencyCode

func (ac *AccountCreate) SetCurrencyCode(s string) *AccountCreate

SetCurrencyCode sets the "currencyCode" field.

func (*AccountCreate) SetCurrentBalance

func (ac *AccountCreate) SetCurrentBalance(f float32) *AccountCreate

SetCurrentBalance sets the "currentBalance" field.

func (*AccountCreate) SetDateClosed

func (ac *AccountCreate) SetDateClosed(t time.Time) *AccountCreate

SetDateClosed sets the "dateClosed" field.

func (*AccountCreate) SetDateCreated

func (ac *AccountCreate) SetDateCreated(t time.Time) *AccountCreate

SetDateCreated sets the "dateCreated" field.

func (*AccountCreate) SetDateLastUpdated

func (ac *AccountCreate) SetDateLastUpdated(t time.Time) *AccountCreate

SetDateLastUpdated sets the "dateLastUpdated" field.

func (*AccountCreate) SetDateOpened

func (ac *AccountCreate) SetDateOpened(t time.Time) *AccountCreate

SetDateOpened sets the "dateOpened" field.

func (*AccountCreate) SetID

func (ac *AccountCreate) SetID(u uuid.UUID) *AccountCreate

SetID sets the "id" field.

func (*AccountCreate) SetInterestReporting

func (ac *AccountCreate) SetInterestReporting(b bool) *AccountCreate

SetInterestReporting sets the "interestReporting" field.

func (*AccountCreate) SetName

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

SetName sets the "name" field.

func (*AccountCreate) SetNillableBranchID

func (ac *AccountCreate) SetNillableBranchID(id *int) *AccountCreate

SetNillableBranchID sets the "branch" edge to the Branch entity by ID if the given value is not nil.

func (*AccountCreate) SetNillableDateClosed

func (ac *AccountCreate) SetNillableDateClosed(t *time.Time) *AccountCreate

SetNillableDateClosed sets the "dateClosed" field if the given value is not nil.

func (*AccountCreate) SetNillableProductID

func (ac *AccountCreate) SetNillableProductID(id *int) *AccountCreate

SetNillableProductID sets the "product" edge to the Product entity by ID if the given value is not nil.

func (*AccountCreate) SetNillableURL

func (ac *AccountCreate) SetNillableURL(s *string) *AccountCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*AccountCreate) SetNumber

func (ac *AccountCreate) SetNumber(s string) *AccountCreate

SetNumber sets the "number" field.

func (*AccountCreate) SetParentId

func (ac *AccountCreate) SetParentId(u uuid.UUID) *AccountCreate

SetParentId sets the "parentId" field.

func (*AccountCreate) SetProduct

func (ac *AccountCreate) SetProduct(p *Product) *AccountCreate

SetProduct sets the "product" edge to the Product entity.

func (*AccountCreate) SetProductID

func (ac *AccountCreate) SetProductID(id int) *AccountCreate

SetProductID sets the "product" edge to the Product entity by ID.

func (*AccountCreate) SetSource

func (ac *AccountCreate) SetSource(s string) *AccountCreate

SetSource sets the "source" field.

func (*AccountCreate) SetStatus

func (ac *AccountCreate) SetStatus(a account.Status) *AccountCreate

SetStatus sets the "status" field.

func (*AccountCreate) SetTitle

func (ac *AccountCreate) SetTitle(s string) *AccountCreate

SetTitle sets the "title" field.

func (*AccountCreate) SetType

func (ac *AccountCreate) SetType(s string) *AccountCreate

SetType sets the "type" field.

func (*AccountCreate) SetURL

func (ac *AccountCreate) SetURL(s string) *AccountCreate

SetURL sets the "url" field.

type AccountCreateBulk

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

AccountCreateBulk is the builder for creating many Account entities in bulk.

func (*AccountCreateBulk) Save

func (acb *AccountCreateBulk) Save(ctx context.Context) ([]*Account, error)

Save creates the Account entities in the database.

func (*AccountCreateBulk) SaveX

func (acb *AccountCreateBulk) SaveX(ctx context.Context) []*Account

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

type AccountDelete

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

AccountDelete is the builder for deleting a Account entity.

func (*AccountDelete) Exec

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

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

func (*AccountDelete) ExecX

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

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

func (*AccountDelete) Where

func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete

Where adds a new predicate to the AccountDelete builder.

type AccountDeleteOne

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

AccountDeleteOne is the builder for deleting a single Account entity.

func (*AccountDeleteOne) Exec

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

Exec executes the deletion query.

func (*AccountDeleteOne) ExecX

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

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

type AccountEdges

type AccountEdges struct {
	// Branch holds the value of the branch edge.
	Branch *Branch `json:"branch,omitempty"`
	// Owners holds the value of the owners edge.
	Owners []*Entity `json:"owners,omitempty"`
	// Preferences holds the value of the preferences edge.
	Preferences []*Preference `json:"preferences,omitempty"`
	// Routingnumbers holds the value of the routingnumbers edge.
	Routingnumbers []*RoutingNumber `json:"routingnumbers,omitempty"`
	// Product holds the value of the product edge.
	Product *Product `json:"product,omitempty"`
	// Transactions holds the value of the transactions edge.
	Transactions []*Transaction `json:"transactions,omitempty"`
	// Cards holds the value of the cards edge.
	Cards []*Card `json:"cards,omitempty"`
	// contains filtered or unexported fields
}

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

func (AccountEdges) BranchOrErr

func (e AccountEdges) BranchOrErr() (*Branch, error)

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

func (AccountEdges) CardsOrErr

func (e AccountEdges) CardsOrErr() ([]*Card, error)

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

func (AccountEdges) OwnersOrErr

func (e AccountEdges) OwnersOrErr() ([]*Entity, error)

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

func (AccountEdges) PreferencesOrErr

func (e AccountEdges) PreferencesOrErr() ([]*Preference, error)

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

func (AccountEdges) ProductOrErr

func (e AccountEdges) ProductOrErr() (*Product, error)

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

func (AccountEdges) RoutingnumbersOrErr

func (e AccountEdges) RoutingnumbersOrErr() ([]*RoutingNumber, error)

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

func (AccountEdges) TransactionsOrErr

func (e AccountEdges) TransactionsOrErr() ([]*Transaction, error)

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

type AccountGroupBy

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

AccountGroupBy is the group-by builder for Account entities.

func (*AccountGroupBy) Aggregate

func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy

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

func (*AccountGroupBy) Bool

func (agb *AccountGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) BoolX

func (agb *AccountGroupBy) BoolX(ctx context.Context) bool

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

func (*AccountGroupBy) Bools

func (agb *AccountGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) BoolsX

func (agb *AccountGroupBy) BoolsX(ctx context.Context) []bool

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

func (*AccountGroupBy) Float64

func (agb *AccountGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) Float64X

func (agb *AccountGroupBy) Float64X(ctx context.Context) float64

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

func (*AccountGroupBy) Float64s

func (agb *AccountGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) Float64sX

func (agb *AccountGroupBy) Float64sX(ctx context.Context) []float64

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

func (*AccountGroupBy) Int

func (agb *AccountGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) IntX

func (agb *AccountGroupBy) IntX(ctx context.Context) int

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

func (*AccountGroupBy) Ints

func (agb *AccountGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) IntsX

func (agb *AccountGroupBy) IntsX(ctx context.Context) []int

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

func (*AccountGroupBy) Scan

func (agb *AccountGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*AccountGroupBy) ScanX

func (agb *AccountGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*AccountGroupBy) String

func (agb *AccountGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) StringX

func (agb *AccountGroupBy) StringX(ctx context.Context) string

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

func (*AccountGroupBy) Strings

func (agb *AccountGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*AccountGroupBy) StringsX

func (agb *AccountGroupBy) StringsX(ctx context.Context) []string

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

type AccountMutation

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

AccountMutation represents an operation that mutates the Account nodes in the graph.

func (*AccountMutation) AddAvailableBalance

func (m *AccountMutation) AddAvailableBalance(f float32)

AddAvailableBalance adds f to the "availableBalance" field.

func (*AccountMutation) AddCardIDs

func (m *AccountMutation) AddCardIDs(ids ...int)

AddCardIDs adds the "cards" edge to the Card entity by ids.

func (*AccountMutation) AddCurrentBalance

func (m *AccountMutation) AddCurrentBalance(f float32)

AddCurrentBalance adds f to the "currentBalance" field.

func (*AccountMutation) AddField

func (m *AccountMutation) 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 (*AccountMutation) AddOwnerIDs

func (m *AccountMutation) AddOwnerIDs(ids ...uuid.UUID)

AddOwnerIDs adds the "owners" edge to the Entity entity by ids.

func (*AccountMutation) AddPreferenceIDs

func (m *AccountMutation) AddPreferenceIDs(ids ...int)

AddPreferenceIDs adds the "preferences" edge to the Preference entity by ids.

func (*AccountMutation) AddRoutingnumberIDs

func (m *AccountMutation) AddRoutingnumberIDs(ids ...int)

AddRoutingnumberIDs adds the "routingnumbers" edge to the RoutingNumber entity by ids.

func (*AccountMutation) AddTransactionIDs

func (m *AccountMutation) AddTransactionIDs(ids ...uuid.UUID)

AddTransactionIDs adds the "transactions" edge to the Transaction entity by ids.

func (*AccountMutation) AddedAvailableBalance

func (m *AccountMutation) AddedAvailableBalance() (r float32, exists bool)

AddedAvailableBalance returns the value that was added to the "availableBalance" field in this mutation.

func (*AccountMutation) AddedCurrentBalance

func (m *AccountMutation) AddedCurrentBalance() (r float32, exists bool)

AddedCurrentBalance returns the value that was added to the "currentBalance" field in this mutation.

func (*AccountMutation) AddedEdges

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

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

func (*AccountMutation) AddedField

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

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

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

func (*AccountMutation) AddedIDs

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

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

func (*AccountMutation) AvailableBalance

func (m *AccountMutation) AvailableBalance() (r float32, exists bool)

AvailableBalance returns the value of the "availableBalance" field in the mutation.

func (*AccountMutation) BranchCleared

func (m *AccountMutation) BranchCleared() bool

BranchCleared returns if the "branch" edge to the Branch entity was cleared.

func (*AccountMutation) BranchID

func (m *AccountMutation) BranchID() (id int, exists bool)

BranchID returns the "branch" edge ID in the mutation.

func (*AccountMutation) BranchIDs

func (m *AccountMutation) BranchIDs() (ids []int)

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

func (*AccountMutation) CardsCleared

func (m *AccountMutation) CardsCleared() bool

CardsCleared returns if the "cards" edge to the Card entity was cleared.

func (*AccountMutation) CardsIDs

func (m *AccountMutation) CardsIDs() (ids []int)

CardsIDs returns the "cards" edge IDs in the mutation.

func (*AccountMutation) ClearBranch

func (m *AccountMutation) ClearBranch()

ClearBranch clears the "branch" edge to the Branch entity.

func (*AccountMutation) ClearCards

func (m *AccountMutation) ClearCards()

ClearCards clears the "cards" edge to the Card entity.

func (*AccountMutation) ClearDateClosed

func (m *AccountMutation) ClearDateClosed()

ClearDateClosed clears the value of the "dateClosed" field.

func (*AccountMutation) ClearEdge

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

func (m *AccountMutation) 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 (*AccountMutation) ClearOwners

func (m *AccountMutation) ClearOwners()

ClearOwners clears the "owners" edge to the Entity entity.

func (*AccountMutation) ClearParentId

func (m *AccountMutation) ClearParentId()

ClearParentId clears the value of the "parentId" field.

func (*AccountMutation) ClearPreferences

func (m *AccountMutation) ClearPreferences()

ClearPreferences clears the "preferences" edge to the Preference entity.

func (*AccountMutation) ClearProduct

func (m *AccountMutation) ClearProduct()

ClearProduct clears the "product" edge to the Product entity.

func (*AccountMutation) ClearRoutingnumbers

func (m *AccountMutation) ClearRoutingnumbers()

ClearRoutingnumbers clears the "routingnumbers" edge to the RoutingNumber entity.

func (*AccountMutation) ClearTransactions

func (m *AccountMutation) ClearTransactions()

ClearTransactions clears the "transactions" edge to the Transaction entity.

func (*AccountMutation) ClearURL

func (m *AccountMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*AccountMutation) ClearedEdges

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

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

func (*AccountMutation) ClearedFields

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

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

func (AccountMutation) Client

func (m AccountMutation) 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 (*AccountMutation) CurrencyCode

func (m *AccountMutation) CurrencyCode() (r string, exists bool)

CurrencyCode returns the value of the "currencyCode" field in the mutation.

func (*AccountMutation) CurrentBalance

func (m *AccountMutation) CurrentBalance() (r float32, exists bool)

CurrentBalance returns the value of the "currentBalance" field in the mutation.

func (*AccountMutation) DateClosed

func (m *AccountMutation) DateClosed() (r time.Time, exists bool)

DateClosed returns the value of the "dateClosed" field in the mutation.

func (*AccountMutation) DateClosedCleared

func (m *AccountMutation) DateClosedCleared() bool

DateClosedCleared returns if the "dateClosed" field was cleared in this mutation.

func (*AccountMutation) DateCreated

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

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

func (*AccountMutation) DateLastUpdated

func (m *AccountMutation) DateLastUpdated() (r time.Time, exists bool)

DateLastUpdated returns the value of the "dateLastUpdated" field in the mutation.

func (*AccountMutation) DateOpened

func (m *AccountMutation) DateOpened() (r time.Time, exists bool)

DateOpened returns the value of the "dateOpened" field in the mutation.

func (*AccountMutation) EdgeCleared

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

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

func (*AccountMutation) Field

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

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

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

func (*AccountMutation) Fields

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

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

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

func (*AccountMutation) ID

func (m *AccountMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*AccountMutation) InterestReporting

func (m *AccountMutation) InterestReporting() (r bool, exists bool)

InterestReporting returns the value of the "interestReporting" field in the mutation.

func (*AccountMutation) Name

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

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

func (*AccountMutation) Number

func (m *AccountMutation) Number() (r string, exists bool)

Number returns the value of the "number" field in the mutation.

func (*AccountMutation) OldAvailableBalance

func (m *AccountMutation) OldAvailableBalance(ctx context.Context) (v float32, err error)

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

func (*AccountMutation) OldCurrencyCode

func (m *AccountMutation) OldCurrencyCode(ctx context.Context) (v string, err error)

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

func (*AccountMutation) OldCurrentBalance

func (m *AccountMutation) OldCurrentBalance(ctx context.Context) (v float32, err error)

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

func (*AccountMutation) OldDateClosed

func (m *AccountMutation) OldDateClosed(ctx context.Context) (v time.Time, err error)

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

func (*AccountMutation) OldDateCreated

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

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

func (*AccountMutation) OldDateLastUpdated

func (m *AccountMutation) OldDateLastUpdated(ctx context.Context) (v time.Time, err error)

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

func (*AccountMutation) OldDateOpened

func (m *AccountMutation) OldDateOpened(ctx context.Context) (v time.Time, err error)

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

func (*AccountMutation) OldField

func (m *AccountMutation) 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 (*AccountMutation) OldInterestReporting

func (m *AccountMutation) OldInterestReporting(ctx context.Context) (v bool, err error)

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

func (*AccountMutation) OldName

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

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

func (*AccountMutation) OldNumber

func (m *AccountMutation) OldNumber(ctx context.Context) (v string, err error)

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

func (*AccountMutation) OldParentId

func (m *AccountMutation) OldParentId(ctx context.Context) (v uuid.UUID, err error)

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

func (*AccountMutation) OldSource

func (m *AccountMutation) OldSource(ctx context.Context) (v string, err error)

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

func (*AccountMutation) OldStatus

func (m *AccountMutation) OldStatus(ctx context.Context) (v account.Status, err error)

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

func (*AccountMutation) OldTitle

func (m *AccountMutation) OldTitle(ctx context.Context) (v string, err error)

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

func (*AccountMutation) OldType

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

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

func (*AccountMutation) OldURL

func (m *AccountMutation) OldURL(ctx context.Context) (v string, err error)

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

func (*AccountMutation) Op

func (m *AccountMutation) Op() Op

Op returns the operation name.

func (*AccountMutation) OwnersCleared

func (m *AccountMutation) OwnersCleared() bool

OwnersCleared returns if the "owners" edge to the Entity entity was cleared.

func (*AccountMutation) OwnersIDs

func (m *AccountMutation) OwnersIDs() (ids []uuid.UUID)

OwnersIDs returns the "owners" edge IDs in the mutation.

func (*AccountMutation) ParentId

func (m *AccountMutation) ParentId() (r uuid.UUID, exists bool)

ParentId returns the value of the "parentId" field in the mutation.

func (*AccountMutation) ParentIdCleared

func (m *AccountMutation) ParentIdCleared() bool

ParentIdCleared returns if the "parentId" field was cleared in this mutation.

func (*AccountMutation) PreferencesCleared

func (m *AccountMutation) PreferencesCleared() bool

PreferencesCleared returns if the "preferences" edge to the Preference entity was cleared.

func (*AccountMutation) PreferencesIDs

func (m *AccountMutation) PreferencesIDs() (ids []int)

PreferencesIDs returns the "preferences" edge IDs in the mutation.

func (*AccountMutation) ProductCleared

func (m *AccountMutation) ProductCleared() bool

ProductCleared returns if the "product" edge to the Product entity was cleared.

func (*AccountMutation) ProductID

func (m *AccountMutation) ProductID() (id int, exists bool)

ProductID returns the "product" edge ID in the mutation.

func (*AccountMutation) ProductIDs

func (m *AccountMutation) ProductIDs() (ids []int)

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

func (*AccountMutation) RemoveCardIDs

func (m *AccountMutation) RemoveCardIDs(ids ...int)

RemoveCardIDs removes the "cards" edge to the Card entity by IDs.

func (*AccountMutation) RemoveOwnerIDs

func (m *AccountMutation) RemoveOwnerIDs(ids ...uuid.UUID)

RemoveOwnerIDs removes the "owners" edge to the Entity entity by IDs.

func (*AccountMutation) RemovePreferenceIDs

func (m *AccountMutation) RemovePreferenceIDs(ids ...int)

RemovePreferenceIDs removes the "preferences" edge to the Preference entity by IDs.

func (*AccountMutation) RemoveRoutingnumberIDs

func (m *AccountMutation) RemoveRoutingnumberIDs(ids ...int)

RemoveRoutingnumberIDs removes the "routingnumbers" edge to the RoutingNumber entity by IDs.

func (*AccountMutation) RemoveTransactionIDs

func (m *AccountMutation) RemoveTransactionIDs(ids ...uuid.UUID)

RemoveTransactionIDs removes the "transactions" edge to the Transaction entity by IDs.

func (*AccountMutation) RemovedCardsIDs

func (m *AccountMutation) RemovedCardsIDs() (ids []int)

RemovedCards returns the removed IDs of the "cards" edge to the Card entity.

func (*AccountMutation) RemovedEdges

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

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

func (*AccountMutation) RemovedIDs

func (m *AccountMutation) 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 (*AccountMutation) RemovedOwnersIDs

func (m *AccountMutation) RemovedOwnersIDs() (ids []uuid.UUID)

RemovedOwners returns the removed IDs of the "owners" edge to the Entity entity.

func (*AccountMutation) RemovedPreferencesIDs

func (m *AccountMutation) RemovedPreferencesIDs() (ids []int)

RemovedPreferences returns the removed IDs of the "preferences" edge to the Preference entity.

func (*AccountMutation) RemovedRoutingnumbersIDs

func (m *AccountMutation) RemovedRoutingnumbersIDs() (ids []int)

RemovedRoutingnumbers returns the removed IDs of the "routingnumbers" edge to the RoutingNumber entity.

func (*AccountMutation) RemovedTransactionsIDs

func (m *AccountMutation) RemovedTransactionsIDs() (ids []uuid.UUID)

RemovedTransactions returns the removed IDs of the "transactions" edge to the Transaction entity.

func (*AccountMutation) ResetAvailableBalance

func (m *AccountMutation) ResetAvailableBalance()

ResetAvailableBalance resets all changes to the "availableBalance" field.

func (*AccountMutation) ResetBranch

func (m *AccountMutation) ResetBranch()

ResetBranch resets all changes to the "branch" edge.

func (*AccountMutation) ResetCards

func (m *AccountMutation) ResetCards()

ResetCards resets all changes to the "cards" edge.

func (*AccountMutation) ResetCurrencyCode

func (m *AccountMutation) ResetCurrencyCode()

ResetCurrencyCode resets all changes to the "currencyCode" field.

func (*AccountMutation) ResetCurrentBalance

func (m *AccountMutation) ResetCurrentBalance()

ResetCurrentBalance resets all changes to the "currentBalance" field.

func (*AccountMutation) ResetDateClosed

func (m *AccountMutation) ResetDateClosed()

ResetDateClosed resets all changes to the "dateClosed" field.

func (*AccountMutation) ResetDateCreated

func (m *AccountMutation) ResetDateCreated()

ResetDateCreated resets all changes to the "dateCreated" field.

func (*AccountMutation) ResetDateLastUpdated

func (m *AccountMutation) ResetDateLastUpdated()

ResetDateLastUpdated resets all changes to the "dateLastUpdated" field.

func (*AccountMutation) ResetDateOpened

func (m *AccountMutation) ResetDateOpened()

ResetDateOpened resets all changes to the "dateOpened" field.

func (*AccountMutation) ResetEdge

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

func (m *AccountMutation) 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 (*AccountMutation) ResetInterestReporting

func (m *AccountMutation) ResetInterestReporting()

ResetInterestReporting resets all changes to the "interestReporting" field.

func (*AccountMutation) ResetName

func (m *AccountMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AccountMutation) ResetNumber

func (m *AccountMutation) ResetNumber()

ResetNumber resets all changes to the "number" field.

func (*AccountMutation) ResetOwners

func (m *AccountMutation) ResetOwners()

ResetOwners resets all changes to the "owners" edge.

func (*AccountMutation) ResetParentId

func (m *AccountMutation) ResetParentId()

ResetParentId resets all changes to the "parentId" field.

func (*AccountMutation) ResetPreferences

func (m *AccountMutation) ResetPreferences()

ResetPreferences resets all changes to the "preferences" edge.

func (*AccountMutation) ResetProduct

func (m *AccountMutation) ResetProduct()

ResetProduct resets all changes to the "product" edge.

func (*AccountMutation) ResetRoutingnumbers

func (m *AccountMutation) ResetRoutingnumbers()

ResetRoutingnumbers resets all changes to the "routingnumbers" edge.

func (*AccountMutation) ResetSource

func (m *AccountMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*AccountMutation) ResetStatus

func (m *AccountMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*AccountMutation) ResetTitle

func (m *AccountMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*AccountMutation) ResetTransactions

func (m *AccountMutation) ResetTransactions()

ResetTransactions resets all changes to the "transactions" edge.

func (*AccountMutation) ResetType

func (m *AccountMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*AccountMutation) ResetURL

func (m *AccountMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*AccountMutation) RoutingnumbersCleared

func (m *AccountMutation) RoutingnumbersCleared() bool

RoutingnumbersCleared returns if the "routingnumbers" edge to the RoutingNumber entity was cleared.

func (*AccountMutation) RoutingnumbersIDs

func (m *AccountMutation) RoutingnumbersIDs() (ids []int)

RoutingnumbersIDs returns the "routingnumbers" edge IDs in the mutation.

func (*AccountMutation) SetAvailableBalance

func (m *AccountMutation) SetAvailableBalance(f float32)

SetAvailableBalance sets the "availableBalance" field.

func (*AccountMutation) SetBranchID

func (m *AccountMutation) SetBranchID(id int)

SetBranchID sets the "branch" edge to the Branch entity by id.

func (*AccountMutation) SetCurrencyCode

func (m *AccountMutation) SetCurrencyCode(s string)

SetCurrencyCode sets the "currencyCode" field.

func (*AccountMutation) SetCurrentBalance

func (m *AccountMutation) SetCurrentBalance(f float32)

SetCurrentBalance sets the "currentBalance" field.

func (*AccountMutation) SetDateClosed

func (m *AccountMutation) SetDateClosed(t time.Time)

SetDateClosed sets the "dateClosed" field.

func (*AccountMutation) SetDateCreated

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

SetDateCreated sets the "dateCreated" field.

func (*AccountMutation) SetDateLastUpdated

func (m *AccountMutation) SetDateLastUpdated(t time.Time)

SetDateLastUpdated sets the "dateLastUpdated" field.

func (*AccountMutation) SetDateOpened

func (m *AccountMutation) SetDateOpened(t time.Time)

SetDateOpened sets the "dateOpened" field.

func (*AccountMutation) SetField

func (m *AccountMutation) 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 (*AccountMutation) SetID

func (m *AccountMutation) SetID(id uuid.UUID)

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

func (*AccountMutation) SetInterestReporting

func (m *AccountMutation) SetInterestReporting(b bool)

SetInterestReporting sets the "interestReporting" field.

func (*AccountMutation) SetName

func (m *AccountMutation) SetName(s string)

SetName sets the "name" field.

func (*AccountMutation) SetNumber

func (m *AccountMutation) SetNumber(s string)

SetNumber sets the "number" field.

func (*AccountMutation) SetParentId

func (m *AccountMutation) SetParentId(u uuid.UUID)

SetParentId sets the "parentId" field.

func (*AccountMutation) SetProductID

func (m *AccountMutation) SetProductID(id int)

SetProductID sets the "product" edge to the Product entity by id.

func (*AccountMutation) SetSource

func (m *AccountMutation) SetSource(s string)

SetSource sets the "source" field.

func (*AccountMutation) SetStatus

func (m *AccountMutation) SetStatus(a account.Status)

SetStatus sets the "status" field.

func (*AccountMutation) SetTitle

func (m *AccountMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*AccountMutation) SetType

func (m *AccountMutation) SetType(s string)

SetType sets the "type" field.

func (*AccountMutation) SetURL

func (m *AccountMutation) SetURL(s string)

SetURL sets the "url" field.

func (*AccountMutation) Source

func (m *AccountMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*AccountMutation) Status

func (m *AccountMutation) Status() (r account.Status, exists bool)

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

func (*AccountMutation) Title

func (m *AccountMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (*AccountMutation) TransactionsCleared

func (m *AccountMutation) TransactionsCleared() bool

TransactionsCleared returns if the "transactions" edge to the Transaction entity was cleared.

func (*AccountMutation) TransactionsIDs

func (m *AccountMutation) TransactionsIDs() (ids []uuid.UUID)

TransactionsIDs returns the "transactions" edge IDs in the mutation.

func (AccountMutation) Tx

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

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

func (*AccountMutation) Type

func (m *AccountMutation) Type() string

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

func (*AccountMutation) URL

func (m *AccountMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*AccountMutation) URLCleared

func (m *AccountMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

type AccountQuery

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

AccountQuery is the builder for querying Account entities.

func (*AccountQuery) All

func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)

All executes the query and returns a list of Accounts.

func (*AccountQuery) AllX

func (aq *AccountQuery) AllX(ctx context.Context) []*Account

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

func (*AccountQuery) Clone

func (aq *AccountQuery) Clone() *AccountQuery

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

func (*AccountQuery) Count

func (aq *AccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AccountQuery) CountX

func (aq *AccountQuery) CountX(ctx context.Context) int

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

func (*AccountQuery) Exist

func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)

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

func (*AccountQuery) ExistX

func (aq *AccountQuery) ExistX(ctx context.Context) bool

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

func (*AccountQuery) First

func (aq *AccountQuery) First(ctx context.Context) (*Account, error)

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

func (*AccountQuery) FirstID

func (aq *AccountQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AccountQuery) FirstIDX

func (aq *AccountQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*AccountQuery) FirstX

func (aq *AccountQuery) FirstX(ctx context.Context) *Account

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

func (*AccountQuery) GroupBy

func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy

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 {
	Type string `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Account.Query().
	GroupBy(account.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AccountQuery) IDs

func (aq *AccountQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*AccountQuery) IDsX

func (aq *AccountQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*AccountQuery) Limit

func (aq *AccountQuery) Limit(limit int) *AccountQuery

Limit adds a limit step to the query.

func (*AccountQuery) Offset

func (aq *AccountQuery) Offset(offset int) *AccountQuery

Offset adds an offset step to the query.

func (*AccountQuery) Only

func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)

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

func (*AccountQuery) OnlyID

func (aq *AccountQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AccountQuery) OnlyIDX

func (aq *AccountQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*AccountQuery) OnlyX

func (aq *AccountQuery) OnlyX(ctx context.Context) *Account

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

func (*AccountQuery) Order

func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery

Order adds an order step to the query.

func (*AccountQuery) QueryBranch

func (aq *AccountQuery) QueryBranch() *BranchQuery

QueryBranch chains the current query on the "branch" edge.

func (*AccountQuery) QueryCards

func (aq *AccountQuery) QueryCards() *CardQuery

QueryCards chains the current query on the "cards" edge.

func (*AccountQuery) QueryOwners

func (aq *AccountQuery) QueryOwners() *EntityQuery

QueryOwners chains the current query on the "owners" edge.

func (*AccountQuery) QueryPreferences

func (aq *AccountQuery) QueryPreferences() *PreferenceQuery

QueryPreferences chains the current query on the "preferences" edge.

func (*AccountQuery) QueryProduct

func (aq *AccountQuery) QueryProduct() *ProductQuery

QueryProduct chains the current query on the "product" edge.

func (*AccountQuery) QueryRoutingnumbers

func (aq *AccountQuery) QueryRoutingnumbers() *RoutingNumberQuery

QueryRoutingnumbers chains the current query on the "routingnumbers" edge.

func (*AccountQuery) QueryTransactions

func (aq *AccountQuery) QueryTransactions() *TransactionQuery

QueryTransactions chains the current query on the "transactions" edge.

func (*AccountQuery) Select

func (aq *AccountQuery) Select(field string, fields ...string) *AccountSelect

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 {
	Type string `json:"type,omitempty"`
}

client.Account.Query().
	Select(account.FieldType).
	Scan(ctx, &v)

func (*AccountQuery) Where

func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery

Where adds a new predicate for the AccountQuery builder.

func (*AccountQuery) WithBranch

func (aq *AccountQuery) WithBranch(opts ...func(*BranchQuery)) *AccountQuery

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

func (*AccountQuery) WithCards

func (aq *AccountQuery) WithCards(opts ...func(*CardQuery)) *AccountQuery

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

func (*AccountQuery) WithOwners

func (aq *AccountQuery) WithOwners(opts ...func(*EntityQuery)) *AccountQuery

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

func (*AccountQuery) WithPreferences

func (aq *AccountQuery) WithPreferences(opts ...func(*PreferenceQuery)) *AccountQuery

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

func (*AccountQuery) WithProduct

func (aq *AccountQuery) WithProduct(opts ...func(*ProductQuery)) *AccountQuery

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

func (*AccountQuery) WithRoutingnumbers

func (aq *AccountQuery) WithRoutingnumbers(opts ...func(*RoutingNumberQuery)) *AccountQuery

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

func (*AccountQuery) WithTransactions

func (aq *AccountQuery) WithTransactions(opts ...func(*TransactionQuery)) *AccountQuery

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

type AccountSelect

type AccountSelect struct {
	*AccountQuery
	// contains filtered or unexported fields
}

AccountSelect is the builder for selecting fields of Account entities.

func (*AccountSelect) Bool

func (as *AccountSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*AccountSelect) BoolX

func (as *AccountSelect) BoolX(ctx context.Context) bool

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

func (*AccountSelect) Bools

func (as *AccountSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*AccountSelect) BoolsX

func (as *AccountSelect) BoolsX(ctx context.Context) []bool

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

func (*AccountSelect) Float64

func (as *AccountSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*AccountSelect) Float64X

func (as *AccountSelect) Float64X(ctx context.Context) float64

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

func (*AccountSelect) Float64s

func (as *AccountSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*AccountSelect) Float64sX

func (as *AccountSelect) Float64sX(ctx context.Context) []float64

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

func (*AccountSelect) Int

func (as *AccountSelect) Int(ctx context.Context) (_ int, err error)

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

func (*AccountSelect) IntX

func (as *AccountSelect) IntX(ctx context.Context) int

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

func (*AccountSelect) Ints

func (as *AccountSelect) Ints(ctx context.Context) ([]int, error)

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

func (*AccountSelect) IntsX

func (as *AccountSelect) IntsX(ctx context.Context) []int

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

func (*AccountSelect) Scan

func (as *AccountSelect) Scan(ctx context.Context, v interface{}) error

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

func (*AccountSelect) ScanX

func (as *AccountSelect) ScanX(ctx context.Context, v interface{})

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

func (*AccountSelect) String

func (as *AccountSelect) String(ctx context.Context) (_ string, err error)

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

func (*AccountSelect) StringX

func (as *AccountSelect) StringX(ctx context.Context) string

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

func (*AccountSelect) Strings

func (as *AccountSelect) Strings(ctx context.Context) ([]string, error)

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

func (*AccountSelect) StringsX

func (as *AccountSelect) StringsX(ctx context.Context) []string

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

type AccountUpdate

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

AccountUpdate is the builder for updating Account entities.

func (*AccountUpdate) AddAvailableBalance

func (au *AccountUpdate) AddAvailableBalance(f float32) *AccountUpdate

AddAvailableBalance adds f to the "availableBalance" field.

func (*AccountUpdate) AddCardIDs

func (au *AccountUpdate) AddCardIDs(ids ...int) *AccountUpdate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*AccountUpdate) AddCards

func (au *AccountUpdate) AddCards(c ...*Card) *AccountUpdate

AddCards adds the "cards" edges to the Card entity.

func (*AccountUpdate) AddCurrentBalance

func (au *AccountUpdate) AddCurrentBalance(f float32) *AccountUpdate

AddCurrentBalance adds f to the "currentBalance" field.

func (*AccountUpdate) AddOwnerIDs

func (au *AccountUpdate) AddOwnerIDs(ids ...uuid.UUID) *AccountUpdate

AddOwnerIDs adds the "owners" edge to the Entity entity by IDs.

func (*AccountUpdate) AddOwners

func (au *AccountUpdate) AddOwners(e ...*Entity) *AccountUpdate

AddOwners adds the "owners" edges to the Entity entity.

func (*AccountUpdate) AddPreferenceIDs

func (au *AccountUpdate) AddPreferenceIDs(ids ...int) *AccountUpdate

AddPreferenceIDs adds the "preferences" edge to the Preference entity by IDs.

func (*AccountUpdate) AddPreferences

func (au *AccountUpdate) AddPreferences(p ...*Preference) *AccountUpdate

AddPreferences adds the "preferences" edges to the Preference entity.

func (*AccountUpdate) AddRoutingnumberIDs

func (au *AccountUpdate) AddRoutingnumberIDs(ids ...int) *AccountUpdate

AddRoutingnumberIDs adds the "routingnumbers" edge to the RoutingNumber entity by IDs.

func (*AccountUpdate) AddRoutingnumbers

func (au *AccountUpdate) AddRoutingnumbers(r ...*RoutingNumber) *AccountUpdate

AddRoutingnumbers adds the "routingnumbers" edges to the RoutingNumber entity.

func (*AccountUpdate) AddTransactionIDs

func (au *AccountUpdate) AddTransactionIDs(ids ...uuid.UUID) *AccountUpdate

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*AccountUpdate) AddTransactions

func (au *AccountUpdate) AddTransactions(t ...*Transaction) *AccountUpdate

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*AccountUpdate) ClearBranch

func (au *AccountUpdate) ClearBranch() *AccountUpdate

ClearBranch clears the "branch" edge to the Branch entity.

func (*AccountUpdate) ClearCards

func (au *AccountUpdate) ClearCards() *AccountUpdate

ClearCards clears all "cards" edges to the Card entity.

func (*AccountUpdate) ClearDateClosed

func (au *AccountUpdate) ClearDateClosed() *AccountUpdate

ClearDateClosed clears the value of the "dateClosed" field.

func (*AccountUpdate) ClearOwners

func (au *AccountUpdate) ClearOwners() *AccountUpdate

ClearOwners clears all "owners" edges to the Entity entity.

func (*AccountUpdate) ClearParentId

func (au *AccountUpdate) ClearParentId() *AccountUpdate

ClearParentId clears the value of the "parentId" field.

func (*AccountUpdate) ClearPreferences

func (au *AccountUpdate) ClearPreferences() *AccountUpdate

ClearPreferences clears all "preferences" edges to the Preference entity.

func (*AccountUpdate) ClearProduct

func (au *AccountUpdate) ClearProduct() *AccountUpdate

ClearProduct clears the "product" edge to the Product entity.

func (*AccountUpdate) ClearRoutingnumbers

func (au *AccountUpdate) ClearRoutingnumbers() *AccountUpdate

ClearRoutingnumbers clears all "routingnumbers" edges to the RoutingNumber entity.

func (*AccountUpdate) ClearTransactions

func (au *AccountUpdate) ClearTransactions() *AccountUpdate

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*AccountUpdate) ClearURL

func (au *AccountUpdate) ClearURL() *AccountUpdate

ClearURL clears the value of the "url" field.

func (*AccountUpdate) Exec

func (au *AccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountUpdate) ExecX

func (au *AccountUpdate) ExecX(ctx context.Context)

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

func (*AccountUpdate) Mutation

func (au *AccountUpdate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdate) RemoveCardIDs

func (au *AccountUpdate) RemoveCardIDs(ids ...int) *AccountUpdate

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*AccountUpdate) RemoveCards

func (au *AccountUpdate) RemoveCards(c ...*Card) *AccountUpdate

RemoveCards removes "cards" edges to Card entities.

func (*AccountUpdate) RemoveOwnerIDs

func (au *AccountUpdate) RemoveOwnerIDs(ids ...uuid.UUID) *AccountUpdate

RemoveOwnerIDs removes the "owners" edge to Entity entities by IDs.

func (*AccountUpdate) RemoveOwners

func (au *AccountUpdate) RemoveOwners(e ...*Entity) *AccountUpdate

RemoveOwners removes "owners" edges to Entity entities.

func (*AccountUpdate) RemovePreferenceIDs

func (au *AccountUpdate) RemovePreferenceIDs(ids ...int) *AccountUpdate

RemovePreferenceIDs removes the "preferences" edge to Preference entities by IDs.

func (*AccountUpdate) RemovePreferences

func (au *AccountUpdate) RemovePreferences(p ...*Preference) *AccountUpdate

RemovePreferences removes "preferences" edges to Preference entities.

func (*AccountUpdate) RemoveRoutingnumberIDs

func (au *AccountUpdate) RemoveRoutingnumberIDs(ids ...int) *AccountUpdate

RemoveRoutingnumberIDs removes the "routingnumbers" edge to RoutingNumber entities by IDs.

func (*AccountUpdate) RemoveRoutingnumbers

func (au *AccountUpdate) RemoveRoutingnumbers(r ...*RoutingNumber) *AccountUpdate

RemoveRoutingnumbers removes "routingnumbers" edges to RoutingNumber entities.

func (*AccountUpdate) RemoveTransactionIDs

func (au *AccountUpdate) RemoveTransactionIDs(ids ...uuid.UUID) *AccountUpdate

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*AccountUpdate) RemoveTransactions

func (au *AccountUpdate) RemoveTransactions(t ...*Transaction) *AccountUpdate

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*AccountUpdate) Save

func (au *AccountUpdate) Save(ctx context.Context) (int, error)

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

func (*AccountUpdate) SaveX

func (au *AccountUpdate) SaveX(ctx context.Context) int

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

func (*AccountUpdate) SetAvailableBalance

func (au *AccountUpdate) SetAvailableBalance(f float32) *AccountUpdate

SetAvailableBalance sets the "availableBalance" field.

func (*AccountUpdate) SetBranch

func (au *AccountUpdate) SetBranch(b *Branch) *AccountUpdate

SetBranch sets the "branch" edge to the Branch entity.

func (*AccountUpdate) SetBranchID

func (au *AccountUpdate) SetBranchID(id int) *AccountUpdate

SetBranchID sets the "branch" edge to the Branch entity by ID.

func (*AccountUpdate) SetCurrencyCode

func (au *AccountUpdate) SetCurrencyCode(s string) *AccountUpdate

SetCurrencyCode sets the "currencyCode" field.

func (*AccountUpdate) SetCurrentBalance

func (au *AccountUpdate) SetCurrentBalance(f float32) *AccountUpdate

SetCurrentBalance sets the "currentBalance" field.

func (*AccountUpdate) SetDateClosed

func (au *AccountUpdate) SetDateClosed(t time.Time) *AccountUpdate

SetDateClosed sets the "dateClosed" field.

func (*AccountUpdate) SetDateCreated

func (au *AccountUpdate) SetDateCreated(t time.Time) *AccountUpdate

SetDateCreated sets the "dateCreated" field.

func (*AccountUpdate) SetDateLastUpdated

func (au *AccountUpdate) SetDateLastUpdated(t time.Time) *AccountUpdate

SetDateLastUpdated sets the "dateLastUpdated" field.

func (*AccountUpdate) SetDateOpened

func (au *AccountUpdate) SetDateOpened(t time.Time) *AccountUpdate

SetDateOpened sets the "dateOpened" field.

func (*AccountUpdate) SetInterestReporting

func (au *AccountUpdate) SetInterestReporting(b bool) *AccountUpdate

SetInterestReporting sets the "interestReporting" field.

func (*AccountUpdate) SetName

func (au *AccountUpdate) SetName(s string) *AccountUpdate

SetName sets the "name" field.

func (*AccountUpdate) SetNillableBranchID

func (au *AccountUpdate) SetNillableBranchID(id *int) *AccountUpdate

SetNillableBranchID sets the "branch" edge to the Branch entity by ID if the given value is not nil.

func (*AccountUpdate) SetNillableDateClosed

func (au *AccountUpdate) SetNillableDateClosed(t *time.Time) *AccountUpdate

SetNillableDateClosed sets the "dateClosed" field if the given value is not nil.

func (*AccountUpdate) SetNillableProductID

func (au *AccountUpdate) SetNillableProductID(id *int) *AccountUpdate

SetNillableProductID sets the "product" edge to the Product entity by ID if the given value is not nil.

func (*AccountUpdate) SetNillableURL

func (au *AccountUpdate) SetNillableURL(s *string) *AccountUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*AccountUpdate) SetNumber

func (au *AccountUpdate) SetNumber(s string) *AccountUpdate

SetNumber sets the "number" field.

func (*AccountUpdate) SetParentId

func (au *AccountUpdate) SetParentId(u uuid.UUID) *AccountUpdate

SetParentId sets the "parentId" field.

func (*AccountUpdate) SetProduct

func (au *AccountUpdate) SetProduct(p *Product) *AccountUpdate

SetProduct sets the "product" edge to the Product entity.

func (*AccountUpdate) SetProductID

func (au *AccountUpdate) SetProductID(id int) *AccountUpdate

SetProductID sets the "product" edge to the Product entity by ID.

func (*AccountUpdate) SetSource

func (au *AccountUpdate) SetSource(s string) *AccountUpdate

SetSource sets the "source" field.

func (*AccountUpdate) SetStatus

func (au *AccountUpdate) SetStatus(a account.Status) *AccountUpdate

SetStatus sets the "status" field.

func (*AccountUpdate) SetTitle

func (au *AccountUpdate) SetTitle(s string) *AccountUpdate

SetTitle sets the "title" field.

func (*AccountUpdate) SetType

func (au *AccountUpdate) SetType(s string) *AccountUpdate

SetType sets the "type" field.

func (*AccountUpdate) SetURL

func (au *AccountUpdate) SetURL(s string) *AccountUpdate

SetURL sets the "url" field.

func (*AccountUpdate) Where

func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate

Where adds a new predicate for the AccountUpdate builder.

type AccountUpdateOne

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

AccountUpdateOne is the builder for updating a single Account entity.

func (*AccountUpdateOne) AddAvailableBalance

func (auo *AccountUpdateOne) AddAvailableBalance(f float32) *AccountUpdateOne

AddAvailableBalance adds f to the "availableBalance" field.

func (*AccountUpdateOne) AddCardIDs

func (auo *AccountUpdateOne) AddCardIDs(ids ...int) *AccountUpdateOne

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*AccountUpdateOne) AddCards

func (auo *AccountUpdateOne) AddCards(c ...*Card) *AccountUpdateOne

AddCards adds the "cards" edges to the Card entity.

func (*AccountUpdateOne) AddCurrentBalance

func (auo *AccountUpdateOne) AddCurrentBalance(f float32) *AccountUpdateOne

AddCurrentBalance adds f to the "currentBalance" field.

func (*AccountUpdateOne) AddOwnerIDs

func (auo *AccountUpdateOne) AddOwnerIDs(ids ...uuid.UUID) *AccountUpdateOne

AddOwnerIDs adds the "owners" edge to the Entity entity by IDs.

func (*AccountUpdateOne) AddOwners

func (auo *AccountUpdateOne) AddOwners(e ...*Entity) *AccountUpdateOne

AddOwners adds the "owners" edges to the Entity entity.

func (*AccountUpdateOne) AddPreferenceIDs

func (auo *AccountUpdateOne) AddPreferenceIDs(ids ...int) *AccountUpdateOne

AddPreferenceIDs adds the "preferences" edge to the Preference entity by IDs.

func (*AccountUpdateOne) AddPreferences

func (auo *AccountUpdateOne) AddPreferences(p ...*Preference) *AccountUpdateOne

AddPreferences adds the "preferences" edges to the Preference entity.

func (*AccountUpdateOne) AddRoutingnumberIDs

func (auo *AccountUpdateOne) AddRoutingnumberIDs(ids ...int) *AccountUpdateOne

AddRoutingnumberIDs adds the "routingnumbers" edge to the RoutingNumber entity by IDs.

func (*AccountUpdateOne) AddRoutingnumbers

func (auo *AccountUpdateOne) AddRoutingnumbers(r ...*RoutingNumber) *AccountUpdateOne

AddRoutingnumbers adds the "routingnumbers" edges to the RoutingNumber entity.

func (*AccountUpdateOne) AddTransactionIDs

func (auo *AccountUpdateOne) AddTransactionIDs(ids ...uuid.UUID) *AccountUpdateOne

AddTransactionIDs adds the "transactions" edge to the Transaction entity by IDs.

func (*AccountUpdateOne) AddTransactions

func (auo *AccountUpdateOne) AddTransactions(t ...*Transaction) *AccountUpdateOne

AddTransactions adds the "transactions" edges to the Transaction entity.

func (*AccountUpdateOne) ClearBranch

func (auo *AccountUpdateOne) ClearBranch() *AccountUpdateOne

ClearBranch clears the "branch" edge to the Branch entity.

func (*AccountUpdateOne) ClearCards

func (auo *AccountUpdateOne) ClearCards() *AccountUpdateOne

ClearCards clears all "cards" edges to the Card entity.

func (*AccountUpdateOne) ClearDateClosed

func (auo *AccountUpdateOne) ClearDateClosed() *AccountUpdateOne

ClearDateClosed clears the value of the "dateClosed" field.

func (*AccountUpdateOne) ClearOwners

func (auo *AccountUpdateOne) ClearOwners() *AccountUpdateOne

ClearOwners clears all "owners" edges to the Entity entity.

func (*AccountUpdateOne) ClearParentId

func (auo *AccountUpdateOne) ClearParentId() *AccountUpdateOne

ClearParentId clears the value of the "parentId" field.

func (*AccountUpdateOne) ClearPreferences

func (auo *AccountUpdateOne) ClearPreferences() *AccountUpdateOne

ClearPreferences clears all "preferences" edges to the Preference entity.

func (*AccountUpdateOne) ClearProduct

func (auo *AccountUpdateOne) ClearProduct() *AccountUpdateOne

ClearProduct clears the "product" edge to the Product entity.

func (*AccountUpdateOne) ClearRoutingnumbers

func (auo *AccountUpdateOne) ClearRoutingnumbers() *AccountUpdateOne

ClearRoutingnumbers clears all "routingnumbers" edges to the RoutingNumber entity.

func (*AccountUpdateOne) ClearTransactions

func (auo *AccountUpdateOne) ClearTransactions() *AccountUpdateOne

ClearTransactions clears all "transactions" edges to the Transaction entity.

func (*AccountUpdateOne) ClearURL

func (auo *AccountUpdateOne) ClearURL() *AccountUpdateOne

ClearURL clears the value of the "url" field.

func (*AccountUpdateOne) Exec

func (auo *AccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AccountUpdateOne) ExecX

func (auo *AccountUpdateOne) ExecX(ctx context.Context)

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

func (*AccountUpdateOne) Mutation

func (auo *AccountUpdateOne) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdateOne) RemoveCardIDs

func (auo *AccountUpdateOne) RemoveCardIDs(ids ...int) *AccountUpdateOne

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*AccountUpdateOne) RemoveCards

func (auo *AccountUpdateOne) RemoveCards(c ...*Card) *AccountUpdateOne

RemoveCards removes "cards" edges to Card entities.

func (*AccountUpdateOne) RemoveOwnerIDs

func (auo *AccountUpdateOne) RemoveOwnerIDs(ids ...uuid.UUID) *AccountUpdateOne

RemoveOwnerIDs removes the "owners" edge to Entity entities by IDs.

func (*AccountUpdateOne) RemoveOwners

func (auo *AccountUpdateOne) RemoveOwners(e ...*Entity) *AccountUpdateOne

RemoveOwners removes "owners" edges to Entity entities.

func (*AccountUpdateOne) RemovePreferenceIDs

func (auo *AccountUpdateOne) RemovePreferenceIDs(ids ...int) *AccountUpdateOne

RemovePreferenceIDs removes the "preferences" edge to Preference entities by IDs.

func (*AccountUpdateOne) RemovePreferences

func (auo *AccountUpdateOne) RemovePreferences(p ...*Preference) *AccountUpdateOne

RemovePreferences removes "preferences" edges to Preference entities.

func (*AccountUpdateOne) RemoveRoutingnumberIDs

func (auo *AccountUpdateOne) RemoveRoutingnumberIDs(ids ...int) *AccountUpdateOne

RemoveRoutingnumberIDs removes the "routingnumbers" edge to RoutingNumber entities by IDs.

func (*AccountUpdateOne) RemoveRoutingnumbers

func (auo *AccountUpdateOne) RemoveRoutingnumbers(r ...*RoutingNumber) *AccountUpdateOne

RemoveRoutingnumbers removes "routingnumbers" edges to RoutingNumber entities.

func (*AccountUpdateOne) RemoveTransactionIDs

func (auo *AccountUpdateOne) RemoveTransactionIDs(ids ...uuid.UUID) *AccountUpdateOne

RemoveTransactionIDs removes the "transactions" edge to Transaction entities by IDs.

func (*AccountUpdateOne) RemoveTransactions

func (auo *AccountUpdateOne) RemoveTransactions(t ...*Transaction) *AccountUpdateOne

RemoveTransactions removes "transactions" edges to Transaction entities.

func (*AccountUpdateOne) Save

func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)

Save executes the query and returns the updated Account entity.

func (*AccountUpdateOne) SaveX

func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account

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

func (*AccountUpdateOne) SetAvailableBalance

func (auo *AccountUpdateOne) SetAvailableBalance(f float32) *AccountUpdateOne

SetAvailableBalance sets the "availableBalance" field.

func (*AccountUpdateOne) SetBranch

func (auo *AccountUpdateOne) SetBranch(b *Branch) *AccountUpdateOne

SetBranch sets the "branch" edge to the Branch entity.

func (*AccountUpdateOne) SetBranchID

func (auo *AccountUpdateOne) SetBranchID(id int) *AccountUpdateOne

SetBranchID sets the "branch" edge to the Branch entity by ID.

func (*AccountUpdateOne) SetCurrencyCode

func (auo *AccountUpdateOne) SetCurrencyCode(s string) *AccountUpdateOne

SetCurrencyCode sets the "currencyCode" field.

func (*AccountUpdateOne) SetCurrentBalance

func (auo *AccountUpdateOne) SetCurrentBalance(f float32) *AccountUpdateOne

SetCurrentBalance sets the "currentBalance" field.

func (*AccountUpdateOne) SetDateClosed

func (auo *AccountUpdateOne) SetDateClosed(t time.Time) *AccountUpdateOne

SetDateClosed sets the "dateClosed" field.

func (*AccountUpdateOne) SetDateCreated

func (auo *AccountUpdateOne) SetDateCreated(t time.Time) *AccountUpdateOne

SetDateCreated sets the "dateCreated" field.

func (*AccountUpdateOne) SetDateLastUpdated

func (auo *AccountUpdateOne) SetDateLastUpdated(t time.Time) *AccountUpdateOne

SetDateLastUpdated sets the "dateLastUpdated" field.

func (*AccountUpdateOne) SetDateOpened

func (auo *AccountUpdateOne) SetDateOpened(t time.Time) *AccountUpdateOne

SetDateOpened sets the "dateOpened" field.

func (*AccountUpdateOne) SetInterestReporting

func (auo *AccountUpdateOne) SetInterestReporting(b bool) *AccountUpdateOne

SetInterestReporting sets the "interestReporting" field.

func (*AccountUpdateOne) SetName

func (auo *AccountUpdateOne) SetName(s string) *AccountUpdateOne

SetName sets the "name" field.

func (*AccountUpdateOne) SetNillableBranchID

func (auo *AccountUpdateOne) SetNillableBranchID(id *int) *AccountUpdateOne

SetNillableBranchID sets the "branch" edge to the Branch entity by ID if the given value is not nil.

func (*AccountUpdateOne) SetNillableDateClosed

func (auo *AccountUpdateOne) SetNillableDateClosed(t *time.Time) *AccountUpdateOne

SetNillableDateClosed sets the "dateClosed" field if the given value is not nil.

func (*AccountUpdateOne) SetNillableProductID

func (auo *AccountUpdateOne) SetNillableProductID(id *int) *AccountUpdateOne

SetNillableProductID sets the "product" edge to the Product entity by ID if the given value is not nil.

func (*AccountUpdateOne) SetNillableURL

func (auo *AccountUpdateOne) SetNillableURL(s *string) *AccountUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*AccountUpdateOne) SetNumber

func (auo *AccountUpdateOne) SetNumber(s string) *AccountUpdateOne

SetNumber sets the "number" field.

func (*AccountUpdateOne) SetParentId

func (auo *AccountUpdateOne) SetParentId(u uuid.UUID) *AccountUpdateOne

SetParentId sets the "parentId" field.

func (*AccountUpdateOne) SetProduct

func (auo *AccountUpdateOne) SetProduct(p *Product) *AccountUpdateOne

SetProduct sets the "product" edge to the Product entity.

func (*AccountUpdateOne) SetProductID

func (auo *AccountUpdateOne) SetProductID(id int) *AccountUpdateOne

SetProductID sets the "product" edge to the Product entity by ID.

func (*AccountUpdateOne) SetSource

func (auo *AccountUpdateOne) SetSource(s string) *AccountUpdateOne

SetSource sets the "source" field.

func (*AccountUpdateOne) SetStatus

func (auo *AccountUpdateOne) SetStatus(a account.Status) *AccountUpdateOne

SetStatus sets the "status" field.

func (*AccountUpdateOne) SetTitle

func (auo *AccountUpdateOne) SetTitle(s string) *AccountUpdateOne

SetTitle sets the "title" field.

func (*AccountUpdateOne) SetType

func (auo *AccountUpdateOne) SetType(s string) *AccountUpdateOne

SetType sets the "type" field.

func (*AccountUpdateOne) SetURL

func (auo *AccountUpdateOne) SetURL(s string) *AccountUpdateOne

SetURL sets the "url" field.

type Accounts

type Accounts []*Account

Accounts is a parsable slice of Account.

type AggregateFunc

type AggregateFunc func(*sql.Selector, func(string) bool) 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 Bank

type Bank struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// BankCode holds the value of the "bankCode" field.
	BankCode string `json:"bankCode,omitempty"`
	// BankName holds the value of the "bankName" field.
	BankName string `json:"bankName,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// Swift holds the value of the "swift" field.
	Swift string `json:"swift,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BankQuery when eager-loading is set.
	Edges BankEdges `json:"edges"`
	// contains filtered or unexported fields
}

Bank is the model entity for the Bank schema.

func (*Bank) QueryBranches

func (b *Bank) QueryBranches() *BranchQuery

QueryBranches queries the "branches" edge of the Bank entity.

func (*Bank) String

func (b *Bank) String() string

String implements the fmt.Stringer.

func (*Bank) Unwrap

func (b *Bank) Unwrap() *Bank

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

func (b *Bank) Update() *BankUpdateOne

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

type BankClient

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

BankClient is a client for the Bank schema.

func NewBankClient

func NewBankClient(c config) *BankClient

NewBankClient returns a client for the Bank from the given config.

func (*BankClient) Create

func (c *BankClient) Create() *BankCreate

Create returns a create builder for Bank.

func (*BankClient) CreateBulk

func (c *BankClient) CreateBulk(builders ...*BankCreate) *BankCreateBulk

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

func (*BankClient) Delete

func (c *BankClient) Delete() *BankDelete

Delete returns a delete builder for Bank.

func (*BankClient) DeleteOne

func (c *BankClient) DeleteOne(b *Bank) *BankDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*BankClient) DeleteOneID

func (c *BankClient) DeleteOneID(id int) *BankDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*BankClient) Get

func (c *BankClient) Get(ctx context.Context, id int) (*Bank, error)

Get returns a Bank entity by its id.

func (*BankClient) GetX

func (c *BankClient) GetX(ctx context.Context, id int) *Bank

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

func (*BankClient) Hooks

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

Hooks returns the client hooks.

func (*BankClient) Query

func (c *BankClient) Query() *BankQuery

Query returns a query builder for Bank.

func (*BankClient) QueryBranches

func (c *BankClient) QueryBranches(b *Bank) *BranchQuery

QueryBranches queries the branches edge of a Bank.

func (*BankClient) Update

func (c *BankClient) Update() *BankUpdate

Update returns an update builder for Bank.

func (*BankClient) UpdateOne

func (c *BankClient) UpdateOne(b *Bank) *BankUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BankClient) UpdateOneID

func (c *BankClient) UpdateOneID(id int) *BankUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BankClient) Use

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

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

type BankCreate

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

BankCreate is the builder for creating a Bank entity.

func (*BankCreate) AddBranchIDs

func (bc *BankCreate) AddBranchIDs(ids ...int) *BankCreate

AddBranchIDs adds the "branches" edge to the Branch entity by IDs.

func (*BankCreate) AddBranches

func (bc *BankCreate) AddBranches(b ...*Branch) *BankCreate

AddBranches adds the "branches" edges to the Branch entity.

func (*BankCreate) Mutation

func (bc *BankCreate) Mutation() *BankMutation

Mutation returns the BankMutation object of the builder.

func (*BankCreate) Save

func (bc *BankCreate) Save(ctx context.Context) (*Bank, error)

Save creates the Bank in the database.

func (*BankCreate) SaveX

func (bc *BankCreate) SaveX(ctx context.Context) *Bank

SaveX calls Save and panics if Save returns an error.

func (*BankCreate) SetBankCode

func (bc *BankCreate) SetBankCode(s string) *BankCreate

SetBankCode sets the "bankCode" field.

func (*BankCreate) SetBankName

func (bc *BankCreate) SetBankName(s string) *BankCreate

SetBankName sets the "bankName" field.

func (*BankCreate) SetSwift

func (bc *BankCreate) SetSwift(s string) *BankCreate

SetSwift sets the "swift" field.

func (*BankCreate) SetURL

func (bc *BankCreate) SetURL(s string) *BankCreate

SetURL sets the "url" field.

type BankCreateBulk

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

BankCreateBulk is the builder for creating many Bank entities in bulk.

func (*BankCreateBulk) Save

func (bcb *BankCreateBulk) Save(ctx context.Context) ([]*Bank, error)

Save creates the Bank entities in the database.

func (*BankCreateBulk) SaveX

func (bcb *BankCreateBulk) SaveX(ctx context.Context) []*Bank

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

type BankDelete

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

BankDelete is the builder for deleting a Bank entity.

func (*BankDelete) Exec

func (bd *BankDelete) Exec(ctx context.Context) (int, error)

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

func (*BankDelete) ExecX

func (bd *BankDelete) ExecX(ctx context.Context) int

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

func (*BankDelete) Where

func (bd *BankDelete) Where(ps ...predicate.Bank) *BankDelete

Where adds a new predicate to the BankDelete builder.

type BankDeleteOne

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

BankDeleteOne is the builder for deleting a single Bank entity.

func (*BankDeleteOne) Exec

func (bdo *BankDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BankDeleteOne) ExecX

func (bdo *BankDeleteOne) ExecX(ctx context.Context)

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

type BankEdges

type BankEdges struct {
	// Branches holds the value of the branches edge.
	Branches []*Branch `json:"branches,omitempty"`
	// contains filtered or unexported fields
}

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

func (BankEdges) BranchesOrErr

func (e BankEdges) BranchesOrErr() ([]*Branch, error)

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

type BankGroupBy

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

BankGroupBy is the group-by builder for Bank entities.

func (*BankGroupBy) Aggregate

func (bgb *BankGroupBy) Aggregate(fns ...AggregateFunc) *BankGroupBy

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

func (*BankGroupBy) Bool

func (bgb *BankGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) BoolX

func (bgb *BankGroupBy) BoolX(ctx context.Context) bool

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

func (*BankGroupBy) Bools

func (bgb *BankGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) BoolsX

func (bgb *BankGroupBy) BoolsX(ctx context.Context) []bool

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

func (*BankGroupBy) Float64

func (bgb *BankGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) Float64X

func (bgb *BankGroupBy) Float64X(ctx context.Context) float64

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

func (*BankGroupBy) Float64s

func (bgb *BankGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) Float64sX

func (bgb *BankGroupBy) Float64sX(ctx context.Context) []float64

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

func (*BankGroupBy) Int

func (bgb *BankGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) IntX

func (bgb *BankGroupBy) IntX(ctx context.Context) int

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

func (*BankGroupBy) Ints

func (bgb *BankGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) IntsX

func (bgb *BankGroupBy) IntsX(ctx context.Context) []int

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

func (*BankGroupBy) Scan

func (bgb *BankGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*BankGroupBy) ScanX

func (bgb *BankGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*BankGroupBy) String

func (bgb *BankGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) StringX

func (bgb *BankGroupBy) StringX(ctx context.Context) string

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

func (*BankGroupBy) Strings

func (bgb *BankGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*BankGroupBy) StringsX

func (bgb *BankGroupBy) StringsX(ctx context.Context) []string

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

type BankMutation

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

BankMutation represents an operation that mutates the Bank nodes in the graph.

func (*BankMutation) AddBranchIDs

func (m *BankMutation) AddBranchIDs(ids ...int)

AddBranchIDs adds the "branches" edge to the Branch entity by ids.

func (*BankMutation) AddField

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

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

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

func (*BankMutation) AddedField

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

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

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

func (*BankMutation) AddedIDs

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

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

func (*BankMutation) BankCode

func (m *BankMutation) BankCode() (r string, exists bool)

BankCode returns the value of the "bankCode" field in the mutation.

func (*BankMutation) BankName

func (m *BankMutation) BankName() (r string, exists bool)

BankName returns the value of the "bankName" field in the mutation.

func (*BankMutation) BranchesCleared

func (m *BankMutation) BranchesCleared() bool

BranchesCleared returns if the "branches" edge to the Branch entity was cleared.

func (*BankMutation) BranchesIDs

func (m *BankMutation) BranchesIDs() (ids []int)

BranchesIDs returns the "branches" edge IDs in the mutation.

func (*BankMutation) ClearBranches

func (m *BankMutation) ClearBranches()

ClearBranches clears the "branches" edge to the Branch entity.

func (*BankMutation) ClearEdge

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

func (m *BankMutation) 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 (*BankMutation) ClearedEdges

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

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

func (*BankMutation) ClearedFields

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

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

func (BankMutation) Client

func (m BankMutation) 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 (*BankMutation) EdgeCleared

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

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

func (*BankMutation) Field

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

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

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

func (*BankMutation) Fields

func (m *BankMutation) 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 (*BankMutation) ID

func (m *BankMutation) 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.

func (*BankMutation) OldBankCode

func (m *BankMutation) OldBankCode(ctx context.Context) (v string, err error)

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

func (*BankMutation) OldBankName

func (m *BankMutation) OldBankName(ctx context.Context) (v string, err error)

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

func (*BankMutation) OldField

func (m *BankMutation) 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 (*BankMutation) OldSwift

func (m *BankMutation) OldSwift(ctx context.Context) (v string, err error)

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

func (*BankMutation) OldURL

func (m *BankMutation) OldURL(ctx context.Context) (v string, err error)

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

func (*BankMutation) Op

func (m *BankMutation) Op() Op

Op returns the operation name.

func (*BankMutation) RemoveBranchIDs

func (m *BankMutation) RemoveBranchIDs(ids ...int)

RemoveBranchIDs removes the "branches" edge to the Branch entity by IDs.

func (*BankMutation) RemovedBranchesIDs

func (m *BankMutation) RemovedBranchesIDs() (ids []int)

RemovedBranches returns the removed IDs of the "branches" edge to the Branch entity.

func (*BankMutation) RemovedEdges

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

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

func (*BankMutation) RemovedIDs

func (m *BankMutation) 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 (*BankMutation) ResetBankCode

func (m *BankMutation) ResetBankCode()

ResetBankCode resets all changes to the "bankCode" field.

func (*BankMutation) ResetBankName

func (m *BankMutation) ResetBankName()

ResetBankName resets all changes to the "bankName" field.

func (*BankMutation) ResetBranches

func (m *BankMutation) ResetBranches()

ResetBranches resets all changes to the "branches" edge.

func (*BankMutation) ResetEdge

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

func (m *BankMutation) 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 (*BankMutation) ResetSwift

func (m *BankMutation) ResetSwift()

ResetSwift resets all changes to the "swift" field.

func (*BankMutation) ResetURL

func (m *BankMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*BankMutation) SetBankCode

func (m *BankMutation) SetBankCode(s string)

SetBankCode sets the "bankCode" field.

func (*BankMutation) SetBankName

func (m *BankMutation) SetBankName(s string)

SetBankName sets the "bankName" field.

func (*BankMutation) SetField

func (m *BankMutation) 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 (*BankMutation) SetSwift

func (m *BankMutation) SetSwift(s string)

SetSwift sets the "swift" field.

func (*BankMutation) SetURL

func (m *BankMutation) SetURL(s string)

SetURL sets the "url" field.

func (*BankMutation) Swift

func (m *BankMutation) Swift() (r string, exists bool)

Swift returns the value of the "swift" field in the mutation.

func (BankMutation) Tx

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

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

func (*BankMutation) Type

func (m *BankMutation) Type() string

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

func (*BankMutation) URL

func (m *BankMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

type BankQuery

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

BankQuery is the builder for querying Bank entities.

func (*BankQuery) All

func (bq *BankQuery) All(ctx context.Context) ([]*Bank, error)

All executes the query and returns a list of Banks.

func (*BankQuery) AllX

func (bq *BankQuery) AllX(ctx context.Context) []*Bank

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

func (*BankQuery) Clone

func (bq *BankQuery) Clone() *BankQuery

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

func (*BankQuery) Count

func (bq *BankQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BankQuery) CountX

func (bq *BankQuery) CountX(ctx context.Context) int

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

func (*BankQuery) Exist

func (bq *BankQuery) Exist(ctx context.Context) (bool, error)

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

func (*BankQuery) ExistX

func (bq *BankQuery) ExistX(ctx context.Context) bool

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

func (*BankQuery) First

func (bq *BankQuery) First(ctx context.Context) (*Bank, error)

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

func (*BankQuery) FirstID

func (bq *BankQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*BankQuery) FirstIDX

func (bq *BankQuery) FirstIDX(ctx context.Context) int

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

func (*BankQuery) FirstX

func (bq *BankQuery) FirstX(ctx context.Context) *Bank

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

func (*BankQuery) GroupBy

func (bq *BankQuery) GroupBy(field string, fields ...string) *BankGroupBy

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 {
	BankCode string `json:"bankCode,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Bank.Query().
	GroupBy(bank.FieldBankCode).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BankQuery) IDs

func (bq *BankQuery) IDs(ctx context.Context) ([]int, error)

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

func (*BankQuery) IDsX

func (bq *BankQuery) IDsX(ctx context.Context) []int

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

func (*BankQuery) Limit

func (bq *BankQuery) Limit(limit int) *BankQuery

Limit adds a limit step to the query.

func (*BankQuery) Offset

func (bq *BankQuery) Offset(offset int) *BankQuery

Offset adds an offset step to the query.

func (*BankQuery) Only

func (bq *BankQuery) Only(ctx context.Context) (*Bank, error)

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

func (*BankQuery) OnlyID

func (bq *BankQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*BankQuery) OnlyIDX

func (bq *BankQuery) OnlyIDX(ctx context.Context) int

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

func (*BankQuery) OnlyX

func (bq *BankQuery) OnlyX(ctx context.Context) *Bank

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

func (*BankQuery) Order

func (bq *BankQuery) Order(o ...OrderFunc) *BankQuery

Order adds an order step to the query.

func (*BankQuery) QueryBranches

func (bq *BankQuery) QueryBranches() *BranchQuery

QueryBranches chains the current query on the "branches" edge.

func (*BankQuery) Select

func (bq *BankQuery) Select(field string, fields ...string) *BankSelect

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 {
	BankCode string `json:"bankCode,omitempty"`
}

client.Bank.Query().
	Select(bank.FieldBankCode).
	Scan(ctx, &v)

func (*BankQuery) Where

func (bq *BankQuery) Where(ps ...predicate.Bank) *BankQuery

Where adds a new predicate for the BankQuery builder.

func (*BankQuery) WithBranches

func (bq *BankQuery) WithBranches(opts ...func(*BranchQuery)) *BankQuery

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

type BankSelect

type BankSelect struct {
	*BankQuery
	// contains filtered or unexported fields
}

BankSelect is the builder for selecting fields of Bank entities.

func (*BankSelect) Bool

func (bs *BankSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*BankSelect) BoolX

func (bs *BankSelect) BoolX(ctx context.Context) bool

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

func (*BankSelect) Bools

func (bs *BankSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*BankSelect) BoolsX

func (bs *BankSelect) BoolsX(ctx context.Context) []bool

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

func (*BankSelect) Float64

func (bs *BankSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*BankSelect) Float64X

func (bs *BankSelect) Float64X(ctx context.Context) float64

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

func (*BankSelect) Float64s

func (bs *BankSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*BankSelect) Float64sX

func (bs *BankSelect) Float64sX(ctx context.Context) []float64

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

func (*BankSelect) Int

func (bs *BankSelect) Int(ctx context.Context) (_ int, err error)

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

func (*BankSelect) IntX

func (bs *BankSelect) IntX(ctx context.Context) int

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

func (*BankSelect) Ints

func (bs *BankSelect) Ints(ctx context.Context) ([]int, error)

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

func (*BankSelect) IntsX

func (bs *BankSelect) IntsX(ctx context.Context) []int

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

func (*BankSelect) Scan

func (bs *BankSelect) Scan(ctx context.Context, v interface{}) error

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

func (*BankSelect) ScanX

func (bs *BankSelect) ScanX(ctx context.Context, v interface{})

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

func (*BankSelect) String

func (bs *BankSelect) String(ctx context.Context) (_ string, err error)

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

func (*BankSelect) StringX

func (bs *BankSelect) StringX(ctx context.Context) string

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

func (*BankSelect) Strings

func (bs *BankSelect) Strings(ctx context.Context) ([]string, error)

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

func (*BankSelect) StringsX

func (bs *BankSelect) StringsX(ctx context.Context) []string

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

type BankUpdate

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

BankUpdate is the builder for updating Bank entities.

func (*BankUpdate) AddBranchIDs

func (bu *BankUpdate) AddBranchIDs(ids ...int) *BankUpdate

AddBranchIDs adds the "branches" edge to the Branch entity by IDs.

func (*BankUpdate) AddBranches

func (bu *BankUpdate) AddBranches(b ...*Branch) *BankUpdate

AddBranches adds the "branches" edges to the Branch entity.

func (*BankUpdate) ClearBranches

func (bu *BankUpdate) ClearBranches() *BankUpdate

ClearBranches clears all "branches" edges to the Branch entity.

func (*BankUpdate) Exec

func (bu *BankUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BankUpdate) ExecX

func (bu *BankUpdate) ExecX(ctx context.Context)

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

func (*BankUpdate) Mutation

func (bu *BankUpdate) Mutation() *BankMutation

Mutation returns the BankMutation object of the builder.

func (*BankUpdate) RemoveBranchIDs

func (bu *BankUpdate) RemoveBranchIDs(ids ...int) *BankUpdate

RemoveBranchIDs removes the "branches" edge to Branch entities by IDs.

func (*BankUpdate) RemoveBranches

func (bu *BankUpdate) RemoveBranches(b ...*Branch) *BankUpdate

RemoveBranches removes "branches" edges to Branch entities.

func (*BankUpdate) Save

func (bu *BankUpdate) Save(ctx context.Context) (int, error)

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

func (*BankUpdate) SaveX

func (bu *BankUpdate) SaveX(ctx context.Context) int

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

func (*BankUpdate) SetBankCode

func (bu *BankUpdate) SetBankCode(s string) *BankUpdate

SetBankCode sets the "bankCode" field.

func (*BankUpdate) SetBankName

func (bu *BankUpdate) SetBankName(s string) *BankUpdate

SetBankName sets the "bankName" field.

func (*BankUpdate) SetSwift

func (bu *BankUpdate) SetSwift(s string) *BankUpdate

SetSwift sets the "swift" field.

func (*BankUpdate) SetURL

func (bu *BankUpdate) SetURL(s string) *BankUpdate

SetURL sets the "url" field.

func (*BankUpdate) Where

func (bu *BankUpdate) Where(ps ...predicate.Bank) *BankUpdate

Where adds a new predicate for the BankUpdate builder.

type BankUpdateOne

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

BankUpdateOne is the builder for updating a single Bank entity.

func (*BankUpdateOne) AddBranchIDs

func (buo *BankUpdateOne) AddBranchIDs(ids ...int) *BankUpdateOne

AddBranchIDs adds the "branches" edge to the Branch entity by IDs.

func (*BankUpdateOne) AddBranches

func (buo *BankUpdateOne) AddBranches(b ...*Branch) *BankUpdateOne

AddBranches adds the "branches" edges to the Branch entity.

func (*BankUpdateOne) ClearBranches

func (buo *BankUpdateOne) ClearBranches() *BankUpdateOne

ClearBranches clears all "branches" edges to the Branch entity.

func (*BankUpdateOne) Exec

func (buo *BankUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BankUpdateOne) ExecX

func (buo *BankUpdateOne) ExecX(ctx context.Context)

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

func (*BankUpdateOne) Mutation

func (buo *BankUpdateOne) Mutation() *BankMutation

Mutation returns the BankMutation object of the builder.

func (*BankUpdateOne) RemoveBranchIDs

func (buo *BankUpdateOne) RemoveBranchIDs(ids ...int) *BankUpdateOne

RemoveBranchIDs removes the "branches" edge to Branch entities by IDs.

func (*BankUpdateOne) RemoveBranches

func (buo *BankUpdateOne) RemoveBranches(b ...*Branch) *BankUpdateOne

RemoveBranches removes "branches" edges to Branch entities.

func (*BankUpdateOne) Save

func (buo *BankUpdateOne) Save(ctx context.Context) (*Bank, error)

Save executes the query and returns the updated Bank entity.

func (*BankUpdateOne) SaveX

func (buo *BankUpdateOne) SaveX(ctx context.Context) *Bank

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

func (*BankUpdateOne) SetBankCode

func (buo *BankUpdateOne) SetBankCode(s string) *BankUpdateOne

SetBankCode sets the "bankCode" field.

func (*BankUpdateOne) SetBankName

func (buo *BankUpdateOne) SetBankName(s string) *BankUpdateOne

SetBankName sets the "bankName" field.

func (*BankUpdateOne) SetSwift

func (buo *BankUpdateOne) SetSwift(s string) *BankUpdateOne

SetSwift sets the "swift" field.

func (*BankUpdateOne) SetURL

func (buo *BankUpdateOne) SetURL(s string) *BankUpdateOne

SetURL sets the "url" field.

type Banks

type Banks []*Bank

Banks is a parsable slice of Bank.

type BinaryItem

type BinaryItem struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Format holds the value of the "format" field.
	Format string `json:"format,omitempty"`
	// Length holds the value of the "length" field.
	Length int `json:"length,omitempty"`
	// Content holds the value of the "content" field.
	Content []byte `json:"content,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BinaryItemQuery when eager-loading is set.
	Edges BinaryItemEdges `json:"edges"`
	// contains filtered or unexported fields
}

BinaryItem is the model entity for the BinaryItem schema.

func (*BinaryItem) QueryTransaction

func (bi *BinaryItem) QueryTransaction() *TransactionQuery

QueryTransaction queries the "transaction" edge of the BinaryItem entity.

func (*BinaryItem) String

func (bi *BinaryItem) String() string

String implements the fmt.Stringer.

func (*BinaryItem) Unwrap

func (bi *BinaryItem) Unwrap() *BinaryItem

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

func (bi *BinaryItem) Update() *BinaryItemUpdateOne

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

type BinaryItemClient

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

BinaryItemClient is a client for the BinaryItem schema.

func NewBinaryItemClient

func NewBinaryItemClient(c config) *BinaryItemClient

NewBinaryItemClient returns a client for the BinaryItem from the given config.

func (*BinaryItemClient) Create

func (c *BinaryItemClient) Create() *BinaryItemCreate

Create returns a create builder for BinaryItem.

func (*BinaryItemClient) CreateBulk

func (c *BinaryItemClient) CreateBulk(builders ...*BinaryItemCreate) *BinaryItemCreateBulk

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

func (*BinaryItemClient) Delete

func (c *BinaryItemClient) Delete() *BinaryItemDelete

Delete returns a delete builder for BinaryItem.

func (*BinaryItemClient) DeleteOne

func (c *BinaryItemClient) DeleteOne(bi *BinaryItem) *BinaryItemDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*BinaryItemClient) DeleteOneID

func (c *BinaryItemClient) DeleteOneID(id int) *BinaryItemDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*BinaryItemClient) Get

func (c *BinaryItemClient) Get(ctx context.Context, id int) (*BinaryItem, error)

Get returns a BinaryItem entity by its id.

func (*BinaryItemClient) GetX

func (c *BinaryItemClient) GetX(ctx context.Context, id int) *BinaryItem

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

func (*BinaryItemClient) Hooks

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

Hooks returns the client hooks.

func (*BinaryItemClient) Query

func (c *BinaryItemClient) Query() *BinaryItemQuery

Query returns a query builder for BinaryItem.

func (*BinaryItemClient) QueryTransaction

func (c *BinaryItemClient) QueryTransaction(bi *BinaryItem) *TransactionQuery

QueryTransaction queries the transaction edge of a BinaryItem.

func (*BinaryItemClient) Update

func (c *BinaryItemClient) Update() *BinaryItemUpdate

Update returns an update builder for BinaryItem.

func (*BinaryItemClient) UpdateOne

func (c *BinaryItemClient) UpdateOne(bi *BinaryItem) *BinaryItemUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BinaryItemClient) UpdateOneID

func (c *BinaryItemClient) UpdateOneID(id int) *BinaryItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BinaryItemClient) Use

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

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

type BinaryItemCreate

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

BinaryItemCreate is the builder for creating a BinaryItem entity.

func (*BinaryItemCreate) Mutation

func (bic *BinaryItemCreate) Mutation() *BinaryItemMutation

Mutation returns the BinaryItemMutation object of the builder.

func (*BinaryItemCreate) Save

func (bic *BinaryItemCreate) Save(ctx context.Context) (*BinaryItem, error)

Save creates the BinaryItem in the database.

func (*BinaryItemCreate) SaveX

func (bic *BinaryItemCreate) SaveX(ctx context.Context) *BinaryItem

SaveX calls Save and panics if Save returns an error.

func (*BinaryItemCreate) SetContent

func (bic *BinaryItemCreate) SetContent(b []byte) *BinaryItemCreate

SetContent sets the "content" field.

func (*BinaryItemCreate) SetFormat

func (bic *BinaryItemCreate) SetFormat(s string) *BinaryItemCreate

SetFormat sets the "format" field.

func (*BinaryItemCreate) SetLength

func (bic *BinaryItemCreate) SetLength(i int) *BinaryItemCreate

SetLength sets the "length" field.

func (*BinaryItemCreate) SetNillableLength

func (bic *BinaryItemCreate) SetNillableLength(i *int) *BinaryItemCreate

SetNillableLength sets the "length" field if the given value is not nil.

func (*BinaryItemCreate) SetNillableTransactionID

func (bic *BinaryItemCreate) SetNillableTransactionID(id *uuid.UUID) *BinaryItemCreate

SetNillableTransactionID sets the "transaction" edge to the Transaction entity by ID if the given value is not nil.

func (*BinaryItemCreate) SetNillableURL

func (bic *BinaryItemCreate) SetNillableURL(s *string) *BinaryItemCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*BinaryItemCreate) SetTransaction

func (bic *BinaryItemCreate) SetTransaction(t *Transaction) *BinaryItemCreate

SetTransaction sets the "transaction" edge to the Transaction entity.

func (*BinaryItemCreate) SetTransactionID

func (bic *BinaryItemCreate) SetTransactionID(id uuid.UUID) *BinaryItemCreate

SetTransactionID sets the "transaction" edge to the Transaction entity by ID.

func (*BinaryItemCreate) SetURL

func (bic *BinaryItemCreate) SetURL(s string) *BinaryItemCreate

SetURL sets the "url" field.

type BinaryItemCreateBulk

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

BinaryItemCreateBulk is the builder for creating many BinaryItem entities in bulk.

func (*BinaryItemCreateBulk) Save

func (bicb *BinaryItemCreateBulk) Save(ctx context.Context) ([]*BinaryItem, error)

Save creates the BinaryItem entities in the database.

func (*BinaryItemCreateBulk) SaveX

func (bicb *BinaryItemCreateBulk) SaveX(ctx context.Context) []*BinaryItem

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

type BinaryItemDelete

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

BinaryItemDelete is the builder for deleting a BinaryItem entity.

func (*BinaryItemDelete) Exec

func (bid *BinaryItemDelete) Exec(ctx context.Context) (int, error)

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

func (*BinaryItemDelete) ExecX

func (bid *BinaryItemDelete) ExecX(ctx context.Context) int

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

func (*BinaryItemDelete) Where

Where adds a new predicate to the BinaryItemDelete builder.

type BinaryItemDeleteOne

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

BinaryItemDeleteOne is the builder for deleting a single BinaryItem entity.

func (*BinaryItemDeleteOne) Exec

func (bido *BinaryItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BinaryItemDeleteOne) ExecX

func (bido *BinaryItemDeleteOne) ExecX(ctx context.Context)

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

type BinaryItemEdges

type BinaryItemEdges struct {
	// Transaction holds the value of the transaction edge.
	Transaction *Transaction `json:"transaction,omitempty"`
	// contains filtered or unexported fields
}

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

func (BinaryItemEdges) TransactionOrErr

func (e BinaryItemEdges) TransactionOrErr() (*Transaction, error)

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

type BinaryItemGroupBy

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

BinaryItemGroupBy is the group-by builder for BinaryItem entities.

func (*BinaryItemGroupBy) Aggregate

func (bigb *BinaryItemGroupBy) Aggregate(fns ...AggregateFunc) *BinaryItemGroupBy

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

func (*BinaryItemGroupBy) Bool

func (bigb *BinaryItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) BoolX

func (bigb *BinaryItemGroupBy) BoolX(ctx context.Context) bool

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

func (*BinaryItemGroupBy) Bools

func (bigb *BinaryItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) BoolsX

func (bigb *BinaryItemGroupBy) BoolsX(ctx context.Context) []bool

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

func (*BinaryItemGroupBy) Float64

func (bigb *BinaryItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) Float64X

func (bigb *BinaryItemGroupBy) Float64X(ctx context.Context) float64

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

func (*BinaryItemGroupBy) Float64s

func (bigb *BinaryItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) Float64sX

func (bigb *BinaryItemGroupBy) Float64sX(ctx context.Context) []float64

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

func (*BinaryItemGroupBy) Int

func (bigb *BinaryItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) IntX

func (bigb *BinaryItemGroupBy) IntX(ctx context.Context) int

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

func (*BinaryItemGroupBy) Ints

func (bigb *BinaryItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) IntsX

func (bigb *BinaryItemGroupBy) IntsX(ctx context.Context) []int

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

func (*BinaryItemGroupBy) Scan

func (bigb *BinaryItemGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*BinaryItemGroupBy) ScanX

func (bigb *BinaryItemGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*BinaryItemGroupBy) String

func (bigb *BinaryItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) StringX

func (bigb *BinaryItemGroupBy) StringX(ctx context.Context) string

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

func (*BinaryItemGroupBy) Strings

func (bigb *BinaryItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*BinaryItemGroupBy) StringsX

func (bigb *BinaryItemGroupBy) StringsX(ctx context.Context) []string

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

type BinaryItemMutation

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

BinaryItemMutation represents an operation that mutates the BinaryItem nodes in the graph.

func (*BinaryItemMutation) AddField

func (m *BinaryItemMutation) 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 (*BinaryItemMutation) AddLength

func (m *BinaryItemMutation) AddLength(i int)

AddLength adds i to the "length" field.

func (*BinaryItemMutation) AddedEdges

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

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

func (*BinaryItemMutation) AddedField

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

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

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

func (*BinaryItemMutation) AddedIDs

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

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

func (*BinaryItemMutation) AddedLength

func (m *BinaryItemMutation) AddedLength() (r int, exists bool)

AddedLength returns the value that was added to the "length" field in this mutation.

func (*BinaryItemMutation) ClearEdge

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

func (m *BinaryItemMutation) 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 (*BinaryItemMutation) ClearLength

func (m *BinaryItemMutation) ClearLength()

ClearLength clears the value of the "length" field.

func (*BinaryItemMutation) ClearTransaction

func (m *BinaryItemMutation) ClearTransaction()

ClearTransaction clears the "transaction" edge to the Transaction entity.

func (*BinaryItemMutation) ClearURL

func (m *BinaryItemMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*BinaryItemMutation) ClearedEdges

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

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

func (*BinaryItemMutation) ClearedFields

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

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

func (BinaryItemMutation) Client

func (m BinaryItemMutation) 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 (*BinaryItemMutation) Content

func (m *BinaryItemMutation) Content() (r []byte, exists bool)

Content returns the value of the "content" field in the mutation.

func (*BinaryItemMutation) EdgeCleared

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

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

func (*BinaryItemMutation) Field

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

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

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

func (*BinaryItemMutation) Fields

func (m *BinaryItemMutation) 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 (*BinaryItemMutation) Format

func (m *BinaryItemMutation) Format() (r string, exists bool)

Format returns the value of the "format" field in the mutation.

func (*BinaryItemMutation) ID

func (m *BinaryItemMutation) 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.

func (*BinaryItemMutation) Length

func (m *BinaryItemMutation) Length() (r int, exists bool)

Length returns the value of the "length" field in the mutation.

func (*BinaryItemMutation) LengthCleared

func (m *BinaryItemMutation) LengthCleared() bool

LengthCleared returns if the "length" field was cleared in this mutation.

func (*BinaryItemMutation) OldContent

func (m *BinaryItemMutation) OldContent(ctx context.Context) (v []byte, err error)

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

func (*BinaryItemMutation) OldField

func (m *BinaryItemMutation) 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 (*BinaryItemMutation) OldFormat

func (m *BinaryItemMutation) OldFormat(ctx context.Context) (v string, err error)

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

func (*BinaryItemMutation) OldLength

func (m *BinaryItemMutation) OldLength(ctx context.Context) (v int, err error)

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

func (*BinaryItemMutation) OldURL

func (m *BinaryItemMutation) OldURL(ctx context.Context) (v string, err error)

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

func (*BinaryItemMutation) Op

func (m *BinaryItemMutation) Op() Op

Op returns the operation name.

func (*BinaryItemMutation) RemovedEdges

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

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

func (*BinaryItemMutation) RemovedIDs

func (m *BinaryItemMutation) 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 (*BinaryItemMutation) ResetContent

func (m *BinaryItemMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*BinaryItemMutation) ResetEdge

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

func (m *BinaryItemMutation) 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 (*BinaryItemMutation) ResetFormat

func (m *BinaryItemMutation) ResetFormat()

ResetFormat resets all changes to the "format" field.

func (*BinaryItemMutation) ResetLength

func (m *BinaryItemMutation) ResetLength()

ResetLength resets all changes to the "length" field.

func (*BinaryItemMutation) ResetTransaction

func (m *BinaryItemMutation) ResetTransaction()

ResetTransaction resets all changes to the "transaction" edge.

func (*BinaryItemMutation) ResetURL

func (m *BinaryItemMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*BinaryItemMutation) SetContent

func (m *BinaryItemMutation) SetContent(b []byte)

SetContent sets the "content" field.

func (*BinaryItemMutation) SetField

func (m *BinaryItemMutation) 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 (*BinaryItemMutation) SetFormat

func (m *BinaryItemMutation) SetFormat(s string)

SetFormat sets the "format" field.

func (*BinaryItemMutation) SetLength

func (m *BinaryItemMutation) SetLength(i int)

SetLength sets the "length" field.

func (*BinaryItemMutation) SetTransactionID

func (m *BinaryItemMutation) SetTransactionID(id uuid.UUID)

SetTransactionID sets the "transaction" edge to the Transaction entity by id.

func (*BinaryItemMutation) SetURL

func (m *BinaryItemMutation) SetURL(s string)

SetURL sets the "url" field.

func (*BinaryItemMutation) TransactionCleared

func (m *BinaryItemMutation) TransactionCleared() bool

TransactionCleared returns if the "transaction" edge to the Transaction entity was cleared.

func (*BinaryItemMutation) TransactionID

func (m *BinaryItemMutation) TransactionID() (id uuid.UUID, exists bool)

TransactionID returns the "transaction" edge ID in the mutation.

func (*BinaryItemMutation) TransactionIDs

func (m *BinaryItemMutation) TransactionIDs() (ids []uuid.UUID)

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

func (BinaryItemMutation) Tx

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

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

func (*BinaryItemMutation) Type

func (m *BinaryItemMutation) Type() string

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

func (*BinaryItemMutation) URL

func (m *BinaryItemMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*BinaryItemMutation) URLCleared

func (m *BinaryItemMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

type BinaryItemQuery

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

BinaryItemQuery is the builder for querying BinaryItem entities.

func (*BinaryItemQuery) All

func (biq *BinaryItemQuery) All(ctx context.Context) ([]*BinaryItem, error)

All executes the query and returns a list of BinaryItems.

func (*BinaryItemQuery) AllX

func (biq *BinaryItemQuery) AllX(ctx context.Context) []*BinaryItem

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

func (*BinaryItemQuery) Clone

func (biq *BinaryItemQuery) Clone() *BinaryItemQuery

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

func (*BinaryItemQuery) Count

func (biq *BinaryItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BinaryItemQuery) CountX

func (biq *BinaryItemQuery) CountX(ctx context.Context) int

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

func (*BinaryItemQuery) Exist

func (biq *BinaryItemQuery) Exist(ctx context.Context) (bool, error)

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

func (*BinaryItemQuery) ExistX

func (biq *BinaryItemQuery) ExistX(ctx context.Context) bool

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

func (*BinaryItemQuery) First

func (biq *BinaryItemQuery) First(ctx context.Context) (*BinaryItem, error)

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

func (*BinaryItemQuery) FirstID

func (biq *BinaryItemQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*BinaryItemQuery) FirstIDX

func (biq *BinaryItemQuery) FirstIDX(ctx context.Context) int

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

func (*BinaryItemQuery) FirstX

func (biq *BinaryItemQuery) FirstX(ctx context.Context) *BinaryItem

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

func (*BinaryItemQuery) GroupBy

func (biq *BinaryItemQuery) GroupBy(field string, fields ...string) *BinaryItemGroupBy

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 {
	Format string `json:"format,omitempty"`
	Count int `json:"count,omitempty"`
}

client.BinaryItem.Query().
	GroupBy(binaryitem.FieldFormat).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BinaryItemQuery) IDs

func (biq *BinaryItemQuery) IDs(ctx context.Context) ([]int, error)

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

func (*BinaryItemQuery) IDsX

func (biq *BinaryItemQuery) IDsX(ctx context.Context) []int

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

func (*BinaryItemQuery) Limit

func (biq *BinaryItemQuery) Limit(limit int) *BinaryItemQuery

Limit adds a limit step to the query.

func (*BinaryItemQuery) Offset

func (biq *BinaryItemQuery) Offset(offset int) *BinaryItemQuery

Offset adds an offset step to the query.

func (*BinaryItemQuery) Only

func (biq *BinaryItemQuery) Only(ctx context.Context) (*BinaryItem, error)

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

func (*BinaryItemQuery) OnlyID

func (biq *BinaryItemQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*BinaryItemQuery) OnlyIDX

func (biq *BinaryItemQuery) OnlyIDX(ctx context.Context) int

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

func (*BinaryItemQuery) OnlyX

func (biq *BinaryItemQuery) OnlyX(ctx context.Context) *BinaryItem

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

func (*BinaryItemQuery) Order

func (biq *BinaryItemQuery) Order(o ...OrderFunc) *BinaryItemQuery

Order adds an order step to the query.

func (*BinaryItemQuery) QueryTransaction

func (biq *BinaryItemQuery) QueryTransaction() *TransactionQuery

QueryTransaction chains the current query on the "transaction" edge.

func (*BinaryItemQuery) Select

func (biq *BinaryItemQuery) Select(field string, fields ...string) *BinaryItemSelect

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 {
	Format string `json:"format,omitempty"`
}

client.BinaryItem.Query().
	Select(binaryitem.FieldFormat).
	Scan(ctx, &v)

func (*BinaryItemQuery) Where

Where adds a new predicate for the BinaryItemQuery builder.

func (*BinaryItemQuery) WithTransaction

func (biq *BinaryItemQuery) WithTransaction(opts ...func(*TransactionQuery)) *BinaryItemQuery

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

type BinaryItemSelect

type BinaryItemSelect struct {
	*BinaryItemQuery
	// contains filtered or unexported fields
}

BinaryItemSelect is the builder for selecting fields of BinaryItem entities.

func (*BinaryItemSelect) Bool

func (bis *BinaryItemSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*BinaryItemSelect) BoolX

func (bis *BinaryItemSelect) BoolX(ctx context.Context) bool

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

func (*BinaryItemSelect) Bools

func (bis *BinaryItemSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*BinaryItemSelect) BoolsX

func (bis *BinaryItemSelect) BoolsX(ctx context.Context) []bool

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

func (*BinaryItemSelect) Float64

func (bis *BinaryItemSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*BinaryItemSelect) Float64X

func (bis *BinaryItemSelect) Float64X(ctx context.Context) float64

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

func (*BinaryItemSelect) Float64s

func (bis *BinaryItemSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*BinaryItemSelect) Float64sX

func (bis *BinaryItemSelect) Float64sX(ctx context.Context) []float64

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

func (*BinaryItemSelect) Int

func (bis *BinaryItemSelect) Int(ctx context.Context) (_ int, err error)

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

func (*BinaryItemSelect) IntX

func (bis *BinaryItemSelect) IntX(ctx context.Context) int

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

func (*BinaryItemSelect) Ints

func (bis *BinaryItemSelect) Ints(ctx context.Context) ([]int, error)

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

func (*BinaryItemSelect) IntsX

func (bis *BinaryItemSelect) IntsX(ctx context.Context) []int

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

func (*BinaryItemSelect) Scan

func (bis *BinaryItemSelect) Scan(ctx context.Context, v interface{}) error

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

func (*BinaryItemSelect) ScanX

func (bis *BinaryItemSelect) ScanX(ctx context.Context, v interface{})

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

func (*BinaryItemSelect) String

func (bis *BinaryItemSelect) String(ctx context.Context) (_ string, err error)

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

func (*BinaryItemSelect) StringX

func (bis *BinaryItemSelect) StringX(ctx context.Context) string

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

func (*BinaryItemSelect) Strings

func (bis *BinaryItemSelect) Strings(ctx context.Context) ([]string, error)

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

func (*BinaryItemSelect) StringsX

func (bis *BinaryItemSelect) StringsX(ctx context.Context) []string

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

type BinaryItemUpdate

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

BinaryItemUpdate is the builder for updating BinaryItem entities.

func (*BinaryItemUpdate) AddLength

func (biu *BinaryItemUpdate) AddLength(i int) *BinaryItemUpdate

AddLength adds i to the "length" field.

func (*BinaryItemUpdate) ClearLength

func (biu *BinaryItemUpdate) ClearLength() *BinaryItemUpdate

ClearLength clears the value of the "length" field.

func (*BinaryItemUpdate) ClearTransaction

func (biu *BinaryItemUpdate) ClearTransaction() *BinaryItemUpdate

ClearTransaction clears the "transaction" edge to the Transaction entity.

func (*BinaryItemUpdate) ClearURL

func (biu *BinaryItemUpdate) ClearURL() *BinaryItemUpdate

ClearURL clears the value of the "url" field.

func (*BinaryItemUpdate) Exec

func (biu *BinaryItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BinaryItemUpdate) ExecX

func (biu *BinaryItemUpdate) ExecX(ctx context.Context)

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

func (*BinaryItemUpdate) Mutation

func (biu *BinaryItemUpdate) Mutation() *BinaryItemMutation

Mutation returns the BinaryItemMutation object of the builder.

func (*BinaryItemUpdate) Save

func (biu *BinaryItemUpdate) Save(ctx context.Context) (int, error)

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

func (*BinaryItemUpdate) SaveX

func (biu *BinaryItemUpdate) SaveX(ctx context.Context) int

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

func (*BinaryItemUpdate) SetContent

func (biu *BinaryItemUpdate) SetContent(b []byte) *BinaryItemUpdate

SetContent sets the "content" field.

func (*BinaryItemUpdate) SetFormat

func (biu *BinaryItemUpdate) SetFormat(s string) *BinaryItemUpdate

SetFormat sets the "format" field.

func (*BinaryItemUpdate) SetLength

func (biu *BinaryItemUpdate) SetLength(i int) *BinaryItemUpdate

SetLength sets the "length" field.

func (*BinaryItemUpdate) SetNillableLength

func (biu *BinaryItemUpdate) SetNillableLength(i *int) *BinaryItemUpdate

SetNillableLength sets the "length" field if the given value is not nil.

func (*BinaryItemUpdate) SetNillableTransactionID

func (biu *BinaryItemUpdate) SetNillableTransactionID(id *uuid.UUID) *BinaryItemUpdate

SetNillableTransactionID sets the "transaction" edge to the Transaction entity by ID if the given value is not nil.

func (*BinaryItemUpdate) SetNillableURL

func (biu *BinaryItemUpdate) SetNillableURL(s *string) *BinaryItemUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*BinaryItemUpdate) SetTransaction

func (biu *BinaryItemUpdate) SetTransaction(t *Transaction) *BinaryItemUpdate

SetTransaction sets the "transaction" edge to the Transaction entity.

func (*BinaryItemUpdate) SetTransactionID

func (biu *BinaryItemUpdate) SetTransactionID(id uuid.UUID) *BinaryItemUpdate

SetTransactionID sets the "transaction" edge to the Transaction entity by ID.

func (*BinaryItemUpdate) SetURL

func (biu *BinaryItemUpdate) SetURL(s string) *BinaryItemUpdate

SetURL sets the "url" field.

func (*BinaryItemUpdate) Where

Where adds a new predicate for the BinaryItemUpdate builder.

type BinaryItemUpdateOne

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

BinaryItemUpdateOne is the builder for updating a single BinaryItem entity.

func (*BinaryItemUpdateOne) AddLength

func (biuo *BinaryItemUpdateOne) AddLength(i int) *BinaryItemUpdateOne

AddLength adds i to the "length" field.

func (*BinaryItemUpdateOne) ClearLength

func (biuo *BinaryItemUpdateOne) ClearLength() *BinaryItemUpdateOne

ClearLength clears the value of the "length" field.

func (*BinaryItemUpdateOne) ClearTransaction

func (biuo *BinaryItemUpdateOne) ClearTransaction() *BinaryItemUpdateOne

ClearTransaction clears the "transaction" edge to the Transaction entity.

func (*BinaryItemUpdateOne) ClearURL

func (biuo *BinaryItemUpdateOne) ClearURL() *BinaryItemUpdateOne

ClearURL clears the value of the "url" field.

func (*BinaryItemUpdateOne) Exec

func (biuo *BinaryItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BinaryItemUpdateOne) ExecX

func (biuo *BinaryItemUpdateOne) ExecX(ctx context.Context)

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

func (*BinaryItemUpdateOne) Mutation

func (biuo *BinaryItemUpdateOne) Mutation() *BinaryItemMutation

Mutation returns the BinaryItemMutation object of the builder.

func (*BinaryItemUpdateOne) Save

func (biuo *BinaryItemUpdateOne) Save(ctx context.Context) (*BinaryItem, error)

Save executes the query and returns the updated BinaryItem entity.

func (*BinaryItemUpdateOne) SaveX

func (biuo *BinaryItemUpdateOne) SaveX(ctx context.Context) *BinaryItem

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

func (*BinaryItemUpdateOne) SetContent

func (biuo *BinaryItemUpdateOne) SetContent(b []byte) *BinaryItemUpdateOne

SetContent sets the "content" field.

func (*BinaryItemUpdateOne) SetFormat

func (biuo *BinaryItemUpdateOne) SetFormat(s string) *BinaryItemUpdateOne

SetFormat sets the "format" field.

func (*BinaryItemUpdateOne) SetLength

func (biuo *BinaryItemUpdateOne) SetLength(i int) *BinaryItemUpdateOne

SetLength sets the "length" field.

func (*BinaryItemUpdateOne) SetNillableLength

func (biuo *BinaryItemUpdateOne) SetNillableLength(i *int) *BinaryItemUpdateOne

SetNillableLength sets the "length" field if the given value is not nil.

func (*BinaryItemUpdateOne) SetNillableTransactionID

func (biuo *BinaryItemUpdateOne) SetNillableTransactionID(id *uuid.UUID) *BinaryItemUpdateOne

SetNillableTransactionID sets the "transaction" edge to the Transaction entity by ID if the given value is not nil.

func (*BinaryItemUpdateOne) SetNillableURL

func (biuo *BinaryItemUpdateOne) SetNillableURL(s *string) *BinaryItemUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*BinaryItemUpdateOne) SetTransaction

func (biuo *BinaryItemUpdateOne) SetTransaction(t *Transaction) *BinaryItemUpdateOne

SetTransaction sets the "transaction" edge to the Transaction entity.

func (*BinaryItemUpdateOne) SetTransactionID

func (biuo *BinaryItemUpdateOne) SetTransactionID(id uuid.UUID) *BinaryItemUpdateOne

SetTransactionID sets the "transaction" edge to the Transaction entity by ID.

func (*BinaryItemUpdateOne) SetURL

SetURL sets the "url" field.

type BinaryItems

type BinaryItems []*BinaryItem

BinaryItems is a parsable slice of BinaryItem.

type Branch

type Branch struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// BranchCode holds the value of the "branchCode" field.
	BranchCode string `json:"branchCode,omitempty"`
	// StreetNumber holds the value of the "streetNumber" field.
	StreetNumber string `json:"streetNumber,omitempty"`
	// StreetName holds the value of the "streetName" field.
	StreetName string `json:"streetName,omitempty"`
	// City holds the value of the "city" field.
	City string `json:"city,omitempty"`
	// State holds the value of the "state" field.
	State string `json:"state,omitempty"`
	// Zip holds the value of the "zip" field.
	Zip string `json:"zip,omitempty"`
	// Latitude holds the value of the "latitude" field.
	Latitude float64 `json:"latitude,omitempty"`
	// Longitude holds the value of the "longitude" field.
	Longitude float64 `json:"longitude,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BranchQuery when eager-loading is set.
	Edges BranchEdges `json:"edges"`
	// contains filtered or unexported fields
}

Branch is the model entity for the Branch schema.

func (*Branch) QueryOwner

func (b *Branch) QueryOwner() *BankQuery

QueryOwner queries the "owner" edge of the Branch entity.

func (*Branch) String

func (b *Branch) String() string

String implements the fmt.Stringer.

func (*Branch) Unwrap

func (b *Branch) Unwrap() *Branch

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

func (b *Branch) Update() *BranchUpdateOne

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

type BranchClient

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

BranchClient is a client for the Branch schema.

func NewBranchClient

func NewBranchClient(c config) *BranchClient

NewBranchClient returns a client for the Branch from the given config.

func (*BranchClient) Create

func (c *BranchClient) Create() *BranchCreate

Create returns a create builder for Branch.

func (*BranchClient) CreateBulk

func (c *BranchClient) CreateBulk(builders ...*BranchCreate) *BranchCreateBulk

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

func (*BranchClient) Delete

func (c *BranchClient) Delete() *BranchDelete

Delete returns a delete builder for Branch.

func (*BranchClient) DeleteOne

func (c *BranchClient) DeleteOne(b *Branch) *BranchDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*BranchClient) DeleteOneID

func (c *BranchClient) DeleteOneID(id int) *BranchDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*BranchClient) Get

func (c *BranchClient) Get(ctx context.Context, id int) (*Branch, error)

Get returns a Branch entity by its id.

func (*BranchClient) GetX

func (c *BranchClient) GetX(ctx context.Context, id int) *Branch

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

func (*BranchClient) Hooks

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

Hooks returns the client hooks.

func (*BranchClient) Query

func (c *BranchClient) Query() *BranchQuery

Query returns a query builder for Branch.

func (*BranchClient) QueryOwner

func (c *BranchClient) QueryOwner(b *Branch) *BankQuery

QueryOwner queries the owner edge of a Branch.

func (*BranchClient) Update

func (c *BranchClient) Update() *BranchUpdate

Update returns an update builder for Branch.

func (*BranchClient) UpdateOne

func (c *BranchClient) UpdateOne(b *Branch) *BranchUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BranchClient) UpdateOneID

func (c *BranchClient) UpdateOneID(id int) *BranchUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BranchClient) Use

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

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

type BranchCreate

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

BranchCreate is the builder for creating a Branch entity.

func (*BranchCreate) Mutation

func (bc *BranchCreate) Mutation() *BranchMutation

Mutation returns the BranchMutation object of the builder.

func (*BranchCreate) Save

func (bc *BranchCreate) Save(ctx context.Context) (*Branch, error)

Save creates the Branch in the database.

func (*BranchCreate) SaveX

func (bc *BranchCreate) SaveX(ctx context.Context) *Branch

SaveX calls Save and panics if Save returns an error.

func (*BranchCreate) SetBranchCode

func (bc *BranchCreate) SetBranchCode(s string) *BranchCreate

SetBranchCode sets the "branchCode" field.

func (*BranchCreate) SetCity

func (bc *BranchCreate) SetCity(s string) *BranchCreate

SetCity sets the "city" field.

func (*BranchCreate) SetLatitude

func (bc *BranchCreate) SetLatitude(f float64) *BranchCreate

SetLatitude sets the "latitude" field.

func (*BranchCreate) SetLongitude

func (bc *BranchCreate) SetLongitude(f float64) *BranchCreate

SetLongitude sets the "longitude" field.

func (*BranchCreate) SetNillableOwnerID

func (bc *BranchCreate) SetNillableOwnerID(id *int) *BranchCreate

SetNillableOwnerID sets the "owner" edge to the Bank entity by ID if the given value is not nil.

func (*BranchCreate) SetOwner

func (bc *BranchCreate) SetOwner(b *Bank) *BranchCreate

SetOwner sets the "owner" edge to the Bank entity.

func (*BranchCreate) SetOwnerID

func (bc *BranchCreate) SetOwnerID(id int) *BranchCreate

SetOwnerID sets the "owner" edge to the Bank entity by ID.

func (*BranchCreate) SetState

func (bc *BranchCreate) SetState(s string) *BranchCreate

SetState sets the "state" field.

func (*BranchCreate) SetStreetName

func (bc *BranchCreate) SetStreetName(s string) *BranchCreate

SetStreetName sets the "streetName" field.

func (*BranchCreate) SetStreetNumber

func (bc *BranchCreate) SetStreetNumber(s string) *BranchCreate

SetStreetNumber sets the "streetNumber" field.

func (*BranchCreate) SetZip

func (bc *BranchCreate) SetZip(s string) *BranchCreate

SetZip sets the "zip" field.

type BranchCreateBulk

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

BranchCreateBulk is the builder for creating many Branch entities in bulk.

func (*BranchCreateBulk) Save

func (bcb *BranchCreateBulk) Save(ctx context.Context) ([]*Branch, error)

Save creates the Branch entities in the database.

func (*BranchCreateBulk) SaveX

func (bcb *BranchCreateBulk) SaveX(ctx context.Context) []*Branch

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

type BranchDelete

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

BranchDelete is the builder for deleting a Branch entity.

func (*BranchDelete) Exec

func (bd *BranchDelete) Exec(ctx context.Context) (int, error)

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

func (*BranchDelete) ExecX

func (bd *BranchDelete) ExecX(ctx context.Context) int

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

func (*BranchDelete) Where

func (bd *BranchDelete) Where(ps ...predicate.Branch) *BranchDelete

Where adds a new predicate to the BranchDelete builder.

type BranchDeleteOne

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

BranchDeleteOne is the builder for deleting a single Branch entity.

func (*BranchDeleteOne) Exec

func (bdo *BranchDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BranchDeleteOne) ExecX

func (bdo *BranchDeleteOne) ExecX(ctx context.Context)

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

type BranchEdges

type BranchEdges struct {
	// Owner holds the value of the owner edge.
	Owner *Bank `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

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

func (BranchEdges) OwnerOrErr

func (e BranchEdges) OwnerOrErr() (*Bank, error)

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

type BranchGroupBy

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

BranchGroupBy is the group-by builder for Branch entities.

func (*BranchGroupBy) Aggregate

func (bgb *BranchGroupBy) Aggregate(fns ...AggregateFunc) *BranchGroupBy

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

func (*BranchGroupBy) Bool

func (bgb *BranchGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) BoolX

func (bgb *BranchGroupBy) BoolX(ctx context.Context) bool

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

func (*BranchGroupBy) Bools

func (bgb *BranchGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) BoolsX

func (bgb *BranchGroupBy) BoolsX(ctx context.Context) []bool

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

func (*BranchGroupBy) Float64

func (bgb *BranchGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) Float64X

func (bgb *BranchGroupBy) Float64X(ctx context.Context) float64

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

func (*BranchGroupBy) Float64s

func (bgb *BranchGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) Float64sX

func (bgb *BranchGroupBy) Float64sX(ctx context.Context) []float64

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

func (*BranchGroupBy) Int

func (bgb *BranchGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) IntX

func (bgb *BranchGroupBy) IntX(ctx context.Context) int

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

func (*BranchGroupBy) Ints

func (bgb *BranchGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) IntsX

func (bgb *BranchGroupBy) IntsX(ctx context.Context) []int

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

func (*BranchGroupBy) Scan

func (bgb *BranchGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*BranchGroupBy) ScanX

func (bgb *BranchGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*BranchGroupBy) String

func (bgb *BranchGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) StringX

func (bgb *BranchGroupBy) StringX(ctx context.Context) string

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

func (*BranchGroupBy) Strings

func (bgb *BranchGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*BranchGroupBy) StringsX

func (bgb *BranchGroupBy) StringsX(ctx context.Context) []string

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

type BranchMutation

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

BranchMutation represents an operation that mutates the Branch nodes in the graph.

func (*BranchMutation) AddField

func (m *BranchMutation) 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 (*BranchMutation) AddLatitude

func (m *BranchMutation) AddLatitude(f float64)

AddLatitude adds f to the "latitude" field.

func (*BranchMutation) AddLongitude

func (m *BranchMutation) AddLongitude(f float64)

AddLongitude adds f to the "longitude" field.

func (*BranchMutation) AddedEdges

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

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

func (*BranchMutation) AddedField

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

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

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

func (*BranchMutation) AddedIDs

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

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

func (*BranchMutation) AddedLatitude

func (m *BranchMutation) AddedLatitude() (r float64, exists bool)

AddedLatitude returns the value that was added to the "latitude" field in this mutation.

func (*BranchMutation) AddedLongitude

func (m *BranchMutation) AddedLongitude() (r float64, exists bool)

AddedLongitude returns the value that was added to the "longitude" field in this mutation.

func (*BranchMutation) BranchCode

func (m *BranchMutation) BranchCode() (r string, exists bool)

BranchCode returns the value of the "branchCode" field in the mutation.

func (*BranchMutation) City

func (m *BranchMutation) City() (r string, exists bool)

City returns the value of the "city" field in the mutation.

func (*BranchMutation) ClearEdge

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

func (m *BranchMutation) 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 (*BranchMutation) ClearOwner

func (m *BranchMutation) ClearOwner()

ClearOwner clears the "owner" edge to the Bank entity.

func (*BranchMutation) ClearedEdges

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

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

func (*BranchMutation) ClearedFields

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

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

func (BranchMutation) Client

func (m BranchMutation) 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 (*BranchMutation) EdgeCleared

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

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

func (*BranchMutation) Field

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

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

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

func (*BranchMutation) Fields

func (m *BranchMutation) 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 (*BranchMutation) ID

func (m *BranchMutation) 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.

func (*BranchMutation) Latitude

func (m *BranchMutation) Latitude() (r float64, exists bool)

Latitude returns the value of the "latitude" field in the mutation.

func (*BranchMutation) Longitude

func (m *BranchMutation) Longitude() (r float64, exists bool)

Longitude returns the value of the "longitude" field in the mutation.

func (*BranchMutation) OldBranchCode

func (m *BranchMutation) OldBranchCode(ctx context.Context) (v string, err error)

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

func (*BranchMutation) OldCity

func (m *BranchMutation) OldCity(ctx context.Context) (v string, err error)

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

func (*BranchMutation) OldField

func (m *BranchMutation) 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 (*BranchMutation) OldLatitude

func (m *BranchMutation) OldLatitude(ctx context.Context) (v float64, err error)

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

func (*BranchMutation) OldLongitude

func (m *BranchMutation) OldLongitude(ctx context.Context) (v float64, err error)

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

func (*BranchMutation) OldState

func (m *BranchMutation) OldState(ctx context.Context) (v string, err error)

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

func (*BranchMutation) OldStreetName

func (m *BranchMutation) OldStreetName(ctx context.Context) (v string, err error)

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

func (*BranchMutation) OldStreetNumber

func (m *BranchMutation) OldStreetNumber(ctx context.Context) (v string, err error)

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

func (*BranchMutation) OldZip

func (m *BranchMutation) OldZip(ctx context.Context) (v string, err error)

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

func (*BranchMutation) Op

func (m *BranchMutation) Op() Op

Op returns the operation name.

func (*BranchMutation) OwnerCleared

func (m *BranchMutation) OwnerCleared() bool

OwnerCleared returns if the "owner" edge to the Bank entity was cleared.

func (*BranchMutation) OwnerID

func (m *BranchMutation) OwnerID() (id int, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*BranchMutation) OwnerIDs

func (m *BranchMutation) OwnerIDs() (ids []int)

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

func (*BranchMutation) RemovedEdges

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

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

func (*BranchMutation) RemovedIDs

func (m *BranchMutation) 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 (*BranchMutation) ResetBranchCode

func (m *BranchMutation) ResetBranchCode()

ResetBranchCode resets all changes to the "branchCode" field.

func (*BranchMutation) ResetCity

func (m *BranchMutation) ResetCity()

ResetCity resets all changes to the "city" field.

func (*BranchMutation) ResetEdge

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

func (m *BranchMutation) 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 (*BranchMutation) ResetLatitude

func (m *BranchMutation) ResetLatitude()

ResetLatitude resets all changes to the "latitude" field.

func (*BranchMutation) ResetLongitude

func (m *BranchMutation) ResetLongitude()

ResetLongitude resets all changes to the "longitude" field.

func (*BranchMutation) ResetOwner

func (m *BranchMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*BranchMutation) ResetState

func (m *BranchMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*BranchMutation) ResetStreetName

func (m *BranchMutation) ResetStreetName()

ResetStreetName resets all changes to the "streetName" field.

func (*BranchMutation) ResetStreetNumber

func (m *BranchMutation) ResetStreetNumber()

ResetStreetNumber resets all changes to the "streetNumber" field.

func (*BranchMutation) ResetZip

func (m *BranchMutation) ResetZip()

ResetZip resets all changes to the "zip" field.

func (*BranchMutation) SetBranchCode

func (m *BranchMutation) SetBranchCode(s string)

SetBranchCode sets the "branchCode" field.

func (*BranchMutation) SetCity

func (m *BranchMutation) SetCity(s string)

SetCity sets the "city" field.

func (*BranchMutation) SetField

func (m *BranchMutation) 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 (*BranchMutation) SetLatitude

func (m *BranchMutation) SetLatitude(f float64)

SetLatitude sets the "latitude" field.

func (*BranchMutation) SetLongitude

func (m *BranchMutation) SetLongitude(f float64)

SetLongitude sets the "longitude" field.

func (*BranchMutation) SetOwnerID

func (m *BranchMutation) SetOwnerID(id int)

SetOwnerID sets the "owner" edge to the Bank entity by id.

func (*BranchMutation) SetState

func (m *BranchMutation) SetState(s string)

SetState sets the "state" field.

func (*BranchMutation) SetStreetName

func (m *BranchMutation) SetStreetName(s string)

SetStreetName sets the "streetName" field.

func (*BranchMutation) SetStreetNumber

func (m *BranchMutation) SetStreetNumber(s string)

SetStreetNumber sets the "streetNumber" field.

func (*BranchMutation) SetZip

func (m *BranchMutation) SetZip(s string)

SetZip sets the "zip" field.

func (*BranchMutation) State

func (m *BranchMutation) State() (r string, exists bool)

State returns the value of the "state" field in the mutation.

func (*BranchMutation) StreetName

func (m *BranchMutation) StreetName() (r string, exists bool)

StreetName returns the value of the "streetName" field in the mutation.

func (*BranchMutation) StreetNumber

func (m *BranchMutation) StreetNumber() (r string, exists bool)

StreetNumber returns the value of the "streetNumber" field in the mutation.

func (BranchMutation) Tx

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

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

func (*BranchMutation) Type

func (m *BranchMutation) Type() string

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

func (*BranchMutation) Zip

func (m *BranchMutation) Zip() (r string, exists bool)

Zip returns the value of the "zip" field in the mutation.

type BranchQuery

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

BranchQuery is the builder for querying Branch entities.

func (*BranchQuery) All

func (bq *BranchQuery) All(ctx context.Context) ([]*Branch, error)

All executes the query and returns a list of Branches.

func (*BranchQuery) AllX

func (bq *BranchQuery) AllX(ctx context.Context) []*Branch

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

func (*BranchQuery) Clone

func (bq *BranchQuery) Clone() *BranchQuery

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

func (*BranchQuery) Count

func (bq *BranchQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BranchQuery) CountX

func (bq *BranchQuery) CountX(ctx context.Context) int

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

func (*BranchQuery) Exist

func (bq *BranchQuery) Exist(ctx context.Context) (bool, error)

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

func (*BranchQuery) ExistX

func (bq *BranchQuery) ExistX(ctx context.Context) bool

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

func (*BranchQuery) First

func (bq *BranchQuery) First(ctx context.Context) (*Branch, error)

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

func (*BranchQuery) FirstID

func (bq *BranchQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*BranchQuery) FirstIDX

func (bq *BranchQuery) FirstIDX(ctx context.Context) int

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

func (*BranchQuery) FirstX

func (bq *BranchQuery) FirstX(ctx context.Context) *Branch

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

func (*BranchQuery) GroupBy

func (bq *BranchQuery) GroupBy(field string, fields ...string) *BranchGroupBy

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 {
	BranchCode string `json:"branchCode,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Branch.Query().
	GroupBy(branch.FieldBranchCode).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BranchQuery) IDs

func (bq *BranchQuery) IDs(ctx context.Context) ([]int, error)

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

func (*BranchQuery) IDsX

func (bq *BranchQuery) IDsX(ctx context.Context) []int

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

func (*BranchQuery) Limit

func (bq *BranchQuery) Limit(limit int) *BranchQuery

Limit adds a limit step to the query.

func (*BranchQuery) Offset

func (bq *BranchQuery) Offset(offset int) *BranchQuery

Offset adds an offset step to the query.

func (*BranchQuery) Only

func (bq *BranchQuery) Only(ctx context.Context) (*Branch, error)

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

func (*BranchQuery) OnlyID

func (bq *BranchQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*BranchQuery) OnlyIDX

func (bq *BranchQuery) OnlyIDX(ctx context.Context) int

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

func (*BranchQuery) OnlyX

func (bq *BranchQuery) OnlyX(ctx context.Context) *Branch

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

func (*BranchQuery) Order

func (bq *BranchQuery) Order(o ...OrderFunc) *BranchQuery

Order adds an order step to the query.

func (*BranchQuery) QueryOwner

func (bq *BranchQuery) QueryOwner() *BankQuery

QueryOwner chains the current query on the "owner" edge.

func (*BranchQuery) Select

func (bq *BranchQuery) Select(field string, fields ...string) *BranchSelect

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 {
	BranchCode string `json:"branchCode,omitempty"`
}

client.Branch.Query().
	Select(branch.FieldBranchCode).
	Scan(ctx, &v)

func (*BranchQuery) Where

func (bq *BranchQuery) Where(ps ...predicate.Branch) *BranchQuery

Where adds a new predicate for the BranchQuery builder.

func (*BranchQuery) WithOwner

func (bq *BranchQuery) WithOwner(opts ...func(*BankQuery)) *BranchQuery

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

type BranchSelect

type BranchSelect struct {
	*BranchQuery
	// contains filtered or unexported fields
}

BranchSelect is the builder for selecting fields of Branch entities.

func (*BranchSelect) Bool

func (bs *BranchSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*BranchSelect) BoolX

func (bs *BranchSelect) BoolX(ctx context.Context) bool

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

func (*BranchSelect) Bools

func (bs *BranchSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*BranchSelect) BoolsX

func (bs *BranchSelect) BoolsX(ctx context.Context) []bool

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

func (*BranchSelect) Float64

func (bs *BranchSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*BranchSelect) Float64X

func (bs *BranchSelect) Float64X(ctx context.Context) float64

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

func (*BranchSelect) Float64s

func (bs *BranchSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*BranchSelect) Float64sX

func (bs *BranchSelect) Float64sX(ctx context.Context) []float64

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

func (*BranchSelect) Int

func (bs *BranchSelect) Int(ctx context.Context) (_ int, err error)

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

func (*BranchSelect) IntX

func (bs *BranchSelect) IntX(ctx context.Context) int

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

func (*BranchSelect) Ints

func (bs *BranchSelect) Ints(ctx context.Context) ([]int, error)

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

func (*BranchSelect) IntsX

func (bs *BranchSelect) IntsX(ctx context.Context) []int

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

func (*BranchSelect) Scan

func (bs *BranchSelect) Scan(ctx context.Context, v interface{}) error

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

func (*BranchSelect) ScanX

func (bs *BranchSelect) ScanX(ctx context.Context, v interface{})

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

func (*BranchSelect) String

func (bs *BranchSelect) String(ctx context.Context) (_ string, err error)

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

func (*BranchSelect) StringX

func (bs *BranchSelect) StringX(ctx context.Context) string

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

func (*BranchSelect) Strings

func (bs *BranchSelect) Strings(ctx context.Context) ([]string, error)

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

func (*BranchSelect) StringsX

func (bs *BranchSelect) StringsX(ctx context.Context) []string

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

type BranchUpdate

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

BranchUpdate is the builder for updating Branch entities.

func (*BranchUpdate) AddLatitude

func (bu *BranchUpdate) AddLatitude(f float64) *BranchUpdate

AddLatitude adds f to the "latitude" field.

func (*BranchUpdate) AddLongitude

func (bu *BranchUpdate) AddLongitude(f float64) *BranchUpdate

AddLongitude adds f to the "longitude" field.

func (*BranchUpdate) ClearOwner

func (bu *BranchUpdate) ClearOwner() *BranchUpdate

ClearOwner clears the "owner" edge to the Bank entity.

func (*BranchUpdate) Exec

func (bu *BranchUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BranchUpdate) ExecX

func (bu *BranchUpdate) ExecX(ctx context.Context)

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

func (*BranchUpdate) Mutation

func (bu *BranchUpdate) Mutation() *BranchMutation

Mutation returns the BranchMutation object of the builder.

func (*BranchUpdate) Save

func (bu *BranchUpdate) Save(ctx context.Context) (int, error)

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

func (*BranchUpdate) SaveX

func (bu *BranchUpdate) SaveX(ctx context.Context) int

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

func (*BranchUpdate) SetBranchCode

func (bu *BranchUpdate) SetBranchCode(s string) *BranchUpdate

SetBranchCode sets the "branchCode" field.

func (*BranchUpdate) SetCity

func (bu *BranchUpdate) SetCity(s string) *BranchUpdate

SetCity sets the "city" field.

func (*BranchUpdate) SetLatitude

func (bu *BranchUpdate) SetLatitude(f float64) *BranchUpdate

SetLatitude sets the "latitude" field.

func (*BranchUpdate) SetLongitude

func (bu *BranchUpdate) SetLongitude(f float64) *BranchUpdate

SetLongitude sets the "longitude" field.

func (*BranchUpdate) SetNillableOwnerID

func (bu *BranchUpdate) SetNillableOwnerID(id *int) *BranchUpdate

SetNillableOwnerID sets the "owner" edge to the Bank entity by ID if the given value is not nil.

func (*BranchUpdate) SetOwner

func (bu *BranchUpdate) SetOwner(b *Bank) *BranchUpdate

SetOwner sets the "owner" edge to the Bank entity.

func (*BranchUpdate) SetOwnerID

func (bu *BranchUpdate) SetOwnerID(id int) *BranchUpdate

SetOwnerID sets the "owner" edge to the Bank entity by ID.

func (*BranchUpdate) SetState

func (bu *BranchUpdate) SetState(s string) *BranchUpdate

SetState sets the "state" field.

func (*BranchUpdate) SetStreetName

func (bu *BranchUpdate) SetStreetName(s string) *BranchUpdate

SetStreetName sets the "streetName" field.

func (*BranchUpdate) SetStreetNumber

func (bu *BranchUpdate) SetStreetNumber(s string) *BranchUpdate

SetStreetNumber sets the "streetNumber" field.

func (*BranchUpdate) SetZip

func (bu *BranchUpdate) SetZip(s string) *BranchUpdate

SetZip sets the "zip" field.

func (*BranchUpdate) Where

func (bu *BranchUpdate) Where(ps ...predicate.Branch) *BranchUpdate

Where adds a new predicate for the BranchUpdate builder.

type BranchUpdateOne

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

BranchUpdateOne is the builder for updating a single Branch entity.

func (*BranchUpdateOne) AddLatitude

func (buo *BranchUpdateOne) AddLatitude(f float64) *BranchUpdateOne

AddLatitude adds f to the "latitude" field.

func (*BranchUpdateOne) AddLongitude

func (buo *BranchUpdateOne) AddLongitude(f float64) *BranchUpdateOne

AddLongitude adds f to the "longitude" field.

func (*BranchUpdateOne) ClearOwner

func (buo *BranchUpdateOne) ClearOwner() *BranchUpdateOne

ClearOwner clears the "owner" edge to the Bank entity.

func (*BranchUpdateOne) Exec

func (buo *BranchUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BranchUpdateOne) ExecX

func (buo *BranchUpdateOne) ExecX(ctx context.Context)

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

func (*BranchUpdateOne) Mutation

func (buo *BranchUpdateOne) Mutation() *BranchMutation

Mutation returns the BranchMutation object of the builder.

func (*BranchUpdateOne) Save

func (buo *BranchUpdateOne) Save(ctx context.Context) (*Branch, error)

Save executes the query and returns the updated Branch entity.

func (*BranchUpdateOne) SaveX

func (buo *BranchUpdateOne) SaveX(ctx context.Context) *Branch

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

func (*BranchUpdateOne) SetBranchCode

func (buo *BranchUpdateOne) SetBranchCode(s string) *BranchUpdateOne

SetBranchCode sets the "branchCode" field.

func (*BranchUpdateOne) SetCity

func (buo *BranchUpdateOne) SetCity(s string) *BranchUpdateOne

SetCity sets the "city" field.

func (*BranchUpdateOne) SetLatitude

func (buo *BranchUpdateOne) SetLatitude(f float64) *BranchUpdateOne

SetLatitude sets the "latitude" field.

func (*BranchUpdateOne) SetLongitude

func (buo *BranchUpdateOne) SetLongitude(f float64) *BranchUpdateOne

SetLongitude sets the "longitude" field.

func (*BranchUpdateOne) SetNillableOwnerID

func (buo *BranchUpdateOne) SetNillableOwnerID(id *int) *BranchUpdateOne

SetNillableOwnerID sets the "owner" edge to the Bank entity by ID if the given value is not nil.

func (*BranchUpdateOne) SetOwner

func (buo *BranchUpdateOne) SetOwner(b *Bank) *BranchUpdateOne

SetOwner sets the "owner" edge to the Bank entity.

func (*BranchUpdateOne) SetOwnerID

func (buo *BranchUpdateOne) SetOwnerID(id int) *BranchUpdateOne

SetOwnerID sets the "owner" edge to the Bank entity by ID.

func (*BranchUpdateOne) SetState

func (buo *BranchUpdateOne) SetState(s string) *BranchUpdateOne

SetState sets the "state" field.

func (*BranchUpdateOne) SetStreetName

func (buo *BranchUpdateOne) SetStreetName(s string) *BranchUpdateOne

SetStreetName sets the "streetName" field.

func (*BranchUpdateOne) SetStreetNumber

func (buo *BranchUpdateOne) SetStreetNumber(s string) *BranchUpdateOne

SetStreetNumber sets the "streetNumber" field.

func (*BranchUpdateOne) SetZip

func (buo *BranchUpdateOne) SetZip(s string) *BranchUpdateOne

SetZip sets the "zip" field.

type Branches

type Branches []*Branch

Branches is a parsable slice of Branch.

type Card

type Card struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type card.Type `json:"type,omitempty"`
	// Number holds the value of the "number" field.
	Number string `json:"number,omitempty"`
	// StartDate holds the value of the "startDate" field.
	StartDate time.Time `json:"startDate,omitempty"`
	// ExpiryDate holds the value of the "expiryDate" field.
	ExpiryDate time.Time `json:"expiryDate,omitempty"`
	// HolderName holds the value of the "holderName" field.
	HolderName string `json:"holderName,omitempty"`
	// Status holds the value of the "status" field.
	Status card.Status `json:"status,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CardQuery when eager-loading is set.
	Edges CardEdges `json:"edges"`
	// contains filtered or unexported fields
}

Card is the model entity for the Card schema.

func (*Card) QueryAccount

func (c *Card) QueryAccount() *AccountQuery

QueryAccount queries the "account" edge of the Card entity.

func (*Card) QueryNetwork

func (c *Card) QueryNetwork() *CardNetworkQuery

QueryNetwork queries the "network" edge of the Card entity.

func (*Card) String

func (c *Card) String() string

String implements the fmt.Stringer.

func (*Card) Unwrap

func (c *Card) Unwrap() *Card

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

func (c *Card) Update() *CardUpdateOne

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

type CardClient

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

CardClient is a client for the Card schema.

func NewCardClient

func NewCardClient(c config) *CardClient

NewCardClient returns a client for the Card from the given config.

func (*CardClient) Create

func (c *CardClient) Create() *CardCreate

Create returns a create builder for Card.

func (*CardClient) CreateBulk

func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk

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

func (*CardClient) Delete

func (c *CardClient) Delete() *CardDelete

Delete returns a delete builder for Card.

func (*CardClient) DeleteOne

func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*CardClient) DeleteOneID

func (c *CardClient) DeleteOneID(id int) *CardDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*CardClient) Get

func (c *CardClient) Get(ctx context.Context, id int) (*Card, error)

Get returns a Card entity by its id.

func (*CardClient) GetX

func (c *CardClient) GetX(ctx context.Context, id int) *Card

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

func (*CardClient) Hooks

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

Hooks returns the client hooks.

func (*CardClient) Query

func (c *CardClient) Query() *CardQuery

Query returns a query builder for Card.

func (*CardClient) QueryAccount

func (c *CardClient) QueryAccount(ca *Card) *AccountQuery

QueryAccount queries the account edge of a Card.

func (*CardClient) QueryNetwork

func (c *CardClient) QueryNetwork(ca *Card) *CardNetworkQuery

QueryNetwork queries the network edge of a Card.

func (*CardClient) Update

func (c *CardClient) Update() *CardUpdate

Update returns an update builder for Card.

func (*CardClient) UpdateOne

func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CardClient) UpdateOneID

func (c *CardClient) UpdateOneID(id int) *CardUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CardClient) Use

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

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

type CardCreate

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

CardCreate is the builder for creating a Card entity.

func (*CardCreate) Mutation

func (cc *CardCreate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardCreate) Save

func (cc *CardCreate) Save(ctx context.Context) (*Card, error)

Save creates the Card in the database.

func (*CardCreate) SaveX

func (cc *CardCreate) SaveX(ctx context.Context) *Card

SaveX calls Save and panics if Save returns an error.

func (*CardCreate) SetAccount

func (cc *CardCreate) SetAccount(a *Account) *CardCreate

SetAccount sets the "account" edge to the Account entity.

func (*CardCreate) SetAccountID

func (cc *CardCreate) SetAccountID(id uuid.UUID) *CardCreate

SetAccountID sets the "account" edge to the Account entity by ID.

func (*CardCreate) SetExpiryDate

func (cc *CardCreate) SetExpiryDate(t time.Time) *CardCreate

SetExpiryDate sets the "expiryDate" field.

func (*CardCreate) SetHolderName

func (cc *CardCreate) SetHolderName(s string) *CardCreate

SetHolderName sets the "holderName" field.

func (*CardCreate) SetNetwork

func (cc *CardCreate) SetNetwork(c *CardNetwork) *CardCreate

SetNetwork sets the "network" edge to the CardNetwork entity.

func (*CardCreate) SetNetworkID

func (cc *CardCreate) SetNetworkID(id int) *CardCreate

SetNetworkID sets the "network" edge to the CardNetwork entity by ID.

func (*CardCreate) SetNillableAccountID

func (cc *CardCreate) SetNillableAccountID(id *uuid.UUID) *CardCreate

SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.

func (*CardCreate) SetNillableNetworkID

func (cc *CardCreate) SetNillableNetworkID(id *int) *CardCreate

SetNillableNetworkID sets the "network" edge to the CardNetwork entity by ID if the given value is not nil.

func (*CardCreate) SetNumber

func (cc *CardCreate) SetNumber(s string) *CardCreate

SetNumber sets the "number" field.

func (*CardCreate) SetStartDate

func (cc *CardCreate) SetStartDate(t time.Time) *CardCreate

SetStartDate sets the "startDate" field.

func (*CardCreate) SetStatus

func (cc *CardCreate) SetStatus(c card.Status) *CardCreate

SetStatus sets the "status" field.

func (*CardCreate) SetType

func (cc *CardCreate) SetType(c card.Type) *CardCreate

SetType sets the "type" field.

func (*CardCreate) SetURL

func (cc *CardCreate) SetURL(s string) *CardCreate

SetURL sets the "url" field.

type CardCreateBulk

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

CardCreateBulk is the builder for creating many Card entities in bulk.

func (*CardCreateBulk) Save

func (ccb *CardCreateBulk) Save(ctx context.Context) ([]*Card, error)

Save creates the Card entities in the database.

func (*CardCreateBulk) SaveX

func (ccb *CardCreateBulk) SaveX(ctx context.Context) []*Card

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

type CardDelete

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

CardDelete is the builder for deleting a Card entity.

func (*CardDelete) Exec

func (cd *CardDelete) Exec(ctx context.Context) (int, error)

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

func (*CardDelete) ExecX

func (cd *CardDelete) ExecX(ctx context.Context) int

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

func (*CardDelete) Where

func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete

Where adds a new predicate to the CardDelete builder.

type CardDeleteOne

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

CardDeleteOne is the builder for deleting a single Card entity.

func (*CardDeleteOne) Exec

func (cdo *CardDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CardDeleteOne) ExecX

func (cdo *CardDeleteOne) ExecX(ctx context.Context)

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

type CardEdges

type CardEdges struct {
	// Network holds the value of the network edge.
	Network *CardNetwork `json:"network,omitempty"`
	// Account holds the value of the account edge.
	Account *Account `json:"account,omitempty"`
	// contains filtered or unexported fields
}

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

func (CardEdges) AccountOrErr

func (e CardEdges) AccountOrErr() (*Account, error)

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

func (CardEdges) NetworkOrErr

func (e CardEdges) NetworkOrErr() (*CardNetwork, error)

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

type CardGroupBy

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

CardGroupBy is the group-by builder for Card entities.

func (*CardGroupBy) Aggregate

func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy

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

func (*CardGroupBy) Bool

func (cgb *CardGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) BoolX

func (cgb *CardGroupBy) BoolX(ctx context.Context) bool

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

func (*CardGroupBy) Bools

func (cgb *CardGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) BoolsX

func (cgb *CardGroupBy) BoolsX(ctx context.Context) []bool

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

func (*CardGroupBy) Float64

func (cgb *CardGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) Float64X

func (cgb *CardGroupBy) Float64X(ctx context.Context) float64

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

func (*CardGroupBy) Float64s

func (cgb *CardGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) Float64sX

func (cgb *CardGroupBy) Float64sX(ctx context.Context) []float64

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

func (*CardGroupBy) Int

func (cgb *CardGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) IntX

func (cgb *CardGroupBy) IntX(ctx context.Context) int

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

func (*CardGroupBy) Ints

func (cgb *CardGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) IntsX

func (cgb *CardGroupBy) IntsX(ctx context.Context) []int

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

func (*CardGroupBy) Scan

func (cgb *CardGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*CardGroupBy) ScanX

func (cgb *CardGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*CardGroupBy) String

func (cgb *CardGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) StringX

func (cgb *CardGroupBy) StringX(ctx context.Context) string

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

func (*CardGroupBy) Strings

func (cgb *CardGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) StringsX

func (cgb *CardGroupBy) StringsX(ctx context.Context) []string

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

type CardMutation

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

CardMutation represents an operation that mutates the Card nodes in the graph.

func (*CardMutation) AccountCleared

func (m *CardMutation) AccountCleared() bool

AccountCleared returns if the "account" edge to the Account entity was cleared.

func (*CardMutation) AccountID

func (m *CardMutation) AccountID() (id uuid.UUID, exists bool)

AccountID returns the "account" edge ID in the mutation.

func (*CardMutation) AccountIDs

func (m *CardMutation) AccountIDs() (ids []uuid.UUID)

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

func (*CardMutation) AddField

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

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

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

func (*CardMutation) AddedField

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

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

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

func (*CardMutation) AddedIDs

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

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

func (*CardMutation) ClearAccount

func (m *CardMutation) ClearAccount()

ClearAccount clears the "account" edge to the Account entity.

func (*CardMutation) ClearEdge

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

func (m *CardMutation) 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 (*CardMutation) ClearNetwork

func (m *CardMutation) ClearNetwork()

ClearNetwork clears the "network" edge to the CardNetwork entity.

func (*CardMutation) ClearedEdges

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

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

func (*CardMutation) ClearedFields

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

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

func (CardMutation) Client

func (m CardMutation) 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 (*CardMutation) EdgeCleared

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

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

func (*CardMutation) ExpiryDate

func (m *CardMutation) ExpiryDate() (r time.Time, exists bool)

ExpiryDate returns the value of the "expiryDate" field in the mutation.

func (*CardMutation) Field

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

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

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

func (*CardMutation) Fields

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

func (m *CardMutation) GetType() (r card.Type, exists bool)

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

func (*CardMutation) HolderName

func (m *CardMutation) HolderName() (r string, exists bool)

HolderName returns the value of the "holderName" field in the mutation.

func (*CardMutation) ID

func (m *CardMutation) 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.

func (*CardMutation) NetworkCleared

func (m *CardMutation) NetworkCleared() bool

NetworkCleared returns if the "network" edge to the CardNetwork entity was cleared.

func (*CardMutation) NetworkID

func (m *CardMutation) NetworkID() (id int, exists bool)

NetworkID returns the "network" edge ID in the mutation.

func (*CardMutation) NetworkIDs

func (m *CardMutation) NetworkIDs() (ids []int)

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

func (*CardMutation) Number

func (m *CardMutation) Number() (r string, exists bool)

Number returns the value of the "number" field in the mutation.

func (*CardMutation) OldExpiryDate

func (m *CardMutation) OldExpiryDate(ctx context.Context) (v time.Time, err error)

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

func (*CardMutation) OldField

func (m *CardMutation) 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 (*CardMutation) OldHolderName

func (m *CardMutation) OldHolderName(ctx context.Context) (v string, err error)

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

func (*CardMutation) OldNumber

func (m *CardMutation) OldNumber(ctx context.Context) (v string, err error)

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

func (*CardMutation) OldStartDate

func (m *CardMutation) OldStartDate(ctx context.Context) (v time.Time, err error)

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

func (*CardMutation) OldStatus

func (m *CardMutation) OldStatus(ctx context.Context) (v card.Status, err error)

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

func (*CardMutation) OldType

func (m *CardMutation) OldType(ctx context.Context) (v card.Type, err error)

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

func (*CardMutation) OldURL

func (m *CardMutation) OldURL(ctx context.Context) (v string, err error)

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

func (*CardMutation) Op

func (m *CardMutation) Op() Op

Op returns the operation name.

func (*CardMutation) RemovedEdges

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

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

func (*CardMutation) RemovedIDs

func (m *CardMutation) 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 (*CardMutation) ResetAccount

func (m *CardMutation) ResetAccount()

ResetAccount resets all changes to the "account" edge.

func (*CardMutation) ResetEdge

func (m *CardMutation) 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 (*CardMutation) ResetExpiryDate

func (m *CardMutation) ResetExpiryDate()

ResetExpiryDate resets all changes to the "expiryDate" field.

func (*CardMutation) ResetField

func (m *CardMutation) 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 (*CardMutation) ResetHolderName

func (m *CardMutation) ResetHolderName()

ResetHolderName resets all changes to the "holderName" field.

func (*CardMutation) ResetNetwork

func (m *CardMutation) ResetNetwork()

ResetNetwork resets all changes to the "network" edge.

func (*CardMutation) ResetNumber

func (m *CardMutation) ResetNumber()

ResetNumber resets all changes to the "number" field.

func (*CardMutation) ResetStartDate

func (m *CardMutation) ResetStartDate()

ResetStartDate resets all changes to the "startDate" field.

func (*CardMutation) ResetStatus

func (m *CardMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*CardMutation) ResetType

func (m *CardMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*CardMutation) ResetURL

func (m *CardMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*CardMutation) SetAccountID

func (m *CardMutation) SetAccountID(id uuid.UUID)

SetAccountID sets the "account" edge to the Account entity by id.

func (*CardMutation) SetExpiryDate

func (m *CardMutation) SetExpiryDate(t time.Time)

SetExpiryDate sets the "expiryDate" field.

func (*CardMutation) SetField

func (m *CardMutation) 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 (*CardMutation) SetHolderName

func (m *CardMutation) SetHolderName(s string)

SetHolderName sets the "holderName" field.

func (*CardMutation) SetNetworkID

func (m *CardMutation) SetNetworkID(id int)

SetNetworkID sets the "network" edge to the CardNetwork entity by id.

func (*CardMutation) SetNumber

func (m *CardMutation) SetNumber(s string)

SetNumber sets the "number" field.

func (*CardMutation) SetStartDate

func (m *CardMutation) SetStartDate(t time.Time)

SetStartDate sets the "startDate" field.

func (*CardMutation) SetStatus

func (m *CardMutation) SetStatus(c card.Status)

SetStatus sets the "status" field.

func (*CardMutation) SetType

func (m *CardMutation) SetType(c card.Type)

SetType sets the "type" field.

func (*CardMutation) SetURL

func (m *CardMutation) SetURL(s string)

SetURL sets the "url" field.

func (*CardMutation) StartDate

func (m *CardMutation) StartDate() (r time.Time, exists bool)

StartDate returns the value of the "startDate" field in the mutation.

func (*CardMutation) Status

func (m *CardMutation) Status() (r card.Status, exists bool)

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

func (CardMutation) Tx

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

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

func (*CardMutation) Type

func (m *CardMutation) Type() string

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

func (*CardMutation) URL

func (m *CardMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

type CardNetwork

type CardNetwork struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Code holds the value of the "code" field.
	Code string `json:"code,omitempty"`
	// contains filtered or unexported fields
}

CardNetwork is the model entity for the CardNetwork schema.

func (*CardNetwork) String

func (cn *CardNetwork) String() string

String implements the fmt.Stringer.

func (*CardNetwork) Unwrap

func (cn *CardNetwork) Unwrap() *CardNetwork

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

func (cn *CardNetwork) Update() *CardNetworkUpdateOne

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

type CardNetworkClient

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

CardNetworkClient is a client for the CardNetwork schema.

func NewCardNetworkClient

func NewCardNetworkClient(c config) *CardNetworkClient

NewCardNetworkClient returns a client for the CardNetwork from the given config.

func (*CardNetworkClient) Create

func (c *CardNetworkClient) Create() *CardNetworkCreate

Create returns a create builder for CardNetwork.

func (*CardNetworkClient) CreateBulk

func (c *CardNetworkClient) CreateBulk(builders ...*CardNetworkCreate) *CardNetworkCreateBulk

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

func (*CardNetworkClient) Delete

func (c *CardNetworkClient) Delete() *CardNetworkDelete

Delete returns a delete builder for CardNetwork.

func (*CardNetworkClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*CardNetworkClient) DeleteOneID

func (c *CardNetworkClient) DeleteOneID(id int) *CardNetworkDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*CardNetworkClient) Get

func (c *CardNetworkClient) Get(ctx context.Context, id int) (*CardNetwork, error)

Get returns a CardNetwork entity by its id.

func (*CardNetworkClient) GetX

func (c *CardNetworkClient) GetX(ctx context.Context, id int) *CardNetwork

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

func (*CardNetworkClient) Hooks

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

Hooks returns the client hooks.

func (*CardNetworkClient) Query

func (c *CardNetworkClient) Query() *CardNetworkQuery

Query returns a query builder for CardNetwork.

func (*CardNetworkClient) Update

func (c *CardNetworkClient) Update() *CardNetworkUpdate

Update returns an update builder for CardNetwork.

func (*CardNetworkClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CardNetworkClient) UpdateOneID

func (c *CardNetworkClient) UpdateOneID(id int) *CardNetworkUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CardNetworkClient) Use

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

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

type CardNetworkCreate

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

CardNetworkCreate is the builder for creating a CardNetwork entity.

func (*CardNetworkCreate) Mutation

func (cnc *CardNetworkCreate) Mutation() *CardNetworkMutation

Mutation returns the CardNetworkMutation object of the builder.

func (*CardNetworkCreate) Save

func (cnc *CardNetworkCreate) Save(ctx context.Context) (*CardNetwork, error)

Save creates the CardNetwork in the database.

func (*CardNetworkCreate) SaveX

func (cnc *CardNetworkCreate) SaveX(ctx context.Context) *CardNetwork

SaveX calls Save and panics if Save returns an error.

func (*CardNetworkCreate) SetCode

func (cnc *CardNetworkCreate) SetCode(s string) *CardNetworkCreate

SetCode sets the "code" field.

func (*CardNetworkCreate) SetName

func (cnc *CardNetworkCreate) SetName(s string) *CardNetworkCreate

SetName sets the "name" field.

type CardNetworkCreateBulk

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

CardNetworkCreateBulk is the builder for creating many CardNetwork entities in bulk.

func (*CardNetworkCreateBulk) Save

func (cncb *CardNetworkCreateBulk) Save(ctx context.Context) ([]*CardNetwork, error)

Save creates the CardNetwork entities in the database.

func (*CardNetworkCreateBulk) SaveX

func (cncb *CardNetworkCreateBulk) SaveX(ctx context.Context) []*CardNetwork

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

type CardNetworkDelete

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

CardNetworkDelete is the builder for deleting a CardNetwork entity.

func (*CardNetworkDelete) Exec

func (cnd *CardNetworkDelete) Exec(ctx context.Context) (int, error)

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

func (*CardNetworkDelete) ExecX

func (cnd *CardNetworkDelete) ExecX(ctx context.Context) int

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

func (*CardNetworkDelete) Where

Where adds a new predicate to the CardNetworkDelete builder.

type CardNetworkDeleteOne

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

CardNetworkDeleteOne is the builder for deleting a single CardNetwork entity.

func (*CardNetworkDeleteOne) Exec

func (cndo *CardNetworkDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CardNetworkDeleteOne) ExecX

func (cndo *CardNetworkDeleteOne) ExecX(ctx context.Context)

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

type CardNetworkGroupBy

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

CardNetworkGroupBy is the group-by builder for CardNetwork entities.

func (*CardNetworkGroupBy) Aggregate

func (cngb *CardNetworkGroupBy) Aggregate(fns ...AggregateFunc) *CardNetworkGroupBy

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

func (*CardNetworkGroupBy) Bool

func (cngb *CardNetworkGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) BoolX

func (cngb *CardNetworkGroupBy) BoolX(ctx context.Context) bool

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

func (*CardNetworkGroupBy) Bools

func (cngb *CardNetworkGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) BoolsX

func (cngb *CardNetworkGroupBy) BoolsX(ctx context.Context) []bool

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

func (*CardNetworkGroupBy) Float64

func (cngb *CardNetworkGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) Float64X

func (cngb *CardNetworkGroupBy) Float64X(ctx context.Context) float64

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

func (*CardNetworkGroupBy) Float64s

func (cngb *CardNetworkGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) Float64sX

func (cngb *CardNetworkGroupBy) Float64sX(ctx context.Context) []float64

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

func (*CardNetworkGroupBy) Int

func (cngb *CardNetworkGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) IntX

func (cngb *CardNetworkGroupBy) IntX(ctx context.Context) int

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

func (*CardNetworkGroupBy) Ints

func (cngb *CardNetworkGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) IntsX

func (cngb *CardNetworkGroupBy) IntsX(ctx context.Context) []int

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

func (*CardNetworkGroupBy) Scan

func (cngb *CardNetworkGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*CardNetworkGroupBy) ScanX

func (cngb *CardNetworkGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*CardNetworkGroupBy) String

func (cngb *CardNetworkGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) StringX

func (cngb *CardNetworkGroupBy) StringX(ctx context.Context) string

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

func (*CardNetworkGroupBy) Strings

func (cngb *CardNetworkGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*CardNetworkGroupBy) StringsX

func (cngb *CardNetworkGroupBy) StringsX(ctx context.Context) []string

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

type CardNetworkMutation

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

CardNetworkMutation represents an operation that mutates the CardNetwork nodes in the graph.

func (*CardNetworkMutation) AddField

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

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

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

func (*CardNetworkMutation) AddedField

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

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

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

func (*CardNetworkMutation) AddedIDs

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

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

func (*CardNetworkMutation) ClearEdge

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

func (m *CardNetworkMutation) 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 (*CardNetworkMutation) ClearedEdges

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

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

func (*CardNetworkMutation) ClearedFields

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

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

func (CardNetworkMutation) Client

func (m CardNetworkMutation) 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 (*CardNetworkMutation) Code

func (m *CardNetworkMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*CardNetworkMutation) EdgeCleared

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

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

func (*CardNetworkMutation) Field

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

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

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

func (*CardNetworkMutation) Fields

func (m *CardNetworkMutation) 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 (*CardNetworkMutation) ID

func (m *CardNetworkMutation) 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.

func (*CardNetworkMutation) Name

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

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

func (*CardNetworkMutation) OldCode

func (m *CardNetworkMutation) OldCode(ctx context.Context) (v string, err error)

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

func (*CardNetworkMutation) OldField

func (m *CardNetworkMutation) 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 (*CardNetworkMutation) OldName

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

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

func (*CardNetworkMutation) Op

func (m *CardNetworkMutation) Op() Op

Op returns the operation name.

func (*CardNetworkMutation) RemovedEdges

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

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

func (*CardNetworkMutation) RemovedIDs

func (m *CardNetworkMutation) 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 (*CardNetworkMutation) ResetCode

func (m *CardNetworkMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*CardNetworkMutation) ResetEdge

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

func (m *CardNetworkMutation) 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 (*CardNetworkMutation) ResetName

func (m *CardNetworkMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CardNetworkMutation) SetCode

func (m *CardNetworkMutation) SetCode(s string)

SetCode sets the "code" field.

func (*CardNetworkMutation) SetField

func (m *CardNetworkMutation) 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 (*CardNetworkMutation) SetName

func (m *CardNetworkMutation) SetName(s string)

SetName sets the "name" field.

func (CardNetworkMutation) Tx

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

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

func (*CardNetworkMutation) Type

func (m *CardNetworkMutation) Type() string

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

type CardNetworkQuery

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

CardNetworkQuery is the builder for querying CardNetwork entities.

func (*CardNetworkQuery) All

func (cnq *CardNetworkQuery) All(ctx context.Context) ([]*CardNetwork, error)

All executes the query and returns a list of CardNetworks.

func (*CardNetworkQuery) AllX

func (cnq *CardNetworkQuery) AllX(ctx context.Context) []*CardNetwork

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

func (*CardNetworkQuery) Clone

func (cnq *CardNetworkQuery) Clone() *CardNetworkQuery

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

func (*CardNetworkQuery) Count

func (cnq *CardNetworkQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CardNetworkQuery) CountX

func (cnq *CardNetworkQuery) CountX(ctx context.Context) int

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

func (*CardNetworkQuery) Exist

func (cnq *CardNetworkQuery) Exist(ctx context.Context) (bool, error)

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

func (*CardNetworkQuery) ExistX

func (cnq *CardNetworkQuery) ExistX(ctx context.Context) bool

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

func (*CardNetworkQuery) First

func (cnq *CardNetworkQuery) First(ctx context.Context) (*CardNetwork, error)

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

func (*CardNetworkQuery) FirstID

func (cnq *CardNetworkQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CardNetworkQuery) FirstIDX

func (cnq *CardNetworkQuery) FirstIDX(ctx context.Context) int

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

func (*CardNetworkQuery) FirstX

func (cnq *CardNetworkQuery) FirstX(ctx context.Context) *CardNetwork

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

func (*CardNetworkQuery) GroupBy

func (cnq *CardNetworkQuery) GroupBy(field string, fields ...string) *CardNetworkGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CardNetwork.Query().
	GroupBy(cardnetwork.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CardNetworkQuery) IDs

func (cnq *CardNetworkQuery) IDs(ctx context.Context) ([]int, error)

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

func (*CardNetworkQuery) IDsX

func (cnq *CardNetworkQuery) IDsX(ctx context.Context) []int

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

func (*CardNetworkQuery) Limit

func (cnq *CardNetworkQuery) Limit(limit int) *CardNetworkQuery

Limit adds a limit step to the query.

func (*CardNetworkQuery) Offset

func (cnq *CardNetworkQuery) Offset(offset int) *CardNetworkQuery

Offset adds an offset step to the query.

func (*CardNetworkQuery) Only

func (cnq *CardNetworkQuery) Only(ctx context.Context) (*CardNetwork, error)

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

func (*CardNetworkQuery) OnlyID

func (cnq *CardNetworkQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CardNetworkQuery) OnlyIDX

func (cnq *CardNetworkQuery) OnlyIDX(ctx context.Context) int

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

func (*CardNetworkQuery) OnlyX

func (cnq *CardNetworkQuery) OnlyX(ctx context.Context) *CardNetwork

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

func (*CardNetworkQuery) Order

func (cnq *CardNetworkQuery) Order(o ...OrderFunc) *CardNetworkQuery

Order adds an order step to the query.

func (*CardNetworkQuery) Select

func (cnq *CardNetworkQuery) Select(field string, fields ...string) *CardNetworkSelect

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 {
	Name string `json:"name,omitempty"`
}

client.CardNetwork.Query().
	Select(cardnetwork.FieldName).
	Scan(ctx, &v)

func (*CardNetworkQuery) Where

Where adds a new predicate for the CardNetworkQuery builder.

type CardNetworkSelect

type CardNetworkSelect struct {
	*CardNetworkQuery
	// contains filtered or unexported fields
}

CardNetworkSelect is the builder for selecting fields of CardNetwork entities.

func (*CardNetworkSelect) Bool

func (cns *CardNetworkSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*CardNetworkSelect) BoolX

func (cns *CardNetworkSelect) BoolX(ctx context.Context) bool

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

func (*CardNetworkSelect) Bools

func (cns *CardNetworkSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*CardNetworkSelect) BoolsX

func (cns *CardNetworkSelect) BoolsX(ctx context.Context) []bool

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

func (*CardNetworkSelect) Float64

func (cns *CardNetworkSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*CardNetworkSelect) Float64X

func (cns *CardNetworkSelect) Float64X(ctx context.Context) float64

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

func (*CardNetworkSelect) Float64s

func (cns *CardNetworkSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*CardNetworkSelect) Float64sX

func (cns *CardNetworkSelect) Float64sX(ctx context.Context) []float64

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

func (*CardNetworkSelect) Int

func (cns *CardNetworkSelect) Int(ctx context.Context) (_ int, err error)

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

func (*CardNetworkSelect) IntX

func (cns *CardNetworkSelect) IntX(ctx context.Context) int

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

func (*CardNetworkSelect) Ints

func (cns *CardNetworkSelect) Ints(ctx context.Context) ([]int, error)

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

func (*CardNetworkSelect) IntsX

func (cns *CardNetworkSelect) IntsX(ctx context.Context) []int

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

func (*CardNetworkSelect) Scan

func (cns *CardNetworkSelect) Scan(ctx context.Context, v interface{}) error

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

func (*CardNetworkSelect) ScanX

func (cns *CardNetworkSelect) ScanX(ctx context.Context, v interface{})

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

func (*CardNetworkSelect) String

func (cns *CardNetworkSelect) String(ctx context.Context) (_ string, err error)

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

func (*CardNetworkSelect) StringX

func (cns *CardNetworkSelect) StringX(ctx context.Context) string

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

func (*CardNetworkSelect) Strings

func (cns *CardNetworkSelect) Strings(ctx context.Context) ([]string, error)

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

func (*CardNetworkSelect) StringsX

func (cns *CardNetworkSelect) StringsX(ctx context.Context) []string

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

type CardNetworkUpdate

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

CardNetworkUpdate is the builder for updating CardNetwork entities.

func (*CardNetworkUpdate) Exec

func (cnu *CardNetworkUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardNetworkUpdate) ExecX

func (cnu *CardNetworkUpdate) ExecX(ctx context.Context)

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

func (*CardNetworkUpdate) Mutation

func (cnu *CardNetworkUpdate) Mutation() *CardNetworkMutation

Mutation returns the CardNetworkMutation object of the builder.

func (*CardNetworkUpdate) Save

func (cnu *CardNetworkUpdate) Save(ctx context.Context) (int, error)

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

func (*CardNetworkUpdate) SaveX

func (cnu *CardNetworkUpdate) SaveX(ctx context.Context) int

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

func (*CardNetworkUpdate) SetCode

func (cnu *CardNetworkUpdate) SetCode(s string) *CardNetworkUpdate

SetCode sets the "code" field.

func (*CardNetworkUpdate) SetName

func (cnu *CardNetworkUpdate) SetName(s string) *CardNetworkUpdate

SetName sets the "name" field.

func (*CardNetworkUpdate) Where

Where adds a new predicate for the CardNetworkUpdate builder.

type CardNetworkUpdateOne

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

CardNetworkUpdateOne is the builder for updating a single CardNetwork entity.

func (*CardNetworkUpdateOne) Exec

func (cnuo *CardNetworkUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CardNetworkUpdateOne) ExecX

func (cnuo *CardNetworkUpdateOne) ExecX(ctx context.Context)

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

func (*CardNetworkUpdateOne) Mutation

func (cnuo *CardNetworkUpdateOne) Mutation() *CardNetworkMutation

Mutation returns the CardNetworkMutation object of the builder.

func (*CardNetworkUpdateOne) Save

Save executes the query and returns the updated CardNetwork entity.

func (*CardNetworkUpdateOne) SaveX

func (cnuo *CardNetworkUpdateOne) SaveX(ctx context.Context) *CardNetwork

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

func (*CardNetworkUpdateOne) SetCode

SetCode sets the "code" field.

func (*CardNetworkUpdateOne) SetName

SetName sets the "name" field.

type CardNetworks

type CardNetworks []*CardNetwork

CardNetworks is a parsable slice of CardNetwork.

type CardQuery

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

CardQuery is the builder for querying Card entities.

func (*CardQuery) All

func (cq *CardQuery) All(ctx context.Context) ([]*Card, error)

All executes the query and returns a list of Cards.

func (*CardQuery) AllX

func (cq *CardQuery) AllX(ctx context.Context) []*Card

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

func (*CardQuery) Clone

func (cq *CardQuery) Clone() *CardQuery

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

func (*CardQuery) Count

func (cq *CardQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CardQuery) CountX

func (cq *CardQuery) CountX(ctx context.Context) int

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

func (*CardQuery) Exist

func (cq *CardQuery) Exist(ctx context.Context) (bool, error)

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

func (*CardQuery) ExistX

func (cq *CardQuery) ExistX(ctx context.Context) bool

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

func (*CardQuery) First

func (cq *CardQuery) First(ctx context.Context) (*Card, error)

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

func (*CardQuery) FirstID

func (cq *CardQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CardQuery) FirstIDX

func (cq *CardQuery) FirstIDX(ctx context.Context) int

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

func (*CardQuery) FirstX

func (cq *CardQuery) FirstX(ctx context.Context) *Card

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

func (*CardQuery) GroupBy

func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy

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 {
	Type card.Type `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Card.Query().
	GroupBy(card.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CardQuery) IDs

func (cq *CardQuery) IDs(ctx context.Context) ([]int, error)

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

func (*CardQuery) IDsX

func (cq *CardQuery) IDsX(ctx context.Context) []int

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

func (*CardQuery) Limit

func (cq *CardQuery) Limit(limit int) *CardQuery

Limit adds a limit step to the query.

func (*CardQuery) Offset

func (cq *CardQuery) Offset(offset int) *CardQuery

Offset adds an offset step to the query.

func (*CardQuery) Only

func (cq *CardQuery) Only(ctx context.Context) (*Card, error)

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

func (*CardQuery) OnlyID

func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CardQuery) OnlyIDX

func (cq *CardQuery) OnlyIDX(ctx context.Context) int

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

func (*CardQuery) OnlyX

func (cq *CardQuery) OnlyX(ctx context.Context) *Card

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

func (*CardQuery) Order

func (cq *CardQuery) Order(o ...OrderFunc) *CardQuery

Order adds an order step to the query.

func (*CardQuery) QueryAccount

func (cq *CardQuery) QueryAccount() *AccountQuery

QueryAccount chains the current query on the "account" edge.

func (*CardQuery) QueryNetwork

func (cq *CardQuery) QueryNetwork() *CardNetworkQuery

QueryNetwork chains the current query on the "network" edge.

func (*CardQuery) Select

func (cq *CardQuery) Select(field string, fields ...string) *CardSelect

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 {
	Type card.Type `json:"type,omitempty"`
}

client.Card.Query().
	Select(card.FieldType).
	Scan(ctx, &v)

func (*CardQuery) Where

func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery

Where adds a new predicate for the CardQuery builder.

func (*CardQuery) WithAccount

func (cq *CardQuery) WithAccount(opts ...func(*AccountQuery)) *CardQuery

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

func (*CardQuery) WithNetwork

func (cq *CardQuery) WithNetwork(opts ...func(*CardNetworkQuery)) *CardQuery

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

type CardSelect

type CardSelect struct {
	*CardQuery
	// contains filtered or unexported fields
}

CardSelect is the builder for selecting fields of Card entities.

func (*CardSelect) Bool

func (cs *CardSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*CardSelect) BoolX

func (cs *CardSelect) BoolX(ctx context.Context) bool

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

func (*CardSelect) Bools

func (cs *CardSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*CardSelect) BoolsX

func (cs *CardSelect) BoolsX(ctx context.Context) []bool

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

func (*CardSelect) Float64

func (cs *CardSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*CardSelect) Float64X

func (cs *CardSelect) Float64X(ctx context.Context) float64

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

func (*CardSelect) Float64s

func (cs *CardSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*CardSelect) Float64sX

func (cs *CardSelect) Float64sX(ctx context.Context) []float64

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

func (*CardSelect) Int

func (cs *CardSelect) Int(ctx context.Context) (_ int, err error)

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

func (*CardSelect) IntX

func (cs *CardSelect) IntX(ctx context.Context) int

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

func (*CardSelect) Ints

func (cs *CardSelect) Ints(ctx context.Context) ([]int, error)

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

func (*CardSelect) IntsX

func (cs *CardSelect) IntsX(ctx context.Context) []int

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

func (*CardSelect) Scan

func (cs *CardSelect) Scan(ctx context.Context, v interface{}) error

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

func (*CardSelect) ScanX

func (cs *CardSelect) ScanX(ctx context.Context, v interface{})

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

func (*CardSelect) String

func (cs *CardSelect) String(ctx context.Context) (_ string, err error)

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

func (*CardSelect) StringX

func (cs *CardSelect) StringX(ctx context.Context) string

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

func (*CardSelect) Strings

func (cs *CardSelect) Strings(ctx context.Context) ([]string, error)

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

func (*CardSelect) StringsX

func (cs *CardSelect) StringsX(ctx context.Context) []string

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

type CardUpdate

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

CardUpdate is the builder for updating Card entities.

func (*CardUpdate) ClearAccount

func (cu *CardUpdate) ClearAccount() *CardUpdate

ClearAccount clears the "account" edge to the Account entity.

func (*CardUpdate) ClearNetwork

func (cu *CardUpdate) ClearNetwork() *CardUpdate

ClearNetwork clears the "network" edge to the CardNetwork entity.

func (*CardUpdate) Exec

func (cu *CardUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardUpdate) ExecX

func (cu *CardUpdate) ExecX(ctx context.Context)

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

func (*CardUpdate) Mutation

func (cu *CardUpdate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdate) Save

func (cu *CardUpdate) Save(ctx context.Context) (int, error)

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

func (*CardUpdate) SaveX

func (cu *CardUpdate) SaveX(ctx context.Context) int

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

func (*CardUpdate) SetAccount

func (cu *CardUpdate) SetAccount(a *Account) *CardUpdate

SetAccount sets the "account" edge to the Account entity.

func (*CardUpdate) SetAccountID

func (cu *CardUpdate) SetAccountID(id uuid.UUID) *CardUpdate

SetAccountID sets the "account" edge to the Account entity by ID.

func (*CardUpdate) SetExpiryDate

func (cu *CardUpdate) SetExpiryDate(t time.Time) *CardUpdate

SetExpiryDate sets the "expiryDate" field.

func (*CardUpdate) SetHolderName

func (cu *CardUpdate) SetHolderName(s string) *CardUpdate

SetHolderName sets the "holderName" field.

func (*CardUpdate) SetNetwork

func (cu *CardUpdate) SetNetwork(c *CardNetwork) *CardUpdate

SetNetwork sets the "network" edge to the CardNetwork entity.

func (*CardUpdate) SetNetworkID

func (cu *CardUpdate) SetNetworkID(id int) *CardUpdate

SetNetworkID sets the "network" edge to the CardNetwork entity by ID.

func (*CardUpdate) SetNillableAccountID

func (cu *CardUpdate) SetNillableAccountID(id *uuid.UUID) *CardUpdate

SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.

func (*CardUpdate) SetNillableNetworkID

func (cu *CardUpdate) SetNillableNetworkID(id *int) *CardUpdate

SetNillableNetworkID sets the "network" edge to the CardNetwork entity by ID if the given value is not nil.

func (*CardUpdate) SetNumber

func (cu *CardUpdate) SetNumber(s string) *CardUpdate

SetNumber sets the "number" field.

func (*CardUpdate) SetStartDate

func (cu *CardUpdate) SetStartDate(t time.Time) *CardUpdate

SetStartDate sets the "startDate" field.

func (*CardUpdate) SetStatus

func (cu *CardUpdate) SetStatus(c card.Status) *CardUpdate

SetStatus sets the "status" field.

func (*CardUpdate) SetType

func (cu *CardUpdate) SetType(c card.Type) *CardUpdate

SetType sets the "type" field.

func (*CardUpdate) SetURL

func (cu *CardUpdate) SetURL(s string) *CardUpdate

SetURL sets the "url" field.

func (*CardUpdate) Where

func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate

Where adds a new predicate for the CardUpdate builder.

type CardUpdateOne

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

CardUpdateOne is the builder for updating a single Card entity.

func (*CardUpdateOne) ClearAccount

func (cuo *CardUpdateOne) ClearAccount() *CardUpdateOne

ClearAccount clears the "account" edge to the Account entity.

func (*CardUpdateOne) ClearNetwork

func (cuo *CardUpdateOne) ClearNetwork() *CardUpdateOne

ClearNetwork clears the "network" edge to the CardNetwork entity.

func (*CardUpdateOne) Exec

func (cuo *CardUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CardUpdateOne) ExecX

func (cuo *CardUpdateOne) ExecX(ctx context.Context)

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

func (*CardUpdateOne) Mutation

func (cuo *CardUpdateOne) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdateOne) Save

func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)

Save executes the query and returns the updated Card entity.

func (*CardUpdateOne) SaveX

func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card

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

func (*CardUpdateOne) SetAccount

func (cuo *CardUpdateOne) SetAccount(a *Account) *CardUpdateOne

SetAccount sets the "account" edge to the Account entity.

func (*CardUpdateOne) SetAccountID

func (cuo *CardUpdateOne) SetAccountID(id uuid.UUID) *CardUpdateOne

SetAccountID sets the "account" edge to the Account entity by ID.

func (*CardUpdateOne) SetExpiryDate

func (cuo *CardUpdateOne) SetExpiryDate(t time.Time) *CardUpdateOne

SetExpiryDate sets the "expiryDate" field.

func (*CardUpdateOne) SetHolderName

func (cuo *CardUpdateOne) SetHolderName(s string) *CardUpdateOne

SetHolderName sets the "holderName" field.

func (*CardUpdateOne) SetNetwork

func (cuo *CardUpdateOne) SetNetwork(c *CardNetwork) *CardUpdateOne

SetNetwork sets the "network" edge to the CardNetwork entity.

func (*CardUpdateOne) SetNetworkID

func (cuo *CardUpdateOne) SetNetworkID(id int) *CardUpdateOne

SetNetworkID sets the "network" edge to the CardNetwork entity by ID.

func (*CardUpdateOne) SetNillableAccountID

func (cuo *CardUpdateOne) SetNillableAccountID(id *uuid.UUID) *CardUpdateOne

SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.

func (*CardUpdateOne) SetNillableNetworkID

func (cuo *CardUpdateOne) SetNillableNetworkID(id *int) *CardUpdateOne

SetNillableNetworkID sets the "network" edge to the CardNetwork entity by ID if the given value is not nil.

func (*CardUpdateOne) SetNumber

func (cuo *CardUpdateOne) SetNumber(s string) *CardUpdateOne

SetNumber sets the "number" field.

func (*CardUpdateOne) SetStartDate

func (cuo *CardUpdateOne) SetStartDate(t time.Time) *CardUpdateOne

SetStartDate sets the "startDate" field.

func (*CardUpdateOne) SetStatus

func (cuo *CardUpdateOne) SetStatus(c card.Status) *CardUpdateOne

SetStatus sets the "status" field.

func (*CardUpdateOne) SetType

func (cuo *CardUpdateOne) SetType(c card.Type) *CardUpdateOne

SetType sets the "type" field.

func (*CardUpdateOne) SetURL

func (cuo *CardUpdateOne) SetURL(s string) *CardUpdateOne

SetURL sets the "url" field.

type Cards

type Cards []*Card

Cards is a parsable slice of Card.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// Bank is the client for interacting with the Bank builders.
	Bank *BankClient
	// BinaryItem is the client for interacting with the BinaryItem builders.
	BinaryItem *BinaryItemClient
	// Branch is the client for interacting with the Branch builders.
	Branch *BranchClient
	// Card is the client for interacting with the Card builders.
	Card *CardClient
	// CardNetwork is the client for interacting with the CardNetwork builders.
	CardNetwork *CardNetworkClient
	// Entity is the client for interacting with the Entity builders.
	Entity *EntityClient
	// EntityAddress is the client for interacting with the EntityAddress builders.
	EntityAddress *EntityAddressClient
	// EntityContactPoint is the client for interacting with the EntityContactPoint builders.
	EntityContactPoint *EntityContactPointClient
	// EntityTaxInformation is the client for interacting with the EntityTaxInformation builders.
	EntityTaxInformation *EntityTaxInformationClient
	// Preference is the client for interacting with the Preference builders.
	Preference *PreferenceClient
	// Product is the client for interacting with the Product builders.
	Product *ProductClient
	// RoutingNumber is the client for interacting with the RoutingNumber builders.
	RoutingNumber *RoutingNumberClient
	// Transaction is the client for interacting with the Transaction builders.
	Transaction *TransactionClient
	// 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().
	Account.
	Query().
	Count(ctx)

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(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 Committer 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 Entities

type Entities []*Entity

Entities is a parsable slice of Entity.

type Entity

type Entity struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// DateCreated holds the value of the "dateCreated" field.
	DateCreated time.Time `json:"dateCreated,omitempty"`
	// Firstname holds the value of the "firstname" field.
	Firstname string `json:"firstname,omitempty"`
	// Lastname holds the value of the "lastname" field.
	Lastname string `json:"lastname,omitempty"`
	// Fullname holds the value of the "fullname" field.
	Fullname string `json:"fullname,omitempty"`
	// DateOfBirth holds the value of the "dateOfBirth" field.
	DateOfBirth time.Time `json:"dateOfBirth,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// Type holds the value of the "type" field.
	Type entity.Type `json:"type,omitempty"`
	// LastLoginDate holds the value of the "lastLoginDate" field.
	LastLoginDate time.Time `json:"lastLoginDate,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// Token holds the value of the "token" field.
	Token string `json:"token,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EntityQuery when eager-loading is set.
	Edges EntityEdges `json:"edges"`
	// contains filtered or unexported fields
}

Entity is the model entity for the Entity schema.

func (*Entity) QueryAddresses

func (e *Entity) QueryAddresses() *EntityAddressQuery

QueryAddresses queries the "addresses" edge of the Entity entity.

func (*Entity) QueryContactPoints

func (e *Entity) QueryContactPoints() *EntityContactPointQuery

QueryContactPoints queries the "contactPoints" edge of the Entity entity.

func (*Entity) QueryOwnsAccount

func (e *Entity) QueryOwnsAccount() *AccountQuery

QueryOwnsAccount queries the "owns_account" edge of the Entity entity.

func (*Entity) QueryPreferences

func (e *Entity) QueryPreferences() *PreferenceQuery

QueryPreferences queries the "preferences" edge of the Entity entity.

func (*Entity) QueryTaxSpecifications

func (e *Entity) QueryTaxSpecifications() *EntityTaxInformationQuery

QueryTaxSpecifications queries the "taxSpecifications" edge of the Entity entity.

func (*Entity) String

func (e *Entity) String() string

String implements the fmt.Stringer.

func (*Entity) Unwrap

func (e *Entity) Unwrap() *Entity

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

func (e *Entity) Update() *EntityUpdateOne

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

type EntityAddress

type EntityAddress struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Country holds the value of the "country" field.
	Country string `json:"country,omitempty"`
	// City holds the value of the "city" field.
	City string `json:"city,omitempty"`
	// PostalCode holds the value of the "postalCode" field.
	PostalCode string `json:"postalCode,omitempty"`
	// State holds the value of the "state" field.
	State string `json:"state,omitempty"`
	// Type holds the value of the "type" field.
	Type entityaddress.Type `json:"type,omitempty"`
	// Line1 holds the value of the "line1" field.
	Line1 string `json:"line1,omitempty"`
	// Line2 holds the value of the "line2" field.
	Line2 string `json:"line2,omitempty"`
	// Line3 holds the value of the "line3" field.
	Line3 string `json:"line3,omitempty"`
	// Primary holds the value of the "primary" field.
	Primary bool `json:"primary,omitempty"`
	// contains filtered or unexported fields
}

EntityAddress is the model entity for the EntityAddress schema.

func (*EntityAddress) String

func (ea *EntityAddress) String() string

String implements the fmt.Stringer.

func (*EntityAddress) Unwrap

func (ea *EntityAddress) Unwrap() *EntityAddress

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

func (ea *EntityAddress) Update() *EntityAddressUpdateOne

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

type EntityAddressClient

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

EntityAddressClient is a client for the EntityAddress schema.

func NewEntityAddressClient

func NewEntityAddressClient(c config) *EntityAddressClient

NewEntityAddressClient returns a client for the EntityAddress from the given config.

func (*EntityAddressClient) Create

Create returns a create builder for EntityAddress.

func (*EntityAddressClient) CreateBulk

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

func (*EntityAddressClient) Delete

Delete returns a delete builder for EntityAddress.

func (*EntityAddressClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*EntityAddressClient) DeleteOneID

func (c *EntityAddressClient) DeleteOneID(id int) *EntityAddressDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*EntityAddressClient) Get

Get returns a EntityAddress entity by its id.

func (*EntityAddressClient) GetX

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

func (*EntityAddressClient) Hooks

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

Hooks returns the client hooks.

func (*EntityAddressClient) Query

Query returns a query builder for EntityAddress.

func (*EntityAddressClient) Update

Update returns an update builder for EntityAddress.

func (*EntityAddressClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EntityAddressClient) UpdateOneID

func (c *EntityAddressClient) UpdateOneID(id int) *EntityAddressUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EntityAddressClient) Use

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

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

type EntityAddressCreate

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

EntityAddressCreate is the builder for creating a EntityAddress entity.

func (*EntityAddressCreate) Mutation

func (eac *EntityAddressCreate) Mutation() *EntityAddressMutation

Mutation returns the EntityAddressMutation object of the builder.

func (*EntityAddressCreate) Save

Save creates the EntityAddress in the database.

func (*EntityAddressCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EntityAddressCreate) SetCity

SetCity sets the "city" field.

func (*EntityAddressCreate) SetCountry

func (eac *EntityAddressCreate) SetCountry(s string) *EntityAddressCreate

SetCountry sets the "country" field.

func (*EntityAddressCreate) SetLine1

SetLine1 sets the "line1" field.

func (*EntityAddressCreate) SetLine2

SetLine2 sets the "line2" field.

func (*EntityAddressCreate) SetLine3

SetLine3 sets the "line3" field.

func (*EntityAddressCreate) SetNillableLine2

func (eac *EntityAddressCreate) SetNillableLine2(s *string) *EntityAddressCreate

SetNillableLine2 sets the "line2" field if the given value is not nil.

func (*EntityAddressCreate) SetNillableLine3

func (eac *EntityAddressCreate) SetNillableLine3(s *string) *EntityAddressCreate

SetNillableLine3 sets the "line3" field if the given value is not nil.

func (*EntityAddressCreate) SetPostalCode

func (eac *EntityAddressCreate) SetPostalCode(s string) *EntityAddressCreate

SetPostalCode sets the "postalCode" field.

func (*EntityAddressCreate) SetPrimary

func (eac *EntityAddressCreate) SetPrimary(b bool) *EntityAddressCreate

SetPrimary sets the "primary" field.

func (*EntityAddressCreate) SetState

SetState sets the "state" field.

func (*EntityAddressCreate) SetType

SetType sets the "type" field.

type EntityAddressCreateBulk

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

EntityAddressCreateBulk is the builder for creating many EntityAddress entities in bulk.

func (*EntityAddressCreateBulk) Save

Save creates the EntityAddress entities in the database.

func (*EntityAddressCreateBulk) SaveX

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

type EntityAddressDelete

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

EntityAddressDelete is the builder for deleting a EntityAddress entity.

func (*EntityAddressDelete) Exec

func (ead *EntityAddressDelete) Exec(ctx context.Context) (int, error)

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

func (*EntityAddressDelete) ExecX

func (ead *EntityAddressDelete) ExecX(ctx context.Context) int

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

func (*EntityAddressDelete) Where

Where adds a new predicate to the EntityAddressDelete builder.

type EntityAddressDeleteOne

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

EntityAddressDeleteOne is the builder for deleting a single EntityAddress entity.

func (*EntityAddressDeleteOne) Exec

func (eado *EntityAddressDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EntityAddressDeleteOne) ExecX

func (eado *EntityAddressDeleteOne) ExecX(ctx context.Context)

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

type EntityAddressGroupBy

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

EntityAddressGroupBy is the group-by builder for EntityAddress entities.

func (*EntityAddressGroupBy) Aggregate

func (eagb *EntityAddressGroupBy) Aggregate(fns ...AggregateFunc) *EntityAddressGroupBy

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

func (*EntityAddressGroupBy) Bool

func (eagb *EntityAddressGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) BoolX

func (eagb *EntityAddressGroupBy) BoolX(ctx context.Context) bool

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

func (*EntityAddressGroupBy) Bools

func (eagb *EntityAddressGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) BoolsX

func (eagb *EntityAddressGroupBy) BoolsX(ctx context.Context) []bool

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

func (*EntityAddressGroupBy) Float64

func (eagb *EntityAddressGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) Float64X

func (eagb *EntityAddressGroupBy) Float64X(ctx context.Context) float64

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

func (*EntityAddressGroupBy) Float64s

func (eagb *EntityAddressGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) Float64sX

func (eagb *EntityAddressGroupBy) Float64sX(ctx context.Context) []float64

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

func (*EntityAddressGroupBy) Int

func (eagb *EntityAddressGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) IntX

func (eagb *EntityAddressGroupBy) IntX(ctx context.Context) int

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

func (*EntityAddressGroupBy) Ints

func (eagb *EntityAddressGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) IntsX

func (eagb *EntityAddressGroupBy) IntsX(ctx context.Context) []int

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

func (*EntityAddressGroupBy) Scan

func (eagb *EntityAddressGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*EntityAddressGroupBy) ScanX

func (eagb *EntityAddressGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*EntityAddressGroupBy) String

func (eagb *EntityAddressGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) StringX

func (eagb *EntityAddressGroupBy) StringX(ctx context.Context) string

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

func (*EntityAddressGroupBy) Strings

func (eagb *EntityAddressGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityAddressGroupBy) StringsX

func (eagb *EntityAddressGroupBy) StringsX(ctx context.Context) []string

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

type EntityAddressMutation

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

EntityAddressMutation represents an operation that mutates the EntityAddress nodes in the graph.

func (*EntityAddressMutation) AddField

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

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

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

func (*EntityAddressMutation) AddedField

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

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

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

func (*EntityAddressMutation) AddedIDs

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

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

func (*EntityAddressMutation) City

func (m *EntityAddressMutation) City() (r string, exists bool)

City returns the value of the "city" field in the mutation.

func (*EntityAddressMutation) ClearEdge

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

func (m *EntityAddressMutation) 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 (*EntityAddressMutation) ClearLine2

func (m *EntityAddressMutation) ClearLine2()

ClearLine2 clears the value of the "line2" field.

func (*EntityAddressMutation) ClearLine3

func (m *EntityAddressMutation) ClearLine3()

ClearLine3 clears the value of the "line3" field.

func (*EntityAddressMutation) ClearedEdges

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

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

func (*EntityAddressMutation) ClearedFields

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

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

func (EntityAddressMutation) Client

func (m EntityAddressMutation) 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 (*EntityAddressMutation) Country

func (m *EntityAddressMutation) Country() (r string, exists bool)

Country returns the value of the "country" field in the mutation.

func (*EntityAddressMutation) EdgeCleared

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

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

func (*EntityAddressMutation) Field

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

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

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

func (*EntityAddressMutation) Fields

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

func (m *EntityAddressMutation) GetType() (r entityaddress.Type, exists bool)

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

func (*EntityAddressMutation) ID

func (m *EntityAddressMutation) 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.

func (*EntityAddressMutation) Line1

func (m *EntityAddressMutation) Line1() (r string, exists bool)

Line1 returns the value of the "line1" field in the mutation.

func (*EntityAddressMutation) Line2

func (m *EntityAddressMutation) Line2() (r string, exists bool)

Line2 returns the value of the "line2" field in the mutation.

func (*EntityAddressMutation) Line2Cleared

func (m *EntityAddressMutation) Line2Cleared() bool

Line2Cleared returns if the "line2" field was cleared in this mutation.

func (*EntityAddressMutation) Line3

func (m *EntityAddressMutation) Line3() (r string, exists bool)

Line3 returns the value of the "line3" field in the mutation.

func (*EntityAddressMutation) Line3Cleared

func (m *EntityAddressMutation) Line3Cleared() bool

Line3Cleared returns if the "line3" field was cleared in this mutation.

func (*EntityAddressMutation) OldCity

func (m *EntityAddressMutation) OldCity(ctx context.Context) (v string, err error)

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

func (*EntityAddressMutation) OldCountry

func (m *EntityAddressMutation) OldCountry(ctx context.Context) (v string, err error)

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

func (*EntityAddressMutation) OldField

func (m *EntityAddressMutation) 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 (*EntityAddressMutation) OldLine1

func (m *EntityAddressMutation) OldLine1(ctx context.Context) (v string, err error)

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

func (*EntityAddressMutation) OldLine2

func (m *EntityAddressMutation) OldLine2(ctx context.Context) (v string, err error)

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

func (*EntityAddressMutation) OldLine3

func (m *EntityAddressMutation) OldLine3(ctx context.Context) (v string, err error)

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

func (*EntityAddressMutation) OldPostalCode

func (m *EntityAddressMutation) OldPostalCode(ctx context.Context) (v string, err error)

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

func (*EntityAddressMutation) OldPrimary

func (m *EntityAddressMutation) OldPrimary(ctx context.Context) (v bool, err error)

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

func (*EntityAddressMutation) OldState

func (m *EntityAddressMutation) OldState(ctx context.Context) (v string, err error)

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

func (*EntityAddressMutation) OldType

func (m *EntityAddressMutation) OldType(ctx context.Context) (v entityaddress.Type, err error)

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

func (*EntityAddressMutation) Op

func (m *EntityAddressMutation) Op() Op

Op returns the operation name.

func (*EntityAddressMutation) PostalCode

func (m *EntityAddressMutation) PostalCode() (r string, exists bool)

PostalCode returns the value of the "postalCode" field in the mutation.

func (*EntityAddressMutation) Primary

func (m *EntityAddressMutation) Primary() (r bool, exists bool)

Primary returns the value of the "primary" field in the mutation.

func (*EntityAddressMutation) RemovedEdges

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

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

func (*EntityAddressMutation) RemovedIDs

func (m *EntityAddressMutation) 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 (*EntityAddressMutation) ResetCity

func (m *EntityAddressMutation) ResetCity()

ResetCity resets all changes to the "city" field.

func (*EntityAddressMutation) ResetCountry

func (m *EntityAddressMutation) ResetCountry()

ResetCountry resets all changes to the "country" field.

func (*EntityAddressMutation) ResetEdge

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

func (m *EntityAddressMutation) 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 (*EntityAddressMutation) ResetLine1

func (m *EntityAddressMutation) ResetLine1()

ResetLine1 resets all changes to the "line1" field.

func (*EntityAddressMutation) ResetLine2

func (m *EntityAddressMutation) ResetLine2()

ResetLine2 resets all changes to the "line2" field.

func (*EntityAddressMutation) ResetLine3

func (m *EntityAddressMutation) ResetLine3()

ResetLine3 resets all changes to the "line3" field.

func (*EntityAddressMutation) ResetPostalCode

func (m *EntityAddressMutation) ResetPostalCode()

ResetPostalCode resets all changes to the "postalCode" field.

func (*EntityAddressMutation) ResetPrimary

func (m *EntityAddressMutation) ResetPrimary()

ResetPrimary resets all changes to the "primary" field.

func (*EntityAddressMutation) ResetState

func (m *EntityAddressMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*EntityAddressMutation) ResetType

func (m *EntityAddressMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*EntityAddressMutation) SetCity

func (m *EntityAddressMutation) SetCity(s string)

SetCity sets the "city" field.

func (*EntityAddressMutation) SetCountry

func (m *EntityAddressMutation) SetCountry(s string)

SetCountry sets the "country" field.

func (*EntityAddressMutation) SetField

func (m *EntityAddressMutation) 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 (*EntityAddressMutation) SetLine1

func (m *EntityAddressMutation) SetLine1(s string)

SetLine1 sets the "line1" field.

func (*EntityAddressMutation) SetLine2

func (m *EntityAddressMutation) SetLine2(s string)

SetLine2 sets the "line2" field.

func (*EntityAddressMutation) SetLine3

func (m *EntityAddressMutation) SetLine3(s string)

SetLine3 sets the "line3" field.

func (*EntityAddressMutation) SetPostalCode

func (m *EntityAddressMutation) SetPostalCode(s string)

SetPostalCode sets the "postalCode" field.

func (*EntityAddressMutation) SetPrimary

func (m *EntityAddressMutation) SetPrimary(b bool)

SetPrimary sets the "primary" field.

func (*EntityAddressMutation) SetState

func (m *EntityAddressMutation) SetState(s string)

SetState sets the "state" field.

func (*EntityAddressMutation) SetType

SetType sets the "type" field.

func (*EntityAddressMutation) State

func (m *EntityAddressMutation) State() (r string, exists bool)

State returns the value of the "state" field in the mutation.

func (EntityAddressMutation) Tx

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

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

func (*EntityAddressMutation) Type

func (m *EntityAddressMutation) Type() string

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

type EntityAddressQuery

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

EntityAddressQuery is the builder for querying EntityAddress entities.

func (*EntityAddressQuery) All

All executes the query and returns a list of EntityAddresses.

func (*EntityAddressQuery) AllX

func (eaq *EntityAddressQuery) AllX(ctx context.Context) []*EntityAddress

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

func (*EntityAddressQuery) Clone

func (eaq *EntityAddressQuery) Clone() *EntityAddressQuery

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

func (*EntityAddressQuery) Count

func (eaq *EntityAddressQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EntityAddressQuery) CountX

func (eaq *EntityAddressQuery) CountX(ctx context.Context) int

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

func (*EntityAddressQuery) Exist

func (eaq *EntityAddressQuery) Exist(ctx context.Context) (bool, error)

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

func (*EntityAddressQuery) ExistX

func (eaq *EntityAddressQuery) ExistX(ctx context.Context) bool

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

func (*EntityAddressQuery) First

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

func (*EntityAddressQuery) FirstID

func (eaq *EntityAddressQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*EntityAddressQuery) FirstIDX

func (eaq *EntityAddressQuery) FirstIDX(ctx context.Context) int

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

func (*EntityAddressQuery) FirstX

func (eaq *EntityAddressQuery) FirstX(ctx context.Context) *EntityAddress

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

func (*EntityAddressQuery) GroupBy

func (eaq *EntityAddressQuery) GroupBy(field string, fields ...string) *EntityAddressGroupBy

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 {
	Country string `json:"country,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EntityAddress.Query().
	GroupBy(entityaddress.FieldCountry).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EntityAddressQuery) IDs

func (eaq *EntityAddressQuery) IDs(ctx context.Context) ([]int, error)

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

func (*EntityAddressQuery) IDsX

func (eaq *EntityAddressQuery) IDsX(ctx context.Context) []int

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

func (*EntityAddressQuery) Limit

func (eaq *EntityAddressQuery) Limit(limit int) *EntityAddressQuery

Limit adds a limit step to the query.

func (*EntityAddressQuery) Offset

func (eaq *EntityAddressQuery) Offset(offset int) *EntityAddressQuery

Offset adds an offset step to the query.

func (*EntityAddressQuery) Only

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

func (*EntityAddressQuery) OnlyID

func (eaq *EntityAddressQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*EntityAddressQuery) OnlyIDX

func (eaq *EntityAddressQuery) OnlyIDX(ctx context.Context) int

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

func (*EntityAddressQuery) OnlyX

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

func (*EntityAddressQuery) Order

Order adds an order step to the query.

func (*EntityAddressQuery) Select

func (eaq *EntityAddressQuery) Select(field string, fields ...string) *EntityAddressSelect

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 {
	Country string `json:"country,omitempty"`
}

client.EntityAddress.Query().
	Select(entityaddress.FieldCountry).
	Scan(ctx, &v)

func (*EntityAddressQuery) Where

Where adds a new predicate for the EntityAddressQuery builder.

type EntityAddressSelect

type EntityAddressSelect struct {
	*EntityAddressQuery
	// contains filtered or unexported fields
}

EntityAddressSelect is the builder for selecting fields of EntityAddress entities.

func (*EntityAddressSelect) Bool

func (eas *EntityAddressSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*EntityAddressSelect) BoolX

func (eas *EntityAddressSelect) BoolX(ctx context.Context) bool

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

func (*EntityAddressSelect) Bools

func (eas *EntityAddressSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*EntityAddressSelect) BoolsX

func (eas *EntityAddressSelect) BoolsX(ctx context.Context) []bool

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

func (*EntityAddressSelect) Float64

func (eas *EntityAddressSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*EntityAddressSelect) Float64X

func (eas *EntityAddressSelect) Float64X(ctx context.Context) float64

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

func (*EntityAddressSelect) Float64s

func (eas *EntityAddressSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*EntityAddressSelect) Float64sX

func (eas *EntityAddressSelect) Float64sX(ctx context.Context) []float64

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

func (*EntityAddressSelect) Int

func (eas *EntityAddressSelect) Int(ctx context.Context) (_ int, err error)

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

func (*EntityAddressSelect) IntX

func (eas *EntityAddressSelect) IntX(ctx context.Context) int

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

func (*EntityAddressSelect) Ints

func (eas *EntityAddressSelect) Ints(ctx context.Context) ([]int, error)

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

func (*EntityAddressSelect) IntsX

func (eas *EntityAddressSelect) IntsX(ctx context.Context) []int

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

func (*EntityAddressSelect) Scan

func (eas *EntityAddressSelect) Scan(ctx context.Context, v interface{}) error

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

func (*EntityAddressSelect) ScanX

func (eas *EntityAddressSelect) ScanX(ctx context.Context, v interface{})

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

func (*EntityAddressSelect) String

func (eas *EntityAddressSelect) String(ctx context.Context) (_ string, err error)

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

func (*EntityAddressSelect) StringX

func (eas *EntityAddressSelect) StringX(ctx context.Context) string

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

func (*EntityAddressSelect) Strings

func (eas *EntityAddressSelect) Strings(ctx context.Context) ([]string, error)

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

func (*EntityAddressSelect) StringsX

func (eas *EntityAddressSelect) StringsX(ctx context.Context) []string

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

type EntityAddressUpdate

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

EntityAddressUpdate is the builder for updating EntityAddress entities.

func (*EntityAddressUpdate) ClearLine2

func (eau *EntityAddressUpdate) ClearLine2() *EntityAddressUpdate

ClearLine2 clears the value of the "line2" field.

func (*EntityAddressUpdate) ClearLine3

func (eau *EntityAddressUpdate) ClearLine3() *EntityAddressUpdate

ClearLine3 clears the value of the "line3" field.

func (*EntityAddressUpdate) Exec

func (eau *EntityAddressUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EntityAddressUpdate) ExecX

func (eau *EntityAddressUpdate) ExecX(ctx context.Context)

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

func (*EntityAddressUpdate) Mutation

func (eau *EntityAddressUpdate) Mutation() *EntityAddressMutation

Mutation returns the EntityAddressMutation object of the builder.

func (*EntityAddressUpdate) Save

func (eau *EntityAddressUpdate) Save(ctx context.Context) (int, error)

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

func (*EntityAddressUpdate) SaveX

func (eau *EntityAddressUpdate) SaveX(ctx context.Context) int

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

func (*EntityAddressUpdate) SetCity

SetCity sets the "city" field.

func (*EntityAddressUpdate) SetCountry

func (eau *EntityAddressUpdate) SetCountry(s string) *EntityAddressUpdate

SetCountry sets the "country" field.

func (*EntityAddressUpdate) SetLine1

SetLine1 sets the "line1" field.

func (*EntityAddressUpdate) SetLine2

SetLine2 sets the "line2" field.

func (*EntityAddressUpdate) SetLine3

SetLine3 sets the "line3" field.

func (*EntityAddressUpdate) SetNillableLine2

func (eau *EntityAddressUpdate) SetNillableLine2(s *string) *EntityAddressUpdate

SetNillableLine2 sets the "line2" field if the given value is not nil.

func (*EntityAddressUpdate) SetNillableLine3

func (eau *EntityAddressUpdate) SetNillableLine3(s *string) *EntityAddressUpdate

SetNillableLine3 sets the "line3" field if the given value is not nil.

func (*EntityAddressUpdate) SetPostalCode

func (eau *EntityAddressUpdate) SetPostalCode(s string) *EntityAddressUpdate

SetPostalCode sets the "postalCode" field.

func (*EntityAddressUpdate) SetPrimary

func (eau *EntityAddressUpdate) SetPrimary(b bool) *EntityAddressUpdate

SetPrimary sets the "primary" field.

func (*EntityAddressUpdate) SetState

SetState sets the "state" field.

func (*EntityAddressUpdate) SetType

SetType sets the "type" field.

func (*EntityAddressUpdate) Where

Where adds a new predicate for the EntityAddressUpdate builder.

type EntityAddressUpdateOne

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

EntityAddressUpdateOne is the builder for updating a single EntityAddress entity.

func (*EntityAddressUpdateOne) ClearLine2

func (eauo *EntityAddressUpdateOne) ClearLine2() *EntityAddressUpdateOne

ClearLine2 clears the value of the "line2" field.

func (*EntityAddressUpdateOne) ClearLine3

func (eauo *EntityAddressUpdateOne) ClearLine3() *EntityAddressUpdateOne

ClearLine3 clears the value of the "line3" field.

func (*EntityAddressUpdateOne) Exec

func (eauo *EntityAddressUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EntityAddressUpdateOne) ExecX

func (eauo *EntityAddressUpdateOne) ExecX(ctx context.Context)

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

func (*EntityAddressUpdateOne) Mutation

Mutation returns the EntityAddressMutation object of the builder.

func (*EntityAddressUpdateOne) Save

Save executes the query and returns the updated EntityAddress entity.

func (*EntityAddressUpdateOne) SaveX

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

func (*EntityAddressUpdateOne) SetCity

SetCity sets the "city" field.

func (*EntityAddressUpdateOne) SetCountry

SetCountry sets the "country" field.

func (*EntityAddressUpdateOne) SetLine1

SetLine1 sets the "line1" field.

func (*EntityAddressUpdateOne) SetLine2

SetLine2 sets the "line2" field.

func (*EntityAddressUpdateOne) SetLine3

SetLine3 sets the "line3" field.

func (*EntityAddressUpdateOne) SetNillableLine2

func (eauo *EntityAddressUpdateOne) SetNillableLine2(s *string) *EntityAddressUpdateOne

SetNillableLine2 sets the "line2" field if the given value is not nil.

func (*EntityAddressUpdateOne) SetNillableLine3

func (eauo *EntityAddressUpdateOne) SetNillableLine3(s *string) *EntityAddressUpdateOne

SetNillableLine3 sets the "line3" field if the given value is not nil.

func (*EntityAddressUpdateOne) SetPostalCode

func (eauo *EntityAddressUpdateOne) SetPostalCode(s string) *EntityAddressUpdateOne

SetPostalCode sets the "postalCode" field.

func (*EntityAddressUpdateOne) SetPrimary

func (eauo *EntityAddressUpdateOne) SetPrimary(b bool) *EntityAddressUpdateOne

SetPrimary sets the "primary" field.

func (*EntityAddressUpdateOne) SetState

SetState sets the "state" field.

func (*EntityAddressUpdateOne) SetType

SetType sets the "type" field.

type EntityAddresses

type EntityAddresses []*EntityAddress

EntityAddresses is a parsable slice of EntityAddress.

type EntityClient

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

EntityClient is a client for the Entity schema.

func NewEntityClient

func NewEntityClient(c config) *EntityClient

NewEntityClient returns a client for the Entity from the given config.

func (*EntityClient) Create

func (c *EntityClient) Create() *EntityCreate

Create returns a create builder for Entity.

func (*EntityClient) CreateBulk

func (c *EntityClient) CreateBulk(builders ...*EntityCreate) *EntityCreateBulk

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

func (*EntityClient) Delete

func (c *EntityClient) Delete() *EntityDelete

Delete returns a delete builder for Entity.

func (*EntityClient) DeleteOne

func (c *EntityClient) DeleteOne(e *Entity) *EntityDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*EntityClient) DeleteOneID

func (c *EntityClient) DeleteOneID(id uuid.UUID) *EntityDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*EntityClient) Get

func (c *EntityClient) Get(ctx context.Context, id uuid.UUID) (*Entity, error)

Get returns a Entity entity by its id.

func (*EntityClient) GetX

func (c *EntityClient) GetX(ctx context.Context, id uuid.UUID) *Entity

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

func (*EntityClient) Hooks

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

Hooks returns the client hooks.

func (*EntityClient) Query

func (c *EntityClient) Query() *EntityQuery

Query returns a query builder for Entity.

func (*EntityClient) QueryAddresses

func (c *EntityClient) QueryAddresses(e *Entity) *EntityAddressQuery

QueryAddresses queries the addresses edge of a Entity.

func (*EntityClient) QueryContactPoints

func (c *EntityClient) QueryContactPoints(e *Entity) *EntityContactPointQuery

QueryContactPoints queries the contactPoints edge of a Entity.

func (*EntityClient) QueryOwnsAccount

func (c *EntityClient) QueryOwnsAccount(e *Entity) *AccountQuery

QueryOwnsAccount queries the owns_account edge of a Entity.

func (*EntityClient) QueryPreferences

func (c *EntityClient) QueryPreferences(e *Entity) *PreferenceQuery

QueryPreferences queries the preferences edge of a Entity.

func (*EntityClient) QueryTaxSpecifications

func (c *EntityClient) QueryTaxSpecifications(e *Entity) *EntityTaxInformationQuery

QueryTaxSpecifications queries the taxSpecifications edge of a Entity.

func (*EntityClient) Update

func (c *EntityClient) Update() *EntityUpdate

Update returns an update builder for Entity.

func (*EntityClient) UpdateOne

func (c *EntityClient) UpdateOne(e *Entity) *EntityUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EntityClient) UpdateOneID

func (c *EntityClient) UpdateOneID(id uuid.UUID) *EntityUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EntityClient) Use

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

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

type EntityContactPoint

type EntityContactPoint struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Prefix holds the value of the "prefix" field.
	Prefix string `json:"prefix,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Type holds the value of the "type" field.
	Type entitycontactpoint.Type `json:"type,omitempty"`
	// Suffix holds the value of the "suffix" field.
	Suffix string `json:"suffix,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

EntityContactPoint is the model entity for the EntityContactPoint schema.

func (*EntityContactPoint) String

func (ecp *EntityContactPoint) String() string

String implements the fmt.Stringer.

func (*EntityContactPoint) Unwrap

func (ecp *EntityContactPoint) Unwrap() *EntityContactPoint

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

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

type EntityContactPointClient

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

EntityContactPointClient is a client for the EntityContactPoint schema.

func NewEntityContactPointClient

func NewEntityContactPointClient(c config) *EntityContactPointClient

NewEntityContactPointClient returns a client for the EntityContactPoint from the given config.

func (*EntityContactPointClient) Create

Create returns a create builder for EntityContactPoint.

func (*EntityContactPointClient) CreateBulk

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

func (*EntityContactPointClient) Delete

Delete returns a delete builder for EntityContactPoint.

func (*EntityContactPointClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*EntityContactPointClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*EntityContactPointClient) Get

Get returns a EntityContactPoint entity by its id.

func (*EntityContactPointClient) GetX

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

func (*EntityContactPointClient) Hooks

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

Hooks returns the client hooks.

func (*EntityContactPointClient) Query

Query returns a query builder for EntityContactPoint.

func (*EntityContactPointClient) Update

Update returns an update builder for EntityContactPoint.

func (*EntityContactPointClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EntityContactPointClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*EntityContactPointClient) Use

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

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

type EntityContactPointCreate

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

EntityContactPointCreate is the builder for creating a EntityContactPoint entity.

func (*EntityContactPointCreate) Mutation

Mutation returns the EntityContactPointMutation object of the builder.

func (*EntityContactPointCreate) Save

Save creates the EntityContactPoint in the database.

func (*EntityContactPointCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EntityContactPointCreate) SetName

SetName sets the "name" field.

func (*EntityContactPointCreate) SetNillablePrefix

func (ecpc *EntityContactPointCreate) SetNillablePrefix(s *string) *EntityContactPointCreate

SetNillablePrefix sets the "prefix" field if the given value is not nil.

func (*EntityContactPointCreate) SetNillableSuffix

func (ecpc *EntityContactPointCreate) SetNillableSuffix(s *string) *EntityContactPointCreate

SetNillableSuffix sets the "suffix" field if the given value is not nil.

func (*EntityContactPointCreate) SetPrefix

SetPrefix sets the "prefix" field.

func (*EntityContactPointCreate) SetSuffix

SetSuffix sets the "suffix" field.

func (*EntityContactPointCreate) SetType

SetType sets the "type" field.

func (*EntityContactPointCreate) SetValue

SetValue sets the "value" field.

type EntityContactPointCreateBulk

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

EntityContactPointCreateBulk is the builder for creating many EntityContactPoint entities in bulk.

func (*EntityContactPointCreateBulk) Save

Save creates the EntityContactPoint entities in the database.

func (*EntityContactPointCreateBulk) SaveX

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

type EntityContactPointDelete

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

EntityContactPointDelete is the builder for deleting a EntityContactPoint entity.

func (*EntityContactPointDelete) Exec

func (ecpd *EntityContactPointDelete) Exec(ctx context.Context) (int, error)

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

func (*EntityContactPointDelete) ExecX

func (ecpd *EntityContactPointDelete) ExecX(ctx context.Context) int

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

func (*EntityContactPointDelete) Where

Where adds a new predicate to the EntityContactPointDelete builder.

type EntityContactPointDeleteOne

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

EntityContactPointDeleteOne is the builder for deleting a single EntityContactPoint entity.

func (*EntityContactPointDeleteOne) Exec

Exec executes the deletion query.

func (*EntityContactPointDeleteOne) ExecX

func (ecpdo *EntityContactPointDeleteOne) ExecX(ctx context.Context)

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

type EntityContactPointGroupBy

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

EntityContactPointGroupBy is the group-by builder for EntityContactPoint entities.

func (*EntityContactPointGroupBy) Aggregate

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

func (*EntityContactPointGroupBy) Bool

func (ecpgb *EntityContactPointGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) BoolX

func (ecpgb *EntityContactPointGroupBy) BoolX(ctx context.Context) bool

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

func (*EntityContactPointGroupBy) Bools

func (ecpgb *EntityContactPointGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) BoolsX

func (ecpgb *EntityContactPointGroupBy) BoolsX(ctx context.Context) []bool

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

func (*EntityContactPointGroupBy) Float64

func (ecpgb *EntityContactPointGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) Float64X

func (ecpgb *EntityContactPointGroupBy) Float64X(ctx context.Context) float64

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

func (*EntityContactPointGroupBy) Float64s

func (ecpgb *EntityContactPointGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) Float64sX

func (ecpgb *EntityContactPointGroupBy) Float64sX(ctx context.Context) []float64

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

func (*EntityContactPointGroupBy) Int

func (ecpgb *EntityContactPointGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) IntX

func (ecpgb *EntityContactPointGroupBy) IntX(ctx context.Context) int

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

func (*EntityContactPointGroupBy) Ints

func (ecpgb *EntityContactPointGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) IntsX

func (ecpgb *EntityContactPointGroupBy) IntsX(ctx context.Context) []int

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

func (*EntityContactPointGroupBy) Scan

func (ecpgb *EntityContactPointGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*EntityContactPointGroupBy) ScanX

func (ecpgb *EntityContactPointGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*EntityContactPointGroupBy) String

func (ecpgb *EntityContactPointGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) StringX

func (ecpgb *EntityContactPointGroupBy) StringX(ctx context.Context) string

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

func (*EntityContactPointGroupBy) Strings

func (ecpgb *EntityContactPointGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityContactPointGroupBy) StringsX

func (ecpgb *EntityContactPointGroupBy) StringsX(ctx context.Context) []string

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

type EntityContactPointMutation

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

EntityContactPointMutation represents an operation that mutates the EntityContactPoint nodes in the graph.

func (*EntityContactPointMutation) AddField

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

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

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

func (*EntityContactPointMutation) AddedField

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

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

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EntityContactPointMutation) AddedIDs

func (m *EntityContactPointMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EntityContactPointMutation) ClearEdge

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) ClearField

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) ClearPrefix

func (m *EntityContactPointMutation) ClearPrefix()

ClearPrefix clears the value of the "prefix" field.

func (*EntityContactPointMutation) ClearSuffix

func (m *EntityContactPointMutation) ClearSuffix()

ClearSuffix clears the value of the "suffix" field.

func (*EntityContactPointMutation) ClearedEdges

func (m *EntityContactPointMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EntityContactPointMutation) ClearedFields

func (m *EntityContactPointMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EntityContactPointMutation) Client

func (m EntityContactPointMutation) 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 (*EntityContactPointMutation) EdgeCleared

func (m *EntityContactPointMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EntityContactPointMutation) Field

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) FieldCleared

func (m *EntityContactPointMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EntityContactPointMutation) Fields

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) GetType

func (m *EntityContactPointMutation) GetType() (r entitycontactpoint.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*EntityContactPointMutation) ID

func (m *EntityContactPointMutation) 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.

func (*EntityContactPointMutation) Name

func (m *EntityContactPointMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*EntityContactPointMutation) OldField

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) OldName

func (m *EntityContactPointMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the EntityContactPoint entity. If the EntityContactPoint object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityContactPointMutation) OldPrefix

func (m *EntityContactPointMutation) OldPrefix(ctx context.Context) (v string, err error)

OldPrefix returns the old "prefix" field's value of the EntityContactPoint entity. If the EntityContactPoint object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityContactPointMutation) OldSuffix

func (m *EntityContactPointMutation) OldSuffix(ctx context.Context) (v string, err error)

OldSuffix returns the old "suffix" field's value of the EntityContactPoint entity. If the EntityContactPoint object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityContactPointMutation) OldType

OldType returns the old "type" field's value of the EntityContactPoint entity. If the EntityContactPoint object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityContactPointMutation) OldValue

func (m *EntityContactPointMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the EntityContactPoint entity. If the EntityContactPoint object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityContactPointMutation) Op

Op returns the operation name.

func (*EntityContactPointMutation) Prefix

func (m *EntityContactPointMutation) Prefix() (r string, exists bool)

Prefix returns the value of the "prefix" field in the mutation.

func (*EntityContactPointMutation) PrefixCleared

func (m *EntityContactPointMutation) PrefixCleared() bool

PrefixCleared returns if the "prefix" field was cleared in this mutation.

func (*EntityContactPointMutation) RemovedEdges

func (m *EntityContactPointMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EntityContactPointMutation) RemovedIDs

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) ResetEdge

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) ResetField

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) ResetName

func (m *EntityContactPointMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*EntityContactPointMutation) ResetPrefix

func (m *EntityContactPointMutation) ResetPrefix()

ResetPrefix resets all changes to the "prefix" field.

func (*EntityContactPointMutation) ResetSuffix

func (m *EntityContactPointMutation) ResetSuffix()

ResetSuffix resets all changes to the "suffix" field.

func (*EntityContactPointMutation) ResetType

func (m *EntityContactPointMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*EntityContactPointMutation) ResetValue

func (m *EntityContactPointMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*EntityContactPointMutation) SetField

func (m *EntityContactPointMutation) 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 (*EntityContactPointMutation) SetName

func (m *EntityContactPointMutation) SetName(s string)

SetName sets the "name" field.

func (*EntityContactPointMutation) SetPrefix

func (m *EntityContactPointMutation) SetPrefix(s string)

SetPrefix sets the "prefix" field.

func (*EntityContactPointMutation) SetSuffix

func (m *EntityContactPointMutation) SetSuffix(s string)

SetSuffix sets the "suffix" field.

func (*EntityContactPointMutation) SetType

SetType sets the "type" field.

func (*EntityContactPointMutation) SetValue

func (m *EntityContactPointMutation) SetValue(s string)

SetValue sets the "value" field.

func (*EntityContactPointMutation) Suffix

func (m *EntityContactPointMutation) Suffix() (r string, exists bool)

Suffix returns the value of the "suffix" field in the mutation.

func (*EntityContactPointMutation) SuffixCleared

func (m *EntityContactPointMutation) SuffixCleared() bool

SuffixCleared returns if the "suffix" field was cleared in this mutation.

func (EntityContactPointMutation) Tx

func (m EntityContactPointMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EntityContactPointMutation) Type

Type returns the node type of this mutation (EntityContactPoint).

func (*EntityContactPointMutation) Value

func (m *EntityContactPointMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

type EntityContactPointQuery

type EntityContactPointQuery struct {
	// contains filtered or unexported fields
}

EntityContactPointQuery is the builder for querying EntityContactPoint entities.

func (*EntityContactPointQuery) All

All executes the query and returns a list of EntityContactPoints.

func (*EntityContactPointQuery) AllX

AllX is like All, but panics if an error occurs.

func (*EntityContactPointQuery) Clone

Clone returns a duplicate of the EntityContactPointQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EntityContactPointQuery) Count

func (ecpq *EntityContactPointQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EntityContactPointQuery) CountX

func (ecpq *EntityContactPointQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EntityContactPointQuery) Exist

func (ecpq *EntityContactPointQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EntityContactPointQuery) ExistX

func (ecpq *EntityContactPointQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EntityContactPointQuery) First

First returns the first EntityContactPoint entity from the query. Returns a *NotFoundError when no EntityContactPoint was found.

func (*EntityContactPointQuery) FirstID

func (ecpq *EntityContactPointQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first EntityContactPoint ID from the query. Returns a *NotFoundError when no EntityContactPoint ID was found.

func (*EntityContactPointQuery) FirstIDX

func (ecpq *EntityContactPointQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EntityContactPointQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*EntityContactPointQuery) GroupBy

func (ecpq *EntityContactPointQuery) GroupBy(field string, fields ...string) *EntityContactPointGroupBy

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 {
	Prefix string `json:"prefix,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EntityContactPoint.Query().
	GroupBy(entitycontactpoint.FieldPrefix).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EntityContactPointQuery) IDs

func (ecpq *EntityContactPointQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of EntityContactPoint IDs.

func (*EntityContactPointQuery) IDsX

func (ecpq *EntityContactPointQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EntityContactPointQuery) Limit

Limit adds a limit step to the query.

func (*EntityContactPointQuery) Offset

func (ecpq *EntityContactPointQuery) Offset(offset int) *EntityContactPointQuery

Offset adds an offset step to the query.

func (*EntityContactPointQuery) Only

Only returns a single EntityContactPoint entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one EntityContactPoint entity is not found. Returns a *NotFoundError when no EntityContactPoint entities are found.

func (*EntityContactPointQuery) OnlyID

func (ecpq *EntityContactPointQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only EntityContactPoint ID in the query. Returns a *NotSingularError when exactly one EntityContactPoint ID is not found. Returns a *NotFoundError when no entities are found.

func (*EntityContactPointQuery) OnlyIDX

func (ecpq *EntityContactPointQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EntityContactPointQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*EntityContactPointQuery) Order

Order adds an order step to the query.

func (*EntityContactPointQuery) Select

func (ecpq *EntityContactPointQuery) Select(field string, fields ...string) *EntityContactPointSelect

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 {
	Prefix string `json:"prefix,omitempty"`
}

client.EntityContactPoint.Query().
	Select(entitycontactpoint.FieldPrefix).
	Scan(ctx, &v)

func (*EntityContactPointQuery) Where

Where adds a new predicate for the EntityContactPointQuery builder.

type EntityContactPointSelect

type EntityContactPointSelect struct {
	*EntityContactPointQuery
	// contains filtered or unexported fields
}

EntityContactPointSelect is the builder for selecting fields of EntityContactPoint entities.

func (*EntityContactPointSelect) Bool

func (ecps *EntityContactPointSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) BoolX

func (ecps *EntityContactPointSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EntityContactPointSelect) Bools

func (ecps *EntityContactPointSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) BoolsX

func (ecps *EntityContactPointSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EntityContactPointSelect) Float64

func (ecps *EntityContactPointSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) Float64X

func (ecps *EntityContactPointSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EntityContactPointSelect) Float64s

func (ecps *EntityContactPointSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) Float64sX

func (ecps *EntityContactPointSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EntityContactPointSelect) Int

func (ecps *EntityContactPointSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) IntX

func (ecps *EntityContactPointSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EntityContactPointSelect) Ints

func (ecps *EntityContactPointSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) IntsX

func (ecps *EntityContactPointSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EntityContactPointSelect) Scan

func (ecps *EntityContactPointSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*EntityContactPointSelect) ScanX

func (ecps *EntityContactPointSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EntityContactPointSelect) String

func (ecps *EntityContactPointSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) StringX

func (ecps *EntityContactPointSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EntityContactPointSelect) Strings

func (ecps *EntityContactPointSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EntityContactPointSelect) StringsX

func (ecps *EntityContactPointSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EntityContactPointUpdate

type EntityContactPointUpdate struct {
	// contains filtered or unexported fields
}

EntityContactPointUpdate is the builder for updating EntityContactPoint entities.

func (*EntityContactPointUpdate) ClearPrefix

ClearPrefix clears the value of the "prefix" field.

func (*EntityContactPointUpdate) ClearSuffix

ClearSuffix clears the value of the "suffix" field.

func (*EntityContactPointUpdate) Exec

Exec executes the query.

func (*EntityContactPointUpdate) ExecX

func (ecpu *EntityContactPointUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EntityContactPointUpdate) Mutation

Mutation returns the EntityContactPointMutation object of the builder.

func (*EntityContactPointUpdate) Save

func (ecpu *EntityContactPointUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EntityContactPointUpdate) SaveX

func (ecpu *EntityContactPointUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EntityContactPointUpdate) SetName

SetName sets the "name" field.

func (*EntityContactPointUpdate) SetNillablePrefix

func (ecpu *EntityContactPointUpdate) SetNillablePrefix(s *string) *EntityContactPointUpdate

SetNillablePrefix sets the "prefix" field if the given value is not nil.

func (*EntityContactPointUpdate) SetNillableSuffix

func (ecpu *EntityContactPointUpdate) SetNillableSuffix(s *string) *EntityContactPointUpdate

SetNillableSuffix sets the "suffix" field if the given value is not nil.

func (*EntityContactPointUpdate) SetPrefix

SetPrefix sets the "prefix" field.

func (*EntityContactPointUpdate) SetSuffix

SetSuffix sets the "suffix" field.

func (*EntityContactPointUpdate) SetType

SetType sets the "type" field.

func (*EntityContactPointUpdate) SetValue

SetValue sets the "value" field.

func (*EntityContactPointUpdate) Where

Where adds a new predicate for the EntityContactPointUpdate builder.

type EntityContactPointUpdateOne

type EntityContactPointUpdateOne struct {
	// contains filtered or unexported fields
}

EntityContactPointUpdateOne is the builder for updating a single EntityContactPoint entity.

func (*EntityContactPointUpdateOne) ClearPrefix

ClearPrefix clears the value of the "prefix" field.

func (*EntityContactPointUpdateOne) ClearSuffix

ClearSuffix clears the value of the "suffix" field.

func (*EntityContactPointUpdateOne) Exec

Exec executes the query on the entity.

func (*EntityContactPointUpdateOne) ExecX

func (ecpuo *EntityContactPointUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EntityContactPointUpdateOne) Mutation

Mutation returns the EntityContactPointMutation object of the builder.

func (*EntityContactPointUpdateOne) Save

Save executes the query and returns the updated EntityContactPoint entity.

func (*EntityContactPointUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EntityContactPointUpdateOne) SetName

SetName sets the "name" field.

func (*EntityContactPointUpdateOne) SetNillablePrefix

func (ecpuo *EntityContactPointUpdateOne) SetNillablePrefix(s *string) *EntityContactPointUpdateOne

SetNillablePrefix sets the "prefix" field if the given value is not nil.

func (*EntityContactPointUpdateOne) SetNillableSuffix

func (ecpuo *EntityContactPointUpdateOne) SetNillableSuffix(s *string) *EntityContactPointUpdateOne

SetNillableSuffix sets the "suffix" field if the given value is not nil.

func (*EntityContactPointUpdateOne) SetPrefix

SetPrefix sets the "prefix" field.

func (*EntityContactPointUpdateOne) SetSuffix

SetSuffix sets the "suffix" field.

func (*EntityContactPointUpdateOne) SetType

SetType sets the "type" field.

func (*EntityContactPointUpdateOne) SetValue

SetValue sets the "value" field.

type EntityContactPoints

type EntityContactPoints []*EntityContactPoint

EntityContactPoints is a parsable slice of EntityContactPoint.

type EntityCreate

type EntityCreate struct {
	// contains filtered or unexported fields
}

EntityCreate is the builder for creating a Entity entity.

func (*EntityCreate) AddAddressIDs

func (ec *EntityCreate) AddAddressIDs(ids ...int) *EntityCreate

AddAddressIDs adds the "addresses" edge to the EntityAddress entity by IDs.

func (*EntityCreate) AddAddresses

func (ec *EntityCreate) AddAddresses(e ...*EntityAddress) *EntityCreate

AddAddresses adds the "addresses" edges to the EntityAddress entity.

func (*EntityCreate) AddContactPointIDs

func (ec *EntityCreate) AddContactPointIDs(ids ...int) *EntityCreate

AddContactPointIDs adds the "contactPoints" edge to the EntityContactPoint entity by IDs.

func (*EntityCreate) AddContactPoints

func (ec *EntityCreate) AddContactPoints(e ...*EntityContactPoint) *EntityCreate

AddContactPoints adds the "contactPoints" edges to the EntityContactPoint entity.

func (*EntityCreate) AddOwnsAccount

func (ec *EntityCreate) AddOwnsAccount(a ...*Account) *EntityCreate

AddOwnsAccount adds the "owns_account" edges to the Account entity.

func (*EntityCreate) AddOwnsAccountIDs

func (ec *EntityCreate) AddOwnsAccountIDs(ids ...uuid.UUID) *EntityCreate

AddOwnsAccountIDs adds the "owns_account" edge to the Account entity by IDs.

func (*EntityCreate) AddPreferenceIDs

func (ec *EntityCreate) AddPreferenceIDs(ids ...int) *EntityCreate

AddPreferenceIDs adds the "preferences" edge to the Preference entity by IDs.

func (*EntityCreate) AddPreferences

func (ec *EntityCreate) AddPreferences(p ...*Preference) *EntityCreate

AddPreferences adds the "preferences" edges to the Preference entity.

func (*EntityCreate) AddTaxSpecificationIDs

func (ec *EntityCreate) AddTaxSpecificationIDs(ids ...int) *EntityCreate

AddTaxSpecificationIDs adds the "taxSpecifications" edge to the EntityTaxInformation entity by IDs.

func (*EntityCreate) AddTaxSpecifications

func (ec *EntityCreate) AddTaxSpecifications(e ...*EntityTaxInformation) *EntityCreate

AddTaxSpecifications adds the "taxSpecifications" edges to the EntityTaxInformation entity.

func (*EntityCreate) Mutation

func (ec *EntityCreate) Mutation() *EntityMutation

Mutation returns the EntityMutation object of the builder.

func (*EntityCreate) Save

func (ec *EntityCreate) Save(ctx context.Context) (*Entity, error)

Save creates the Entity in the database.

func (*EntityCreate) SaveX

func (ec *EntityCreate) SaveX(ctx context.Context) *Entity

SaveX calls Save and panics if Save returns an error.

func (*EntityCreate) SetActive

func (ec *EntityCreate) SetActive(b bool) *EntityCreate

SetActive sets the "active" field.

func (*EntityCreate) SetDateCreated

func (ec *EntityCreate) SetDateCreated(t time.Time) *EntityCreate

SetDateCreated sets the "dateCreated" field.

func (*EntityCreate) SetDateOfBirth

func (ec *EntityCreate) SetDateOfBirth(t time.Time) *EntityCreate

SetDateOfBirth sets the "dateOfBirth" field.

func (*EntityCreate) SetFirstname

func (ec *EntityCreate) SetFirstname(s string) *EntityCreate

SetFirstname sets the "firstname" field.

func (*EntityCreate) SetFullname

func (ec *EntityCreate) SetFullname(s string) *EntityCreate

SetFullname sets the "fullname" field.

func (*EntityCreate) SetID

func (ec *EntityCreate) SetID(u uuid.UUID) *EntityCreate

SetID sets the "id" field.

func (*EntityCreate) SetLastLoginDate

func (ec *EntityCreate) SetLastLoginDate(t time.Time) *EntityCreate

SetLastLoginDate sets the "lastLoginDate" field.

func (*EntityCreate) SetLastname

func (ec *EntityCreate) SetLastname(s string) *EntityCreate

SetLastname sets the "lastname" field.

func (*EntityCreate) SetNillableActive

func (ec *EntityCreate) SetNillableActive(b *bool) *EntityCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*EntityCreate) SetNillableFirstname

func (ec *EntityCreate) SetNillableFirstname(s *string) *EntityCreate

SetNillableFirstname sets the "firstname" field if the given value is not nil.

func (*EntityCreate) SetNillableFullname

func (ec *EntityCreate) SetNillableFullname(s *string) *EntityCreate

SetNillableFullname sets the "fullname" field if the given value is not nil.

func (*EntityCreate) SetNillableLastname

func (ec *EntityCreate) SetNillableLastname(s *string) *EntityCreate

SetNillableLastname sets the "lastname" field if the given value is not nil.

func (*EntityCreate) SetToken

func (ec *EntityCreate) SetToken(s string) *EntityCreate

SetToken sets the "token" field.

func (*EntityCreate) SetType

func (ec *EntityCreate) SetType(e entity.Type) *EntityCreate

SetType sets the "type" field.

func (*EntityCreate) SetURL

func (ec *EntityCreate) SetURL(s string) *EntityCreate

SetURL sets the "url" field.

func (*EntityCreate) SetUsername

func (ec *EntityCreate) SetUsername(s string) *EntityCreate

SetUsername sets the "username" field.

type EntityCreateBulk

type EntityCreateBulk struct {
	// contains filtered or unexported fields
}

EntityCreateBulk is the builder for creating many Entity entities in bulk.

func (*EntityCreateBulk) Save

func (ecb *EntityCreateBulk) Save(ctx context.Context) ([]*Entity, error)

Save creates the Entity entities in the database.

func (*EntityCreateBulk) SaveX

func (ecb *EntityCreateBulk) SaveX(ctx context.Context) []*Entity

SaveX is like Save, but panics if an error occurs.

type EntityDelete

type EntityDelete struct {
	// contains filtered or unexported fields
}

EntityDelete is the builder for deleting a Entity entity.

func (*EntityDelete) Exec

func (ed *EntityDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EntityDelete) ExecX

func (ed *EntityDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EntityDelete) Where

func (ed *EntityDelete) Where(ps ...predicate.Entity) *EntityDelete

Where adds a new predicate to the EntityDelete builder.

type EntityDeleteOne

type EntityDeleteOne struct {
	// contains filtered or unexported fields
}

EntityDeleteOne is the builder for deleting a single Entity entity.

func (*EntityDeleteOne) Exec

func (edo *EntityDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EntityDeleteOne) ExecX

func (edo *EntityDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type EntityEdges

type EntityEdges struct {
	// TaxSpecifications holds the value of the taxSpecifications edge.
	TaxSpecifications []*EntityTaxInformation `json:"taxSpecifications,omitempty"`
	// Addresses holds the value of the addresses edge.
	Addresses []*EntityAddress `json:"addresses,omitempty"`
	// Preferences holds the value of the preferences edge.
	Preferences []*Preference `json:"preferences,omitempty"`
	// ContactPoints holds the value of the contactPoints edge.
	ContactPoints []*EntityContactPoint `json:"contactPoints,omitempty"`
	// OwnsAccount holds the value of the owns_account edge.
	OwnsAccount []*Account `json:"owns_account,omitempty"`
	// contains filtered or unexported fields
}

EntityEdges holds the relations/edges for other nodes in the graph.

func (EntityEdges) AddressesOrErr

func (e EntityEdges) AddressesOrErr() ([]*EntityAddress, error)

AddressesOrErr returns the Addresses value or an error if the edge was not loaded in eager-loading.

func (EntityEdges) ContactPointsOrErr

func (e EntityEdges) ContactPointsOrErr() ([]*EntityContactPoint, error)

ContactPointsOrErr returns the ContactPoints value or an error if the edge was not loaded in eager-loading.

func (EntityEdges) OwnsAccountOrErr

func (e EntityEdges) OwnsAccountOrErr() ([]*Account, error)

OwnsAccountOrErr returns the OwnsAccount value or an error if the edge was not loaded in eager-loading.

func (EntityEdges) PreferencesOrErr

func (e EntityEdges) PreferencesOrErr() ([]*Preference, error)

PreferencesOrErr returns the Preferences value or an error if the edge was not loaded in eager-loading.

func (EntityEdges) TaxSpecificationsOrErr

func (e EntityEdges) TaxSpecificationsOrErr() ([]*EntityTaxInformation, error)

TaxSpecificationsOrErr returns the TaxSpecifications value or an error if the edge was not loaded in eager-loading.

type EntityGroupBy

type EntityGroupBy struct {
	// contains filtered or unexported fields
}

EntityGroupBy is the group-by builder for Entity entities.

func (*EntityGroupBy) Aggregate

func (egb *EntityGroupBy) Aggregate(fns ...AggregateFunc) *EntityGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*EntityGroupBy) Bool

func (egb *EntityGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) BoolX

func (egb *EntityGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EntityGroupBy) Bools

func (egb *EntityGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) BoolsX

func (egb *EntityGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EntityGroupBy) Float64

func (egb *EntityGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) Float64X

func (egb *EntityGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EntityGroupBy) Float64s

func (egb *EntityGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) Float64sX

func (egb *EntityGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EntityGroupBy) Int

func (egb *EntityGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) IntX

func (egb *EntityGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EntityGroupBy) Ints

func (egb *EntityGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) IntsX

func (egb *EntityGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EntityGroupBy) Scan

func (egb *EntityGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*EntityGroupBy) ScanX

func (egb *EntityGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EntityGroupBy) String

func (egb *EntityGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) StringX

func (egb *EntityGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EntityGroupBy) Strings

func (egb *EntityGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityGroupBy) StringsX

func (egb *EntityGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EntityMutation

type EntityMutation struct {
	// contains filtered or unexported fields
}

EntityMutation represents an operation that mutates the Entity nodes in the graph.

func (*EntityMutation) Active

func (m *EntityMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*EntityMutation) AddAddressIDs

func (m *EntityMutation) AddAddressIDs(ids ...int)

AddAddressIDs adds the "addresses" edge to the EntityAddress entity by ids.

func (*EntityMutation) AddContactPointIDs

func (m *EntityMutation) AddContactPointIDs(ids ...int)

AddContactPointIDs adds the "contactPoints" edge to the EntityContactPoint entity by ids.

func (*EntityMutation) AddField

func (m *EntityMutation) 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 (*EntityMutation) AddOwnsAccountIDs

func (m *EntityMutation) AddOwnsAccountIDs(ids ...uuid.UUID)

AddOwnsAccountIDs adds the "owns_account" edge to the Account entity by ids.

func (*EntityMutation) AddPreferenceIDs

func (m *EntityMutation) AddPreferenceIDs(ids ...int)

AddPreferenceIDs adds the "preferences" edge to the Preference entity by ids.

func (*EntityMutation) AddTaxSpecificationIDs

func (m *EntityMutation) AddTaxSpecificationIDs(ids ...int)

AddTaxSpecificationIDs adds the "taxSpecifications" edge to the EntityTaxInformation entity by ids.

func (*EntityMutation) AddedEdges

func (m *EntityMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EntityMutation) AddedField

func (m *EntityMutation) 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 (*EntityMutation) AddedFields

func (m *EntityMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EntityMutation) AddedIDs

func (m *EntityMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EntityMutation) AddressesCleared

func (m *EntityMutation) AddressesCleared() bool

AddressesCleared returns if the "addresses" edge to the EntityAddress entity was cleared.

func (*EntityMutation) AddressesIDs

func (m *EntityMutation) AddressesIDs() (ids []int)

AddressesIDs returns the "addresses" edge IDs in the mutation.

func (*EntityMutation) ClearAddresses

func (m *EntityMutation) ClearAddresses()

ClearAddresses clears the "addresses" edge to the EntityAddress entity.

func (*EntityMutation) ClearContactPoints

func (m *EntityMutation) ClearContactPoints()

ClearContactPoints clears the "contactPoints" edge to the EntityContactPoint entity.

func (*EntityMutation) ClearEdge

func (m *EntityMutation) 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 (*EntityMutation) ClearField

func (m *EntityMutation) 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 (*EntityMutation) ClearFirstname

func (m *EntityMutation) ClearFirstname()

ClearFirstname clears the value of the "firstname" field.

func (*EntityMutation) ClearFullname

func (m *EntityMutation) ClearFullname()

ClearFullname clears the value of the "fullname" field.

func (*EntityMutation) ClearLastname

func (m *EntityMutation) ClearLastname()

ClearLastname clears the value of the "lastname" field.

func (*EntityMutation) ClearOwnsAccount

func (m *EntityMutation) ClearOwnsAccount()

ClearOwnsAccount clears the "owns_account" edge to the Account entity.

func (*EntityMutation) ClearPreferences

func (m *EntityMutation) ClearPreferences()

ClearPreferences clears the "preferences" edge to the Preference entity.

func (*EntityMutation) ClearTaxSpecifications

func (m *EntityMutation) ClearTaxSpecifications()

ClearTaxSpecifications clears the "taxSpecifications" edge to the EntityTaxInformation entity.

func (*EntityMutation) ClearedEdges

func (m *EntityMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EntityMutation) ClearedFields

func (m *EntityMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EntityMutation) Client

func (m EntityMutation) 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 (*EntityMutation) ContactPointsCleared

func (m *EntityMutation) ContactPointsCleared() bool

ContactPointsCleared returns if the "contactPoints" edge to the EntityContactPoint entity was cleared.

func (*EntityMutation) ContactPointsIDs

func (m *EntityMutation) ContactPointsIDs() (ids []int)

ContactPointsIDs returns the "contactPoints" edge IDs in the mutation.

func (*EntityMutation) DateCreated

func (m *EntityMutation) DateCreated() (r time.Time, exists bool)

DateCreated returns the value of the "dateCreated" field in the mutation.

func (*EntityMutation) DateOfBirth

func (m *EntityMutation) DateOfBirth() (r time.Time, exists bool)

DateOfBirth returns the value of the "dateOfBirth" field in the mutation.

func (*EntityMutation) EdgeCleared

func (m *EntityMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EntityMutation) Field

func (m *EntityMutation) 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 (*EntityMutation) FieldCleared

func (m *EntityMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EntityMutation) Fields

func (m *EntityMutation) 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 (*EntityMutation) Firstname

func (m *EntityMutation) Firstname() (r string, exists bool)

Firstname returns the value of the "firstname" field in the mutation.

func (*EntityMutation) FirstnameCleared

func (m *EntityMutation) FirstnameCleared() bool

FirstnameCleared returns if the "firstname" field was cleared in this mutation.

func (*EntityMutation) Fullname

func (m *EntityMutation) Fullname() (r string, exists bool)

Fullname returns the value of the "fullname" field in the mutation.

func (*EntityMutation) FullnameCleared

func (m *EntityMutation) FullnameCleared() bool

FullnameCleared returns if the "fullname" field was cleared in this mutation.

func (*EntityMutation) GetType

func (m *EntityMutation) GetType() (r entity.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*EntityMutation) ID

func (m *EntityMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*EntityMutation) LastLoginDate

func (m *EntityMutation) LastLoginDate() (r time.Time, exists bool)

LastLoginDate returns the value of the "lastLoginDate" field in the mutation.

func (*EntityMutation) Lastname

func (m *EntityMutation) Lastname() (r string, exists bool)

Lastname returns the value of the "lastname" field in the mutation.

func (*EntityMutation) LastnameCleared

func (m *EntityMutation) LastnameCleared() bool

LastnameCleared returns if the "lastname" field was cleared in this mutation.

func (*EntityMutation) OldActive

func (m *EntityMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldDateCreated

func (m *EntityMutation) OldDateCreated(ctx context.Context) (v time.Time, err error)

OldDateCreated returns the old "dateCreated" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldDateOfBirth

func (m *EntityMutation) OldDateOfBirth(ctx context.Context) (v time.Time, err error)

OldDateOfBirth returns the old "dateOfBirth" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldField

func (m *EntityMutation) 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 (*EntityMutation) OldFirstname

func (m *EntityMutation) OldFirstname(ctx context.Context) (v string, err error)

OldFirstname returns the old "firstname" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldFullname

func (m *EntityMutation) OldFullname(ctx context.Context) (v string, err error)

OldFullname returns the old "fullname" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldLastLoginDate

func (m *EntityMutation) OldLastLoginDate(ctx context.Context) (v time.Time, err error)

OldLastLoginDate returns the old "lastLoginDate" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldLastname

func (m *EntityMutation) OldLastname(ctx context.Context) (v string, err error)

OldLastname returns the old "lastname" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldToken

func (m *EntityMutation) OldToken(ctx context.Context) (v string, err error)

OldToken returns the old "token" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldType

func (m *EntityMutation) OldType(ctx context.Context) (v entity.Type, err error)

OldType returns the old "type" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldURL

func (m *EntityMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) OldUsername

func (m *EntityMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the Entity entity. If the Entity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityMutation) Op

func (m *EntityMutation) Op() Op

Op returns the operation name.

func (*EntityMutation) OwnsAccountCleared

func (m *EntityMutation) OwnsAccountCleared() bool

OwnsAccountCleared returns if the "owns_account" edge to the Account entity was cleared.

func (*EntityMutation) OwnsAccountIDs

func (m *EntityMutation) OwnsAccountIDs() (ids []uuid.UUID)

OwnsAccountIDs returns the "owns_account" edge IDs in the mutation.

func (*EntityMutation) PreferencesCleared

func (m *EntityMutation) PreferencesCleared() bool

PreferencesCleared returns if the "preferences" edge to the Preference entity was cleared.

func (*EntityMutation) PreferencesIDs

func (m *EntityMutation) PreferencesIDs() (ids []int)

PreferencesIDs returns the "preferences" edge IDs in the mutation.

func (*EntityMutation) RemoveAddressIDs

func (m *EntityMutation) RemoveAddressIDs(ids ...int)

RemoveAddressIDs removes the "addresses" edge to the EntityAddress entity by IDs.

func (*EntityMutation) RemoveContactPointIDs

func (m *EntityMutation) RemoveContactPointIDs(ids ...int)

RemoveContactPointIDs removes the "contactPoints" edge to the EntityContactPoint entity by IDs.

func (*EntityMutation) RemoveOwnsAccountIDs

func (m *EntityMutation) RemoveOwnsAccountIDs(ids ...uuid.UUID)

RemoveOwnsAccountIDs removes the "owns_account" edge to the Account entity by IDs.

func (*EntityMutation) RemovePreferenceIDs

func (m *EntityMutation) RemovePreferenceIDs(ids ...int)

RemovePreferenceIDs removes the "preferences" edge to the Preference entity by IDs.

func (*EntityMutation) RemoveTaxSpecificationIDs

func (m *EntityMutation) RemoveTaxSpecificationIDs(ids ...int)

RemoveTaxSpecificationIDs removes the "taxSpecifications" edge to the EntityTaxInformation entity by IDs.

func (*EntityMutation) RemovedAddressesIDs

func (m *EntityMutation) RemovedAddressesIDs() (ids []int)

RemovedAddresses returns the removed IDs of the "addresses" edge to the EntityAddress entity.

func (*EntityMutation) RemovedContactPointsIDs

func (m *EntityMutation) RemovedContactPointsIDs() (ids []int)

RemovedContactPoints returns the removed IDs of the "contactPoints" edge to the EntityContactPoint entity.

func (*EntityMutation) RemovedEdges

func (m *EntityMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EntityMutation) RemovedIDs

func (m *EntityMutation) 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 (*EntityMutation) RemovedOwnsAccountIDs

func (m *EntityMutation) RemovedOwnsAccountIDs() (ids []uuid.UUID)

RemovedOwnsAccount returns the removed IDs of the "owns_account" edge to the Account entity.

func (*EntityMutation) RemovedPreferencesIDs

func (m *EntityMutation) RemovedPreferencesIDs() (ids []int)

RemovedPreferences returns the removed IDs of the "preferences" edge to the Preference entity.

func (*EntityMutation) RemovedTaxSpecificationsIDs

func (m *EntityMutation) RemovedTaxSpecificationsIDs() (ids []int)

RemovedTaxSpecifications returns the removed IDs of the "taxSpecifications" edge to the EntityTaxInformation entity.

func (*EntityMutation) ResetActive

func (m *EntityMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*EntityMutation) ResetAddresses

func (m *EntityMutation) ResetAddresses()

ResetAddresses resets all changes to the "addresses" edge.

func (*EntityMutation) ResetContactPoints

func (m *EntityMutation) ResetContactPoints()

ResetContactPoints resets all changes to the "contactPoints" edge.

func (*EntityMutation) ResetDateCreated

func (m *EntityMutation) ResetDateCreated()

ResetDateCreated resets all changes to the "dateCreated" field.

func (*EntityMutation) ResetDateOfBirth

func (m *EntityMutation) ResetDateOfBirth()

ResetDateOfBirth resets all changes to the "dateOfBirth" field.

func (*EntityMutation) ResetEdge

func (m *EntityMutation) 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 (*EntityMutation) ResetField

func (m *EntityMutation) 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 (*EntityMutation) ResetFirstname

func (m *EntityMutation) ResetFirstname()

ResetFirstname resets all changes to the "firstname" field.

func (*EntityMutation) ResetFullname

func (m *EntityMutation) ResetFullname()

ResetFullname resets all changes to the "fullname" field.

func (*EntityMutation) ResetLastLoginDate

func (m *EntityMutation) ResetLastLoginDate()

ResetLastLoginDate resets all changes to the "lastLoginDate" field.

func (*EntityMutation) ResetLastname

func (m *EntityMutation) ResetLastname()

ResetLastname resets all changes to the "lastname" field.

func (*EntityMutation) ResetOwnsAccount

func (m *EntityMutation) ResetOwnsAccount()

ResetOwnsAccount resets all changes to the "owns_account" edge.

func (*EntityMutation) ResetPreferences

func (m *EntityMutation) ResetPreferences()

ResetPreferences resets all changes to the "preferences" edge.

func (*EntityMutation) ResetTaxSpecifications

func (m *EntityMutation) ResetTaxSpecifications()

ResetTaxSpecifications resets all changes to the "taxSpecifications" edge.

func (*EntityMutation) ResetToken

func (m *EntityMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*EntityMutation) ResetType

func (m *EntityMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*EntityMutation) ResetURL

func (m *EntityMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*EntityMutation) ResetUsername

func (m *EntityMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*EntityMutation) SetActive

func (m *EntityMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*EntityMutation) SetDateCreated

func (m *EntityMutation) SetDateCreated(t time.Time)

SetDateCreated sets the "dateCreated" field.

func (*EntityMutation) SetDateOfBirth

func (m *EntityMutation) SetDateOfBirth(t time.Time)

SetDateOfBirth sets the "dateOfBirth" field.

func (*EntityMutation) SetField

func (m *EntityMutation) 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 (*EntityMutation) SetFirstname

func (m *EntityMutation) SetFirstname(s string)

SetFirstname sets the "firstname" field.

func (*EntityMutation) SetFullname

func (m *EntityMutation) SetFullname(s string)

SetFullname sets the "fullname" field.

func (*EntityMutation) SetID

func (m *EntityMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Entity entities.

func (*EntityMutation) SetLastLoginDate

func (m *EntityMutation) SetLastLoginDate(t time.Time)

SetLastLoginDate sets the "lastLoginDate" field.

func (*EntityMutation) SetLastname

func (m *EntityMutation) SetLastname(s string)

SetLastname sets the "lastname" field.

func (*EntityMutation) SetToken

func (m *EntityMutation) SetToken(s string)

SetToken sets the "token" field.

func (*EntityMutation) SetType

func (m *EntityMutation) SetType(e entity.Type)

SetType sets the "type" field.

func (*EntityMutation) SetURL

func (m *EntityMutation) SetURL(s string)

SetURL sets the "url" field.

func (*EntityMutation) SetUsername

func (m *EntityMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*EntityMutation) TaxSpecificationsCleared

func (m *EntityMutation) TaxSpecificationsCleared() bool

TaxSpecificationsCleared returns if the "taxSpecifications" edge to the EntityTaxInformation entity was cleared.

func (*EntityMutation) TaxSpecificationsIDs

func (m *EntityMutation) TaxSpecificationsIDs() (ids []int)

TaxSpecificationsIDs returns the "taxSpecifications" edge IDs in the mutation.

func (*EntityMutation) Token

func (m *EntityMutation) Token() (r string, exists bool)

Token returns the value of the "token" field in the mutation.

func (EntityMutation) Tx

func (m EntityMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EntityMutation) Type

func (m *EntityMutation) Type() string

Type returns the node type of this mutation (Entity).

func (*EntityMutation) URL

func (m *EntityMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*EntityMutation) Username

func (m *EntityMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

type EntityQuery

type EntityQuery struct {
	// contains filtered or unexported fields
}

EntityQuery is the builder for querying Entity entities.

func (*EntityQuery) All

func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error)

All executes the query and returns a list of Entities.

func (*EntityQuery) AllX

func (eq *EntityQuery) AllX(ctx context.Context) []*Entity

AllX is like All, but panics if an error occurs.

func (*EntityQuery) Clone

func (eq *EntityQuery) Clone() *EntityQuery

Clone returns a duplicate of the EntityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EntityQuery) Count

func (eq *EntityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EntityQuery) CountX

func (eq *EntityQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EntityQuery) Exist

func (eq *EntityQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EntityQuery) ExistX

func (eq *EntityQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EntityQuery) First

func (eq *EntityQuery) First(ctx context.Context) (*Entity, error)

First returns the first Entity entity from the query. Returns a *NotFoundError when no Entity was found.

func (*EntityQuery) FirstID

func (eq *EntityQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Entity ID from the query. Returns a *NotFoundError when no Entity ID was found.

func (*EntityQuery) FirstIDX

func (eq *EntityQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*EntityQuery) FirstX

func (eq *EntityQuery) FirstX(ctx context.Context) *Entity

FirstX is like First, but panics if an error occurs.

func (*EntityQuery) GroupBy

func (eq *EntityQuery) GroupBy(field string, fields ...string) *EntityGroupBy

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:"dateCreated,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Entity.Query().
	GroupBy(entity.FieldDateCreated).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EntityQuery) IDs

func (eq *EntityQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Entity IDs.

func (*EntityQuery) IDsX

func (eq *EntityQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*EntityQuery) Limit

func (eq *EntityQuery) Limit(limit int) *EntityQuery

Limit adds a limit step to the query.

func (*EntityQuery) Offset

func (eq *EntityQuery) Offset(offset int) *EntityQuery

Offset adds an offset step to the query.

func (*EntityQuery) Only

func (eq *EntityQuery) Only(ctx context.Context) (*Entity, error)

Only returns a single Entity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Entity entity is not found. Returns a *NotFoundError when no Entity entities are found.

func (*EntityQuery) OnlyID

func (eq *EntityQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Entity ID in the query. Returns a *NotSingularError when exactly one Entity ID is not found. Returns a *NotFoundError when no entities are found.

func (*EntityQuery) OnlyIDX

func (eq *EntityQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EntityQuery) OnlyX

func (eq *EntityQuery) OnlyX(ctx context.Context) *Entity

OnlyX is like Only, but panics if an error occurs.

func (*EntityQuery) Order

func (eq *EntityQuery) Order(o ...OrderFunc) *EntityQuery

Order adds an order step to the query.

func (*EntityQuery) QueryAddresses

func (eq *EntityQuery) QueryAddresses() *EntityAddressQuery

QueryAddresses chains the current query on the "addresses" edge.

func (*EntityQuery) QueryContactPoints

func (eq *EntityQuery) QueryContactPoints() *EntityContactPointQuery

QueryContactPoints chains the current query on the "contactPoints" edge.

func (*EntityQuery) QueryOwnsAccount

func (eq *EntityQuery) QueryOwnsAccount() *AccountQuery

QueryOwnsAccount chains the current query on the "owns_account" edge.

func (*EntityQuery) QueryPreferences

func (eq *EntityQuery) QueryPreferences() *PreferenceQuery

QueryPreferences chains the current query on the "preferences" edge.

func (*EntityQuery) QueryTaxSpecifications

func (eq *EntityQuery) QueryTaxSpecifications() *EntityTaxInformationQuery

QueryTaxSpecifications chains the current query on the "taxSpecifications" edge.

func (*EntityQuery) Select

func (eq *EntityQuery) Select(field string, fields ...string) *EntitySelect

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:"dateCreated,omitempty"`
}

client.Entity.Query().
	Select(entity.FieldDateCreated).
	Scan(ctx, &v)

func (*EntityQuery) Where

func (eq *EntityQuery) Where(ps ...predicate.Entity) *EntityQuery

Where adds a new predicate for the EntityQuery builder.

func (*EntityQuery) WithAddresses

func (eq *EntityQuery) WithAddresses(opts ...func(*EntityAddressQuery)) *EntityQuery

WithAddresses tells the query-builder to eager-load the nodes that are connected to the "addresses" edge. The optional arguments are used to configure the query builder of the edge.

func (*EntityQuery) WithContactPoints

func (eq *EntityQuery) WithContactPoints(opts ...func(*EntityContactPointQuery)) *EntityQuery

WithContactPoints tells the query-builder to eager-load the nodes that are connected to the "contactPoints" edge. The optional arguments are used to configure the query builder of the edge.

func (*EntityQuery) WithOwnsAccount

func (eq *EntityQuery) WithOwnsAccount(opts ...func(*AccountQuery)) *EntityQuery

WithOwnsAccount tells the query-builder to eager-load the nodes that are connected to the "owns_account" edge. The optional arguments are used to configure the query builder of the edge.

func (*EntityQuery) WithPreferences

func (eq *EntityQuery) WithPreferences(opts ...func(*PreferenceQuery)) *EntityQuery

WithPreferences tells the query-builder to eager-load the nodes that are connected to the "preferences" edge. The optional arguments are used to configure the query builder of the edge.

func (*EntityQuery) WithTaxSpecifications

func (eq *EntityQuery) WithTaxSpecifications(opts ...func(*EntityTaxInformationQuery)) *EntityQuery

WithTaxSpecifications tells the query-builder to eager-load the nodes that are connected to the "taxSpecifications" edge. The optional arguments are used to configure the query builder of the edge.

type EntitySelect

type EntitySelect struct {
	*EntityQuery
	// contains filtered or unexported fields
}

EntitySelect is the builder for selecting fields of Entity entities.

func (*EntitySelect) Bool

func (es *EntitySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EntitySelect) BoolX

func (es *EntitySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EntitySelect) Bools

func (es *EntitySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EntitySelect) BoolsX

func (es *EntitySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EntitySelect) Float64

func (es *EntitySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EntitySelect) Float64X

func (es *EntitySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EntitySelect) Float64s

func (es *EntitySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EntitySelect) Float64sX

func (es *EntitySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EntitySelect) Int

func (es *EntitySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EntitySelect) IntX

func (es *EntitySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EntitySelect) Ints

func (es *EntitySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EntitySelect) IntsX

func (es *EntitySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EntitySelect) Scan

func (es *EntitySelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*EntitySelect) ScanX

func (es *EntitySelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EntitySelect) String

func (es *EntitySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EntitySelect) StringX

func (es *EntitySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EntitySelect) Strings

func (es *EntitySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EntitySelect) StringsX

func (es *EntitySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EntityTaxInformation

type EntityTaxInformation struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type entitytaxinformation.Type `json:"type,omitempty"`
	// TaxId holds the value of the "taxId" field.
	TaxId string `json:"taxId,omitempty"`
	// contains filtered or unexported fields
}

EntityTaxInformation is the model entity for the EntityTaxInformation schema.

func (*EntityTaxInformation) String

func (eti *EntityTaxInformation) String() string

String implements the fmt.Stringer.

func (*EntityTaxInformation) Unwrap

Unwrap unwraps the EntityTaxInformation 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 (*EntityTaxInformation) Update

Update returns a builder for updating this EntityTaxInformation. Note that you need to call EntityTaxInformation.Unwrap() before calling this method if this EntityTaxInformation was returned from a transaction, and the transaction was committed or rolled back.

type EntityTaxInformationClient

type EntityTaxInformationClient struct {
	// contains filtered or unexported fields
}

EntityTaxInformationClient is a client for the EntityTaxInformation schema.

func NewEntityTaxInformationClient

func NewEntityTaxInformationClient(c config) *EntityTaxInformationClient

NewEntityTaxInformationClient returns a client for the EntityTaxInformation from the given config.

func (*EntityTaxInformationClient) Create

Create returns a create builder for EntityTaxInformation.

func (*EntityTaxInformationClient) CreateBulk

CreateBulk returns a builder for creating a bulk of EntityTaxInformation entities.

func (*EntityTaxInformationClient) Delete

Delete returns a delete builder for EntityTaxInformation.

func (*EntityTaxInformationClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*EntityTaxInformationClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*EntityTaxInformationClient) Get

Get returns a EntityTaxInformation entity by its id.

func (*EntityTaxInformationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*EntityTaxInformationClient) Hooks

func (c *EntityTaxInformationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EntityTaxInformationClient) Query

Query returns a query builder for EntityTaxInformation.

func (*EntityTaxInformationClient) Update

Update returns an update builder for EntityTaxInformation.

func (*EntityTaxInformationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EntityTaxInformationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*EntityTaxInformationClient) Use

func (c *EntityTaxInformationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entitytaxinformation.Hooks(f(g(h())))`.

type EntityTaxInformationCreate

type EntityTaxInformationCreate struct {
	// contains filtered or unexported fields
}

EntityTaxInformationCreate is the builder for creating a EntityTaxInformation entity.

func (*EntityTaxInformationCreate) Mutation

Mutation returns the EntityTaxInformationMutation object of the builder.

func (*EntityTaxInformationCreate) Save

Save creates the EntityTaxInformation in the database.

func (*EntityTaxInformationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EntityTaxInformationCreate) SetTaxId

SetTaxId sets the "taxId" field.

func (*EntityTaxInformationCreate) SetType

SetType sets the "type" field.

type EntityTaxInformationCreateBulk

type EntityTaxInformationCreateBulk struct {
	// contains filtered or unexported fields
}

EntityTaxInformationCreateBulk is the builder for creating many EntityTaxInformation entities in bulk.

func (*EntityTaxInformationCreateBulk) Save

Save creates the EntityTaxInformation entities in the database.

func (*EntityTaxInformationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type EntityTaxInformationDelete

type EntityTaxInformationDelete struct {
	// contains filtered or unexported fields
}

EntityTaxInformationDelete is the builder for deleting a EntityTaxInformation entity.

func (*EntityTaxInformationDelete) Exec

func (etid *EntityTaxInformationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EntityTaxInformationDelete) ExecX

func (etid *EntityTaxInformationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EntityTaxInformationDelete) Where

Where adds a new predicate to the EntityTaxInformationDelete builder.

type EntityTaxInformationDeleteOne

type EntityTaxInformationDeleteOne struct {
	// contains filtered or unexported fields
}

EntityTaxInformationDeleteOne is the builder for deleting a single EntityTaxInformation entity.

func (*EntityTaxInformationDeleteOne) Exec

Exec executes the deletion query.

func (*EntityTaxInformationDeleteOne) ExecX

func (etido *EntityTaxInformationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type EntityTaxInformationGroupBy

type EntityTaxInformationGroupBy struct {
	// contains filtered or unexported fields
}

EntityTaxInformationGroupBy is the group-by builder for EntityTaxInformation entities.

func (*EntityTaxInformationGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*EntityTaxInformationGroupBy) Bool

func (etigb *EntityTaxInformationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) BoolX

func (etigb *EntityTaxInformationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) Bools

func (etigb *EntityTaxInformationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) BoolsX

func (etigb *EntityTaxInformationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) Float64

func (etigb *EntityTaxInformationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) Float64X

func (etigb *EntityTaxInformationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) Float64s

func (etigb *EntityTaxInformationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) Float64sX

func (etigb *EntityTaxInformationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) Int

func (etigb *EntityTaxInformationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) IntX

IntX is like Int, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) Ints

func (etigb *EntityTaxInformationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) IntsX

func (etigb *EntityTaxInformationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) Scan

func (etigb *EntityTaxInformationGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*EntityTaxInformationGroupBy) ScanX

func (etigb *EntityTaxInformationGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) String

func (etigb *EntityTaxInformationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) StringX

func (etigb *EntityTaxInformationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EntityTaxInformationGroupBy) Strings

func (etigb *EntityTaxInformationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*EntityTaxInformationGroupBy) StringsX

func (etigb *EntityTaxInformationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EntityTaxInformationMutation

type EntityTaxInformationMutation struct {
	// contains filtered or unexported fields
}

EntityTaxInformationMutation represents an operation that mutates the EntityTaxInformation nodes in the graph.

func (*EntityTaxInformationMutation) AddField

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) AddedEdges

func (m *EntityTaxInformationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EntityTaxInformationMutation) AddedField

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) AddedFields

func (m *EntityTaxInformationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EntityTaxInformationMutation) AddedIDs

func (m *EntityTaxInformationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EntityTaxInformationMutation) ClearEdge

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) ClearField

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) ClearedEdges

func (m *EntityTaxInformationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EntityTaxInformationMutation) ClearedFields

func (m *EntityTaxInformationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) EdgeCleared

func (m *EntityTaxInformationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EntityTaxInformationMutation) Field

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) FieldCleared

func (m *EntityTaxInformationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EntityTaxInformationMutation) Fields

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) GetType

GetType returns the value of the "type" field in the mutation.

func (*EntityTaxInformationMutation) ID

func (m *EntityTaxInformationMutation) 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.

func (*EntityTaxInformationMutation) OldField

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) OldTaxId

func (m *EntityTaxInformationMutation) OldTaxId(ctx context.Context) (v string, err error)

OldTaxId returns the old "taxId" field's value of the EntityTaxInformation entity. If the EntityTaxInformation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityTaxInformationMutation) OldType

OldType returns the old "type" field's value of the EntityTaxInformation entity. If the EntityTaxInformation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EntityTaxInformationMutation) Op

Op returns the operation name.

func (*EntityTaxInformationMutation) RemovedEdges

func (m *EntityTaxInformationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EntityTaxInformationMutation) RemovedIDs

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) ResetEdge

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) ResetField

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) ResetTaxId

func (m *EntityTaxInformationMutation) ResetTaxId()

ResetTaxId resets all changes to the "taxId" field.

func (*EntityTaxInformationMutation) ResetType

func (m *EntityTaxInformationMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*EntityTaxInformationMutation) SetField

func (m *EntityTaxInformationMutation) 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 (*EntityTaxInformationMutation) SetTaxId

func (m *EntityTaxInformationMutation) SetTaxId(s string)

SetTaxId sets the "taxId" field.

func (*EntityTaxInformationMutation) SetType

SetType sets the "type" field.

func (*EntityTaxInformationMutation) TaxId

func (m *EntityTaxInformationMutation) TaxId() (r string, exists bool)

TaxId returns the value of the "taxId" field in the mutation.

func (EntityTaxInformationMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EntityTaxInformationMutation) Type

Type returns the node type of this mutation (EntityTaxInformation).

type EntityTaxInformationQuery

type EntityTaxInformationQuery struct {
	// contains filtered or unexported fields
}

EntityTaxInformationQuery is the builder for querying EntityTaxInformation entities.

func (*EntityTaxInformationQuery) All

All executes the query and returns a list of EntityTaxInformations.

func (*EntityTaxInformationQuery) AllX

AllX is like All, but panics if an error occurs.

func (*EntityTaxInformationQuery) Clone

Clone returns a duplicate of the EntityTaxInformationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EntityTaxInformationQuery) Count

func (etiq *EntityTaxInformationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EntityTaxInformationQuery) CountX

func (etiq *EntityTaxInformationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EntityTaxInformationQuery) Exist

func (etiq *EntityTaxInformationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EntityTaxInformationQuery) ExistX

func (etiq *EntityTaxInformationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EntityTaxInformationQuery) First

First returns the first EntityTaxInformation entity from the query. Returns a *NotFoundError when no EntityTaxInformation was found.

func (*EntityTaxInformationQuery) FirstID

func (etiq *EntityTaxInformationQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first EntityTaxInformation ID from the query. Returns a *NotFoundError when no EntityTaxInformation ID was found.

func (*EntityTaxInformationQuery) FirstIDX

func (etiq *EntityTaxInformationQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EntityTaxInformationQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*EntityTaxInformationQuery) GroupBy

func (etiq *EntityTaxInformationQuery) GroupBy(field string, fields ...string) *EntityTaxInformationGroupBy

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 {
	Type entitytaxinformation.Type `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EntityTaxInformation.Query().
	GroupBy(entitytaxinformation.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EntityTaxInformationQuery) IDs

func (etiq *EntityTaxInformationQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of EntityTaxInformation IDs.

func (*EntityTaxInformationQuery) IDsX

func (etiq *EntityTaxInformationQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EntityTaxInformationQuery) Limit

Limit adds a limit step to the query.

func (*EntityTaxInformationQuery) Offset

Offset adds an offset step to the query.

func (*EntityTaxInformationQuery) Only

Only returns a single EntityTaxInformation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one EntityTaxInformation entity is not found. Returns a *NotFoundError when no EntityTaxInformation entities are found.

func (*EntityTaxInformationQuery) OnlyID

func (etiq *EntityTaxInformationQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only EntityTaxInformation ID in the query. Returns a *NotSingularError when exactly one EntityTaxInformation ID is not found. Returns a *NotFoundError when no entities are found.

func (*EntityTaxInformationQuery) OnlyIDX

func (etiq *EntityTaxInformationQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EntityTaxInformationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*EntityTaxInformationQuery) Order

Order adds an order step to the query.

func (*EntityTaxInformationQuery) Select

func (etiq *EntityTaxInformationQuery) Select(field string, fields ...string) *EntityTaxInformationSelect

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 {
	Type entitytaxinformation.Type `json:"type,omitempty"`
}

client.EntityTaxInformation.Query().
	Select(entitytaxinformation.FieldType).
	Scan(ctx, &v)

func (*EntityTaxInformationQuery) Where

Where adds a new predicate for the EntityTaxInformationQuery builder.

type EntityTaxInformationSelect

type EntityTaxInformationSelect struct {
	*EntityTaxInformationQuery
	// contains filtered or unexported fields
}

EntityTaxInformationSelect is the builder for selecting fields of EntityTaxInformation entities.

func (*EntityTaxInformationSelect) Bool

func (etis *EntityTaxInformationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) BoolX

BoolX is like Bool, but panics if an error occurs.

func (*EntityTaxInformationSelect) Bools

func (etis *EntityTaxInformationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) BoolsX

func (etis *EntityTaxInformationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EntityTaxInformationSelect) Float64

func (etis *EntityTaxInformationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) Float64X

func (etis *EntityTaxInformationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EntityTaxInformationSelect) Float64s

func (etis *EntityTaxInformationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) Float64sX

func (etis *EntityTaxInformationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EntityTaxInformationSelect) Int

func (etis *EntityTaxInformationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) IntX

IntX is like Int, but panics if an error occurs.

func (*EntityTaxInformationSelect) Ints

func (etis *EntityTaxInformationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) IntsX

func (etis *EntityTaxInformationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EntityTaxInformationSelect) Scan

func (etis *EntityTaxInformationSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*EntityTaxInformationSelect) ScanX

func (etis *EntityTaxInformationSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EntityTaxInformationSelect) String

func (etis *EntityTaxInformationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) StringX

func (etis *EntityTaxInformationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EntityTaxInformationSelect) Strings

func (etis *EntityTaxInformationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EntityTaxInformationSelect) StringsX

func (etis *EntityTaxInformationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EntityTaxInformationUpdate

type EntityTaxInformationUpdate struct {
	// contains filtered or unexported fields
}

EntityTaxInformationUpdate is the builder for updating EntityTaxInformation entities.

func (*EntityTaxInformationUpdate) Exec

Exec executes the query.

func (*EntityTaxInformationUpdate) ExecX

func (etiu *EntityTaxInformationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EntityTaxInformationUpdate) Mutation

Mutation returns the EntityTaxInformationMutation object of the builder.

func (*EntityTaxInformationUpdate) Save

func (etiu *EntityTaxInformationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EntityTaxInformationUpdate) SaveX

func (etiu *EntityTaxInformationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EntityTaxInformationUpdate) SetTaxId

SetTaxId sets the "taxId" field.

func (*EntityTaxInformationUpdate) SetType

SetType sets the "type" field.

func (*EntityTaxInformationUpdate) Where

Where adds a new predicate for the EntityTaxInformationUpdate builder.

type EntityTaxInformationUpdateOne

type EntityTaxInformationUpdateOne struct {
	// contains filtered or unexported fields
}

EntityTaxInformationUpdateOne is the builder for updating a single EntityTaxInformation entity.

func (*EntityTaxInformationUpdateOne) Exec

Exec executes the query on the entity.

func (*EntityTaxInformationUpdateOne) ExecX

func (etiuo *EntityTaxInformationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EntityTaxInformationUpdateOne) Mutation

Mutation returns the EntityTaxInformationMutation object of the builder.

func (*EntityTaxInformationUpdateOne) Save

Save executes the query and returns the updated EntityTaxInformation entity.

func (*EntityTaxInformationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EntityTaxInformationUpdateOne) SetTaxId

SetTaxId sets the "taxId" field.

func (*EntityTaxInformationUpdateOne) SetType

SetType sets the "type" field.

type EntityTaxInformations

type EntityTaxInformations []*EntityTaxInformation

EntityTaxInformations is a parsable slice of EntityTaxInformation.

type EntityUpdate

type EntityUpdate struct {
	// contains filtered or unexported fields
}

EntityUpdate is the builder for updating Entity entities.

func (*EntityUpdate) AddAddressIDs

func (eu *EntityUpdate) AddAddressIDs(ids ...int) *EntityUpdate

AddAddressIDs adds the "addresses" edge to the EntityAddress entity by IDs.

func (*EntityUpdate) AddAddresses

func (eu *EntityUpdate) AddAddresses(e ...*EntityAddress) *EntityUpdate

AddAddresses adds the "addresses" edges to the EntityAddress entity.

func (*EntityUpdate) AddContactPointIDs

func (eu *EntityUpdate) AddContactPointIDs(ids ...int) *EntityUpdate

AddContactPointIDs adds the "contactPoints" edge to the EntityContactPoint entity by IDs.

func (*EntityUpdate) AddContactPoints

func (eu *EntityUpdate) AddContactPoints(e ...*EntityContactPoint) *EntityUpdate

AddContactPoints adds the "contactPoints" edges to the EntityContactPoint entity.

func (*EntityUpdate) AddOwnsAccount

func (eu *EntityUpdate) AddOwnsAccount(a ...*Account) *EntityUpdate

AddOwnsAccount adds the "owns_account" edges to the Account entity.

func (*EntityUpdate) AddOwnsAccountIDs

func (eu *EntityUpdate) AddOwnsAccountIDs(ids ...uuid.UUID) *EntityUpdate

AddOwnsAccountIDs adds the "owns_account" edge to the Account entity by IDs.

func (*EntityUpdate) AddPreferenceIDs

func (eu *EntityUpdate) AddPreferenceIDs(ids ...int) *EntityUpdate

AddPreferenceIDs adds the "preferences" edge to the Preference entity by IDs.

func (*EntityUpdate) AddPreferences

func (eu *EntityUpdate) AddPreferences(p ...*Preference) *EntityUpdate

AddPreferences adds the "preferences" edges to the Preference entity.

func (*EntityUpdate) AddTaxSpecificationIDs

func (eu *EntityUpdate) AddTaxSpecificationIDs(ids ...int) *EntityUpdate

AddTaxSpecificationIDs adds the "taxSpecifications" edge to the EntityTaxInformation entity by IDs.

func (*EntityUpdate) AddTaxSpecifications

func (eu *EntityUpdate) AddTaxSpecifications(e ...*EntityTaxInformation) *EntityUpdate

AddTaxSpecifications adds the "taxSpecifications" edges to the EntityTaxInformation entity.

func (*EntityUpdate) ClearAddresses

func (eu *EntityUpdate) ClearAddresses() *EntityUpdate

ClearAddresses clears all "addresses" edges to the EntityAddress entity.

func (*EntityUpdate) ClearContactPoints

func (eu *EntityUpdate) ClearContactPoints() *EntityUpdate

ClearContactPoints clears all "contactPoints" edges to the EntityContactPoint entity.

func (*EntityUpdate) ClearFirstname

func (eu *EntityUpdate) ClearFirstname() *EntityUpdate

ClearFirstname clears the value of the "firstname" field.

func (*EntityUpdate) ClearFullname

func (eu *EntityUpdate) ClearFullname() *EntityUpdate

ClearFullname clears the value of the "fullname" field.

func (*EntityUpdate) ClearLastname

func (eu *EntityUpdate) ClearLastname() *EntityUpdate

ClearLastname clears the value of the "lastname" field.

func (*EntityUpdate) ClearOwnsAccount

func (eu *EntityUpdate) ClearOwnsAccount() *EntityUpdate

ClearOwnsAccount clears all "owns_account" edges to the Account entity.

func (*EntityUpdate) ClearPreferences

func (eu *EntityUpdate) ClearPreferences() *EntityUpdate

ClearPreferences clears all "preferences" edges to the Preference entity.

func (*EntityUpdate) ClearTaxSpecifications

func (eu *EntityUpdate) ClearTaxSpecifications() *EntityUpdate

ClearTaxSpecifications clears all "taxSpecifications" edges to the EntityTaxInformation entity.

func (*EntityUpdate) Exec

func (eu *EntityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EntityUpdate) ExecX

func (eu *EntityUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EntityUpdate) Mutation

func (eu *EntityUpdate) Mutation() *EntityMutation

Mutation returns the EntityMutation object of the builder.

func (*EntityUpdate) RemoveAddressIDs

func (eu *EntityUpdate) RemoveAddressIDs(ids ...int) *EntityUpdate

RemoveAddressIDs removes the "addresses" edge to EntityAddress entities by IDs.

func (*EntityUpdate) RemoveAddresses

func (eu *EntityUpdate) RemoveAddresses(e ...*EntityAddress) *EntityUpdate

RemoveAddresses removes "addresses" edges to EntityAddress entities.

func (*EntityUpdate) RemoveContactPointIDs

func (eu *EntityUpdate) RemoveContactPointIDs(ids ...int) *EntityUpdate

RemoveContactPointIDs removes the "contactPoints" edge to EntityContactPoint entities by IDs.

func (*EntityUpdate) RemoveContactPoints

func (eu *EntityUpdate) RemoveContactPoints(e ...*EntityContactPoint) *EntityUpdate

RemoveContactPoints removes "contactPoints" edges to EntityContactPoint entities.

func (*EntityUpdate) RemoveOwnsAccount

func (eu *EntityUpdate) RemoveOwnsAccount(a ...*Account) *EntityUpdate

RemoveOwnsAccount removes "owns_account" edges to Account entities.

func (*EntityUpdate) RemoveOwnsAccountIDs

func (eu *EntityUpdate) RemoveOwnsAccountIDs(ids ...uuid.UUID) *EntityUpdate

RemoveOwnsAccountIDs removes the "owns_account" edge to Account entities by IDs.

func (*EntityUpdate) RemovePreferenceIDs

func (eu *EntityUpdate) RemovePreferenceIDs(ids ...int) *EntityUpdate

RemovePreferenceIDs removes the "preferences" edge to Preference entities by IDs.

func (*EntityUpdate) RemovePreferences

func (eu *EntityUpdate) RemovePreferences(p ...*Preference) *EntityUpdate

RemovePreferences removes "preferences" edges to Preference entities.

func (*EntityUpdate) RemoveTaxSpecificationIDs

func (eu *EntityUpdate) RemoveTaxSpecificationIDs(ids ...int) *EntityUpdate

RemoveTaxSpecificationIDs removes the "taxSpecifications" edge to EntityTaxInformation entities by IDs.

func (*EntityUpdate) RemoveTaxSpecifications

func (eu *EntityUpdate) RemoveTaxSpecifications(e ...*EntityTaxInformation) *EntityUpdate

RemoveTaxSpecifications removes "taxSpecifications" edges to EntityTaxInformation entities.

func (*EntityUpdate) Save

func (eu *EntityUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EntityUpdate) SaveX

func (eu *EntityUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EntityUpdate) SetActive

func (eu *EntityUpdate) SetActive(b bool) *EntityUpdate

SetActive sets the "active" field.

func (*EntityUpdate) SetDateCreated

func (eu *EntityUpdate) SetDateCreated(t time.Time) *EntityUpdate

SetDateCreated sets the "dateCreated" field.

func (*EntityUpdate) SetDateOfBirth

func (eu *EntityUpdate) SetDateOfBirth(t time.Time) *EntityUpdate

SetDateOfBirth sets the "dateOfBirth" field.

func (*EntityUpdate) SetFirstname

func (eu *EntityUpdate) SetFirstname(s string) *EntityUpdate

SetFirstname sets the "firstname" field.

func (*EntityUpdate) SetFullname

func (eu *EntityUpdate) SetFullname(s string) *EntityUpdate

SetFullname sets the "fullname" field.

func (*EntityUpdate) SetLastLoginDate

func (eu *EntityUpdate) SetLastLoginDate(t time.Time) *EntityUpdate

SetLastLoginDate sets the "lastLoginDate" field.

func (*EntityUpdate) SetLastname

func (eu *EntityUpdate) SetLastname(s string) *EntityUpdate

SetLastname sets the "lastname" field.

func (*EntityUpdate) SetNillableActive

func (eu *EntityUpdate) SetNillableActive(b *bool) *EntityUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*EntityUpdate) SetNillableFirstname

func (eu *EntityUpdate) SetNillableFirstname(s *string) *EntityUpdate

SetNillableFirstname sets the "firstname" field if the given value is not nil.

func (*EntityUpdate) SetNillableFullname

func (eu *EntityUpdate) SetNillableFullname(s *string) *EntityUpdate

SetNillableFullname sets the "fullname" field if the given value is not nil.

func (*EntityUpdate) SetNillableLastname

func (eu *EntityUpdate) SetNillableLastname(s *string) *EntityUpdate

SetNillableLastname sets the "lastname" field if the given value is not nil.

func (*EntityUpdate) SetToken

func (eu *EntityUpdate) SetToken(s string) *EntityUpdate

SetToken sets the "token" field.

func (*EntityUpdate) SetType

func (eu *EntityUpdate) SetType(e entity.Type) *EntityUpdate

SetType sets the "type" field.

func (*EntityUpdate) SetURL

func (eu *EntityUpdate) SetURL(s string) *EntityUpdate

SetURL sets the "url" field.

func (*EntityUpdate) SetUsername

func (eu *EntityUpdate) SetUsername(s string) *EntityUpdate

SetUsername sets the "username" field.

func (*EntityUpdate) Where

func (eu *EntityUpdate) Where(ps ...predicate.Entity) *EntityUpdate

Where adds a new predicate for the EntityUpdate builder.

type EntityUpdateOne

type EntityUpdateOne struct {
	// contains filtered or unexported fields
}

EntityUpdateOne is the builder for updating a single Entity entity.

func (*EntityUpdateOne) AddAddressIDs

func (euo *EntityUpdateOne) AddAddressIDs(ids ...int) *EntityUpdateOne

AddAddressIDs adds the "addresses" edge to the EntityAddress entity by IDs.

func (*EntityUpdateOne) AddAddresses

func (euo *EntityUpdateOne) AddAddresses(e ...*EntityAddress) *EntityUpdateOne

AddAddresses adds the "addresses" edges to the EntityAddress entity.

func (*EntityUpdateOne) AddContactPointIDs

func (euo *EntityUpdateOne) AddContactPointIDs(ids ...int) *EntityUpdateOne

AddContactPointIDs adds the "contactPoints" edge to the EntityContactPoint entity by IDs.

func (*EntityUpdateOne) AddContactPoints

func (euo *EntityUpdateOne) AddContactPoints(e ...*EntityContactPoint) *EntityUpdateOne

AddContactPoints adds the "contactPoints" edges to the EntityContactPoint entity.

func (*EntityUpdateOne) AddOwnsAccount

func (euo *EntityUpdateOne) AddOwnsAccount(a ...*Account) *EntityUpdateOne

AddOwnsAccount adds the "owns_account" edges to the Account entity.

func (*EntityUpdateOne) AddOwnsAccountIDs

func (euo *EntityUpdateOne) AddOwnsAccountIDs(ids ...uuid.UUID) *EntityUpdateOne

AddOwnsAccountIDs adds the "owns_account" edge to the Account entity by IDs.

func (*EntityUpdateOne) AddPreferenceIDs

func (euo *EntityUpdateOne) AddPreferenceIDs(ids ...int) *EntityUpdateOne

AddPreferenceIDs adds the "preferences" edge to the Preference entity by IDs.

func (*EntityUpdateOne) AddPreferences

func (euo *EntityUpdateOne) AddPreferences(p ...*Preference) *EntityUpdateOne

AddPreferences adds the "preferences" edges to the Preference entity.

func (*EntityUpdateOne) AddTaxSpecificationIDs

func (euo *EntityUpdateOne) AddTaxSpecificationIDs(ids ...int) *EntityUpdateOne

AddTaxSpecificationIDs adds the "taxSpecifications" edge to the EntityTaxInformation entity by IDs.

func (*EntityUpdateOne) AddTaxSpecifications

func (euo *EntityUpdateOne) AddTaxSpecifications(e ...*EntityTaxInformation) *EntityUpdateOne

AddTaxSpecifications adds the "taxSpecifications" edges to the EntityTaxInformation entity.

func (*EntityUpdateOne) ClearAddresses

func (euo *EntityUpdateOne) ClearAddresses() *EntityUpdateOne

ClearAddresses clears all "addresses" edges to the EntityAddress entity.

func (*EntityUpdateOne) ClearContactPoints

func (euo *EntityUpdateOne) ClearContactPoints() *EntityUpdateOne

ClearContactPoints clears all "contactPoints" edges to the EntityContactPoint entity.

func (*EntityUpdateOne) ClearFirstname

func (euo *EntityUpdateOne) ClearFirstname() *EntityUpdateOne

ClearFirstname clears the value of the "firstname" field.

func (*EntityUpdateOne) ClearFullname

func (euo *EntityUpdateOne) ClearFullname() *EntityUpdateOne

ClearFullname clears the value of the "fullname" field.

func (*EntityUpdateOne) ClearLastname

func (euo *EntityUpdateOne) ClearLastname() *EntityUpdateOne

ClearLastname clears the value of the "lastname" field.

func (*EntityUpdateOne) ClearOwnsAccount

func (euo *EntityUpdateOne) ClearOwnsAccount() *EntityUpdateOne

ClearOwnsAccount clears all "owns_account" edges to the Account entity.

func (*EntityUpdateOne) ClearPreferences

func (euo *EntityUpdateOne) ClearPreferences() *EntityUpdateOne

ClearPreferences clears all "preferences" edges to the Preference entity.

func (*EntityUpdateOne) ClearTaxSpecifications

func (euo *EntityUpdateOne) ClearTaxSpecifications() *EntityUpdateOne

ClearTaxSpecifications clears all "taxSpecifications" edges to the EntityTaxInformation entity.

func (*EntityUpdateOne) Exec

func (euo *EntityUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EntityUpdateOne) ExecX

func (euo *EntityUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EntityUpdateOne) Mutation

func (euo *EntityUpdateOne) Mutation() *EntityMutation

Mutation returns the EntityMutation object of the builder.

func (*EntityUpdateOne) RemoveAddressIDs

func (euo *EntityUpdateOne) RemoveAddressIDs(ids ...int) *EntityUpdateOne

RemoveAddressIDs removes the "addresses" edge to EntityAddress entities by IDs.

func (*EntityUpdateOne) RemoveAddresses

func (euo *EntityUpdateOne) RemoveAddresses(e ...*EntityAddress) *EntityUpdateOne

RemoveAddresses removes "addresses" edges to EntityAddress entities.

func (*EntityUpdateOne) RemoveContactPointIDs

func (euo *EntityUpdateOne) RemoveContactPointIDs(ids ...int) *EntityUpdateOne

RemoveContactPointIDs removes the "contactPoints" edge to EntityContactPoint entities by IDs.

func (*EntityUpdateOne) RemoveContactPoints

func (euo *EntityUpdateOne) RemoveContactPoints(e ...*EntityContactPoint) *EntityUpdateOne

RemoveContactPoints removes "contactPoints" edges to EntityContactPoint entities.

func (*EntityUpdateOne) RemoveOwnsAccount

func (euo *EntityUpdateOne) RemoveOwnsAccount(a ...*Account) *EntityUpdateOne

RemoveOwnsAccount removes "owns_account" edges to Account entities.

func (*EntityUpdateOne) RemoveOwnsAccountIDs

func (euo *EntityUpdateOne) RemoveOwnsAccountIDs(ids ...uuid.UUID) *EntityUpdateOne

RemoveOwnsAccountIDs removes the "owns_account" edge to Account entities by IDs.

func (*EntityUpdateOne) RemovePreferenceIDs

func (euo *EntityUpdateOne) RemovePreferenceIDs(ids ...int) *EntityUpdateOne

RemovePreferenceIDs removes the "preferences" edge to Preference entities by IDs.

func (*EntityUpdateOne) RemovePreferences

func (euo *EntityUpdateOne) RemovePreferences(p ...*Preference) *EntityUpdateOne

RemovePreferences removes "preferences" edges to Preference entities.

func (*EntityUpdateOne) RemoveTaxSpecificationIDs

func (euo *EntityUpdateOne) RemoveTaxSpecificationIDs(ids ...int) *EntityUpdateOne

RemoveTaxSpecificationIDs removes the "taxSpecifications" edge to EntityTaxInformation entities by IDs.

func (*EntityUpdateOne) RemoveTaxSpecifications

func (euo *EntityUpdateOne) RemoveTaxSpecifications(e ...*EntityTaxInformation) *EntityUpdateOne

RemoveTaxSpecifications removes "taxSpecifications" edges to EntityTaxInformation entities.

func (*EntityUpdateOne) Save

func (euo *EntityUpdateOne) Save(ctx context.Context) (*Entity, error)

Save executes the query and returns the updated Entity entity.

func (*EntityUpdateOne) SaveX

func (euo *EntityUpdateOne) SaveX(ctx context.Context) *Entity

SaveX is like Save, but panics if an error occurs.

func (*EntityUpdateOne) SetActive

func (euo *EntityUpdateOne) SetActive(b bool) *EntityUpdateOne

SetActive sets the "active" field.

func (*EntityUpdateOne) SetDateCreated

func (euo *EntityUpdateOne) SetDateCreated(t time.Time) *EntityUpdateOne

SetDateCreated sets the "dateCreated" field.

func (*EntityUpdateOne) SetDateOfBirth

func (euo *EntityUpdateOne) SetDateOfBirth(t time.Time) *EntityUpdateOne

SetDateOfBirth sets the "dateOfBirth" field.

func (*EntityUpdateOne) SetFirstname

func (euo *EntityUpdateOne) SetFirstname(s string) *EntityUpdateOne

SetFirstname sets the "firstname" field.

func (*EntityUpdateOne) SetFullname

func (euo *EntityUpdateOne) SetFullname(s string) *EntityUpdateOne

SetFullname sets the "fullname" field.

func (*EntityUpdateOne) SetLastLoginDate

func (euo *EntityUpdateOne) SetLastLoginDate(t time.Time) *EntityUpdateOne

SetLastLoginDate sets the "lastLoginDate" field.

func (*EntityUpdateOne) SetLastname

func (euo *EntityUpdateOne) SetLastname(s string) *EntityUpdateOne

SetLastname sets the "lastname" field.

func (*EntityUpdateOne) SetNillableActive

func (euo *EntityUpdateOne) SetNillableActive(b *bool) *EntityUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*EntityUpdateOne) SetNillableFirstname

func (euo *EntityUpdateOne) SetNillableFirstname(s *string) *EntityUpdateOne

SetNillableFirstname sets the "firstname" field if the given value is not nil.

func (*EntityUpdateOne) SetNillableFullname

func (euo *EntityUpdateOne) SetNillableFullname(s *string) *EntityUpdateOne

SetNillableFullname sets the "fullname" field if the given value is not nil.

func (*EntityUpdateOne) SetNillableLastname

func (euo *EntityUpdateOne) SetNillableLastname(s *string) *EntityUpdateOne

SetNillableLastname sets the "lastname" field if the given value is not nil.

func (*EntityUpdateOne) SetToken

func (euo *EntityUpdateOne) SetToken(s string) *EntityUpdateOne

SetToken sets the "token" field.

func (*EntityUpdateOne) SetType

func (euo *EntityUpdateOne) SetType(e entity.Type) *EntityUpdateOne

SetType sets the "type" field.

func (*EntityUpdateOne) SetURL

func (euo *EntityUpdateOne) SetURL(s string) *EntityUpdateOne

SetURL sets the "url" field.

func (*EntityUpdateOne) SetUsername

func (euo *EntityUpdateOne) SetUsername(s string) *EntityUpdateOne

SetUsername sets the "username" field.

type Hook

type Hook = ent.Hook

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(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector, func(string) bool)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Preference

type Preference struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

Preference is the model entity for the Preference schema.

func (*Preference) String

func (pr *Preference) String() string

String implements the fmt.Stringer.

func (*Preference) Unwrap

func (pr *Preference) Unwrap() *Preference

Unwrap unwraps the Preference 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 (*Preference) Update

func (pr *Preference) Update() *PreferenceUpdateOne

Update returns a builder for updating this Preference. Note that you need to call Preference.Unwrap() before calling this method if this Preference was returned from a transaction, and the transaction was committed or rolled back.

type PreferenceClient

type PreferenceClient struct {
	// contains filtered or unexported fields
}

PreferenceClient is a client for the Preference schema.

func NewPreferenceClient

func NewPreferenceClient(c config) *PreferenceClient

NewPreferenceClient returns a client for the Preference from the given config.

func (*PreferenceClient) Create

func (c *PreferenceClient) Create() *PreferenceCreate

Create returns a create builder for Preference.

func (*PreferenceClient) CreateBulk

func (c *PreferenceClient) CreateBulk(builders ...*PreferenceCreate) *PreferenceCreateBulk

CreateBulk returns a builder for creating a bulk of Preference entities.

func (*PreferenceClient) Delete

func (c *PreferenceClient) Delete() *PreferenceDelete

Delete returns a delete builder for Preference.

func (*PreferenceClient) DeleteOne

func (c *PreferenceClient) DeleteOne(pr *Preference) *PreferenceDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*PreferenceClient) DeleteOneID

func (c *PreferenceClient) DeleteOneID(id int) *PreferenceDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*PreferenceClient) Get

func (c *PreferenceClient) Get(ctx context.Context, id int) (*Preference, error)

Get returns a Preference entity by its id.

func (*PreferenceClient) GetX

func (c *PreferenceClient) GetX(ctx context.Context, id int) *Preference

GetX is like Get, but panics if an error occurs.

func (*PreferenceClient) Hooks

func (c *PreferenceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PreferenceClient) Query

func (c *PreferenceClient) Query() *PreferenceQuery

Query returns a query builder for Preference.

func (*PreferenceClient) Update

func (c *PreferenceClient) Update() *PreferenceUpdate

Update returns an update builder for Preference.

func (*PreferenceClient) UpdateOne

func (c *PreferenceClient) UpdateOne(pr *Preference) *PreferenceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PreferenceClient) UpdateOneID

func (c *PreferenceClient) UpdateOneID(id int) *PreferenceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PreferenceClient) Use

func (c *PreferenceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `preference.Hooks(f(g(h())))`.

type PreferenceCreate

type PreferenceCreate struct {
	// contains filtered or unexported fields
}

PreferenceCreate is the builder for creating a Preference entity.

func (*PreferenceCreate) Mutation

func (pc *PreferenceCreate) Mutation() *PreferenceMutation

Mutation returns the PreferenceMutation object of the builder.

func (*PreferenceCreate) Save

func (pc *PreferenceCreate) Save(ctx context.Context) (*Preference, error)

Save creates the Preference in the database.

func (*PreferenceCreate) SaveX

func (pc *PreferenceCreate) SaveX(ctx context.Context) *Preference

SaveX calls Save and panics if Save returns an error.

func (*PreferenceCreate) SetName

func (pc *PreferenceCreate) SetName(s string) *PreferenceCreate

SetName sets the "name" field.

func (*PreferenceCreate) SetValue

func (pc *PreferenceCreate) SetValue(s string) *PreferenceCreate

SetValue sets the "value" field.

type PreferenceCreateBulk

type PreferenceCreateBulk struct {
	// contains filtered or unexported fields
}

PreferenceCreateBulk is the builder for creating many Preference entities in bulk.

func (*PreferenceCreateBulk) Save

func (pcb *PreferenceCreateBulk) Save(ctx context.Context) ([]*Preference, error)

Save creates the Preference entities in the database.

func (*PreferenceCreateBulk) SaveX

func (pcb *PreferenceCreateBulk) SaveX(ctx context.Context) []*Preference

SaveX is like Save, but panics if an error occurs.

type PreferenceDelete

type PreferenceDelete struct {
	// contains filtered or unexported fields
}

PreferenceDelete is the builder for deleting a Preference entity.

func (*PreferenceDelete) Exec

func (pd *PreferenceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PreferenceDelete) ExecX

func (pd *PreferenceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PreferenceDelete) Where

Where adds a new predicate to the PreferenceDelete builder.

type PreferenceDeleteOne

type PreferenceDeleteOne struct {
	// contains filtered or unexported fields
}

PreferenceDeleteOne is the builder for deleting a single Preference entity.

func (*PreferenceDeleteOne) Exec

func (pdo *PreferenceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PreferenceDeleteOne) ExecX

func (pdo *PreferenceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PreferenceGroupBy

type PreferenceGroupBy struct {
	// contains filtered or unexported fields
}

PreferenceGroupBy is the group-by builder for Preference entities.

func (*PreferenceGroupBy) Aggregate

func (pgb *PreferenceGroupBy) Aggregate(fns ...AggregateFunc) *PreferenceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PreferenceGroupBy) Bool

func (pgb *PreferenceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) BoolX

func (pgb *PreferenceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PreferenceGroupBy) Bools

func (pgb *PreferenceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) BoolsX

func (pgb *PreferenceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PreferenceGroupBy) Float64

func (pgb *PreferenceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) Float64X

func (pgb *PreferenceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PreferenceGroupBy) Float64s

func (pgb *PreferenceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) Float64sX

func (pgb *PreferenceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PreferenceGroupBy) Int

func (pgb *PreferenceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) IntX

func (pgb *PreferenceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PreferenceGroupBy) Ints

func (pgb *PreferenceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) IntsX

func (pgb *PreferenceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PreferenceGroupBy) Scan

func (pgb *PreferenceGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*PreferenceGroupBy) ScanX

func (pgb *PreferenceGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PreferenceGroupBy) String

func (pgb *PreferenceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) StringX

func (pgb *PreferenceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PreferenceGroupBy) Strings

func (pgb *PreferenceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*PreferenceGroupBy) StringsX

func (pgb *PreferenceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PreferenceMutation

type PreferenceMutation struct {
	// contains filtered or unexported fields
}

PreferenceMutation represents an operation that mutates the Preference nodes in the graph.

func (*PreferenceMutation) AddField

func (m *PreferenceMutation) 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 (*PreferenceMutation) AddedEdges

func (m *PreferenceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PreferenceMutation) AddedField

func (m *PreferenceMutation) 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 (*PreferenceMutation) AddedFields

func (m *PreferenceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PreferenceMutation) AddedIDs

func (m *PreferenceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PreferenceMutation) ClearEdge

func (m *PreferenceMutation) 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 (*PreferenceMutation) ClearField

func (m *PreferenceMutation) 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 (*PreferenceMutation) ClearedEdges

func (m *PreferenceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PreferenceMutation) ClearedFields

func (m *PreferenceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PreferenceMutation) Client

func (m PreferenceMutation) 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 (*PreferenceMutation) EdgeCleared

func (m *PreferenceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PreferenceMutation) Field

func (m *PreferenceMutation) 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 (*PreferenceMutation) FieldCleared

func (m *PreferenceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PreferenceMutation) Fields

func (m *PreferenceMutation) 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 (*PreferenceMutation) ID

func (m *PreferenceMutation) 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.

func (*PreferenceMutation) Name

func (m *PreferenceMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PreferenceMutation) OldField

func (m *PreferenceMutation) 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 (*PreferenceMutation) OldName

func (m *PreferenceMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Preference entity. If the Preference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PreferenceMutation) OldValue

func (m *PreferenceMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the Preference entity. If the Preference object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PreferenceMutation) Op

func (m *PreferenceMutation) Op() Op

Op returns the operation name.

func (*PreferenceMutation) RemovedEdges

func (m *PreferenceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PreferenceMutation) RemovedIDs

func (m *PreferenceMutation) 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 (*PreferenceMutation) ResetEdge

func (m *PreferenceMutation) 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 (*PreferenceMutation) ResetField

func (m *PreferenceMutation) 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 (*PreferenceMutation) ResetName

func (m *PreferenceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PreferenceMutation) ResetValue

func (m *PreferenceMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*PreferenceMutation) SetField

func (m *PreferenceMutation) 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 (*PreferenceMutation) SetName

func (m *PreferenceMutation) SetName(s string)

SetName sets the "name" field.

func (*PreferenceMutation) SetValue

func (m *PreferenceMutation) SetValue(s string)

SetValue sets the "value" field.

func (PreferenceMutation) Tx

func (m PreferenceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PreferenceMutation) Type

func (m *PreferenceMutation) Type() string

Type returns the node type of this mutation (Preference).

func (*PreferenceMutation) Value

func (m *PreferenceMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

type PreferenceQuery

type PreferenceQuery struct {
	// contains filtered or unexported fields
}

PreferenceQuery is the builder for querying Preference entities.

func (*PreferenceQuery) All

func (pq *PreferenceQuery) All(ctx context.Context) ([]*Preference, error)

All executes the query and returns a list of Preferences.

func (*PreferenceQuery) AllX

func (pq *PreferenceQuery) AllX(ctx context.Context) []*Preference

AllX is like All, but panics if an error occurs.

func (*PreferenceQuery) Clone

func (pq *PreferenceQuery) Clone() *PreferenceQuery

Clone returns a duplicate of the PreferenceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PreferenceQuery) Count

func (pq *PreferenceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PreferenceQuery) CountX

func (pq *PreferenceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PreferenceQuery) Exist

func (pq *PreferenceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PreferenceQuery) ExistX

func (pq *PreferenceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PreferenceQuery) First

func (pq *PreferenceQuery) First(ctx context.Context) (*Preference, error)

First returns the first Preference entity from the query. Returns a *NotFoundError when no Preference was found.

func (*PreferenceQuery) FirstID

func (pq *PreferenceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Preference ID from the query. Returns a *NotFoundError when no Preference ID was found.

func (*PreferenceQuery) FirstIDX

func (pq *PreferenceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PreferenceQuery) FirstX

func (pq *PreferenceQuery) FirstX(ctx context.Context) *Preference

FirstX is like First, but panics if an error occurs.

func (*PreferenceQuery) GroupBy

func (pq *PreferenceQuery) GroupBy(field string, fields ...string) *PreferenceGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Preference.Query().
	GroupBy(preference.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PreferenceQuery) IDs

func (pq *PreferenceQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Preference IDs.

func (*PreferenceQuery) IDsX

func (pq *PreferenceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PreferenceQuery) Limit

func (pq *PreferenceQuery) Limit(limit int) *PreferenceQuery

Limit adds a limit step to the query.

func (*PreferenceQuery) Offset

func (pq *PreferenceQuery) Offset(offset int) *PreferenceQuery

Offset adds an offset step to the query.

func (*PreferenceQuery) Only

func (pq *PreferenceQuery) Only(ctx context.Context) (*Preference, error)

Only returns a single Preference entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Preference entity is not found. Returns a *NotFoundError when no Preference entities are found.

func (*PreferenceQuery) OnlyID

func (pq *PreferenceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Preference ID in the query. Returns a *NotSingularError when exactly one Preference ID is not found. Returns a *NotFoundError when no entities are found.

func (*PreferenceQuery) OnlyIDX

func (pq *PreferenceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PreferenceQuery) OnlyX

func (pq *PreferenceQuery) OnlyX(ctx context.Context) *Preference

OnlyX is like Only, but panics if an error occurs.

func (*PreferenceQuery) Order

func (pq *PreferenceQuery) Order(o ...OrderFunc) *PreferenceQuery

Order adds an order step to the query.

func (*PreferenceQuery) Select

func (pq *PreferenceQuery) Select(field string, fields ...string) *PreferenceSelect

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 {
	Name string `json:"name,omitempty"`
}

client.Preference.Query().
	Select(preference.FieldName).
	Scan(ctx, &v)

func (*PreferenceQuery) Where

Where adds a new predicate for the PreferenceQuery builder.

type PreferenceSelect

type PreferenceSelect struct {
	*PreferenceQuery
	// contains filtered or unexported fields
}

PreferenceSelect is the builder for selecting fields of Preference entities.

func (*PreferenceSelect) Bool

func (ps *PreferenceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) BoolX

func (ps *PreferenceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PreferenceSelect) Bools

func (ps *PreferenceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) BoolsX

func (ps *PreferenceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PreferenceSelect) Float64

func (ps *PreferenceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) Float64X

func (ps *PreferenceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PreferenceSelect) Float64s

func (ps *PreferenceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) Float64sX

func (ps *PreferenceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PreferenceSelect) Int

func (ps *PreferenceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) IntX

func (ps *PreferenceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PreferenceSelect) Ints

func (ps *PreferenceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) IntsX

func (ps *PreferenceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PreferenceSelect) Scan

func (ps *PreferenceSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*PreferenceSelect) ScanX

func (ps *PreferenceSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PreferenceSelect) String

func (ps *PreferenceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) StringX

func (ps *PreferenceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PreferenceSelect) Strings

func (ps *PreferenceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PreferenceSelect) StringsX

func (ps *PreferenceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PreferenceUpdate

type PreferenceUpdate struct {
	// contains filtered or unexported fields
}

PreferenceUpdate is the builder for updating Preference entities.

func (*PreferenceUpdate) Exec

func (pu *PreferenceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PreferenceUpdate) ExecX

func (pu *PreferenceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PreferenceUpdate) Mutation

func (pu *PreferenceUpdate) Mutation() *PreferenceMutation

Mutation returns the PreferenceMutation object of the builder.

func (*PreferenceUpdate) Save

func (pu *PreferenceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PreferenceUpdate) SaveX

func (pu *PreferenceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PreferenceUpdate) SetName

func (pu *PreferenceUpdate) SetName(s string) *PreferenceUpdate

SetName sets the "name" field.

func (*PreferenceUpdate) SetValue

func (pu *PreferenceUpdate) SetValue(s string) *PreferenceUpdate

SetValue sets the "value" field.

func (*PreferenceUpdate) Where

Where adds a new predicate for the PreferenceUpdate builder.

type PreferenceUpdateOne

type PreferenceUpdateOne struct {
	// contains filtered or unexported fields
}

PreferenceUpdateOne is the builder for updating a single Preference entity.

func (*PreferenceUpdateOne) Exec

func (puo *PreferenceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PreferenceUpdateOne) ExecX

func (puo *PreferenceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PreferenceUpdateOne) Mutation

func (puo *PreferenceUpdateOne) Mutation() *PreferenceMutation

Mutation returns the PreferenceMutation object of the builder.

func (*PreferenceUpdateOne) Save

func (puo *PreferenceUpdateOne) Save(ctx context.Context) (*Preference, error)

Save executes the query and returns the updated Preference entity.

func (*PreferenceUpdateOne) SaveX

func (puo *PreferenceUpdateOne) SaveX(ctx context.Context) *Preference

SaveX is like Save, but panics if an error occurs.

func (*PreferenceUpdateOne) SetName

SetName sets the "name" field.

func (*PreferenceUpdateOne) SetValue

SetValue sets the "value" field.

type Preferences

type Preferences []*Preference

Preferences is a parsable slice of Preference.

type Product

type Product struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Type holds the value of the "type" field.
	Type product.Type `json:"type,omitempty"`
	// TypeName holds the value of the "typeName" field.
	TypeName string `json:"typeName,omitempty"`
	// SubType holds the value of the "subType" field.
	SubType string `json:"subType,omitempty"`
	// SubTypeName holds the value of the "subTypeName" field.
	SubTypeName string `json:"subTypeName,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// contains filtered or unexported fields
}

Product is the model entity for the Product schema.

func (*Product) String

func (pr *Product) String() string

String implements the fmt.Stringer.

func (*Product) Unwrap

func (pr *Product) Unwrap() *Product

Unwrap unwraps the Product 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 (*Product) Update

func (pr *Product) Update() *ProductUpdateOne

Update returns a builder for updating this Product. Note that you need to call Product.Unwrap() before calling this method if this Product was returned from a transaction, and the transaction was committed or rolled back.

type ProductClient

type ProductClient struct {
	// contains filtered or unexported fields
}

ProductClient is a client for the Product schema.

func NewProductClient

func NewProductClient(c config) *ProductClient

NewProductClient returns a client for the Product from the given config.

func (*ProductClient) Create

func (c *ProductClient) Create() *ProductCreate

Create returns a create builder for Product.

func (*ProductClient) CreateBulk

func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk

CreateBulk returns a builder for creating a bulk of Product entities.

func (*ProductClient) Delete

func (c *ProductClient) Delete() *ProductDelete

Delete returns a delete builder for Product.

func (*ProductClient) DeleteOne

func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ProductClient) DeleteOneID

func (c *ProductClient) DeleteOneID(id int) *ProductDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ProductClient) Get

func (c *ProductClient) Get(ctx context.Context, id int) (*Product, error)

Get returns a Product entity by its id.

func (*ProductClient) GetX

func (c *ProductClient) GetX(ctx context.Context, id int) *Product

GetX is like Get, but panics if an error occurs.

func (*ProductClient) Hooks

func (c *ProductClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProductClient) Query

func (c *ProductClient) Query() *ProductQuery

Query returns a query builder for Product.

func (*ProductClient) Update

func (c *ProductClient) Update() *ProductUpdate

Update returns an update builder for Product.

func (*ProductClient) UpdateOne

func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProductClient) UpdateOneID

func (c *ProductClient) UpdateOneID(id int) *ProductUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProductClient) Use

func (c *ProductClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `product.Hooks(f(g(h())))`.

type ProductCreate

type ProductCreate struct {
	// contains filtered or unexported fields
}

ProductCreate is the builder for creating a Product entity.

func (*ProductCreate) Mutation

func (pc *ProductCreate) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductCreate) Save

func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)

Save creates the Product in the database.

func (*ProductCreate) SaveX

func (pc *ProductCreate) SaveX(ctx context.Context) *Product

SaveX calls Save and panics if Save returns an error.

func (*ProductCreate) SetName

func (pc *ProductCreate) SetName(s string) *ProductCreate

SetName sets the "name" field.

func (*ProductCreate) SetSubType

func (pc *ProductCreate) SetSubType(s string) *ProductCreate

SetSubType sets the "subType" field.

func (*ProductCreate) SetSubTypeName

func (pc *ProductCreate) SetSubTypeName(s string) *ProductCreate

SetSubTypeName sets the "subTypeName" field.

func (*ProductCreate) SetType

func (pc *ProductCreate) SetType(pr product.Type) *ProductCreate

SetType sets the "type" field.

func (*ProductCreate) SetTypeName

func (pc *ProductCreate) SetTypeName(s string) *ProductCreate

SetTypeName sets the "typeName" field.

func (*ProductCreate) SetURL

func (pc *ProductCreate) SetURL(s string) *ProductCreate

SetURL sets the "url" field.

type ProductCreateBulk

type ProductCreateBulk struct {
	// contains filtered or unexported fields
}

ProductCreateBulk is the builder for creating many Product entities in bulk.

func (*ProductCreateBulk) Save

func (pcb *ProductCreateBulk) Save(ctx context.Context) ([]*Product, error)

Save creates the Product entities in the database.

func (*ProductCreateBulk) SaveX

func (pcb *ProductCreateBulk) SaveX(ctx context.Context) []*Product

SaveX is like Save, but panics if an error occurs.

type ProductDelete

type ProductDelete struct {
	// contains filtered or unexported fields
}

ProductDelete is the builder for deleting a Product entity.

func (*ProductDelete) Exec

func (pd *ProductDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProductDelete) ExecX

func (pd *ProductDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProductDelete) Where

func (pd *ProductDelete) Where(ps ...predicate.Product) *ProductDelete

Where adds a new predicate to the ProductDelete builder.

type ProductDeleteOne

type ProductDeleteOne struct {
	// contains filtered or unexported fields
}

ProductDeleteOne is the builder for deleting a single Product entity.

func (*ProductDeleteOne) Exec

func (pdo *ProductDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProductDeleteOne) ExecX

func (pdo *ProductDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ProductGroupBy

type ProductGroupBy struct {
	// contains filtered or unexported fields
}

ProductGroupBy is the group-by builder for Product entities.

func (*ProductGroupBy) Aggregate

func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProductGroupBy) Bool

func (pgb *ProductGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) BoolX

func (pgb *ProductGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProductGroupBy) Bools

func (pgb *ProductGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) BoolsX

func (pgb *ProductGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProductGroupBy) Float64

func (pgb *ProductGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) Float64X

func (pgb *ProductGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProductGroupBy) Float64s

func (pgb *ProductGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) Float64sX

func (pgb *ProductGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProductGroupBy) Int

func (pgb *ProductGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) IntX

func (pgb *ProductGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProductGroupBy) Ints

func (pgb *ProductGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) IntsX

func (pgb *ProductGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProductGroupBy) Scan

func (pgb *ProductGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*ProductGroupBy) ScanX

func (pgb *ProductGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ProductGroupBy) String

func (pgb *ProductGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) StringX

func (pgb *ProductGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProductGroupBy) Strings

func (pgb *ProductGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ProductGroupBy) StringsX

func (pgb *ProductGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProductMutation

type ProductMutation struct {
	// contains filtered or unexported fields
}

ProductMutation represents an operation that mutates the Product nodes in the graph.

func (*ProductMutation) AddField

func (m *ProductMutation) 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 (*ProductMutation) AddedEdges

func (m *ProductMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProductMutation) AddedField

func (m *ProductMutation) 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 (*ProductMutation) AddedFields

func (m *ProductMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProductMutation) AddedIDs

func (m *ProductMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProductMutation) ClearEdge

func (m *ProductMutation) 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 (*ProductMutation) ClearField

func (m *ProductMutation) 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 (*ProductMutation) ClearedEdges

func (m *ProductMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProductMutation) ClearedFields

func (m *ProductMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProductMutation) Client

func (m ProductMutation) 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 (*ProductMutation) EdgeCleared

func (m *ProductMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProductMutation) Field

func (m *ProductMutation) 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 (*ProductMutation) FieldCleared

func (m *ProductMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProductMutation) Fields

func (m *ProductMutation) 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 (*ProductMutation) GetType

func (m *ProductMutation) GetType() (r product.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*ProductMutation) ID

func (m *ProductMutation) 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.

func (*ProductMutation) Name

func (m *ProductMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ProductMutation) OldField

func (m *ProductMutation) 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 (*ProductMutation) OldName

func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Product entity. If the Product object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProductMutation) OldSubType

func (m *ProductMutation) OldSubType(ctx context.Context) (v string, err error)

OldSubType returns the old "subType" field's value of the Product entity. If the Product object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProductMutation) OldSubTypeName

func (m *ProductMutation) OldSubTypeName(ctx context.Context) (v string, err error)

OldSubTypeName returns the old "subTypeName" field's value of the Product entity. If the Product object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProductMutation) OldType

func (m *ProductMutation) OldType(ctx context.Context) (v product.Type, err error)

OldType returns the old "type" field's value of the Product entity. If the Product object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProductMutation) OldTypeName

func (m *ProductMutation) OldTypeName(ctx context.Context) (v string, err error)

OldTypeName returns the old "typeName" field's value of the Product entity. If the Product object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProductMutation) OldURL

func (m *ProductMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Product entity. If the Product object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProductMutation) Op

func (m *ProductMutation) Op() Op

Op returns the operation name.

func (*ProductMutation) RemovedEdges

func (m *ProductMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProductMutation) RemovedIDs

func (m *ProductMutation) 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 (*ProductMutation) ResetEdge

func (m *ProductMutation) 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 (*ProductMutation) ResetField

func (m *ProductMutation) 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 (*ProductMutation) ResetName

func (m *ProductMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProductMutation) ResetSubType

func (m *ProductMutation) ResetSubType()

ResetSubType resets all changes to the "subType" field.

func (*ProductMutation) ResetSubTypeName

func (m *ProductMutation) ResetSubTypeName()

ResetSubTypeName resets all changes to the "subTypeName" field.

func (*ProductMutation) ResetType

func (m *ProductMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ProductMutation) ResetTypeName

func (m *ProductMutation) ResetTypeName()

ResetTypeName resets all changes to the "typeName" field.

func (*ProductMutation) ResetURL

func (m *ProductMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*ProductMutation) SetField

func (m *ProductMutation) 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 (*ProductMutation) SetName

func (m *ProductMutation) SetName(s string)

SetName sets the "name" field.

func (*ProductMutation) SetSubType

func (m *ProductMutation) SetSubType(s string)

SetSubType sets the "subType" field.

func (*ProductMutation) SetSubTypeName

func (m *ProductMutation) SetSubTypeName(s string)

SetSubTypeName sets the "subTypeName" field.

func (*ProductMutation) SetType

func (m *ProductMutation) SetType(pr product.Type)

SetType sets the "type" field.

func (*ProductMutation) SetTypeName

func (m *ProductMutation) SetTypeName(s string)

SetTypeName sets the "typeName" field.

func (*ProductMutation) SetURL

func (m *ProductMutation) SetURL(s string)

SetURL sets the "url" field.

func (*ProductMutation) SubType

func (m *ProductMutation) SubType() (r string, exists bool)

SubType returns the value of the "subType" field in the mutation.

func (*ProductMutation) SubTypeName

func (m *ProductMutation) SubTypeName() (r string, exists bool)

SubTypeName returns the value of the "subTypeName" field in the mutation.

func (ProductMutation) Tx

func (m ProductMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProductMutation) Type

func (m *ProductMutation) Type() string

Type returns the node type of this mutation (Product).

func (*ProductMutation) TypeName

func (m *ProductMutation) TypeName() (r string, exists bool)

TypeName returns the value of the "typeName" field in the mutation.

func (*ProductMutation) URL

func (m *ProductMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

type ProductQuery

type ProductQuery struct {
	// contains filtered or unexported fields
}

ProductQuery is the builder for querying Product entities.

func (*ProductQuery) All

func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)

All executes the query and returns a list of Products.

func (*ProductQuery) AllX

func (pq *ProductQuery) AllX(ctx context.Context) []*Product

AllX is like All, but panics if an error occurs.

func (*ProductQuery) Clone

func (pq *ProductQuery) Clone() *ProductQuery

Clone returns a duplicate of the ProductQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProductQuery) Count

func (pq *ProductQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProductQuery) CountX

func (pq *ProductQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProductQuery) Exist

func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProductQuery) ExistX

func (pq *ProductQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProductQuery) First

func (pq *ProductQuery) First(ctx context.Context) (*Product, error)

First returns the first Product entity from the query. Returns a *NotFoundError when no Product was found.

func (*ProductQuery) FirstID

func (pq *ProductQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Product ID from the query. Returns a *NotFoundError when no Product ID was found.

func (*ProductQuery) FirstIDX

func (pq *ProductQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProductQuery) FirstX

func (pq *ProductQuery) FirstX(ctx context.Context) *Product

FirstX is like First, but panics if an error occurs.

func (*ProductQuery) GroupBy

func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Product.Query().
	GroupBy(product.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProductQuery) IDs

func (pq *ProductQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Product IDs.

func (*ProductQuery) IDsX

func (pq *ProductQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ProductQuery) Limit

func (pq *ProductQuery) Limit(limit int) *ProductQuery

Limit adds a limit step to the query.

func (*ProductQuery) Offset

func (pq *ProductQuery) Offset(offset int) *ProductQuery

Offset adds an offset step to the query.

func (*ProductQuery) Only

func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)

Only returns a single Product entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Product entity is not found. Returns a *NotFoundError when no Product entities are found.

func (*ProductQuery) OnlyID

func (pq *ProductQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Product ID in the query. Returns a *NotSingularError when exactly one Product ID is not found. Returns a *NotFoundError when no entities are found.

func (*ProductQuery) OnlyIDX

func (pq *ProductQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProductQuery) OnlyX

func (pq *ProductQuery) OnlyX(ctx context.Context) *Product

OnlyX is like Only, but panics if an error occurs.

func (*ProductQuery) Order

func (pq *ProductQuery) Order(o ...OrderFunc) *ProductQuery

Order adds an order step to the query.

func (*ProductQuery) Select

func (pq *ProductQuery) Select(field string, fields ...string) *ProductSelect

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 {
	Name string `json:"name,omitempty"`
}

client.Product.Query().
	Select(product.FieldName).
	Scan(ctx, &v)

func (*ProductQuery) Where

func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery

Where adds a new predicate for the ProductQuery builder.

type ProductSelect

type ProductSelect struct {
	*ProductQuery
	// contains filtered or unexported fields
}

ProductSelect is the builder for selecting fields of Product entities.

func (*ProductSelect) Bool

func (ps *ProductSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProductSelect) BoolX

func (ps *ProductSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProductSelect) Bools

func (ps *ProductSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProductSelect) BoolsX

func (ps *ProductSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProductSelect) Float64

func (ps *ProductSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProductSelect) Float64X

func (ps *ProductSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProductSelect) Float64s

func (ps *ProductSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProductSelect) Float64sX

func (ps *ProductSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProductSelect) Int

func (ps *ProductSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProductSelect) IntX

func (ps *ProductSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProductSelect) Ints

func (ps *ProductSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProductSelect) IntsX

func (ps *ProductSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProductSelect) Scan

func (ps *ProductSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*ProductSelect) ScanX

func (ps *ProductSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ProductSelect) String

func (ps *ProductSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProductSelect) StringX

func (ps *ProductSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProductSelect) Strings

func (ps *ProductSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProductSelect) StringsX

func (ps *ProductSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProductUpdate

type ProductUpdate struct {
	// contains filtered or unexported fields
}

ProductUpdate is the builder for updating Product entities.

func (*ProductUpdate) Exec

func (pu *ProductUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductUpdate) ExecX

func (pu *ProductUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpdate) Mutation

func (pu *ProductUpdate) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductUpdate) Save

func (pu *ProductUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProductUpdate) SaveX

func (pu *ProductUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProductUpdate) SetName

func (pu *ProductUpdate) SetName(s string) *ProductUpdate

SetName sets the "name" field.

func (*ProductUpdate) SetSubType

func (pu *ProductUpdate) SetSubType(s string) *ProductUpdate

SetSubType sets the "subType" field.

func (*ProductUpdate) SetSubTypeName

func (pu *ProductUpdate) SetSubTypeName(s string) *ProductUpdate

SetSubTypeName sets the "subTypeName" field.

func (*ProductUpdate) SetType

func (pu *ProductUpdate) SetType(pr product.Type) *ProductUpdate

SetType sets the "type" field.

func (*ProductUpdate) SetTypeName

func (pu *ProductUpdate) SetTypeName(s string) *ProductUpdate

SetTypeName sets the "typeName" field.

func (*ProductUpdate) SetURL

func (pu *ProductUpdate) SetURL(s string) *ProductUpdate

SetURL sets the "url" field.

func (*ProductUpdate) Where

func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate

Where adds a new predicate for the ProductUpdate builder.

type ProductUpdateOne

type ProductUpdateOne struct {
	// contains filtered or unexported fields
}

ProductUpdateOne is the builder for updating a single Product entity.

func (*ProductUpdateOne) Exec

func (puo *ProductUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProductUpdateOne) ExecX

func (puo *ProductUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpdateOne) Mutation

func (puo *ProductUpdateOne) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductUpdateOne) Save

func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)

Save executes the query and returns the updated Product entity.

func (*ProductUpdateOne) SaveX

func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product

SaveX is like Save, but panics if an error occurs.

func (*ProductUpdateOne) SetName

func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne

SetName sets the "name" field.

func (*ProductUpdateOne) SetSubType

func (puo *ProductUpdateOne) SetSubType(s string) *ProductUpdateOne

SetSubType sets the "subType" field.

func (*ProductUpdateOne) SetSubTypeName

func (puo *ProductUpdateOne) SetSubTypeName(s string) *ProductUpdateOne

SetSubTypeName sets the "subTypeName" field.

func (*ProductUpdateOne) SetType

func (puo *ProductUpdateOne) SetType(pr product.Type) *ProductUpdateOne

SetType sets the "type" field.

func (*ProductUpdateOne) SetTypeName

func (puo *ProductUpdateOne) SetTypeName(s string) *ProductUpdateOne

SetTypeName sets the "typeName" field.

func (*ProductUpdateOne) SetURL

func (puo *ProductUpdateOne) SetURL(s string) *ProductUpdateOne

SetURL sets the "url" field.

type Products

type Products []*Product

Products is a parsable slice of Product.

type Query

type Query = ent.Query

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(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 Rollbacker method.

type RoutingNumber

type RoutingNumber struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Number holds the value of the "number" field.
	Number string `json:"number,omitempty"`
	// Type holds the value of the "type" field.
	Type routingnumber.Type `json:"type,omitempty"`
	// contains filtered or unexported fields
}

RoutingNumber is the model entity for the RoutingNumber schema.

func (*RoutingNumber) String

func (rn *RoutingNumber) String() string

String implements the fmt.Stringer.

func (*RoutingNumber) Unwrap

func (rn *RoutingNumber) Unwrap() *RoutingNumber

Unwrap unwraps the RoutingNumber 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 (*RoutingNumber) Update

func (rn *RoutingNumber) Update() *RoutingNumberUpdateOne

Update returns a builder for updating this RoutingNumber. Note that you need to call RoutingNumber.Unwrap() before calling this method if this RoutingNumber was returned from a transaction, and the transaction was committed or rolled back.

type RoutingNumberClient

type RoutingNumberClient struct {
	// contains filtered or unexported fields
}

RoutingNumberClient is a client for the RoutingNumber schema.

func NewRoutingNumberClient

func NewRoutingNumberClient(c config) *RoutingNumberClient

NewRoutingNumberClient returns a client for the RoutingNumber from the given config.

func (*RoutingNumberClient) Create

Create returns a create builder for RoutingNumber.

func (*RoutingNumberClient) CreateBulk

CreateBulk returns a builder for creating a bulk of RoutingNumber entities.

func (*RoutingNumberClient) Delete

Delete returns a delete builder for RoutingNumber.

func (*RoutingNumberClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*RoutingNumberClient) DeleteOneID

func (c *RoutingNumberClient) DeleteOneID(id int) *RoutingNumberDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*RoutingNumberClient) Get

Get returns a RoutingNumber entity by its id.

func (*RoutingNumberClient) GetX

GetX is like Get, but panics if an error occurs.

func (*RoutingNumberClient) Hooks

func (c *RoutingNumberClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RoutingNumberClient) Query

Query returns a query builder for RoutingNumber.

func (*RoutingNumberClient) Update

Update returns an update builder for RoutingNumber.

func (*RoutingNumberClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RoutingNumberClient) UpdateOneID

func (c *RoutingNumberClient) UpdateOneID(id int) *RoutingNumberUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RoutingNumberClient) Use

func (c *RoutingNumberClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `routingnumber.Hooks(f(g(h())))`.

type RoutingNumberCreate

type RoutingNumberCreate struct {
	// contains filtered or unexported fields
}

RoutingNumberCreate is the builder for creating a RoutingNumber entity.

func (*RoutingNumberCreate) Mutation

func (rnc *RoutingNumberCreate) Mutation() *RoutingNumberMutation

Mutation returns the RoutingNumberMutation object of the builder.

func (*RoutingNumberCreate) Save

Save creates the RoutingNumber in the database.

func (*RoutingNumberCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RoutingNumberCreate) SetNumber

func (rnc *RoutingNumberCreate) SetNumber(s string) *RoutingNumberCreate

SetNumber sets the "number" field.

func (*RoutingNumberCreate) SetType

SetType sets the "type" field.

type RoutingNumberCreateBulk

type RoutingNumberCreateBulk struct {
	// contains filtered or unexported fields
}

RoutingNumberCreateBulk is the builder for creating many RoutingNumber entities in bulk.

func (*RoutingNumberCreateBulk) Save

Save creates the RoutingNumber entities in the database.

func (*RoutingNumberCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type RoutingNumberDelete

type RoutingNumberDelete struct {
	// contains filtered or unexported fields
}

RoutingNumberDelete is the builder for deleting a RoutingNumber entity.

func (*RoutingNumberDelete) Exec

func (rnd *RoutingNumberDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RoutingNumberDelete) ExecX

func (rnd *RoutingNumberDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RoutingNumberDelete) Where

Where adds a new predicate to the RoutingNumberDelete builder.

type RoutingNumberDeleteOne

type RoutingNumberDeleteOne struct {
	// contains filtered or unexported fields
}

RoutingNumberDeleteOne is the builder for deleting a single RoutingNumber entity.

func (*RoutingNumberDeleteOne) Exec

func (rndo *RoutingNumberDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RoutingNumberDeleteOne) ExecX

func (rndo *RoutingNumberDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type RoutingNumberGroupBy

type RoutingNumberGroupBy struct {
	// contains filtered or unexported fields
}

RoutingNumberGroupBy is the group-by builder for RoutingNumber entities.

func (*RoutingNumberGroupBy) Aggregate

func (rngb *RoutingNumberGroupBy) Aggregate(fns ...AggregateFunc) *RoutingNumberGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RoutingNumberGroupBy) Bool

func (rngb *RoutingNumberGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) BoolX

func (rngb *RoutingNumberGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoutingNumberGroupBy) Bools

func (rngb *RoutingNumberGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) BoolsX

func (rngb *RoutingNumberGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RoutingNumberGroupBy) Float64

func (rngb *RoutingNumberGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) Float64X

func (rngb *RoutingNumberGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoutingNumberGroupBy) Float64s

func (rngb *RoutingNumberGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) Float64sX

func (rngb *RoutingNumberGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoutingNumberGroupBy) Int

func (rngb *RoutingNumberGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) IntX

func (rngb *RoutingNumberGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoutingNumberGroupBy) Ints

func (rngb *RoutingNumberGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) IntsX

func (rngb *RoutingNumberGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoutingNumberGroupBy) Scan

func (rngb *RoutingNumberGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*RoutingNumberGroupBy) ScanX

func (rngb *RoutingNumberGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RoutingNumberGroupBy) String

func (rngb *RoutingNumberGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) StringX

func (rngb *RoutingNumberGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoutingNumberGroupBy) Strings

func (rngb *RoutingNumberGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*RoutingNumberGroupBy) StringsX

func (rngb *RoutingNumberGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoutingNumberMutation

type RoutingNumberMutation struct {
	// contains filtered or unexported fields
}

RoutingNumberMutation represents an operation that mutates the RoutingNumber nodes in the graph.

func (*RoutingNumberMutation) AddField

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) AddedEdges

func (m *RoutingNumberMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RoutingNumberMutation) AddedField

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) AddedFields

func (m *RoutingNumberMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RoutingNumberMutation) AddedIDs

func (m *RoutingNumberMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RoutingNumberMutation) ClearEdge

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) ClearField

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) ClearedEdges

func (m *RoutingNumberMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RoutingNumberMutation) ClearedFields

func (m *RoutingNumberMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RoutingNumberMutation) Client

func (m RoutingNumberMutation) 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 (*RoutingNumberMutation) EdgeCleared

func (m *RoutingNumberMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RoutingNumberMutation) Field

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) FieldCleared

func (m *RoutingNumberMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RoutingNumberMutation) Fields

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) GetType

func (m *RoutingNumberMutation) GetType() (r routingnumber.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*RoutingNumberMutation) ID

func (m *RoutingNumberMutation) 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.

func (*RoutingNumberMutation) Number

func (m *RoutingNumberMutation) Number() (r string, exists bool)

Number returns the value of the "number" field in the mutation.

func (*RoutingNumberMutation) OldField

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) OldNumber

func (m *RoutingNumberMutation) OldNumber(ctx context.Context) (v string, err error)

OldNumber returns the old "number" field's value of the RoutingNumber entity. If the RoutingNumber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RoutingNumberMutation) OldType

func (m *RoutingNumberMutation) OldType(ctx context.Context) (v routingnumber.Type, err error)

OldType returns the old "type" field's value of the RoutingNumber entity. If the RoutingNumber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RoutingNumberMutation) Op

func (m *RoutingNumberMutation) Op() Op

Op returns the operation name.

func (*RoutingNumberMutation) RemovedEdges

func (m *RoutingNumberMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RoutingNumberMutation) RemovedIDs

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) ResetEdge

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) ResetField

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) ResetNumber

func (m *RoutingNumberMutation) ResetNumber()

ResetNumber resets all changes to the "number" field.

func (*RoutingNumberMutation) ResetType

func (m *RoutingNumberMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*RoutingNumberMutation) SetField

func (m *RoutingNumberMutation) 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 (*RoutingNumberMutation) SetNumber

func (m *RoutingNumberMutation) SetNumber(s string)

SetNumber sets the "number" field.

func (*RoutingNumberMutation) SetType

SetType sets the "type" field.

func (RoutingNumberMutation) Tx

func (m RoutingNumberMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RoutingNumberMutation) Type

func (m *RoutingNumberMutation) Type() string

Type returns the node type of this mutation (RoutingNumber).

type RoutingNumberQuery

type RoutingNumberQuery struct {
	// contains filtered or unexported fields
}

RoutingNumberQuery is the builder for querying RoutingNumber entities.

func (*RoutingNumberQuery) All

All executes the query and returns a list of RoutingNumbers.

func (*RoutingNumberQuery) AllX

func (rnq *RoutingNumberQuery) AllX(ctx context.Context) []*RoutingNumber

AllX is like All, but panics if an error occurs.

func (*RoutingNumberQuery) Clone

func (rnq *RoutingNumberQuery) Clone() *RoutingNumberQuery

Clone returns a duplicate of the RoutingNumberQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RoutingNumberQuery) Count

func (rnq *RoutingNumberQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RoutingNumberQuery) CountX

func (rnq *RoutingNumberQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RoutingNumberQuery) Exist

func (rnq *RoutingNumberQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RoutingNumberQuery) ExistX

func (rnq *RoutingNumberQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RoutingNumberQuery) First

First returns the first RoutingNumber entity from the query. Returns a *NotFoundError when no RoutingNumber was found.

func (*RoutingNumberQuery) FirstID

func (rnq *RoutingNumberQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first RoutingNumber ID from the query. Returns a *NotFoundError when no RoutingNumber ID was found.

func (*RoutingNumberQuery) FirstIDX

func (rnq *RoutingNumberQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RoutingNumberQuery) FirstX

func (rnq *RoutingNumberQuery) FirstX(ctx context.Context) *RoutingNumber

FirstX is like First, but panics if an error occurs.

func (*RoutingNumberQuery) GroupBy

func (rnq *RoutingNumberQuery) GroupBy(field string, fields ...string) *RoutingNumberGroupBy

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 {
	Number string `json:"number,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RoutingNumber.Query().
	GroupBy(routingnumber.FieldNumber).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RoutingNumberQuery) IDs

func (rnq *RoutingNumberQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of RoutingNumber IDs.

func (*RoutingNumberQuery) IDsX

func (rnq *RoutingNumberQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RoutingNumberQuery) Limit

func (rnq *RoutingNumberQuery) Limit(limit int) *RoutingNumberQuery

Limit adds a limit step to the query.

func (*RoutingNumberQuery) Offset

func (rnq *RoutingNumberQuery) Offset(offset int) *RoutingNumberQuery

Offset adds an offset step to the query.

func (*RoutingNumberQuery) Only

Only returns a single RoutingNumber entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one RoutingNumber entity is not found. Returns a *NotFoundError when no RoutingNumber entities are found.

func (*RoutingNumberQuery) OnlyID

func (rnq *RoutingNumberQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only RoutingNumber ID in the query. Returns a *NotSingularError when exactly one RoutingNumber ID is not found. Returns a *NotFoundError when no entities are found.

func (*RoutingNumberQuery) OnlyIDX

func (rnq *RoutingNumberQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RoutingNumberQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*RoutingNumberQuery) Order

Order adds an order step to the query.

func (*RoutingNumberQuery) Select

func (rnq *RoutingNumberQuery) Select(field string, fields ...string) *RoutingNumberSelect

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 {
	Number string `json:"number,omitempty"`
}

client.RoutingNumber.Query().
	Select(routingnumber.FieldNumber).
	Scan(ctx, &v)

func (*RoutingNumberQuery) Where

Where adds a new predicate for the RoutingNumberQuery builder.

type RoutingNumberSelect

type RoutingNumberSelect struct {
	*RoutingNumberQuery
	// contains filtered or unexported fields
}

RoutingNumberSelect is the builder for selecting fields of RoutingNumber entities.

func (*RoutingNumberSelect) Bool

func (rns *RoutingNumberSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) BoolX

func (rns *RoutingNumberSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoutingNumberSelect) Bools

func (rns *RoutingNumberSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) BoolsX

func (rns *RoutingNumberSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RoutingNumberSelect) Float64

func (rns *RoutingNumberSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) Float64X

func (rns *RoutingNumberSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoutingNumberSelect) Float64s

func (rns *RoutingNumberSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) Float64sX

func (rns *RoutingNumberSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoutingNumberSelect) Int

func (rns *RoutingNumberSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) IntX

func (rns *RoutingNumberSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoutingNumberSelect) Ints

func (rns *RoutingNumberSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) IntsX

func (rns *RoutingNumberSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoutingNumberSelect) Scan

func (rns *RoutingNumberSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*RoutingNumberSelect) ScanX

func (rns *RoutingNumberSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RoutingNumberSelect) String

func (rns *RoutingNumberSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) StringX

func (rns *RoutingNumberSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoutingNumberSelect) Strings

func (rns *RoutingNumberSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RoutingNumberSelect) StringsX

func (rns *RoutingNumberSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoutingNumberUpdate

type RoutingNumberUpdate struct {
	// contains filtered or unexported fields
}

RoutingNumberUpdate is the builder for updating RoutingNumber entities.

func (*RoutingNumberUpdate) Exec

func (rnu *RoutingNumberUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RoutingNumberUpdate) ExecX

func (rnu *RoutingNumberUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoutingNumberUpdate) Mutation

func (rnu *RoutingNumberUpdate) Mutation() *RoutingNumberMutation

Mutation returns the RoutingNumberMutation object of the builder.

func (*RoutingNumberUpdate) Save

func (rnu *RoutingNumberUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RoutingNumberUpdate) SaveX

func (rnu *RoutingNumberUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RoutingNumberUpdate) SetNumber

func (rnu *RoutingNumberUpdate) SetNumber(s string) *RoutingNumberUpdate

SetNumber sets the "number" field.

func (*RoutingNumberUpdate) SetType

SetType sets the "type" field.

func (*RoutingNumberUpdate) Where

Where adds a new predicate for the RoutingNumberUpdate builder.

type RoutingNumberUpdateOne

type RoutingNumberUpdateOne struct {
	// contains filtered or unexported fields
}

RoutingNumberUpdateOne is the builder for updating a single RoutingNumber entity.

func (*RoutingNumberUpdateOne) Exec

func (rnuo *RoutingNumberUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RoutingNumberUpdateOne) ExecX

func (rnuo *RoutingNumberUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoutingNumberUpdateOne) Mutation

Mutation returns the RoutingNumberMutation object of the builder.

func (*RoutingNumberUpdateOne) Save

Save executes the query and returns the updated RoutingNumber entity.

func (*RoutingNumberUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RoutingNumberUpdateOne) SetNumber

SetNumber sets the "number" field.

func (*RoutingNumberUpdateOne) SetType

SetType sets the "type" field.

type RoutingNumbers

type RoutingNumbers []*RoutingNumber

RoutingNumbers is a parsable slice of RoutingNumber.

type Transaction

type Transaction struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// SequenceInDay holds the value of the "sequenceInDay" field.
	SequenceInDay int `json:"sequenceInDay,omitempty"`
	// Status holds the value of the "status" field.
	Status transaction.Status `json:"status,omitempty"`
	// ExecutedAmount holds the value of the "executedAmount" field.
	ExecutedAmount float64 `json:"executedAmount,omitempty"`
	// ExecutedCurrencyCode holds the value of the "executedCurrencyCode" field.
	ExecutedCurrencyCode string `json:"executedCurrencyCode,omitempty"`
	// ExchangeRate holds the value of the "exchangeRate" field.
	ExchangeRate float64 `json:"exchangeRate,omitempty"`
	// OriginatingAmount holds the value of the "originatingAmount" field.
	OriginatingAmount float64 `json:"originatingAmount,omitempty"`
	// OriginatingCurrencyCode holds the value of the "originatingCurrencyCode" field.
	OriginatingCurrencyCode string `json:"originatingCurrencyCode,omitempty"`
	// Direction holds the value of the "direction" field.
	Direction transaction.Direction `json:"direction,omitempty"`
	// RunningBalance holds the value of the "runningBalance" field.
	RunningBalance float64 `json:"runningBalance,omitempty"`
	// CreatedDate holds the value of the "createdDate" field.
	CreatedDate time.Time `json:"createdDate,omitempty"`
	// PostedDate holds the value of the "postedDate" field.
	PostedDate time.Time `json:"postedDate,omitempty"`
	// ExecutedDate holds the value of the "executedDate" field.
	ExecutedDate time.Time `json:"executedDate,omitempty"`
	// UpdatedDate holds the value of the "updatedDate" field.
	UpdatedDate time.Time `json:"updatedDate,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Memo holds the value of the "memo" field.
	Memo string `json:"memo,omitempty"`
	// Group holds the value of the "group" field.
	Group string `json:"group,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// MainCategory holds the value of the "mainCategory" field.
	MainCategory string `json:"mainCategory,omitempty"`
	// SubCategory holds the value of the "subCategory" field.
	SubCategory string `json:"subCategory,omitempty"`
	// CheckNumber holds the value of the "checkNumber" field.
	CheckNumber string `json:"checkNumber,omitempty"`
	// Latitude holds the value of the "latitude" field.
	Latitude float64 `json:"latitude,omitempty"`
	// Longitude holds the value of the "longitude" field.
	Longitude float64 `json:"longitude,omitempty"`
	// MerchantCode holds the value of the "merchantCode" field.
	MerchantCode string `json:"merchantCode,omitempty"`
	// Reversal holds the value of the "reversal" field.
	Reversal bool `json:"reversal,omitempty"`
	// ReversalFor holds the value of the "reversalFor" field.
	ReversalFor string `json:"reversalFor,omitempty"`
	// Reversed holds the value of the "reversed" field.
	Reversed bool `json:"reversed,omitempty"`
	// ReversedBy holds the value of the "reversedBy" field.
	ReversedBy string `json:"reversedBy,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TransactionQuery when eager-loading is set.
	Edges TransactionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Transaction is the model entity for the Transaction schema.

func (*Transaction) QueryAccount

func (t *Transaction) QueryAccount() *AccountQuery

QueryAccount queries the "account" edge of the Transaction entity.

func (*Transaction) QueryImages

func (t *Transaction) QueryImages() *BinaryItemQuery

QueryImages queries the "images" edge of the Transaction entity.

func (*Transaction) String

func (t *Transaction) String() string

String implements the fmt.Stringer.

func (*Transaction) Unwrap

func (t *Transaction) Unwrap() *Transaction

Unwrap unwraps the Transaction 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 (*Transaction) Update

func (t *Transaction) Update() *TransactionUpdateOne

Update returns a builder for updating this Transaction. Note that you need to call Transaction.Unwrap() before calling this method if this Transaction was returned from a transaction, and the transaction was committed or rolled back.

type TransactionClient

type TransactionClient struct {
	// contains filtered or unexported fields
}

TransactionClient is a client for the Transaction schema.

func NewTransactionClient

func NewTransactionClient(c config) *TransactionClient

NewTransactionClient returns a client for the Transaction from the given config.

func (*TransactionClient) Create

func (c *TransactionClient) Create() *TransactionCreate

Create returns a create builder for Transaction.

func (*TransactionClient) CreateBulk

func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk

CreateBulk returns a builder for creating a bulk of Transaction entities.

func (*TransactionClient) Delete

func (c *TransactionClient) Delete() *TransactionDelete

Delete returns a delete builder for Transaction.

func (*TransactionClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TransactionClient) DeleteOneID

func (c *TransactionClient) DeleteOneID(id uuid.UUID) *TransactionDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*TransactionClient) Get

Get returns a Transaction entity by its id.

func (*TransactionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TransactionClient) Hooks

func (c *TransactionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TransactionClient) Query

func (c *TransactionClient) Query() *TransactionQuery

Query returns a query builder for Transaction.

func (*TransactionClient) QueryAccount

func (c *TransactionClient) QueryAccount(t *Transaction) *AccountQuery

QueryAccount queries the account edge of a Transaction.

func (*TransactionClient) QueryImages

func (c *TransactionClient) QueryImages(t *Transaction) *BinaryItemQuery

QueryImages queries the images edge of a Transaction.

func (*TransactionClient) Update

func (c *TransactionClient) Update() *TransactionUpdate

Update returns an update builder for Transaction.

func (*TransactionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TransactionClient) UpdateOneID

func (c *TransactionClient) UpdateOneID(id uuid.UUID) *TransactionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TransactionClient) Use

func (c *TransactionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `transaction.Hooks(f(g(h())))`.

type TransactionCreate

type TransactionCreate struct {
	// contains filtered or unexported fields
}

TransactionCreate is the builder for creating a Transaction entity.

func (*TransactionCreate) AddImageIDs

func (tc *TransactionCreate) AddImageIDs(ids ...int) *TransactionCreate

AddImageIDs adds the "images" edge to the BinaryItem entity by IDs.

func (*TransactionCreate) AddImages

func (tc *TransactionCreate) AddImages(b ...*BinaryItem) *TransactionCreate

AddImages adds the "images" edges to the BinaryItem entity.

func (*TransactionCreate) Mutation

func (tc *TransactionCreate) Mutation() *TransactionMutation

Mutation returns the TransactionMutation object of the builder.

func (*TransactionCreate) Save

Save creates the Transaction in the database.

func (*TransactionCreate) SaveX

func (tc *TransactionCreate) SaveX(ctx context.Context) *Transaction

SaveX calls Save and panics if Save returns an error.

func (*TransactionCreate) SetAccount

func (tc *TransactionCreate) SetAccount(a *Account) *TransactionCreate

SetAccount sets the "account" edge to the Account entity.

func (*TransactionCreate) SetAccountID

func (tc *TransactionCreate) SetAccountID(id uuid.UUID) *TransactionCreate

SetAccountID sets the "account" edge to the Account entity by ID.

func (*TransactionCreate) SetCheckNumber

func (tc *TransactionCreate) SetCheckNumber(s string) *TransactionCreate

SetCheckNumber sets the "checkNumber" field.

func (*TransactionCreate) SetCreatedDate

func (tc *TransactionCreate) SetCreatedDate(t time.Time) *TransactionCreate

SetCreatedDate sets the "createdDate" field.

func (*TransactionCreate) SetDescription

func (tc *TransactionCreate) SetDescription(s string) *TransactionCreate

SetDescription sets the "description" field.

func (*TransactionCreate) SetDirection

SetDirection sets the "direction" field.

func (*TransactionCreate) SetExchangeRate

func (tc *TransactionCreate) SetExchangeRate(f float64) *TransactionCreate

SetExchangeRate sets the "exchangeRate" field.

func (*TransactionCreate) SetExecutedAmount

func (tc *TransactionCreate) SetExecutedAmount(f float64) *TransactionCreate

SetExecutedAmount sets the "executedAmount" field.

func (*TransactionCreate) SetExecutedCurrencyCode

func (tc *TransactionCreate) SetExecutedCurrencyCode(s string) *TransactionCreate

SetExecutedCurrencyCode sets the "executedCurrencyCode" field.

func (*TransactionCreate) SetExecutedDate

func (tc *TransactionCreate) SetExecutedDate(t time.Time) *TransactionCreate

SetExecutedDate sets the "executedDate" field.

func (*TransactionCreate) SetGroup

func (tc *TransactionCreate) SetGroup(s string) *TransactionCreate

SetGroup sets the "group" field.

func (*TransactionCreate) SetID

SetID sets the "id" field.

func (*TransactionCreate) SetLatitude

func (tc *TransactionCreate) SetLatitude(f float64) *TransactionCreate

SetLatitude sets the "latitude" field.

func (*TransactionCreate) SetLongitude

func (tc *TransactionCreate) SetLongitude(f float64) *TransactionCreate

SetLongitude sets the "longitude" field.

func (*TransactionCreate) SetMainCategory

func (tc *TransactionCreate) SetMainCategory(s string) *TransactionCreate

SetMainCategory sets the "mainCategory" field.

func (*TransactionCreate) SetMemo

func (tc *TransactionCreate) SetMemo(s string) *TransactionCreate

SetMemo sets the "memo" field.

func (*TransactionCreate) SetMerchantCode

func (tc *TransactionCreate) SetMerchantCode(s string) *TransactionCreate

SetMerchantCode sets the "merchantCode" field.

func (*TransactionCreate) SetNillableAccountID

func (tc *TransactionCreate) SetNillableAccountID(id *uuid.UUID) *TransactionCreate

SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.

func (*TransactionCreate) SetNillableCheckNumber

func (tc *TransactionCreate) SetNillableCheckNumber(s *string) *TransactionCreate

SetNillableCheckNumber sets the "checkNumber" field if the given value is not nil.

func (*TransactionCreate) SetNillableDescription

func (tc *TransactionCreate) SetNillableDescription(s *string) *TransactionCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TransactionCreate) SetNillableExchangeRate

func (tc *TransactionCreate) SetNillableExchangeRate(f *float64) *TransactionCreate

SetNillableExchangeRate sets the "exchangeRate" field if the given value is not nil.

func (*TransactionCreate) SetNillableExecutedDate

func (tc *TransactionCreate) SetNillableExecutedDate(t *time.Time) *TransactionCreate

SetNillableExecutedDate sets the "executedDate" field if the given value is not nil.

func (*TransactionCreate) SetNillableGroup

func (tc *TransactionCreate) SetNillableGroup(s *string) *TransactionCreate

SetNillableGroup sets the "group" field if the given value is not nil.

func (*TransactionCreate) SetNillableLatitude

func (tc *TransactionCreate) SetNillableLatitude(f *float64) *TransactionCreate

SetNillableLatitude sets the "latitude" field if the given value is not nil.

func (*TransactionCreate) SetNillableLongitude

func (tc *TransactionCreate) SetNillableLongitude(f *float64) *TransactionCreate

SetNillableLongitude sets the "longitude" field if the given value is not nil.

func (*TransactionCreate) SetNillableMainCategory

func (tc *TransactionCreate) SetNillableMainCategory(s *string) *TransactionCreate

SetNillableMainCategory sets the "mainCategory" field if the given value is not nil.

func (*TransactionCreate) SetNillableMemo

func (tc *TransactionCreate) SetNillableMemo(s *string) *TransactionCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*TransactionCreate) SetNillableMerchantCode

func (tc *TransactionCreate) SetNillableMerchantCode(s *string) *TransactionCreate

SetNillableMerchantCode sets the "merchantCode" field if the given value is not nil.

func (*TransactionCreate) SetNillableOriginatingAmount

func (tc *TransactionCreate) SetNillableOriginatingAmount(f *float64) *TransactionCreate

SetNillableOriginatingAmount sets the "originatingAmount" field if the given value is not nil.

func (*TransactionCreate) SetNillableOriginatingCurrencyCode

func (tc *TransactionCreate) SetNillableOriginatingCurrencyCode(s *string) *TransactionCreate

SetNillableOriginatingCurrencyCode sets the "originatingCurrencyCode" field if the given value is not nil.

func (*TransactionCreate) SetNillablePostedDate

func (tc *TransactionCreate) SetNillablePostedDate(t *time.Time) *TransactionCreate

SetNillablePostedDate sets the "postedDate" field if the given value is not nil.

func (*TransactionCreate) SetNillableReversal

func (tc *TransactionCreate) SetNillableReversal(b *bool) *TransactionCreate

SetNillableReversal sets the "reversal" field if the given value is not nil.

func (*TransactionCreate) SetNillableReversalFor

func (tc *TransactionCreate) SetNillableReversalFor(s *string) *TransactionCreate

SetNillableReversalFor sets the "reversalFor" field if the given value is not nil.

func (*TransactionCreate) SetNillableReversed

func (tc *TransactionCreate) SetNillableReversed(b *bool) *TransactionCreate

SetNillableReversed sets the "reversed" field if the given value is not nil.

func (*TransactionCreate) SetNillableReversedBy

func (tc *TransactionCreate) SetNillableReversedBy(s *string) *TransactionCreate

SetNillableReversedBy sets the "reversedBy" field if the given value is not nil.

func (*TransactionCreate) SetNillableSequenceInDay

func (tc *TransactionCreate) SetNillableSequenceInDay(i *int) *TransactionCreate

SetNillableSequenceInDay sets the "sequenceInDay" field if the given value is not nil.

func (*TransactionCreate) SetNillableSubCategory

func (tc *TransactionCreate) SetNillableSubCategory(s *string) *TransactionCreate

SetNillableSubCategory sets the "subCategory" field if the given value is not nil.

func (*TransactionCreate) SetNillableType

func (tc *TransactionCreate) SetNillableType(s *string) *TransactionCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*TransactionCreate) SetNillableURL

func (tc *TransactionCreate) SetNillableURL(s *string) *TransactionCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*TransactionCreate) SetNillableUpdatedDate

func (tc *TransactionCreate) SetNillableUpdatedDate(t *time.Time) *TransactionCreate

SetNillableUpdatedDate sets the "updatedDate" field if the given value is not nil.

func (*TransactionCreate) SetOriginatingAmount

func (tc *TransactionCreate) SetOriginatingAmount(f float64) *TransactionCreate

SetOriginatingAmount sets the "originatingAmount" field.

func (*TransactionCreate) SetOriginatingCurrencyCode

func (tc *TransactionCreate) SetOriginatingCurrencyCode(s string) *TransactionCreate

SetOriginatingCurrencyCode sets the "originatingCurrencyCode" field.

func (*TransactionCreate) SetPostedDate

func (tc *TransactionCreate) SetPostedDate(t time.Time) *TransactionCreate

SetPostedDate sets the "postedDate" field.

func (*TransactionCreate) SetReversal

func (tc *TransactionCreate) SetReversal(b bool) *TransactionCreate

SetReversal sets the "reversal" field.

func (*TransactionCreate) SetReversalFor

func (tc *TransactionCreate) SetReversalFor(s string) *TransactionCreate

SetReversalFor sets the "reversalFor" field.

func (*TransactionCreate) SetReversed

func (tc *TransactionCreate) SetReversed(b bool) *TransactionCreate

SetReversed sets the "reversed" field.

func (*TransactionCreate) SetReversedBy

func (tc *TransactionCreate) SetReversedBy(s string) *TransactionCreate

SetReversedBy sets the "reversedBy" field.

func (*TransactionCreate) SetRunningBalance

func (tc *TransactionCreate) SetRunningBalance(f float64) *TransactionCreate

SetRunningBalance sets the "runningBalance" field.

func (*TransactionCreate) SetSequenceInDay

func (tc *TransactionCreate) SetSequenceInDay(i int) *TransactionCreate

SetSequenceInDay sets the "sequenceInDay" field.

func (*TransactionCreate) SetStatus

SetStatus sets the "status" field.

func (*TransactionCreate) SetSubCategory

func (tc *TransactionCreate) SetSubCategory(s string) *TransactionCreate

SetSubCategory sets the "subCategory" field.

func (*TransactionCreate) SetType

func (tc *TransactionCreate) SetType(s string) *TransactionCreate

SetType sets the "type" field.

func (*TransactionCreate) SetURL

SetURL sets the "url" field.

func (*TransactionCreate) SetUpdatedDate

func (tc *TransactionCreate) SetUpdatedDate(t time.Time) *TransactionCreate

SetUpdatedDate sets the "updatedDate" field.

type TransactionCreateBulk

type TransactionCreateBulk struct {
	// contains filtered or unexported fields
}

TransactionCreateBulk is the builder for creating many Transaction entities in bulk.

func (*TransactionCreateBulk) Save

func (tcb *TransactionCreateBulk) Save(ctx context.Context) ([]*Transaction, error)

Save creates the Transaction entities in the database.

func (*TransactionCreateBulk) SaveX

func (tcb *TransactionCreateBulk) SaveX(ctx context.Context) []*Transaction

SaveX is like Save, but panics if an error occurs.

type TransactionDelete

type TransactionDelete struct {
	// contains filtered or unexported fields
}

TransactionDelete is the builder for deleting a Transaction entity.

func (*TransactionDelete) Exec

func (td *TransactionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TransactionDelete) ExecX

func (td *TransactionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TransactionDelete) Where

Where adds a new predicate to the TransactionDelete builder.

type TransactionDeleteOne

type TransactionDeleteOne struct {
	// contains filtered or unexported fields
}

TransactionDeleteOne is the builder for deleting a single Transaction entity.

func (*TransactionDeleteOne) Exec

func (tdo *TransactionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TransactionDeleteOne) ExecX

func (tdo *TransactionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TransactionEdges

type TransactionEdges struct {
	// Images holds the value of the images edge.
	Images []*BinaryItem `json:"images,omitempty"`
	// Account holds the value of the account edge.
	Account *Account `json:"account,omitempty"`
	// contains filtered or unexported fields
}

TransactionEdges holds the relations/edges for other nodes in the graph.

func (TransactionEdges) AccountOrErr

func (e TransactionEdges) AccountOrErr() (*Account, error)

AccountOrErr returns the Account value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TransactionEdges) ImagesOrErr

func (e TransactionEdges) ImagesOrErr() ([]*BinaryItem, error)

ImagesOrErr returns the Images value or an error if the edge was not loaded in eager-loading.

type TransactionGroupBy

type TransactionGroupBy struct {
	// contains filtered or unexported fields
}

TransactionGroupBy is the group-by builder for Transaction entities.

func (*TransactionGroupBy) Aggregate

func (tgb *TransactionGroupBy) Aggregate(fns ...AggregateFunc) *TransactionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TransactionGroupBy) Bool

func (tgb *TransactionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) BoolX

func (tgb *TransactionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TransactionGroupBy) Bools

func (tgb *TransactionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) BoolsX

func (tgb *TransactionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TransactionGroupBy) Float64

func (tgb *TransactionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) Float64X

func (tgb *TransactionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TransactionGroupBy) Float64s

func (tgb *TransactionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) Float64sX

func (tgb *TransactionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TransactionGroupBy) Int

func (tgb *TransactionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) IntX

func (tgb *TransactionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TransactionGroupBy) Ints

func (tgb *TransactionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) IntsX

func (tgb *TransactionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TransactionGroupBy) Scan

func (tgb *TransactionGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*TransactionGroupBy) ScanX

func (tgb *TransactionGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TransactionGroupBy) String

func (tgb *TransactionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) StringX

func (tgb *TransactionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TransactionGroupBy) Strings

func (tgb *TransactionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*TransactionGroupBy) StringsX

func (tgb *TransactionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TransactionMutation

type TransactionMutation struct {
	// contains filtered or unexported fields
}

TransactionMutation represents an operation that mutates the Transaction nodes in the graph.

func (*TransactionMutation) AccountCleared

func (m *TransactionMutation) AccountCleared() bool

AccountCleared returns if the "account" edge to the Account entity was cleared.

func (*TransactionMutation) AccountID

func (m *TransactionMutation) AccountID() (id uuid.UUID, exists bool)

AccountID returns the "account" edge ID in the mutation.

func (*TransactionMutation) AccountIDs

func (m *TransactionMutation) AccountIDs() (ids []uuid.UUID)

AccountIDs returns the "account" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccountID instead. It exists only for internal usage by the builders.

func (*TransactionMutation) AddExchangeRate

func (m *TransactionMutation) AddExchangeRate(f float64)

AddExchangeRate adds f to the "exchangeRate" field.

func (*TransactionMutation) AddExecutedAmount

func (m *TransactionMutation) AddExecutedAmount(f float64)

AddExecutedAmount adds f to the "executedAmount" field.

func (*TransactionMutation) AddField

func (m *TransactionMutation) 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 (*TransactionMutation) AddImageIDs

func (m *TransactionMutation) AddImageIDs(ids ...int)

AddImageIDs adds the "images" edge to the BinaryItem entity by ids.

func (*TransactionMutation) AddLatitude

func (m *TransactionMutation) AddLatitude(f float64)

AddLatitude adds f to the "latitude" field.

func (*TransactionMutation) AddLongitude

func (m *TransactionMutation) AddLongitude(f float64)

AddLongitude adds f to the "longitude" field.

func (*TransactionMutation) AddOriginatingAmount

func (m *TransactionMutation) AddOriginatingAmount(f float64)

AddOriginatingAmount adds f to the "originatingAmount" field.

func (*TransactionMutation) AddRunningBalance

func (m *TransactionMutation) AddRunningBalance(f float64)

AddRunningBalance adds f to the "runningBalance" field.

func (*TransactionMutation) AddSequenceInDay

func (m *TransactionMutation) AddSequenceInDay(i int)

AddSequenceInDay adds i to the "sequenceInDay" field.

func (*TransactionMutation) AddedEdges

func (m *TransactionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TransactionMutation) AddedExchangeRate

func (m *TransactionMutation) AddedExchangeRate() (r float64, exists bool)

AddedExchangeRate returns the value that was added to the "exchangeRate" field in this mutation.

func (*TransactionMutation) AddedExecutedAmount

func (m *TransactionMutation) AddedExecutedAmount() (r float64, exists bool)

AddedExecutedAmount returns the value that was added to the "executedAmount" field in this mutation.

func (*TransactionMutation) AddedField

func (m *TransactionMutation) 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 (*TransactionMutation) AddedFields

func (m *TransactionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TransactionMutation) AddedIDs

func (m *TransactionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TransactionMutation) AddedLatitude

func (m *TransactionMutation) AddedLatitude() (r float64, exists bool)

AddedLatitude returns the value that was added to the "latitude" field in this mutation.

func (*TransactionMutation) AddedLongitude

func (m *TransactionMutation) AddedLongitude() (r float64, exists bool)

AddedLongitude returns the value that was added to the "longitude" field in this mutation.

func (*TransactionMutation) AddedOriginatingAmount

func (m *TransactionMutation) AddedOriginatingAmount() (r float64, exists bool)

AddedOriginatingAmount returns the value that was added to the "originatingAmount" field in this mutation.

func (*TransactionMutation) AddedRunningBalance

func (m *TransactionMutation) AddedRunningBalance() (r float64, exists bool)

AddedRunningBalance returns the value that was added to the "runningBalance" field in this mutation.

func (*TransactionMutation) AddedSequenceInDay

func (m *TransactionMutation) AddedSequenceInDay() (r int, exists bool)

AddedSequenceInDay returns the value that was added to the "sequenceInDay" field in this mutation.

func (*TransactionMutation) CheckNumber

func (m *TransactionMutation) CheckNumber() (r string, exists bool)

CheckNumber returns the value of the "checkNumber" field in the mutation.

func (*TransactionMutation) CheckNumberCleared

func (m *TransactionMutation) CheckNumberCleared() bool

CheckNumberCleared returns if the "checkNumber" field was cleared in this mutation.

func (*TransactionMutation) ClearAccount

func (m *TransactionMutation) ClearAccount()

ClearAccount clears the "account" edge to the Account entity.

func (*TransactionMutation) ClearCheckNumber

func (m *TransactionMutation) ClearCheckNumber()

ClearCheckNumber clears the value of the "checkNumber" field.

func (*TransactionMutation) ClearDescription

func (m *TransactionMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*TransactionMutation) ClearEdge

func (m *TransactionMutation) 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 (*TransactionMutation) ClearExchangeRate

func (m *TransactionMutation) ClearExchangeRate()

ClearExchangeRate clears the value of the "exchangeRate" field.

func (*TransactionMutation) ClearExecutedDate

func (m *TransactionMutation) ClearExecutedDate()

ClearExecutedDate clears the value of the "executedDate" field.

func (*TransactionMutation) ClearField

func (m *TransactionMutation) 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 (*TransactionMutation) ClearGroup

func (m *TransactionMutation) ClearGroup()

ClearGroup clears the value of the "group" field.

func (*TransactionMutation) ClearImages

func (m *TransactionMutation) ClearImages()

ClearImages clears the "images" edge to the BinaryItem entity.

func (*TransactionMutation) ClearLatitude

func (m *TransactionMutation) ClearLatitude()

ClearLatitude clears the value of the "latitude" field.

func (*TransactionMutation) ClearLongitude

func (m *TransactionMutation) ClearLongitude()

ClearLongitude clears the value of the "longitude" field.

func (*TransactionMutation) ClearMainCategory

func (m *TransactionMutation) ClearMainCategory()

ClearMainCategory clears the value of the "mainCategory" field.

func (*TransactionMutation) ClearMemo

func (m *TransactionMutation) ClearMemo()

ClearMemo clears the value of the "memo" field.

func (*TransactionMutation) ClearMerchantCode

func (m *TransactionMutation) ClearMerchantCode()

ClearMerchantCode clears the value of the "merchantCode" field.

func (*TransactionMutation) ClearOriginatingAmount

func (m *TransactionMutation) ClearOriginatingAmount()

ClearOriginatingAmount clears the value of the "originatingAmount" field.

func (*TransactionMutation) ClearOriginatingCurrencyCode

func (m *TransactionMutation) ClearOriginatingCurrencyCode()

ClearOriginatingCurrencyCode clears the value of the "originatingCurrencyCode" field.

func (*TransactionMutation) ClearPostedDate

func (m *TransactionMutation) ClearPostedDate()

ClearPostedDate clears the value of the "postedDate" field.

func (*TransactionMutation) ClearReversalFor

func (m *TransactionMutation) ClearReversalFor()

ClearReversalFor clears the value of the "reversalFor" field.

func (*TransactionMutation) ClearReversedBy

func (m *TransactionMutation) ClearReversedBy()

ClearReversedBy clears the value of the "reversedBy" field.

func (*TransactionMutation) ClearSequenceInDay

func (m *TransactionMutation) ClearSequenceInDay()

ClearSequenceInDay clears the value of the "sequenceInDay" field.

func (*TransactionMutation) ClearSubCategory

func (m *TransactionMutation) ClearSubCategory()

ClearSubCategory clears the value of the "subCategory" field.

func (*TransactionMutation) ClearType

func (m *TransactionMutation) ClearType()

ClearType clears the value of the "type" field.

func (*TransactionMutation) ClearURL

func (m *TransactionMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*TransactionMutation) ClearUpdatedDate

func (m *TransactionMutation) ClearUpdatedDate()

ClearUpdatedDate clears the value of the "updatedDate" field.

func (*TransactionMutation) ClearedEdges

func (m *TransactionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TransactionMutation) ClearedFields

func (m *TransactionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TransactionMutation) Client

func (m TransactionMutation) 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 (*TransactionMutation) CreatedDate

func (m *TransactionMutation) CreatedDate() (r time.Time, exists bool)

CreatedDate returns the value of the "createdDate" field in the mutation.

func (*TransactionMutation) Description

func (m *TransactionMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*TransactionMutation) DescriptionCleared

func (m *TransactionMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*TransactionMutation) Direction

func (m *TransactionMutation) Direction() (r transaction.Direction, exists bool)

Direction returns the value of the "direction" field in the mutation.

func (*TransactionMutation) EdgeCleared

func (m *TransactionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TransactionMutation) ExchangeRate

func (m *TransactionMutation) ExchangeRate() (r float64, exists bool)

ExchangeRate returns the value of the "exchangeRate" field in the mutation.

func (*TransactionMutation) ExchangeRateCleared

func (m *TransactionMutation) ExchangeRateCleared() bool

ExchangeRateCleared returns if the "exchangeRate" field was cleared in this mutation.

func (*TransactionMutation) ExecutedAmount

func (m *TransactionMutation) ExecutedAmount() (r float64, exists bool)

ExecutedAmount returns the value of the "executedAmount" field in the mutation.

func (*TransactionMutation) ExecutedCurrencyCode

func (m *TransactionMutation) ExecutedCurrencyCode() (r string, exists bool)

ExecutedCurrencyCode returns the value of the "executedCurrencyCode" field in the mutation.

func (*TransactionMutation) ExecutedDate

func (m *TransactionMutation) ExecutedDate() (r time.Time, exists bool)

ExecutedDate returns the value of the "executedDate" field in the mutation.

func (*TransactionMutation) ExecutedDateCleared

func (m *TransactionMutation) ExecutedDateCleared() bool

ExecutedDateCleared returns if the "executedDate" field was cleared in this mutation.

func (*TransactionMutation) Field

func (m *TransactionMutation) 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 (*TransactionMutation) FieldCleared

func (m *TransactionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TransactionMutation) Fields

func (m *TransactionMutation) 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 (*TransactionMutation) GetType

func (m *TransactionMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*TransactionMutation) Group

func (m *TransactionMutation) Group() (r string, exists bool)

Group returns the value of the "group" field in the mutation.

func (*TransactionMutation) GroupCleared

func (m *TransactionMutation) GroupCleared() bool

GroupCleared returns if the "group" field was cleared in this mutation.

func (*TransactionMutation) ID

func (m *TransactionMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*TransactionMutation) ImagesCleared

func (m *TransactionMutation) ImagesCleared() bool

ImagesCleared returns if the "images" edge to the BinaryItem entity was cleared.

func (*TransactionMutation) ImagesIDs

func (m *TransactionMutation) ImagesIDs() (ids []int)

ImagesIDs returns the "images" edge IDs in the mutation.

func (*TransactionMutation) Latitude

func (m *TransactionMutation) Latitude() (r float64, exists bool)

Latitude returns the value of the "latitude" field in the mutation.

func (*TransactionMutation) LatitudeCleared

func (m *TransactionMutation) LatitudeCleared() bool

LatitudeCleared returns if the "latitude" field was cleared in this mutation.

func (*TransactionMutation) Longitude

func (m *TransactionMutation) Longitude() (r float64, exists bool)

Longitude returns the value of the "longitude" field in the mutation.

func (*TransactionMutation) LongitudeCleared

func (m *TransactionMutation) LongitudeCleared() bool

LongitudeCleared returns if the "longitude" field was cleared in this mutation.

func (*TransactionMutation) MainCategory

func (m *TransactionMutation) MainCategory() (r string, exists bool)

MainCategory returns the value of the "mainCategory" field in the mutation.

func (*TransactionMutation) MainCategoryCleared

func (m *TransactionMutation) MainCategoryCleared() bool

MainCategoryCleared returns if the "mainCategory" field was cleared in this mutation.

func (*TransactionMutation) Memo

func (m *TransactionMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*TransactionMutation) MemoCleared

func (m *TransactionMutation) MemoCleared() bool

MemoCleared returns if the "memo" field was cleared in this mutation.

func (*TransactionMutation) MerchantCode

func (m *TransactionMutation) MerchantCode() (r string, exists bool)

MerchantCode returns the value of the "merchantCode" field in the mutation.

func (*TransactionMutation) MerchantCodeCleared

func (m *TransactionMutation) MerchantCodeCleared() bool

MerchantCodeCleared returns if the "merchantCode" field was cleared in this mutation.

func (*TransactionMutation) OldCheckNumber

func (m *TransactionMutation) OldCheckNumber(ctx context.Context) (v string, err error)

OldCheckNumber returns the old "checkNumber" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldCreatedDate

func (m *TransactionMutation) OldCreatedDate(ctx context.Context) (v time.Time, err error)

OldCreatedDate returns the old "createdDate" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldDescription

func (m *TransactionMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldDirection

func (m *TransactionMutation) OldDirection(ctx context.Context) (v transaction.Direction, err error)

OldDirection returns the old "direction" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldExchangeRate

func (m *TransactionMutation) OldExchangeRate(ctx context.Context) (v float64, err error)

OldExchangeRate returns the old "exchangeRate" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldExecutedAmount

func (m *TransactionMutation) OldExecutedAmount(ctx context.Context) (v float64, err error)

OldExecutedAmount returns the old "executedAmount" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldExecutedCurrencyCode

func (m *TransactionMutation) OldExecutedCurrencyCode(ctx context.Context) (v string, err error)

OldExecutedCurrencyCode returns the old "executedCurrencyCode" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldExecutedDate

func (m *TransactionMutation) OldExecutedDate(ctx context.Context) (v time.Time, err error)

OldExecutedDate returns the old "executedDate" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldField

func (m *TransactionMutation) 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 (*TransactionMutation) OldGroup

func (m *TransactionMutation) OldGroup(ctx context.Context) (v string, err error)

OldGroup returns the old "group" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldLatitude

func (m *TransactionMutation) OldLatitude(ctx context.Context) (v float64, err error)

OldLatitude returns the old "latitude" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldLongitude

func (m *TransactionMutation) OldLongitude(ctx context.Context) (v float64, err error)

OldLongitude returns the old "longitude" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldMainCategory

func (m *TransactionMutation) OldMainCategory(ctx context.Context) (v string, err error)

OldMainCategory returns the old "mainCategory" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldMemo

func (m *TransactionMutation) OldMemo(ctx context.Context) (v string, err error)

OldMemo returns the old "memo" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldMerchantCode

func (m *TransactionMutation) OldMerchantCode(ctx context.Context) (v string, err error)

OldMerchantCode returns the old "merchantCode" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldOriginatingAmount

func (m *TransactionMutation) OldOriginatingAmount(ctx context.Context) (v float64, err error)

OldOriginatingAmount returns the old "originatingAmount" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldOriginatingCurrencyCode

func (m *TransactionMutation) OldOriginatingCurrencyCode(ctx context.Context) (v string, err error)

OldOriginatingCurrencyCode returns the old "originatingCurrencyCode" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldPostedDate

func (m *TransactionMutation) OldPostedDate(ctx context.Context) (v time.Time, err error)

OldPostedDate returns the old "postedDate" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldReversal

func (m *TransactionMutation) OldReversal(ctx context.Context) (v bool, err error)

OldReversal returns the old "reversal" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldReversalFor

func (m *TransactionMutation) OldReversalFor(ctx context.Context) (v string, err error)

OldReversalFor returns the old "reversalFor" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldReversed

func (m *TransactionMutation) OldReversed(ctx context.Context) (v bool, err error)

OldReversed returns the old "reversed" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldReversedBy

func (m *TransactionMutation) OldReversedBy(ctx context.Context) (v string, err error)

OldReversedBy returns the old "reversedBy" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldRunningBalance

func (m *TransactionMutation) OldRunningBalance(ctx context.Context) (v float64, err error)

OldRunningBalance returns the old "runningBalance" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldSequenceInDay

func (m *TransactionMutation) OldSequenceInDay(ctx context.Context) (v int, err error)

OldSequenceInDay returns the old "sequenceInDay" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldStatus

func (m *TransactionMutation) OldStatus(ctx context.Context) (v transaction.Status, err error)

OldStatus returns the old "status" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldSubCategory

func (m *TransactionMutation) OldSubCategory(ctx context.Context) (v string, err error)

OldSubCategory returns the old "subCategory" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldType

func (m *TransactionMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldURL

func (m *TransactionMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) OldUpdatedDate

func (m *TransactionMutation) OldUpdatedDate(ctx context.Context) (v time.Time, err error)

OldUpdatedDate returns the old "updatedDate" field's value of the Transaction entity. If the Transaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TransactionMutation) Op

func (m *TransactionMutation) Op() Op

Op returns the operation name.

func (*TransactionMutation) OriginatingAmount

func (m *TransactionMutation) OriginatingAmount() (r float64, exists bool)

OriginatingAmount returns the value of the "originatingAmount" field in the mutation.

func (*TransactionMutation) OriginatingAmountCleared

func (m *TransactionMutation) OriginatingAmountCleared() bool

OriginatingAmountCleared returns if the "originatingAmount" field was cleared in this mutation.

func (*TransactionMutation) OriginatingCurrencyCode

func (m *TransactionMutation) OriginatingCurrencyCode() (r string, exists bool)

OriginatingCurrencyCode returns the value of the "originatingCurrencyCode" field in the mutation.

func (*TransactionMutation) OriginatingCurrencyCodeCleared

func (m *TransactionMutation) OriginatingCurrencyCodeCleared() bool

OriginatingCurrencyCodeCleared returns if the "originatingCurrencyCode" field was cleared in this mutation.

func (*TransactionMutation) PostedDate

func (m *TransactionMutation) PostedDate() (r time.Time, exists bool)

PostedDate returns the value of the "postedDate" field in the mutation.

func (*TransactionMutation) PostedDateCleared

func (m *TransactionMutation) PostedDateCleared() bool

PostedDateCleared returns if the "postedDate" field was cleared in this mutation.

func (*TransactionMutation) RemoveImageIDs

func (m *TransactionMutation) RemoveImageIDs(ids ...int)

RemoveImageIDs removes the "images" edge to the BinaryItem entity by IDs.

func (*TransactionMutation) RemovedEdges

func (m *TransactionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TransactionMutation) RemovedIDs

func (m *TransactionMutation) 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 (*TransactionMutation) RemovedImagesIDs

func (m *TransactionMutation) RemovedImagesIDs() (ids []int)

RemovedImages returns the removed IDs of the "images" edge to the BinaryItem entity.

func (*TransactionMutation) ResetAccount

func (m *TransactionMutation) ResetAccount()

ResetAccount resets all changes to the "account" edge.

func (*TransactionMutation) ResetCheckNumber

func (m *TransactionMutation) ResetCheckNumber()

ResetCheckNumber resets all changes to the "checkNumber" field.

func (*TransactionMutation) ResetCreatedDate

func (m *TransactionMutation) ResetCreatedDate()

ResetCreatedDate resets all changes to the "createdDate" field.

func (*TransactionMutation) ResetDescription

func (m *TransactionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*TransactionMutation) ResetDirection

func (m *TransactionMutation) ResetDirection()

ResetDirection resets all changes to the "direction" field.

func (*TransactionMutation) ResetEdge

func (m *TransactionMutation) 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 (*TransactionMutation) ResetExchangeRate

func (m *TransactionMutation) ResetExchangeRate()

ResetExchangeRate resets all changes to the "exchangeRate" field.

func (*TransactionMutation) ResetExecutedAmount

func (m *TransactionMutation) ResetExecutedAmount()

ResetExecutedAmount resets all changes to the "executedAmount" field.

func (*TransactionMutation) ResetExecutedCurrencyCode

func (m *TransactionMutation) ResetExecutedCurrencyCode()

ResetExecutedCurrencyCode resets all changes to the "executedCurrencyCode" field.

func (*TransactionMutation) ResetExecutedDate

func (m *TransactionMutation) ResetExecutedDate()

ResetExecutedDate resets all changes to the "executedDate" field.

func (*TransactionMutation) ResetField

func (m *TransactionMutation) 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 (*TransactionMutation) ResetGroup

func (m *TransactionMutation) ResetGroup()

ResetGroup resets all changes to the "group" field.

func (*TransactionMutation) ResetImages

func (m *TransactionMutation) ResetImages()

ResetImages resets all changes to the "images" edge.

func (*TransactionMutation) ResetLatitude

func (m *TransactionMutation) ResetLatitude()

ResetLatitude resets all changes to the "latitude" field.

func (*TransactionMutation) ResetLongitude

func (m *TransactionMutation) ResetLongitude()

ResetLongitude resets all changes to the "longitude" field.

func (*TransactionMutation) ResetMainCategory

func (m *TransactionMutation) ResetMainCategory()

ResetMainCategory resets all changes to the "mainCategory" field.

func (*TransactionMutation) ResetMemo

func (m *TransactionMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*TransactionMutation) ResetMerchantCode

func (m *TransactionMutation) ResetMerchantCode()

ResetMerchantCode resets all changes to the "merchantCode" field.

func (*TransactionMutation) ResetOriginatingAmount

func (m *TransactionMutation) ResetOriginatingAmount()

ResetOriginatingAmount resets all changes to the "originatingAmount" field.

func (*TransactionMutation) ResetOriginatingCurrencyCode

func (m *TransactionMutation) ResetOriginatingCurrencyCode()

ResetOriginatingCurrencyCode resets all changes to the "originatingCurrencyCode" field.

func (*TransactionMutation) ResetPostedDate

func (m *TransactionMutation) ResetPostedDate()

ResetPostedDate resets all changes to the "postedDate" field.

func (*TransactionMutation) ResetReversal

func (m *TransactionMutation) ResetReversal()

ResetReversal resets all changes to the "reversal" field.

func (*TransactionMutation) ResetReversalFor

func (m *TransactionMutation) ResetReversalFor()

ResetReversalFor resets all changes to the "reversalFor" field.

func (*TransactionMutation) ResetReversed

func (m *TransactionMutation) ResetReversed()

ResetReversed resets all changes to the "reversed" field.

func (*TransactionMutation) ResetReversedBy

func (m *TransactionMutation) ResetReversedBy()

ResetReversedBy resets all changes to the "reversedBy" field.

func (*TransactionMutation) ResetRunningBalance

func (m *TransactionMutation) ResetRunningBalance()

ResetRunningBalance resets all changes to the "runningBalance" field.

func (*TransactionMutation) ResetSequenceInDay

func (m *TransactionMutation) ResetSequenceInDay()

ResetSequenceInDay resets all changes to the "sequenceInDay" field.

func (*TransactionMutation) ResetStatus

func (m *TransactionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*TransactionMutation) ResetSubCategory

func (m *TransactionMutation) ResetSubCategory()

ResetSubCategory resets all changes to the "subCategory" field.

func (*TransactionMutation) ResetType

func (m *TransactionMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*TransactionMutation) ResetURL

func (m *TransactionMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*TransactionMutation) ResetUpdatedDate

func (m *TransactionMutation) ResetUpdatedDate()

ResetUpdatedDate resets all changes to the "updatedDate" field.

func (*TransactionMutation) Reversal

func (m *TransactionMutation) Reversal() (r bool, exists bool)

Reversal returns the value of the "reversal" field in the mutation.

func (*TransactionMutation) ReversalFor

func (m *TransactionMutation) ReversalFor() (r string, exists bool)

ReversalFor returns the value of the "reversalFor" field in the mutation.

func (*TransactionMutation) ReversalForCleared

func (m *TransactionMutation) ReversalForCleared() bool

ReversalForCleared returns if the "reversalFor" field was cleared in this mutation.

func (*TransactionMutation) Reversed

func (m *TransactionMutation) Reversed() (r bool, exists bool)

Reversed returns the value of the "reversed" field in the mutation.

func (*TransactionMutation) ReversedBy

func (m *TransactionMutation) ReversedBy() (r string, exists bool)

ReversedBy returns the value of the "reversedBy" field in the mutation.

func (*TransactionMutation) ReversedByCleared

func (m *TransactionMutation) ReversedByCleared() bool

ReversedByCleared returns if the "reversedBy" field was cleared in this mutation.

func (*TransactionMutation) RunningBalance

func (m *TransactionMutation) RunningBalance() (r float64, exists bool)

RunningBalance returns the value of the "runningBalance" field in the mutation.

func (*TransactionMutation) SequenceInDay

func (m *TransactionMutation) SequenceInDay() (r int, exists bool)

SequenceInDay returns the value of the "sequenceInDay" field in the mutation.

func (*TransactionMutation) SequenceInDayCleared

func (m *TransactionMutation) SequenceInDayCleared() bool

SequenceInDayCleared returns if the "sequenceInDay" field was cleared in this mutation.

func (*TransactionMutation) SetAccountID

func (m *TransactionMutation) SetAccountID(id uuid.UUID)

SetAccountID sets the "account" edge to the Account entity by id.

func (*TransactionMutation) SetCheckNumber

func (m *TransactionMutation) SetCheckNumber(s string)

SetCheckNumber sets the "checkNumber" field.

func (*TransactionMutation) SetCreatedDate

func (m *TransactionMutation) SetCreatedDate(t time.Time)

SetCreatedDate sets the "createdDate" field.

func (*TransactionMutation) SetDescription

func (m *TransactionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*TransactionMutation) SetDirection

func (m *TransactionMutation) SetDirection(t transaction.Direction)

SetDirection sets the "direction" field.

func (*TransactionMutation) SetExchangeRate

func (m *TransactionMutation) SetExchangeRate(f float64)

SetExchangeRate sets the "exchangeRate" field.

func (*TransactionMutation) SetExecutedAmount

func (m *TransactionMutation) SetExecutedAmount(f float64)

SetExecutedAmount sets the "executedAmount" field.

func (*TransactionMutation) SetExecutedCurrencyCode

func (m *TransactionMutation) SetExecutedCurrencyCode(s string)

SetExecutedCurrencyCode sets the "executedCurrencyCode" field.

func (*TransactionMutation) SetExecutedDate

func (m *TransactionMutation) SetExecutedDate(t time.Time)

SetExecutedDate sets the "executedDate" field.

func (*TransactionMutation) SetField

func (m *TransactionMutation) 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 (*TransactionMutation) SetGroup

func (m *TransactionMutation) SetGroup(s string)

SetGroup sets the "group" field.

func (*TransactionMutation) SetID

func (m *TransactionMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Transaction entities.

func (*TransactionMutation) SetLatitude

func (m *TransactionMutation) SetLatitude(f float64)

SetLatitude sets the "latitude" field.

func (*TransactionMutation) SetLongitude

func (m *TransactionMutation) SetLongitude(f float64)

SetLongitude sets the "longitude" field.

func (*TransactionMutation) SetMainCategory

func (m *TransactionMutation) SetMainCategory(s string)

SetMainCategory sets the "mainCategory" field.

func (*TransactionMutation) SetMemo

func (m *TransactionMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*TransactionMutation) SetMerchantCode

func (m *TransactionMutation) SetMerchantCode(s string)

SetMerchantCode sets the "merchantCode" field.

func (*TransactionMutation) SetOriginatingAmount

func (m *TransactionMutation) SetOriginatingAmount(f float64)

SetOriginatingAmount sets the "originatingAmount" field.

func (*TransactionMutation) SetOriginatingCurrencyCode

func (m *TransactionMutation) SetOriginatingCurrencyCode(s string)

SetOriginatingCurrencyCode sets the "originatingCurrencyCode" field.

func (*TransactionMutation) SetPostedDate

func (m *TransactionMutation) SetPostedDate(t time.Time)

SetPostedDate sets the "postedDate" field.

func (*TransactionMutation) SetReversal

func (m *TransactionMutation) SetReversal(b bool)

SetReversal sets the "reversal" field.

func (*TransactionMutation) SetReversalFor

func (m *TransactionMutation) SetReversalFor(s string)

SetReversalFor sets the "reversalFor" field.

func (*TransactionMutation) SetReversed

func (m *TransactionMutation) SetReversed(b bool)

SetReversed sets the "reversed" field.

func (*TransactionMutation) SetReversedBy

func (m *TransactionMutation) SetReversedBy(s string)

SetReversedBy sets the "reversedBy" field.

func (*TransactionMutation) SetRunningBalance

func (m *TransactionMutation) SetRunningBalance(f float64)

SetRunningBalance sets the "runningBalance" field.

func (*TransactionMutation) SetSequenceInDay

func (m *TransactionMutation) SetSequenceInDay(i int)

SetSequenceInDay sets the "sequenceInDay" field.

func (*TransactionMutation) SetStatus

func (m *TransactionMutation) SetStatus(t transaction.Status)

SetStatus sets the "status" field.

func (*TransactionMutation) SetSubCategory

func (m *TransactionMutation) SetSubCategory(s string)

SetSubCategory sets the "subCategory" field.

func (*TransactionMutation) SetType

func (m *TransactionMutation) SetType(s string)

SetType sets the "type" field.

func (*TransactionMutation) SetURL

func (m *TransactionMutation) SetURL(s string)

SetURL sets the "url" field.

func (*TransactionMutation) SetUpdatedDate

func (m *TransactionMutation) SetUpdatedDate(t time.Time)

SetUpdatedDate sets the "updatedDate" field.

func (*TransactionMutation) Status

func (m *TransactionMutation) Status() (r transaction.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*TransactionMutation) SubCategory

func (m *TransactionMutation) SubCategory() (r string, exists bool)

SubCategory returns the value of the "subCategory" field in the mutation.

func (*TransactionMutation) SubCategoryCleared

func (m *TransactionMutation) SubCategoryCleared() bool

SubCategoryCleared returns if the "subCategory" field was cleared in this mutation.

func (TransactionMutation) Tx

func (m TransactionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TransactionMutation) Type

func (m *TransactionMutation) Type() string

Type returns the node type of this mutation (Transaction).

func (*TransactionMutation) TypeCleared

func (m *TransactionMutation) TypeCleared() bool

TypeCleared returns if the "type" field was cleared in this mutation.

func (*TransactionMutation) URL

func (m *TransactionMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*TransactionMutation) URLCleared

func (m *TransactionMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*TransactionMutation) UpdatedDate

func (m *TransactionMutation) UpdatedDate() (r time.Time, exists bool)

UpdatedDate returns the value of the "updatedDate" field in the mutation.

func (*TransactionMutation) UpdatedDateCleared

func (m *TransactionMutation) UpdatedDateCleared() bool

UpdatedDateCleared returns if the "updatedDate" field was cleared in this mutation.

type TransactionQuery

type TransactionQuery struct {
	// contains filtered or unexported fields
}

TransactionQuery is the builder for querying Transaction entities.

func (*TransactionQuery) All

func (tq *TransactionQuery) All(ctx context.Context) ([]*Transaction, error)

All executes the query and returns a list of Transactions.

func (*TransactionQuery) AllX

func (tq *TransactionQuery) AllX(ctx context.Context) []*Transaction

AllX is like All, but panics if an error occurs.

func (*TransactionQuery) Clone

func (tq *TransactionQuery) Clone() *TransactionQuery

Clone returns a duplicate of the TransactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TransactionQuery) Count

func (tq *TransactionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TransactionQuery) CountX

func (tq *TransactionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TransactionQuery) Exist

func (tq *TransactionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TransactionQuery) ExistX

func (tq *TransactionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TransactionQuery) First

func (tq *TransactionQuery) First(ctx context.Context) (*Transaction, error)

First returns the first Transaction entity from the query. Returns a *NotFoundError when no Transaction was found.

func (*TransactionQuery) FirstID

func (tq *TransactionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Transaction ID from the query. Returns a *NotFoundError when no Transaction ID was found.

func (*TransactionQuery) FirstIDX

func (tq *TransactionQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TransactionQuery) FirstX

func (tq *TransactionQuery) FirstX(ctx context.Context) *Transaction

FirstX is like First, but panics if an error occurs.

func (*TransactionQuery) GroupBy

func (tq *TransactionQuery) GroupBy(field string, fields ...string) *TransactionGroupBy

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 {
	SequenceInDay int `json:"sequenceInDay,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Transaction.Query().
	GroupBy(transaction.FieldSequenceInDay).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TransactionQuery) IDs

func (tq *TransactionQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Transaction IDs.

func (*TransactionQuery) IDsX

func (tq *TransactionQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TransactionQuery) Limit

func (tq *TransactionQuery) Limit(limit int) *TransactionQuery

Limit adds a limit step to the query.

func (*TransactionQuery) Offset

func (tq *TransactionQuery) Offset(offset int) *TransactionQuery

Offset adds an offset step to the query.

func (*TransactionQuery) Only

func (tq *TransactionQuery) Only(ctx context.Context) (*Transaction, error)

Only returns a single Transaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Transaction entity is not found. Returns a *NotFoundError when no Transaction entities are found.

func (*TransactionQuery) OnlyID

func (tq *TransactionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Transaction ID in the query. Returns a *NotSingularError when exactly one Transaction ID is not found. Returns a *NotFoundError when no entities are found.

func (*TransactionQuery) OnlyIDX

func (tq *TransactionQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TransactionQuery) OnlyX

func (tq *TransactionQuery) OnlyX(ctx context.Context) *Transaction

OnlyX is like Only, but panics if an error occurs.

func (*TransactionQuery) Order

func (tq *TransactionQuery) Order(o ...OrderFunc) *TransactionQuery

Order adds an order step to the query.

func (*TransactionQuery) QueryAccount

func (tq *TransactionQuery) QueryAccount() *AccountQuery

QueryAccount chains the current query on the "account" edge.

func (*TransactionQuery) QueryImages

func (tq *TransactionQuery) QueryImages() *BinaryItemQuery

QueryImages chains the current query on the "images" edge.

func (*TransactionQuery) Select

func (tq *TransactionQuery) Select(field string, fields ...string) *TransactionSelect

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 {
	SequenceInDay int `json:"sequenceInDay,omitempty"`
}

client.Transaction.Query().
	Select(transaction.FieldSequenceInDay).
	Scan(ctx, &v)

func (*TransactionQuery) Where

Where adds a new predicate for the TransactionQuery builder.

func (*TransactionQuery) WithAccount

func (tq *TransactionQuery) WithAccount(opts ...func(*AccountQuery)) *TransactionQuery

WithAccount tells the query-builder to eager-load the nodes that are connected to the "account" edge. The optional arguments are used to configure the query builder of the edge.

func (*TransactionQuery) WithImages

func (tq *TransactionQuery) WithImages(opts ...func(*BinaryItemQuery)) *TransactionQuery

WithImages tells the query-builder to eager-load the nodes that are connected to the "images" edge. The optional arguments are used to configure the query builder of the edge.

type TransactionSelect

type TransactionSelect struct {
	*TransactionQuery
	// contains filtered or unexported fields
}

TransactionSelect is the builder for selecting fields of Transaction entities.

func (*TransactionSelect) Bool

func (ts *TransactionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) BoolX

func (ts *TransactionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TransactionSelect) Bools

func (ts *TransactionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) BoolsX

func (ts *TransactionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TransactionSelect) Float64

func (ts *TransactionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) Float64X

func (ts *TransactionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TransactionSelect) Float64s

func (ts *TransactionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) Float64sX

func (ts *TransactionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TransactionSelect) Int

func (ts *TransactionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) IntX

func (ts *TransactionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TransactionSelect) Ints

func (ts *TransactionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) IntsX

func (ts *TransactionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TransactionSelect) Scan

func (ts *TransactionSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*TransactionSelect) ScanX

func (ts *TransactionSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TransactionSelect) String

func (ts *TransactionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) StringX

func (ts *TransactionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TransactionSelect) Strings

func (ts *TransactionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TransactionSelect) StringsX

func (ts *TransactionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TransactionUpdate

type TransactionUpdate struct {
	// contains filtered or unexported fields
}

TransactionUpdate is the builder for updating Transaction entities.

func (*TransactionUpdate) AddExchangeRate

func (tu *TransactionUpdate) AddExchangeRate(f float64) *TransactionUpdate

AddExchangeRate adds f to the "exchangeRate" field.

func (*TransactionUpdate) AddExecutedAmount

func (tu *TransactionUpdate) AddExecutedAmount(f float64) *TransactionUpdate

AddExecutedAmount adds f to the "executedAmount" field.

func (*TransactionUpdate) AddImageIDs

func (tu *TransactionUpdate) AddImageIDs(ids ...int) *TransactionUpdate

AddImageIDs adds the "images" edge to the BinaryItem entity by IDs.

func (*TransactionUpdate) AddImages

func (tu *TransactionUpdate) AddImages(b ...*BinaryItem) *TransactionUpdate

AddImages adds the "images" edges to the BinaryItem entity.

func (*TransactionUpdate) AddLatitude

func (tu *TransactionUpdate) AddLatitude(f float64) *TransactionUpdate

AddLatitude adds f to the "latitude" field.

func (*TransactionUpdate) AddLongitude

func (tu *TransactionUpdate) AddLongitude(f float64) *TransactionUpdate

AddLongitude adds f to the "longitude" field.

func (*TransactionUpdate) AddOriginatingAmount

func (tu *TransactionUpdate) AddOriginatingAmount(f float64) *TransactionUpdate

AddOriginatingAmount adds f to the "originatingAmount" field.

func (*TransactionUpdate) AddRunningBalance

func (tu *TransactionUpdate) AddRunningBalance(f float64) *TransactionUpdate

AddRunningBalance adds f to the "runningBalance" field.

func (*TransactionUpdate) AddSequenceInDay

func (tu *TransactionUpdate) AddSequenceInDay(i int) *TransactionUpdate

AddSequenceInDay adds i to the "sequenceInDay" field.

func (*TransactionUpdate) ClearAccount

func (tu *TransactionUpdate) ClearAccount() *TransactionUpdate

ClearAccount clears the "account" edge to the Account entity.

func (*TransactionUpdate) ClearCheckNumber

func (tu *TransactionUpdate) ClearCheckNumber() *TransactionUpdate

ClearCheckNumber clears the value of the "checkNumber" field.

func (*TransactionUpdate) ClearDescription

func (tu *TransactionUpdate) ClearDescription() *TransactionUpdate

ClearDescription clears the value of the "description" field.

func (*TransactionUpdate) ClearExchangeRate

func (tu *TransactionUpdate) ClearExchangeRate() *TransactionUpdate

ClearExchangeRate clears the value of the "exchangeRate" field.

func (*TransactionUpdate) ClearExecutedDate

func (tu *TransactionUpdate) ClearExecutedDate() *TransactionUpdate

ClearExecutedDate clears the value of the "executedDate" field.

func (*TransactionUpdate) ClearGroup

func (tu *TransactionUpdate) ClearGroup() *TransactionUpdate

ClearGroup clears the value of the "group" field.

func (*TransactionUpdate) ClearImages

func (tu *TransactionUpdate) ClearImages() *TransactionUpdate

ClearImages clears all "images" edges to the BinaryItem entity.

func (*TransactionUpdate) ClearLatitude

func (tu *TransactionUpdate) ClearLatitude() *TransactionUpdate

ClearLatitude clears the value of the "latitude" field.

func (*TransactionUpdate) ClearLongitude

func (tu *TransactionUpdate) ClearLongitude() *TransactionUpdate

ClearLongitude clears the value of the "longitude" field.

func (*TransactionUpdate) ClearMainCategory

func (tu *TransactionUpdate) ClearMainCategory() *TransactionUpdate

ClearMainCategory clears the value of the "mainCategory" field.

func (*TransactionUpdate) ClearMemo

func (tu *TransactionUpdate) ClearMemo() *TransactionUpdate

ClearMemo clears the value of the "memo" field.

func (*TransactionUpdate) ClearMerchantCode

func (tu *TransactionUpdate) ClearMerchantCode() *TransactionUpdate

ClearMerchantCode clears the value of the "merchantCode" field.

func (*TransactionUpdate) ClearOriginatingAmount

func (tu *TransactionUpdate) ClearOriginatingAmount() *TransactionUpdate

ClearOriginatingAmount clears the value of the "originatingAmount" field.

func (*TransactionUpdate) ClearOriginatingCurrencyCode

func (tu *TransactionUpdate) ClearOriginatingCurrencyCode() *TransactionUpdate

ClearOriginatingCurrencyCode clears the value of the "originatingCurrencyCode" field.

func (*TransactionUpdate) ClearPostedDate

func (tu *TransactionUpdate) ClearPostedDate() *TransactionUpdate

ClearPostedDate clears the value of the "postedDate" field.

func (*TransactionUpdate) ClearReversalFor

func (tu *TransactionUpdate) ClearReversalFor() *TransactionUpdate

ClearReversalFor clears the value of the "reversalFor" field.

func (*TransactionUpdate) ClearReversedBy

func (tu *TransactionUpdate) ClearReversedBy() *TransactionUpdate

ClearReversedBy clears the value of the "reversedBy" field.

func (*TransactionUpdate) ClearSequenceInDay

func (tu *TransactionUpdate) ClearSequenceInDay() *TransactionUpdate

ClearSequenceInDay clears the value of the "sequenceInDay" field.

func (*TransactionUpdate) ClearSubCategory

func (tu *TransactionUpdate) ClearSubCategory() *TransactionUpdate

ClearSubCategory clears the value of the "subCategory" field.

func (*TransactionUpdate) ClearType

func (tu *TransactionUpdate) ClearType() *TransactionUpdate

ClearType clears the value of the "type" field.

func (*TransactionUpdate) ClearURL

func (tu *TransactionUpdate) ClearURL() *TransactionUpdate

ClearURL clears the value of the "url" field.

func (*TransactionUpdate) ClearUpdatedDate

func (tu *TransactionUpdate) ClearUpdatedDate() *TransactionUpdate

ClearUpdatedDate clears the value of the "updatedDate" field.

func (*TransactionUpdate) Exec

func (tu *TransactionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TransactionUpdate) ExecX

func (tu *TransactionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionUpdate) Mutation

func (tu *TransactionUpdate) Mutation() *TransactionMutation

Mutation returns the TransactionMutation object of the builder.

func (*TransactionUpdate) RemoveImageIDs

func (tu *TransactionUpdate) RemoveImageIDs(ids ...int) *TransactionUpdate

RemoveImageIDs removes the "images" edge to BinaryItem entities by IDs.

func (*TransactionUpdate) RemoveImages

func (tu *TransactionUpdate) RemoveImages(b ...*BinaryItem) *TransactionUpdate

RemoveImages removes "images" edges to BinaryItem entities.

func (*TransactionUpdate) Save

func (tu *TransactionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TransactionUpdate) SaveX

func (tu *TransactionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TransactionUpdate) SetAccount

func (tu *TransactionUpdate) SetAccount(a *Account) *TransactionUpdate

SetAccount sets the "account" edge to the Account entity.

func (*TransactionUpdate) SetAccountID

func (tu *TransactionUpdate) SetAccountID(id uuid.UUID) *TransactionUpdate

SetAccountID sets the "account" edge to the Account entity by ID.

func (*TransactionUpdate) SetCheckNumber

func (tu *TransactionUpdate) SetCheckNumber(s string) *TransactionUpdate

SetCheckNumber sets the "checkNumber" field.

func (*TransactionUpdate) SetCreatedDate

func (tu *TransactionUpdate) SetCreatedDate(t time.Time) *TransactionUpdate

SetCreatedDate sets the "createdDate" field.

func (*TransactionUpdate) SetDescription

func (tu *TransactionUpdate) SetDescription(s string) *TransactionUpdate

SetDescription sets the "description" field.

func (*TransactionUpdate) SetDirection

SetDirection sets the "direction" field.

func (*TransactionUpdate) SetExchangeRate

func (tu *TransactionUpdate) SetExchangeRate(f float64) *TransactionUpdate

SetExchangeRate sets the "exchangeRate" field.

func (*TransactionUpdate) SetExecutedAmount

func (tu *TransactionUpdate) SetExecutedAmount(f float64) *TransactionUpdate

SetExecutedAmount sets the "executedAmount" field.

func (*TransactionUpdate) SetExecutedCurrencyCode

func (tu *TransactionUpdate) SetExecutedCurrencyCode(s string) *TransactionUpdate

SetExecutedCurrencyCode sets the "executedCurrencyCode" field.

func (*TransactionUpdate) SetExecutedDate

func (tu *TransactionUpdate) SetExecutedDate(t time.Time) *TransactionUpdate

SetExecutedDate sets the "executedDate" field.

func (*TransactionUpdate) SetGroup

func (tu *TransactionUpdate) SetGroup(s string) *TransactionUpdate

SetGroup sets the "group" field.

func (*TransactionUpdate) SetLatitude

func (tu *TransactionUpdate) SetLatitude(f float64) *TransactionUpdate

SetLatitude sets the "latitude" field.

func (*TransactionUpdate) SetLongitude

func (tu *TransactionUpdate) SetLongitude(f float64) *TransactionUpdate

SetLongitude sets the "longitude" field.

func (*TransactionUpdate) SetMainCategory

func (tu *TransactionUpdate) SetMainCategory(s string) *TransactionUpdate

SetMainCategory sets the "mainCategory" field.

func (*TransactionUpdate) SetMemo

func (tu *TransactionUpdate) SetMemo(s string) *TransactionUpdate

SetMemo sets the "memo" field.

func (*TransactionUpdate) SetMerchantCode

func (tu *TransactionUpdate) SetMerchantCode(s string) *TransactionUpdate

SetMerchantCode sets the "merchantCode" field.

func (*TransactionUpdate) SetNillableAccountID

func (tu *TransactionUpdate) SetNillableAccountID(id *uuid.UUID) *TransactionUpdate

SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.

func (*TransactionUpdate) SetNillableCheckNumber

func (tu *TransactionUpdate) SetNillableCheckNumber(s *string) *TransactionUpdate

SetNillableCheckNumber sets the "checkNumber" field if the given value is not nil.

func (*TransactionUpdate) SetNillableDescription

func (tu *TransactionUpdate) SetNillableDescription(s *string) *TransactionUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TransactionUpdate) SetNillableExchangeRate

func (tu *TransactionUpdate) SetNillableExchangeRate(f *float64) *TransactionUpdate

SetNillableExchangeRate sets the "exchangeRate" field if the given value is not nil.

func (*TransactionUpdate) SetNillableExecutedDate

func (tu *TransactionUpdate) SetNillableExecutedDate(t *time.Time) *TransactionUpdate

SetNillableExecutedDate sets the "executedDate" field if the given value is not nil.

func (*TransactionUpdate) SetNillableGroup

func (tu *TransactionUpdate) SetNillableGroup(s *string) *TransactionUpdate

SetNillableGroup sets the "group" field if the given value is not nil.

func (*TransactionUpdate) SetNillableLatitude

func (tu *TransactionUpdate) SetNillableLatitude(f *float64) *TransactionUpdate

SetNillableLatitude sets the "latitude" field if the given value is not nil.

func (*TransactionUpdate) SetNillableLongitude

func (tu *TransactionUpdate) SetNillableLongitude(f *float64) *TransactionUpdate

SetNillableLongitude sets the "longitude" field if the given value is not nil.

func (*TransactionUpdate) SetNillableMainCategory

func (tu *TransactionUpdate) SetNillableMainCategory(s *string) *TransactionUpdate

SetNillableMainCategory sets the "mainCategory" field if the given value is not nil.

func (*TransactionUpdate) SetNillableMemo

func (tu *TransactionUpdate) SetNillableMemo(s *string) *TransactionUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*TransactionUpdate) SetNillableMerchantCode

func (tu *TransactionUpdate) SetNillableMerchantCode(s *string) *TransactionUpdate

SetNillableMerchantCode sets the "merchantCode" field if the given value is not nil.

func (*TransactionUpdate) SetNillableOriginatingAmount

func (tu *TransactionUpdate) SetNillableOriginatingAmount(f *float64) *TransactionUpdate

SetNillableOriginatingAmount sets the "originatingAmount" field if the given value is not nil.

func (*TransactionUpdate) SetNillableOriginatingCurrencyCode

func (tu *TransactionUpdate) SetNillableOriginatingCurrencyCode(s *string) *TransactionUpdate

SetNillableOriginatingCurrencyCode sets the "originatingCurrencyCode" field if the given value is not nil.

func (*TransactionUpdate) SetNillablePostedDate

func (tu *TransactionUpdate) SetNillablePostedDate(t *time.Time) *TransactionUpdate

SetNillablePostedDate sets the "postedDate" field if the given value is not nil.

func (*TransactionUpdate) SetNillableReversal

func (tu *TransactionUpdate) SetNillableReversal(b *bool) *TransactionUpdate

SetNillableReversal sets the "reversal" field if the given value is not nil.

func (*TransactionUpdate) SetNillableReversalFor

func (tu *TransactionUpdate) SetNillableReversalFor(s *string) *TransactionUpdate

SetNillableReversalFor sets the "reversalFor" field if the given value is not nil.

func (*TransactionUpdate) SetNillableReversed

func (tu *TransactionUpdate) SetNillableReversed(b *bool) *TransactionUpdate

SetNillableReversed sets the "reversed" field if the given value is not nil.

func (*TransactionUpdate) SetNillableReversedBy

func (tu *TransactionUpdate) SetNillableReversedBy(s *string) *TransactionUpdate

SetNillableReversedBy sets the "reversedBy" field if the given value is not nil.

func (*TransactionUpdate) SetNillableSequenceInDay

func (tu *TransactionUpdate) SetNillableSequenceInDay(i *int) *TransactionUpdate

SetNillableSequenceInDay sets the "sequenceInDay" field if the given value is not nil.

func (*TransactionUpdate) SetNillableSubCategory

func (tu *TransactionUpdate) SetNillableSubCategory(s *string) *TransactionUpdate

SetNillableSubCategory sets the "subCategory" field if the given value is not nil.

func (*TransactionUpdate) SetNillableType

func (tu *TransactionUpdate) SetNillableType(s *string) *TransactionUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*TransactionUpdate) SetNillableURL

func (tu *TransactionUpdate) SetNillableURL(s *string) *TransactionUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*TransactionUpdate) SetNillableUpdatedDate

func (tu *TransactionUpdate) SetNillableUpdatedDate(t *time.Time) *TransactionUpdate

SetNillableUpdatedDate sets the "updatedDate" field if the given value is not nil.

func (*TransactionUpdate) SetOriginatingAmount

func (tu *TransactionUpdate) SetOriginatingAmount(f float64) *TransactionUpdate

SetOriginatingAmount sets the "originatingAmount" field.

func (*TransactionUpdate) SetOriginatingCurrencyCode

func (tu *TransactionUpdate) SetOriginatingCurrencyCode(s string) *TransactionUpdate

SetOriginatingCurrencyCode sets the "originatingCurrencyCode" field.

func (*TransactionUpdate) SetPostedDate

func (tu *TransactionUpdate) SetPostedDate(t time.Time) *TransactionUpdate

SetPostedDate sets the "postedDate" field.

func (*TransactionUpdate) SetReversal

func (tu *TransactionUpdate) SetReversal(b bool) *TransactionUpdate

SetReversal sets the "reversal" field.

func (*TransactionUpdate) SetReversalFor

func (tu *TransactionUpdate) SetReversalFor(s string) *TransactionUpdate

SetReversalFor sets the "reversalFor" field.

func (*TransactionUpdate) SetReversed

func (tu *TransactionUpdate) SetReversed(b bool) *TransactionUpdate

SetReversed sets the "reversed" field.

func (*TransactionUpdate) SetReversedBy

func (tu *TransactionUpdate) SetReversedBy(s string) *TransactionUpdate

SetReversedBy sets the "reversedBy" field.

func (*TransactionUpdate) SetRunningBalance

func (tu *TransactionUpdate) SetRunningBalance(f float64) *TransactionUpdate

SetRunningBalance sets the "runningBalance" field.

func (*TransactionUpdate) SetSequenceInDay

func (tu *TransactionUpdate) SetSequenceInDay(i int) *TransactionUpdate

SetSequenceInDay sets the "sequenceInDay" field.

func (*TransactionUpdate) SetStatus

SetStatus sets the "status" field.

func (*TransactionUpdate) SetSubCategory

func (tu *TransactionUpdate) SetSubCategory(s string) *TransactionUpdate

SetSubCategory sets the "subCategory" field.

func (*TransactionUpdate) SetType

func (tu *TransactionUpdate) SetType(s string) *TransactionUpdate

SetType sets the "type" field.

func (*TransactionUpdate) SetURL

SetURL sets the "url" field.

func (*TransactionUpdate) SetUpdatedDate

func (tu *TransactionUpdate) SetUpdatedDate(t time.Time) *TransactionUpdate

SetUpdatedDate sets the "updatedDate" field.

func (*TransactionUpdate) Where

Where adds a new predicate for the TransactionUpdate builder.

type TransactionUpdateOne

type TransactionUpdateOne struct {
	// contains filtered or unexported fields
}

TransactionUpdateOne is the builder for updating a single Transaction entity.

func (*TransactionUpdateOne) AddExchangeRate

func (tuo *TransactionUpdateOne) AddExchangeRate(f float64) *TransactionUpdateOne

AddExchangeRate adds f to the "exchangeRate" field.

func (*TransactionUpdateOne) AddExecutedAmount

func (tuo *TransactionUpdateOne) AddExecutedAmount(f float64) *TransactionUpdateOne

AddExecutedAmount adds f to the "executedAmount" field.

func (*TransactionUpdateOne) AddImageIDs

func (tuo *TransactionUpdateOne) AddImageIDs(ids ...int) *TransactionUpdateOne

AddImageIDs adds the "images" edge to the BinaryItem entity by IDs.

func (*TransactionUpdateOne) AddImages

func (tuo *TransactionUpdateOne) AddImages(b ...*BinaryItem) *TransactionUpdateOne

AddImages adds the "images" edges to the BinaryItem entity.

func (*TransactionUpdateOne) AddLatitude

func (tuo *TransactionUpdateOne) AddLatitude(f float64) *TransactionUpdateOne

AddLatitude adds f to the "latitude" field.

func (*TransactionUpdateOne) AddLongitude

func (tuo *TransactionUpdateOne) AddLongitude(f float64) *TransactionUpdateOne

AddLongitude adds f to the "longitude" field.

func (*TransactionUpdateOne) AddOriginatingAmount

func (tuo *TransactionUpdateOne) AddOriginatingAmount(f float64) *TransactionUpdateOne

AddOriginatingAmount adds f to the "originatingAmount" field.

func (*TransactionUpdateOne) AddRunningBalance

func (tuo *TransactionUpdateOne) AddRunningBalance(f float64) *TransactionUpdateOne

AddRunningBalance adds f to the "runningBalance" field.

func (*TransactionUpdateOne) AddSequenceInDay

func (tuo *TransactionUpdateOne) AddSequenceInDay(i int) *TransactionUpdateOne

AddSequenceInDay adds i to the "sequenceInDay" field.

func (*TransactionUpdateOne) ClearAccount

func (tuo *TransactionUpdateOne) ClearAccount() *TransactionUpdateOne

ClearAccount clears the "account" edge to the Account entity.

func (*TransactionUpdateOne) ClearCheckNumber

func (tuo *TransactionUpdateOne) ClearCheckNumber() *TransactionUpdateOne

ClearCheckNumber clears the value of the "checkNumber" field.

func (*TransactionUpdateOne) ClearDescription

func (tuo *TransactionUpdateOne) ClearDescription() *TransactionUpdateOne

ClearDescription clears the value of the "description" field.

func (*TransactionUpdateOne) ClearExchangeRate

func (tuo *TransactionUpdateOne) ClearExchangeRate() *TransactionUpdateOne

ClearExchangeRate clears the value of the "exchangeRate" field.

func (*TransactionUpdateOne) ClearExecutedDate

func (tuo *TransactionUpdateOne) ClearExecutedDate() *TransactionUpdateOne

ClearExecutedDate clears the value of the "executedDate" field.

func (*TransactionUpdateOne) ClearGroup

func (tuo *TransactionUpdateOne) ClearGroup() *TransactionUpdateOne

ClearGroup clears the value of the "group" field.

func (*TransactionUpdateOne) ClearImages

func (tuo *TransactionUpdateOne) ClearImages() *TransactionUpdateOne

ClearImages clears all "images" edges to the BinaryItem entity.

func (*TransactionUpdateOne) ClearLatitude

func (tuo *TransactionUpdateOne) ClearLatitude() *TransactionUpdateOne

ClearLatitude clears the value of the "latitude" field.

func (*TransactionUpdateOne) ClearLongitude

func (tuo *TransactionUpdateOne) ClearLongitude() *TransactionUpdateOne

ClearLongitude clears the value of the "longitude" field.

func (*TransactionUpdateOne) ClearMainCategory

func (tuo *TransactionUpdateOne) ClearMainCategory() *TransactionUpdateOne

ClearMainCategory clears the value of the "mainCategory" field.

func (*TransactionUpdateOne) ClearMemo

func (tuo *TransactionUpdateOne) ClearMemo() *TransactionUpdateOne

ClearMemo clears the value of the "memo" field.

func (*TransactionUpdateOne) ClearMerchantCode

func (tuo *TransactionUpdateOne) ClearMerchantCode() *TransactionUpdateOne

ClearMerchantCode clears the value of the "merchantCode" field.

func (*TransactionUpdateOne) ClearOriginatingAmount

func (tuo *TransactionUpdateOne) ClearOriginatingAmount() *TransactionUpdateOne

ClearOriginatingAmount clears the value of the "originatingAmount" field.

func (*TransactionUpdateOne) ClearOriginatingCurrencyCode

func (tuo *TransactionUpdateOne) ClearOriginatingCurrencyCode() *TransactionUpdateOne

ClearOriginatingCurrencyCode clears the value of the "originatingCurrencyCode" field.

func (*TransactionUpdateOne) ClearPostedDate

func (tuo *TransactionUpdateOne) ClearPostedDate() *TransactionUpdateOne

ClearPostedDate clears the value of the "postedDate" field.

func (*TransactionUpdateOne) ClearReversalFor

func (tuo *TransactionUpdateOne) ClearReversalFor() *TransactionUpdateOne

ClearReversalFor clears the value of the "reversalFor" field.

func (*TransactionUpdateOne) ClearReversedBy

func (tuo *TransactionUpdateOne) ClearReversedBy() *TransactionUpdateOne

ClearReversedBy clears the value of the "reversedBy" field.

func (*TransactionUpdateOne) ClearSequenceInDay

func (tuo *TransactionUpdateOne) ClearSequenceInDay() *TransactionUpdateOne

ClearSequenceInDay clears the value of the "sequenceInDay" field.

func (*TransactionUpdateOne) ClearSubCategory

func (tuo *TransactionUpdateOne) ClearSubCategory() *TransactionUpdateOne

ClearSubCategory clears the value of the "subCategory" field.

func (*TransactionUpdateOne) ClearType

func (tuo *TransactionUpdateOne) ClearType() *TransactionUpdateOne

ClearType clears the value of the "type" field.

func (*TransactionUpdateOne) ClearURL

func (tuo *TransactionUpdateOne) ClearURL() *TransactionUpdateOne

ClearURL clears the value of the "url" field.

func (*TransactionUpdateOne) ClearUpdatedDate

func (tuo *TransactionUpdateOne) ClearUpdatedDate() *TransactionUpdateOne

ClearUpdatedDate clears the value of the "updatedDate" field.

func (*TransactionUpdateOne) Exec

func (tuo *TransactionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TransactionUpdateOne) ExecX

func (tuo *TransactionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TransactionUpdateOne) Mutation

func (tuo *TransactionUpdateOne) Mutation() *TransactionMutation

Mutation returns the TransactionMutation object of the builder.

func (*TransactionUpdateOne) RemoveImageIDs

func (tuo *TransactionUpdateOne) RemoveImageIDs(ids ...int) *TransactionUpdateOne

RemoveImageIDs removes the "images" edge to BinaryItem entities by IDs.

func (*TransactionUpdateOne) RemoveImages

func (tuo *TransactionUpdateOne) RemoveImages(b ...*BinaryItem) *TransactionUpdateOne

RemoveImages removes "images" edges to BinaryItem entities.

func (*TransactionUpdateOne) Save

Save executes the query and returns the updated Transaction entity.

func (*TransactionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TransactionUpdateOne) SetAccount

func (tuo *TransactionUpdateOne) SetAccount(a *Account) *TransactionUpdateOne

SetAccount sets the "account" edge to the Account entity.

func (*TransactionUpdateOne) SetAccountID

func (tuo *TransactionUpdateOne) SetAccountID(id uuid.UUID) *TransactionUpdateOne

SetAccountID sets the "account" edge to the Account entity by ID.

func (*TransactionUpdateOne) SetCheckNumber

func (tuo *TransactionUpdateOne) SetCheckNumber(s string) *TransactionUpdateOne

SetCheckNumber sets the "checkNumber" field.

func (*TransactionUpdateOne) SetCreatedDate

func (tuo *TransactionUpdateOne) SetCreatedDate(t time.Time) *TransactionUpdateOne

SetCreatedDate sets the "createdDate" field.

func (*TransactionUpdateOne) SetDescription

func (tuo *TransactionUpdateOne) SetDescription(s string) *TransactionUpdateOne

SetDescription sets the "description" field.

func (*TransactionUpdateOne) SetDirection

SetDirection sets the "direction" field.

func (*TransactionUpdateOne) SetExchangeRate

func (tuo *TransactionUpdateOne) SetExchangeRate(f float64) *TransactionUpdateOne

SetExchangeRate sets the "exchangeRate" field.

func (*TransactionUpdateOne) SetExecutedAmount

func (tuo *TransactionUpdateOne) SetExecutedAmount(f float64) *TransactionUpdateOne

SetExecutedAmount sets the "executedAmount" field.

func (*TransactionUpdateOne) SetExecutedCurrencyCode

func (tuo *TransactionUpdateOne) SetExecutedCurrencyCode(s string) *TransactionUpdateOne

SetExecutedCurrencyCode sets the "executedCurrencyCode" field.

func (*TransactionUpdateOne) SetExecutedDate

func (tuo *TransactionUpdateOne) SetExecutedDate(t time.Time) *TransactionUpdateOne

SetExecutedDate sets the "executedDate" field.

func (*TransactionUpdateOne) SetGroup

SetGroup sets the "group" field.

func (*TransactionUpdateOne) SetLatitude

func (tuo *TransactionUpdateOne) SetLatitude(f float64) *TransactionUpdateOne

SetLatitude sets the "latitude" field.

func (*TransactionUpdateOne) SetLongitude

func (tuo *TransactionUpdateOne) SetLongitude(f float64) *TransactionUpdateOne

SetLongitude sets the "longitude" field.

func (*TransactionUpdateOne) SetMainCategory

func (tuo *TransactionUpdateOne) SetMainCategory(s string) *TransactionUpdateOne

SetMainCategory sets the "mainCategory" field.

func (*TransactionUpdateOne) SetMemo

SetMemo sets the "memo" field.

func (*TransactionUpdateOne) SetMerchantCode

func (tuo *TransactionUpdateOne) SetMerchantCode(s string) *TransactionUpdateOne

SetMerchantCode sets the "merchantCode" field.

func (*TransactionUpdateOne) SetNillableAccountID

func (tuo *TransactionUpdateOne) SetNillableAccountID(id *uuid.UUID) *TransactionUpdateOne

SetNillableAccountID sets the "account" edge to the Account entity by ID if the given value is not nil.

func (*TransactionUpdateOne) SetNillableCheckNumber

func (tuo *TransactionUpdateOne) SetNillableCheckNumber(s *string) *TransactionUpdateOne

SetNillableCheckNumber sets the "checkNumber" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableDescription

func (tuo *TransactionUpdateOne) SetNillableDescription(s *string) *TransactionUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableExchangeRate

func (tuo *TransactionUpdateOne) SetNillableExchangeRate(f *float64) *TransactionUpdateOne

SetNillableExchangeRate sets the "exchangeRate" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableExecutedDate

func (tuo *TransactionUpdateOne) SetNillableExecutedDate(t *time.Time) *TransactionUpdateOne

SetNillableExecutedDate sets the "executedDate" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableGroup

func (tuo *TransactionUpdateOne) SetNillableGroup(s *string) *TransactionUpdateOne

SetNillableGroup sets the "group" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableLatitude

func (tuo *TransactionUpdateOne) SetNillableLatitude(f *float64) *TransactionUpdateOne

SetNillableLatitude sets the "latitude" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableLongitude

func (tuo *TransactionUpdateOne) SetNillableLongitude(f *float64) *TransactionUpdateOne

SetNillableLongitude sets the "longitude" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableMainCategory

func (tuo *TransactionUpdateOne) SetNillableMainCategory(s *string) *TransactionUpdateOne

SetNillableMainCategory sets the "mainCategory" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableMemo

func (tuo *TransactionUpdateOne) SetNillableMemo(s *string) *TransactionUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableMerchantCode

func (tuo *TransactionUpdateOne) SetNillableMerchantCode(s *string) *TransactionUpdateOne

SetNillableMerchantCode sets the "merchantCode" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableOriginatingAmount

func (tuo *TransactionUpdateOne) SetNillableOriginatingAmount(f *float64) *TransactionUpdateOne

SetNillableOriginatingAmount sets the "originatingAmount" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableOriginatingCurrencyCode

func (tuo *TransactionUpdateOne) SetNillableOriginatingCurrencyCode(s *string) *TransactionUpdateOne

SetNillableOriginatingCurrencyCode sets the "originatingCurrencyCode" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillablePostedDate

func (tuo *TransactionUpdateOne) SetNillablePostedDate(t *time.Time) *TransactionUpdateOne

SetNillablePostedDate sets the "postedDate" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableReversal

func (tuo *TransactionUpdateOne) SetNillableReversal(b *bool) *TransactionUpdateOne

SetNillableReversal sets the "reversal" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableReversalFor

func (tuo *TransactionUpdateOne) SetNillableReversalFor(s *string) *TransactionUpdateOne

SetNillableReversalFor sets the "reversalFor" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableReversed

func (tuo *TransactionUpdateOne) SetNillableReversed(b *bool) *TransactionUpdateOne

SetNillableReversed sets the "reversed" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableReversedBy

func (tuo *TransactionUpdateOne) SetNillableReversedBy(s *string) *TransactionUpdateOne

SetNillableReversedBy sets the "reversedBy" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableSequenceInDay

func (tuo *TransactionUpdateOne) SetNillableSequenceInDay(i *int) *TransactionUpdateOne

SetNillableSequenceInDay sets the "sequenceInDay" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableSubCategory

func (tuo *TransactionUpdateOne) SetNillableSubCategory(s *string) *TransactionUpdateOne

SetNillableSubCategory sets the "subCategory" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableType

func (tuo *TransactionUpdateOne) SetNillableType(s *string) *TransactionUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableURL

func (tuo *TransactionUpdateOne) SetNillableURL(s *string) *TransactionUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*TransactionUpdateOne) SetNillableUpdatedDate

func (tuo *TransactionUpdateOne) SetNillableUpdatedDate(t *time.Time) *TransactionUpdateOne

SetNillableUpdatedDate sets the "updatedDate" field if the given value is not nil.

func (*TransactionUpdateOne) SetOriginatingAmount

func (tuo *TransactionUpdateOne) SetOriginatingAmount(f float64) *TransactionUpdateOne

SetOriginatingAmount sets the "originatingAmount" field.

func (*TransactionUpdateOne) SetOriginatingCurrencyCode

func (tuo *TransactionUpdateOne) SetOriginatingCurrencyCode(s string) *TransactionUpdateOne

SetOriginatingCurrencyCode sets the "originatingCurrencyCode" field.

func (*TransactionUpdateOne) SetPostedDate

func (tuo *TransactionUpdateOne) SetPostedDate(t time.Time) *TransactionUpdateOne

SetPostedDate sets the "postedDate" field.

func (*TransactionUpdateOne) SetReversal

func (tuo *TransactionUpdateOne) SetReversal(b bool) *TransactionUpdateOne

SetReversal sets the "reversal" field.

func (*TransactionUpdateOne) SetReversalFor

func (tuo *TransactionUpdateOne) SetReversalFor(s string) *TransactionUpdateOne

SetReversalFor sets the "reversalFor" field.

func (*TransactionUpdateOne) SetReversed

func (tuo *TransactionUpdateOne) SetReversed(b bool) *TransactionUpdateOne

SetReversed sets the "reversed" field.

func (*TransactionUpdateOne) SetReversedBy

func (tuo *TransactionUpdateOne) SetReversedBy(s string) *TransactionUpdateOne

SetReversedBy sets the "reversedBy" field.

func (*TransactionUpdateOne) SetRunningBalance

func (tuo *TransactionUpdateOne) SetRunningBalance(f float64) *TransactionUpdateOne

SetRunningBalance sets the "runningBalance" field.

func (*TransactionUpdateOne) SetSequenceInDay

func (tuo *TransactionUpdateOne) SetSequenceInDay(i int) *TransactionUpdateOne

SetSequenceInDay sets the "sequenceInDay" field.

func (*TransactionUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*TransactionUpdateOne) SetSubCategory

func (tuo *TransactionUpdateOne) SetSubCategory(s string) *TransactionUpdateOne

SetSubCategory sets the "subCategory" field.

func (*TransactionUpdateOne) SetType

SetType sets the "type" field.

func (*TransactionUpdateOne) SetURL

SetURL sets the "url" field.

func (*TransactionUpdateOne) SetUpdatedDate

func (tuo *TransactionUpdateOne) SetUpdatedDate(t time.Time) *TransactionUpdateOne

SetUpdatedDate sets the "updatedDate" field.

type Transactions

type Transactions []*Transaction

Transactions is a parsable slice of Transaction.

type Tx

type Tx struct {

	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// Bank is the client for interacting with the Bank builders.
	Bank *BankClient
	// BinaryItem is the client for interacting with the BinaryItem builders.
	BinaryItem *BinaryItemClient
	// Branch is the client for interacting with the Branch builders.
	Branch *BranchClient
	// Card is the client for interacting with the Card builders.
	Card *CardClient
	// CardNetwork is the client for interacting with the CardNetwork builders.
	CardNetwork *CardNetworkClient
	// Entity is the client for interacting with the Entity builders.
	Entity *EntityClient
	// EntityAddress is the client for interacting with the EntityAddress builders.
	EntityAddress *EntityAddressClient
	// EntityContactPoint is the client for interacting with the EntityContactPoint builders.
	EntityContactPoint *EntityContactPointClient
	// EntityTaxInformation is the client for interacting with the EntityTaxInformation builders.
	EntityTaxInformation *EntityTaxInformationClient
	// Preference is the client for interacting with the Preference builders.
	Preference *PreferenceClient
	// Product is the client for interacting with the Product builders.
	Product *ProductClient
	// RoutingNumber is the client for interacting with the RoutingNumber builders.
	RoutingNumber *RoutingNumberClient
	// Transaction is the client for interacting with the Transaction builders.
	Transaction *TransactionClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field 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