ent: github.com/facebookincubator/ent/entc/integration/ent Index | Files | Directories

package ent

import "github.com/facebookincubator/ent/entc/integration/ent"

Index

Package Files

card.go card_create.go card_delete.go card_query.go card_update.go client.go comment.go comment_create.go comment_delete.go comment_query.go comment_update.go config.go context.go ent.go fieldtype.go fieldtype_create.go fieldtype_delete.go fieldtype_query.go fieldtype_update.go file.go file_create.go file_delete.go file_query.go file_update.go filetype.go filetype_create.go filetype_delete.go filetype_query.go filetype_update.go generate.go group.go group_create.go group_delete.go group_query.go group_update.go groupinfo.go groupinfo_create.go groupinfo_delete.go groupinfo_query.go groupinfo_update.go item.go item_create.go item_delete.go item_query.go item_update.go mutation.go node.go node_create.go node_delete.go node_query.go node_update.go pet.go pet_create.go pet_delete.go pet_query.go pet_update.go runtime.go spec.go spec_create.go spec_delete.go spec_query.go spec_update.go tx.go user.go user_create.go user_delete.go user_query.go user_update.go

Constants

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

    // Node types.
    TypeCard      = "Card"
    TypeComment   = "Comment"
    TypeFieldType = "FieldType"
    TypeFile      = "File"
    TypeFileType  = "FileType"
    TypeGroup     = "Group"
    TypeGroupInfo = "GroupInfo"
    TypeItem      = "Item"
    TypeNode      = "Node"
    TypePet       = "Pet"
    TypeSpec      = "Spec"
    TypeUser      = "User"
)

func IsConstraintError Uses

func IsConstraintError(err error) bool

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

func IsNotFound Uses

func IsNotFound(err error) bool

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

func IsNotLoaded Uses

func IsNotLoaded(err error) bool

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

func IsNotSingular Uses

func IsNotSingular(err error) bool

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

func IsValidationError Uses

func IsValidationError(err error) bool

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

func MaskNotFound Uses

func MaskNotFound(err error) error

MaskNotFound masks nor found error.

func NewContext Uses

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

NewContext returns a new context with the given Client attached.

func NewTxContext Uses

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

NewTxContext returns a new context with the given Client attached.

type AggregateFunc Uses

type AggregateFunc func(*sql.Selector) string

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

func As Uses

func As(fn AggregateFunc, end string) AggregateFunc

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

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

func Count Uses

func Count() AggregateFunc

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

func Max Uses

func Max(field string) AggregateFunc

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

func Mean Uses

func Mean(field string) AggregateFunc

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

func Min Uses

func Min(field string) AggregateFunc

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

func Sum Uses

func Sum(field string) AggregateFunc

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

type Card Uses

type Card struct {

    // ID of the ent.
    ID  int `json:"id,omitempty"`
    // CreateTime holds the value of the "create_time" field.
    CreateTime time.Time `json:"create_time,omitempty"`
    // UpdateTime holds the value of the "update_time" field.
    UpdateTime time.Time `json:"update_time,omitempty"`
    // Number holds the value of the "number" field.
    Number string `json:"number,omitempty"`
    // Name holds the value of the "name" field.
    Name string `json:"name,omitempty"`
    // Edges holds the relations/edges for other nodes in the graph.
    // The values are being populated by the CardQuery when eager-loading is set.
    Edges CardEdges `json:"edges"`

    // StaticField defined by templates.
    StaticField string `json:"boring,omitempty"`
    // contains filtered or unexported fields
}

Card is the model entity for the Card schema.

func (*Card) QueryOwner Uses

func (c *Card) QueryOwner() *UserQuery

QueryOwner queries the owner edge of the Card.

func (*Card) QuerySpec Uses

func (c *Card) QuerySpec() *SpecQuery

QuerySpec queries the spec edge of the Card.

func (*Card) String Uses

func (c *Card) String() string

String implements the fmt.Stringer.

func (*Card) Unwrap Uses

func (c *Card) Unwrap() *Card

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

func (*Card) Update Uses

func (c *Card) Update() *CardUpdateOne

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

type CardClient Uses

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

CardClient is a client for the Card schema.

func NewCardClient Uses

func NewCardClient(c config) *CardClient

NewCardClient returns a client for the Card from the given config.

func (*CardClient) Create Uses

func (c *CardClient) Create() *CardCreate

Create returns a create builder for Card.

func (*CardClient) Delete Uses

func (c *CardClient) Delete() *CardDelete

Delete returns a delete builder for Card.

func (*CardClient) DeleteOne Uses

func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*CardClient) DeleteOneID Uses

func (c *CardClient) DeleteOneID(id int) *CardDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*CardClient) Get Uses

func (c *CardClient) Get(ctx context.Context, id int) (*Card, error)

Get returns a Card entity by its id.

func (*CardClient) GetX Uses

func (c *CardClient) GetX(ctx context.Context, id int) *Card

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

func (*CardClient) Hooks Uses

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

Hooks returns the client hooks.

func (*CardClient) Query Uses

func (c *CardClient) Query() *CardQuery

Create returns a query builder for Card.

func (*CardClient) QueryOwner Uses

func (c *CardClient) QueryOwner(ca *Card) *UserQuery

QueryOwner queries the owner edge of a Card.

func (*CardClient) QuerySpec Uses

func (c *CardClient) QuerySpec(ca *Card) *SpecQuery

QuerySpec queries the spec edge of a Card.

func (*CardClient) Update Uses

func (c *CardClient) Update() *CardUpdate

Update returns an update builder for Card.

func (*CardClient) UpdateOne Uses

func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CardClient) UpdateOneID Uses

func (c *CardClient) UpdateOneID(id int) *CardUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CardClient) Use Uses

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

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

type CardCreate Uses

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

CardCreate is the builder for creating a Card entity.

func (*CardCreate) AddSpec Uses

func (cc *CardCreate) AddSpec(s ...*Spec) *CardCreate

AddSpec adds the spec edges to Spec.

func (*CardCreate) AddSpecIDs Uses

func (cc *CardCreate) AddSpecIDs(ids ...int) *CardCreate

AddSpecIDs adds the spec edge to Spec by ids.

func (*CardCreate) Mutation Uses

func (cc *CardCreate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardCreate) Save Uses

func (cc *CardCreate) Save(ctx context.Context) (*Card, error)

Save creates the Card in the database.

func (*CardCreate) SaveX Uses

func (cc *CardCreate) SaveX(ctx context.Context) *Card

SaveX calls Save and panics if Save returns an error.

func (*CardCreate) SetCreateTime Uses

func (cc *CardCreate) SetCreateTime(t time.Time) *CardCreate

SetCreateTime sets the create_time field.

func (*CardCreate) SetName Uses

func (cc *CardCreate) SetName(s string) *CardCreate

SetName sets the name field.

func (*CardCreate) SetNillableCreateTime Uses

func (cc *CardCreate) SetNillableCreateTime(t *time.Time) *CardCreate

SetNillableCreateTime sets the create_time field if the given value is not nil.

func (*CardCreate) SetNillableName Uses

func (cc *CardCreate) SetNillableName(s *string) *CardCreate

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

func (*CardCreate) SetNillableOwnerID Uses

func (cc *CardCreate) SetNillableOwnerID(id *int) *CardCreate

SetNillableOwnerID sets the owner edge to User by id if the given value is not nil.

func (*CardCreate) SetNillableUpdateTime Uses

func (cc *CardCreate) SetNillableUpdateTime(t *time.Time) *CardCreate

SetNillableUpdateTime sets the update_time field if the given value is not nil.

func (*CardCreate) SetNumber Uses

func (cc *CardCreate) SetNumber(s string) *CardCreate

SetNumber sets the number field.

func (*CardCreate) SetOwner Uses

func (cc *CardCreate) SetOwner(u *User) *CardCreate

SetOwner sets the owner edge to User.

func (*CardCreate) SetOwnerID Uses

func (cc *CardCreate) SetOwnerID(id int) *CardCreate

SetOwnerID sets the owner edge to User by id.

func (*CardCreate) SetUpdateTime Uses

func (cc *CardCreate) SetUpdateTime(t time.Time) *CardCreate

SetUpdateTime sets the update_time field.

type CardDelete Uses

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

CardDelete is the builder for deleting a Card entity.

func (*CardDelete) Exec Uses

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

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

func (*CardDelete) ExecX Uses

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

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

func (*CardDelete) Where Uses

func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete

Where adds a new predicate to the delete builder.

type CardDeleteOne Uses

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

CardDeleteOne is the builder for deleting a single Card entity.

func (*CardDeleteOne) Exec Uses

func (cdo *CardDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CardDeleteOne) ExecX Uses

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

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

type CardEdges Uses

type CardEdges struct {
    // Owner holds the value of the owner edge.
    Owner *User
    // Spec holds the value of the spec edge.
    Spec []*Spec
    // contains filtered or unexported fields
}

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

func (CardEdges) OwnerOrErr Uses

func (e CardEdges) OwnerOrErr() (*User, error)

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

func (CardEdges) SpecOrErr Uses

func (e CardEdges) SpecOrErr() ([]*Spec, error)

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

type CardGroupBy Uses

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

CardGroupBy is the builder for group-by Card entities.

func (*CardGroupBy) Aggregate Uses

func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy

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

func (*CardGroupBy) Bools Uses

func (cgb *CardGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*CardGroupBy) BoolsX Uses

func (cgb *CardGroupBy) BoolsX(ctx context.Context) []bool

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

func (*CardGroupBy) Float64s Uses

func (cgb *CardGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*CardGroupBy) Float64sX Uses

func (cgb *CardGroupBy) Float64sX(ctx context.Context) []float64

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

func (*CardGroupBy) Ints Uses

func (cgb *CardGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*CardGroupBy) IntsX Uses

func (cgb *CardGroupBy) IntsX(ctx context.Context) []int

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

func (*CardGroupBy) Scan Uses

func (cgb *CardGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*CardGroupBy) ScanX Uses

func (cgb *CardGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*CardGroupBy) Strings Uses

func (cgb *CardGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*CardGroupBy) StringsX Uses

func (cgb *CardGroupBy) StringsX(ctx context.Context) []string

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

type CardMutation Uses

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

CardMutation represents an operation that mutate the Cards nodes in the graph.

func (*CardMutation) AddField Uses

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

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

func (*CardMutation) AddSpecIDs Uses

func (m *CardMutation) AddSpecIDs(ids ...int)

AddSpecIDs adds the spec edge to Spec by ids.

func (*CardMutation) AddedEdges Uses

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

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

func (*CardMutation) AddedField Uses

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

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*CardMutation) AddedFields Uses

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

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

func (*CardMutation) AddedIDs Uses

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*CardMutation) ClearEdge Uses

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

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

func (*CardMutation) ClearField Uses

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

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

func (*CardMutation) ClearName Uses

func (m *CardMutation) ClearName()

ClearName clears the value of name.

func (*CardMutation) ClearOwner Uses

func (m *CardMutation) ClearOwner()

ClearOwner clears the owner edge to User.

func (*CardMutation) ClearedEdges Uses

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

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

func (*CardMutation) ClearedFields Uses

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

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

func (CardMutation) Client Uses

func (m CardMutation) Client() *Client

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

func (*CardMutation) CreateTime Uses

func (m *CardMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the create_time value in the mutation.

func (*CardMutation) EdgeCleared Uses

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*CardMutation) Field Uses

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

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

func (*CardMutation) FieldCleared Uses

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*CardMutation) Fields Uses

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

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

func (*CardMutation) ID Uses

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

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

func (*CardMutation) Name Uses

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

Name returns the name value in the mutation.

func (*CardMutation) NameCleared Uses

func (m *CardMutation) NameCleared() bool

NameCleared returns if the field name was cleared in this mutation.

func (*CardMutation) Number Uses

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

Number returns the number value in the mutation.

func (*CardMutation) OldCreateTime Uses

func (m *CardMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old create_time value of the Card. If the Card object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*CardMutation) OldField Uses

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

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

func (*CardMutation) OldName Uses

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

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

func (*CardMutation) OldNumber Uses

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

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

func (*CardMutation) OldUpdateTime Uses

func (m *CardMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old update_time value of the Card. If the Card object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*CardMutation) Op Uses

func (m *CardMutation) Op() Op

Op returns the operation name.

func (*CardMutation) OwnerCleared Uses

func (m *CardMutation) OwnerCleared() bool

OwnerCleared returns if the edge owner was cleared.

func (*CardMutation) OwnerID Uses

func (m *CardMutation) OwnerID() (id int, exists bool)

OwnerID returns the owner id in the mutation.

func (*CardMutation) OwnerIDs Uses

func (m *CardMutation) OwnerIDs() (ids []int)

OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*CardMutation) RemoveSpecIDs Uses

func (m *CardMutation) RemoveSpecIDs(ids ...int)

RemoveSpecIDs removes the spec edge to Spec by ids.

func (*CardMutation) RemovedEdges Uses

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

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

