model

package
v1.2.3-0...-0b8789f Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

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

	// Node types.
	TypeBranch           = "Branch"
	TypeConfiguration    = "Configuration"
	TypeConfigurationRow = "ConfigurationRow"
)

Variables

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

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

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

GroupBy(field1, field2).
Aggregate(model.As(model.Sum(field1), "sum_field1"), (model.As(model.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 Branch

type Branch struct {

	// ID of the ent.
	ID key.BranchKey `json:"id,omitempty"`
	// BranchID holds the value of the "branchID" field.
	BranchID keboola.BranchID `json:"branchID,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// IsDefault holds the value of the "isDefault" field.
	IsDefault bool `json:"isDefault,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) QueryConfigurations

func (b *Branch) QueryConfigurations() *ConfigurationQuery

QueryConfigurations queries the "configurations" 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.

func (*Branch) Value

func (b *Branch) Value(name string) (ent.Value, error)

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

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 builder for creating a Branch entity.

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 builder for deleting the given entity.

func (*BranchClient) DeleteOneID

func (c *BranchClient) DeleteOneID(id key.BranchKey) *BranchDeleteOne

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

func (*BranchClient) Get

func (c *BranchClient) Get(ctx context.Context, id key.BranchKey) (*Branch, error)

Get returns a Branch entity by its id.

func (*BranchClient) GetX

func (c *BranchClient) GetX(ctx context.Context, id key.BranchKey) *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) Intercept

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

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

func (*BranchClient) Interceptors

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

Interceptors returns the client interceptors.

func (*BranchClient) MapCreateBulk

func (c *BranchClient) MapCreateBulk(slice any, setFunc func(*BranchCreate, int)) *BranchCreateBulk

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

func (*BranchClient) Query

func (c *BranchClient) Query() *BranchQuery

Query returns a query builder for Branch.

func (*BranchClient) QueryConfigurations

func (c *BranchClient) QueryConfigurations(b *Branch) *ConfigurationQuery

QueryConfigurations queries the configurations 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 key.BranchKey) *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) AddConfigurationIDs

func (bc *BranchCreate) AddConfigurationIDs(ids ...key.ConfigurationKey) *BranchCreate

AddConfigurationIDs adds the "configurations" edge to the Configuration entity by IDs.

func (*BranchCreate) AddConfigurations

func (bc *BranchCreate) AddConfigurations(c ...*Configuration) *BranchCreate

AddConfigurations adds the "configurations" edges to the Configuration entity.

func (*BranchCreate) Exec

func (bc *BranchCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BranchCreate) ExecX

func (bc *BranchCreate) ExecX(ctx context.Context)

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

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

func (bc *BranchCreate) SetBranchID(ki keboola.BranchID) *BranchCreate

SetBranchID sets the "branchID" field.

func (*BranchCreate) SetDescription

func (bc *BranchCreate) SetDescription(s string) *BranchCreate

SetDescription sets the "description" field.

func (*BranchCreate) SetID

func (bc *BranchCreate) SetID(kk key.BranchKey) *BranchCreate

SetID sets the "id" field.

func (*BranchCreate) SetIsDefault

func (bc *BranchCreate) SetIsDefault(b bool) *BranchCreate

SetIsDefault sets the "isDefault" field.

func (*BranchCreate) SetName

func (bc *BranchCreate) SetName(s string) *BranchCreate

SetName sets the "name" field.

type BranchCreateBulk

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

BranchCreateBulk is the builder for creating many Branch entities in bulk.

func (*BranchCreateBulk) Exec

func (bcb *BranchCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BranchCreateBulk) ExecX

func (bcb *BranchCreateBulk) ExecX(ctx context.Context)

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

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 appends a list predicates 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.

func (*BranchDeleteOne) Where

func (bdo *BranchDeleteOne) Where(ps ...predicate.Branch) *BranchDeleteOne

Where appends a list predicates to the BranchDelete builder.

type BranchEdges

type BranchEdges struct {
	// Configurations holds the value of the configurations edge.
	Configurations []*Configuration `json:"configurations,omitempty"`
	// contains filtered or unexported fields
}

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

func (BranchEdges) ConfigurationsOrErr

func (e BranchEdges) ConfigurationsOrErr() ([]*Configuration, error)

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

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 (s *BranchGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*BranchGroupBy) BoolX

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

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

func (*BranchGroupBy) Bools

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

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

func (*BranchGroupBy) BoolsX

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

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

func (*BranchGroupBy) Float64

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

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

func (*BranchGroupBy) Float64X

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

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

func (*BranchGroupBy) Float64s

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

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

func (*BranchGroupBy) Float64sX

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

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

func (*BranchGroupBy) Int

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

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

func (*BranchGroupBy) IntX

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

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

func (*BranchGroupBy) Ints

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

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

func (*BranchGroupBy) IntsX

func (s *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 any) error

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

func (*BranchGroupBy) ScanX

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

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

func (*BranchGroupBy) String

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

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

func (*BranchGroupBy) StringX

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

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

func (*BranchGroupBy) Strings

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

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

func (*BranchGroupBy) StringsX

func (s *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) AddBranchID

func (m *BranchMutation) AddBranchID(ki keboola.BranchID)

AddBranchID adds ki to the "branchID" field.

func (*BranchMutation) AddConfigurationIDs

func (m *BranchMutation) AddConfigurationIDs(ids ...key.ConfigurationKey)

AddConfigurationIDs adds the "configurations" edge to the Configuration entity by ids.

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

func (m *BranchMutation) AddedBranchID() (r keboola.BranchID, exists bool)

AddedBranchID returns the value that was added to the "branchID" field in this mutation.

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

func (m *BranchMutation) BranchID() (r keboola.BranchID, exists bool)

BranchID returns the value of the "branchID" field in the mutation.

func (*BranchMutation) ClearConfigurations

func (m *BranchMutation) ClearConfigurations()

ClearConfigurations clears the "configurations" edge to the Configuration entity.

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

func (m *BranchMutation) ConfigurationsCleared() bool

ConfigurationsCleared reports if the "configurations" edge to the Configuration entity was cleared.

func (*BranchMutation) ConfigurationsIDs

func (m *BranchMutation) ConfigurationsIDs() (ids []key.ConfigurationKey)

ConfigurationsIDs returns the "configurations" edge IDs in the mutation.

func (*BranchMutation) Description

func (m *BranchMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

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 key.BranchKey, exists bool)

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

func (*BranchMutation) IDs

func (m *BranchMutation) IDs(ctx context.Context) ([]key.BranchKey, error)

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

func (*BranchMutation) IsDefault

func (m *BranchMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "isDefault" field in the mutation.

func (*BranchMutation) Name

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

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

func (*BranchMutation) OldBranchID

func (m *BranchMutation) OldBranchID(ctx context.Context) (v keboola.BranchID, err error)

OldBranchID returns the old "branchID" 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) OldDescription

func (m *BranchMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" 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) OldIsDefault

func (m *BranchMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "isDefault" 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) OldName

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

OldName returns the old "name" 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) RemoveConfigurationIDs

func (m *BranchMutation) RemoveConfigurationIDs(ids ...key.ConfigurationKey)

RemoveConfigurationIDs removes the "configurations" edge to the Configuration entity by IDs.

func (*BranchMutation) RemovedConfigurationsIDs

func (m *BranchMutation) RemovedConfigurationsIDs() (ids []key.ConfigurationKey)

RemovedConfigurations returns the removed IDs of the "configurations" edge to the Configuration entity.

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

func (m *BranchMutation) ResetBranchID()

ResetBranchID resets all changes to the "branchID" field.

func (*BranchMutation) ResetConfigurations

func (m *BranchMutation) ResetConfigurations()

ResetConfigurations resets all changes to the "configurations" edge.

func (*BranchMutation) ResetDescription

func (m *BranchMutation) ResetDescription()

ResetDescription resets all changes to the "description" 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) ResetIsDefault

func (m *BranchMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "isDefault" field.

func (*BranchMutation) ResetName

func (m *BranchMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*BranchMutation) SetBranchID

func (m *BranchMutation) SetBranchID(ki keboola.BranchID)

SetBranchID sets the "branchID" field.

func (*BranchMutation) SetDescription

func (m *BranchMutation) SetDescription(s string)

SetDescription sets the "description" 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) SetID