func (*CardMutation) RemovedIDs Uses

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

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*CardMutation) RemovedSpecIDs Uses

func (m *CardMutation) RemovedSpecIDs() (ids []int)

RemovedSpec returns the removed ids of spec.

func (*CardMutation) ResetCreateTime Uses

func (m *CardMutation) ResetCreateTime()

ResetCreateTime reset all changes of the "create_time" field.

func (*CardMutation) ResetEdge Uses

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

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

func (*CardMutation) ResetField Uses

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

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

func (*CardMutation) ResetName Uses

func (m *CardMutation) ResetName()

ResetName reset all changes of the "name" field.

func (*CardMutation) ResetNumber Uses

func (m *CardMutation) ResetNumber()

ResetNumber reset all changes of the "number" field.

func (*CardMutation) ResetOwner Uses

func (m *CardMutation) ResetOwner()

ResetOwner reset all changes of the "owner" edge.

func (*CardMutation) ResetSpec Uses

func (m *CardMutation) ResetSpec()

ResetSpec reset all changes of the "spec" edge.

func (*CardMutation) ResetUpdateTime Uses

func (m *CardMutation) ResetUpdateTime()

ResetUpdateTime reset all changes of the "update_time" field.

func (*CardMutation) SetCreateTime Uses

func (m *CardMutation) SetCreateTime(t time.Time)

SetCreateTime sets the create_time field.

func (*CardMutation) SetField Uses

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

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*CardMutation) SetName Uses

func (m *CardMutation) SetName(s string)

SetName sets the name field.

func (*CardMutation) SetNumber Uses

func (m *CardMutation) SetNumber(s string)

SetNumber sets the number field.

func (*CardMutation) SetOwnerID Uses

func (m *CardMutation) SetOwnerID(id int)

SetOwnerID sets the owner edge to User by id.

func (*CardMutation) SetUpdateTime Uses

func (m *CardMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the update_time field.

func (*CardMutation) SpecIDs Uses

func (m *CardMutation) SpecIDs() (ids []int)

SpecIDs returns the spec ids in the mutation.

func (CardMutation) Tx Uses

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

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

func (*CardMutation) Type Uses

func (m *CardMutation) Type() string

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

func (*CardMutation) UpdateTime Uses

func (m *CardMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the update_time value in the mutation.

type CardQuery Uses

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

CardQuery is the builder for querying Card entities.

func (*CardQuery) All Uses

func (cq *CardQuery) All(ctx context.Context) ([]*Card, error)

All executes the query and returns a list of Cards.

func (*CardQuery) AllX Uses

func (cq *CardQuery) AllX(ctx context.Context) []*Card

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

func (*CardQuery) Clone Uses

func (cq *CardQuery) Clone() *CardQuery

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

func (*CardQuery) Count Uses

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

Count returns the count of the given query.

func (*CardQuery) CountX Uses

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

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

func (*CardQuery) Exist Uses

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

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

func (*CardQuery) ExistX Uses

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

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

func (*CardQuery) First Uses

func (cq *CardQuery) First(ctx context.Context) (*Card, error)

First returns the first Card entity in the query. Returns *NotFoundError when no card was found.

func (*CardQuery) FirstID Uses

func (cq *CardQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Card id in the query. Returns *NotFoundError when no id was found.

func (*CardQuery) FirstX Uses

func (cq *CardQuery) FirstX(ctx context.Context) *Card

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

func (*CardQuery) FirstXID Uses

func (cq *CardQuery) FirstXID(ctx context.Context) int

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

func (*CardQuery) GroupBy Uses

func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy

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

client.Card.Query().
	GroupBy(card.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CardQuery) IDs Uses

func (cq *CardQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Card ids.

func (*CardQuery) IDsX Uses

func (cq *CardQuery) IDsX(ctx context.Context) []int

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

func (*CardQuery) Limit Uses

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

Limit adds a limit step to the query.

func (*CardQuery) Offset Uses

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

Offset adds an offset step to the query.

func (*CardQuery) Only Uses

func (cq *CardQuery) Only(ctx context.Context) (*Card, error)

Only returns the only Card entity in the query, returns an error if not exactly one entity was returned.

func (*CardQuery) OnlyID Uses

func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID returns the only Card id in the query, returns an error if not exactly one id was returned.

func (*CardQuery) OnlyX Uses

func (cq *CardQuery) OnlyX(ctx context.Context) *Card

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

func (*CardQuery) OnlyXID Uses

func (cq *CardQuery) OnlyXID(ctx context.Context) int

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

func (*CardQuery) Order Uses

func (cq *CardQuery) Order(o ...OrderFunc) *CardQuery

Order adds an order step to the query.

func (*CardQuery) QueryOwner Uses

func (cq *CardQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the owner edge.

func (*CardQuery) QuerySpec Uses

func (cq *CardQuery) QuerySpec() *SpecQuery

QuerySpec chains the current query on the spec edge.

func (*CardQuery) Select Uses

func (cq *CardQuery) Select(field string, fields ...string) *CardSelect

Select one or more fields from the given query.

Example:

var v []struct {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Card.Query().
	Select(card.FieldCreateTime).
	Scan(ctx, &v)

func (*CardQuery) Where Uses

func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery

Where adds a new predicate for the builder.

func (*CardQuery) WithOwner Uses

func (cq *CardQuery) WithOwner(opts ...func(*UserQuery)) *CardQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to

the "owner" edge. The optional arguments used to configure the query builder of the edge.

func (*CardQuery) WithSpec Uses

func (cq *CardQuery) WithSpec(opts ...func(*SpecQuery)) *CardQuery
WithSpec tells the query-builder to eager-loads the nodes that are connected to

the "spec" edge. The optional arguments used to configure the query builder of the edge.

type CardSelect Uses

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

CardSelect is the builder for select fields of Card entities.

func (*CardSelect) Bools Uses

func (cs *CardSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*CardSelect) BoolsX Uses

func (cs *CardSelect) BoolsX(ctx context.Context) []bool

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

func (*CardSelect) Float64s Uses

func (cs *CardSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*CardSelect) Float64sX Uses

func (cs *CardSelect) Float64sX(ctx context.Context) []float64

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

func (*CardSelect) Ints Uses

func (cs *CardSelect) Ints(ctx context.Context) ([]int, error)

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

func (*CardSelect) IntsX Uses

func (cs *CardSelect) IntsX(ctx context.Context) []int

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

func (*CardSelect) Scan Uses

func (cs *CardSelect) Scan(ctx context.Context, v interface{}) error

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

func (*CardSelect) ScanX Uses

func (cs *CardSelect) ScanX(ctx context.Context, v interface{})

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

func (*CardSelect) Strings Uses

func (cs *CardSelect) Strings(ctx context.Context) ([]string, error)

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

func (*CardSelect) StringsX Uses

func (cs *CardSelect) StringsX(ctx context.Context) []string

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

type CardUpdate Uses

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

CardUpdate is the builder for updating Card entities.

func (*CardUpdate) AddSpec Uses

func (cu *CardUpdate) AddSpec(s ...*Spec) *CardUpdate

AddSpec adds the spec edges to Spec.

func (*CardUpdate) AddSpecIDs Uses

func (cu *CardUpdate) AddSpecIDs(ids ...int) *CardUpdate

AddSpecIDs adds the spec edge to Spec by ids.

func (*CardUpdate) ClearName Uses

func (cu *CardUpdate) ClearName() *CardUpdate

ClearName clears the value of name.

func (*CardUpdate) ClearOwner Uses

func (cu *CardUpdate) ClearOwner() *CardUpdate

ClearOwner clears the owner edge to User.

func (*CardUpdate) Exec Uses

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

Exec executes the query.

func (*CardUpdate) ExecX Uses

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

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

func (*CardUpdate) Mutation Uses

func (cu *CardUpdate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdate) RemoveSpec Uses

func (cu *CardUpdate) RemoveSpec(s ...*Spec) *CardUpdate

RemoveSpec removes spec edges to Spec.

func (*CardUpdate) RemoveSpecIDs Uses

func (cu *CardUpdate) RemoveSpecIDs(ids ...int) *CardUpdate

RemoveSpecIDs removes the spec edge to Spec by ids.

func (*CardUpdate) Save Uses

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

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*CardUpdate) SaveX Uses

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

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

func (*CardUpdate) SetName Uses

func (cu *CardUpdate) SetName(s string) *CardUpdate

SetName sets the name field.

func (*CardUpdate) SetNillableName Uses

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

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

func (*CardUpdate) SetNillableOwnerID Uses

func (cu *CardUpdate) SetNillableOwnerID(id *int) *CardUpdate

SetNillableOwnerID sets the owner edge to User by id if the given value is not nil.

func (*CardUpdate) SetOwner Uses

func (cu *CardUpdate) SetOwner(u *User) *CardUpdate

SetOwner sets the owner edge to User.

func (*CardUpdate) SetOwnerID Uses

func (cu *CardUpdate) SetOwnerID(id int) *CardUpdate

SetOwnerID sets the owner edge to User by id.

func (*CardUpdate) Where Uses

func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate

Where adds a new predicate for the builder.

type CardUpdateOne Uses

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

CardUpdateOne is the builder for updating a single Card entity.

func (*CardUpdateOne) AddSpec Uses

func (cuo *CardUpdateOne) AddSpec(s ...*Spec) *CardUpdateOne

AddSpec adds the spec edges to Spec.

func (*CardUpdateOne) AddSpecIDs Uses

func (cuo *CardUpdateOne) AddSpecIDs(ids ...int) *CardUpdateOne

AddSpecIDs adds the spec edge to Spec by ids.

func (*CardUpdateOne) ClearName Uses

func (cuo *CardUpdateOne) ClearName() *CardUpdateOne

ClearName clears the value of name.

func (*CardUpdateOne) ClearOwner Uses

func (cuo *CardUpdateOne) ClearOwner() *CardUpdateOne

ClearOwner clears the owner edge to User.

func (*CardUpdateOne) Exec Uses

func (cuo *CardUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CardUpdateOne) ExecX Uses

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

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

func (*CardUpdateOne) Mutation Uses

func (cuo *CardUpdateOne) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdateOne) RemoveSpec Uses

func (cuo *CardUpdateOne) RemoveSpec(s ...*Spec) *CardUpdateOne

RemoveSpec removes spec edges to Spec.

func (*CardUpdateOne) RemoveSpecIDs Uses

func (cuo *CardUpdateOne) RemoveSpecIDs(ids ...int) *CardUpdateOne

RemoveSpecIDs removes the spec edge to Spec by ids.

func (*CardUpdateOne) Save Uses

func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)

Save executes the query and returns the updated entity.

func (*CardUpdateOne) SaveX Uses

func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card

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

func (*CardUpdateOne) SetName Uses

func (cuo *CardUpdateOne) SetName(s string) *CardUpdateOne

SetName sets the name field.

func (*CardUpdateOne) SetNillableName Uses

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

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

func (*CardUpdateOne) SetNillableOwnerID Uses

func (cuo *CardUpdateOne) SetNillableOwnerID(id *int) *CardUpdateOne

SetNillableOwnerID sets the owner edge to User by id if the given value is not nil.

func (*CardUpdateOne) SetOwner Uses

func (cuo *CardUpdateOne) SetOwner(u *User) *CardUpdateOne

SetOwner sets the owner edge to User.

func (*CardUpdateOne) SetOwnerID Uses

func (cuo *CardUpdateOne) SetOwnerID(id int) *CardUpdateOne

SetOwnerID sets the owner edge to User by id.

type Cards Uses

type Cards []*Card

Cards is a parsable slice of Card.

type Client Uses

type Client struct {

    // Schema is the client for creating, migrating and dropping schema.
    Schema *migrate.Schema
    // Card is the client for interacting with the Card builders.
    Card *CardClient
    // Comment is the client for interacting with the Comment builders.
    Comment *CommentClient
    // FieldType is the client for interacting with the FieldType builders.
    FieldType *FieldTypeClient
    // File is the client for interacting with the File builders.
    File *FileClient
    // FileType is the client for interacting with the FileType builders.
    FileType *FileTypeClient
    // Group is the client for interacting with the Group builders.
    Group *GroupClient
    // GroupInfo is the client for interacting with the GroupInfo builders.
    GroupInfo *GroupInfoClient
    // Item is the client for interacting with the Item builders.
    Item *ItemClient
    // Node is the client for interacting with the Node builders.
    Node *NodeClient
    // Pet is the client for interacting with the Pet builders.
    Pet *PetClient
    // Spec is the client for interacting with the Spec builders.
    Spec *SpecClient
    // User is the client for interacting with the User builders.
    User *UserClient
    // contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext Uses

func FromContext(ctx context.Context) *Client

FromContext returns the Client stored in a context, or nil if there isn't one.

func NewClient Uses

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open Uses

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 Uses

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with options.

func (*Client) Close Uses

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug Uses

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Card.
	Query().
	Count(ctx)

func (*Client) Tx Uses

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

Tx returns a new transactional client.

func (*Client) Use Uses

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 Comment Uses

type Comment struct {

    // ID of the ent.
    ID  int `json:"id,omitempty"`
    // UniqueInt holds the value of the "unique_int" field.
    UniqueInt int `json:"unique_int,omitempty"`
    // UniqueFloat holds the value of the "unique_float" field.
    UniqueFloat float64 `json:"unique_float,omitempty"`
    // NillableInt holds the value of the "nillable_int" field.
    NillableInt *int `json:"nillable_int,omitempty"`
    // contains filtered or unexported fields
}

Comment is the model entity for the Comment schema.

func (*Comment) String Uses

func (c *Comment) String() string

String implements the fmt.Stringer.

func (*Comment) Unwrap Uses

func (c *Comment) Unwrap() *Comment

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

func (*Comment) Update Uses

func (c *Comment) Update() *CommentUpdateOne

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

type CommentClient Uses

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

CommentClient is a client for the Comment schema.

func NewCommentClient Uses

func NewCommentClient(c config) *CommentClient

NewCommentClient returns a client for the Comment from the given config.

func (*CommentClient) Create Uses

func (c *CommentClient) Create() *CommentCreate

Create returns a create builder for Comment.

func (*CommentClient) Delete Uses

func (c *CommentClient) Delete() *CommentDelete

Delete returns a delete builder for Comment.

func (*CommentClient) DeleteOne Uses

func (c *CommentClient) DeleteOne(co *Comment) *CommentDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*CommentClient) DeleteOneID Uses

func (c *CommentClient) DeleteOneID(id int) *CommentDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*CommentClient) Get Uses

func (c *CommentClient) Get(ctx context.Context, id int) (*Comment, error)

Get returns a Comment entity by its id.

func (*CommentClient) GetX Uses

func (c *CommentClient) GetX(ctx context.Context, id int) *Comment

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

func (*CommentClient) Hooks Uses

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

Hooks returns the client hooks.

func (*CommentClient) Query Uses

func (c *CommentClient) Query() *CommentQuery

Create returns a query builder for Comment.

func (*CommentClient) Update Uses

func (c *CommentClient) Update() *CommentUpdate

Update returns an update builder for Comment.

func (*CommentClient) UpdateOne Uses

func (c *CommentClient) UpdateOne(co *Comment) *CommentUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CommentClient) UpdateOneID Uses

func (c *CommentClient) UpdateOneID(id int) *CommentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CommentClient) Use Uses

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

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