func (m *BranchMutation) SetID(id key.BranchKey)

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

func (*BranchMutation) SetIsDefault

func (m *BranchMutation) SetIsDefault(b bool)

SetIsDefault sets the "isDefault" field.

func (*BranchMutation) SetName

func (m *BranchMutation) SetName(s string)

SetName sets the "name" field.

func (*BranchMutation) SetOp

func (m *BranchMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

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

func (m *BranchMutation) Where(ps ...predicate.Branch)

Where appends a list predicates to the BranchMutation builder.

func (*BranchMutation) WhereP

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

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

type BranchQuery

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

BranchQuery is the builder for querying Branch entities.

func (*BranchQuery) Aggregate

func (bq *BranchQuery) Aggregate(fns ...AggregateFunc) *BranchSelect

Aggregate returns a BranchSelect configured with the given aggregations.

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 key.BranchKey, 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) key.BranchKey

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 {
	BranchID keboola.BranchID `json:"branchID,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Branch.Query().
	GroupBy(branch.FieldBranchID).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*BranchQuery) IDs

func (bq *BranchQuery) IDs(ctx context.Context) (ids []key.BranchKey, err error)

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

func (*BranchQuery) IDsX

func (bq *BranchQuery) IDsX(ctx context.Context) []key.BranchKey

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

func (*BranchQuery) Limit

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

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

func (*BranchQuery) Offset

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

Offset to start from.

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 more than one Branch entity is found. Returns a *NotFoundError when no Branch entities are found.

func (*BranchQuery) OnlyID

func (bq *BranchQuery) OnlyID(ctx context.Context) (id key.BranchKey, err error)

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

func (*BranchQuery) OnlyIDX

func (bq *BranchQuery) OnlyIDX(ctx context.Context) key.BranchKey

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 ...branch.OrderOption) *BranchQuery

Order specifies how the records should be ordered.

func (*BranchQuery) QueryConfigurations

func (bq *BranchQuery) QueryConfigurations() *ConfigurationQuery

QueryConfigurations chains the current query on the "configurations" edge.

func (*BranchQuery) Select

func (bq *BranchQuery) Select(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 {
	BranchID keboola.BranchID `json:"branchID,omitempty"`
}

client.Branch.Query().
	Select(branch.FieldBranchID).
	Scan(ctx, &v)

func (*BranchQuery) Unique

func (bq *BranchQuery) Unique(unique bool) *BranchQuery

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

func (*BranchQuery) Where

func (bq *BranchQuery) Where(ps ...predicate.Branch) *BranchQuery

Where adds a new predicate for the BranchQuery builder.

func (*BranchQuery) WithConfigurations

func (bq *BranchQuery) WithConfigurations(opts ...func(*ConfigurationQuery)) *BranchQuery

WithConfigurations tells the query-builder to eager-load the nodes that are connected to the "configurations" 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) Aggregate

func (bs *BranchSelect) Aggregate(fns ...AggregateFunc) *BranchSelect

Aggregate adds the given aggregation functions to the selector query.

func (*BranchSelect) Bool

func (s *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 (s *BranchSelect) BoolX(ctx context.Context) bool

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

func (*BranchSelect) Bools

func (s *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 (s *BranchSelect) BoolsX(ctx context.Context) []bool

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

func (*BranchSelect) Float64

func (s *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 (s *BranchSelect) Float64X(ctx context.Context) float64

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

func (*BranchSelect) Float64s

func (s *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 (s *BranchSelect) Float64sX(ctx context.Context) []float64

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

func (*BranchSelect) Int

func (s *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 (s *BranchSelect) IntX(ctx context.Context) int

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

func (*BranchSelect) Ints

func (s *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 (s *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 any) error

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

func (*BranchSelect) ScanX

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

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

func (*BranchSelect) String

func (s *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 (s *BranchSelect) StringX(ctx context.Context) string

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

func (*BranchSelect) Strings

func (s *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 (s *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) AddConfigurationIDs

func (bu *BranchUpdate) AddConfigurationIDs(ids ...key.ConfigurationKey) *BranchUpdate

AddConfigurationIDs adds the "configurations" edge to the Configuration entity by IDs.

func (*BranchUpdate) AddConfigurations

func (bu *BranchUpdate) AddConfigurations(c ...*Configuration) *BranchUpdate

AddConfigurations adds the "configurations" edges to the Configuration entity.

func (*BranchUpdate) ClearConfigurations

func (bu *BranchUpdate) ClearConfigurations() *BranchUpdate

ClearConfigurations clears all "configurations" edges to the Configuration 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) RemoveConfigurationIDs

func (bu *BranchUpdate) RemoveConfigurationIDs(ids ...key.ConfigurationKey) *BranchUpdate

RemoveConfigurationIDs removes the "configurations" edge to Configuration entities by IDs.

func (*BranchUpdate) RemoveConfigurations

func (bu *BranchUpdate) RemoveConfigurations(c ...*Configuration) *BranchUpdate

RemoveConfigurations removes "configurations" edges to Configuration entities.

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

func (bu *BranchUpdate) SetDescription(s string) *BranchUpdate

SetDescription sets the "description" field.

func (*BranchUpdate) SetName

func (bu *BranchUpdate) SetName(s string) *BranchUpdate

SetName sets the "name" field.

func (*BranchUpdate) SetNillableDescription

func (bu *BranchUpdate) SetNillableDescription(s *string) *BranchUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*BranchUpdate) SetNillableName

func (bu *BranchUpdate) SetNillableName(s *string) *BranchUpdate

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

func (*BranchUpdate) Where

func (bu *BranchUpdate) Where(ps ...predicate.Branch) *BranchUpdate

Where appends a list predicates to 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) AddConfigurationIDs

func (buo *BranchUpdateOne) AddConfigurationIDs(ids ...key.ConfigurationKey) *BranchUpdateOne

AddConfigurationIDs adds the "configurations" edge to the Configuration entity by IDs.

func (*BranchUpdateOne) AddConfigurations

func (buo *BranchUpdateOne) AddConfigurations(c ...*Configuration) *BranchUpdateOne

AddConfigurations adds the "configurations" edges to the Configuration entity.

func (*BranchUpdateOne) ClearConfigurations

func (buo *BranchUpdateOne) ClearConfigurations() *BranchUpdateOne

ClearConfigurations clears all "configurations" edges to the Configuration 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) RemoveConfigurationIDs

func (buo *BranchUpdateOne) RemoveConfigurationIDs(ids ...key.ConfigurationKey) *BranchUpdateOne

RemoveConfigurationIDs removes the "configurations" edge to Configuration entities by IDs.

func (*BranchUpdateOne) RemoveConfigurations

func (buo *BranchUpdateOne) RemoveConfigurations(c ...*Configuration) *BranchUpdateOne

RemoveConfigurations removes "configurations" edges to Configuration entities.

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

func (buo *BranchUpdateOne) Select(field string, fields ...string) *BranchUpdateOne

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

func (*BranchUpdateOne) SetDescription

func (buo *BranchUpdateOne) SetDescription(s string) *BranchUpdateOne

SetDescription sets the "description" field.

func (*BranchUpdateOne) SetName

func (buo *BranchUpdateOne) SetName(s string) *BranchUpdateOne

SetName sets the "name" field.

func (*BranchUpdateOne) SetNillableDescription

func (buo *BranchUpdateOne) SetNillableDescription(s *string) *BranchUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*BranchUpdateOne) SetNillableName

func (buo *BranchUpdateOne) SetNillableName(s *string) *BranchUpdateOne

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

func (*BranchUpdateOne) Where

func (buo *BranchUpdateOne) Where(ps ...predicate.Branch) *BranchUpdateOne

Where appends a list predicates to the BranchUpdate builder.

type Branches

type Branches []*Branch

Branches is a parsable slice of Branch.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Branch is the client for interacting with the Branch builders.
	Branch *BranchClient
	// Configuration is the client for interacting with the Configuration builders.
	Configuration *ConfigurationClient
	// ConfigurationRow is the client for interacting with the ConfigurationRow builders.
	ConfigurationRow *ConfigurationRowClient
	// 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().
	Branch.
	Query().
	Count(ctx)

func (*Client) Intercept

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

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

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

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type Configuration

type Configuration struct {

	// ID of the ent.
	ID key.ConfigurationKey `json:"id,omitempty"`
	// BranchID holds the value of the "branchID" field.
	BranchID keboola.BranchID `json:"branchID,omitempty"`
	// ComponentID holds the value of the "componentID" field.
	ComponentID keboola.ComponentID `json:"componentID,omitempty"`
	// ConfigID holds the value of the "configID" field.
	ConfigID keboola.ConfigID `json:"configID,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// IsDisabled holds the value of the "isDisabled" field.
	IsDisabled bool `json:"isDisabled,omitempty"`
	// Content holds the value of the "content" field.
	Content *orderedmap.OrderedMap `json:"content,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ConfigurationQuery when eager-loading is set.
	Edges ConfigurationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Configuration is the model entity for the Configuration schema.

func (*Configuration) QueryParent

func (c *Configuration) QueryParent() *BranchQuery

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

func (*Configuration) String

func (c *Configuration) String() string

String implements the fmt.Stringer.

func (*Configuration) Unwrap

func (c *Configuration) Unwrap() *Configuration

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

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

func (*Configuration) Value

func (c *Configuration) Value(name string) (ent.Value, error)

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

type ConfigurationClient

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

ConfigurationClient is a client for the Configuration schema.

func NewConfigurationClient

func NewConfigurationClient(c config) *ConfigurationClient

NewConfigurationClient returns a client for the Configuration from the given config.

func (*ConfigurationClient) Create

Create returns a builder for creating a Configuration entity.

func (*ConfigurationClient) CreateBulk

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

func (*ConfigurationClient) Delete

Delete returns a delete builder for Configuration.

func (*ConfigurationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ConfigurationClient) DeleteOneID

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

func (*ConfigurationClient) Get

Get returns a Configuration entity by its id.

func (*ConfigurationClient) GetX

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

func (*ConfigurationClient) Hooks

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

Hooks returns the client hooks.

func (*ConfigurationClient) Intercept

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

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

func (*ConfigurationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ConfigurationClient) MapCreateBulk

func (c *ConfigurationClient) MapCreateBulk(slice any, setFunc func(*ConfigurationCreate, int)) *ConfigurationCreateBulk

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

func (*ConfigurationClient) Query

Query returns a query builder for Configuration.

func (*ConfigurationClient) QueryParent

func (c *ConfigurationClient) QueryParent(co *Configuration) *BranchQuery

QueryParent queries the parent edge of a Configuration.

func (*ConfigurationClient) Update

Update returns an update builder for Configuration.

func (*ConfigurationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ConfigurationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ConfigurationClient) Use

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

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

type ConfigurationCreate

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

ConfigurationCreate is the builder for creating a Configuration entity.

func (*ConfigurationCreate) Exec

func (cc *ConfigurationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConfigurationCreate) ExecX

func (cc *ConfigurationCreate) ExecX(ctx context.Context)

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

func (*ConfigurationCreate) Mutation

Mutation returns the ConfigurationMutation object of the builder.

func (*ConfigurationCreate) Save

Save creates the Configuration in the database.

func (*ConfigurationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ConfigurationCreate) SetBranchID

SetBranchID sets the "branchID" field.

func (*ConfigurationCreate) SetComponentID

SetComponentID sets the "componentID" field.

func (*ConfigurationCreate) SetConfigID

SetConfigID sets the "configID" field.

func (*ConfigurationCreate) SetContent

SetContent sets the "content" field.

func (*ConfigurationCreate) SetDescription

func (cc *ConfigurationCreate) SetDescription(s string) *ConfigurationCreate

SetDescription sets the "description" field.

func (*ConfigurationCreate) SetID

SetID sets the "id" field.

func (*ConfigurationCreate) SetIsDisabled

func (cc *ConfigurationCreate) SetIsDisabled(b bool) *ConfigurationCreate

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationCreate) SetName

SetName sets the "name" field.

func (*ConfigurationCreate) SetNillableIsDisabled

func (cc *ConfigurationCreate) SetNillableIsDisabled(b *bool) *ConfigurationCreate

SetNillableIsDisabled sets the "isDisabled" field if the given value is not nil.

func (*ConfigurationCreate) SetParent

func (cc *ConfigurationCreate) SetParent(b *Branch) *ConfigurationCreate

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

func (*ConfigurationCreate) SetParentID

SetParentID sets the "parent" edge to the Branch entity by ID.

type ConfigurationCreateBulk

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

ConfigurationCreateBulk is the builder for creating many Configuration entities in bulk.

func (*ConfigurationCreateBulk) Exec

Exec executes the query.

func (*ConfigurationCreateBulk) ExecX

func (ccb *ConfigurationCreateBulk) ExecX(ctx context.Context)

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

func (*ConfigurationCreateBulk) Save

Save creates the Configuration entities in the database.

func (*ConfigurationCreateBulk) SaveX

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

type ConfigurationDelete

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

ConfigurationDelete is the builder for deleting a Configuration entity.

func (*ConfigurationDelete) Exec

func (cd *ConfigurationDelete) Exec(ctx context.Context) (int, error)

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

func (*ConfigurationDelete) ExecX

func (cd *ConfigurationDelete) ExecX(ctx context.Context) int

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

func (*ConfigurationDelete) Where

Where appends a list predicates to the ConfigurationDelete builder.

type ConfigurationDeleteOne

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

ConfigurationDeleteOne is the builder for deleting a single Configuration entity.

func (*ConfigurationDeleteOne) Exec

Exec executes the deletion query.

func (*ConfigurationDeleteOne) ExecX

func (cdo *ConfigurationDeleteOne) ExecX(ctx context.Context)

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

func (*ConfigurationDeleteOne) Where

Where appends a list predicates to the ConfigurationDelete builder.

type ConfigurationEdges

type ConfigurationEdges struct {
	// Parent holds the value of the parent edge.
	Parent *Branch `json:"parent,omitempty"`
	// contains filtered or unexported fields
}

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

func (ConfigurationEdges) ParentOrErr

func (e ConfigurationEdges) ParentOrErr() (*Branch, error)

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

type ConfigurationGroupBy

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

ConfigurationGroupBy is the group-by builder for Configuration entities.

func (*ConfigurationGroupBy) Aggregate

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

func (*ConfigurationGroupBy) Bool

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

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

func (*ConfigurationGroupBy) BoolX

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

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

func (*ConfigurationGroupBy) Bools

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

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

func (*ConfigurationGroupBy) BoolsX

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

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

func (*ConfigurationGroupBy) Float64

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

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

func (*ConfigurationGroupBy) Float64X

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

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

func (*ConfigurationGroupBy) Float64s

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

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

func (*ConfigurationGroupBy) Float64sX

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

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

func (*ConfigurationGroupBy) Int

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

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

func (*ConfigurationGroupBy) IntX

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

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

func (*ConfigurationGroupBy) Ints

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

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

func (*ConfigurationGroupBy) IntsX

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

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

func (*ConfigurationGroupBy) Scan

func (cgb *ConfigurationGroupBy) Scan(ctx context.Context, v any) error

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

func (*ConfigurationGroupBy) ScanX

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

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

func (*ConfigurationGroupBy) String

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

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

func (*ConfigurationGroupBy) StringX

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

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

func (*ConfigurationGroupBy) Strings

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

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

func (*ConfigurationGroupBy) StringsX

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

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

type ConfigurationMutation

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

ConfigurationMutation represents an operation that mutates the Configuration nodes in the graph.

func (*ConfigurationMutation) AddBranchID

func (m *ConfigurationMutation) AddBranchID(ki keboola.BranchID)

AddBranchID adds ki to the "branchID" field.

func (*ConfigurationMutation) AddField

func (m *ConfigurationMutation) 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 (*ConfigurationMutation) AddedBranchID

func (m *ConfigurationMutation) AddedBranchID() (r keboola.BranchID, exists bool)

AddedBranchID returns the value that was added to the "branchID" field in this mutation.

func (*ConfigurationMutation) AddedEdges

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

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

func (*ConfigurationMutation) AddedField

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

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

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

func (*ConfigurationMutation) AddedIDs

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

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

func (*ConfigurationMutation) BranchID

func (m *ConfigurationMutation) BranchID() (r keboola.BranchID, exists bool)

BranchID returns the value of the "branchID" field in the mutation.

func (*ConfigurationMutation) ClearEdge

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

func (m *ConfigurationMutation) 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 (*ConfigurationMutation) ClearParent

func (m *ConfigurationMutation) ClearParent()

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

func (*ConfigurationMutation) ClearedEdges

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

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

func (*ConfigurationMutation) ClearedFields

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

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

func (ConfigurationMutation) Client

func (m ConfigurationMutation) 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 (*ConfigurationMutation) ComponentID

func (m *ConfigurationMutation) ComponentID() (r keboola.ComponentID, exists bool)

ComponentID returns the value of the "componentID" field in the mutation.

func (*ConfigurationMutation) ConfigID

func (m *ConfigurationMutation) ConfigID() (r keboola.ConfigID, exists bool)

ConfigID returns the value of the "configID" field in the mutation.

func (*ConfigurationMutation) Content

func (m *ConfigurationMutation) Content() (r *orderedmap.OrderedMap, exists bool)

Content returns the value of the "content" field in the mutation.

func (*ConfigurationMutation) Description

func (m *ConfigurationMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*ConfigurationMutation) EdgeCleared

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

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

func (*ConfigurationMutation) Field

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

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

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

func (*ConfigurationMutation) Fields

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

func (m *ConfigurationMutation) ID() (id key.ConfigurationKey, exists bool)

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

func (*ConfigurationMutation) IDs

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

func (*ConfigurationMutation) IsDisabled

func (m *ConfigurationMutation) IsDisabled() (r bool, exists bool)

IsDisabled returns the value of the "isDisabled" field in the mutation.

func (*ConfigurationMutation) Name

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

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

func (*ConfigurationMutation) OldBranchID

func (m *ConfigurationMutation) OldBranchID(ctx context.Context) (v keboola.BranchID, err error)

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

func (*ConfigurationMutation) OldComponentID

func (m *ConfigurationMutation) OldComponentID(ctx context.Context) (v keboola.ComponentID, err error)

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

func (*ConfigurationMutation) OldConfigID

func (m *ConfigurationMutation) OldConfigID(ctx context.Context) (v keboola.ConfigID, err error)

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

func (*ConfigurationMutation) OldContent

func (m *ConfigurationMutation) OldContent(ctx context.Context) (v *orderedmap.OrderedMap, err error)

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

func (*ConfigurationMutation) OldDescription

func (m *ConfigurationMutation) OldDescription(ctx context.Context) (v string, err error)

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

func (*ConfigurationMutation) OldField

func (m *ConfigurationMutation) 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 (*ConfigurationMutation) OldIsDisabled

func (m *ConfigurationMutation) OldIsDisabled(ctx context.Context) (v bool, err error)

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

func (*ConfigurationMutation) OldName

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

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

func (*ConfigurationMutation) Op

func (m *ConfigurationMutation) Op() Op

Op returns the operation name.

func (*ConfigurationMutation) ParentCleared

func (m *ConfigurationMutation) ParentCleared() bool

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

func (*ConfigurationMutation) ParentID

func (m *ConfigurationMutation) ParentID() (id key.BranchKey, exists bool)

ParentID returns the "parent" edge ID in the mutation.

func (*ConfigurationMutation) ParentIDs

func (m *ConfigurationMutation) ParentIDs() (ids []key.BranchKey)

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

func (*ConfigurationMutation) RemovedEdges

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

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

func (*ConfigurationMutation) RemovedIDs

func (m *ConfigurationMutation) 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 (*ConfigurationMutation) ResetBranchID

func (m *ConfigurationMutation) ResetBranchID()

ResetBranchID resets all changes to the "branchID" field.

func (*ConfigurationMutation) ResetComponentID

func (m *ConfigurationMutation) ResetComponentID()

ResetComponentID resets all changes to the "componentID" field.

func (*ConfigurationMutation) ResetConfigID

func (m *ConfigurationMutation) ResetConfigID()

ResetConfigID resets all changes to the "configID" field.

func (*ConfigurationMutation) ResetContent

func (m *ConfigurationMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*ConfigurationMutation) ResetDescription

func (m *ConfigurationMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ConfigurationMutation) ResetEdge

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

func (m *ConfigurationMutation) 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 (*ConfigurationMutation) ResetIsDisabled

func (m *ConfigurationMutation) ResetIsDisabled()

ResetIsDisabled resets all changes to the "isDisabled" field.

func (*ConfigurationMutation) ResetName

func (m *ConfigurationMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ConfigurationMutation) ResetParent

func (m *ConfigurationMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*ConfigurationMutation) SetBranchID

func (m *ConfigurationMutation) SetBranchID(ki keboola.BranchID)

SetBranchID sets the "branchID" field.

func (*ConfigurationMutation) SetComponentID

func (m *ConfigurationMutation) SetComponentID(ki keboola.ComponentID)

SetComponentID sets the "componentID" field.

func (*ConfigurationMutation) SetConfigID

func (m *ConfigurationMutation) SetConfigID(ki keboola.ConfigID)

SetConfigID sets the "configID" field.

func (*ConfigurationMutation) SetContent

func (m *ConfigurationMutation) SetContent(om *orderedmap.OrderedMap)

SetContent sets the "content" field.

func (*ConfigurationMutation) SetDescription

func (m *ConfigurationMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ConfigurationMutation) SetField

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

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

func (*ConfigurationMutation) SetIsDisabled

func (m *ConfigurationMutation) SetIsDisabled(b bool)

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationMutation) SetName

func (m *ConfigurationMutation) SetName(s string)

SetName sets the "name" field.

func (*ConfigurationMutation) SetOp

func (m *ConfigurationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ConfigurationMutation) SetParentID

func (m *ConfigurationMutation) SetParentID(id key.BranchKey)

SetParentID sets the "parent" edge to the Branch entity by id.

func (ConfigurationMutation) Tx

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

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

func (*ConfigurationMutation) Type

func (m *ConfigurationMutation) Type() string

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

func (*ConfigurationMutation) Where

Where appends a list predicates to the ConfigurationMutation builder.

func (*ConfigurationMutation) WhereP

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

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

type ConfigurationQuery

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

ConfigurationQuery is the builder for querying Configuration entities.

func (*ConfigurationQuery) Aggregate

func (cq *ConfigurationQuery) Aggregate(fns ...AggregateFunc) *ConfigurationSelect

Aggregate returns a ConfigurationSelect configured with the given aggregations.

func (*ConfigurationQuery) All

All executes the query and returns a list of Configurations.

func (*ConfigurationQuery) AllX

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

func (*ConfigurationQuery) Clone

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

func (*ConfigurationQuery) Count

func (cq *ConfigurationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ConfigurationQuery) CountX

func (cq *ConfigurationQuery) CountX(ctx context.Context) int

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

func (*ConfigurationQuery) Exist

func (cq *ConfigurationQuery) Exist(ctx context.Context) (bool, error)

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

func (*ConfigurationQuery) ExistX

func (cq *ConfigurationQuery) ExistX(ctx context.Context) bool

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

func (*ConfigurationQuery) First

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

func (*ConfigurationQuery) FirstID

func (cq *ConfigurationQuery) FirstID(ctx context.Context) (id key.ConfigurationKey, err error)

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

func (*ConfigurationQuery) FirstIDX

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

func (*ConfigurationQuery) FirstX

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

func (*ConfigurationQuery) GroupBy

func (cq *ConfigurationQuery) GroupBy(field string, fields ...string) *ConfigurationGroupBy

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 {
	BranchID keboola.BranchID `json:"branchID,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Configuration.Query().
	GroupBy(configuration.FieldBranchID).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ConfigurationQuery) IDs

func (cq *ConfigurationQuery) IDs(ctx context.Context) (ids []key.ConfigurationKey, err error)

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

func (*ConfigurationQuery) IDsX

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

func (*ConfigurationQuery) Limit

func (cq *ConfigurationQuery) Limit(limit int) *ConfigurationQuery

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

func (*ConfigurationQuery) Offset

func (cq *ConfigurationQuery) Offset(offset int) *ConfigurationQuery

Offset to start from.

func (*ConfigurationQuery) Only

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

func (*ConfigurationQuery) OnlyID

func (cq *ConfigurationQuery) OnlyID(ctx context.Context) (id key.ConfigurationKey, err error)

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

func (*ConfigurationQuery) OnlyIDX

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

func (*ConfigurationQuery) OnlyX

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

func (*ConfigurationQuery) Order

Order specifies how the records should be ordered.

func (*ConfigurationQuery) QueryParent

func (cq *ConfigurationQuery) QueryParent() *BranchQuery

QueryParent chains the current query on the "parent" edge.

func (*ConfigurationQuery) Select

func (cq *ConfigurationQuery) Select(fields ...string) *ConfigurationSelect

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 {
	BranchID keboola.BranchID `json:"branchID,omitempty"`
}

client.Configuration.Query().
	Select(configuration.FieldBranchID).
	Scan(ctx, &v)