type CommentCreate Uses

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

CommentCreate is the builder for creating a Comment entity.

func (*CommentCreate) Mutation Uses

func (cc *CommentCreate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentCreate) Save Uses

func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error)

Save creates the Comment in the database.

func (*CommentCreate) SaveX Uses

func (cc *CommentCreate) SaveX(ctx context.Context) *Comment

SaveX calls Save and panics if Save returns an error.

func (*CommentCreate) SetNillableInt Uses

func (cc *CommentCreate) SetNillableInt(i int) *CommentCreate

SetNillableInt sets the nillable_int field.

func (*CommentCreate) SetNillableNillableInt Uses

func (cc *CommentCreate) SetNillableNillableInt(i *int) *CommentCreate

SetNillableNillableInt sets the nillable_int field if the given value is not nil.

func (*CommentCreate) SetUniqueFloat Uses

func (cc *CommentCreate) SetUniqueFloat(f float64) *CommentCreate

SetUniqueFloat sets the unique_float field.

func (*CommentCreate) SetUniqueInt Uses

func (cc *CommentCreate) SetUniqueInt(i int) *CommentCreate

SetUniqueInt sets the unique_int field.

type CommentDelete Uses

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

CommentDelete is the builder for deleting a Comment entity.

func (*CommentDelete) Exec Uses

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

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

func (*CommentDelete) ExecX Uses

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

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

func (*CommentDelete) Where Uses

func (cd *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete

Where adds a new predicate to the delete builder.

type CommentDeleteOne Uses

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

CommentDeleteOne is the builder for deleting a single Comment entity.

func (*CommentDeleteOne) Exec Uses

func (cdo *CommentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CommentDeleteOne) ExecX Uses

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

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

type CommentGroupBy Uses

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

CommentGroupBy is the builder for group-by Comment entities.

func (*CommentGroupBy) Aggregate Uses

func (cgb *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy

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

func (*CommentGroupBy) Bools Uses

func (cgb *CommentGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*CommentGroupBy) BoolsX Uses

func (cgb *CommentGroupBy) BoolsX(ctx context.Context) []bool

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

func (*CommentGroupBy) Float64s Uses

func (cgb *CommentGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*CommentGroupBy) Float64sX Uses

func (cgb *CommentGroupBy) Float64sX(ctx context.Context) []float64

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

func (*CommentGroupBy) Ints Uses

func (cgb *CommentGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*CommentGroupBy) IntsX Uses

func (cgb *CommentGroupBy) IntsX(ctx context.Context) []int

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

func (*CommentGroupBy) Scan Uses

func (cgb *CommentGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*CommentGroupBy) ScanX Uses

func (cgb *CommentGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*CommentGroupBy) Strings Uses

func (cgb *CommentGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*CommentGroupBy) StringsX Uses

func (cgb *CommentGroupBy) StringsX(ctx context.Context) []string

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

type CommentMutation Uses

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

CommentMutation represents an operation that mutate the Comments nodes in the graph.

func (*CommentMutation) AddField Uses

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

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

func (*CommentMutation) AddNillableInt Uses

func (m *CommentMutation) AddNillableInt(i int)

AddNillableInt adds i to nillable_int.

func (*CommentMutation) AddUniqueFloat Uses

func (m *CommentMutation) AddUniqueFloat(f float64)

AddUniqueFloat adds f to unique_float.

func (*CommentMutation) AddUniqueInt Uses

func (m *CommentMutation) AddUniqueInt(i int)

AddUniqueInt adds i to unique_int.

func (*CommentMutation) AddedEdges Uses

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

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

func (*CommentMutation) AddedField Uses

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

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*CommentMutation) AddedFields Uses

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

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

func (*CommentMutation) AddedIDs Uses

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*CommentMutation) AddedNillableInt Uses

func (m *CommentMutation) AddedNillableInt() (r int, exists bool)

AddedNillableInt returns the value that was added to the nillable_int field in this mutation.

func (*CommentMutation) AddedUniqueFloat Uses

func (m *CommentMutation) AddedUniqueFloat() (r float64, exists bool)

AddedUniqueFloat returns the value that was added to the unique_float field in this mutation.

func (*CommentMutation) AddedUniqueInt Uses

func (m *CommentMutation) AddedUniqueInt() (r int, exists bool)

AddedUniqueInt returns the value that was added to the unique_int field in this mutation.

func (*CommentMutation) ClearEdge Uses

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

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

func (*CommentMutation) ClearField Uses

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

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

func (*CommentMutation) ClearNillableInt Uses

func (m *CommentMutation) ClearNillableInt()

ClearNillableInt clears the value of nillable_int.

func (*CommentMutation) ClearedEdges Uses

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

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

func (*CommentMutation) ClearedFields Uses

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

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

func (CommentMutation) Client Uses

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

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*CommentMutation) Field Uses

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

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

func (*CommentMutation) FieldCleared Uses

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*CommentMutation) Fields Uses

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

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

func (*CommentMutation) ID Uses

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

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

func (*CommentMutation) NillableInt Uses

func (m *CommentMutation) NillableInt() (r int, exists bool)

NillableInt returns the nillable_int value in the mutation.

func (*CommentMutation) NillableIntCleared Uses

func (m *CommentMutation) NillableIntCleared() bool

NillableIntCleared returns if the field nillable_int was cleared in this mutation.

func (*CommentMutation) OldField Uses

func (m *CommentMutation) 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 was failed.

func (*CommentMutation) OldNillableInt Uses

func (m *CommentMutation) OldNillableInt(ctx context.Context) (v *int, err error)

OldNillableInt returns the old nillable_int value of the Comment. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*CommentMutation) OldUniqueFloat Uses

func (m *CommentMutation) OldUniqueFloat(ctx context.Context) (v float64, err error)

OldUniqueFloat returns the old unique_float value of the Comment. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*CommentMutation) OldUniqueInt Uses

func (m *CommentMutation) OldUniqueInt(ctx context.Context) (v int, err error)

OldUniqueInt returns the old unique_int value of the Comment. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*CommentMutation) Op Uses

func (m *CommentMutation) Op() Op

Op returns the operation name.

func (*CommentMutation) RemovedEdges Uses

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

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

func (*CommentMutation) RemovedIDs Uses

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

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*CommentMutation) ResetEdge Uses

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

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

func (*CommentMutation) ResetField Uses

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

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

func (*CommentMutation) ResetNillableInt Uses

func (m *CommentMutation) ResetNillableInt()

ResetNillableInt reset all changes of the "nillable_int" field.

func (*CommentMutation) ResetUniqueFloat Uses

func (m *CommentMutation) ResetUniqueFloat()

ResetUniqueFloat reset all changes of the "unique_float" field.

func (*CommentMutation) ResetUniqueInt Uses

func (m *CommentMutation) ResetUniqueInt()

ResetUniqueInt reset all changes of the "unique_int" field.

func (*CommentMutation) SetField Uses

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

SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.

func (*CommentMutation) SetNillableInt Uses

func (m *CommentMutation) SetNillableInt(i int)

SetNillableInt sets the nillable_int field.

func (*CommentMutation) SetUniqueFloat Uses

func (m *CommentMutation) SetUniqueFloat(f float64)

SetUniqueFloat sets the unique_float field.

func (*CommentMutation) SetUniqueInt Uses

func (m *CommentMutation) SetUniqueInt(i int)

SetUniqueInt sets the unique_int field.

func (CommentMutation) Tx Uses

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

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

func (*CommentMutation) Type Uses

func (m *CommentMutation) Type() string

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

func (*CommentMutation) UniqueFloat Uses

func (m *CommentMutation) UniqueFloat() (r float64, exists bool)

UniqueFloat returns the unique_float value in the mutation.

func (*CommentMutation) UniqueInt Uses

func (m *CommentMutation) UniqueInt() (r int, exists bool)

UniqueInt returns the unique_int value in the mutation.

type CommentQuery Uses

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

CommentQuery is the builder for querying Comment entities.

func (*CommentQuery) All Uses

func (cq *CommentQuery) All(ctx context.Context) ([]*Comment, error)

All executes the query and returns a list of Comments.

func (*CommentQuery) AllX Uses

func (cq *CommentQuery) AllX(ctx context.Context) []*Comment

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

func (*CommentQuery) Clone Uses

func (cq *CommentQuery) Clone() *CommentQuery

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

func (*CommentQuery) Count Uses

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

Count returns the count of the given query.

func (*CommentQuery) CountX Uses

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

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

func (*CommentQuery) Exist Uses

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

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

func (*CommentQuery) ExistX Uses

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

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

func (*CommentQuery) First Uses

func (cq *CommentQuery) First(ctx context.Context) (*Comment, error)

First returns the first Comment entity in the query. Returns *NotFoundError when no comment was found.

func (*CommentQuery) FirstID Uses