func (*ConfigurationQuery) Unique

func (cq *ConfigurationQuery) Unique(unique bool) *ConfigurationQuery

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

func (*ConfigurationQuery) Where

Where adds a new predicate for the ConfigurationQuery builder.

func (*ConfigurationQuery) WithParent

func (cq *ConfigurationQuery) WithParent(opts ...func(*BranchQuery)) *ConfigurationQuery

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

type ConfigurationRow

type ConfigurationRow struct {

	// ID of the ent.
	ID key.ConfigurationRowKey `json:"id,omitempty"`
	// BranchID holds the value of the "branchID" field.
	BranchID keboola.BranchID `json:"branchID,omitempty"`
	// ComponentID holds the value of the "componentID" field.
	ComponentID keboola.ComponentID `json:"componentID,omitempty"`
	// ConfigID holds the value of the "configID" field.
	ConfigID keboola.ConfigID `json:"configID,omitempty"`
	// RowID holds the value of the "rowID" field.
	RowID keboola.RowID `json:"rowID,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// If IsDisabled=true, then when the entire configuration is run, the row will be skipped.
	IsDisabled bool `json:"isDisabled,omitempty"`
	// Content holds the value of the "content" field.
	Content *orderedmap.OrderedMap `json:"content,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ConfigurationRowQuery when eager-loading is set.
	Edges ConfigurationRowEdges `json:"edges"`
	// contains filtered or unexported fields
}

ConfigurationRow is the model entity for the ConfigurationRow schema.

func (*ConfigurationRow) QueryParent

func (cr *ConfigurationRow) QueryParent() *ConfigurationQuery

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

func (*ConfigurationRow) String

func (cr *ConfigurationRow) String() string

String implements the fmt.Stringer.

func (*ConfigurationRow) Unwrap

func (cr *ConfigurationRow) Unwrap() *ConfigurationRow

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

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

func (*ConfigurationRow) Value

func (cr *ConfigurationRow) Value(name string) (ent.Value, error)

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

type ConfigurationRowClient

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

ConfigurationRowClient is a client for the ConfigurationRow schema.

func NewConfigurationRowClient

func NewConfigurationRowClient(c config) *ConfigurationRowClient

NewConfigurationRowClient returns a client for the ConfigurationRow from the given config.

func (*ConfigurationRowClient) Create

Create returns a builder for creating a ConfigurationRow entity.

func (*ConfigurationRowClient) CreateBulk

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

func (*ConfigurationRowClient) Delete

Delete returns a delete builder for ConfigurationRow.

func (*ConfigurationRowClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ConfigurationRowClient) DeleteOneID

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

func (*ConfigurationRowClient) Get

Get returns a ConfigurationRow entity by its id.

func (*ConfigurationRowClient) GetX

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

func (*ConfigurationRowClient) Hooks

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

Hooks returns the client hooks.

func (*ConfigurationRowClient) Intercept

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

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

func (*ConfigurationRowClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ConfigurationRowClient) MapCreateBulk

func (c *ConfigurationRowClient) MapCreateBulk(slice any, setFunc func(*ConfigurationRowCreate, int)) *ConfigurationRowCreateBulk

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

func (*ConfigurationRowClient) Query

Query returns a query builder for ConfigurationRow.

func (*ConfigurationRowClient) QueryParent

QueryParent queries the parent edge of a ConfigurationRow.

func (*ConfigurationRowClient) Update

Update returns an update builder for ConfigurationRow.

func (*ConfigurationRowClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ConfigurationRowClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ConfigurationRowClient) Use

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

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

type ConfigurationRowCreate

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

ConfigurationRowCreate is the builder for creating a ConfigurationRow entity.

func (*ConfigurationRowCreate) Exec

Exec executes the query.

func (*ConfigurationRowCreate) ExecX

func (crc *ConfigurationRowCreate) ExecX(ctx context.Context)

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

func (*ConfigurationRowCreate) Mutation

Mutation returns the ConfigurationRowMutation object of the builder.

func (*ConfigurationRowCreate) Save

Save creates the ConfigurationRow in the database.

func (*ConfigurationRowCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ConfigurationRowCreate) SetBranchID

SetBranchID sets the "branchID" field.

func (*ConfigurationRowCreate) SetComponentID

SetComponentID sets the "componentID" field.

func (*ConfigurationRowCreate) SetConfigID

SetConfigID sets the "configID" field.

func (*ConfigurationRowCreate) SetContent

SetContent sets the "content" field.

func (*ConfigurationRowCreate) SetDescription

func (crc *ConfigurationRowCreate) SetDescription(s string) *ConfigurationRowCreate

SetDescription sets the "description" field.

func (*ConfigurationRowCreate) SetID

SetID sets the "id" field.

func (*ConfigurationRowCreate) SetIsDisabled

func (crc *ConfigurationRowCreate) SetIsDisabled(b bool) *ConfigurationRowCreate

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationRowCreate) SetName

SetName sets the "name" field.

func (*ConfigurationRowCreate) SetNillableIsDisabled

func (crc *ConfigurationRowCreate) SetNillableIsDisabled(b *bool) *ConfigurationRowCreate

SetNillableIsDisabled sets the "isDisabled" field if the given value is not nil.

func (*ConfigurationRowCreate) SetParent

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

func (*ConfigurationRowCreate) SetParentID

SetParentID sets the "parent" edge to the Configuration entity by ID.

func (*ConfigurationRowCreate) SetRowID

SetRowID sets the "rowID" field.

type ConfigurationRowCreateBulk

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

ConfigurationRowCreateBulk is the builder for creating many ConfigurationRow entities in bulk.

func (*ConfigurationRowCreateBulk) Exec

Exec executes the query.

func (*ConfigurationRowCreateBulk) ExecX

func (crcb *ConfigurationRowCreateBulk) ExecX(ctx context.Context)

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

func (*ConfigurationRowCreateBulk) Save

Save creates the ConfigurationRow entities in the database.

func (*ConfigurationRowCreateBulk) SaveX

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

type ConfigurationRowDelete

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

ConfigurationRowDelete is the builder for deleting a ConfigurationRow entity.

func (*ConfigurationRowDelete) Exec

func (crd *ConfigurationRowDelete) Exec(ctx context.Context) (int, error)

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

func (*ConfigurationRowDelete) ExecX

func (crd *ConfigurationRowDelete) ExecX(ctx context.Context) int

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

func (*ConfigurationRowDelete) Where

Where appends a list predicates to the ConfigurationRowDelete builder.

type ConfigurationRowDeleteOne

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

ConfigurationRowDeleteOne is the builder for deleting a single ConfigurationRow entity.

func (*ConfigurationRowDeleteOne) Exec

Exec executes the deletion query.

func (*ConfigurationRowDeleteOne) ExecX

func (crdo *ConfigurationRowDeleteOne) ExecX(ctx context.Context)

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

func (*ConfigurationRowDeleteOne) Where