func (cq *CommentQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Comment id in the query. Returns *NotFoundError when no id was found.

func (*CommentQuery) FirstX Uses

func (cq *CommentQuery) FirstX(ctx context.Context) *Comment

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

func (*CommentQuery) FirstXID Uses

func (cq *CommentQuery) FirstXID(ctx context.Context) int

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

func (*CommentQuery) GroupBy Uses

func (cq *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy

GroupBy 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 {
	UniqueInt int `json:"unique_int,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Comment.Query().
	GroupBy(comment.FieldUniqueInt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CommentQuery) IDs Uses

func (cq *CommentQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Comment ids.

func (*CommentQuery) IDsX Uses

func (cq *CommentQuery) IDsX(ctx context.Context) []int

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

func (*CommentQuery) Limit Uses

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

Limit adds a limit step to the query.

func (*CommentQuery) Offset Uses

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

Offset adds an offset step to the query.

func (*CommentQuery) Only Uses

func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error)

Only returns the only Comment entity in the query, returns an error if not exactly one entity was returned.

func (*CommentQuery) OnlyID Uses

func (cq *CommentQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID returns the only Comment id in the query, returns an error if not exactly one id was returned.

func (*CommentQuery) OnlyX Uses

func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment

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

func (*CommentQuery) OnlyXID Uses

func (cq *CommentQuery) OnlyXID(ctx context.Context) int

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

func (*CommentQuery) Order Uses

func (cq *CommentQuery) Order(o ...OrderFunc) *CommentQuery

Order adds an order step to the query.

func (*CommentQuery) Select Uses

func (cq *CommentQuery) Select(field string, fields ...string) *CommentSelect

Select one or more fields from the given query.

Example:

var v []struct {
	UniqueInt int `json:"unique_int,omitempty"`
}

client.Comment.Query().
	Select(comment.FieldUniqueInt).
	Scan(ctx, &v)

func (*CommentQuery) Where Uses

func (cq *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery

Where adds a new predicate for the builder.

type CommentSelect Uses

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

CommentSelect is the builder for select fields of Comment entities.

func (*CommentSelect) Bools Uses

func (cs *CommentSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*CommentSelect) BoolsX Uses

func (cs *CommentSelect) BoolsX(ctx context.Context) []bool

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

func (*CommentSelect) Float64s Uses

func (cs *CommentSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*CommentSelect) Float64sX Uses

func (cs *CommentSelect) Float64sX(ctx context.Context) []float64

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

func (*CommentSelect) Ints Uses

func (cs *CommentSelect) Ints(ctx context.Context) ([]int, error)

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

func (*CommentSelect) IntsX Uses

func (cs *CommentSelect) IntsX(ctx context.Context) []int

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

func (*CommentSelect) Scan Uses

func (cs *CommentSelect) Scan(ctx context.Context, v interface{}) error

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

func (*CommentSelect) ScanX Uses

func (cs *CommentSelect) ScanX(ctx context.Context, v interface{})

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

func (*CommentSelect) Strings Uses

func (cs *CommentSelect) Strings(ctx context.Context) ([]string, error)

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

func (*CommentSelect) StringsX Uses

func (cs *CommentSelect) StringsX(ctx context.Context) []string

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

type CommentUpdate Uses

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

CommentUpdate is the builder for updating Comment entities.

func (*CommentUpdate) AddNillableInt Uses

func (cu *CommentUpdate) AddNillableInt(i int) *CommentUpdate

AddNillableInt adds i to nillable_int.

func (*CommentUpdate) AddUniqueFloat Uses

func (cu *CommentUpdate) AddUniqueFloat(f float64) *CommentUpdate

AddUniqueFloat adds f to unique_float.

func (*CommentUpdate) AddUniqueInt Uses

func (cu *CommentUpdate) AddUniqueInt(i int) *CommentUpdate

AddUniqueInt adds i to unique_int.

func (*CommentUpdate) ClearNillableInt Uses

func (cu *CommentUpdate) ClearNillableInt() *CommentUpdate

ClearNillableInt clears the value of nillable_int.

func (*CommentUpdate) Exec Uses

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

Exec executes the query.

func (*CommentUpdate) ExecX Uses

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

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

func (*CommentUpdate) Mutation Uses

func (cu *CommentUpdate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdate) Save Uses

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

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*CommentUpdate) SaveX Uses

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

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

func (*CommentUpdate) SetNillableInt Uses

func (cu *CommentUpdate) SetNillableInt(i int) *CommentUpdate

SetNillableInt sets the nillable_int field.

func (*CommentUpdate) SetNillableNillableInt Uses

func (cu *CommentUpdate) SetNillableNillableInt(i *int) *CommentUpdate

SetNillableNillableInt sets the nillable_int field if the given value is not nil.

func (*CommentUpdate) SetUniqueFloat Uses

func (cu *CommentUpdate) SetUniqueFloat(f float64) *CommentUpdate

SetUniqueFloat sets the unique_float field.

func (*CommentUpdate) SetUniqueInt Uses

func (cu *CommentUpdate) SetUniqueInt(i int) *CommentUpdate

SetUniqueInt sets the unique_int field.

func (*CommentUpdate) Where Uses

func (cu *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate

Where adds a new predicate for the builder.

type CommentUpdateOne Uses

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

CommentUpdateOne is the builder for updating a single Comment entity.

func (*CommentUpdateOne) AddNillableInt Uses

func (cuo *CommentUpdateOne) AddNillableInt(i int) *CommentUpdateOne

AddNillableInt adds i to nillable_int.

func (*CommentUpdateOne) AddUniqueFloat Uses

func (cuo *CommentUpdateOne) AddUniqueFloat(f float64) *CommentUpdateOne

AddUniqueFloat adds f to unique_float.

func (*CommentUpdateOne) AddUniqueInt Uses

func (cuo *CommentUpdateOne) AddUniqueInt(i int) *CommentUpdateOne

AddUniqueInt adds i to unique_int.

func (*CommentUpdateOne) ClearNillableInt Uses

func (cuo *CommentUpdateOne) ClearNillableInt() *CommentUpdateOne

ClearNillableInt clears the value of nillable_int.

func (*CommentUpdateOne) Exec Uses

func (cuo *CommentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CommentUpdateOne) ExecX Uses

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

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

func (*CommentUpdateOne) Mutation Uses

func (cuo *CommentUpdateOne) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdateOne) Save Uses

func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)

Save executes the query and returns the updated entity.

func (*CommentUpdateOne) SaveX Uses

func (cuo *CommentUpdateOne) SaveX(ctx context.Context) *Comment

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

func (*CommentUpdateOne) SetNillableInt Uses

func (cuo *CommentUpdateOne) SetNillableInt(i int) *CommentUpdateOne

SetNillableInt sets the nillable_int field.

func (*CommentUpdateOne) SetNillableNillableInt Uses

func (cuo *CommentUpdateOne) SetNillableNillableInt(i *int) *CommentUpdateOne

SetNillableNillableInt sets the nillable_int field if the given value is not nil.

func (*CommentUpdateOne) SetUniqueFloat Uses

func (cuo *CommentUpdateOne) SetUniqueFloat(f float64) *CommentUpdateOne

SetUniqueFloat sets the unique_float field.

func (*CommentUpdateOne) SetUniqueInt Uses

func (cuo *CommentUpdateOne) SetUniqueInt(i int) *CommentUpdateOne

SetUniqueInt sets the unique_int field.

type Comments Uses

type Comments []*Comment

Comments is a parsable slice of Comment.

type ConstraintError Uses

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 Uses

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap Uses

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type FieldType Uses

type FieldType struct {

    // ID of the ent.
    ID  int `json:"id,omitempty"`
    // Int holds the value of the "int" field.
    Int int `json:"int,omitempty"`
    // Int8 holds the value of the "int8" field.
    Int8 int8 `json:"int8,omitempty"`
    // Int16 holds the value of the "int16" field.
    Int16 int16 `json:"int16,omitempty"`
    // Int32 holds the value of the "int32" field.
    Int32 int32 `json:"int32,omitempty"`
    // Int64 holds the value of the "int64" field.
    Int64 int64 `json:"int64,omitempty"`
    // OptionalInt holds the value of the "optional_int" field.
    OptionalInt int `json:"optional_int,omitempty"`
    // OptionalInt8 holds the value of the "optional_int8" field.
    OptionalInt8 int8 `json:"optional_int8,omitempty"`
    // OptionalInt16 holds the value of the "optional_int16" field.
    OptionalInt16 int16 `json:"optional_int16,omitempty"`
    // OptionalInt32 holds the value of the "optional_int32" field.
    OptionalInt32 int32 `json:"optional_int32,omitempty"`
    // OptionalInt64 holds the value of the "optional_int64" field.
    OptionalInt64 int64 `json:"optional_int64,omitempty"`
    // NillableInt holds the value of the "nillable_int" field.
    NillableInt *int `json:"nillable_int,omitempty"`
    // NillableInt8 holds the value of the "nillable_int8" field.
    NillableInt8 *int8 `json:"nillable_int8,omitempty"`
    // NillableInt16 holds the value of the "nillable_int16" field.
    NillableInt16 *int16 `json:"nillable_int16,omitempty"`
    // NillableInt32 holds the value of the "nillable_int32" field.
    NillableInt32 *int32 `json:"nillable_int32,omitempty"`
    // NillableInt64 holds the value of the "nillable_int64" field.
    NillableInt64 *int64 `json:"nillable_int64,omitempty"`
    // ValidateOptionalInt32 holds the value of the "validate_optional_int32" field.
    ValidateOptionalInt32 int32 `json:"validate_optional_int32,omitempty"`
    // OptionalUint holds the value of the "optional_uint" field.
    OptionalUint uint `json:"optional_uint,omitempty"`
    // OptionalUint8 holds the value of the "optional_uint8" field.
    OptionalUint8 uint8 `json:"optional_uint8,omitempty"`
    // OptionalUint16 holds the value of the "optional_uint16" field.
    OptionalUint16 uint16 `json:"optional_uint16,omitempty"`
    // OptionalUint32 holds the value of the "optional_uint32" field.
    OptionalUint32 uint32 `json:"optional_uint32,omitempty"`
    // OptionalUint64 holds the value of the "optional_uint64" field.
    OptionalUint64 uint64 `json:"optional_uint64,omitempty"`
    // State holds the value of the "state" field.
    State fieldtype.State `json:"state,omitempty"`
    // OptionalFloat holds the value of the "optional_float" field.
    OptionalFloat float64 `json:"optional_float,omitempty"`
    // OptionalFloat32 holds the value of the "optional_float32" field.
    OptionalFloat32 float32 `json:"optional_float32,omitempty"`
    // Datetime holds the value of the "datetime" field.
    Datetime time.Time `json:"datetime,omitempty"`
    // Decimal holds the value of the "decimal" field.
    Decimal float64 `json:"decimal,omitempty"`
    // Dir holds the value of the "dir" field.
    Dir http.Dir `json:"dir,omitempty"`
    // Ndir holds the value of the "ndir" field.
    Ndir *http.Dir `json:"ndir,omitempty"`
    // Str holds the value of the "str" field.
    Str sql.NullString `json:"str,omitempty"`
    // NullStr holds the value of the "null_str" field.
    NullStr *sql.NullString `json:"null_str,omitempty"`
    // Link holds the value of the "link" field.
    Link schema.Link `json:"link,omitempty"`
    // NullLink holds the value of the "null_link" field.
    NullLink *schema.Link `json:"null_link,omitempty"`
    // Active holds the value of the "active" field.
    Active schema.Status `json:"active,omitempty"`
    // NullActive holds the value of the "null_active" field.
    NullActive *schema.Status `json:"null_active,omitempty"`
    // Deleted holds the value of the "deleted" field.
    Deleted sql.NullBool `json:"deleted,omitempty"`
    // DeletedAt holds the value of the "deleted_at" field.
    DeletedAt sql.NullTime `json:"deleted_at,omitempty"`
    // IP holds the value of the "ip" field.
    IP  net.IP `json:"ip,omitempty"`
    // NullInt64 holds the value of the "null_int64" field.
    NullInt64 sql.NullInt64 `json:"null_int64,omitempty"`
    // SchemaInt holds the value of the "schema_int" field.
    SchemaInt schema.Int `json:"schema_int,omitempty"`
    // SchemaInt8 holds the value of the "schema_int8" field.
    SchemaInt8 schema.Int8 `json:"schema_int8,omitempty"`
    // SchemaInt64 holds the value of the "schema_int64" field.
    SchemaInt64 schema.Int64 `json:"schema_int64,omitempty"`
    // SchemaFloat holds the value of the "schema_float" field.
    SchemaFloat schema.Float64 `json:"schema_float,omitempty"`
    // SchemaFloat32 holds the value of the "schema_float32" field.
    SchemaFloat32 schema.Float32 `json:"schema_float32,omitempty"`
    // NullFloat holds the value of the "null_float" field.
    NullFloat sql.NullFloat64 `json:"null_float,omitempty"`
    // contains filtered or unexported fields
}

FieldType is the model entity for the FieldType schema.

func (*FieldType) String Uses

func (ft *FieldType) String() string

String implements the fmt.Stringer.

func (*FieldType) Unwrap Uses

func (ft *FieldType) Unwrap() *FieldType

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

func (*FieldType) Update Uses

func (ft *FieldType) Update() *FieldTypeUpdateOne

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

type FieldTypeClient Uses

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

FieldTypeClient is a client for the FieldType schema.

func NewFieldTypeClient Uses

func NewFieldTypeClient(c config) *FieldTypeClient

NewFieldTypeClient returns a client for the FieldType from the given config.

func (*FieldTypeClient) Create Uses

func (c *FieldTypeClient) Create() *FieldTypeCreate

Create returns a create builder for FieldType.

func (*FieldTypeClient) Delete Uses

func (c *FieldTypeClient) Delete() *FieldTypeDelete

Delete returns a delete builder for FieldType.

func (*FieldTypeClient) DeleteOne Uses

func (c *FieldTypeClient) DeleteOne(ft *FieldType) *FieldTypeDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*FieldTypeClient) DeleteOneID Uses

func (c *FieldTypeClient) DeleteOneID(id int) *FieldTypeDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*FieldTypeClient) Get Uses

func (c *FieldTypeClient) Get(ctx context.Context, id int) (*FieldType, error)

Get returns a FieldType entity by its id.

func (*FieldTypeClient) GetX Uses

func (c *FieldTypeClient) GetX(ctx context.Context, id int) *FieldType

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

func (*FieldTypeClient) Hooks Uses

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

Hooks returns the client hooks.

func (*FieldTypeClient) Query Uses

func (c *FieldTypeClient) Query() *FieldTypeQuery

Create returns a query builder for FieldType.

func (*FieldTypeClient) Update Uses

func (c *FieldTypeClient) Update() *FieldTypeUpdate

Update returns an update builder for FieldType.

func (*FieldTypeClient) UpdateOne Uses

func (c *FieldTypeClient) UpdateOne(ft *FieldType) *FieldTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FieldTypeClient) UpdateOneID Uses

func (c *FieldTypeClient) UpdateOneID(id int) *FieldTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FieldTypeClient) Use Uses

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

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

type FieldTypeCreate Uses

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

FieldTypeCreate is the builder for creating a FieldType entity.

func (*FieldTypeCreate) Mutation Uses

func (ftc *FieldTypeCreate) Mutation() *FieldTypeMutation

Mutation returns the FieldTypeMutation object of the builder.

func (*FieldTypeCreate) Save Uses

func (ftc *FieldTypeCreate) Save(ctx context.Context) (*FieldType, error)

Save creates the FieldType in the database.

func (*FieldTypeCreate) SaveX Uses

func (ftc *FieldTypeCreate) SaveX(ctx context.Context) *FieldType

SaveX calls Save and panics if Save returns an error.

func (*FieldTypeCreate) SetActive Uses

func (ftc *FieldTypeCreate) SetActive(s schema.Status) *FieldTypeCreate

SetActive sets the active field.

func (*FieldTypeCreate) SetDatetime Uses

func (ftc *FieldTypeCreate) SetDatetime(t time.Time) *FieldTypeCreate

SetDatetime sets the datetime field.

func (*FieldTypeCreate) SetDecimal Uses

func (ftc *FieldTypeCreate) SetDecimal(f float64) *FieldTypeCreate

SetDecimal sets the decimal field.

func (*FieldTypeCreate) SetDeleted Uses

func (ftc *FieldTypeCreate) SetDeleted(sb sql.NullBool) *FieldTypeCreate

SetDeleted sets the deleted field.

func (*FieldTypeCreate) SetDeletedAt Uses

func (ftc *FieldTypeCreate) SetDeletedAt(st sql.NullTime) *FieldTypeCreate

SetDeletedAt sets the deleted_at field.

func (*FieldTypeCreate) SetDir Uses

func (ftc *FieldTypeCreate) SetDir(h http.Dir) *FieldTypeCreate

SetDir sets the dir field.

func (*FieldTypeCreate) SetIP Uses

func (ftc *FieldTypeCreate) SetIP(n net.IP) *FieldTypeCreate

SetIP sets the ip field.

func (*FieldTypeCreate) SetInt Uses

func (ftc *FieldTypeCreate) SetInt(i int) *FieldTypeCreate

SetInt sets the int field.

func (*FieldTypeCreate) SetInt16 Uses

func (ftc *FieldTypeCreate) SetInt16(i int16) *FieldTypeCreate

SetInt16 sets the int16 field.

func (*FieldTypeCreate) SetInt32 Uses

func (ftc *FieldTypeCreate) SetInt32(i int32) *FieldTypeCreate

SetInt32 sets the int32 field.

func (*FieldTypeCreate) SetInt64 Uses

func (ftc *FieldTypeCreate) SetInt64(i int64) *FieldTypeCreate

SetInt64 sets the int64 field.

func (*FieldTypeCreate) SetInt8 Uses

func (ftc *FieldTypeCreate) SetInt8(i int8) *FieldTypeCreate

SetInt8 sets the int8 field.

func (ftc *FieldTypeCreate) SetLink(s schema.Link) *FieldTypeCreate

SetLink sets the link field.

func (*FieldTypeCreate) SetNdir Uses

func (ftc *FieldTypeCreate) SetNdir(h http.Dir) *FieldTypeCreate

SetNdir sets the ndir field.

func (*FieldTypeCreate) SetNillableActive Uses

func (ftc *FieldTypeCreate) SetNillableActive(s *schema.Status) *FieldTypeCreate

SetNillableActive sets the active field if the given value is not nil.

func (*FieldTypeCreate) SetNillableDatetime Uses

func (ftc *FieldTypeCreate) SetNillableDatetime(t *time.Time) *FieldTypeCreate

SetNillableDatetime sets the datetime field if the given value is not nil.

func (*FieldTypeCreate) SetNillableDecimal Uses

func (ftc *FieldTypeCreate) SetNillableDecimal(f *float64) *FieldTypeCreate

SetNillableDecimal sets the decimal field if the given value is not nil.

func (*FieldTypeCreate) SetNillableDir Uses

func (ftc *FieldTypeCreate) SetNillableDir(h *http.Dir) *FieldTypeCreate

SetNillableDir sets the dir field if the given value is not nil.

func (*FieldTypeCreate) SetNillableInt Uses

func (ftc *FieldTypeCreate) SetNillableInt(i int) *FieldTypeCreate

SetNillableInt sets the nillable_int field.

func (*FieldTypeCreate) SetNillableInt16 Uses

func (ftc *FieldTypeCreate) SetNillableInt16(i int16) *FieldTypeCreate

SetNillableInt16 sets the nillable_int16 field.

func (*FieldTypeCreate) SetNillableInt32 Uses

func (ftc *FieldTypeCreate) SetNillableInt32(i int32) *FieldTypeCreate

SetNillableInt32 sets the nillable_int32 field.

func (*FieldTypeCreate) SetNillableInt64 Uses

func (ftc *FieldTypeCreate) SetNillableInt64(i int64) *FieldTypeCreate

SetNillableInt64 sets the nillable_int64 field.

func (*FieldTypeCreate) SetNillableInt8 Uses

func (ftc *FieldTypeCreate) SetNillableInt8(i int8) *FieldTypeCreate

SetNillableInt8 sets the nillable_int8 field.

func (*FieldTypeCreate) SetNillableNdir Uses

func (ftc *FieldTypeCreate) SetNillableNdir(h *http.Dir) *FieldTypeCreate

SetNillableNdir sets the ndir field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt Uses

func (ftc *FieldTypeCreate) SetNillableNillableInt(i *int) *FieldTypeCreate

SetNillableNillableInt sets the nillable_int field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt16 Uses

func (ftc *FieldTypeCreate) SetNillableNillableInt16(i *int16) *FieldTypeCreate

SetNillableNillableInt16 sets the nillable_int16 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt32 Uses

func (ftc *FieldTypeCreate) SetNillableNillableInt32(i *int32) *FieldTypeCreate

SetNillableNillableInt32 sets the nillable_int32 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt64 Uses

func (ftc *FieldTypeCreate) SetNillableNillableInt64(i *int64) *FieldTypeCreate

SetNillableNillableInt64 sets the nillable_int64 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt8 Uses

func (ftc *FieldTypeCreate) SetNillableNillableInt8(i *int8) *FieldTypeCreate

SetNillableNillableInt8 sets the nillable_int8 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNullActive Uses

func (ftc *FieldTypeCreate) SetNillableNullActive(s *schema.Status) *FieldTypeCreate

SetNillableNullActive sets the null_active field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalFloat Uses

func (ftc *FieldTypeCreate) SetNillableOptionalFloat(f *float64) *FieldTypeCreate

SetNillableOptionalFloat sets the optional_float field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalFloat32 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalFloat32(f *float32) *FieldTypeCreate

SetNillableOptionalFloat32 sets the optional_float32 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt Uses

func (ftc *FieldTypeCreate) SetNillableOptionalInt(i *int) *FieldTypeCreate

SetNillableOptionalInt sets the optional_int field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt16 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalInt16(i *int16) *FieldTypeCreate

SetNillableOptionalInt16 sets the optional_int16 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt32 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalInt32(i *int32) *FieldTypeCreate

SetNillableOptionalInt32 sets the optional_int32 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt64 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalInt64(i *int64) *FieldTypeCreate

SetNillableOptionalInt64 sets the optional_int64 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt8 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalInt8(i *int8) *FieldTypeCreate

SetNillableOptionalInt8 sets the optional_int8 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint Uses

func (ftc *FieldTypeCreate) SetNillableOptionalUint(u *uint) *FieldTypeCreate

SetNillableOptionalUint sets the optional_uint field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint16 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalUint16(u *uint16) *FieldTypeCreate

SetNillableOptionalUint16 sets the optional_uint16 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint32 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalUint32(u *uint32) *FieldTypeCreate

SetNillableOptionalUint32 sets the optional_uint32 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint64 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalUint64(u *uint64) *FieldTypeCreate

SetNillableOptionalUint64 sets the optional_uint64 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint8 Uses

func (ftc *FieldTypeCreate) SetNillableOptionalUint8(u *uint8) *FieldTypeCreate

SetNillableOptionalUint8 sets the optional_uint8 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaFloat Uses

func (ftc *FieldTypeCreate) SetNillableSchemaFloat(s *schema.Float64) *FieldTypeCreate

SetNillableSchemaFloat sets the schema_float field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaFloat32 Uses

func (ftc *FieldTypeCreate) SetNillableSchemaFloat32(s *schema.Float32) *FieldTypeCreate

SetNillableSchemaFloat32 sets the schema_float32 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaInt Uses

func (ftc *FieldTypeCreate) SetNillableSchemaInt(s *schema.Int) *FieldTypeCreate

SetNillableSchemaInt sets the schema_int field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaInt64 Uses

func (ftc *FieldTypeCreate) SetNillableSchemaInt64(s *schema.Int64) *FieldTypeCreate

SetNillableSchemaInt64 sets the schema_int64 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaInt8 Uses

func (ftc *FieldTypeCreate) SetNillableSchemaInt8(s *schema.Int8) *FieldTypeCreate

SetNillableSchemaInt8 sets the schema_int8 field if the given value is not nil.

func (*FieldTypeCreate) SetNillableState Uses

func (ftc *FieldTypeCreate) SetNillableState(f *fieldtype.State) *FieldTypeCreate

SetNillableState sets the state field if the given value is not nil.

func (*FieldTypeCreate) SetNillableValidateOptionalInt32 Uses

func (ftc *FieldTypeCreate) SetNillableValidateOptionalInt32(i *int32) *FieldTypeCreate

SetNillableValidateOptionalInt32 sets the validate_optional_int32 field if the given value is not nil.

func (*FieldTypeCreate) SetNullActive Uses

func (ftc *FieldTypeCreate) SetNullActive(s schema.Status) *FieldTypeCreate

SetNullActive sets the null_active field.

func (*FieldTypeCreate) SetNullFloat Uses

func (ftc *FieldTypeCreate) SetNullFloat(sf sql.NullFloat64) *FieldTypeCreate

SetNullFloat sets the null_float field.

func (*FieldTypeCreate) SetNullInt64 Uses

func (ftc *FieldTypeCreate) SetNullInt64(si sql.NullInt64) *FieldTypeCreate

SetNullInt64 sets the null_int64 field.

func (ftc *FieldTypeCreate) SetNullLink(s schema.Link) *FieldTypeCreate

SetNullLink sets the null_link field.

func (*FieldTypeCreate) SetNullStr Uses

func (ftc *FieldTypeCreate) SetNullStr(ss sql.NullString) *FieldTypeCreate

SetNullStr sets the null_str field.

func (*FieldTypeCreate) SetOptionalFloat Uses

func (ftc *FieldTypeCreate) SetOptionalFloat(f float64) *FieldTypeCreate

SetOptionalFloat sets the optional_float field.

func (*FieldTypeCreate) SetOptionalFloat32 Uses

func (ftc *FieldTypeCreate) SetOptionalFloat32(f float32) *FieldTypeCreate

SetOptionalFloat32 sets the optional_float32 field.

func (*FieldTypeCreate) SetOptionalInt Uses

func (ftc *FieldTypeCreate) SetOptionalInt(i int) *FieldTypeCreate

SetOptionalInt sets the optional_int field.

func (*FieldTypeCreate) SetOptionalInt16 Uses

func (ftc *FieldTypeCreate) SetOptionalInt16(i int16) *FieldTypeCreate

SetOptionalInt16 sets the optional_int16 field.

func (*FieldTypeCreate) SetOptionalInt32 Uses

func (ftc *FieldTypeCreate) SetOptionalInt32(i int32) *FieldTypeCreate

SetOptionalInt32 sets the optional_int32 field.

func (*FieldTypeCreate) SetOptionalInt64 Uses

func (ftc *FieldTypeCreate) SetOptionalInt64(i int64) *FieldTypeCreate

SetOptionalInt64 sets the optional_int64 field.

func (*FieldTypeCreate) SetOptionalInt8 Uses

func (ftc *FieldTypeCreate) SetOptionalInt8(i int8) *FieldTypeCreate

SetOptionalInt8 sets the optional_int8 field.

func (*FieldTypeCreate) SetOptionalUint Uses

func (ftc *FieldTypeCreate) SetOptionalUint(u uint) *FieldTypeCreate

SetOptionalUint sets the optional_uint field.

func (*FieldTypeCreate) SetOptionalUint16 Uses

func (ftc *FieldTypeCreate) SetOptionalUint16(u uint16) *FieldTypeCreate

SetOptionalUint16 sets the optional_uint16 field.

func (*FieldTypeCreate) SetOptionalUint32 Uses

func (ftc *FieldTypeCreate) SetOptionalUint32(u uint32) *FieldTypeCreate

SetOptionalUint32 sets the optional_uint32 field.

func (*FieldTypeCreate) SetOptionalUint64 Uses

func (ftc *FieldTypeCreate) SetOptionalUint64(u uint64) *FieldTypeCreate

SetOptionalUint64 sets the optional_uint64 field.

func (*FieldTypeCreate) SetOptionalUint8 Uses

func (ftc *FieldTypeCreate) SetOptionalUint8(u uint8) *FieldTypeCreate

SetOptionalUint8 sets the optional_uint8 field.

func (*FieldTypeCreate) SetSchemaFloat Uses

func (ftc *FieldTypeCreate) SetSchemaFloat(s schema.Float64) *FieldTypeCreate

SetSchemaFloat sets the schema_float field.

func (*FieldTypeCreate) SetSchemaFloat32 Uses

func (ftc *FieldTypeCreate) SetSchemaFloat32(s schema.Float32) *FieldTypeCreate

SetSchemaFloat32 sets the schema_float32 field.

func (*FieldTypeCreate) SetSchemaInt Uses

func (ftc *FieldTypeCreate) SetSchemaInt(s schema.Int) *FieldTypeCreate

SetSchemaInt sets the schema_int field.

func (*FieldTypeCreate) SetSchemaInt64 Uses

func (ftc *FieldTypeCreate) SetSchemaInt64(s schema.Int64) *FieldTypeCreate

SetSchemaInt64 sets the schema_int64 field.

func (*FieldTypeCreate) SetSchemaInt8 Uses

func (ftc *FieldTypeCreate) SetSchemaInt8(s schema.Int8) *FieldTypeCreate

SetSchemaInt8 sets the schema_int8 field.

func (*FieldTypeCreate) SetState Uses

func (ftc *FieldTypeCreate) SetState(f fieldtype.State) *FieldTypeCreate

SetState sets the state field.

func (*FieldTypeCreate) SetStr Uses

func (ftc *FieldTypeCreate) SetStr(ss sql.NullString) *FieldTypeCreate

SetStr sets the str field.

func (*FieldTypeCreate) SetValidateOptionalInt32 Uses

func (ftc *FieldTypeCreate) SetValidateOptionalInt32(i int32) *FieldTypeCreate

SetValidateOptionalInt32 sets the validate_optional_int32 field.

type FieldTypeDelete Uses

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

FieldTypeDelete is the builder for deleting a FieldType entity.

func (*FieldTypeDelete) Exec Uses

func (ftd *FieldTypeDelete) Exec(ctx context.Context) (int, error)

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

func (*FieldTypeDelete) ExecX Uses

func (ftd *FieldTypeDelete) ExecX(ctx context.Context) int

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

func (*FieldTypeDelete) Where Uses

func (ftd *FieldTypeDelete) Where(ps ...predicate.FieldType) *FieldTypeDelete

Where adds a new predicate to the delete builder.

type FieldTypeDeleteOne Uses

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

FieldTypeDeleteOne is the builder for deleting a single FieldType entity.

func (*FieldTypeDeleteOne) Exec Uses

func (ftdo *FieldTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FieldTypeDeleteOne) ExecX Uses

func (ftdo *FieldTypeDeleteOne) ExecX(ctx context.Context)

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

type FieldTypeGroupBy Uses

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

FieldTypeGroupBy is the builder for group-by FieldType entities.

func (*FieldTypeGroupBy) Aggregate Uses

func (ftgb *FieldTypeGroupBy) Aggregate(fns ...AggregateFunc) *FieldTypeGroupBy

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

func (*FieldTypeGroupBy) Bools Uses

func (ftgb *FieldTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*FieldTypeGroupBy) BoolsX Uses

func (ftgb *FieldTypeGroupBy) BoolsX(ctx context.Context) []bool

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

func (*FieldTypeGroupBy) Float64s Uses

func (ftgb *FieldTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*FieldTypeGroupBy) Float64sX Uses

func (ftgb *FieldTypeGroupBy) Float64sX(ctx context.Context) []float64

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

func (*FieldTypeGroupBy) Ints Uses

func (ftgb *FieldTypeGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*FieldTypeGroupBy) IntsX Uses

func (ftgb *FieldTypeGroupBy) IntsX(ctx context.Context) []int

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

func (*FieldTypeGroupBy) Scan Uses

func (ftgb *FieldTypeGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*FieldTypeGroupBy) ScanX Uses

func (ftgb *FieldTypeGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*FieldTypeGroupBy) Strings Uses

func (ftgb *FieldTypeGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*FieldTypeGroupBy) StringsX Uses

func (ftgb *FieldTypeGroupBy) StringsX(ctx context.Context) []string

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

type FieldTypeMutation Uses

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

FieldTypeMutation represents an operation that mutate the FieldTypes nodes in the graph.

func (*FieldTypeMutation) Active Uses

func (m *FieldTypeMutation) Active() (r schema.Status, exists bool)

Active returns the active value in the mutation.

func (*FieldTypeMutation) ActiveCleared Uses

func (m *FieldTypeMutation) ActiveCleared() bool

ActiveCleared returns if the field active was cleared in this mutation.

func (*FieldTypeMutation) AddDecimal Uses

func (m *FieldTypeMutation) AddDecimal(f float64)

AddDecimal adds f to decimal.

func (*FieldTypeMutation) AddField Uses

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

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

func (*FieldTypeMutation) AddInt Uses

func (m *FieldTypeMutation) AddInt(i int)

AddInt adds i to int.

func (*FieldTypeMutation) AddInt16 Uses

func (m *FieldTypeMutation) AddInt16(i int16)

AddInt16 adds i to int16.

func (*FieldTypeMutation) AddInt32 Uses

func (m *FieldTypeMutation) AddInt32(i int32)

AddInt32 adds i to int32.

func (*FieldTypeMutation) AddInt64 Uses

func (m *FieldTypeMutation) AddInt64(i int64)

AddInt64 adds i to int64.

func (*FieldTypeMutation) AddInt8 Uses

func (m *FieldTypeMutation) AddInt8(i int8)

AddInt8 adds i to int8.

func (*FieldTypeMutation) AddNillableInt Uses

func (m *FieldTypeMutation) AddNillableInt(i int)

AddNillableInt adds i to nillable_int.

func (*FieldTypeMutation) AddNillableInt16 Uses

func (m *FieldTypeMutation) AddNillableInt16(i int16)

AddNillableInt16 adds i to nillable_int16.

func (*FieldTypeMutation) AddNillableInt32 Uses

func (m *FieldTypeMutation) AddNillableInt32(i int32)

AddNillableInt32 adds i to nillable_int32.

func (*FieldTypeMutation) AddNillableInt64 Uses

func (m *FieldTypeMutation) AddNillableInt64(i int64)

AddNillableInt64 adds i to nillable_int64.

func (*FieldTypeMutation) AddNillableInt8 Uses

func (m *FieldTypeMutation) AddNillableInt8(i int8)

AddNillableInt8 adds i to nillable_int8.

func (*FieldTypeMutation) AddOptionalFloat Uses

func (m *FieldTypeMutation) AddOptionalFloat(f float64)

AddOptionalFloat adds f to optional_float.

func (*FieldTypeMutation) AddOptionalFloat32 Uses

func (m *FieldTypeMutation) AddOptionalFloat32(f float32)

AddOptionalFloat32 adds f to optional_float32.

func (*FieldTypeMutation) AddOptionalInt Uses

func (m *FieldTypeMutation) AddOptionalInt(i int)

AddOptionalInt adds i to optional_int.

func (*FieldTypeMutation) AddOptionalInt16 Uses

func (m *FieldTypeMutation) AddOptionalInt16(i int16)

AddOptionalInt16 adds i to optional_int16.

func (*FieldTypeMutation) AddOptionalInt32 Uses

func (m *FieldTypeMutation) AddOptionalInt32(i int32)

AddOptionalInt32 adds i to optional_int32.

func (*FieldTypeMutation) AddOptionalInt64 Uses

func (m *FieldTypeMutation) AddOptionalInt64(i int64)

AddOptionalInt64 adds i to optional_int64.

func (*FieldTypeMutation) AddOptionalInt8 Uses

func (m *FieldTypeMutation) AddOptionalInt8(i int8)

AddOptionalInt8 adds i to optional_int8.

func (*FieldTypeMutation) AddOptionalUint Uses

func (m *FieldTypeMutation) AddOptionalUint(u uint)

AddOptionalUint adds u to optional_uint.

func (*FieldTypeMutation) AddOptionalUint16 Uses

func (m *FieldTypeMutation) AddOptionalUint16(u uint16)

AddOptionalUint16 adds u to optional_uint16.

func (*FieldTypeMutation) AddOptionalUint32 Uses

func (m *FieldTypeMutation) AddOptionalUint32(u uint32)

AddOptionalUint32 adds u to optional_uint32.

func (*FieldTypeMutation) AddOptionalUint64 Uses

func (m *FieldTypeMutation) AddOptionalUint64(u uint64)

AddOptionalUint64 adds u to optional_uint64.

func (*FieldTypeMutation) AddOptionalUint8 Uses

func (m *FieldTypeMutation) AddOptionalUint8(u uint8)

AddOptionalUint8 adds u to optional_uint8.

func (*FieldTypeMutation) AddSchemaFloat Uses

func (m *FieldTypeMutation) AddSchemaFloat(s schema.Float64)

AddSchemaFloat adds s to schema_float.

func (*FieldTypeMutation) AddSchemaFloat32 Uses

func (m *FieldTypeMutation) AddSchemaFloat32(s schema.Float32)

AddSchemaFloat32 adds s to schema_float32.

func (*FieldTypeMutation) AddSchemaInt Uses

func (m *FieldTypeMutation) AddSchemaInt(s schema.Int)

AddSchemaInt adds s to schema_int.

func (*FieldTypeMutation) AddSchemaInt64 Uses

func (m *FieldTypeMutation) AddSchemaInt64(s schema.Int64)

AddSchemaInt64 adds s to schema_int64.

func (*FieldTypeMutation) AddSchemaInt8 Uses

func (m *FieldTypeMutation) AddSchemaInt8(s schema.Int8)

AddSchemaInt8 adds s to schema_int8.

func (*FieldTypeMutation) AddValidateOptionalInt32 Uses

func (m *FieldTypeMutation) AddValidateOptionalInt32(i int32)

AddValidateOptionalInt32 adds i to validate_optional_int32.

func (*FieldTypeMutation) AddedDecimal Uses

func (m *FieldTypeMutation) AddedDecimal() (r float64, exists bool)

AddedDecimal returns the value that was added to the decimal field in this mutation.

func (*FieldTypeMutation) AddedEdges Uses

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

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

func (*FieldTypeMutation) AddedField Uses

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

AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.

func (*FieldTypeMutation) AddedFields Uses

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

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

func (*FieldTypeMutation) AddedIDs Uses

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

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*FieldTypeMutation) AddedInt Uses

func (m *FieldTypeMutation) AddedInt() (r int, exists bool)

AddedInt returns the value that was added to the int field in this mutation.

func (*FieldTypeMutation) AddedInt16 Uses

func (m *FieldTypeMutation) AddedInt16() (r int16, exists bool)

AddedInt16 returns the value that was added to the int16 field in this mutation.

func (*FieldTypeMutation) AddedInt32 Uses

func (m *FieldTypeMutation) AddedInt32() (r int32, exists bool)

AddedInt32 returns the value that was added to the int32 field in this mutation.

func (*FieldTypeMutation) AddedInt64 Uses

func (m *FieldTypeMutation) AddedInt64() (r int64, exists bool)

AddedInt64 returns the value that was added to the int64 field in this mutation.

func (*FieldTypeMutation) AddedInt8 Uses

func (m *FieldTypeMutation) AddedInt8() (r int8, exists bool)

AddedInt8 returns the value that was added to the int8 field in this mutation.

func (*FieldTypeMutation) AddedNillableInt Uses

func (m *FieldTypeMutation) AddedNillableInt() (r int, exists bool)

AddedNillableInt returns the value that was added to the nillable_int field in this mutation.

func (*FieldTypeMutation) AddedNillableInt16 Uses

func (m *FieldTypeMutation) AddedNillableInt16() (r int16, exists bool)

AddedNillableInt16 returns the value that was added to the nillable_int16 field in this mutation.

func (*FieldTypeMutation) AddedNillableInt32 Uses

func (m *FieldTypeMutation) AddedNillableInt32() (r int32, exists bool)

AddedNillableInt32 returns the value that was added to the nillable_int32 field in this mutation.

func (*FieldTypeMutation) AddedNillableInt64 Uses

func (m *FieldTypeMutation) AddedNillableInt64() (r int64, exists bool)

AddedNillableInt64 returns the value that was added to the nillable_int64 field in this mutation.

func (*FieldTypeMutation) AddedNillableInt8 Uses

func (m *FieldTypeMutation) AddedNillableInt8() (r int8, exists bool)

AddedNillableInt8 returns the value that was added to the nillable_int8 field in this mutation.

func (*FieldTypeMutation) AddedOptionalFloat Uses

func (m *FieldTypeMutation) AddedOptionalFloat() (r float64, exists bool)

AddedOptionalFloat returns the value that was added to the optional_float field in this mutation.

func (*FieldTypeMutation) AddedOptionalFloat32 Uses

func (m *FieldTypeMutation) AddedOptionalFloat32() (r float32, exists bool)

AddedOptionalFloat32 returns the value that was added to the optional_float32 field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt Uses

func (m *FieldTypeMutation) AddedOptionalInt() (r int, exists bool)

AddedOptionalInt returns the value that was added to the optional_int field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt16 Uses

func (m *FieldTypeMutation) AddedOptionalInt16() (r int16, exists bool)

AddedOptionalInt16 returns the value that was added to the optional_int16 field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt32 Uses

func (m *FieldTypeMutation) AddedOptionalInt32() (r int32, exists bool)

AddedOptionalInt32 returns the value that was added to the optional_int32 field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt64 Uses

func (m *FieldTypeMutation) AddedOptionalInt64() (r int64, exists bool)

AddedOptionalInt64 returns the value that was added to the optional_int64 field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt8 Uses

func (m *FieldTypeMutation) AddedOptionalInt8() (r int8, exists bool)

AddedOptionalInt8 returns the value that was added to the optional_int8 field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint Uses

func (m *FieldTypeMutation) AddedOptionalUint() (r uint, exists bool)

AddedOptionalUint returns the value that was added to the optional_uint field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint16 Uses

func (m *FieldTypeMutation) AddedOptionalUint16() (r uint16, exists bool)

AddedOptionalUint16 returns the value that was added to the optional_uint16 field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint32 Uses

func (m *FieldTypeMutation) AddedOptionalUint32() (r uint32, exists bool)

AddedOptionalUint32 returns the value that was added to the optional_uint32 field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint64 Uses

func (m *FieldTypeMutation) AddedOptionalUint64() (r uint64, exists bool)

AddedOptionalUint64 returns the value that was added to the optional_uint64 field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint8 Uses

func (m *FieldTypeMutation) AddedOptionalUint8() (r uint8, exists bool)

AddedOptionalUint8 returns the value that was added to the optional_uint8 field in this mutation.

func (*FieldTypeMutation) AddedSchemaFloat Uses

func (m *FieldTypeMutation) AddedSchemaFloat() (r schema.Float64, exists bool)

AddedSchemaFloat returns the value that was added to the schema_float field in this mutation.

func (*FieldTypeMutation) AddedSchemaFloat32 Uses

func (m *FieldTypeMutation) AddedSchemaFloat32() (r schema.Float32, exists bool)

AddedSchemaFloat32 returns the value that was added to the schema_float32 field in this mutation.

func (*FieldTypeMutation) AddedSchemaInt Uses

func (m *FieldTypeMutation) AddedSchemaInt() (r schema.Int, exists bool)

AddedSchemaInt returns the value that was added to the schema_int field in this mutation.

func (*FieldTypeMutation) AddedSchemaInt64 Uses

func (m *FieldTypeMutation) AddedSchemaInt64() (r schema.Int64, exists bool)

AddedSchemaInt64 returns the value that was added to the schema_int64 field in this mutation.

func (*FieldTypeMutation) AddedSchemaInt8 Uses

func (m *FieldTypeMutation) AddedSchemaInt8() (r schema.Int8, exists bool)

AddedSchemaInt8 returns the value that was added to the schema_int8 field in this mutation.

func (*FieldTypeMutation) AddedValidateOptionalInt32 Uses

func (m *FieldTypeMutation) AddedValidateOptionalInt32() (r int32, exists bool)

AddedValidateOptionalInt32 returns the value that was added to the validate_optional_int32 field in this mutation.

func (*FieldTypeMutation) ClearActive Uses

func (m *FieldTypeMutation) ClearActive()

ClearActive clears the value of active.

func (*FieldTypeMutation) ClearDatetime Uses

func (m *FieldTypeMutation) ClearDatetime()

ClearDatetime clears the value of datetime.

func (*FieldTypeMutation) ClearDecimal Uses

func (m *FieldTypeMutation) ClearDecimal()

ClearDecimal clears the value of decimal.

func (*FieldTypeMutation) ClearDeleted Uses

func (m *FieldTypeMutation) ClearDeleted()

ClearDeleted clears the value of deleted.

func (*FieldTypeMutation) ClearDeletedAt Uses

func (m *FieldTypeMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deleted_at.

func (*FieldTypeMutation) ClearDir Uses

func (m *FieldTypeMutation) ClearDir()

ClearDir clears the value of dir.

func (*FieldTypeMutation) ClearEdge Uses

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

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

func (*FieldTypeMutation) ClearField Uses

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

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

func (*FieldTypeMutation) ClearIP Uses

func (m *FieldTypeMutation) ClearIP()

ClearIP clears the value of ip.

func (m *FieldTypeMutation) ClearLink()

ClearLink clears the value of link.

func (*FieldTypeMutation) ClearNdir Uses

func (m *FieldTypeMutation) ClearNdir()

ClearNdir clears the value of ndir.

func (*FieldTypeMutation) ClearNillableInt Uses

func (m *FieldTypeMutation) ClearNillableInt()

ClearNillableInt clears the value of nillable_int.

func (*FieldTypeMutation) ClearNillableInt16 Uses

func (m *FieldTypeMutation) ClearNillableInt16()

ClearNillableInt16 clears the value of nillable_int16.

func (*FieldTypeMutation) ClearNillableInt32 Uses

func (m *FieldTypeMutation) ClearNillableInt32()

ClearNillableInt32 clears the value of nillable_int32.

func (*FieldTypeMutation) ClearNillableInt64 Uses

func (m *FieldTypeMutation) ClearNillableInt64()

ClearNillableInt64 clears the value of nillable_int64.

func (*FieldTypeMutation) ClearNillableInt8 Uses

func (m *FieldTypeMutation) ClearNillableInt8()

ClearNillableInt8 clears the value of nillable_int8.

func (*FieldTypeMutation) ClearNullActive Uses

func (m *FieldTypeMutation) ClearNullActive()

ClearNullActive clears the value of null_active.

func (*FieldTypeMutation) ClearNullFloat Uses

func (m *FieldTypeMutation) ClearNullFloat()

ClearNullFloat clears the value of null_float.

func (*FieldTypeMutation) ClearNullInt64 Uses

func (m *FieldTypeMutation) ClearNullInt64()

ClearNullInt64 clears the value of null_int64.

func (m *FieldTypeMutation) ClearNullLink()

ClearNullLink clears the value of null_link.

func (*FieldTypeMutation) ClearNullStr Uses

func (m *FieldTypeMutation) ClearNullStr()

ClearNullStr clears the value of null_str.

func (*FieldTypeMutation) ClearOptionalFloat Uses

func (m *FieldTypeMutation) ClearOptionalFloat()

ClearOptionalFloat clears the value of optional_float.

func (*FieldTypeMutation) ClearOptionalFloat32 Uses

func (m *FieldTypeMutation) ClearOptionalFloat32()

ClearOptionalFloat32 clears the value of optional_float32.

func (*FieldTypeMutation) ClearOptionalInt Uses

func (m *FieldTypeMutation) ClearOptionalInt()

ClearOptionalInt clears the value of optional_int.

func (*FieldTypeMutation) ClearOptionalInt16 Uses

func (m *FieldTypeMutation) ClearOptionalInt16()

ClearOptionalInt16 clears the value of optional_int16.

func (*FieldTypeMutation) ClearOptionalInt32 Uses

func (m *FieldTypeMutation) ClearOptionalInt32()

ClearOptionalInt32 clears the value of optional_int32.

func (*FieldTypeMutation) ClearOptionalInt64 Uses

func (m *FieldTypeMutation) ClearOptionalInt64()

ClearOptionalInt64 clears the value of optional_int64.

func (*FieldTypeMutation) ClearOptionalInt8 Uses

func (m *FieldTypeMutation) ClearOptionalInt8()

ClearOptionalInt8 clears the value of optional_int8.

func (*FieldTypeMutation) ClearOptionalUint Uses

func (m *FieldTypeMutation) ClearOptionalUint()

ClearOptionalUint clears the value of optional_uint.

func (*FieldTypeMutation) ClearOptionalUint16 Uses

func (m *FieldTypeMutation) ClearOptionalUint16()

ClearOptionalUint16 clears the value of optional_uint16.

func (*FieldTypeMutation) ClearOptionalUint32 Uses

func (m *FieldTypeMutation) ClearOptionalUint32()

ClearOptionalUint32 clears the value of optional_uint32.

func (*FieldTypeMutation) ClearOptionalUint64 Uses

func (m *FieldTypeMutation) ClearOptionalUint64()

ClearOptionalUint64 clears the value of optional_uint64.

func (*FieldTypeMutation) ClearOptionalUint8 Uses

func (m *FieldTypeMutation) ClearOptionalUint8()

ClearOptionalUint8 clears the value of optional_uint8.

func (*FieldTypeMutation) ClearSchemaFloat Uses

func (m *FieldTypeMutation) ClearSchemaFloat()

ClearSchemaFloat clears the value of schema_float.

func (*FieldTypeMutation) ClearSchemaFloat32 Uses

func (m *FieldTypeMutation) ClearSchemaFloat32()

ClearSchemaFloat32 clears the value of schema_float32.

func (*FieldTypeMutation) ClearSchemaInt Uses

func (m *FieldTypeMutation) ClearSchemaInt()

ClearSchemaInt clears the value of schema_int.

func (*FieldTypeMutation) ClearSchemaInt64 Uses

func (m *FieldTypeMutation) ClearSchemaInt64()

ClearSchemaInt64 clears the value of schema_int64.

func (*FieldTypeMutation) ClearSchemaInt8 Uses

func (m *FieldTypeMutation) ClearSchemaInt8()

ClearSchemaInt8 clears the value of schema_int8.

func (*FieldTypeMutation) ClearState Uses

func (m *FieldTypeMutation) ClearState()

ClearState clears the value of state.

func (*FieldTypeMutation) ClearStr Uses

func (m *FieldTypeMutation) ClearStr()

ClearStr clears the value of str.

func (*FieldTypeMutation) ClearValidateOptionalInt32 Uses

func (m *FieldTypeMutation) ClearValidateOptionalInt32()

ClearValidateOptionalInt32 clears the value of validate_optional_int32.

func (*FieldTypeMutation) ClearedEdges Uses

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

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

func (*FieldTypeMutation) ClearedFields Uses

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

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

func (FieldTypeMutation) Client Uses

func (m FieldTypeMutation) 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 (*FieldTypeMutation) Datetime Uses

func (m *FieldTypeMutation) Datetime() (r time.Time, exists bool)

Datetime returns the datetime value in the mutation.

func (*FieldTypeMutation) DatetimeCleared Uses

func (m *FieldTypeMutation) DatetimeCleared() bool

DatetimeCleared returns if the field datetime was cleared in this mutation.

func (*FieldTypeMutation) Decimal Uses

func (m *FieldTypeMutation) Decimal() (r float64, exists bool)

Decimal returns the decimal value in the mutation.

func (*FieldTypeMutation) DecimalCleared Uses

func (m *FieldTypeMutation) DecimalCleared() bool

DecimalCleared returns if the field decimal was cleared in this mutation.

func (*FieldTypeMutation) Deleted Uses

func (m *FieldTypeMutation) Deleted() (r sql.NullBool, exists bool)

Deleted returns the deleted value in the mutation.

func (*FieldTypeMutation) DeletedAt Uses

func (m *FieldTypeMutation) DeletedAt() (r sql.NullTime, exists bool)

DeletedAt returns the deleted_at value in the mutation.

func (*FieldTypeMutation) DeletedAtCleared Uses

func (m *FieldTypeMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the field deleted_at was cleared in this mutation.

func (*FieldTypeMutation) DeletedCleared Uses

func (m *FieldTypeMutation) DeletedCleared() bool

DeletedCleared returns if the field deleted was cleared in this mutation.

func (*FieldTypeMutation) Dir Uses

func (m *FieldTypeMutation) Dir() (r http.Dir, exists bool)

Dir returns the dir value in the mutation.

func (*FieldTypeMutation) DirCleared Uses

func (m *FieldTypeMutation) DirCleared() bool

DirCleared returns if the field dir was cleared in this mutation.

func (*FieldTypeMutation) EdgeCleared Uses

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

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*FieldTypeMutation) Field Uses

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

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

func (*FieldTypeMutation) FieldCleared Uses

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

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*FieldTypeMutation) Fields Uses

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

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

func (*FieldTypeMutation) ID Uses

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

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

func (*FieldTypeMutation) IP Uses

func (m *FieldTypeMutation) IP() (r net.IP, exists bool)

IP returns the ip value in the mutation.

func (*FieldTypeMutation) IPCleared Uses

func (m *FieldTypeMutation) IPCleared() bool

IPCleared returns if the field ip was cleared in this mutation.

func (*FieldTypeMutation) Int Uses

func (m *FieldTypeMutation) Int() (r int, exists bool)

Int returns the int value in the mutation.

func (*FieldTypeMutation) Int16 Uses

func (m *FieldTypeMutation) Int16() (r int16, exists bool)

Int16 returns the int16 value in the mutation.

func (*FieldTypeMutation) Int32 Uses

func (m *FieldTypeMutation) Int32() (r int32, exists bool)

Int32 returns the int32 value in the mutation.

func (*FieldTypeMutation) Int64 Uses

func (m *FieldTypeMutation) Int64() (r int64, exists bool)

Int64 returns the int64 value in the mutation.

func (*FieldTypeMutation) Int8 Uses

func (m *FieldTypeMutation) Int8() (r int8, exists bool)

Int8 returns the int8 value in the mutation.

func (m *FieldTypeMutation) Link() (r schema.Link, exists bool)

Link returns the link value in the mutation.

func (*FieldTypeMutation) LinkCleared Uses

func (m *FieldTypeMutation) LinkCleared() bool

LinkCleared returns if the field link was cleared in this mutation.

func (*FieldTypeMutation) Ndir Uses

func (m *FieldTypeMutation) Ndir() (r http.Dir, exists bool)

Ndir returns the ndir value in the mutation.

func (*FieldTypeMutation) NdirCleared Uses

func (m *FieldTypeMutation) NdirCleared() bool

NdirCleared returns if the field ndir was cleared in this mutation.

func (*FieldTypeMutation) NillableInt Uses

func (m *FieldTypeMutation) NillableInt() (r int, exists bool)

NillableInt returns the nillable_int value in the mutation.

func (*FieldTypeMutation) NillableInt16 Uses

func (m *FieldTypeMutation) NillableInt16() (r int16, exists bool)

NillableInt16 returns the nillable_int16 value in the mutation.

func (*FieldTypeMutation) NillableInt16Cleared Uses

func (m *FieldTypeMutation) NillableInt16Cleared() bool

NillableInt16Cleared returns if the field nillable_int16 was cleared in this mutation.

func (*FieldTypeMutation) NillableInt32 Uses

func (m *FieldTypeMutation) NillableInt32() (r int32, exists bool)

NillableInt32 returns the nillable_int32 value in the mutation.

func (*FieldTypeMutation) NillableInt32Cleared Uses

func (m *FieldTypeMutation) NillableInt32Cleared() bool

NillableInt32Cleared returns if the field nillable_int32 was cleared in this mutation.

func (*FieldTypeMutation) NillableInt64 Uses

func (m *FieldTypeMutation) NillableInt64() (r int64, exists bool)

NillableInt64 returns the nillable_int64 value in the mutation.

func (*FieldTypeMutation) NillableInt64Cleared Uses

func (m *FieldTypeMutation) NillableInt64Cleared() bool

NillableInt64Cleared returns if the field nillable_int64 was cleared in this mutation.

func (*FieldTypeMutation) NillableInt8 Uses

func (m *FieldTypeMutation) NillableInt8() (r int8, exists bool)

NillableInt8 returns the nillable_int8 value in the mutation.

func (*FieldTypeMutation) NillableInt8Cleared Uses

func (m *FieldTypeMutation) NillableInt8Cleared() bool

NillableInt8Cleared returns if the field nillable_int8 was cleared in this mutation.

func (*FieldTypeMutation) NillableIntCleared Uses

func (m *FieldTypeMutation) NillableIntCleared() bool

NillableIntCleared returns if the field nillable_int was cleared in this mutation.

func (*FieldTypeMutation) NullActive Uses

func (m *FieldTypeMutation) NullActive() (r schema.Status, exists bool)

NullActive returns the null_active value in the mutation.

func (*FieldTypeMutation) NullActiveCleared Uses

func (m *FieldTypeMutation) NullActiveCleared() bool

NullActiveCleared returns if the field null_active was cleared in this mutation.

func (*FieldTypeMutation) NullFloat Uses

func (m *FieldTypeMutation) NullFloat() (r sql.NullFloat64, exists bool)

NullFloat returns the null_float value in the mutation.

func (*FieldTypeMutation) NullFloatCleared Uses

func (m *FieldTypeMutation) NullFloatCleared() bool

NullFloatCleared returns if the field null_float was cleared in this mutation.

func (*FieldTypeMutation) NullInt64 Uses

func (m *FieldTypeMutation) NullInt64() (r sql.NullInt64, exists bool)

NullInt64 returns the null_int64 value in the mutation.

func (*FieldTypeMutation) NullInt64Cleared Uses

func (m *FieldTypeMutation) NullInt64Cleared() bool

NullInt64Cleared returns if the field null_int64 was cleared in this mutation.

func (m *FieldTypeMutation) NullLink() (r schema.Link, exists bool)

NullLink returns the null_link value in the mutation.

func (*FieldTypeMutation) NullLinkCleared Uses

func (m *FieldTypeMutation) NullLinkCleared() bool

NullLinkCleared returns if the field null_link was cleared in this mutation.

func (*FieldTypeMutation) NullStr Uses

func (m *FieldTypeMutation) NullStr() (r sql.NullString, exists bool)

NullStr returns the null_str value in the mutation.

func (*FieldTypeMutation) NullStrCleared Uses

func (m *FieldTypeMutation) NullStrCleared() bool

NullStrCleared returns if the field null_str was cleared in this mutation.

func (*FieldTypeMutation) OldActive Uses

func (m *FieldTypeMutation) OldActive(ctx context.Context) (v schema.Status, err error)

OldActive returns the old active value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldDatetime Uses

func (m *FieldTypeMutation) OldDatetime(ctx context.Context) (v time.Time, err error)

OldDatetime returns the old datetime value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldDecimal Uses

func (m *FieldTypeMutation) OldDecimal(ctx context.Context) (v float64, err error)

OldDecimal returns the old decimal value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldDeleted Uses

func (m *FieldTypeMutation) OldDeleted(ctx context.Context) (v sql.NullBool, err error)

OldDeleted returns the old deleted value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldDeletedAt Uses

func (m *FieldTypeMutation) OldDeletedAt(ctx context.Context) (v sql.NullTime, err error)

OldDeletedAt returns the old deleted_at value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldDir Uses

func (m *FieldTypeMutation) OldDir(ctx context.Context) (v http.Dir, err error)

OldDir returns the old dir value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldField Uses

func (m *FieldTypeMutation) 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 was failed.

func (*FieldTypeMutation) OldIP Uses

func (m *FieldTypeMutation) OldIP(ctx context.Context) (v net.IP, err error)

OldIP returns the old ip value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldInt Uses

func (m *FieldTypeMutation) OldInt(ctx context.Context) (v int, err error)

OldInt returns the old int value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldInt16 Uses

func (m *FieldTypeMutation) OldInt16(ctx context.Context) (v int16, err error)

OldInt16 returns the old int16 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldInt32 Uses

func (m *FieldTypeMutation) OldInt32(ctx context.Context) (v int32, err error)

OldInt32 returns the old int32 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldInt64 Uses

func (m *FieldTypeMutation) OldInt64(ctx context.Context) (v int64, err error)

OldInt64 returns the old int64 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldInt8 Uses

func (m *FieldTypeMutation) OldInt8(ctx context.Context) (v int8, err error)

OldInt8 returns the old int8 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (m *FieldTypeMutation) OldLink(ctx context.Context) (v schema.Link, err error)

OldLink returns the old link value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNdir Uses

func (m *FieldTypeMutation) OldNdir(ctx context.Context) (v *http.Dir, err error)

OldNdir returns the old ndir value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNillableInt Uses

func (m *FieldTypeMutation) OldNillableInt(ctx context.Context) (v *int, err error)

OldNillableInt returns the old nillable_int value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNillableInt16 Uses

func (m *FieldTypeMutation) OldNillableInt16(ctx context.Context) (v *int16, err error)

OldNillableInt16 returns the old nillable_int16 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNillableInt32 Uses

func (m *FieldTypeMutation) OldNillableInt32(ctx context.Context) (v *int32, err error)

OldNillableInt32 returns the old nillable_int32 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNillableInt64 Uses

func (m *FieldTypeMutation) OldNillableInt64(ctx context.Context) (v *int64, err error)

OldNillableInt64 returns the old nillable_int64 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNillableInt8 Uses

func (m *FieldTypeMutation) OldNillableInt8(ctx context.Context) (v *int8, err error)

OldNillableInt8 returns the old nillable_int8 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNullActive Uses

func (m *FieldTypeMutation) OldNullActive(ctx context.Context) (v *schema.Status, err error)

OldNullActive returns the old null_active value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNullFloat Uses

func (m *FieldTypeMutation) OldNullFloat(ctx context.Context) (v sql.NullFloat64, err error)

OldNullFloat returns the old null_float value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNullInt64 Uses

func (m *FieldTypeMutation) OldNullInt64(ctx context.Context) (v sql.NullInt64, err error)

OldNullInt64 returns the old null_int64 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (m *FieldTypeMutation) OldNullLink(ctx context.Context) (v *schema.Link, err error)

OldNullLink returns the old null_link value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldNullStr Uses

func (m *FieldTypeMutation) OldNullStr(ctx context.Context) (v *sql.NullString, err error)

OldNullStr returns the old null_str value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalFloat Uses

func (m *FieldTypeMutation) OldOptionalFloat(ctx context.Context) (v float64, err error)

OldOptionalFloat returns the old optional_float value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalFloat32 Uses

func (m *FieldTypeMutation) OldOptionalFloat32(ctx context.Context) (v float32, err error)

OldOptionalFloat32 returns the old optional_float32 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalInt Uses

func (m *FieldTypeMutation) OldOptionalInt(ctx context.Context) (v int, err error)

OldOptionalInt returns the old optional_int value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalInt16 Uses

func (m *FieldTypeMutation) OldOptionalInt16(ctx context.Context) (v int16, err error)

OldOptionalInt16 returns the old optional_int16 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalInt32 Uses

func (m *FieldTypeMutation) OldOptionalInt32(ctx context.Context) (v int32, err error)

OldOptionalInt32 returns the old optional_int32 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalInt64 Uses

func (m *FieldTypeMutation) OldOptionalInt64(ctx context.Context) (v int64, err error)

OldOptionalInt64 returns the old optional_int64 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalInt8 Uses

func (m *FieldTypeMutation) OldOptionalInt8(ctx context.Context) (v int8, err error)

OldOptionalInt8 returns the old optional_int8 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalUint Uses

func (m *FieldTypeMutation) OldOptionalUint(ctx context.Context) (v uint, err error)

OldOptionalUint returns the old optional_uint value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalUint16 Uses

func (m *FieldTypeMutation) OldOptionalUint16(ctx context.Context) (v uint16, err error)

OldOptionalUint16 returns the old optional_uint16 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalUint32 Uses

func (m *FieldTypeMutation) OldOptionalUint32(ctx context.Context) (v uint32, err error)

OldOptionalUint32 returns the old optional_uint32 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalUint64 Uses

func (m *FieldTypeMutation) OldOptionalUint64(ctx context.Context) (v uint64, err error)

OldOptionalUint64 returns the old optional_uint64 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldOptionalUint8 Uses

func (m *FieldTypeMutation) OldOptionalUint8(ctx context.Context) (v uint8, err error)

OldOptionalUint8 returns the old optional_uint8 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldSchemaFloat Uses

func (m *FieldTypeMutation) OldSchemaFloat(ctx context.Context) (v schema.Float64, err error)

OldSchemaFloat returns the old schema_float value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldSchemaFloat32 Uses

func (m *FieldTypeMutation) OldSchemaFloat32(ctx context.Context) (v schema.Float32, err error)

OldSchemaFloat32 returns the old schema_float32 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldSchemaInt Uses

func (m *FieldTypeMutation) OldSchemaInt(ctx context.Context) (v schema.Int, err error)

OldSchemaInt returns the old schema_int value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldSchemaInt64 Uses

func (m *FieldTypeMutation) OldSchemaInt64(ctx context.Context) (v schema.Int64, err error)

OldSchemaInt64 returns the old schema_int64 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldSchemaInt8 Uses

func (m *FieldTypeMutation) OldSchemaInt8(ctx context.Context) (v schema.Int8, err error)

OldSchemaInt8 returns the old schema_int8 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldState Uses

func (m *FieldTypeMutation) OldState(ctx context.Context) (v fieldtype.State, err error)

OldState returns the old state value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldStr Uses

func (m *FieldTypeMutation) OldStr(ctx context.Context) (v sql.NullString, err error)

OldStr returns the old str value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.

func (*FieldTypeMutation) OldValidateOptionalInt32 Uses

func (m *FieldTypeMutation) OldValidateOptionalInt32(ctx context.Context) (v int32, err error)

OldValidateOptionalInt32 returns the old validate_optional_int32 value of the FieldType. If the FieldType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or databas