Where appends a list predicates to the ConfigurationRowDelete builder.

type ConfigurationRowEdges

type ConfigurationRowEdges struct {
	// Parent holds the value of the parent edge.
	Parent *Configuration `json:"parent,omitempty"`
	// contains filtered or unexported fields
}

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

func (ConfigurationRowEdges) ParentOrErr

func (e ConfigurationRowEdges) ParentOrErr() (*Configuration, error)

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

type ConfigurationRowGroupBy

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

ConfigurationRowGroupBy is the group-by builder for ConfigurationRow entities.

func (*ConfigurationRowGroupBy) Aggregate

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

func (*ConfigurationRowGroupBy) Bool

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

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

func (*ConfigurationRowGroupBy) BoolX

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

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

func (*ConfigurationRowGroupBy) Bools

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

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

func (*ConfigurationRowGroupBy) BoolsX

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

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

func (*ConfigurationRowGroupBy) Float64

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

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

func (*ConfigurationRowGroupBy) Float64X

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

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

func (*ConfigurationRowGroupBy) Float64s

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

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

func (*ConfigurationRowGroupBy) Float64sX

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

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

func (*ConfigurationRowGroupBy) Int

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

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

func (*ConfigurationRowGroupBy) IntX

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

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

func (*ConfigurationRowGroupBy) Ints

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

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

func (*ConfigurationRowGroupBy) IntsX

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

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

func (*ConfigurationRowGroupBy) Scan

func (crgb *ConfigurationRowGroupBy) Scan(ctx context.Context, v any) error

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

func (*ConfigurationRowGroupBy) ScanX

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

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

func (*ConfigurationRowGroupBy) String

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

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

func (*ConfigurationRowGroupBy) StringX

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

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

func (*ConfigurationRowGroupBy) Strings

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

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

func (*ConfigurationRowGroupBy) StringsX

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

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

type ConfigurationRowMutation

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

ConfigurationRowMutation represents an operation that mutates the ConfigurationRow nodes in the graph.

func (*ConfigurationRowMutation) AddBranchID

func (m *ConfigurationRowMutation) AddBranchID(ki keboola.BranchID)

AddBranchID adds ki to the "branchID" field.

func (*ConfigurationRowMutation) AddField

func (m *ConfigurationRowMutation) 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 (*ConfigurationRowMutation) AddedBranchID

func (m *ConfigurationRowMutation) AddedBranchID() (r keboola.BranchID, exists bool)

AddedBranchID returns the value that was added to the "branchID" field in this mutation.

func (*ConfigurationRowMutation) AddedEdges

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

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

func (*ConfigurationRowMutation) AddedField

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

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

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

func (*ConfigurationRowMutation) AddedIDs

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

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

func (*ConfigurationRowMutation) BranchID

func (m *ConfigurationRowMutation) BranchID() (r keboola.BranchID, exists bool)

BranchID returns the value of the "branchID" field in the mutation.

func (*ConfigurationRowMutation) ClearEdge

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

func (m *ConfigurationRowMutation) 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 (*ConfigurationRowMutation) ClearParent

func (m *ConfigurationRowMutation) ClearParent()

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

func (*ConfigurationRowMutation) ClearedEdges

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

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

func (*ConfigurationRowMutation) ClearedFields

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

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

func (ConfigurationRowMutation) Client

func (m ConfigurationRowMutation) 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 (*ConfigurationRowMutation) ComponentID

func (m *ConfigurationRowMutation) ComponentID() (r keboola.ComponentID, exists bool)

ComponentID returns the value of the "componentID" field in the mutation.

func (*ConfigurationRowMutation) ConfigID

func (m *ConfigurationRowMutation) ConfigID() (r keboola.ConfigID, exists bool)

ConfigID returns the value of the "configID" field in the mutation.

func (*ConfigurationRowMutation) Content

func (m *ConfigurationRowMutation) Content() (r *orderedmap.OrderedMap, exists bool)

Content returns the value of the "content" field in the mutation.

func (*ConfigurationRowMutation) Description

func (m *ConfigurationRowMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*ConfigurationRowMutation) EdgeCleared

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

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

func (*ConfigurationRowMutation) Field

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

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

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

func (*ConfigurationRowMutation) Fields

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

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

func (*ConfigurationRowMutation) IDs

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

func (*ConfigurationRowMutation) IsDisabled

func (m *ConfigurationRowMutation) IsDisabled() (r bool, exists bool)

IsDisabled returns the value of the "isDisabled" field in the mutation.

func (*ConfigurationRowMutation) Name

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

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

func (*ConfigurationRowMutation) OldBranchID

func (m *ConfigurationRowMutation) OldBranchID(ctx context.Context) (v keboola.BranchID, err error)

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

func (*ConfigurationRowMutation) OldComponentID

func (m *ConfigurationRowMutation) OldComponentID(ctx context.Context) (v keboola.ComponentID, err error)

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

func (*ConfigurationRowMutation) OldConfigID

func (m *ConfigurationRowMutation) OldConfigID(ctx context.Context) (v keboola.ConfigID, err error)

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

func (*ConfigurationRowMutation) OldContent

func (m *ConfigurationRowMutation) OldContent(ctx context.Context) (v *orderedmap.OrderedMap, err error)

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

func (*ConfigurationRowMutation) OldDescription

func (m *ConfigurationRowMutation) OldDescription(ctx context.Context) (v string, err error)

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

func (*ConfigurationRowMutation) OldField

func (m *ConfigurationRowMutation) 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 (*ConfigurationRowMutation) OldIsDisabled

func (m *ConfigurationRowMutation) OldIsDisabled(ctx context.Context) (v bool, err error)

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

func (*ConfigurationRowMutation) OldName

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

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

func (*ConfigurationRowMutation) OldRowID

func (m *ConfigurationRowMutation) OldRowID(ctx context.Context) (v keboola.RowID, err error)

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

func (*ConfigurationRowMutation) Op

func (m *ConfigurationRowMutation) Op() Op

Op returns the operation name.

func (*ConfigurationRowMutation) ParentCleared

func (m *ConfigurationRowMutation) ParentCleared() bool

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

func (*ConfigurationRowMutation) ParentID

func (m *ConfigurationRowMutation) ParentID() (id key.ConfigurationKey, exists bool)

ParentID returns the "parent" edge ID in the mutation.

func (*ConfigurationRowMutation) ParentIDs

func (m *ConfigurationRowMutation) ParentIDs() (ids []key.ConfigurationKey)

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

func (*ConfigurationRowMutation) RemovedEdges

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

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

func (*ConfigurationRowMutation) RemovedIDs

func (m *ConfigurationRowMutation) 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 (*ConfigurationRowMutation) ResetBranchID

func (m *ConfigurationRowMutation) ResetBranchID()

ResetBranchID resets all changes to the "branchID" field.

func (*ConfigurationRowMutation) ResetComponentID

func (m *ConfigurationRowMutation) ResetComponentID()

ResetComponentID resets all changes to the "componentID" field.

func (*ConfigurationRowMutation) ResetConfigID

func (m *ConfigurationRowMutation) ResetConfigID()

ResetConfigID resets all changes to the "configID" field.

func (*ConfigurationRowMutation) ResetContent

func (m *ConfigurationRowMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*ConfigurationRowMutation) ResetDescription

func (m *ConfigurationRowMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*ConfigurationRowMutation) ResetEdge

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

func (m *ConfigurationRowMutation) 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 (*ConfigurationRowMutation) ResetIsDisabled

func (m *ConfigurationRowMutation) ResetIsDisabled()

ResetIsDisabled resets all changes to the "isDisabled" field.

func (*ConfigurationRowMutation) ResetName

func (m *ConfigurationRowMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ConfigurationRowMutation) ResetParent

func (m *ConfigurationRowMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*ConfigurationRowMutation) ResetRowID

func (m *ConfigurationRowMutation) ResetRowID()

ResetRowID resets all changes to the "rowID" field.

func (*ConfigurationRowMutation) RowID

func (m *ConfigurationRowMutation) RowID() (r keboola.RowID, exists bool)

RowID returns the value of the "rowID" field in the mutation.

func (*ConfigurationRowMutation) SetBranchID

func (m *ConfigurationRowMutation) SetBranchID(ki keboola.BranchID)

SetBranchID sets the "branchID" field.

func (*ConfigurationRowMutation) SetComponentID

func (m *ConfigurationRowMutation) SetComponentID(ki keboola.ComponentID)

SetComponentID sets the "componentID" field.

func (*ConfigurationRowMutation) SetConfigID

func (m *ConfigurationRowMutation) SetConfigID(ki keboola.ConfigID)

SetConfigID sets the "configID" field.

func (*ConfigurationRowMutation) SetContent

func (m *ConfigurationRowMutation) SetContent(om *orderedmap.OrderedMap)

SetContent sets the "content" field.

func (*ConfigurationRowMutation) SetDescription

func (m *ConfigurationRowMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*ConfigurationRowMutation) SetField

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

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

func (*ConfigurationRowMutation) SetIsDisabled

func (m *ConfigurationRowMutation) SetIsDisabled(b bool)

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationRowMutation) SetName

func (m *ConfigurationRowMutation) SetName(s string)

SetName sets the "name" field.

func (*ConfigurationRowMutation) SetOp

func (m *ConfigurationRowMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ConfigurationRowMutation) SetParentID

func (m *ConfigurationRowMutation) SetParentID(id key.ConfigurationKey)

SetParentID sets the "parent" edge to the Configuration entity by id.

func (*ConfigurationRowMutation) SetRowID

func (m *ConfigurationRowMutation) SetRowID(ki keboola.RowID)

SetRowID sets the "rowID" field.

func (ConfigurationRowMutation) Tx

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

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

func (*ConfigurationRowMutation) Type

func (m *ConfigurationRowMutation) Type() string

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

func (*ConfigurationRowMutation) Where

Where appends a list predicates to the ConfigurationRowMutation builder.

func (*ConfigurationRowMutation) WhereP

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

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

type ConfigurationRowQuery

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

ConfigurationRowQuery is the builder for querying ConfigurationRow entities.

func (*ConfigurationRowQuery) Aggregate

Aggregate returns a ConfigurationRowSelect configured with the given aggregations.

func (*ConfigurationRowQuery) All

All executes the query and returns a list of ConfigurationRows.

func (*ConfigurationRowQuery) AllX

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

func (*ConfigurationRowQuery) Clone

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

func (*ConfigurationRowQuery) Count

func (crq *ConfigurationRowQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ConfigurationRowQuery) CountX

func (crq *ConfigurationRowQuery) CountX(ctx context.Context) int

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

func (*ConfigurationRowQuery) Exist

func (crq *ConfigurationRowQuery) Exist(ctx context.Context) (bool, error)

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

func (*ConfigurationRowQuery) ExistX

func (crq *ConfigurationRowQuery) ExistX(ctx context.Context) bool

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

func (*ConfigurationRowQuery) First

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

func (*ConfigurationRowQuery) FirstID

func (crq *ConfigurationRowQuery) FirstID(ctx context.Context) (id key.ConfigurationRowKey, err error)

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

func (*ConfigurationRowQuery) FirstIDX

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

func (*ConfigurationRowQuery) FirstX

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

func (*ConfigurationRowQuery) GroupBy

func (crq *ConfigurationRowQuery) GroupBy(field string, fields ...string) *ConfigurationRowGroupBy

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 {
	BranchID keboola.BranchID `json:"branchID,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ConfigurationRow.Query().
	GroupBy(configurationrow.FieldBranchID).
	Aggregate(model.Count()).
	Scan(ctx, &v)

func (*ConfigurationRowQuery) IDs

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

func (*ConfigurationRowQuery) IDsX

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

func (*ConfigurationRowQuery) Limit

func (crq *ConfigurationRowQuery) Limit(limit int) *ConfigurationRowQuery

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

func (*ConfigurationRowQuery) Offset

func (crq *ConfigurationRowQuery) Offset(offset int) *ConfigurationRowQuery

Offset to start from.

func (*ConfigurationRowQuery) Only

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

func (*ConfigurationRowQuery) OnlyID

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

func (*ConfigurationRowQuery) OnlyIDX

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

func (*ConfigurationRowQuery) OnlyX

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

func (*ConfigurationRowQuery) Order

Order specifies how the records should be ordered.

func (*ConfigurationRowQuery) QueryParent

func (crq *ConfigurationRowQuery) QueryParent() *ConfigurationQuery

QueryParent chains the current query on the "parent" edge.

func (*ConfigurationRowQuery) Select

func (crq *ConfigurationRowQuery) Select(fields ...string) *ConfigurationRowSelect

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 {
	BranchID keboola.BranchID `json:"branchID,omitempty"`
}

client.ConfigurationRow.Query().
	Select(configurationrow.FieldBranchID).
	Scan(ctx, &v)

func (*ConfigurationRowQuery) Unique

func (crq *ConfigurationRowQuery) Unique(unique bool) *ConfigurationRowQuery

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

func (*ConfigurationRowQuery) Where

Where adds a new predicate for the ConfigurationRowQuery builder.

func (*ConfigurationRowQuery) WithParent

func (crq *ConfigurationRowQuery) WithParent(opts ...func(*ConfigurationQuery)) *ConfigurationRowQuery

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

type ConfigurationRowSelect

type ConfigurationRowSelect struct {
	*ConfigurationRowQuery
	// contains filtered or unexported fields
}

ConfigurationRowSelect is the builder for selecting fields of ConfigurationRow entities.

func (*ConfigurationRowSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ConfigurationRowSelect) Bool

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

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

func (*ConfigurationRowSelect) BoolX

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

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

func (*ConfigurationRowSelect) Bools

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

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

func (*ConfigurationRowSelect) BoolsX

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

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

func (*ConfigurationRowSelect) Float64

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

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

func (*ConfigurationRowSelect) Float64X

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

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

func (*ConfigurationRowSelect) Float64s

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

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

func (*ConfigurationRowSelect) Float64sX

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

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

func (*ConfigurationRowSelect) Int

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

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

func (*ConfigurationRowSelect) IntX

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

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

func (*ConfigurationRowSelect) Ints

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

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

func (*ConfigurationRowSelect) IntsX

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

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

func (*ConfigurationRowSelect) Scan

func (crs *ConfigurationRowSelect) Scan(ctx context.Context, v any) error

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

func (*ConfigurationRowSelect) ScanX

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

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

func (*ConfigurationRowSelect) String

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

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

func (*ConfigurationRowSelect) StringX

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

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

func (*ConfigurationRowSelect) Strings

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

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

func (*ConfigurationRowSelect) StringsX

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

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

type ConfigurationRowUpdate

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

ConfigurationRowUpdate is the builder for updating ConfigurationRow entities.

func (*ConfigurationRowUpdate) Exec

Exec executes the query.

func (*ConfigurationRowUpdate) ExecX

func (cru *ConfigurationRowUpdate) ExecX(ctx context.Context)

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

func (*ConfigurationRowUpdate) Mutation

Mutation returns the ConfigurationRowMutation object of the builder.

func (*ConfigurationRowUpdate) Save

func (cru *ConfigurationRowUpdate) Save(ctx context.Context) (int, error)

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

func (*ConfigurationRowUpdate) SaveX

func (cru *ConfigurationRowUpdate) SaveX(ctx context.Context) int

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

func (*ConfigurationRowUpdate) SetContent

SetContent sets the "content" field.

func (*ConfigurationRowUpdate) SetDescription

func (cru *ConfigurationRowUpdate) SetDescription(s string) *ConfigurationRowUpdate

SetDescription sets the "description" field.

func (*ConfigurationRowUpdate) SetIsDisabled

func (cru *ConfigurationRowUpdate) SetIsDisabled(b bool) *ConfigurationRowUpdate

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationRowUpdate) SetName

SetName sets the "name" field.

func (*ConfigurationRowUpdate) SetNillableDescription

func (cru *ConfigurationRowUpdate) SetNillableDescription(s *string) *ConfigurationRowUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ConfigurationRowUpdate) SetNillableIsDisabled

func (cru *ConfigurationRowUpdate) SetNillableIsDisabled(b *bool) *ConfigurationRowUpdate

SetNillableIsDisabled sets the "isDisabled" field if the given value is not nil.

func (*ConfigurationRowUpdate) SetNillableName

func (cru *ConfigurationRowUpdate) SetNillableName(s *string) *ConfigurationRowUpdate

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

func (*ConfigurationRowUpdate) Where

Where appends a list predicates to the ConfigurationRowUpdate builder.

type ConfigurationRowUpdateOne

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

ConfigurationRowUpdateOne is the builder for updating a single ConfigurationRow entity.

func (*ConfigurationRowUpdateOne) Exec

Exec executes the query on the entity.

func (*ConfigurationRowUpdateOne) ExecX

func (cruo *ConfigurationRowUpdateOne) ExecX(ctx context.Context)

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

func (*ConfigurationRowUpdateOne) Mutation

Mutation returns the ConfigurationRowMutation object of the builder.

func (*ConfigurationRowUpdateOne) Save

Save executes the query and returns the updated ConfigurationRow entity.

func (*ConfigurationRowUpdateOne) SaveX

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

func (*ConfigurationRowUpdateOne) Select

func (cruo *ConfigurationRowUpdateOne) Select(field string, fields ...string) *ConfigurationRowUpdateOne

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

func (*ConfigurationRowUpdateOne) SetContent

SetContent sets the "content" field.

func (*ConfigurationRowUpdateOne) SetDescription

SetDescription sets the "description" field.

func (*ConfigurationRowUpdateOne) SetIsDisabled

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationRowUpdateOne) SetName

SetName sets the "name" field.

func (*ConfigurationRowUpdateOne) SetNillableDescription

func (cruo *ConfigurationRowUpdateOne) SetNillableDescription(s *string) *ConfigurationRowUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ConfigurationRowUpdateOne) SetNillableIsDisabled

func (cruo *ConfigurationRowUpdateOne) SetNillableIsDisabled(b *bool) *ConfigurationRowUpdateOne

SetNillableIsDisabled sets the "isDisabled" field if the given value is not nil.

func (*ConfigurationRowUpdateOne) SetNillableName

func (cruo *ConfigurationRowUpdateOne) SetNillableName(s *string) *ConfigurationRowUpdateOne

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

func (*ConfigurationRowUpdateOne) Where

Where appends a list predicates to the ConfigurationRowUpdate builder.

type ConfigurationRows

type ConfigurationRows []*ConfigurationRow

ConfigurationRows is a parsable slice of ConfigurationRow.

type ConfigurationSelect

type ConfigurationSelect struct {
	*ConfigurationQuery
	// contains filtered or unexported fields
}

ConfigurationSelect is the builder for selecting fields of Configuration entities.

func (*ConfigurationSelect) Aggregate

func (cs *ConfigurationSelect) Aggregate(fns ...AggregateFunc) *ConfigurationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ConfigurationSelect) Bool

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

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

func (*ConfigurationSelect) BoolX

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

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

func (*ConfigurationSelect) Bools

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

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

func (*ConfigurationSelect) BoolsX

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

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

func (*ConfigurationSelect) Float64

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

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

func (*ConfigurationSelect) Float64X

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

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

func (*ConfigurationSelect) Float64s

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

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

func (*ConfigurationSelect) Float64sX

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

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

func (*ConfigurationSelect) Int

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

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

func (*ConfigurationSelect) IntX

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

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

func (*ConfigurationSelect) Ints

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

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

func (*ConfigurationSelect) IntsX

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

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

func (*ConfigurationSelect) Scan

func (cs *ConfigurationSelect) Scan(ctx context.Context, v any) error

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

func (*ConfigurationSelect) ScanX

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

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

func (*ConfigurationSelect) String

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

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

func (*ConfigurationSelect) StringX

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

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

func (*ConfigurationSelect) Strings

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

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

func (*ConfigurationSelect) StringsX

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

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

type ConfigurationUpdate

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

ConfigurationUpdate is the builder for updating Configuration entities.

func (*ConfigurationUpdate) Exec

func (cu *ConfigurationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConfigurationUpdate) ExecX

func (cu *ConfigurationUpdate) ExecX(ctx context.Context)

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

func (*ConfigurationUpdate) Mutation

Mutation returns the ConfigurationMutation object of the builder.

func (*ConfigurationUpdate) Save

func (cu *ConfigurationUpdate) Save(ctx context.Context) (int, error)

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

func (*ConfigurationUpdate) SaveX

func (cu *ConfigurationUpdate) SaveX(ctx context.Context) int

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

func (*ConfigurationUpdate) SetContent

SetContent sets the "content" field.

func (*ConfigurationUpdate) SetDescription

func (cu *ConfigurationUpdate) SetDescription(s string) *ConfigurationUpdate

SetDescription sets the "description" field.

func (*ConfigurationUpdate) SetIsDisabled

func (cu *ConfigurationUpdate) SetIsDisabled(b bool) *ConfigurationUpdate

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationUpdate) SetName

SetName sets the "name" field.

func (*ConfigurationUpdate) SetNillableDescription

func (cu *ConfigurationUpdate) SetNillableDescription(s *string) *ConfigurationUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ConfigurationUpdate) SetNillableIsDisabled

func (cu *ConfigurationUpdate) SetNillableIsDisabled(b *bool) *ConfigurationUpdate

SetNillableIsDisabled sets the "isDisabled" field if the given value is not nil.

func (*ConfigurationUpdate) SetNillableName

func (cu *ConfigurationUpdate) SetNillableName(s *string) *ConfigurationUpdate

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

func (*ConfigurationUpdate) Where

Where appends a list predicates to the ConfigurationUpdate builder.

type ConfigurationUpdateOne

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

ConfigurationUpdateOne is the builder for updating a single Configuration entity.

func (*ConfigurationUpdateOne) Exec

Exec executes the query on the entity.

func (*ConfigurationUpdateOne) ExecX

func (cuo *ConfigurationUpdateOne) ExecX(ctx context.Context)

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

func (*ConfigurationUpdateOne) Mutation

Mutation returns the ConfigurationMutation object of the builder.

func (*ConfigurationUpdateOne) Save

Save executes the query and returns the updated Configuration entity.

func (*ConfigurationUpdateOne) SaveX

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

func (*ConfigurationUpdateOne) Select

func (cuo *ConfigurationUpdateOne) Select(field string, fields ...string) *ConfigurationUpdateOne

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

func (*ConfigurationUpdateOne) SetContent

SetContent sets the "content" field.

func (*ConfigurationUpdateOne) SetDescription

func (cuo *ConfigurationUpdateOne) SetDescription(s string) *ConfigurationUpdateOne

SetDescription sets the "description" field.

func (*ConfigurationUpdateOne) SetIsDisabled

func (cuo *ConfigurationUpdateOne) SetIsDisabled(b bool) *ConfigurationUpdateOne

SetIsDisabled sets the "isDisabled" field.

func (*ConfigurationUpdateOne) SetName

SetName sets the "name" field.

func (*ConfigurationUpdateOne) SetNillableDescription

func (cuo *ConfigurationUpdateOne) SetNillableDescription(s *string) *ConfigurationUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*ConfigurationUpdateOne) SetNillableIsDisabled

func (cuo *ConfigurationUpdateOne) SetNillableIsDisabled(b *bool) *ConfigurationUpdateOne

SetNillableIsDisabled sets the "isDisabled" field if the given value is not nil.

func (*ConfigurationUpdateOne) SetNillableName

func (cuo *ConfigurationUpdateOne) SetNillableName(s *string) *ConfigurationUpdateOne

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

func (*ConfigurationUpdateOne) Where

Where appends a list predicates to the ConfigurationUpdate builder.

type Configurations

type Configurations []*Configuration

Configurations is a parsable slice of Configuration.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// Branch is the client for interacting with the Branch builders.
	Branch *BranchClient
	// Configuration is the client for interacting with the Configuration builders.
	Configuration *ConfigurationClient
	// ConfigurationRow is the client for interacting with the ConfigurationRow builders.
	ConfigurationRow *ConfigurationRowClient
	// 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 or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL