ent

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

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

	// Node types.
	TypeAdmin         = "Admin"
	TypeDatum         = "Datum"
	TypeParticipant   = "Participant"
	TypeParticipation = "Participation"
	TypeProject       = "Project"
	TypeProviderID    = "ProviderID"
	TypeRun           = "Run"
	TypeStep          = "Step"
	TypeStepRun       = "StepRun"
	TypeTemplate      = "Template"
)

Variables

This section is empty.

Functions

func AddParticipantFromImport

func AddParticipantFromImport(ctx context.Context, tx *Tx, importedParticipant *model.ImportedParticipant, admin *Admin, project *Project) error

AddParticipantFromImport will add partcipant from file

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks nor found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Client attached.

func WithTx

func WithTx(ctx context.Context, client *Client, fn func(tx *Tx) error) error

Types

type Admin

type Admin struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AdminQuery when eager-loading is set.
	Edges AdminEdges `json:"edges"`
	// contains filtered or unexported fields
}

Admin is the model entity for the Admin schema.

func (*Admin) IsUser

func (a *Admin) IsUser()

func (*Admin) QueryImportedParticipants

func (a *Admin) QueryImportedParticipants() *ParticipantQuery

QueryImportedParticipants queries the importedParticipants edge of the Admin.

func (*Admin) QueryProjects

func (a *Admin) QueryProjects() *ProjectQuery

QueryProjects queries the projects edge of the Admin.

func (*Admin) QueryTemplates

func (a *Admin) QueryTemplates() *TemplateQuery

QueryTemplates queries the templates edge of the Admin.

func (*Admin) String

func (a *Admin) String() string

String implements the fmt.Stringer.

func (*Admin) Unwrap

func (a *Admin) Unwrap() *Admin

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 (*Admin) Update

func (a *Admin) Update() *AdminUpdateOne

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

type AdminClient

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

AdminClient is a client for the Admin schema.

func NewAdminClient

func NewAdminClient(c config) *AdminClient

NewAdminClient returns a client for the Admin from the given config.

func (*AdminClient) Create

func (c *AdminClient) Create() *AdminCreate

Create returns a create builder for Admin.

func (*AdminClient) CreateBulk

func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk

BulkCreate returns a builder for creating a bulk of Admin entities.

func (*AdminClient) Delete

func (c *AdminClient) Delete() *AdminDelete

Delete returns a delete builder for Admin.

func (*AdminClient) DeleteOne

func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*AdminClient) DeleteOneID

func (c *AdminClient) DeleteOneID(id string) *AdminDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*AdminClient) Get

func (c *AdminClient) Get(ctx context.Context, id string) (*Admin, error)

Get returns a Admin entity by its id.

func (*AdminClient) GetX

func (c *AdminClient) GetX(ctx context.Context, id string) *Admin

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

func (*AdminClient) Hooks

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

Hooks returns the client hooks.

func (*AdminClient) Query

func (c *AdminClient) Query() *AdminQuery

Query returns a query builder for Admin.

func (*AdminClient) QueryImportedParticipants

func (c *AdminClient) QueryImportedParticipants(a *Admin) *ParticipantQuery

QueryImportedParticipants queries the importedParticipants edge of a Admin.

func (*AdminClient) QueryProjects

func (c *AdminClient) QueryProjects(a *Admin) *ProjectQuery

QueryProjects queries the projects edge of a Admin.

func (*AdminClient) QueryTemplates

func (c *AdminClient) QueryTemplates(a *Admin) *TemplateQuery

QueryTemplates queries the templates edge of a Admin.

func (*AdminClient) Update

func (c *AdminClient) Update() *AdminUpdate

Update returns an update builder for Admin.

func (*AdminClient) UpdateOne

func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AdminClient) UpdateOneID

func (c *AdminClient) UpdateOneID(id string) *AdminUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AdminClient) Use

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

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

type AdminCreate

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

AdminCreate is the builder for creating a Admin entity.

func (*AdminCreate) AddImportedParticipantIDs

func (ac *AdminCreate) AddImportedParticipantIDs(ids ...string) *AdminCreate

AddImportedParticipantIDs adds the importedParticipants edge to Participant by ids.

func (*AdminCreate) AddImportedParticipants

func (ac *AdminCreate) AddImportedParticipants(p ...*Participant) *AdminCreate

AddImportedParticipants adds the importedParticipants edges to Participant.

func (*AdminCreate) AddProjectIDs

func (ac *AdminCreate) AddProjectIDs(ids ...string) *AdminCreate

AddProjectIDs adds the projects edge to Project by ids.

func (*AdminCreate) AddProjects

func (ac *AdminCreate) AddProjects(p ...*Project) *AdminCreate

AddProjects adds the projects edges to Project.

func (*AdminCreate) AddTemplateIDs

func (ac *AdminCreate) AddTemplateIDs(ids ...string) *AdminCreate

AddTemplateIDs adds the templates edge to Template by ids.

func (*AdminCreate) AddTemplates

func (ac *AdminCreate) AddTemplates(t ...*Template) *AdminCreate

AddTemplates adds the templates edges to Template.

func (*AdminCreate) Mutation

func (ac *AdminCreate) Mutation() *AdminMutation

Mutation returns the AdminMutation object of the builder.

func (*AdminCreate) Save

func (ac *AdminCreate) Save(ctx context.Context) (*Admin, error)

Save creates the Admin in the database.

func (*AdminCreate) SaveX

func (ac *AdminCreate) SaveX(ctx context.Context) *Admin

SaveX calls Save and panics if Save returns an error.

func (*AdminCreate) SetCreatedAt

func (ac *AdminCreate) SetCreatedAt(t time.Time) *AdminCreate

SetCreatedAt sets the created_at field.

func (*AdminCreate) SetID

func (ac *AdminCreate) SetID(s string) *AdminCreate

SetID sets the id field.

func (*AdminCreate) SetName

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

SetName sets the name field.

func (*AdminCreate) SetNillableCreatedAt

func (ac *AdminCreate) SetNillableCreatedAt(t *time.Time) *AdminCreate

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

func (*AdminCreate) SetNillableUpdatedAt

func (ac *AdminCreate) SetNillableUpdatedAt(t *time.Time) *AdminCreate

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

func (*AdminCreate) SetUpdatedAt

func (ac *AdminCreate) SetUpdatedAt(t time.Time) *AdminCreate

SetUpdatedAt sets the updated_at field.

func (*AdminCreate) SetUsername

func (ac *AdminCreate) SetUsername(s string) *AdminCreate

SetUsername sets the username field.

type AdminCreateBulk

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

AdminCreateBulk is the builder for creating a bulk of Admin entities.

func (*AdminCreateBulk) Save

func (acb *AdminCreateBulk) Save(ctx context.Context) ([]*Admin, error)

Save creates the Admin entities in the database.

func (*AdminCreateBulk) SaveX

func (acb *AdminCreateBulk) SaveX(ctx context.Context) []*Admin

SaveX calls Save and panics if Save returns an error.

type AdminDelete

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

AdminDelete is the builder for deleting a Admin entity.

func (*AdminDelete) Exec

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

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

func (*AdminDelete) ExecX

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

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

func (*AdminDelete) Where

func (ad *AdminDelete) Where(ps ...predicate.Admin) *AdminDelete

Where adds a new predicate to the delete builder.

type AdminDeleteOne

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

AdminDeleteOne is the builder for deleting a single Admin entity.

func (*AdminDeleteOne) Exec

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

Exec executes the deletion query.

func (*AdminDeleteOne) ExecX

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

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

type AdminEdges

type AdminEdges struct {
	// Projects holds the value of the projects edge.
	Projects []*Project
	// Templates holds the value of the templates edge.
	Templates []*Template
	// ImportedParticipants holds the value of the importedParticipants edge.
	ImportedParticipants []*Participant
	// contains filtered or unexported fields
}

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

func (AdminEdges) ImportedParticipantsOrErr

func (e AdminEdges) ImportedParticipantsOrErr() ([]*Participant, error)

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

func (AdminEdges) ProjectsOrErr

func (e AdminEdges) ProjectsOrErr() ([]*Project, error)

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

func (AdminEdges) TemplatesOrErr

func (e AdminEdges) TemplatesOrErr() ([]*Template, error)

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

type AdminGroupBy

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

AdminGroupBy is the builder for group-by Admin entities.

func (*AdminGroupBy) Aggregate

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

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

func (*AdminGroupBy) Bool

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

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

func (*AdminGroupBy) BoolX

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

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

func (*AdminGroupBy) Bools

func (agb *AdminGroupBy) 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 (*AdminGroupBy) BoolsX

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

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

func (*AdminGroupBy) Float64

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

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

func (*AdminGroupBy) Float64X

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

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

func (*AdminGroupBy) Float64s

func (agb *AdminGroupBy) 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 (*AdminGroupBy) Float64sX

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

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

func (*AdminGroupBy) Int

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

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

func (*AdminGroupBy) IntX

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

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

func (*AdminGroupBy) Ints

func (agb *AdminGroupBy) 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 (*AdminGroupBy) IntsX

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

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

func (*AdminGroupBy) Scan

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

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

func (*AdminGroupBy) ScanX

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

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

func (*AdminGroupBy) String

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

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

func (*AdminGroupBy) StringX

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

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

func (*AdminGroupBy) Strings

func (agb *AdminGroupBy) 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 (*AdminGroupBy) StringsX

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

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

type AdminMutation

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

AdminMutation represents an operation that mutate the Admins nodes in the graph.

func (*AdminMutation) AddField

func (m *AdminMutation) 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 (*AdminMutation) AddImportedParticipantIDs

func (m *AdminMutation) AddImportedParticipantIDs(ids ...string)

AddImportedParticipantIDs adds the importedParticipants edge to Participant by ids.

func (*AdminMutation) AddProjectIDs

func (m *AdminMutation) AddProjectIDs(ids ...string)

AddProjectIDs adds the projects edge to Project by ids.

func (*AdminMutation) AddTemplateIDs

func (m *AdminMutation) AddTemplateIDs(ids ...string)

AddTemplateIDs adds the templates edge to Template by ids.

func (*AdminMutation) AddedEdges

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

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

func (*AdminMutation) AddedField

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

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

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

func (*AdminMutation) AddedIDs

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

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

func (*AdminMutation) ClearEdge

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

func (m *AdminMutation) 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 (*AdminMutation) ClearImportedParticipants

func (m *AdminMutation) ClearImportedParticipants()

ClearImportedParticipants clears the importedParticipants edge to Participant.

func (*AdminMutation) ClearProjects

func (m *AdminMutation) ClearProjects()

ClearProjects clears the projects edge to Project.

func (*AdminMutation) ClearTemplates

func (m *AdminMutation) ClearTemplates()

ClearTemplates clears the templates edge to Template.

func (*AdminMutation) ClearedEdges

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

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

func (*AdminMutation) ClearedFields

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

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

func (AdminMutation) Client

func (m AdminMutation) 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 (*AdminMutation) CreatedAt

func (m *AdminMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*AdminMutation) EdgeCleared

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

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

func (*AdminMutation) Field

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

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

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

func (*AdminMutation) Fields

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

func (m *AdminMutation) ID() (id string, 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 (*AdminMutation) ImportedParticipantsCleared

func (m *AdminMutation) ImportedParticipantsCleared() bool

ImportedParticipantsCleared returns if the edge importedParticipants was cleared.

func (*AdminMutation) ImportedParticipantsIDs

func (m *AdminMutation) ImportedParticipantsIDs() (ids []string)

ImportedParticipantsIDs returns the importedParticipants ids in the mutation.

func (*AdminMutation) Name

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

Name returns the name value in the mutation.

func (*AdminMutation) OldCreatedAt

func (m *AdminMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Admin. If the Admin object wasn'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 (*AdminMutation) OldField

func (m *AdminMutation) 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 (*AdminMutation) OldName

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

OldName returns the old name value of the Admin. If the Admin object wasn'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 (*AdminMutation) OldUpdatedAt

func (m *AdminMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Admin. If the Admin object wasn'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 (*AdminMutation) OldUsername

func (m *AdminMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old username value of the Admin. If the Admin object wasn'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 (*AdminMutation) Op

func (m *AdminMutation) Op() Op

Op returns the operation name.

func (*AdminMutation) ProjectsCleared

func (m *AdminMutation) ProjectsCleared() bool

ProjectsCleared returns if the edge projects was cleared.

func (*AdminMutation) ProjectsIDs

func (m *AdminMutation) ProjectsIDs() (ids []string)

ProjectsIDs returns the projects ids in the mutation.

func (*AdminMutation) RemoveImportedParticipantIDs

func (m *AdminMutation) RemoveImportedParticipantIDs(ids ...string)

RemoveImportedParticipantIDs removes the importedParticipants edge to Participant by ids.

func (*AdminMutation) RemoveProjectIDs

func (m *AdminMutation) RemoveProjectIDs(ids ...string)

RemoveProjectIDs removes the projects edge to Project by ids.

func (*AdminMutation) RemoveTemplateIDs

func (m *AdminMutation) RemoveTemplateIDs(ids ...string)

RemoveTemplateIDs removes the templates edge to Template by ids.

func (*AdminMutation) RemovedEdges

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

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

func (*AdminMutation) RemovedIDs

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

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

func (*AdminMutation) RemovedImportedParticipantsIDs

func (m *AdminMutation) RemovedImportedParticipantsIDs() (ids []string)

RemovedImportedParticipants returns the removed ids of importedParticipants.

func (*AdminMutation) RemovedProjectsIDs

func (m *AdminMutation) RemovedProjectsIDs() (ids []string)

RemovedProjects returns the removed ids of projects.

func (*AdminMutation) RemovedTemplatesIDs

func (m *AdminMutation) RemovedTemplatesIDs() (ids []string)

RemovedTemplates returns the removed ids of templates.

func (*AdminMutation) ResetCreatedAt

func (m *AdminMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*AdminMutation) ResetEdge

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

func (m *AdminMutation) 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 (*AdminMutation) ResetImportedParticipants

func (m *AdminMutation) ResetImportedParticipants()

ResetImportedParticipants reset all changes of the "importedParticipants" edge.

func (*AdminMutation) ResetName

func (m *AdminMutation) ResetName()

ResetName reset all changes of the "name" field.

func (*AdminMutation) ResetProjects

func (m *AdminMutation) ResetProjects()

ResetProjects reset all changes of the "projects" edge.

func (*AdminMutation) ResetTemplates

func (m *AdminMutation) ResetTemplates()

ResetTemplates reset all changes of the "templates" edge.

func (*AdminMutation) ResetUpdatedAt

func (m *AdminMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*AdminMutation) ResetUsername

func (m *AdminMutation) ResetUsername()

ResetUsername reset all changes of the "username" field.

func (*AdminMutation) SetCreatedAt

func (m *AdminMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*AdminMutation) SetField

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

func (m *AdminMutation) SetID(id string)

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

func (*AdminMutation) SetName

func (m *AdminMutation) SetName(s string)

SetName sets the name field.

func (*AdminMutation) SetUpdatedAt

func (m *AdminMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*AdminMutation) SetUsername

func (m *AdminMutation) SetUsername(s string)

SetUsername sets the username field.

func (*AdminMutation) TemplatesCleared

func (m *AdminMutation) TemplatesCleared() bool

TemplatesCleared returns if the edge templates was cleared.

func (*AdminMutation) TemplatesIDs

func (m *AdminMutation) TemplatesIDs() (ids []string)

TemplatesIDs returns the templates ids in the mutation.

func (AdminMutation) Tx

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

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

func (*AdminMutation) Type

func (m *AdminMutation) Type() string

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

func (*AdminMutation) UpdatedAt

func (m *AdminMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

func (*AdminMutation) Username

func (m *AdminMutation) Username() (r string, exists bool)

Username returns the username value in the mutation.

type AdminQuery

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

AdminQuery is the builder for querying Admin entities.

func (*AdminQuery) All

func (aq *AdminQuery) All(ctx context.Context) ([]*Admin, error)

All executes the query and returns a list of Admins.

func (*AdminQuery) AllX

func (aq *AdminQuery) AllX(ctx context.Context) []*Admin

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

func (*AdminQuery) Clone

func (aq *AdminQuery) Clone() *AdminQuery

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 (*AdminQuery) Count

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

Count returns the count of the given query.

func (*AdminQuery) CountX

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

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

func (*AdminQuery) Exist

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

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

func (*AdminQuery) ExistX

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

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

func (*AdminQuery) First

func (aq *AdminQuery) First(ctx context.Context) (*Admin, error)

First returns the first Admin entity in the query. Returns *NotFoundError when no admin was found.

func (*AdminQuery) FirstID

func (aq *AdminQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*AdminQuery) FirstX

func (aq *AdminQuery) FirstX(ctx context.Context) *Admin

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

func (*AdminQuery) FirstXID

func (aq *AdminQuery) FirstXID(ctx context.Context) string

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

func (*AdminQuery) GroupBy

func (aq *AdminQuery) GroupBy(field string, fields ...string) *AdminGroupBy

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

client.Admin.Query().
	GroupBy(admin.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AdminQuery) IDs

func (aq *AdminQuery) IDs(ctx context.Context) ([]string, error)

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

func (*AdminQuery) IDsX

func (aq *AdminQuery) IDsX(ctx context.Context) []string

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

func (*AdminQuery) Limit

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

Limit adds a limit step to the query.

func (*AdminQuery) Offset

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

Offset adds an offset step to the query.

func (*AdminQuery) Only

func (aq *AdminQuery) Only(ctx context.Context) (*Admin, error)

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

func (*AdminQuery) OnlyID

func (aq *AdminQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*AdminQuery) OnlyIDX

func (aq *AdminQuery) OnlyIDX(ctx context.Context) string

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

func (*AdminQuery) OnlyX

func (aq *AdminQuery) OnlyX(ctx context.Context) *Admin

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

func (*AdminQuery) Order

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

Order adds an order step to the query.

func (*AdminQuery) QueryImportedParticipants

func (aq *AdminQuery) QueryImportedParticipants() *ParticipantQuery

QueryImportedParticipants chains the current query on the importedParticipants edge.

func (*AdminQuery) QueryProjects

func (aq *AdminQuery) QueryProjects() *ProjectQuery

QueryProjects chains the current query on the projects edge.

func (*AdminQuery) QueryTemplates

func (aq *AdminQuery) QueryTemplates() *TemplateQuery

QueryTemplates chains the current query on the templates edge.

func (*AdminQuery) Select

func (aq *AdminQuery) Select(field string, fields ...string) *AdminSelect

Select one or more fields from the given query.

Example:

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

client.Admin.Query().
	Select(admin.FieldCreatedAt).
	Scan(ctx, &v)

func (*AdminQuery) Where

func (aq *AdminQuery) Where(ps ...predicate.Admin) *AdminQuery

Where adds a new predicate for the builder.

func (*AdminQuery) WithImportedParticipants

func (aq *AdminQuery) WithImportedParticipants(opts ...func(*ParticipantQuery)) *AdminQuery
WithImportedParticipants tells the query-builder to eager-loads the nodes that are connected to

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

func (*AdminQuery) WithProjects

func (aq *AdminQuery) WithProjects(opts ...func(*ProjectQuery)) *AdminQuery
WithProjects tells the query-builder to eager-loads the nodes that are connected to

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

func (*AdminQuery) WithTemplates

func (aq *AdminQuery) WithTemplates(opts ...func(*TemplateQuery)) *AdminQuery
WithTemplates tells the query-builder to eager-loads the nodes that are connected to

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

type AdminSelect

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

AdminSelect is the builder for select fields of Admin entities.

func (*AdminSelect) Bool

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

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

func (*AdminSelect) BoolX

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

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

func (*AdminSelect) Bools

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

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

func (*AdminSelect) BoolsX

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

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

func (*AdminSelect) Float64

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

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

func (*AdminSelect) Float64X

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

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

func (*AdminSelect) Float64s

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

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

func (*AdminSelect) Float64sX

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

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

func (*AdminSelect) Int

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

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

func (*AdminSelect) IntX

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

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

func (*AdminSelect) Ints

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

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

func (*AdminSelect) IntsX

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

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

func (*AdminSelect) Scan

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

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

func (*AdminSelect) ScanX

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

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

func (*AdminSelect) String

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

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

func (*AdminSelect) StringX

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

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

func (*AdminSelect) Strings

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

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

func (*AdminSelect) StringsX

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

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

type AdminUpdate

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

AdminUpdate is the builder for updating Admin entities.

func (*AdminUpdate) AddImportedParticipantIDs

func (au *AdminUpdate) AddImportedParticipantIDs(ids ...string) *AdminUpdate

AddImportedParticipantIDs adds the importedParticipants edge to Participant by ids.

func (*AdminUpdate) AddImportedParticipants

func (au *AdminUpdate) AddImportedParticipants(p ...*Participant) *AdminUpdate

AddImportedParticipants adds the importedParticipants edges to Participant.

func (*AdminUpdate) AddProjectIDs

func (au *AdminUpdate) AddProjectIDs(ids ...string) *AdminUpdate

AddProjectIDs adds the projects edge to Project by ids.

func (*AdminUpdate) AddProjects

func (au *AdminUpdate) AddProjects(p ...*Project) *AdminUpdate

AddProjects adds the projects edges to Project.

func (*AdminUpdate) AddTemplateIDs

func (au *AdminUpdate) AddTemplateIDs(ids ...string) *AdminUpdate

AddTemplateIDs adds the templates edge to Template by ids.

func (*AdminUpdate) AddTemplates

func (au *AdminUpdate) AddTemplates(t ...*Template) *AdminUpdate

AddTemplates adds the templates edges to Template.

func (*AdminUpdate) ClearImportedParticipants

func (au *AdminUpdate) ClearImportedParticipants() *AdminUpdate

ClearImportedParticipants clears all "importedParticipants" edges to type Participant.

func (*AdminUpdate) ClearProjects

func (au *AdminUpdate) ClearProjects() *AdminUpdate

ClearProjects clears all "projects" edges to type Project.

func (*AdminUpdate) ClearTemplates

func (au *AdminUpdate) ClearTemplates() *AdminUpdate

ClearTemplates clears all "templates" edges to type Template.

func (*AdminUpdate) Exec

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

Exec executes the query.

func (*AdminUpdate) ExecX

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

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

func (*AdminUpdate) Mutation

func (au *AdminUpdate) Mutation() *AdminMutation

Mutation returns the AdminMutation object of the builder.

func (*AdminUpdate) RemoveImportedParticipantIDs

func (au *AdminUpdate) RemoveImportedParticipantIDs(ids ...string) *AdminUpdate

RemoveImportedParticipantIDs removes the importedParticipants edge to Participant by ids.

func (*AdminUpdate) RemoveImportedParticipants

func (au *AdminUpdate) RemoveImportedParticipants(p ...*Participant) *AdminUpdate

RemoveImportedParticipants removes importedParticipants edges to Participant.

func (*AdminUpdate) RemoveProjectIDs

func (au *AdminUpdate) RemoveProjectIDs(ids ...string) *AdminUpdate

RemoveProjectIDs removes the projects edge to Project by ids.

func (*AdminUpdate) RemoveProjects

func (au *AdminUpdate) RemoveProjects(p ...*Project) *AdminUpdate

RemoveProjects removes projects edges to Project.

func (*AdminUpdate) RemoveTemplateIDs

func (au *AdminUpdate) RemoveTemplateIDs(ids ...string) *AdminUpdate

RemoveTemplateIDs removes the templates edge to Template by ids.

func (*AdminUpdate) RemoveTemplates

func (au *AdminUpdate) RemoveTemplates(t ...*Template) *AdminUpdate

RemoveTemplates removes templates edges to Template.

func (*AdminUpdate) Save

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

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

func (*AdminUpdate) SaveX

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

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

func (*AdminUpdate) SetName

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

SetName sets the name field.

func (*AdminUpdate) SetUpdatedAt

func (au *AdminUpdate) SetUpdatedAt(t time.Time) *AdminUpdate

SetUpdatedAt sets the updated_at field.

func (*AdminUpdate) SetUsername

func (au *AdminUpdate) SetUsername(s string) *AdminUpdate

SetUsername sets the username field.

func (*AdminUpdate) Where

func (au *AdminUpdate) Where(ps ...predicate.Admin) *AdminUpdate

Where adds a new predicate for the builder.

type AdminUpdateOne

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

AdminUpdateOne is the builder for updating a single Admin entity.

func (*AdminUpdateOne) AddImportedParticipantIDs

func (auo *AdminUpdateOne) AddImportedParticipantIDs(ids ...string) *AdminUpdateOne

AddImportedParticipantIDs adds the importedParticipants edge to Participant by ids.

func (*AdminUpdateOne) AddImportedParticipants

func (auo *AdminUpdateOne) AddImportedParticipants(p ...*Participant) *AdminUpdateOne

AddImportedParticipants adds the importedParticipants edges to Participant.

func (*AdminUpdateOne) AddProjectIDs

func (auo *AdminUpdateOne) AddProjectIDs(ids ...string) *AdminUpdateOne

AddProjectIDs adds the projects edge to Project by ids.

func (*AdminUpdateOne) AddProjects

func (auo *AdminUpdateOne) AddProjects(p ...*Project) *AdminUpdateOne

AddProjects adds the projects edges to Project.

func (*AdminUpdateOne) AddTemplateIDs

func (auo *AdminUpdateOne) AddTemplateIDs(ids ...string) *AdminUpdateOne

AddTemplateIDs adds the templates edge to Template by ids.

func (*AdminUpdateOne) AddTemplates

func (auo *AdminUpdateOne) AddTemplates(t ...*Template) *AdminUpdateOne

AddTemplates adds the templates edges to Template.

func (*AdminUpdateOne) ClearImportedParticipants

func (auo *AdminUpdateOne) ClearImportedParticipants() *AdminUpdateOne

ClearImportedParticipants clears all "importedParticipants" edges to type Participant.

func (*AdminUpdateOne) ClearProjects

func (auo *AdminUpdateOne) ClearProjects() *AdminUpdateOne

ClearProjects clears all "projects" edges to type Project.

func (*AdminUpdateOne) ClearTemplates

func (auo *AdminUpdateOne) ClearTemplates() *AdminUpdateOne

ClearTemplates clears all "templates" edges to type Template.

func (*AdminUpdateOne) Exec

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

Exec executes the query on the entity.

func (*AdminUpdateOne) ExecX

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

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

func (*AdminUpdateOne) Mutation

func (auo *AdminUpdateOne) Mutation() *AdminMutation

Mutation returns the AdminMutation object of the builder.

func (*AdminUpdateOne) RemoveImportedParticipantIDs

func (auo *AdminUpdateOne) RemoveImportedParticipantIDs(ids ...string) *AdminUpdateOne

RemoveImportedParticipantIDs removes the importedParticipants edge to Participant by ids.

func (*AdminUpdateOne) RemoveImportedParticipants

func (auo *AdminUpdateOne) RemoveImportedParticipants(p ...*Participant) *AdminUpdateOne

RemoveImportedParticipants removes importedParticipants edges to Participant.

func (*AdminUpdateOne) RemoveProjectIDs

func (auo *AdminUpdateOne) RemoveProjectIDs(ids ...string) *AdminUpdateOne

RemoveProjectIDs removes the projects edge to Project by ids.

func (*AdminUpdateOne) RemoveProjects

func (auo *AdminUpdateOne) RemoveProjects(p ...*Project) *AdminUpdateOne

RemoveProjects removes projects edges to Project.

func (*AdminUpdateOne) RemoveTemplateIDs

func (auo *AdminUpdateOne) RemoveTemplateIDs(ids ...string) *AdminUpdateOne

RemoveTemplateIDs removes the templates edge to Template by ids.

func (*AdminUpdateOne) RemoveTemplates

func (auo *AdminUpdateOne) RemoveTemplates(t ...*Template) *AdminUpdateOne

RemoveTemplates removes templates edges to Template.

func (*AdminUpdateOne) Save

func (auo *AdminUpdateOne) Save(ctx context.Context) (*Admin, error)

Save executes the query and returns the updated entity.

func (*AdminUpdateOne) SaveX

func (auo *AdminUpdateOne) SaveX(ctx context.Context) *Admin

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

func (*AdminUpdateOne) SetName

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

SetName sets the name field.

func (*AdminUpdateOne) SetUpdatedAt

func (auo *AdminUpdateOne) SetUpdatedAt(t time.Time) *AdminUpdateOne

SetUpdatedAt sets the updated_at field.

func (*AdminUpdateOne) SetUsername

func (auo *AdminUpdateOne) SetUsername(s string) *AdminUpdateOne

SetUsername sets the username field.

type Admins

type Admins []*Admin

Admins is a parsable slice of Admin.

type AggregateFunc

type AggregateFunc func(*sql.Selector, func(string) bool) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Admin is the client for interacting with the Admin builders.
	Admin *AdminClient
	// Datum is the client for interacting with the Datum builders.
	Datum *DatumClient
	// Participant is the client for interacting with the Participant builders.
	Participant *ParticipantClient
	// Participation is the client for interacting with the Participation builders.
	Participation *ParticipationClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// ProviderID is the client for interacting with the ProviderID builders.
	ProviderID *ProviderIDClient
	// Run is the client for interacting with the Run builders.
	Run *RunClient
	// Step is the client for interacting with the Step builders.
	Step *StepClient
	// StepRun is the client for interacting with the StepRun builders.
	StepRun *StepRunClient
	// Template is the client for interacting with the Template builders.
	Template *TemplateClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

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

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

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

BeginTx returns a transactional client with options.

func (*Client) Close

func (c *Client) Close() error

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

func (*Client) Debug

func (c *Client) Debug() *Client

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

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

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Committer method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Data

type Data []*Datum

Data is a parsable slice of Datum.

type Datum

type Datum struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Val holds the value of the "val" field.
	Val string `json:"val,omitempty"`
	// Index holds the value of the "index" field.
	Index int `json:"index,omitempty"`
	// Current holds the value of the "current" field.
	Current bool `json:"current,omitempty"`
	// Version holds the value of the "version" field.
	Version int `json:"version,omitempty"`
	// DeletedAt holds the value of the "deletedAt" field.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DatumQuery when eager-loading is set.
	Edges DatumEdges `json:"edges"`
	// contains filtered or unexported fields
}

Datum is the model entity for the Datum schema.

func SetDatum

func SetDatum(ctx context.Context, tx *Tx, p *Participant, key string, val string, isAppend bool) (*Datum, error)

SetDatum sets a new datum version respecting all the rules.

func (*Datum) QueryParticipant

func (d *Datum) QueryParticipant() *ParticipantQuery

QueryParticipant queries the participant edge of the Datum.

func (*Datum) String

func (d *Datum) String() string

String implements the fmt.Stringer.

func (*Datum) Unwrap

func (d *Datum) Unwrap() *Datum

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 (*Datum) Update

func (d *Datum) Update() *DatumUpdateOne

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

type DatumClient

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

DatumClient is a client for the Datum schema.

func NewDatumClient

func NewDatumClient(c config) *DatumClient

NewDatumClient returns a client for the Datum from the given config.

func (*DatumClient) Create

func (c *DatumClient) Create() *DatumCreate

Create returns a create builder for Datum.

func (*DatumClient) CreateBulk

func (c *DatumClient) CreateBulk(builders ...*DatumCreate) *DatumCreateBulk

BulkCreate returns a builder for creating a bulk of Datum entities.

func (*DatumClient) Delete

func (c *DatumClient) Delete() *DatumDelete

Delete returns a delete builder for Datum.

func (*DatumClient) DeleteOne

func (c *DatumClient) DeleteOne(d *Datum) *DatumDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*DatumClient) DeleteOneID

func (c *DatumClient) DeleteOneID(id string) *DatumDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*DatumClient) Get

func (c *DatumClient) Get(ctx context.Context, id string) (*Datum, error)

Get returns a Datum entity by its id.

func (*DatumClient) GetX

func (c *DatumClient) GetX(ctx context.Context, id string) *Datum

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

func (*DatumClient) Hooks

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

Hooks returns the client hooks.

func (*DatumClient) Query

func (c *DatumClient) Query() *DatumQuery

Query returns a query builder for Datum.

func (*DatumClient) QueryParticipant

func (c *DatumClient) QueryParticipant(d *Datum) *ParticipantQuery

QueryParticipant queries the participant edge of a Datum.

func (*DatumClient) Update

func (c *DatumClient) Update() *DatumUpdate

Update returns an update builder for Datum.

func (*DatumClient) UpdateOne

func (c *DatumClient) UpdateOne(d *Datum) *DatumUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DatumClient) UpdateOneID

func (c *DatumClient) UpdateOneID(id string) *DatumUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DatumClient) Use

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

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

type DatumCreate

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

DatumCreate is the builder for creating a Datum entity.

func (*DatumCreate) Mutation

func (dc *DatumCreate) Mutation() *DatumMutation

Mutation returns the DatumMutation object of the builder.

func (*DatumCreate) Save

func (dc *DatumCreate) Save(ctx context.Context) (*Datum, error)

Save creates the Datum in the database.

func (*DatumCreate) SaveX

func (dc *DatumCreate) SaveX(ctx context.Context) *Datum

SaveX calls Save and panics if Save returns an error.

func (*DatumCreate) SetCreatedAt

func (dc *DatumCreate) SetCreatedAt(t time.Time) *DatumCreate

SetCreatedAt sets the created_at field.

func (*DatumCreate) SetCurrent

func (dc *DatumCreate) SetCurrent(b bool) *DatumCreate

SetCurrent sets the current field.

func (*DatumCreate) SetDeletedAt

func (dc *DatumCreate) SetDeletedAt(t time.Time) *DatumCreate

SetDeletedAt sets the deletedAt field.

func (*DatumCreate) SetID

func (dc *DatumCreate) SetID(s string) *DatumCreate

SetID sets the id field.

func (*DatumCreate) SetIndex

func (dc *DatumCreate) SetIndex(i int) *DatumCreate

SetIndex sets the index field.

func (*DatumCreate) SetKey

func (dc *DatumCreate) SetKey(s string) *DatumCreate

SetKey sets the key field.

func (*DatumCreate) SetNillableCreatedAt

func (dc *DatumCreate) SetNillableCreatedAt(t *time.Time) *DatumCreate

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

func (*DatumCreate) SetNillableCurrent

func (dc *DatumCreate) SetNillableCurrent(b *bool) *DatumCreate

SetNillableCurrent sets the current field if the given value is not nil.

func (*DatumCreate) SetNillableDeletedAt

func (dc *DatumCreate) SetNillableDeletedAt(t *time.Time) *DatumCreate

SetNillableDeletedAt sets the deletedAt field if the given value is not nil.

func (*DatumCreate) SetNillableIndex

func (dc *DatumCreate) SetNillableIndex(i *int) *DatumCreate

SetNillableIndex sets the index field if the given value is not nil.

func (*DatumCreate) SetNillableUpdatedAt

func (dc *DatumCreate) SetNillableUpdatedAt(t *time.Time) *DatumCreate

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

func (*DatumCreate) SetNillableVersion

func (dc *DatumCreate) SetNillableVersion(i *int) *DatumCreate

SetNillableVersion sets the version field if the given value is not nil.

func (*DatumCreate) SetParticipant

func (dc *DatumCreate) SetParticipant(p *Participant) *DatumCreate

SetParticipant sets the participant edge to Participant.

func (*DatumCreate) SetParticipantID

func (dc *DatumCreate) SetParticipantID(id string) *DatumCreate

SetParticipantID sets the participant edge to Participant by id.

func (*DatumCreate) SetUpdatedAt

func (dc *DatumCreate) SetUpdatedAt(t time.Time) *DatumCreate

SetUpdatedAt sets the updated_at field.

func (*DatumCreate) SetVal

func (dc *DatumCreate) SetVal(s string) *DatumCreate

SetVal sets the val field.

func (*DatumCreate) SetVersion

func (dc *DatumCreate) SetVersion(i int) *DatumCreate

SetVersion sets the version field.

type DatumCreateBulk

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

DatumCreateBulk is the builder for creating a bulk of Datum entities.

func (*DatumCreateBulk) Save

func (dcb *DatumCreateBulk) Save(ctx context.Context) ([]*Datum, error)

Save creates the Datum entities in the database.

func (*DatumCreateBulk) SaveX

func (dcb *DatumCreateBulk) SaveX(ctx context.Context) []*Datum

SaveX calls Save and panics if Save returns an error.

type DatumDelete

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

DatumDelete is the builder for deleting a Datum entity.

func (*DatumDelete) Exec

func (dd *DatumDelete) Exec(ctx context.Context) (int, error)

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

func (*DatumDelete) ExecX

func (dd *DatumDelete) ExecX(ctx context.Context) int

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

func (*DatumDelete) Where

func (dd *DatumDelete) Where(ps ...predicate.Datum) *DatumDelete

Where adds a new predicate to the delete builder.

type DatumDeleteOne

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

DatumDeleteOne is the builder for deleting a single Datum entity.

func (*DatumDeleteOne) Exec

func (ddo *DatumDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DatumDeleteOne) ExecX

func (ddo *DatumDeleteOne) ExecX(ctx context.Context)

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

type DatumEdges

type DatumEdges struct {
	// Participant holds the value of the participant edge.
	Participant *Participant
	// contains filtered or unexported fields
}

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

func (DatumEdges) ParticipantOrErr

func (e DatumEdges) ParticipantOrErr() (*Participant, error)

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

type DatumGroupBy

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

DatumGroupBy is the builder for group-by Datum entities.

func (*DatumGroupBy) Aggregate

func (dgb *DatumGroupBy) Aggregate(fns ...AggregateFunc) *DatumGroupBy

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

func (*DatumGroupBy) Bool

func (dgb *DatumGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*DatumGroupBy) BoolX

func (dgb *DatumGroupBy) BoolX(ctx context.Context) bool

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

func (*DatumGroupBy) Bools

func (dgb *DatumGroupBy) 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 (*DatumGroupBy) BoolsX

func (dgb *DatumGroupBy) BoolsX(ctx context.Context) []bool

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

func (*DatumGroupBy) Float64

func (dgb *DatumGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*DatumGroupBy) Float64X

func (dgb *DatumGroupBy) Float64X(ctx context.Context) float64

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

func (*DatumGroupBy) Float64s

func (dgb *DatumGroupBy) 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 (*DatumGroupBy) Float64sX

func (dgb *DatumGroupBy) Float64sX(ctx context.Context) []float64

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

func (*DatumGroupBy) Int

func (dgb *DatumGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*DatumGroupBy) IntX

func (dgb *DatumGroupBy) IntX(ctx context.Context) int

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

func (*DatumGroupBy) Ints

func (dgb *DatumGroupBy) 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 (*DatumGroupBy) IntsX

func (dgb *DatumGroupBy) IntsX(ctx context.Context) []int

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

func (*DatumGroupBy) Scan

func (dgb *DatumGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*DatumGroupBy) ScanX

func (dgb *DatumGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*DatumGroupBy) String

func (dgb *DatumGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*DatumGroupBy) StringX

func (dgb *DatumGroupBy) StringX(ctx context.Context) string

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

func (*DatumGroupBy) Strings

func (dgb *DatumGroupBy) 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 (*DatumGroupBy) StringsX

func (dgb *DatumGroupBy) StringsX(ctx context.Context) []string

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

type DatumMutation

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

DatumMutation represents an operation that mutate the Data nodes in the graph.

func (*DatumMutation) AddField

func (m *DatumMutation) 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 (*DatumMutation) AddIndex

func (m *DatumMutation) AddIndex(i int)

AddIndex adds i to index.

func (*DatumMutation) AddVersion

func (m *DatumMutation) AddVersion(i int)

AddVersion adds i to version.

func (*DatumMutation) AddedEdges

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

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

func (*DatumMutation) AddedField

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

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

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

func (*DatumMutation) AddedIDs

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

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

func (*DatumMutation) AddedIndex

func (m *DatumMutation) AddedIndex() (r int, exists bool)

AddedIndex returns the value that was added to the index field in this mutation.

func (*DatumMutation) AddedVersion

func (m *DatumMutation) AddedVersion() (r int, exists bool)

AddedVersion returns the value that was added to the version field in this mutation.

func (*DatumMutation) ClearDeletedAt

func (m *DatumMutation) ClearDeletedAt()

ClearDeletedAt clears the value of deletedAt.

func (*DatumMutation) ClearEdge

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

func (m *DatumMutation) 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 (*DatumMutation) ClearParticipant

func (m *DatumMutation) ClearParticipant()

ClearParticipant clears the participant edge to Participant.

func (*DatumMutation) ClearedEdges

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

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

func (*DatumMutation) ClearedFields

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

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

func (DatumMutation) Client

func (m DatumMutation) 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 (*DatumMutation) CreatedAt

func (m *DatumMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*DatumMutation) Current

func (m *DatumMutation) Current() (r bool, exists bool)

Current returns the current value in the mutation.

func (*DatumMutation) DeletedAt

func (m *DatumMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the deletedAt value in the mutation.

func (*DatumMutation) DeletedAtCleared

func (m *DatumMutation) DeletedAtCleared() bool

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

func (*DatumMutation) EdgeCleared

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

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

func (*DatumMutation) Field

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

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

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

func (*DatumMutation) Fields

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

func (m *DatumMutation) ID() (id string, 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 (*DatumMutation) Index

func (m *DatumMutation) Index() (r int, exists bool)

Index returns the index value in the mutation.

func (*DatumMutation) Key

func (m *DatumMutation) Key() (r string, exists bool)

Key returns the key value in the mutation.

func (*DatumMutation) OldCreatedAt

func (m *DatumMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Datum. If the Datum object wasn'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 (*DatumMutation) OldCurrent

func (m *DatumMutation) OldCurrent(ctx context.Context) (v bool, err error)

OldCurrent returns the old current value of the Datum. If the Datum object wasn'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 (*DatumMutation) OldDeletedAt

func (m *DatumMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old deletedAt value of the Datum. If the Datum object wasn'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 (*DatumMutation) OldField

func (m *DatumMutation) 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 (*DatumMutation) OldIndex

func (m *DatumMutation) OldIndex(ctx context.Context) (v int, err error)

OldIndex returns the old index value of the Datum. If the Datum object wasn'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 (*DatumMutation) OldKey

func (m *DatumMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old key value of the Datum. If the Datum object wasn'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 (*DatumMutation) OldUpdatedAt

func (m *DatumMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Datum. If the Datum object wasn'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 (*DatumMutation) OldVal

func (m *DatumMutation) OldVal(ctx context.Context) (v string, err error)

OldVal returns the old val value of the Datum. If the Datum object wasn'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 (*DatumMutation) OldVersion

func (m *DatumMutation) OldVersion(ctx context.Context) (v int, err error)

OldVersion returns the old version value of the Datum. If the Datum object wasn'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 (*DatumMutation) Op

func (m *DatumMutation) Op() Op

Op returns the operation name.

func (*DatumMutation) ParticipantCleared

func (m *DatumMutation) ParticipantCleared() bool

ParticipantCleared returns if the edge participant was cleared.

func (*DatumMutation) ParticipantID

func (m *DatumMutation) ParticipantID() (id string, exists bool)

ParticipantID returns the participant id in the mutation.

func (*DatumMutation) ParticipantIDs

func (m *DatumMutation) ParticipantIDs() (ids []string)

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

func (*DatumMutation) RemovedEdges

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

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

func (*DatumMutation) RemovedIDs

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

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

func (*DatumMutation) ResetCreatedAt

func (m *DatumMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*DatumMutation) ResetCurrent

func (m *DatumMutation) ResetCurrent()

ResetCurrent reset all changes of the "current" field.

func (*DatumMutation) ResetDeletedAt

func (m *DatumMutation) ResetDeletedAt()

ResetDeletedAt reset all changes of the "deletedAt" field.

func (*DatumMutation) ResetEdge

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

func (m *DatumMutation) 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 (*DatumMutation) ResetIndex

func (m *DatumMutation) ResetIndex()

ResetIndex reset all changes of the "index" field.

func (*DatumMutation) ResetKey

func (m *DatumMutation) ResetKey()

ResetKey reset all changes of the "key" field.

func (*DatumMutation) ResetParticipant

func (m *DatumMutation) ResetParticipant()

ResetParticipant reset all changes of the "participant" edge.

func (*DatumMutation) ResetUpdatedAt

func (m *DatumMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*DatumMutation) ResetVal

func (m *DatumMutation) ResetVal()

ResetVal reset all changes of the "val" field.

func (*DatumMutation) ResetVersion

func (m *DatumMutation) ResetVersion()

ResetVersion reset all changes of the "version" field.

func (*DatumMutation) SetCreatedAt

func (m *DatumMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*DatumMutation) SetCurrent

func (m *DatumMutation) SetCurrent(b bool)

SetCurrent sets the current field.

func (*DatumMutation) SetDeletedAt

func (m *DatumMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the deletedAt field.

func (*DatumMutation) SetField

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

func (m *DatumMutation) SetID(id string)

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

func (*DatumMutation) SetIndex

func (m *DatumMutation) SetIndex(i int)

SetIndex sets the index field.

func (*DatumMutation) SetKey

func (m *DatumMutation) SetKey(s string)

SetKey sets the key field.

func (*DatumMutation) SetParticipantID

func (m *DatumMutation) SetParticipantID(id string)

SetParticipantID sets the participant edge to Participant by id.

func (*DatumMutation) SetUpdatedAt

func (m *DatumMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*DatumMutation) SetVal

func (m *DatumMutation) SetVal(s string)

SetVal sets the val field.

func (*DatumMutation) SetVersion

func (m *DatumMutation) SetVersion(i int)

SetVersion sets the version field.

func (DatumMutation) Tx

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

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

func (*DatumMutation) Type

func (m *DatumMutation) Type() string

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

func (*DatumMutation) UpdatedAt

func (m *DatumMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

func (*DatumMutation) Val

func (m *DatumMutation) Val() (r string, exists bool)

Val returns the val value in the mutation.

func (*DatumMutation) Version

func (m *DatumMutation) Version() (r int, exists bool)

Version returns the version value in the mutation.

type DatumQuery

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

DatumQuery is the builder for querying Datum entities.

func (*DatumQuery) All

func (dq *DatumQuery) All(ctx context.Context) ([]*Datum, error)

All executes the query and returns a list of Data.

func (*DatumQuery) AllX

func (dq *DatumQuery) AllX(ctx context.Context) []*Datum

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

func (*DatumQuery) Clone

func (dq *DatumQuery) Clone() *DatumQuery

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 (*DatumQuery) Count

func (dq *DatumQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DatumQuery) CountX

func (dq *DatumQuery) CountX(ctx context.Context) int

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

func (*DatumQuery) Exist

func (dq *DatumQuery) Exist(ctx context.Context) (bool, error)

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

func (*DatumQuery) ExistX

func (dq *DatumQuery) ExistX(ctx context.Context) bool

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

func (*DatumQuery) First

func (dq *DatumQuery) First(ctx context.Context) (*Datum, error)

First returns the first Datum entity in the query. Returns *NotFoundError when no datum was found.

func (*DatumQuery) FirstID

func (dq *DatumQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*DatumQuery) FirstX

func (dq *DatumQuery) FirstX(ctx context.Context) *Datum

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

func (*DatumQuery) FirstXID

func (dq *DatumQuery) FirstXID(ctx context.Context) string

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

func (*DatumQuery) GroupBy

func (dq *DatumQuery) GroupBy(field string, fields ...string) *DatumGroupBy

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

client.Datum.Query().
	GroupBy(datum.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DatumQuery) IDs

func (dq *DatumQuery) IDs(ctx context.Context) ([]string, error)

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

func (*DatumQuery) IDsX

func (dq *DatumQuery) IDsX(ctx context.Context) []string

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

func (*DatumQuery) Limit

func (dq *DatumQuery) Limit(limit int) *DatumQuery

Limit adds a limit step to the query.

func (*DatumQuery) Offset

func (dq *DatumQuery) Offset(offset int) *DatumQuery

Offset adds an offset step to the query.

func (*DatumQuery) Only

func (dq *DatumQuery) Only(ctx context.Context) (*Datum, error)

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

func (*DatumQuery) OnlyID

func (dq *DatumQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*DatumQuery) OnlyIDX

func (dq *DatumQuery) OnlyIDX(ctx context.Context) string

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

func (*DatumQuery) OnlyX

func (dq *DatumQuery) OnlyX(ctx context.Context) *Datum

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

func (*DatumQuery) Order

func (dq *DatumQuery) Order(o ...OrderFunc) *DatumQuery

Order adds an order step to the query.

func (*DatumQuery) QueryParticipant

func (dq *DatumQuery) QueryParticipant() *ParticipantQuery

QueryParticipant chains the current query on the participant edge.

func (*DatumQuery) Select

func (dq *DatumQuery) Select(field string, fields ...string) *DatumSelect

Select one or more fields from the given query.

Example:

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

client.Datum.Query().
	Select(datum.FieldCreatedAt).
	Scan(ctx, &v)

func (*DatumQuery) Where

func (dq *DatumQuery) Where(ps ...predicate.Datum) *DatumQuery

Where adds a new predicate for the builder.

func (*DatumQuery) WithParticipant

func (dq *DatumQuery) WithParticipant(opts ...func(*ParticipantQuery)) *DatumQuery
WithParticipant tells the query-builder to eager-loads the nodes that are connected to

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

type DatumSelect

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

DatumSelect is the builder for select fields of Datum entities.

func (*DatumSelect) Bool

func (ds *DatumSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*DatumSelect) BoolX

func (ds *DatumSelect) BoolX(ctx context.Context) bool

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

func (*DatumSelect) Bools

func (ds *DatumSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*DatumSelect) BoolsX

func (ds *DatumSelect) BoolsX(ctx context.Context) []bool

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

func (*DatumSelect) Float64

func (ds *DatumSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*DatumSelect) Float64X

func (ds *DatumSelect) Float64X(ctx context.Context) float64

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

func (*DatumSelect) Float64s

func (ds *DatumSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*DatumSelect) Float64sX

func (ds *DatumSelect) Float64sX(ctx context.Context) []float64

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

func (*DatumSelect) Int

func (ds *DatumSelect) Int(ctx context.Context) (_ int, err error)

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

func (*DatumSelect) IntX

func (ds *DatumSelect) IntX(ctx context.Context) int

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

func (*DatumSelect) Ints

func (ds *DatumSelect) Ints(ctx context.Context) ([]int, error)

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

func (*DatumSelect) IntsX

func (ds *DatumSelect) IntsX(ctx context.Context) []int

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

func (*DatumSelect) Scan

func (ds *DatumSelect) Scan(ctx context.Context, v interface{}) error

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

func (*DatumSelect) ScanX

func (ds *DatumSelect) ScanX(ctx context.Context, v interface{})

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

func (*DatumSelect) String

func (ds *DatumSelect) String(ctx context.Context) (_ string, err error)

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

func (*DatumSelect) StringX

func (ds *DatumSelect) StringX(ctx context.Context) string

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

func (*DatumSelect) Strings

func (ds *DatumSelect) Strings(ctx context.Context) ([]string, error)

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

func (*DatumSelect) StringsX

func (ds *DatumSelect) StringsX(ctx context.Context) []string

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

type DatumUpdate

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

DatumUpdate is the builder for updating Datum entities.

func (*DatumUpdate) AddIndex

func (du *DatumUpdate) AddIndex(i int) *DatumUpdate

AddIndex adds i to index.

func (*DatumUpdate) AddVersion

func (du *DatumUpdate) AddVersion(i int) *DatumUpdate

AddVersion adds i to version.

func (*DatumUpdate) ClearDeletedAt

func (du *DatumUpdate) ClearDeletedAt() *DatumUpdate

ClearDeletedAt clears the value of deletedAt.

func (*DatumUpdate) ClearParticipant

func (du *DatumUpdate) ClearParticipant() *DatumUpdate

ClearParticipant clears the "participant" edge to type Participant.

func (*DatumUpdate) Exec

func (du *DatumUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DatumUpdate) ExecX

func (du *DatumUpdate) ExecX(ctx context.Context)

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

func (*DatumUpdate) Mutation

func (du *DatumUpdate) Mutation() *DatumMutation

Mutation returns the DatumMutation object of the builder.

func (*DatumUpdate) Save

func (du *DatumUpdate) Save(ctx context.Context) (int, error)

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

func (*DatumUpdate) SaveX

func (du *DatumUpdate) SaveX(ctx context.Context) int

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

func (*DatumUpdate) SetCurrent

func (du *DatumUpdate) SetCurrent(b bool) *DatumUpdate

SetCurrent sets the current field.

func (*DatumUpdate) SetDeletedAt

func (du *DatumUpdate) SetDeletedAt(t time.Time) *DatumUpdate

SetDeletedAt sets the deletedAt field.

func (*DatumUpdate) SetIndex

func (du *DatumUpdate) SetIndex(i int) *DatumUpdate

SetIndex sets the index field.

func (*DatumUpdate) SetKey

func (du *DatumUpdate) SetKey(s string) *DatumUpdate

SetKey sets the key field.

func (*DatumUpdate) SetNillableCurrent

func (du *DatumUpdate) SetNillableCurrent(b *bool) *DatumUpdate

SetNillableCurrent sets the current field if the given value is not nil.

func (*DatumUpdate) SetNillableDeletedAt

func (du *DatumUpdate) SetNillableDeletedAt(t *time.Time) *DatumUpdate

SetNillableDeletedAt sets the deletedAt field if the given value is not nil.

func (*DatumUpdate) SetNillableIndex

func (du *DatumUpdate) SetNillableIndex(i *int) *DatumUpdate

SetNillableIndex sets the index field if the given value is not nil.

func (*DatumUpdate) SetNillableVersion

func (du *DatumUpdate) SetNillableVersion(i *int) *DatumUpdate

SetNillableVersion sets the version field if the given value is not nil.

func (*DatumUpdate) SetParticipant

func (du *DatumUpdate) SetParticipant(p *Participant) *DatumUpdate

SetParticipant sets the participant edge to Participant.

func (*DatumUpdate) SetParticipantID

func (du *DatumUpdate) SetParticipantID(id string) *DatumUpdate

SetParticipantID sets the participant edge to Participant by id.

func (*DatumUpdate) SetUpdatedAt

func (du *DatumUpdate) SetUpdatedAt(t time.Time) *DatumUpdate

SetUpdatedAt sets the updated_at field.

func (*DatumUpdate) SetVal

func (du *DatumUpdate) SetVal(s string) *DatumUpdate

SetVal sets the val field.

func (*DatumUpdate) SetVersion

func (du *DatumUpdate) SetVersion(i int) *DatumUpdate

SetVersion sets the version field.

func (*DatumUpdate) Where

func (du *DatumUpdate) Where(ps ...predicate.Datum) *DatumUpdate

Where adds a new predicate for the builder.

type DatumUpdateOne

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

DatumUpdateOne is the builder for updating a single Datum entity.

func (*DatumUpdateOne) AddIndex

func (duo *DatumUpdateOne) AddIndex(i int) *DatumUpdateOne

AddIndex adds i to index.

func (*DatumUpdateOne) AddVersion

func (duo *DatumUpdateOne) AddVersion(i int) *DatumUpdateOne

AddVersion adds i to version.

func (*DatumUpdateOne) ClearDeletedAt

func (duo *DatumUpdateOne) ClearDeletedAt() *DatumUpdateOne

ClearDeletedAt clears the value of deletedAt.

func (*DatumUpdateOne) ClearParticipant

func (duo *DatumUpdateOne) ClearParticipant() *DatumUpdateOne

ClearParticipant clears the "participant" edge to type Participant.

func (*DatumUpdateOne) Exec

func (duo *DatumUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DatumUpdateOne) ExecX

func (duo *DatumUpdateOne) ExecX(ctx context.Context)

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

func (*DatumUpdateOne) Mutation

func (duo *DatumUpdateOne) Mutation() *DatumMutation

Mutation returns the DatumMutation object of the builder.

func (*DatumUpdateOne) Save

func (duo *DatumUpdateOne) Save(ctx context.Context) (*Datum, error)

Save executes the query and returns the updated entity.

func (*DatumUpdateOne) SaveX

func (duo *DatumUpdateOne) SaveX(ctx context.Context) *Datum

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

func (*DatumUpdateOne) SetCurrent

func (duo *DatumUpdateOne) SetCurrent(b bool) *DatumUpdateOne

SetCurrent sets the current field.

func (*DatumUpdateOne) SetDeletedAt

func (duo *DatumUpdateOne) SetDeletedAt(t time.Time) *DatumUpdateOne

SetDeletedAt sets the deletedAt field.

func (*DatumUpdateOne) SetIndex

func (duo *DatumUpdateOne) SetIndex(i int) *DatumUpdateOne

SetIndex sets the index field.

func (*DatumUpdateOne) SetKey

func (duo *DatumUpdateOne) SetKey(s string) *DatumUpdateOne

SetKey sets the key field.

func (*DatumUpdateOne) SetNillableCurrent

func (duo *DatumUpdateOne) SetNillableCurrent(b *bool) *DatumUpdateOne

SetNillableCurrent sets the current field if the given value is not nil.

func (*DatumUpdateOne) SetNillableDeletedAt

func (duo *DatumUpdateOne) SetNillableDeletedAt(t *time.Time) *DatumUpdateOne

SetNillableDeletedAt sets the deletedAt field if the given value is not nil.

func (*DatumUpdateOne) SetNillableIndex

func (duo *DatumUpdateOne) SetNillableIndex(i *int) *DatumUpdateOne

SetNillableIndex sets the index field if the given value is not nil.

func (*DatumUpdateOne) SetNillableVersion

func (duo *DatumUpdateOne) SetNillableVersion(i *int) *DatumUpdateOne

SetNillableVersion sets the version field if the given value is not nil.

func (*DatumUpdateOne) SetParticipant

func (duo *DatumUpdateOne) SetParticipant(p *Participant) *DatumUpdateOne

SetParticipant sets the participant edge to Participant.

func (*DatumUpdateOne) SetParticipantID

func (duo *DatumUpdateOne) SetParticipantID(id string) *DatumUpdateOne

SetParticipantID sets the participant edge to Participant by id.

func (*DatumUpdateOne) SetUpdatedAt

func (duo *DatumUpdateOne) SetUpdatedAt(t time.Time) *DatumUpdateOne

SetUpdatedAt sets the updated_at field.

func (*DatumUpdateOne) SetVal

func (duo *DatumUpdateOne) SetVal(s string) *DatumUpdateOne

SetVal sets the val field.

func (*DatumUpdateOne) SetVersion

func (duo *DatumUpdateOne) SetVersion(i int) *DatumUpdateOne

SetVersion sets the version field.

type Hook

type Hook = ent.Hook

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

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector, func(string) bool)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Participant

type Participant struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// MturkWorkerID holds the value of the "mturkWorkerID" field.
	MturkWorkerID *string `json:"mturkWorkerID,omitempty"`
	// Uninitialized holds the value of the "uninitialized" field.
	Uninitialized *bool `json:"uninitialized,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ParticipantQuery when eager-loading is set.
	Edges ParticipantEdges `json:"edges"`
	// contains filtered or unexported fields
}

Participant is the model entity for the Participant schema.

func (*Participant) CurrentData

func (p *Participant) CurrentData(ctx context.Context, keys []string, deleted *bool) ([]*Datum, error)

CurrentData return all Datum objects that are current and not deleted for Participant. Keys and deleted arguments are optional. IF Data is already associated on Participant that will be returned.

func (*Participant) IsUser

func (a *Participant) IsUser()

func (*Participant) MatchCondition

func (p *Participant) MatchCondition(ctx context.Context, cond *model.Condition) (bool, error)

MatchCondition returns true if participant matches cond Condition. Data associated on Participant is assumed to have been loaded in full (latest version) or not at all.

func (*Participant) QueryCreatedBy

func (pa *Participant) QueryCreatedBy() *StepRunQuery

QueryCreatedBy queries the createdBy edge of the Participant.

func (*Participant) QueryData

func (pa *Participant) QueryData() *DatumQuery

QueryData queries the data edge of the Participant.

func (*Participant) QueryImportedBy

func (pa *Participant) QueryImportedBy() *AdminQuery

QueryImportedBy queries the importedBy edge of the Participant.

func (*Participant) QueryParticipations

func (pa *Participant) QueryParticipations() *ParticipationQuery

QueryParticipations queries the participations edge of the Participant.

func (*Participant) QueryProjects

func (pa *Participant) QueryProjects() *ProjectQuery

QueryProjects queries the projects edge of the Participant.

func (*Participant) QueryProviderIDs

func (pa *Participant) QueryProviderIDs() *ProviderIDQuery

QueryProviderIDs queries the providerIDs edge of the Participant.

func (*Participant) QuerySteps

func (pa *Participant) QuerySteps() *StepRunQuery

QuerySteps queries the steps edge of the Participant.

func (*Participant) String

func (pa *Participant) String() string

String implements the fmt.Stringer.

func (*Participant) Unwrap

func (pa *Participant) Unwrap() *Participant

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 (*Participant) Update

func (pa *Participant) Update() *ParticipantUpdateOne

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

type ParticipantClient

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

ParticipantClient is a client for the Participant schema.

func NewParticipantClient

func NewParticipantClient(c config) *ParticipantClient

NewParticipantClient returns a client for the Participant from the given config.

func (*ParticipantClient) Create

func (c *ParticipantClient) Create() *ParticipantCreate

Create returns a create builder for Participant.

func (*ParticipantClient) CreateBulk

func (c *ParticipantClient) CreateBulk(builders ...*ParticipantCreate) *ParticipantCreateBulk

BulkCreate returns a builder for creating a bulk of Participant entities.

func (*ParticipantClient) Delete

func (c *ParticipantClient) Delete() *ParticipantDelete

Delete returns a delete builder for Participant.

func (*ParticipantClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ParticipantClient) DeleteOneID

func (c *ParticipantClient) DeleteOneID(id string) *ParticipantDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ParticipantClient) Get

Get returns a Participant entity by its id.

func (*ParticipantClient) GetX

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

func (*ParticipantClient) Hooks

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

Hooks returns the client hooks.

func (*ParticipantClient) Query

func (c *ParticipantClient) Query() *ParticipantQuery

Query returns a query builder for Participant.

func (*ParticipantClient) QueryCreatedBy

func (c *ParticipantClient) QueryCreatedBy(pa *Participant) *StepRunQuery

QueryCreatedBy queries the createdBy edge of a Participant.

func (*ParticipantClient) QueryData

func (c *ParticipantClient) QueryData(pa *Participant) *DatumQuery

QueryData queries the data edge of a Participant.

func (*ParticipantClient) QueryImportedBy

func (c *ParticipantClient) QueryImportedBy(pa *Participant) *AdminQuery

QueryImportedBy queries the importedBy edge of a Participant.

func (*ParticipantClient) QueryParticipations

func (c *ParticipantClient) QueryParticipations(pa *Participant) *ParticipationQuery

QueryParticipations queries the participations edge of a Participant.

func (*ParticipantClient) QueryProjects

func (c *ParticipantClient) QueryProjects(pa *Participant) *ProjectQuery

QueryProjects queries the projects edge of a Participant.

func (*ParticipantClient) QueryProviderIDs

func (c *ParticipantClient) QueryProviderIDs(pa *Participant) *ProviderIDQuery

QueryProviderIDs queries the providerIDs edge of a Participant.

func (*ParticipantClient) QuerySteps

func (c *ParticipantClient) QuerySteps(pa *Participant) *StepRunQuery

QuerySteps queries the steps edge of a Participant.

func (*ParticipantClient) Update

func (c *ParticipantClient) Update() *ParticipantUpdate

Update returns an update builder for Participant.

func (*ParticipantClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ParticipantClient) UpdateOneID

func (c *ParticipantClient) UpdateOneID(id string) *ParticipantUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ParticipantClient) Use

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

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

type ParticipantCreate

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

ParticipantCreate is the builder for creating a Participant entity.

func (*ParticipantCreate) AddData

func (pc *ParticipantCreate) AddData(d ...*Datum) *ParticipantCreate

AddData adds the data edges to Datum.

func (*ParticipantCreate) AddDatumIDs

func (pc *ParticipantCreate) AddDatumIDs(ids ...string) *ParticipantCreate

AddDatumIDs adds the data edge to Datum by ids.

func (*ParticipantCreate) AddImportedBy

func (pc *ParticipantCreate) AddImportedBy(a ...*Admin) *ParticipantCreate

AddImportedBy adds the importedBy edges to Admin.

func (*ParticipantCreate) AddImportedByIDs

func (pc *ParticipantCreate) AddImportedByIDs(ids ...string) *ParticipantCreate

AddImportedByIDs adds the importedBy edge to Admin by ids.

func (*ParticipantCreate) AddParticipationIDs

func (pc *ParticipantCreate) AddParticipationIDs(ids ...string) *ParticipantCreate

AddParticipationIDs adds the participations edge to Participation by ids.

func (*ParticipantCreate) AddParticipations

func (pc *ParticipantCreate) AddParticipations(p ...*Participation) *ParticipantCreate

AddParticipations adds the participations edges to Participation.

func (*ParticipantCreate) AddProjectIDs

func (pc *ParticipantCreate) AddProjectIDs(ids ...string) *ParticipantCreate

AddProjectIDs adds the projects edge to Project by ids.

func (*ParticipantCreate) AddProjects

func (pc *ParticipantCreate) AddProjects(p ...*Project) *ParticipantCreate

AddProjects adds the projects edges to Project.

func (*ParticipantCreate) AddProviderIDIDs

func (pc *ParticipantCreate) AddProviderIDIDs(ids ...string) *ParticipantCreate

AddProviderIDIDs adds the providerIDs edge to ProviderID by ids.

func (*ParticipantCreate) AddProviderIDs

func (pc *ParticipantCreate) AddProviderIDs(p ...*ProviderID) *ParticipantCreate

AddProviderIDs adds the providerIDs edges to ProviderID.

func (*ParticipantCreate) AddStepIDs

func (pc *ParticipantCreate) AddStepIDs(ids ...string) *ParticipantCreate

AddStepIDs adds the steps edge to StepRun by ids.

func (*ParticipantCreate) AddSteps

func (pc *ParticipantCreate) AddSteps(s ...*StepRun) *ParticipantCreate

AddSteps adds the steps edges to StepRun.

func (*ParticipantCreate) Mutation

func (pc *ParticipantCreate) Mutation() *ParticipantMutation

Mutation returns the ParticipantMutation object of the builder.

func (*ParticipantCreate) Save

Save creates the Participant in the database.

func (*ParticipantCreate) SaveX

func (pc *ParticipantCreate) SaveX(ctx context.Context) *Participant

SaveX calls Save and panics if Save returns an error.

func (*ParticipantCreate) SetCreatedAt

func (pc *ParticipantCreate) SetCreatedAt(t time.Time) *ParticipantCreate

SetCreatedAt sets the created_at field.

func (*ParticipantCreate) SetCreatedBy

func (pc *ParticipantCreate) SetCreatedBy(s *StepRun) *ParticipantCreate

SetCreatedBy sets the createdBy edge to StepRun.

func (*ParticipantCreate) SetCreatedByID

func (pc *ParticipantCreate) SetCreatedByID(id string) *ParticipantCreate

SetCreatedByID sets the createdBy edge to StepRun by id.

func (*ParticipantCreate) SetID

SetID sets the id field.

func (*ParticipantCreate) SetMturkWorkerID

func (pc *ParticipantCreate) SetMturkWorkerID(s string) *ParticipantCreate

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipantCreate) SetNillableCreatedAt

func (pc *ParticipantCreate) SetNillableCreatedAt(t *time.Time) *ParticipantCreate

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

func (*ParticipantCreate) SetNillableCreatedByID

func (pc *ParticipantCreate) SetNillableCreatedByID(id *string) *ParticipantCreate

SetNillableCreatedByID sets the createdBy edge to StepRun by id if the given value is not nil.

func (*ParticipantCreate) SetNillableMturkWorkerID

func (pc *ParticipantCreate) SetNillableMturkWorkerID(s *string) *ParticipantCreate

SetNillableMturkWorkerID sets the mturkWorkerID field if the given value is not nil.

func (*ParticipantCreate) SetNillableUninitialized

func (pc *ParticipantCreate) SetNillableUninitialized(b *bool) *ParticipantCreate

SetNillableUninitialized sets the uninitialized field if the given value is not nil.

func (*ParticipantCreate) SetNillableUpdatedAt

func (pc *ParticipantCreate) SetNillableUpdatedAt(t *time.Time) *ParticipantCreate

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

func (*ParticipantCreate) SetUninitialized

func (pc *ParticipantCreate) SetUninitialized(b bool) *ParticipantCreate

SetUninitialized sets the uninitialized field.

func (*ParticipantCreate) SetUpdatedAt

func (pc *ParticipantCreate) SetUpdatedAt(t time.Time) *ParticipantCreate

SetUpdatedAt sets the updated_at field.

type ParticipantCreateBulk

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

ParticipantCreateBulk is the builder for creating a bulk of Participant entities.

func (*ParticipantCreateBulk) Save

func (pcb *ParticipantCreateBulk) Save(ctx context.Context) ([]*Participant, error)

Save creates the Participant entities in the database.

func (*ParticipantCreateBulk) SaveX

func (pcb *ParticipantCreateBulk) SaveX(ctx context.Context) []*Participant

SaveX calls Save and panics if Save returns an error.

type ParticipantDelete

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

ParticipantDelete is the builder for deleting a Participant entity.

func (*ParticipantDelete) Exec

func (pd *ParticipantDelete) Exec(ctx context.Context) (int, error)

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

func (*ParticipantDelete) ExecX

func (pd *ParticipantDelete) ExecX(ctx context.Context) int

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

func (*ParticipantDelete) Where

Where adds a new predicate to the delete builder.

type ParticipantDeleteOne

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

ParticipantDeleteOne is the builder for deleting a single Participant entity.

func (*ParticipantDeleteOne) Exec

func (pdo *ParticipantDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ParticipantDeleteOne) ExecX

func (pdo *ParticipantDeleteOne) ExecX(ctx context.Context)

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

type ParticipantEdges

type ParticipantEdges struct {
	// Data holds the value of the data edge.
	Data []*Datum
	// ProviderIDs holds the value of the providerIDs edge.
	ProviderIDs []*ProviderID
	// Participations holds the value of the participations edge.
	Participations []*Participation
	// CreatedBy holds the value of the createdBy edge.
	CreatedBy *StepRun
	// Steps holds the value of the steps edge.
	Steps []*StepRun
	// Projects holds the value of the projects edge.
	Projects []*Project
	// ImportedBy holds the value of the importedBy edge.
	ImportedBy []*Admin
	// contains filtered or unexported fields
}

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

func (ParticipantEdges) CreatedByOrErr

func (e ParticipantEdges) CreatedByOrErr() (*StepRun, error)

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

func (ParticipantEdges) DataOrErr

func (e ParticipantEdges) DataOrErr() ([]*Datum, error)

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

func (ParticipantEdges) ImportedByOrErr

func (e ParticipantEdges) ImportedByOrErr() ([]*Admin, error)

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

func (ParticipantEdges) ParticipationsOrErr

func (e ParticipantEdges) ParticipationsOrErr() ([]*Participation, error)

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

func (ParticipantEdges) ProjectsOrErr

func (e ParticipantEdges) ProjectsOrErr() ([]*Project, error)

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

func (ParticipantEdges) ProviderIDsOrErr

func (e ParticipantEdges) ProviderIDsOrErr() ([]*ProviderID, error)

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

func (ParticipantEdges) StepsOrErr

func (e ParticipantEdges) StepsOrErr() ([]*StepRun, error)

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

type ParticipantGroupBy

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

ParticipantGroupBy is the builder for group-by Participant entities.

func (*ParticipantGroupBy) Aggregate

func (pgb *ParticipantGroupBy) Aggregate(fns ...AggregateFunc) *ParticipantGroupBy

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

func (*ParticipantGroupBy) Bool

func (pgb *ParticipantGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ParticipantGroupBy) BoolX

func (pgb *ParticipantGroupBy) BoolX(ctx context.Context) bool

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

func (*ParticipantGroupBy) Bools

func (pgb *ParticipantGroupBy) 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 (*ParticipantGroupBy) BoolsX

func (pgb *ParticipantGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ParticipantGroupBy) Float64

func (pgb *ParticipantGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ParticipantGroupBy) Float64X

func (pgb *ParticipantGroupBy) Float64X(ctx context.Context) float64

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

func (*ParticipantGroupBy) Float64s

func (pgb *ParticipantGroupBy) 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 (*ParticipantGroupBy) Float64sX

func (pgb *ParticipantGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ParticipantGroupBy) Int

func (pgb *ParticipantGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ParticipantGroupBy) IntX

func (pgb *ParticipantGroupBy) IntX(ctx context.Context) int

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

func (*ParticipantGroupBy) Ints

func (pgb *ParticipantGroupBy) 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 (*ParticipantGroupBy) IntsX

func (pgb *ParticipantGroupBy) IntsX(ctx context.Context) []int

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

func (*ParticipantGroupBy) Scan

func (pgb *ParticipantGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ParticipantGroupBy) ScanX

func (pgb *ParticipantGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ParticipantGroupBy) String

func (pgb *ParticipantGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ParticipantGroupBy) StringX

func (pgb *ParticipantGroupBy) StringX(ctx context.Context) string

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

func (*ParticipantGroupBy) Strings

func (pgb *ParticipantGroupBy) 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 (*ParticipantGroupBy) StringsX

func (pgb *ParticipantGroupBy) StringsX(ctx context.Context) []string

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

type ParticipantMutation

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

ParticipantMutation represents an operation that mutate the Participants nodes in the graph.

func (*ParticipantMutation) AddDatumIDs

func (m *ParticipantMutation) AddDatumIDs(ids ...string)

AddDatumIDs adds the data edge to Datum by ids.

func (*ParticipantMutation) AddField

func (m *ParticipantMutation) 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 (*ParticipantMutation) AddImportedByIDs

func (m *ParticipantMutation) AddImportedByIDs(ids ...string)

AddImportedByIDs adds the importedBy edge to Admin by ids.

func (*ParticipantMutation) AddParticipationIDs

func (m *ParticipantMutation) AddParticipationIDs(ids ...string)

AddParticipationIDs adds the participations edge to Participation by ids.

func (*ParticipantMutation) AddProjectIDs

func (m *ParticipantMutation) AddProjectIDs(ids ...string)

AddProjectIDs adds the projects edge to Project by ids.

func (*ParticipantMutation) AddProviderIDIDs

func (m *ParticipantMutation) AddProviderIDIDs(ids ...string)

AddProviderIDIDs adds the providerIDs edge to ProviderID by ids.

func (*ParticipantMutation) AddStepIDs

func (m *ParticipantMutation) AddStepIDs(ids ...string)

AddStepIDs adds the steps edge to StepRun by ids.

func (*ParticipantMutation) AddedEdges

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

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

func (*ParticipantMutation) AddedField

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

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

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

func (*ParticipantMutation) AddedIDs

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

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

func (*ParticipantMutation) ClearCreatedBy

func (m *ParticipantMutation) ClearCreatedBy()

ClearCreatedBy clears the createdBy edge to StepRun.

func (*ParticipantMutation) ClearData

func (m *ParticipantMutation) ClearData()

ClearData clears the data edge to Datum.

func (*ParticipantMutation) ClearEdge

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

func (m *ParticipantMutation) 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 (*ParticipantMutation) ClearImportedBy

func (m *ParticipantMutation) ClearImportedBy()

ClearImportedBy clears the importedBy edge to Admin.

func (*ParticipantMutation) ClearMturkWorkerID

func (m *ParticipantMutation) ClearMturkWorkerID()

ClearMturkWorkerID clears the value of mturkWorkerID.

func (*ParticipantMutation) ClearParticipations

func (m *ParticipantMutation) ClearParticipations()

ClearParticipations clears the participations edge to Participation.

func (*ParticipantMutation) ClearProjects

func (m *ParticipantMutation) ClearProjects()

ClearProjects clears the projects edge to Project.

func (*ParticipantMutation) ClearProviderIDs

func (m *ParticipantMutation) ClearProviderIDs()

ClearProviderIDs clears the providerIDs edge to ProviderID.

func (*ParticipantMutation) ClearSteps

func (m *ParticipantMutation) ClearSteps()

ClearSteps clears the steps edge to StepRun.

func (*ParticipantMutation) ClearUninitialized

func (m *ParticipantMutation) ClearUninitialized()

ClearUninitialized clears the value of uninitialized.

func (*ParticipantMutation) ClearedEdges

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

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

func (*ParticipantMutation) ClearedFields

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

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

func (ParticipantMutation) Client

func (m ParticipantMutation) 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 (*ParticipantMutation) CreatedAt

func (m *ParticipantMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*ParticipantMutation) CreatedByCleared

func (m *ParticipantMutation) CreatedByCleared() bool

CreatedByCleared returns if the edge createdBy was cleared.

func (*ParticipantMutation) CreatedByID

func (m *ParticipantMutation) CreatedByID() (id string, exists bool)

CreatedByID returns the createdBy id in the mutation.

func (*ParticipantMutation) CreatedByIDs

func (m *ParticipantMutation) CreatedByIDs() (ids []string)

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

func (*ParticipantMutation) DataCleared

func (m *ParticipantMutation) DataCleared() bool

DataCleared returns if the edge data was cleared.

func (*ParticipantMutation) DataIDs

func (m *ParticipantMutation) DataIDs() (ids []string)

DataIDs returns the data ids in the mutation.

func (*ParticipantMutation) EdgeCleared

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

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

func (*ParticipantMutation) Field

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

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

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

func (*ParticipantMutation) Fields

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

func (m *ParticipantMutation) ID() (id string, 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 (*ParticipantMutation) ImportedByCleared

func (m *ParticipantMutation) ImportedByCleared() bool

ImportedByCleared returns if the edge importedBy was cleared.

func (*ParticipantMutation) ImportedByIDs

func (m *ParticipantMutation) ImportedByIDs() (ids []string)

ImportedByIDs returns the importedBy ids in the mutation.

func (*ParticipantMutation) MturkWorkerID

func (m *ParticipantMutation) MturkWorkerID() (r string, exists bool)

MturkWorkerID returns the mturkWorkerID value in the mutation.

func (*ParticipantMutation) MturkWorkerIDCleared

func (m *ParticipantMutation) MturkWorkerIDCleared() bool

MturkWorkerIDCleared returns if the field mturkWorkerID was cleared in this mutation.

func (*ParticipantMutation) OldCreatedAt

func (m *ParticipantMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Participant. If the Participant object wasn'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 (*ParticipantMutation) OldField

func (m *ParticipantMutation) 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 (*ParticipantMutation) OldMturkWorkerID

func (m *ParticipantMutation) OldMturkWorkerID(ctx context.Context) (v *string, err error)

OldMturkWorkerID returns the old mturkWorkerID value of the Participant. If the Participant object wasn'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 (*ParticipantMutation) OldUninitialized

func (m *ParticipantMutation) OldUninitialized(ctx context.Context) (v *bool, err error)

OldUninitialized returns the old uninitialized value of the Participant. If the Participant object wasn'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 (*ParticipantMutation) OldUpdatedAt

func (m *ParticipantMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Participant. If the Participant object wasn'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 (*ParticipantMutation) Op

func (m *ParticipantMutation) Op() Op

Op returns the operation name.

func (*ParticipantMutation) ParticipationsCleared

func (m *ParticipantMutation) ParticipationsCleared() bool

ParticipationsCleared returns if the edge participations was cleared.

func (*ParticipantMutation) ParticipationsIDs

func (m *ParticipantMutation) ParticipationsIDs() (ids []string)

ParticipationsIDs returns the participations ids in the mutation.

func (*ParticipantMutation) ProjectsCleared

func (m *ParticipantMutation) ProjectsCleared() bool

ProjectsCleared returns if the edge projects was cleared.

func (*ParticipantMutation) ProjectsIDs

func (m *ParticipantMutation) ProjectsIDs() (ids []string)

ProjectsIDs returns the projects ids in the mutation.

func (*ParticipantMutation) ProviderIDsCleared

func (m *ParticipantMutation) ProviderIDsCleared() bool

ProviderIDsCleared returns if the edge providerIDs was cleared.

func (*ParticipantMutation) ProviderIDsIDs

func (m *ParticipantMutation) ProviderIDsIDs() (ids []string)

ProviderIDsIDs returns the providerIDs ids in the mutation.

func (*ParticipantMutation) RemoveDatumIDs

func (m *ParticipantMutation) RemoveDatumIDs(ids ...string)

RemoveDatumIDs removes the data edge to Datum by ids.

func (*ParticipantMutation) RemoveImportedByIDs

func (m *ParticipantMutation) RemoveImportedByIDs(ids ...string)

RemoveImportedByIDs removes the importedBy edge to Admin by ids.

func (*ParticipantMutation) RemoveParticipationIDs

func (m *ParticipantMutation) RemoveParticipationIDs(ids ...string)

RemoveParticipationIDs removes the participations edge to Participation by ids.

func (*ParticipantMutation) RemoveProjectIDs

func (m *ParticipantMutation) RemoveProjectIDs(ids ...string)

RemoveProjectIDs removes the projects edge to Project by ids.

func (*ParticipantMutation) RemoveProviderIDIDs

func (m *ParticipantMutation) RemoveProviderIDIDs(ids ...string)

RemoveProviderIDIDs removes the providerIDs edge to ProviderID by ids.

func (*ParticipantMutation) RemoveStepIDs

func (m *ParticipantMutation) RemoveStepIDs(ids ...string)

RemoveStepIDs removes the steps edge to StepRun by ids.

func (*ParticipantMutation) RemovedDataIDs

func (m *ParticipantMutation) RemovedDataIDs() (ids []string)

RemovedData returns the removed ids of data.

func (*ParticipantMutation) RemovedEdges

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

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

func (*ParticipantMutation) RemovedIDs

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

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

func (*ParticipantMutation) RemovedImportedByIDs

func (m *ParticipantMutation) RemovedImportedByIDs() (ids []string)

RemovedImportedBy returns the removed ids of importedBy.

func (*ParticipantMutation) RemovedParticipationsIDs

func (m *ParticipantMutation) RemovedParticipationsIDs() (ids []string)

RemovedParticipations returns the removed ids of participations.

func (*ParticipantMutation) RemovedProjectsIDs

func (m *ParticipantMutation) RemovedProjectsIDs() (ids []string)

RemovedProjects returns the removed ids of projects.

func (*ParticipantMutation) RemovedProviderIDsIDs

func (m *ParticipantMutation) RemovedProviderIDsIDs() (ids []string)

RemovedProviderIDs returns the removed ids of providerIDs.

func (*ParticipantMutation) RemovedStepsIDs

func (m *ParticipantMutation) RemovedStepsIDs() (ids []string)

RemovedSteps returns the removed ids of steps.

func (*ParticipantMutation) ResetCreatedAt

func (m *ParticipantMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*ParticipantMutation) ResetCreatedBy

func (m *ParticipantMutation) ResetCreatedBy()

ResetCreatedBy reset all changes of the "createdBy" edge.

func (*ParticipantMutation) ResetData

func (m *ParticipantMutation) ResetData()

ResetData reset all changes of the "data" edge.

func (*ParticipantMutation) ResetEdge

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

func (m *ParticipantMutation) 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 (*ParticipantMutation) ResetImportedBy

func (m *ParticipantMutation) ResetImportedBy()

ResetImportedBy reset all changes of the "importedBy" edge.

func (*ParticipantMutation) ResetMturkWorkerID

func (m *ParticipantMutation) ResetMturkWorkerID()

ResetMturkWorkerID reset all changes of the "mturkWorkerID" field.

func (*ParticipantMutation) ResetParticipations

func (m *ParticipantMutation) ResetParticipations()

ResetParticipations reset all changes of the "participations" edge.

func (*ParticipantMutation) ResetProjects

func (m *ParticipantMutation) ResetProjects()

ResetProjects reset all changes of the "projects" edge.

func (*ParticipantMutation) ResetProviderIDs

func (m *ParticipantMutation) ResetProviderIDs()

ResetProviderIDs reset all changes of the "providerIDs" edge.

func (*ParticipantMutation) ResetSteps

func (m *ParticipantMutation) ResetSteps()

ResetSteps reset all changes of the "steps" edge.

func (*ParticipantMutation) ResetUninitialized

func (m *ParticipantMutation) ResetUninitialized()

ResetUninitialized reset all changes of the "uninitialized" field.

func (*ParticipantMutation) ResetUpdatedAt

func (m *ParticipantMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*ParticipantMutation) SetCreatedAt

func (m *ParticipantMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*ParticipantMutation) SetCreatedByID

func (m *ParticipantMutation) SetCreatedByID(id string)

SetCreatedByID sets the createdBy edge to StepRun by id.

func (*ParticipantMutation) SetField

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

func (m *ParticipantMutation) SetID(id string)

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

func (*ParticipantMutation) SetMturkWorkerID

func (m *ParticipantMutation) SetMturkWorkerID(s string)

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipantMutation) SetUninitialized

func (m *ParticipantMutation) SetUninitialized(b bool)

SetUninitialized sets the uninitialized field.

func (*ParticipantMutation) SetUpdatedAt

func (m *ParticipantMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*ParticipantMutation) StepsCleared

func (m *ParticipantMutation) StepsCleared() bool

StepsCleared returns if the edge steps was cleared.

func (*ParticipantMutation) StepsIDs

func (m *ParticipantMutation) StepsIDs() (ids []string)

StepsIDs returns the steps ids in the mutation.

func (ParticipantMutation) Tx

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

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

func (*ParticipantMutation) Type

func (m *ParticipantMutation) Type() string

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

func (*ParticipantMutation) Uninitialized

func (m *ParticipantMutation) Uninitialized() (r bool, exists bool)

Uninitialized returns the uninitialized value in the mutation.

func (*ParticipantMutation) UninitializedCleared

func (m *ParticipantMutation) UninitializedCleared() bool

UninitializedCleared returns if the field uninitialized was cleared in this mutation.

func (*ParticipantMutation) UpdatedAt

func (m *ParticipantMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

type ParticipantQuery

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

ParticipantQuery is the builder for querying Participant entities.

func (*ParticipantQuery) All

func (pq *ParticipantQuery) All(ctx context.Context) ([]*Participant, error)

All executes the query and returns a list of Participants.

func (*ParticipantQuery) AllX

func (pq *ParticipantQuery) AllX(ctx context.Context) []*Participant

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

func (*ParticipantQuery) Clone

func (pq *ParticipantQuery) Clone() *ParticipantQuery

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 (*ParticipantQuery) Count

func (pq *ParticipantQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ParticipantQuery) CountX

func (pq *ParticipantQuery) CountX(ctx context.Context) int

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

func (*ParticipantQuery) Exist

func (pq *ParticipantQuery) Exist(ctx context.Context) (bool, error)

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

func (*ParticipantQuery) ExistX

func (pq *ParticipantQuery) ExistX(ctx context.Context) bool

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

func (*ParticipantQuery) First

func (pq *ParticipantQuery) First(ctx context.Context) (*Participant, error)

First returns the first Participant entity in the query. Returns *NotFoundError when no participant was found.

func (*ParticipantQuery) FirstID

func (pq *ParticipantQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*ParticipantQuery) FirstX

func (pq *ParticipantQuery) FirstX(ctx context.Context) *Participant

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

func (*ParticipantQuery) FirstXID

func (pq *ParticipantQuery) FirstXID(ctx context.Context) string

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

func (*ParticipantQuery) GroupBy

func (pq *ParticipantQuery) GroupBy(field string, fields ...string) *ParticipantGroupBy

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

client.Participant.Query().
	GroupBy(participant.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ParticipantQuery) IDs

func (pq *ParticipantQuery) IDs(ctx context.Context) ([]string, error)

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

func (*ParticipantQuery) IDsX

func (pq *ParticipantQuery) IDsX(ctx context.Context) []string

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

func (*ParticipantQuery) Limit

func (pq *ParticipantQuery) Limit(limit int) *ParticipantQuery

Limit adds a limit step to the query.

func (*ParticipantQuery) Offset

func (pq *ParticipantQuery) Offset(offset int) *ParticipantQuery

Offset adds an offset step to the query.

func (*ParticipantQuery) Only

func (pq *ParticipantQuery) Only(ctx context.Context) (*Participant, error)

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

func (*ParticipantQuery) OnlyID

func (pq *ParticipantQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*ParticipantQuery) OnlyIDX

func (pq *ParticipantQuery) OnlyIDX(ctx context.Context) string

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

func (*ParticipantQuery) OnlyX

func (pq *ParticipantQuery) OnlyX(ctx context.Context) *Participant

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

func (*ParticipantQuery) Order

func (pq *ParticipantQuery) Order(o ...OrderFunc) *ParticipantQuery

Order adds an order step to the query.

func (*ParticipantQuery) QueryCreatedBy

func (pq *ParticipantQuery) QueryCreatedBy() *StepRunQuery

QueryCreatedBy chains the current query on the createdBy edge.

func (*ParticipantQuery) QueryData

func (pq *ParticipantQuery) QueryData() *DatumQuery

QueryData chains the current query on the data edge.

func (*ParticipantQuery) QueryImportedBy

func (pq *ParticipantQuery) QueryImportedBy() *AdminQuery

QueryImportedBy chains the current query on the importedBy edge.

func (*ParticipantQuery) QueryParticipations

func (pq *ParticipantQuery) QueryParticipations() *ParticipationQuery

QueryParticipations chains the current query on the participations edge.

func (*ParticipantQuery) QueryProjects

func (pq *ParticipantQuery) QueryProjects() *ProjectQuery

QueryProjects chains the current query on the projects edge.

func (*ParticipantQuery) QueryProviderIDs

func (pq *ParticipantQuery) QueryProviderIDs() *ProviderIDQuery

QueryProviderIDs chains the current query on the providerIDs edge.

func (*ParticipantQuery) QuerySteps

func (pq *ParticipantQuery) QuerySteps() *StepRunQuery

QuerySteps chains the current query on the steps edge.

func (*ParticipantQuery) Select

func (pq *ParticipantQuery) Select(field string, fields ...string) *ParticipantSelect

Select one or more fields from the given query.

Example:

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

client.Participant.Query().
	Select(participant.FieldCreatedAt).
	Scan(ctx, &v)

func (*ParticipantQuery) Where

Where adds a new predicate for the builder.

func (*ParticipantQuery) WithCreatedBy

func (pq *ParticipantQuery) WithCreatedBy(opts ...func(*StepRunQuery)) *ParticipantQuery
WithCreatedBy tells the query-builder to eager-loads the nodes that are connected to

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

func (*ParticipantQuery) WithData

func (pq *ParticipantQuery) WithData(opts ...func(*DatumQuery)) *ParticipantQuery
WithData tells the query-builder to eager-loads the nodes that are connected to

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

func (*ParticipantQuery) WithImportedBy

func (pq *ParticipantQuery) WithImportedBy(opts ...func(*AdminQuery)) *ParticipantQuery
WithImportedBy tells the query-builder to eager-loads the nodes that are connected to

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

func (*ParticipantQuery) WithParticipations

func (pq *ParticipantQuery) WithParticipations(opts ...func(*ParticipationQuery)) *ParticipantQuery
WithParticipations tells the query-builder to eager-loads the nodes that are connected to

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

func (*ParticipantQuery) WithProjects

func (pq *ParticipantQuery) WithProjects(opts ...func(*ProjectQuery)) *ParticipantQuery
WithProjects tells the query-builder to eager-loads the nodes that are connected to

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

func (*ParticipantQuery) WithProviderIDs

func (pq *ParticipantQuery) WithProviderIDs(opts ...func(*ProviderIDQuery)) *ParticipantQuery
WithProviderIDs tells the query-builder to eager-loads the nodes that are connected to

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

func (*ParticipantQuery) WithSteps

func (pq *ParticipantQuery) WithSteps(opts ...func(*StepRunQuery)) *ParticipantQuery
WithSteps tells the query-builder to eager-loads the nodes that are connected to

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

type ParticipantSelect

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

ParticipantSelect is the builder for select fields of Participant entities.

func (*ParticipantSelect) Bool

func (ps *ParticipantSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ParticipantSelect) BoolX

func (ps *ParticipantSelect) BoolX(ctx context.Context) bool

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

func (*ParticipantSelect) Bools

func (ps *ParticipantSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*ParticipantSelect) BoolsX

func (ps *ParticipantSelect) BoolsX(ctx context.Context) []bool

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

func (*ParticipantSelect) Float64

func (ps *ParticipantSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ParticipantSelect) Float64X

func (ps *ParticipantSelect) Float64X(ctx context.Context) float64

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

func (*ParticipantSelect) Float64s

func (ps *ParticipantSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ParticipantSelect) Float64sX

func (ps *ParticipantSelect) Float64sX(ctx context.Context) []float64

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

func (*ParticipantSelect) Int

func (ps *ParticipantSelect) Int(ctx context.Context) (_ int, err error)

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

func (*ParticipantSelect) IntX

func (ps *ParticipantSelect) IntX(ctx context.Context) int

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

func (*ParticipantSelect) Ints

func (ps *ParticipantSelect) Ints(ctx context.Context) ([]int, error)

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

func (*ParticipantSelect) IntsX

func (ps *ParticipantSelect) IntsX(ctx context.Context) []int

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

func (*ParticipantSelect) Scan

func (ps *ParticipantSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ParticipantSelect) ScanX

func (ps *ParticipantSelect) ScanX(ctx context.Context, v interface{})

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

func (*ParticipantSelect) String

func (ps *ParticipantSelect) String(ctx context.Context) (_ string, err error)

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

func (*ParticipantSelect) StringX

func (ps *ParticipantSelect) StringX(ctx context.Context) string

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

func (*ParticipantSelect) Strings

func (ps *ParticipantSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ParticipantSelect) StringsX

func (ps *ParticipantSelect) StringsX(ctx context.Context) []string

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

type ParticipantUpdate

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

ParticipantUpdate is the builder for updating Participant entities.

func (*ParticipantUpdate) AddData

func (pu *ParticipantUpdate) AddData(d ...*Datum) *ParticipantUpdate

AddData adds the data edges to Datum.

func (*ParticipantUpdate) AddDatumIDs

func (pu *ParticipantUpdate) AddDatumIDs(ids ...string) *ParticipantUpdate

AddDatumIDs adds the data edge to Datum by ids.

func (*ParticipantUpdate) AddImportedBy

func (pu *ParticipantUpdate) AddImportedBy(a ...*Admin) *ParticipantUpdate

AddImportedBy adds the importedBy edges to Admin.

func (*ParticipantUpdate) AddImportedByIDs

func (pu *ParticipantUpdate) AddImportedByIDs(ids ...string) *ParticipantUpdate

AddImportedByIDs adds the importedBy edge to Admin by ids.

func (*ParticipantUpdate) AddParticipationIDs

func (pu *ParticipantUpdate) AddParticipationIDs(ids ...string) *ParticipantUpdate

AddParticipationIDs adds the participations edge to Participation by ids.

func (*ParticipantUpdate) AddParticipations

func (pu *ParticipantUpdate) AddParticipations(p ...*Participation) *ParticipantUpdate

AddParticipations adds the participations edges to Participation.

func (*ParticipantUpdate) AddProjectIDs

func (pu *ParticipantUpdate) AddProjectIDs(ids ...string) *ParticipantUpdate

AddProjectIDs adds the projects edge to Project by ids.

func (*ParticipantUpdate) AddProjects

func (pu *ParticipantUpdate) AddProjects(p ...*Project) *ParticipantUpdate

AddProjects adds the projects edges to Project.

func (*ParticipantUpdate) AddProviderIDIDs

func (pu *ParticipantUpdate) AddProviderIDIDs(ids ...string) *ParticipantUpdate

AddProviderIDIDs adds the providerIDs edge to ProviderID by ids.

func (*ParticipantUpdate) AddProviderIDs

func (pu *ParticipantUpdate) AddProviderIDs(p ...*ProviderID) *ParticipantUpdate

AddProviderIDs adds the providerIDs edges to ProviderID.

func (*ParticipantUpdate) AddStepIDs

func (pu *ParticipantUpdate) AddStepIDs(ids ...string) *ParticipantUpdate

AddStepIDs adds the steps edge to StepRun by ids.

func (*ParticipantUpdate) AddSteps

func (pu *ParticipantUpdate) AddSteps(s ...*StepRun) *ParticipantUpdate

AddSteps adds the steps edges to StepRun.

func (*ParticipantUpdate) ClearCreatedBy

func (pu *ParticipantUpdate) ClearCreatedBy() *ParticipantUpdate

ClearCreatedBy clears the "createdBy" edge to type StepRun.

func (*ParticipantUpdate) ClearData

func (pu *ParticipantUpdate) ClearData() *ParticipantUpdate

ClearData clears all "data" edges to type Datum.

func (*ParticipantUpdate) ClearImportedBy

func (pu *ParticipantUpdate) ClearImportedBy() *ParticipantUpdate

ClearImportedBy clears all "importedBy" edges to type Admin.

func (*ParticipantUpdate) ClearMturkWorkerID

func (pu *ParticipantUpdate) ClearMturkWorkerID() *ParticipantUpdate

ClearMturkWorkerID clears the value of mturkWorkerID.

func (*ParticipantUpdate) ClearParticipations

func (pu *ParticipantUpdate) ClearParticipations() *ParticipantUpdate

ClearParticipations clears all "participations" edges to type Participation.

func (*ParticipantUpdate) ClearProjects

func (pu *ParticipantUpdate) ClearProjects() *ParticipantUpdate

ClearProjects clears all "projects" edges to type Project.

func (*ParticipantUpdate) ClearProviderIDs

func (pu *ParticipantUpdate) ClearProviderIDs() *ParticipantUpdate

ClearProviderIDs clears all "providerIDs" edges to type ProviderID.

func (*ParticipantUpdate) ClearSteps

func (pu *ParticipantUpdate) ClearSteps() *ParticipantUpdate

ClearSteps clears all "steps" edges to type StepRun.

func (*ParticipantUpdate) ClearUninitialized

func (pu *ParticipantUpdate) ClearUninitialized() *ParticipantUpdate

ClearUninitialized clears the value of uninitialized.

func (*ParticipantUpdate) Exec

func (pu *ParticipantUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ParticipantUpdate) ExecX

func (pu *ParticipantUpdate) ExecX(ctx context.Context)

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

func (*ParticipantUpdate) Mutation

func (pu *ParticipantUpdate) Mutation() *ParticipantMutation

Mutation returns the ParticipantMutation object of the builder.

func (*ParticipantUpdate) RemoveData

func (pu *ParticipantUpdate) RemoveData(d ...*Datum) *ParticipantUpdate

RemoveData removes data edges to Datum.

func (*ParticipantUpdate) RemoveDatumIDs

func (pu *ParticipantUpdate) RemoveDatumIDs(ids ...string) *ParticipantUpdate

RemoveDatumIDs removes the data edge to Datum by ids.

func (*ParticipantUpdate) RemoveImportedBy

func (pu *ParticipantUpdate) RemoveImportedBy(a ...*Admin) *ParticipantUpdate

RemoveImportedBy removes importedBy edges to Admin.

func (*ParticipantUpdate) RemoveImportedByIDs

func (pu *ParticipantUpdate) RemoveImportedByIDs(ids ...string) *ParticipantUpdate

RemoveImportedByIDs removes the importedBy edge to Admin by ids.

func (*ParticipantUpdate) RemoveParticipationIDs

func (pu *ParticipantUpdate) RemoveParticipationIDs(ids ...string) *ParticipantUpdate

RemoveParticipationIDs removes the participations edge to Participation by ids.

func (*ParticipantUpdate) RemoveParticipations

func (pu *ParticipantUpdate) RemoveParticipations(p ...*Participation) *ParticipantUpdate

RemoveParticipations removes participations edges to Participation.

func (*ParticipantUpdate) RemoveProjectIDs

func (pu *ParticipantUpdate) RemoveProjectIDs(ids ...string) *ParticipantUpdate

RemoveProjectIDs removes the projects edge to Project by ids.

func (*ParticipantUpdate) RemoveProjects

func (pu *ParticipantUpdate) RemoveProjects(p ...*Project) *ParticipantUpdate

RemoveProjects removes projects edges to Project.

func (*ParticipantUpdate) RemoveProviderIDIDs

func (pu *ParticipantUpdate) RemoveProviderIDIDs(ids ...string) *ParticipantUpdate

RemoveProviderIDIDs removes the providerIDs edge to ProviderID by ids.

func (*ParticipantUpdate) RemoveProviderIDs

func (pu *ParticipantUpdate) RemoveProviderIDs(p ...*ProviderID) *ParticipantUpdate

RemoveProviderIDs removes providerIDs edges to ProviderID.

func (*ParticipantUpdate) RemoveStepIDs

func (pu *ParticipantUpdate) RemoveStepIDs(ids ...string) *ParticipantUpdate

RemoveStepIDs removes the steps edge to StepRun by ids.

func (*ParticipantUpdate) RemoveSteps

func (pu *ParticipantUpdate) RemoveSteps(s ...*StepRun) *ParticipantUpdate

RemoveSteps removes steps edges to StepRun.

func (*ParticipantUpdate) Save

func (pu *ParticipantUpdate) Save(ctx context.Context) (int, error)

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

func (*ParticipantUpdate) SaveX

func (pu *ParticipantUpdate) SaveX(ctx context.Context) int

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

func (*ParticipantUpdate) SetCreatedBy

func (pu *ParticipantUpdate) SetCreatedBy(s *StepRun) *ParticipantUpdate

SetCreatedBy sets the createdBy edge to StepRun.

func (*ParticipantUpdate) SetCreatedByID

func (pu *ParticipantUpdate) SetCreatedByID(id string) *ParticipantUpdate

SetCreatedByID sets the createdBy edge to StepRun by id.

func (*ParticipantUpdate) SetMturkWorkerID

func (pu *ParticipantUpdate) SetMturkWorkerID(s string) *ParticipantUpdate

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipantUpdate) SetNillableCreatedByID

func (pu *ParticipantUpdate) SetNillableCreatedByID(id *string) *ParticipantUpdate

SetNillableCreatedByID sets the createdBy edge to StepRun by id if the given value is not nil.

func (*ParticipantUpdate) SetNillableMturkWorkerID

func (pu *ParticipantUpdate) SetNillableMturkWorkerID(s *string) *ParticipantUpdate

SetNillableMturkWorkerID sets the mturkWorkerID field if the given value is not nil.

func (*ParticipantUpdate) SetNillableUninitialized

func (pu *ParticipantUpdate) SetNillableUninitialized(b *bool) *ParticipantUpdate

SetNillableUninitialized sets the uninitialized field if the given value is not nil.

func (*ParticipantUpdate) SetUninitialized

func (pu *ParticipantUpdate) SetUninitialized(b bool) *ParticipantUpdate

SetUninitialized sets the uninitialized field.

func (*ParticipantUpdate) SetUpdatedAt

func (pu *ParticipantUpdate) SetUpdatedAt(t time.Time) *ParticipantUpdate

SetUpdatedAt sets the updated_at field.

func (*ParticipantUpdate) Where

Where adds a new predicate for the builder.

type ParticipantUpdateOne

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

ParticipantUpdateOne is the builder for updating a single Participant entity.

func (*ParticipantUpdateOne) AddData

func (puo *ParticipantUpdateOne) AddData(d ...*Datum) *ParticipantUpdateOne

AddData adds the data edges to Datum.

func (*ParticipantUpdateOne) AddDatumIDs

func (puo *ParticipantUpdateOne) AddDatumIDs(ids ...string) *ParticipantUpdateOne

AddDatumIDs adds the data edge to Datum by ids.

func (*ParticipantUpdateOne) AddImportedBy

func (puo *ParticipantUpdateOne) AddImportedBy(a ...*Admin) *ParticipantUpdateOne

AddImportedBy adds the importedBy edges to Admin.

func (*ParticipantUpdateOne) AddImportedByIDs

func (puo *ParticipantUpdateOne) AddImportedByIDs(ids ...string) *ParticipantUpdateOne

AddImportedByIDs adds the importedBy edge to Admin by ids.

func (*ParticipantUpdateOne) AddParticipationIDs

func (puo *ParticipantUpdateOne) AddParticipationIDs(ids ...string) *ParticipantUpdateOne

AddParticipationIDs adds the participations edge to Participation by ids.

func (*ParticipantUpdateOne) AddParticipations

func (puo *ParticipantUpdateOne) AddParticipations(p ...*Participation) *ParticipantUpdateOne

AddParticipations adds the participations edges to Participation.

func (*ParticipantUpdateOne) AddProjectIDs

func (puo *ParticipantUpdateOne) AddProjectIDs(ids ...string) *ParticipantUpdateOne

AddProjectIDs adds the projects edge to Project by ids.

func (*ParticipantUpdateOne) AddProjects

func (puo *ParticipantUpdateOne) AddProjects(p ...*Project) *ParticipantUpdateOne

AddProjects adds the projects edges to Project.

func (*ParticipantUpdateOne) AddProviderIDIDs

func (puo *ParticipantUpdateOne) AddProviderIDIDs(ids ...string) *ParticipantUpdateOne

AddProviderIDIDs adds the providerIDs edge to ProviderID by ids.

func (*ParticipantUpdateOne) AddProviderIDs

func (puo *ParticipantUpdateOne) AddProviderIDs(p ...*ProviderID) *ParticipantUpdateOne

AddProviderIDs adds the providerIDs edges to ProviderID.

func (*ParticipantUpdateOne) AddStepIDs

func (puo *ParticipantUpdateOne) AddStepIDs(ids ...string) *ParticipantUpdateOne

AddStepIDs adds the steps edge to StepRun by ids.

func (*ParticipantUpdateOne) AddSteps

func (puo *ParticipantUpdateOne) AddSteps(s ...*StepRun) *ParticipantUpdateOne

AddSteps adds the steps edges to StepRun.

func (*ParticipantUpdateOne) ClearCreatedBy

func (puo *ParticipantUpdateOne) ClearCreatedBy() *ParticipantUpdateOne

ClearCreatedBy clears the "createdBy" edge to type StepRun.

func (*ParticipantUpdateOne) ClearData

func (puo *ParticipantUpdateOne) ClearData() *ParticipantUpdateOne

ClearData clears all "data" edges to type Datum.

func (*ParticipantUpdateOne) ClearImportedBy

func (puo *ParticipantUpdateOne) ClearImportedBy() *ParticipantUpdateOne

ClearImportedBy clears all "importedBy" edges to type Admin.

func (*ParticipantUpdateOne) ClearMturkWorkerID

func (puo *ParticipantUpdateOne) ClearMturkWorkerID() *ParticipantUpdateOne

ClearMturkWorkerID clears the value of mturkWorkerID.

func (*ParticipantUpdateOne) ClearParticipations

func (puo *ParticipantUpdateOne) ClearParticipations() *ParticipantUpdateOne

ClearParticipations clears all "participations" edges to type Participation.

func (*ParticipantUpdateOne) ClearProjects

func (puo *ParticipantUpdateOne) ClearProjects() *ParticipantUpdateOne

ClearProjects clears all "projects" edges to type Project.

func (*ParticipantUpdateOne) ClearProviderIDs

func (puo *ParticipantUpdateOne) ClearProviderIDs() *ParticipantUpdateOne

ClearProviderIDs clears all "providerIDs" edges to type ProviderID.

func (*ParticipantUpdateOne) ClearSteps

func (puo *ParticipantUpdateOne) ClearSteps() *ParticipantUpdateOne

ClearSteps clears all "steps" edges to type StepRun.

func (*ParticipantUpdateOne) ClearUninitialized

func (puo *ParticipantUpdateOne) ClearUninitialized() *ParticipantUpdateOne

ClearUninitialized clears the value of uninitialized.

func (*ParticipantUpdateOne) Exec

func (puo *ParticipantUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ParticipantUpdateOne) ExecX

func (puo *ParticipantUpdateOne) ExecX(ctx context.Context)

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

func (*ParticipantUpdateOne) Mutation

func (puo *ParticipantUpdateOne) Mutation() *ParticipantMutation

Mutation returns the ParticipantMutation object of the builder.

func (*ParticipantUpdateOne) RemoveData

func (puo *ParticipantUpdateOne) RemoveData(d ...*Datum) *ParticipantUpdateOne

RemoveData removes data edges to Datum.

func (*ParticipantUpdateOne) RemoveDatumIDs

func (puo *ParticipantUpdateOne) RemoveDatumIDs(ids ...string) *ParticipantUpdateOne

RemoveDatumIDs removes the data edge to Datum by ids.

func (*ParticipantUpdateOne) RemoveImportedBy

func (puo *ParticipantUpdateOne) RemoveImportedBy(a ...*Admin) *ParticipantUpdateOne

RemoveImportedBy removes importedBy edges to Admin.

func (*ParticipantUpdateOne) RemoveImportedByIDs

func (puo *ParticipantUpdateOne) RemoveImportedByIDs(ids ...string) *ParticipantUpdateOne

RemoveImportedByIDs removes the importedBy edge to Admin by ids.

func (*ParticipantUpdateOne) RemoveParticipationIDs

func (puo *ParticipantUpdateOne) RemoveParticipationIDs(ids ...string) *ParticipantUpdateOne

RemoveParticipationIDs removes the participations edge to Participation by ids.

func (*ParticipantUpdateOne) RemoveParticipations

func (puo *ParticipantUpdateOne) RemoveParticipations(p ...*Participation) *ParticipantUpdateOne

RemoveParticipations removes participations edges to Participation.

func (*ParticipantUpdateOne) RemoveProjectIDs

func (puo *ParticipantUpdateOne) RemoveProjectIDs(ids ...string) *ParticipantUpdateOne

RemoveProjectIDs removes the projects edge to Project by ids.

func (*ParticipantUpdateOne) RemoveProjects

func (puo *ParticipantUpdateOne) RemoveProjects(p ...*Project) *ParticipantUpdateOne

RemoveProjects removes projects edges to Project.

func (*ParticipantUpdateOne) RemoveProviderIDIDs

func (puo *ParticipantUpdateOne) RemoveProviderIDIDs(ids ...string) *ParticipantUpdateOne

RemoveProviderIDIDs removes the providerIDs edge to ProviderID by ids.

func (*ParticipantUpdateOne) RemoveProviderIDs

func (puo *ParticipantUpdateOne) RemoveProviderIDs(p ...*ProviderID) *ParticipantUpdateOne

RemoveProviderIDs removes providerIDs edges to ProviderID.

func (*ParticipantUpdateOne) RemoveStepIDs

func (puo *ParticipantUpdateOne) RemoveStepIDs(ids ...string) *ParticipantUpdateOne

RemoveStepIDs removes the steps edge to StepRun by ids.

func (*ParticipantUpdateOne) RemoveSteps

func (puo *ParticipantUpdateOne) RemoveSteps(s ...*StepRun) *ParticipantUpdateOne

RemoveSteps removes steps edges to StepRun.

func (*ParticipantUpdateOne) Save

Save executes the query and returns the updated entity.

func (*ParticipantUpdateOne) SaveX

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

func (*ParticipantUpdateOne) SetCreatedBy

func (puo *ParticipantUpdateOne) SetCreatedBy(s *StepRun) *ParticipantUpdateOne

SetCreatedBy sets the createdBy edge to StepRun.

func (*ParticipantUpdateOne) SetCreatedByID

func (puo *ParticipantUpdateOne) SetCreatedByID(id string) *ParticipantUpdateOne

SetCreatedByID sets the createdBy edge to StepRun by id.

func (*ParticipantUpdateOne) SetMturkWorkerID

func (puo *ParticipantUpdateOne) SetMturkWorkerID(s string) *ParticipantUpdateOne

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipantUpdateOne) SetNillableCreatedByID

func (puo *ParticipantUpdateOne) SetNillableCreatedByID(id *string) *ParticipantUpdateOne

SetNillableCreatedByID sets the createdBy edge to StepRun by id if the given value is not nil.

func (*ParticipantUpdateOne) SetNillableMturkWorkerID

func (puo *ParticipantUpdateOne) SetNillableMturkWorkerID(s *string) *ParticipantUpdateOne

SetNillableMturkWorkerID sets the mturkWorkerID field if the given value is not nil.

func (*ParticipantUpdateOne) SetNillableUninitialized

func (puo *ParticipantUpdateOne) SetNillableUninitialized(b *bool) *ParticipantUpdateOne

SetNillableUninitialized sets the uninitialized field if the given value is not nil.

func (*ParticipantUpdateOne) SetUninitialized

func (puo *ParticipantUpdateOne) SetUninitialized(b bool) *ParticipantUpdateOne

SetUninitialized sets the uninitialized field.

func (*ParticipantUpdateOne) SetUpdatedAt

func (puo *ParticipantUpdateOne) SetUpdatedAt(t time.Time) *ParticipantUpdateOne

SetUpdatedAt sets the updated_at field.

type Participants

type Participants []*Participant

Participants is a parsable slice of Participant.

type Participation

type Participation struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// AddedParticipant holds the value of the "addedParticipant" field.
	AddedParticipant bool `json:"addedParticipant,omitempty"`
	// MturkWorkerID holds the value of the "mturkWorkerID" field.
	MturkWorkerID string `json:"mturkWorkerID,omitempty"`
	// MturkAssignmentID holds the value of the "mturkAssignmentID" field.
	MturkAssignmentID string `json:"mturkAssignmentID,omitempty"`
	// MturkHitID holds the value of the "mturkHitID" field.
	MturkHitID string `json:"mturkHitID,omitempty"`
	// MturkAcceptedAt holds the value of the "mturkAcceptedAt" field.
	MturkAcceptedAt time.Time `json:"mturkAcceptedAt,omitempty"`
	// MturkSubmittedAt holds the value of the "mturkSubmittedAt" field.
	MturkSubmittedAt time.Time `json:"mturkSubmittedAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ParticipationQuery when eager-loading is set.
	Edges ParticipationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Participation is the model entity for the Participation schema.

func (*Participation) QueryParticipant

func (pa *Participation) QueryParticipant() *ParticipantQuery

QueryParticipant queries the participant edge of the Participation.

func (*Participation) QueryStepRun

func (pa *Participation) QueryStepRun() *StepRunQuery

QueryStepRun queries the stepRun edge of the Participation.

func (*Participation) String

func (pa *Participation) String() string

String implements the fmt.Stringer.

func (*Participation) Unwrap

func (pa *Participation) Unwrap() *Participation

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 (*Participation) Update

func (pa *Participation) Update() *ParticipationUpdateOne

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

type ParticipationClient

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

ParticipationClient is a client for the Participation schema.

func NewParticipationClient

func NewParticipationClient(c config) *ParticipationClient

NewParticipationClient returns a client for the Participation from the given config.

func (*ParticipationClient) Create

Create returns a create builder for Participation.

func (*ParticipationClient) CreateBulk

BulkCreate returns a builder for creating a bulk of Participation entities.

func (*ParticipationClient) Delete

Delete returns a delete builder for Participation.

func (*ParticipationClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ParticipationClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*ParticipationClient) Get

Get returns a Participation entity by its id.

func (*ParticipationClient) GetX

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

func (*ParticipationClient) Hooks

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

Hooks returns the client hooks.

func (*ParticipationClient) Query

Query returns a query builder for Participation.

func (*ParticipationClient) QueryParticipant

func (c *ParticipationClient) QueryParticipant(pa *Participation) *ParticipantQuery

QueryParticipant queries the participant edge of a Participation.

func (*ParticipationClient) QueryStepRun

func (c *ParticipationClient) QueryStepRun(pa *Participation) *StepRunQuery

QueryStepRun queries the stepRun edge of a Participation.

func (*ParticipationClient) Update

Update returns an update builder for Participation.

func (*ParticipationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ParticipationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ParticipationClient) Use

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

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

type ParticipationCreate

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

ParticipationCreate is the builder for creating a Participation entity.

func (*ParticipationCreate) Mutation

Mutation returns the ParticipationMutation object of the builder.

func (*ParticipationCreate) Save

Save creates the Participation in the database.

func (*ParticipationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ParticipationCreate) SetAddedParticipant

func (pc *ParticipationCreate) SetAddedParticipant(b bool) *ParticipationCreate

SetAddedParticipant sets the addedParticipant field.

func (*ParticipationCreate) SetCreatedAt

func (pc *ParticipationCreate) SetCreatedAt(t time.Time) *ParticipationCreate

SetCreatedAt sets the created_at field.

func (*ParticipationCreate) SetID

SetID sets the id field.

func (*ParticipationCreate) SetMturkAcceptedAt

func (pc *ParticipationCreate) SetMturkAcceptedAt(t time.Time) *ParticipationCreate

SetMturkAcceptedAt sets the mturkAcceptedAt field.

func (*ParticipationCreate) SetMturkAssignmentID

func (pc *ParticipationCreate) SetMturkAssignmentID(s string) *ParticipationCreate

SetMturkAssignmentID sets the mturkAssignmentID field.

func (*ParticipationCreate) SetMturkHitID

func (pc *ParticipationCreate) SetMturkHitID(s string) *ParticipationCreate

SetMturkHitID sets the mturkHitID field.

func (*ParticipationCreate) SetMturkSubmittedAt

func (pc *ParticipationCreate) SetMturkSubmittedAt(t time.Time) *ParticipationCreate

SetMturkSubmittedAt sets the mturkSubmittedAt field.

func (*ParticipationCreate) SetMturkWorkerID

func (pc *ParticipationCreate) SetMturkWorkerID(s string) *ParticipationCreate

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipationCreate) SetNillableAddedParticipant

func (pc *ParticipationCreate) SetNillableAddedParticipant(b *bool) *ParticipationCreate

SetNillableAddedParticipant sets the addedParticipant field if the given value is not nil.

func (*ParticipationCreate) SetNillableCreatedAt

func (pc *ParticipationCreate) SetNillableCreatedAt(t *time.Time) *ParticipationCreate

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

func (*ParticipationCreate) SetNillableMturkAcceptedAt

func (pc *ParticipationCreate) SetNillableMturkAcceptedAt(t *time.Time) *ParticipationCreate

SetNillableMturkAcceptedAt sets the mturkAcceptedAt field if the given value is not nil.

func (*ParticipationCreate) SetNillableMturkSubmittedAt

func (pc *ParticipationCreate) SetNillableMturkSubmittedAt(t *time.Time) *ParticipationCreate

SetNillableMturkSubmittedAt sets the mturkSubmittedAt field if the given value is not nil.

func (*ParticipationCreate) SetNillableParticipantID

func (pc *ParticipationCreate) SetNillableParticipantID(id *string) *ParticipationCreate

SetNillableParticipantID sets the participant edge to Participant by id if the given value is not nil.

func (*ParticipationCreate) SetNillableStepRunID

func (pc *ParticipationCreate) SetNillableStepRunID(id *string) *ParticipationCreate

SetNillableStepRunID sets the stepRun edge to StepRun by id if the given value is not nil.

func (*ParticipationCreate) SetNillableUpdatedAt

func (pc *ParticipationCreate) SetNillableUpdatedAt(t *time.Time) *ParticipationCreate

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

func (*ParticipationCreate) SetParticipant

func (pc *ParticipationCreate) SetParticipant(p *Participant) *ParticipationCreate

SetParticipant sets the participant edge to Participant.

func (*ParticipationCreate) SetParticipantID

func (pc *ParticipationCreate) SetParticipantID(id string) *ParticipationCreate

SetParticipantID sets the participant edge to Participant by id.

func (*ParticipationCreate) SetStepRun

func (pc *ParticipationCreate) SetStepRun(s *StepRun) *ParticipationCreate

SetStepRun sets the stepRun edge to StepRun.

func (*ParticipationCreate) SetStepRunID

func (pc *ParticipationCreate) SetStepRunID(id string) *ParticipationCreate

SetStepRunID sets the stepRun edge to StepRun by id.

func (*ParticipationCreate) SetUpdatedAt

func (pc *ParticipationCreate) SetUpdatedAt(t time.Time) *ParticipationCreate

SetUpdatedAt sets the updated_at field.

type ParticipationCreateBulk

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

ParticipationCreateBulk is the builder for creating a bulk of Participation entities.

func (*ParticipationCreateBulk) Save

Save creates the Participation entities in the database.

func (*ParticipationCreateBulk) SaveX

SaveX calls Save and panics if Save returns an error.

type ParticipationDelete

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

ParticipationDelete is the builder for deleting a Participation entity.

func (*ParticipationDelete) Exec

func (pd *ParticipationDelete) Exec(ctx context.Context) (int, error)

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

func (*ParticipationDelete) ExecX

func (pd *ParticipationDelete) ExecX(ctx context.Context) int

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

func (*ParticipationDelete) Where

Where adds a new predicate to the delete builder.

type ParticipationDeleteOne

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

ParticipationDeleteOne is the builder for deleting a single Participation entity.

func (*ParticipationDeleteOne) Exec

Exec executes the deletion query.

func (*ParticipationDeleteOne) ExecX

func (pdo *ParticipationDeleteOne) ExecX(ctx context.Context)

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

type ParticipationEdges

type ParticipationEdges struct {
	// StepRun holds the value of the stepRun edge.
	StepRun *StepRun
	// Participant holds the value of the participant edge.
	Participant *Participant
	// contains filtered or unexported fields
}

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

func (ParticipationEdges) ParticipantOrErr

func (e ParticipationEdges) ParticipantOrErr() (*Participant, error)

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

func (ParticipationEdges) StepRunOrErr

func (e ParticipationEdges) StepRunOrErr() (*StepRun, error)

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

type ParticipationGroupBy

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

ParticipationGroupBy is the builder for group-by Participation entities.

func (*ParticipationGroupBy) Aggregate

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

func (*ParticipationGroupBy) Bool

func (pgb *ParticipationGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ParticipationGroupBy) BoolX

func (pgb *ParticipationGroupBy) BoolX(ctx context.Context) bool

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

func (*ParticipationGroupBy) Bools

func (pgb *ParticipationGroupBy) 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 (*ParticipationGroupBy) BoolsX

func (pgb *ParticipationGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ParticipationGroupBy) Float64

func (pgb *ParticipationGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ParticipationGroupBy) Float64X

func (pgb *ParticipationGroupBy) Float64X(ctx context.Context) float64

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

func (*ParticipationGroupBy) Float64s

func (pgb *ParticipationGroupBy) 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 (*ParticipationGroupBy) Float64sX

func (pgb *ParticipationGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ParticipationGroupBy) Int

func (pgb *ParticipationGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ParticipationGroupBy) IntX

func (pgb *ParticipationGroupBy) IntX(ctx context.Context) int

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

func (*ParticipationGroupBy) Ints

func (pgb *ParticipationGroupBy) 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 (*ParticipationGroupBy) IntsX

func (pgb *ParticipationGroupBy) IntsX(ctx context.Context) []int

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

func (*ParticipationGroupBy) Scan

func (pgb *ParticipationGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ParticipationGroupBy) ScanX

func (pgb *ParticipationGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ParticipationGroupBy) String

func (pgb *ParticipationGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ParticipationGroupBy) StringX

func (pgb *ParticipationGroupBy) StringX(ctx context.Context) string

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

func (*ParticipationGroupBy) Strings

func (pgb *ParticipationGroupBy) 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 (*ParticipationGroupBy) StringsX

func (pgb *ParticipationGroupBy) StringsX(ctx context.Context) []string

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

type ParticipationMutation

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

ParticipationMutation represents an operation that mutate the Participations nodes in the graph.

func (*ParticipationMutation) AddField

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

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

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

func (*ParticipationMutation) AddedField

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

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

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

func (*ParticipationMutation) AddedIDs

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

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

func (*ParticipationMutation) AddedParticipant

func (m *ParticipationMutation) AddedParticipant() (r bool, exists bool)

AddedParticipant returns the addedParticipant value in the mutation.

func (*ParticipationMutation) ClearEdge

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

func (m *ParticipationMutation) 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 (*ParticipationMutation) ClearMturkAcceptedAt

func (m *ParticipationMutation) ClearMturkAcceptedAt()

ClearMturkAcceptedAt clears the value of mturkAcceptedAt.

func (*ParticipationMutation) ClearMturkSubmittedAt

func (m *ParticipationMutation) ClearMturkSubmittedAt()

ClearMturkSubmittedAt clears the value of mturkSubmittedAt.

func (*ParticipationMutation) ClearParticipant

func (m *ParticipationMutation) ClearParticipant()

ClearParticipant clears the participant edge to Participant.

func (*ParticipationMutation) ClearStepRun

func (m *ParticipationMutation) ClearStepRun()

ClearStepRun clears the stepRun edge to StepRun.

func (*ParticipationMutation) ClearedEdges

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

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

func (*ParticipationMutation) ClearedFields

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

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

func (ParticipationMutation) Client

func (m ParticipationMutation) 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 (*ParticipationMutation) CreatedAt

func (m *ParticipationMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*ParticipationMutation) EdgeCleared

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

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

func (*ParticipationMutation) Field

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

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

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

func (*ParticipationMutation) Fields

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

func (m *ParticipationMutation) ID() (id string, 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 (*ParticipationMutation) MturkAcceptedAt

func (m *ParticipationMutation) MturkAcceptedAt() (r time.Time, exists bool)

MturkAcceptedAt returns the mturkAcceptedAt value in the mutation.

func (*ParticipationMutation) MturkAcceptedAtCleared

func (m *ParticipationMutation) MturkAcceptedAtCleared() bool

MturkAcceptedAtCleared returns if the field mturkAcceptedAt was cleared in this mutation.

func (*ParticipationMutation) MturkAssignmentID

func (m *ParticipationMutation) MturkAssignmentID() (r string, exists bool)

MturkAssignmentID returns the mturkAssignmentID value in the mutation.

func (*ParticipationMutation) MturkHitID

func (m *ParticipationMutation) MturkHitID() (r string, exists bool)

MturkHitID returns the mturkHitID value in the mutation.

func (*ParticipationMutation) MturkSubmittedAt

func (m *ParticipationMutation) MturkSubmittedAt() (r time.Time, exists bool)

MturkSubmittedAt returns the mturkSubmittedAt value in the mutation.

func (*ParticipationMutation) MturkSubmittedAtCleared

func (m *ParticipationMutation) MturkSubmittedAtCleared() bool

MturkSubmittedAtCleared returns if the field mturkSubmittedAt was cleared in this mutation.

func (*ParticipationMutation) MturkWorkerID

func (m *ParticipationMutation) MturkWorkerID() (r string, exists bool)

MturkWorkerID returns the mturkWorkerID value in the mutation.

func (*ParticipationMutation) OldAddedParticipant

func (m *ParticipationMutation) OldAddedParticipant(ctx context.Context) (v bool, err error)

OldAddedParticipant returns the old addedParticipant value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) OldCreatedAt

func (m *ParticipationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) OldField

func (m *ParticipationMutation) 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 (*ParticipationMutation) OldMturkAcceptedAt

func (m *ParticipationMutation) OldMturkAcceptedAt(ctx context.Context) (v time.Time, err error)

OldMturkAcceptedAt returns the old mturkAcceptedAt value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) OldMturkAssignmentID

func (m *ParticipationMutation) OldMturkAssignmentID(ctx context.Context) (v string, err error)

OldMturkAssignmentID returns the old mturkAssignmentID value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) OldMturkHitID

func (m *ParticipationMutation) OldMturkHitID(ctx context.Context) (v string, err error)

OldMturkHitID returns the old mturkHitID value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) OldMturkSubmittedAt

func (m *ParticipationMutation) OldMturkSubmittedAt(ctx context.Context) (v time.Time, err error)

OldMturkSubmittedAt returns the old mturkSubmittedAt value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) OldMturkWorkerID

func (m *ParticipationMutation) OldMturkWorkerID(ctx context.Context) (v string, err error)

OldMturkWorkerID returns the old mturkWorkerID value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) OldUpdatedAt

func (m *ParticipationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Participation. If the Participation object wasn'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 (*ParticipationMutation) Op

func (m *ParticipationMutation) Op() Op

Op returns the operation name.

func (*ParticipationMutation) ParticipantCleared

func (m *ParticipationMutation) ParticipantCleared() bool

ParticipantCleared returns if the edge participant was cleared.

func (*ParticipationMutation) ParticipantID

func (m *ParticipationMutation) ParticipantID() (id string, exists bool)

ParticipantID returns the participant id in the mutation.

func (*ParticipationMutation) ParticipantIDs

func (m *ParticipationMutation) ParticipantIDs() (ids []string)

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

func (*ParticipationMutation) RemovedEdges

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

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

func (*ParticipationMutation) RemovedIDs

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

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

func (*ParticipationMutation) ResetAddedParticipant

func (m *ParticipationMutation) ResetAddedParticipant()

ResetAddedParticipant reset all changes of the "addedParticipant" field.

func (*ParticipationMutation) ResetCreatedAt

func (m *ParticipationMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*ParticipationMutation) ResetEdge

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

func (m *ParticipationMutation) 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 (*ParticipationMutation) ResetMturkAcceptedAt

func (m *ParticipationMutation) ResetMturkAcceptedAt()

ResetMturkAcceptedAt reset all changes of the "mturkAcceptedAt" field.

func (*ParticipationMutation) ResetMturkAssignmentID

func (m *ParticipationMutation) ResetMturkAssignmentID()

ResetMturkAssignmentID reset all changes of the "mturkAssignmentID" field.

func (*ParticipationMutation) ResetMturkHitID

func (m *ParticipationMutation) ResetMturkHitID()

ResetMturkHitID reset all changes of the "mturkHitID" field.

func (*ParticipationMutation) ResetMturkSubmittedAt

func (m *ParticipationMutation) ResetMturkSubmittedAt()

ResetMturkSubmittedAt reset all changes of the "mturkSubmittedAt" field.

func (*ParticipationMutation) ResetMturkWorkerID

func (m *ParticipationMutation) ResetMturkWorkerID()

ResetMturkWorkerID reset all changes of the "mturkWorkerID" field.

func (*ParticipationMutation) ResetParticipant

func (m *ParticipationMutation) ResetParticipant()

ResetParticipant reset all changes of the "participant" edge.

func (*ParticipationMutation) ResetStepRun

func (m *ParticipationMutation) ResetStepRun()

ResetStepRun reset all changes of the "stepRun" edge.

func (*ParticipationMutation) ResetUpdatedAt

func (m *ParticipationMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*ParticipationMutation) SetAddedParticipant

func (m *ParticipationMutation) SetAddedParticipant(b bool)

SetAddedParticipant sets the addedParticipant field.

func (*ParticipationMutation) SetCreatedAt

func (m *ParticipationMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*ParticipationMutation) SetField

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

func (m *ParticipationMutation) SetID(id string)

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

func (*ParticipationMutation) SetMturkAcceptedAt

func (m *ParticipationMutation) SetMturkAcceptedAt(t time.Time)

SetMturkAcceptedAt sets the mturkAcceptedAt field.

func (*ParticipationMutation) SetMturkAssignmentID

func (m *ParticipationMutation) SetMturkAssignmentID(s string)

SetMturkAssignmentID sets the mturkAssignmentID field.

func (*ParticipationMutation) SetMturkHitID

func (m *ParticipationMutation) SetMturkHitID(s string)

SetMturkHitID sets the mturkHitID field.

func (*ParticipationMutation) SetMturkSubmittedAt

func (m *ParticipationMutation) SetMturkSubmittedAt(t time.Time)

SetMturkSubmittedAt sets the mturkSubmittedAt field.

func (*ParticipationMutation) SetMturkWorkerID

func (m *ParticipationMutation) SetMturkWorkerID(s string)

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipationMutation) SetParticipantID

func (m *ParticipationMutation) SetParticipantID(id string)

SetParticipantID sets the participant edge to Participant by id.

func (*ParticipationMutation) SetStepRunID

func (m *ParticipationMutation) SetStepRunID(id string)

SetStepRunID sets the stepRun edge to StepRun by id.

func (*ParticipationMutation) SetUpdatedAt

func (m *ParticipationMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*ParticipationMutation) StepRunCleared

func (m *ParticipationMutation) StepRunCleared() bool

StepRunCleared returns if the edge stepRun was cleared.

func (*ParticipationMutation) StepRunID

func (m *ParticipationMutation) StepRunID() (id string, exists bool)

StepRunID returns the stepRun id in the mutation.

func (*ParticipationMutation) StepRunIDs

func (m *ParticipationMutation) StepRunIDs() (ids []string)

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

func (ParticipationMutation) Tx

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

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

func (*ParticipationMutation) Type

func (m *ParticipationMutation) Type() string

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

func (*ParticipationMutation) UpdatedAt

func (m *ParticipationMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

type ParticipationQuery

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

ParticipationQuery is the builder for querying Participation entities.

func (*ParticipationQuery) All

All executes the query and returns a list of Participations.

func (*ParticipationQuery) AllX

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

func (*ParticipationQuery) Clone

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 (*ParticipationQuery) Count

func (pq *ParticipationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ParticipationQuery) CountX

func (pq *ParticipationQuery) CountX(ctx context.Context) int

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

func (*ParticipationQuery) Exist

func (pq *ParticipationQuery) Exist(ctx context.Context) (bool, error)

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

func (*ParticipationQuery) ExistX

func (pq *ParticipationQuery) ExistX(ctx context.Context) bool

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

func (*ParticipationQuery) First

First returns the first Participation entity in the query. Returns *NotFoundError when no participation was found.

func (*ParticipationQuery) FirstID

func (pq *ParticipationQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*ParticipationQuery) FirstX

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

func (*ParticipationQuery) FirstXID

func (pq *ParticipationQuery) FirstXID(ctx context.Context) string

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

func (*ParticipationQuery) GroupBy

func (pq *ParticipationQuery) GroupBy(field string, fields ...string) *ParticipationGroupBy

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

client.Participation.Query().
	GroupBy(participation.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ParticipationQuery) IDs

func (pq *ParticipationQuery) IDs(ctx context.Context) ([]string, error)

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

func (*ParticipationQuery) IDsX

func (pq *ParticipationQuery) IDsX(ctx context.Context) []string

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

func (*ParticipationQuery) Limit

func (pq *ParticipationQuery) Limit(limit int) *ParticipationQuery

Limit adds a limit step to the query.

func (*ParticipationQuery) Offset

func (pq *ParticipationQuery) Offset(offset int) *ParticipationQuery

Offset adds an offset step to the query.

func (*ParticipationQuery) Only

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

func (*ParticipationQuery) OnlyID

func (pq *ParticipationQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*ParticipationQuery) OnlyIDX

func (pq *ParticipationQuery) OnlyIDX(ctx context.Context) string

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

func (*ParticipationQuery) OnlyX

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

func (*ParticipationQuery) Order

Order adds an order step to the query.

func (*ParticipationQuery) QueryParticipant

func (pq *ParticipationQuery) QueryParticipant() *ParticipantQuery

QueryParticipant chains the current query on the participant edge.

func (*ParticipationQuery) QueryStepRun

func (pq *ParticipationQuery) QueryStepRun() *StepRunQuery

QueryStepRun chains the current query on the stepRun edge.

func (*ParticipationQuery) Select

func (pq *ParticipationQuery) Select(field string, fields ...string) *ParticipationSelect

Select one or more fields from the given query.

Example:

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

client.Participation.Query().
	Select(participation.FieldCreatedAt).
	Scan(ctx, &v)

func (*ParticipationQuery) Where

Where adds a new predicate for the builder.

func (*ParticipationQuery) WithParticipant

func (pq *ParticipationQuery) WithParticipant(opts ...func(*ParticipantQuery)) *ParticipationQuery
WithParticipant tells the query-builder to eager-loads the nodes that are connected to

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

func (*ParticipationQuery) WithStepRun

func (pq *ParticipationQuery) WithStepRun(opts ...func(*StepRunQuery)) *ParticipationQuery
WithStepRun tells the query-builder to eager-loads the nodes that are connected to

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

type ParticipationSelect

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

ParticipationSelect is the builder for select fields of Participation entities.

func (*ParticipationSelect) Bool

func (ps *ParticipationSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ParticipationSelect) BoolX

func (ps *ParticipationSelect) BoolX(ctx context.Context) bool

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

func (*ParticipationSelect) Bools

func (ps *ParticipationSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*ParticipationSelect) BoolsX

func (ps *ParticipationSelect) BoolsX(ctx context.Context) []bool

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

func (*ParticipationSelect) Float64

func (ps *ParticipationSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ParticipationSelect) Float64X

func (ps *ParticipationSelect) Float64X(ctx context.Context) float64

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

func (*ParticipationSelect) Float64s

func (ps *ParticipationSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ParticipationSelect) Float64sX

func (ps *ParticipationSelect) Float64sX(ctx context.Context) []float64

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

func (*ParticipationSelect) Int

func (ps *ParticipationSelect) Int(ctx context.Context) (_ int, err error)

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

func (*ParticipationSelect) IntX

func (ps *ParticipationSelect) IntX(ctx context.Context) int

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

func (*ParticipationSelect) Ints

func (ps *ParticipationSelect) Ints(ctx context.Context) ([]int, error)

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

func (*ParticipationSelect) IntsX

func (ps *ParticipationSelect) IntsX(ctx context.Context) []int

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

func (*ParticipationSelect) Scan

func (ps *ParticipationSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ParticipationSelect) ScanX

func (ps *ParticipationSelect) ScanX(ctx context.Context, v interface{})

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

func (*ParticipationSelect) String

func (ps *ParticipationSelect) String(ctx context.Context) (_ string, err error)

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

func (*ParticipationSelect) StringX

func (ps *ParticipationSelect) StringX(ctx context.Context) string

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

func (*ParticipationSelect) Strings

func (ps *ParticipationSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ParticipationSelect) StringsX

func (ps *ParticipationSelect) StringsX(ctx context.Context) []string

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

type ParticipationUpdate

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

ParticipationUpdate is the builder for updating Participation entities.

func (*ParticipationUpdate) ClearMturkAcceptedAt

func (pu *ParticipationUpdate) ClearMturkAcceptedAt() *ParticipationUpdate

ClearMturkAcceptedAt clears the value of mturkAcceptedAt.

func (*ParticipationUpdate) ClearMturkSubmittedAt

func (pu *ParticipationUpdate) ClearMturkSubmittedAt() *ParticipationUpdate

ClearMturkSubmittedAt clears the value of mturkSubmittedAt.

func (*ParticipationUpdate) ClearParticipant

func (pu *ParticipationUpdate) ClearParticipant() *ParticipationUpdate

ClearParticipant clears the "participant" edge to type Participant.

func (*ParticipationUpdate) ClearStepRun

func (pu *ParticipationUpdate) ClearStepRun() *ParticipationUpdate

ClearStepRun clears the "stepRun" edge to type StepRun.

func (*ParticipationUpdate) Exec

func (pu *ParticipationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ParticipationUpdate) ExecX

func (pu *ParticipationUpdate) ExecX(ctx context.Context)

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

func (*ParticipationUpdate) Mutation

Mutation returns the ParticipationMutation object of the builder.

func (*ParticipationUpdate) Save

func (pu *ParticipationUpdate) Save(ctx context.Context) (int, error)

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

func (*ParticipationUpdate) SaveX

func (pu *ParticipationUpdate) SaveX(ctx context.Context) int

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

func (*ParticipationUpdate) SetAddedParticipant

func (pu *ParticipationUpdate) SetAddedParticipant(b bool) *ParticipationUpdate

SetAddedParticipant sets the addedParticipant field.

func (*ParticipationUpdate) SetMturkAcceptedAt

func (pu *ParticipationUpdate) SetMturkAcceptedAt(t time.Time) *ParticipationUpdate

SetMturkAcceptedAt sets the mturkAcceptedAt field.

func (*ParticipationUpdate) SetMturkAssignmentID

func (pu *ParticipationUpdate) SetMturkAssignmentID(s string) *ParticipationUpdate

SetMturkAssignmentID sets the mturkAssignmentID field.

func (*ParticipationUpdate) SetMturkHitID

func (pu *ParticipationUpdate) SetMturkHitID(s string) *ParticipationUpdate

SetMturkHitID sets the mturkHitID field.

func (*ParticipationUpdate) SetMturkSubmittedAt

func (pu *ParticipationUpdate) SetMturkSubmittedAt(t time.Time) *ParticipationUpdate

SetMturkSubmittedAt sets the mturkSubmittedAt field.

func (*ParticipationUpdate) SetMturkWorkerID

func (pu *ParticipationUpdate) SetMturkWorkerID(s string) *ParticipationUpdate

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipationUpdate) SetNillableAddedParticipant

func (pu *ParticipationUpdate) SetNillableAddedParticipant(b *bool) *ParticipationUpdate

SetNillableAddedParticipant sets the addedParticipant field if the given value is not nil.

func (*ParticipationUpdate) SetNillableMturkAcceptedAt

func (pu *ParticipationUpdate) SetNillableMturkAcceptedAt(t *time.Time) *ParticipationUpdate

SetNillableMturkAcceptedAt sets the mturkAcceptedAt field if the given value is not nil.

func (*ParticipationUpdate) SetNillableMturkSubmittedAt

func (pu *ParticipationUpdate) SetNillableMturkSubmittedAt(t *time.Time) *ParticipationUpdate

SetNillableMturkSubmittedAt sets the mturkSubmittedAt field if the given value is not nil.

func (*ParticipationUpdate) SetNillableParticipantID

func (pu *ParticipationUpdate) SetNillableParticipantID(id *string) *ParticipationUpdate

SetNillableParticipantID sets the participant edge to Participant by id if the given value is not nil.

func (*ParticipationUpdate) SetNillableStepRunID

func (pu *ParticipationUpdate) SetNillableStepRunID(id *string) *ParticipationUpdate

SetNillableStepRunID sets the stepRun edge to StepRun by id if the given value is not nil.

func (*ParticipationUpdate) SetParticipant

func (pu *ParticipationUpdate) SetParticipant(p *Participant) *ParticipationUpdate

SetParticipant sets the participant edge to Participant.

func (*ParticipationUpdate) SetParticipantID

func (pu *ParticipationUpdate) SetParticipantID(id string) *ParticipationUpdate

SetParticipantID sets the participant edge to Participant by id.

func (*ParticipationUpdate) SetStepRun

func (pu *ParticipationUpdate) SetStepRun(s *StepRun) *ParticipationUpdate

SetStepRun sets the stepRun edge to StepRun.

func (*ParticipationUpdate) SetStepRunID

func (pu *ParticipationUpdate) SetStepRunID(id string) *ParticipationUpdate

SetStepRunID sets the stepRun edge to StepRun by id.

func (*ParticipationUpdate) SetUpdatedAt

func (pu *ParticipationUpdate) SetUpdatedAt(t time.Time) *ParticipationUpdate

SetUpdatedAt sets the updated_at field.

func (*ParticipationUpdate) Where

Where adds a new predicate for the builder.

type ParticipationUpdateOne

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

ParticipationUpdateOne is the builder for updating a single Participation entity.

func (*ParticipationUpdateOne) ClearMturkAcceptedAt

func (puo *ParticipationUpdateOne) ClearMturkAcceptedAt() *ParticipationUpdateOne

ClearMturkAcceptedAt clears the value of mturkAcceptedAt.

func (*ParticipationUpdateOne) ClearMturkSubmittedAt

func (puo *ParticipationUpdateOne) ClearMturkSubmittedAt() *ParticipationUpdateOne

ClearMturkSubmittedAt clears the value of mturkSubmittedAt.

func (*ParticipationUpdateOne) ClearParticipant

func (puo *ParticipationUpdateOne) ClearParticipant() *ParticipationUpdateOne

ClearParticipant clears the "participant" edge to type Participant.

func (*ParticipationUpdateOne) ClearStepRun

func (puo *ParticipationUpdateOne) ClearStepRun() *ParticipationUpdateOne

ClearStepRun clears the "stepRun" edge to type StepRun.

func (*ParticipationUpdateOne) Exec

Exec executes the query on the entity.

func (*ParticipationUpdateOne) ExecX

func (puo *ParticipationUpdateOne) ExecX(ctx context.Context)

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

func (*ParticipationUpdateOne) Mutation

Mutation returns the ParticipationMutation object of the builder.

func (*ParticipationUpdateOne) Save

Save executes the query and returns the updated entity.

func (*ParticipationUpdateOne) SaveX

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

func (*ParticipationUpdateOne) SetAddedParticipant

func (puo *ParticipationUpdateOne) SetAddedParticipant(b bool) *ParticipationUpdateOne

SetAddedParticipant sets the addedParticipant field.

func (*ParticipationUpdateOne) SetMturkAcceptedAt

func (puo *ParticipationUpdateOne) SetMturkAcceptedAt(t time.Time) *ParticipationUpdateOne

SetMturkAcceptedAt sets the mturkAcceptedAt field.

func (*ParticipationUpdateOne) SetMturkAssignmentID

func (puo *ParticipationUpdateOne) SetMturkAssignmentID(s string) *ParticipationUpdateOne

SetMturkAssignmentID sets the mturkAssignmentID field.

func (*ParticipationUpdateOne) SetMturkHitID

func (puo *ParticipationUpdateOne) SetMturkHitID(s string) *ParticipationUpdateOne

SetMturkHitID sets the mturkHitID field.

func (*ParticipationUpdateOne) SetMturkSubmittedAt

func (puo *ParticipationUpdateOne) SetMturkSubmittedAt(t time.Time) *ParticipationUpdateOne

SetMturkSubmittedAt sets the mturkSubmittedAt field.

func (*ParticipationUpdateOne) SetMturkWorkerID

func (puo *ParticipationUpdateOne) SetMturkWorkerID(s string) *ParticipationUpdateOne

SetMturkWorkerID sets the mturkWorkerID field.

func (*ParticipationUpdateOne) SetNillableAddedParticipant

func (puo *ParticipationUpdateOne) SetNillableAddedParticipant(b *bool) *ParticipationUpdateOne

SetNillableAddedParticipant sets the addedParticipant field if the given value is not nil.

func (*ParticipationUpdateOne) SetNillableMturkAcceptedAt

func (puo *ParticipationUpdateOne) SetNillableMturkAcceptedAt(t *time.Time) *ParticipationUpdateOne

SetNillableMturkAcceptedAt sets the mturkAcceptedAt field if the given value is not nil.

func (*ParticipationUpdateOne) SetNillableMturkSubmittedAt

func (puo *ParticipationUpdateOne) SetNillableMturkSubmittedAt(t *time.Time) *ParticipationUpdateOne

SetNillableMturkSubmittedAt sets the mturkSubmittedAt field if the given value is not nil.

func (*ParticipationUpdateOne) SetNillableParticipantID

func (puo *ParticipationUpdateOne) SetNillableParticipantID(id *string) *ParticipationUpdateOne

SetNillableParticipantID sets the participant edge to Participant by id if the given value is not nil.

func (*ParticipationUpdateOne) SetNillableStepRunID

func (puo *ParticipationUpdateOne) SetNillableStepRunID(id *string) *ParticipationUpdateOne

SetNillableStepRunID sets the stepRun edge to StepRun by id if the given value is not nil.

func (*ParticipationUpdateOne) SetParticipant

SetParticipant sets the participant edge to Participant.

func (*ParticipationUpdateOne) SetParticipantID

func (puo *ParticipationUpdateOne) SetParticipantID(id string) *ParticipationUpdateOne

SetParticipantID sets the participant edge to Participant by id.

func (*ParticipationUpdateOne) SetStepRun

SetStepRun sets the stepRun edge to StepRun.

func (*ParticipationUpdateOne) SetStepRunID

func (puo *ParticipationUpdateOne) SetStepRunID(id string) *ParticipationUpdateOne

SetStepRunID sets the stepRun edge to StepRun by id.

func (*ParticipationUpdateOne) SetUpdatedAt

SetUpdatedAt sets the updated_at field.

type Participations

type Participations []*Participation

Participations is a parsable slice of Participation.

type Policy

type Policy = ent.Policy

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

type Project

type Project struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// ProjectID holds the value of the "projectID" field.
	ProjectID string `json:"projectID,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 ProjectQuery when eager-loading is set.
	Edges ProjectEdges `json:"edges"`
	// contains filtered or unexported fields
}

Project is the model entity for the Project schema.

func (*Project) QueryOwner

func (pr *Project) QueryOwner() *AdminQuery

QueryOwner queries the owner edge of the Project.

func (*Project) QueryParticipants

func (pr *Project) QueryParticipants() *ParticipantQuery

QueryParticipants queries the participants edge of the Project.

func (*Project) QueryRuns

func (pr *Project) QueryRuns() *RunQuery

QueryRuns queries the runs edge of the Project.

func (*Project) QueryTemplates

func (pr *Project) QueryTemplates() *TemplateQuery

QueryTemplates queries the templates edge of the Project.

func (*Project) String

func (pr *Project) String() string

String implements the fmt.Stringer.

func (*Project) Unwrap

func (pr *Project) Unwrap() *Project

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 (*Project) Update

func (pr *Project) Update() *ProjectUpdateOne

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

type ProjectClient

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

ProjectClient is a client for the Project schema.

func NewProjectClient

func NewProjectClient(c config) *ProjectClient

NewProjectClient returns a client for the Project from the given config.

func (*ProjectClient) Create

func (c *ProjectClient) Create() *ProjectCreate

Create returns a create builder for Project.

func (*ProjectClient) CreateBulk

func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk

BulkCreate returns a builder for creating a bulk of Project entities.

func (*ProjectClient) Delete

func (c *ProjectClient) Delete() *ProjectDelete

Delete returns a delete builder for Project.

func (*ProjectClient) DeleteOne

func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ProjectClient) DeleteOneID

func (c *ProjectClient) DeleteOneID(id string) *ProjectDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ProjectClient) Get

func (c *ProjectClient) Get(ctx context.Context, id string) (*Project, error)

Get returns a Project entity by its id.

func (*ProjectClient) GetX

func (c *ProjectClient) GetX(ctx context.Context, id string) *Project

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

func (*ProjectClient) Hooks

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

Hooks returns the client hooks.

func (*ProjectClient) Query

func (c *ProjectClient) Query() *ProjectQuery

Query returns a query builder for Project.

func (*ProjectClient) QueryOwner

func (c *ProjectClient) QueryOwner(pr *Project) *AdminQuery

QueryOwner queries the owner edge of a Project.

func (*ProjectClient) QueryParticipants

func (c *ProjectClient) QueryParticipants(pr *Project) *ParticipantQuery

QueryParticipants queries the participants edge of a Project.

func (*ProjectClient) QueryRuns

func (c *ProjectClient) QueryRuns(pr *Project) *RunQuery

QueryRuns queries the runs edge of a Project.

func (*ProjectClient) QueryTemplates

func (c *ProjectClient) QueryTemplates(pr *Project) *TemplateQuery

QueryTemplates queries the templates edge of a Project.

func (*ProjectClient) Update

func (c *ProjectClient) Update() *ProjectUpdate

Update returns an update builder for Project.

func (*ProjectClient) UpdateOne

func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProjectClient) UpdateOneID

func (c *ProjectClient) UpdateOneID(id string) *ProjectUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProjectClient) Use

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

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

type ProjectCreate

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

ProjectCreate is the builder for creating a Project entity.

func (*ProjectCreate) AddParticipantIDs

func (pc *ProjectCreate) AddParticipantIDs(ids ...string) *ProjectCreate

AddParticipantIDs adds the participants edge to Participant by ids.

func (*ProjectCreate) AddParticipants

func (pc *ProjectCreate) AddParticipants(p ...*Participant) *ProjectCreate

AddParticipants adds the participants edges to Participant.

func (*ProjectCreate) AddRunIDs

func (pc *ProjectCreate) AddRunIDs(ids ...string) *ProjectCreate

AddRunIDs adds the runs edge to Run by ids.

func (*ProjectCreate) AddRuns

func (pc *ProjectCreate) AddRuns(r ...*Run) *ProjectCreate

AddRuns adds the runs edges to Run.

func (*ProjectCreate) AddTemplateIDs

func (pc *ProjectCreate) AddTemplateIDs(ids ...string) *ProjectCreate

AddTemplateIDs adds the templates edge to Template by ids.

func (*ProjectCreate) AddTemplates

func (pc *ProjectCreate) AddTemplates(t ...*Template) *ProjectCreate

AddTemplates adds the templates edges to Template.

func (*ProjectCreate) Mutation

func (pc *ProjectCreate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectCreate) Save

func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)

Save creates the Project in the database.

func (*ProjectCreate) SaveX

func (pc *ProjectCreate) SaveX(ctx context.Context) *Project

SaveX calls Save and panics if Save returns an error.

func (*ProjectCreate) SetCreatedAt

func (pc *ProjectCreate) SetCreatedAt(t time.Time) *ProjectCreate

SetCreatedAt sets the created_at field.

func (*ProjectCreate) SetID

func (pc *ProjectCreate) SetID(s string) *ProjectCreate

SetID sets the id field.

func (*ProjectCreate) SetName

func (pc *ProjectCreate) SetName(s string) *ProjectCreate

SetName sets the name field.

func (*ProjectCreate) SetNillableCreatedAt

func (pc *ProjectCreate) SetNillableCreatedAt(t *time.Time) *ProjectCreate

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

func (*ProjectCreate) SetNillableOwnerID

func (pc *ProjectCreate) SetNillableOwnerID(id *string) *ProjectCreate

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

func (*ProjectCreate) SetNillableUpdatedAt

func (pc *ProjectCreate) SetNillableUpdatedAt(t *time.Time) *ProjectCreate

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

func (*ProjectCreate) SetOwner

func (pc *ProjectCreate) SetOwner(a *Admin) *ProjectCreate

SetOwner sets the owner edge to Admin.

func (*ProjectCreate) SetOwnerID

func (pc *ProjectCreate) SetOwnerID(id string) *ProjectCreate

SetOwnerID sets the owner edge to Admin by id.

func (*ProjectCreate) SetProjectID

func (pc *ProjectCreate) SetProjectID(s string) *ProjectCreate

SetProjectID sets the projectID field.

func (*ProjectCreate) SetUpdatedAt

func (pc *ProjectCreate) SetUpdatedAt(t time.Time) *ProjectCreate

SetUpdatedAt sets the updated_at field.

type ProjectCreateBulk

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

ProjectCreateBulk is the builder for creating a bulk of Project entities.

func (*ProjectCreateBulk) Save

func (pcb *ProjectCreateBulk) Save(ctx context.Context) ([]*Project, error)

Save creates the Project entities in the database.

func (*ProjectCreateBulk) SaveX

func (pcb *ProjectCreateBulk) SaveX(ctx context.Context) []*Project

SaveX calls Save and panics if Save returns an error.

type ProjectDelete

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

ProjectDelete is the builder for deleting a Project entity.

func (*ProjectDelete) Exec

func (pd *ProjectDelete) Exec(ctx context.Context) (int, error)

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

func (*ProjectDelete) ExecX

func (pd *ProjectDelete) ExecX(ctx context.Context) int

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

func (*ProjectDelete) Where

func (pd *ProjectDelete) Where(ps ...predicate.Project) *ProjectDelete

Where adds a new predicate to the delete builder.

type ProjectDeleteOne

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

ProjectDeleteOne is the builder for deleting a single Project entity.

func (*ProjectDeleteOne) Exec

func (pdo *ProjectDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProjectDeleteOne) ExecX

func (pdo *ProjectDeleteOne) ExecX(ctx context.Context)

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

type ProjectEdges

type ProjectEdges struct {
	// Runs holds the value of the runs edge.
	Runs []*Run
	// Templates holds the value of the templates edge.
	Templates []*Template
	// Participants holds the value of the participants edge.
	Participants []*Participant
	// Owner holds the value of the owner edge.
	Owner *Admin
	// contains filtered or unexported fields
}

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

func (ProjectEdges) OwnerOrErr

func (e ProjectEdges) OwnerOrErr() (*Admin, 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 (ProjectEdges) ParticipantsOrErr

func (e ProjectEdges) ParticipantsOrErr() ([]*Participant, error)

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

func (ProjectEdges) RunsOrErr

func (e ProjectEdges) RunsOrErr() ([]*Run, error)

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

func (ProjectEdges) TemplatesOrErr

func (e ProjectEdges) TemplatesOrErr() ([]*Template, error)

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

type ProjectGroupBy

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

ProjectGroupBy is the builder for group-by Project entities.

func (*ProjectGroupBy) Aggregate

func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy

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

func (*ProjectGroupBy) Bool

func (pgb *ProjectGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ProjectGroupBy) BoolX

func (pgb *ProjectGroupBy) BoolX(ctx context.Context) bool

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

func (*ProjectGroupBy) Bools

func (pgb *ProjectGroupBy) 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 (*ProjectGroupBy) BoolsX

func (pgb *ProjectGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ProjectGroupBy) Float64

func (pgb *ProjectGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ProjectGroupBy) Float64X

func (pgb *ProjectGroupBy) Float64X(ctx context.Context) float64

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

func (*ProjectGroupBy) Float64s

func (pgb *ProjectGroupBy) 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 (*ProjectGroupBy) Float64sX

func (pgb *ProjectGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ProjectGroupBy) Int

func (pgb *ProjectGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ProjectGroupBy) IntX

func (pgb *ProjectGroupBy) IntX(ctx context.Context) int

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

func (*ProjectGroupBy) Ints

func (pgb *ProjectGroupBy) 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 (*ProjectGroupBy) IntsX

func (pgb *ProjectGroupBy) IntsX(ctx context.Context) []int

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

func (*ProjectGroupBy) Scan

func (pgb *ProjectGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ProjectGroupBy) ScanX

func (pgb *ProjectGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ProjectGroupBy) String

func (pgb *ProjectGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ProjectGroupBy) StringX

func (pgb *ProjectGroupBy) StringX(ctx context.Context) string

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

func (*ProjectGroupBy) Strings

func (pgb *ProjectGroupBy) 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 (*ProjectGroupBy) StringsX

func (pgb *ProjectGroupBy) StringsX(ctx context.Context) []string

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

type ProjectMutation

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

ProjectMutation represents an operation that mutate the Projects nodes in the graph.

func (*ProjectMutation) AddField

func (m *ProjectMutation) 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 (*ProjectMutation) AddParticipantIDs

func (m *ProjectMutation) AddParticipantIDs(ids ...string)

AddParticipantIDs adds the participants edge to Participant by ids.

func (*ProjectMutation) AddRunIDs

func (m *ProjectMutation) AddRunIDs(ids ...string)

AddRunIDs adds the runs edge to Run by ids.

func (*ProjectMutation) AddTemplateIDs

func (m *ProjectMutation) AddTemplateIDs(ids ...string)

AddTemplateIDs adds the templates edge to Template by ids.

func (*ProjectMutation) AddedEdges

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

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

func (*ProjectMutation) AddedField

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

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

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

func (*ProjectMutation) AddedIDs

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

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

func (*ProjectMutation) ClearEdge

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

func (m *ProjectMutation) 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 (*ProjectMutation) ClearOwner

func (m *ProjectMutation) ClearOwner()

ClearOwner clears the owner edge to Admin.

func (*ProjectMutation) ClearParticipants

func (m *ProjectMutation) ClearParticipants()

ClearParticipants clears the participants edge to Participant.

func (*ProjectMutation) ClearRuns

func (m *ProjectMutation) ClearRuns()

ClearRuns clears the runs edge to Run.

func (*ProjectMutation) ClearTemplates

func (m *ProjectMutation) ClearTemplates()

ClearTemplates clears the templates edge to Template.

func (*ProjectMutation) ClearedEdges

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

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

func (*ProjectMutation) ClearedFields

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

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

func (ProjectMutation) Client

func (m ProjectMutation) 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 (*ProjectMutation) CreatedAt

func (m *ProjectMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*ProjectMutation) EdgeCleared

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

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

func (*ProjectMutation) Field

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

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

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

func (*ProjectMutation) Fields

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

func (m *ProjectMutation) ID() (id string, 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 (*ProjectMutation) Name

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

Name returns the name value in the mutation.

func (*ProjectMutation) OldCreatedAt

func (m *ProjectMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Project. If the Project object wasn'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 (*ProjectMutation) OldField

func (m *ProjectMutation) 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 (*ProjectMutation) OldName

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

OldName returns the old name value of the Project. If the Project object wasn'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 (*ProjectMutation) OldProjectID

func (m *ProjectMutation) OldProjectID(ctx context.Context) (v string, err error)

OldProjectID returns the old projectID value of the Project. If the Project object wasn'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 (*ProjectMutation) OldUpdatedAt

func (m *ProjectMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Project. If the Project object wasn'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 (*ProjectMutation) Op

func (m *ProjectMutation) Op() Op

Op returns the operation name.

func (*ProjectMutation) OwnerCleared

func (m *ProjectMutation) OwnerCleared() bool

OwnerCleared returns if the edge owner was cleared.

func (*ProjectMutation) OwnerID

func (m *ProjectMutation) OwnerID() (id string, exists bool)

OwnerID returns the owner id in the mutation.

func (*ProjectMutation) OwnerIDs

func (m *ProjectMutation) OwnerIDs() (ids []string)

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 (*ProjectMutation) ParticipantsCleared

func (m *ProjectMutation) ParticipantsCleared() bool

ParticipantsCleared returns if the edge participants was cleared.

func (*ProjectMutation) ParticipantsIDs

func (m *ProjectMutation) ParticipantsIDs() (ids []string)

ParticipantsIDs returns the participants ids in the mutation.

func (*ProjectMutation) ProjectID

func (m *ProjectMutation) ProjectID() (r string, exists bool)

ProjectID returns the projectID value in the mutation.

func (*ProjectMutation) RemoveParticipantIDs

func (m *ProjectMutation) RemoveParticipantIDs(ids ...string)

RemoveParticipantIDs removes the participants edge to Participant by ids.

func (*ProjectMutation) RemoveRunIDs

func (m *ProjectMutation) RemoveRunIDs(ids ...string)

RemoveRunIDs removes the runs edge to Run by ids.

func (*ProjectMutation) RemoveTemplateIDs

func (m *ProjectMutation) RemoveTemplateIDs(ids ...string)

RemoveTemplateIDs removes the templates edge to Template by ids.

func (*ProjectMutation) RemovedEdges

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

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

func (*ProjectMutation) RemovedIDs

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

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

func (*ProjectMutation) RemovedParticipantsIDs

func (m *ProjectMutation) RemovedParticipantsIDs() (ids []string)

RemovedParticipants returns the removed ids of participants.

func (*ProjectMutation) RemovedRunsIDs

func (m *ProjectMutation) RemovedRunsIDs() (ids []string)

RemovedRuns returns the removed ids of runs.

func (*ProjectMutation) RemovedTemplatesIDs

func (m *ProjectMutation) RemovedTemplatesIDs() (ids []string)

RemovedTemplates returns the removed ids of templates.

func (*ProjectMutation) ResetCreatedAt

func (m *ProjectMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*ProjectMutation) ResetEdge

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

func (m *ProjectMutation) 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 (*ProjectMutation) ResetName

func (m *ProjectMutation) ResetName()

ResetName reset all changes of the "name" field.

func (*ProjectMutation) ResetOwner

func (m *ProjectMutation) ResetOwner()

ResetOwner reset all changes of the "owner" edge.

func (*ProjectMutation) ResetParticipants

func (m *ProjectMutation) ResetParticipants()

ResetParticipants reset all changes of the "participants" edge.

func (*ProjectMutation) ResetProjectID

func (m *ProjectMutation) ResetProjectID()

ResetProjectID reset all changes of the "projectID" field.

func (*ProjectMutation) ResetRuns

func (m *ProjectMutation) ResetRuns()

ResetRuns reset all changes of the "runs" edge.

func (*ProjectMutation) ResetTemplates

func (m *ProjectMutation) ResetTemplates()

ResetTemplates reset all changes of the "templates" edge.

func (*ProjectMutation) ResetUpdatedAt

func (m *ProjectMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*ProjectMutation) RunsCleared

func (m *ProjectMutation) RunsCleared() bool

RunsCleared returns if the edge runs was cleared.

func (*ProjectMutation) RunsIDs

func (m *ProjectMutation) RunsIDs() (ids []string)

RunsIDs returns the runs ids in the mutation.

func (*ProjectMutation) SetCreatedAt

func (m *ProjectMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*ProjectMutation) SetField

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

func (m *ProjectMutation) SetID(id string)

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

func (*ProjectMutation) SetName

func (m *ProjectMutation) SetName(s string)

SetName sets the name field.

func (*ProjectMutation) SetOwnerID

func (m *ProjectMutation) SetOwnerID(id string)

SetOwnerID sets the owner edge to Admin by id.

func (*ProjectMutation) SetProjectID

func (m *ProjectMutation) SetProjectID(s string)

SetProjectID sets the projectID field.

func (*ProjectMutation) SetUpdatedAt

func (m *ProjectMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*ProjectMutation) TemplatesCleared

func (m *ProjectMutation) TemplatesCleared() bool

TemplatesCleared returns if the edge templates was cleared.

func (*ProjectMutation) TemplatesIDs

func (m *ProjectMutation) TemplatesIDs() (ids []string)

TemplatesIDs returns the templates ids in the mutation.

func (ProjectMutation) Tx

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

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

func (*ProjectMutation) Type

func (m *ProjectMutation) Type() string

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

func (*ProjectMutation) UpdatedAt

func (m *ProjectMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

type ProjectQuery

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

ProjectQuery is the builder for querying Project entities.

func (*ProjectQuery) All

func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)

All executes the query and returns a list of Projects.

func (*ProjectQuery) AllX

func (pq *ProjectQuery) AllX(ctx context.Context) []*Project

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

func (*ProjectQuery) Clone

func (pq *ProjectQuery) Clone() *ProjectQuery

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 (*ProjectQuery) Count

func (pq *ProjectQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProjectQuery) CountX

func (pq *ProjectQuery) CountX(ctx context.Context) int

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

func (*ProjectQuery) Exist

func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)

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

func (*ProjectQuery) ExistX

func (pq *ProjectQuery) ExistX(ctx context.Context) bool

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

func (*ProjectQuery) First

func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)

First returns the first Project entity in the query. Returns *NotFoundError when no project was found.

func (*ProjectQuery) FirstID

func (pq *ProjectQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*ProjectQuery) FirstX

func (pq *ProjectQuery) FirstX(ctx context.Context) *Project

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

func (*ProjectQuery) FirstXID

func (pq *ProjectQuery) FirstXID(ctx context.Context) string

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

func (*ProjectQuery) GroupBy

func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy

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

client.Project.Query().
	GroupBy(project.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProjectQuery) IDs

func (pq *ProjectQuery) IDs(ctx context.Context) ([]string, error)

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

func (*ProjectQuery) IDsX

func (pq *ProjectQuery) IDsX(ctx context.Context) []string

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

func (*ProjectQuery) Limit

func (pq *ProjectQuery) Limit(limit int) *ProjectQuery

Limit adds a limit step to the query.

func (*ProjectQuery) Offset

func (pq *ProjectQuery) Offset(offset int) *ProjectQuery

Offset adds an offset step to the query.

func (*ProjectQuery) Only

func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)

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

func (*ProjectQuery) OnlyID

func (pq *ProjectQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*ProjectQuery) OnlyIDX

func (pq *ProjectQuery) OnlyIDX(ctx context.Context) string

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

func (*ProjectQuery) OnlyX

func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project

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

func (*ProjectQuery) Order

func (pq *ProjectQuery) Order(o ...OrderFunc) *ProjectQuery

Order adds an order step to the query.

func (*ProjectQuery) QueryOwner

func (pq *ProjectQuery) QueryOwner() *AdminQuery

QueryOwner chains the current query on the owner edge.

func (*ProjectQuery) QueryParticipants

func (pq *ProjectQuery) QueryParticipants() *ParticipantQuery

QueryParticipants chains the current query on the participants edge.

func (*ProjectQuery) QueryRuns

func (pq *ProjectQuery) QueryRuns() *RunQuery

QueryRuns chains the current query on the runs edge.

func (*ProjectQuery) QueryTemplates

func (pq *ProjectQuery) QueryTemplates() *TemplateQuery

QueryTemplates chains the current query on the templates edge.

func (*ProjectQuery) Select

func (pq *ProjectQuery) Select(field string, fields ...string) *ProjectSelect

Select one or more fields from the given query.

Example:

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

client.Project.Query().
	Select(project.FieldCreatedAt).
	Scan(ctx, &v)

func (*ProjectQuery) Where

func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery

Where adds a new predicate for the builder.

func (*ProjectQuery) WithOwner

func (pq *ProjectQuery) WithOwner(opts ...func(*AdminQuery)) *ProjectQuery
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 (*ProjectQuery) WithParticipants

func (pq *ProjectQuery) WithParticipants(opts ...func(*ParticipantQuery)) *ProjectQuery
WithParticipants tells the query-builder to eager-loads the nodes that are connected to

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

func (*ProjectQuery) WithRuns

func (pq *ProjectQuery) WithRuns(opts ...func(*RunQuery)) *ProjectQuery
WithRuns tells the query-builder to eager-loads the nodes that are connected to

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

func (*ProjectQuery) WithTemplates

func (pq *ProjectQuery) WithTemplates(opts ...func(*TemplateQuery)) *ProjectQuery
WithTemplates tells the query-builder to eager-loads the nodes that are connected to

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

type ProjectSelect

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

ProjectSelect is the builder for select fields of Project entities.

func (*ProjectSelect) Bool

func (ps *ProjectSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ProjectSelect) BoolX

func (ps *ProjectSelect) BoolX(ctx context.Context) bool

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

func (*ProjectSelect) Bools

func (ps *ProjectSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*ProjectSelect) BoolsX

func (ps *ProjectSelect) BoolsX(ctx context.Context) []bool

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

func (*ProjectSelect) Float64

func (ps *ProjectSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ProjectSelect) Float64X

func (ps *ProjectSelect) Float64X(ctx context.Context) float64

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

func (*ProjectSelect) Float64s

func (ps *ProjectSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ProjectSelect) Float64sX

func (ps *ProjectSelect) Float64sX(ctx context.Context) []float64

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

func (*ProjectSelect) Int

func (ps *ProjectSelect) Int(ctx context.Context) (_ int, err error)

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

func (*ProjectSelect) IntX

func (ps *ProjectSelect) IntX(ctx context.Context) int

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

func (*ProjectSelect) Ints

func (ps *ProjectSelect) Ints(ctx context.Context) ([]int, error)

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

func (*ProjectSelect) IntsX

func (ps *ProjectSelect) IntsX(ctx context.Context) []int

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

func (*ProjectSelect) Scan

func (ps *ProjectSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ProjectSelect) ScanX

func (ps *ProjectSelect) ScanX(ctx context.Context, v interface{})

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

func (*ProjectSelect) String

func (ps *ProjectSelect) String(ctx context.Context) (_ string, err error)

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

func (*ProjectSelect) StringX

func (ps *ProjectSelect) StringX(ctx context.Context) string

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

func (*ProjectSelect) Strings

func (ps *ProjectSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ProjectSelect) StringsX

func (ps *ProjectSelect) StringsX(ctx context.Context) []string

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

type ProjectUpdate

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

ProjectUpdate is the builder for updating Project entities.

func (*ProjectUpdate) AddParticipantIDs

func (pu *ProjectUpdate) AddParticipantIDs(ids ...string) *ProjectUpdate

AddParticipantIDs adds the participants edge to Participant by ids.

func (*ProjectUpdate) AddParticipants

func (pu *ProjectUpdate) AddParticipants(p ...*Participant) *ProjectUpdate

AddParticipants adds the participants edges to Participant.

func (*ProjectUpdate) AddRunIDs

func (pu *ProjectUpdate) AddRunIDs(ids ...string) *ProjectUpdate

AddRunIDs adds the runs edge to Run by ids.

func (*ProjectUpdate) AddRuns

func (pu *ProjectUpdate) AddRuns(r ...*Run) *ProjectUpdate

AddRuns adds the runs edges to Run.

func (*ProjectUpdate) AddTemplateIDs

func (pu *ProjectUpdate) AddTemplateIDs(ids ...string) *ProjectUpdate

AddTemplateIDs adds the templates edge to Template by ids.

func (*ProjectUpdate) AddTemplates

func (pu *ProjectUpdate) AddTemplates(t ...*Template) *ProjectUpdate

AddTemplates adds the templates edges to Template.

func (*ProjectUpdate) ClearOwner

func (pu *ProjectUpdate) ClearOwner() *ProjectUpdate

ClearOwner clears the "owner" edge to type Admin.

func (*ProjectUpdate) ClearParticipants

func (pu *ProjectUpdate) ClearParticipants() *ProjectUpdate

ClearParticipants clears all "participants" edges to type Participant.

func (*ProjectUpdate) ClearRuns

func (pu *ProjectUpdate) ClearRuns() *ProjectUpdate

ClearRuns clears all "runs" edges to type Run.

func (*ProjectUpdate) ClearTemplates

func (pu *ProjectUpdate) ClearTemplates() *ProjectUpdate

ClearTemplates clears all "templates" edges to type Template.

func (*ProjectUpdate) Exec

func (pu *ProjectUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpdate) ExecX

func (pu *ProjectUpdate) ExecX(ctx context.Context)

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

func (*ProjectUpdate) Mutation

func (pu *ProjectUpdate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdate) RemoveParticipantIDs

func (pu *ProjectUpdate) RemoveParticipantIDs(ids ...string) *ProjectUpdate

RemoveParticipantIDs removes the participants edge to Participant by ids.

func (*ProjectUpdate) RemoveParticipants

func (pu *ProjectUpdate) RemoveParticipants(p ...*Participant) *ProjectUpdate

RemoveParticipants removes participants edges to Participant.

func (*ProjectUpdate) RemoveRunIDs

func (pu *ProjectUpdate) RemoveRunIDs(ids ...string) *ProjectUpdate

RemoveRunIDs removes the runs edge to Run by ids.

func (*ProjectUpdate) RemoveRuns

func (pu *ProjectUpdate) RemoveRuns(r ...*Run) *ProjectUpdate

RemoveRuns removes runs edges to Run.

func (*ProjectUpdate) RemoveTemplateIDs

func (pu *ProjectUpdate) RemoveTemplateIDs(ids ...string) *ProjectUpdate

RemoveTemplateIDs removes the templates edge to Template by ids.

func (*ProjectUpdate) RemoveTemplates

func (pu *ProjectUpdate) RemoveTemplates(t ...*Template) *ProjectUpdate

RemoveTemplates removes templates edges to Template.

func (*ProjectUpdate) Save

func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)

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

func (*ProjectUpdate) SaveX

func (pu *ProjectUpdate) SaveX(ctx context.Context) int

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

func (*ProjectUpdate) SetName

func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate

SetName sets the name field.

func (*ProjectUpdate) SetNillableOwnerID

func (pu *ProjectUpdate) SetNillableOwnerID(id *string) *ProjectUpdate

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

func (*ProjectUpdate) SetOwner

func (pu *ProjectUpdate) SetOwner(a *Admin) *ProjectUpdate

SetOwner sets the owner edge to Admin.

func (*ProjectUpdate) SetOwnerID

func (pu *ProjectUpdate) SetOwnerID(id string) *ProjectUpdate

SetOwnerID sets the owner edge to Admin by id.

func (*ProjectUpdate) SetProjectID

func (pu *ProjectUpdate) SetProjectID(s string) *ProjectUpdate

SetProjectID sets the projectID field.

func (*ProjectUpdate) SetUpdatedAt

func (pu *ProjectUpdate) SetUpdatedAt(t time.Time) *ProjectUpdate

SetUpdatedAt sets the updated_at field.

func (*ProjectUpdate) Where

func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate

Where adds a new predicate for the builder.

type ProjectUpdateOne

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

ProjectUpdateOne is the builder for updating a single Project entity.

func (*ProjectUpdateOne) AddParticipantIDs

func (puo *ProjectUpdateOne) AddParticipantIDs(ids ...string) *ProjectUpdateOne

AddParticipantIDs adds the participants edge to Participant by ids.

func (*ProjectUpdateOne) AddParticipants

func (puo *ProjectUpdateOne) AddParticipants(p ...*Participant) *ProjectUpdateOne

AddParticipants adds the participants edges to Participant.

func (*ProjectUpdateOne) AddRunIDs

func (puo *ProjectUpdateOne) AddRunIDs(ids ...string) *ProjectUpdateOne

AddRunIDs adds the runs edge to Run by ids.

func (*ProjectUpdateOne) AddRuns

func (puo *ProjectUpdateOne) AddRuns(r ...*Run) *ProjectUpdateOne

AddRuns adds the runs edges to Run.

func (*ProjectUpdateOne) AddTemplateIDs

func (puo *ProjectUpdateOne) AddTemplateIDs(ids ...string) *ProjectUpdateOne

AddTemplateIDs adds the templates edge to Template by ids.

func (*ProjectUpdateOne) AddTemplates

func (puo *ProjectUpdateOne) AddTemplates(t ...*Template) *ProjectUpdateOne

AddTemplates adds the templates edges to Template.

func (*ProjectUpdateOne) ClearOwner

func (puo *ProjectUpdateOne) ClearOwner() *ProjectUpdateOne

ClearOwner clears the "owner" edge to type Admin.

func (*ProjectUpdateOne) ClearParticipants

func (puo *ProjectUpdateOne) ClearParticipants() *ProjectUpdateOne

ClearParticipants clears all "participants" edges to type Participant.

func (*ProjectUpdateOne) ClearRuns

func (puo *ProjectUpdateOne) ClearRuns() *ProjectUpdateOne

ClearRuns clears all "runs" edges to type Run.

func (*ProjectUpdateOne) ClearTemplates

func (puo *ProjectUpdateOne) ClearTemplates() *ProjectUpdateOne

ClearTemplates clears all "templates" edges to type Template.

func (*ProjectUpdateOne) Exec

func (puo *ProjectUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProjectUpdateOne) ExecX

func (puo *ProjectUpdateOne) ExecX(ctx context.Context)

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

func (*ProjectUpdateOne) Mutation

func (puo *ProjectUpdateOne) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdateOne) RemoveParticipantIDs

func (puo *ProjectUpdateOne) RemoveParticipantIDs(ids ...string) *ProjectUpdateOne

RemoveParticipantIDs removes the participants edge to Participant by ids.

func (*ProjectUpdateOne) RemoveParticipants

func (puo *ProjectUpdateOne) RemoveParticipants(p ...*Participant) *ProjectUpdateOne

RemoveParticipants removes participants edges to Participant.

func (*ProjectUpdateOne) RemoveRunIDs

func (puo *ProjectUpdateOne) RemoveRunIDs(ids ...string) *ProjectUpdateOne

RemoveRunIDs removes the runs edge to Run by ids.

func (*ProjectUpdateOne) RemoveRuns

func (puo *ProjectUpdateOne) RemoveRuns(r ...*Run) *ProjectUpdateOne

RemoveRuns removes runs edges to Run.

func (*ProjectUpdateOne) RemoveTemplateIDs

func (puo *ProjectUpdateOne) RemoveTemplateIDs(ids ...string) *ProjectUpdateOne

RemoveTemplateIDs removes the templates edge to Template by ids.

func (*ProjectUpdateOne) RemoveTemplates

func (puo *ProjectUpdateOne) RemoveTemplates(t ...*Template) *ProjectUpdateOne

RemoveTemplates removes templates edges to Template.

func (*ProjectUpdateOne) Save

func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)

Save executes the query and returns the updated entity.

func (*ProjectUpdateOne) SaveX

func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project

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

func (*ProjectUpdateOne) SetName

func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne

SetName sets the name field.

func (*ProjectUpdateOne) SetNillableOwnerID

func (puo *ProjectUpdateOne) SetNillableOwnerID(id *string) *ProjectUpdateOne

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

func (*ProjectUpdateOne) SetOwner

func (puo *ProjectUpdateOne) SetOwner(a *Admin) *ProjectUpdateOne

SetOwner sets the owner edge to Admin.

func (*ProjectUpdateOne) SetOwnerID

func (puo *ProjectUpdateOne) SetOwnerID(id string) *ProjectUpdateOne

SetOwnerID sets the owner edge to Admin by id.

func (*ProjectUpdateOne) SetProjectID

func (puo *ProjectUpdateOne) SetProjectID(s string) *ProjectUpdateOne

SetProjectID sets the projectID field.

func (*ProjectUpdateOne) SetUpdatedAt

func (puo *ProjectUpdateOne) SetUpdatedAt(t time.Time) *ProjectUpdateOne

SetUpdatedAt sets the updated_at field.

type Projects

type Projects []*Project

Projects is a parsable slice of Project.

type ProviderID

type ProviderID struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// MturkWorkerID holds the value of the "mturkWorkerID" field.
	MturkWorkerID string `json:"mturkWorkerID,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProviderIDQuery when eager-loading is set.
	Edges ProviderIDEdges `json:"edges"`
	// contains filtered or unexported fields
}

ProviderID is the model entity for the ProviderID schema.

func (*ProviderID) QueryParticpant

func (pi *ProviderID) QueryParticpant() *ParticipantQuery

QueryParticpant queries the particpant edge of the ProviderID.

func (*ProviderID) String

func (pi *ProviderID) String() string

String implements the fmt.Stringer.

func (*ProviderID) Unwrap

func (pi *ProviderID) Unwrap() *ProviderID

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 (*ProviderID) Update

func (pi *ProviderID) Update() *ProviderIDUpdateOne

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

type ProviderIDClient

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

ProviderIDClient is a client for the ProviderID schema.

func NewProviderIDClient

func NewProviderIDClient(c config) *ProviderIDClient

NewProviderIDClient returns a client for the ProviderID from the given config.

func (*ProviderIDClient) Create

func (c *ProviderIDClient) Create() *ProviderIDCreate

Create returns a create builder for ProviderID.

func (*ProviderIDClient) CreateBulk

func (c *ProviderIDClient) CreateBulk(builders ...*ProviderIDCreate) *ProviderIDCreateBulk

BulkCreate returns a builder for creating a bulk of ProviderID entities.

func (*ProviderIDClient) Delete

func (c *ProviderIDClient) Delete() *ProviderIDDelete

Delete returns a delete builder for ProviderID.

func (*ProviderIDClient) DeleteOne

func (c *ProviderIDClient) DeleteOne(pi *ProviderID) *ProviderIDDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ProviderIDClient) DeleteOneID

func (c *ProviderIDClient) DeleteOneID(id string) *ProviderIDDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ProviderIDClient) Get

func (c *ProviderIDClient) Get(ctx context.Context, id string) (*ProviderID, error)

Get returns a ProviderID entity by its id.

func (*ProviderIDClient) GetX

func (c *ProviderIDClient) GetX(ctx context.Context, id string) *ProviderID

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

func (*ProviderIDClient) Hooks

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

Hooks returns the client hooks.

func (*ProviderIDClient) Query

func (c *ProviderIDClient) Query() *ProviderIDQuery

Query returns a query builder for ProviderID.

func (*ProviderIDClient) QueryParticpant

func (c *ProviderIDClient) QueryParticpant(pi *ProviderID) *ParticipantQuery

QueryParticpant queries the particpant edge of a ProviderID.

func (*ProviderIDClient) Update

func (c *ProviderIDClient) Update() *ProviderIDUpdate

Update returns an update builder for ProviderID.

func (*ProviderIDClient) UpdateOne

func (c *ProviderIDClient) UpdateOne(pi *ProviderID) *ProviderIDUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProviderIDClient) UpdateOneID

func (c *ProviderIDClient) UpdateOneID(id string) *ProviderIDUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProviderIDClient) Use

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

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

type ProviderIDCreate

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

ProviderIDCreate is the builder for creating a ProviderID entity.

func (*ProviderIDCreate) Mutation

func (pic *ProviderIDCreate) Mutation() *ProviderIDMutation

Mutation returns the ProviderIDMutation object of the builder.

func (*ProviderIDCreate) Save

func (pic *ProviderIDCreate) Save(ctx context.Context) (*ProviderID, error)

Save creates the ProviderID in the database.

func (*ProviderIDCreate) SaveX

func (pic *ProviderIDCreate) SaveX(ctx context.Context) *ProviderID

SaveX calls Save and panics if Save returns an error.

func (*ProviderIDCreate) SetCreatedAt

func (pic *ProviderIDCreate) SetCreatedAt(t time.Time) *ProviderIDCreate

SetCreatedAt sets the created_at field.

func (*ProviderIDCreate) SetID

func (pic *ProviderIDCreate) SetID(s string) *ProviderIDCreate

SetID sets the id field.

func (*ProviderIDCreate) SetMturkWorkerID

func (pic *ProviderIDCreate) SetMturkWorkerID(s string) *ProviderIDCreate

SetMturkWorkerID sets the mturkWorkerID field.

func (*ProviderIDCreate) SetNillableCreatedAt

func (pic *ProviderIDCreate) SetNillableCreatedAt(t *time.Time) *ProviderIDCreate

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

func (*ProviderIDCreate) SetNillableParticpantID

func (pic *ProviderIDCreate) SetNillableParticpantID(id *string) *ProviderIDCreate

SetNillableParticpantID sets the particpant edge to Participant by id if the given value is not nil.

func (*ProviderIDCreate) SetNillableUpdatedAt

func (pic *ProviderIDCreate) SetNillableUpdatedAt(t *time.Time) *ProviderIDCreate

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

func (*ProviderIDCreate) SetParticpant

func (pic *ProviderIDCreate) SetParticpant(p *Participant) *ProviderIDCreate

SetParticpant sets the particpant edge to Participant.

func (*ProviderIDCreate) SetParticpantID

func (pic *ProviderIDCreate) SetParticpantID(id string) *ProviderIDCreate

SetParticpantID sets the particpant edge to Participant by id.

func (*ProviderIDCreate) SetUpdatedAt

func (pic *ProviderIDCreate) SetUpdatedAt(t time.Time) *ProviderIDCreate

SetUpdatedAt sets the updated_at field.

type ProviderIDCreateBulk

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

ProviderIDCreateBulk is the builder for creating a bulk of ProviderID entities.

func (*ProviderIDCreateBulk) Save

func (picb *ProviderIDCreateBulk) Save(ctx context.Context) ([]*ProviderID, error)

Save creates the ProviderID entities in the database.

func (*ProviderIDCreateBulk) SaveX

func (picb *ProviderIDCreateBulk) SaveX(ctx context.Context) []*ProviderID

SaveX calls Save and panics if Save returns an error.

type ProviderIDDelete

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

ProviderIDDelete is the builder for deleting a ProviderID entity.

func (*ProviderIDDelete) Exec

func (pid *ProviderIDDelete) Exec(ctx context.Context) (int, error)

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

func (*ProviderIDDelete) ExecX

func (pid *ProviderIDDelete) ExecX(ctx context.Context) int

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

func (*ProviderIDDelete) Where

Where adds a new predicate to the delete builder.

type ProviderIDDeleteOne

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

ProviderIDDeleteOne is the builder for deleting a single ProviderID entity.

func (*ProviderIDDeleteOne) Exec

func (pido *ProviderIDDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProviderIDDeleteOne) ExecX

func (pido *ProviderIDDeleteOne) ExecX(ctx context.Context)

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

type ProviderIDEdges

type ProviderIDEdges struct {
	// Particpant holds the value of the particpant edge.
	Particpant *Participant
	// contains filtered or unexported fields
}

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

func (ProviderIDEdges) ParticpantOrErr

func (e ProviderIDEdges) ParticpantOrErr() (*Participant, error)

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

type ProviderIDGroupBy

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

ProviderIDGroupBy is the builder for group-by ProviderID entities.

func (*ProviderIDGroupBy) Aggregate

func (pigb *ProviderIDGroupBy) Aggregate(fns ...AggregateFunc) *ProviderIDGroupBy

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

func (*ProviderIDGroupBy) Bool

func (pigb *ProviderIDGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ProviderIDGroupBy) BoolX

func (pigb *ProviderIDGroupBy) BoolX(ctx context.Context) bool

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

func (*ProviderIDGroupBy) Bools

func (pigb *ProviderIDGroupBy) 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 (*ProviderIDGroupBy) BoolsX

func (pigb *ProviderIDGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ProviderIDGroupBy) Float64

func (pigb *ProviderIDGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ProviderIDGroupBy) Float64X

func (pigb *ProviderIDGroupBy) Float64X(ctx context.Context) float64

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

func (*ProviderIDGroupBy) Float64s

func (pigb *ProviderIDGroupBy) 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 (*ProviderIDGroupBy) Float64sX

func (pigb *ProviderIDGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ProviderIDGroupBy) Int

func (pigb *ProviderIDGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ProviderIDGroupBy) IntX

func (pigb *ProviderIDGroupBy) IntX(ctx context.Context) int

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

func (*ProviderIDGroupBy) Ints

func (pigb *ProviderIDGroupBy) 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 (*ProviderIDGroupBy) IntsX

func (pigb *ProviderIDGroupBy) IntsX(ctx context.Context) []int

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

func (*ProviderIDGroupBy) Scan

func (pigb *ProviderIDGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ProviderIDGroupBy) ScanX

func (pigb *ProviderIDGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ProviderIDGroupBy) String

func (pigb *ProviderIDGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ProviderIDGroupBy) StringX

func (pigb *ProviderIDGroupBy) StringX(ctx context.Context) string

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

func (*ProviderIDGroupBy) Strings

func (pigb *ProviderIDGroupBy) 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 (*ProviderIDGroupBy) StringsX

func (pigb *ProviderIDGroupBy) StringsX(ctx context.Context) []string

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

type ProviderIDMutation

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

ProviderIDMutation represents an operation that mutate the ProviderIDs nodes in the graph.

func (*ProviderIDMutation) AddField

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

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

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

func (*ProviderIDMutation) AddedField

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

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

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

func (*ProviderIDMutation) AddedIDs

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

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

func (*ProviderIDMutation) ClearEdge

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

func (m *ProviderIDMutation) 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 (*ProviderIDMutation) ClearParticpant

func (m *ProviderIDMutation) ClearParticpant()

ClearParticpant clears the particpant edge to Participant.

func (*ProviderIDMutation) ClearedEdges

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

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

func (*ProviderIDMutation) ClearedFields

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

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

func (ProviderIDMutation) Client

func (m ProviderIDMutation) 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 (*ProviderIDMutation) CreatedAt

func (m *ProviderIDMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*ProviderIDMutation) EdgeCleared

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

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

func (*ProviderIDMutation) Field

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

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

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

func (*ProviderIDMutation) Fields

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

func (m *ProviderIDMutation) ID() (id string, 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 (*ProviderIDMutation) MturkWorkerID

func (m *ProviderIDMutation) MturkWorkerID() (r string, exists bool)

MturkWorkerID returns the mturkWorkerID value in the mutation.

func (*ProviderIDMutation) OldCreatedAt

func (m *ProviderIDMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the ProviderID. If the ProviderID object wasn'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 (*ProviderIDMutation) OldField

func (m *ProviderIDMutation) 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 (*ProviderIDMutation) OldMturkWorkerID

func (m *ProviderIDMutation) OldMturkWorkerID(ctx context.Context) (v string, err error)

OldMturkWorkerID returns the old mturkWorkerID value of the ProviderID. If the ProviderID object wasn'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 (*ProviderIDMutation) OldUpdatedAt

func (m *ProviderIDMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the ProviderID. If the ProviderID object wasn'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 (*ProviderIDMutation) Op

func (m *ProviderIDMutation) Op() Op

Op returns the operation name.

func (*ProviderIDMutation) ParticpantCleared

func (m *ProviderIDMutation) ParticpantCleared() bool

ParticpantCleared returns if the edge particpant was cleared.

func (*ProviderIDMutation) ParticpantID

func (m *ProviderIDMutation) ParticpantID() (id string, exists bool)

ParticpantID returns the particpant id in the mutation.

func (*ProviderIDMutation) ParticpantIDs

func (m *ProviderIDMutation) ParticpantIDs() (ids []string)

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

func (*ProviderIDMutation) RemovedEdges

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

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

func (*ProviderIDMutation) RemovedIDs

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

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

func (*ProviderIDMutation) ResetCreatedAt

func (m *ProviderIDMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*ProviderIDMutation) ResetEdge

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

func (m *ProviderIDMutation) 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 (*ProviderIDMutation) ResetMturkWorkerID

func (m *ProviderIDMutation) ResetMturkWorkerID()

ResetMturkWorkerID reset all changes of the "mturkWorkerID" field.

func (*ProviderIDMutation) ResetParticpant

func (m *ProviderIDMutation) ResetParticpant()

ResetParticpant reset all changes of the "particpant" edge.

func (*ProviderIDMutation) ResetUpdatedAt

func (m *ProviderIDMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*ProviderIDMutation) SetCreatedAt

func (m *ProviderIDMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*ProviderIDMutation) SetField

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

func (m *ProviderIDMutation) SetID(id string)

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

func (*ProviderIDMutation) SetMturkWorkerID

func (m *ProviderIDMutation) SetMturkWorkerID(s string)

SetMturkWorkerID sets the mturkWorkerID field.

func (*ProviderIDMutation) SetParticpantID

func (m *ProviderIDMutation) SetParticpantID(id string)

SetParticpantID sets the particpant edge to Participant by id.

func (*ProviderIDMutation) SetUpdatedAt

func (m *ProviderIDMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (ProviderIDMutation) Tx

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

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

func (*ProviderIDMutation) Type

func (m *ProviderIDMutation) Type() string

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

func (*ProviderIDMutation) UpdatedAt

func (m *ProviderIDMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

type ProviderIDQuery

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

ProviderIDQuery is the builder for querying ProviderID entities.

func (*ProviderIDQuery) All

func (piq *ProviderIDQuery) All(ctx context.Context) ([]*ProviderID, error)

All executes the query and returns a list of ProviderIDs.

func (*ProviderIDQuery) AllX

func (piq *ProviderIDQuery) AllX(ctx context.Context) []*ProviderID

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

func (*ProviderIDQuery) Clone

func (piq *ProviderIDQuery) Clone() *ProviderIDQuery

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 (*ProviderIDQuery) Count

func (piq *ProviderIDQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProviderIDQuery) CountX

func (piq *ProviderIDQuery) CountX(ctx context.Context) int

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

func (*ProviderIDQuery) Exist

func (piq *ProviderIDQuery) Exist(ctx context.Context) (bool, error)

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

func (*ProviderIDQuery) ExistX

func (piq *ProviderIDQuery) ExistX(ctx context.Context) bool

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

func (*ProviderIDQuery) First

func (piq *ProviderIDQuery) First(ctx context.Context) (*ProviderID, error)

First returns the first ProviderID entity in the query. Returns *NotFoundError when no providerid was found.

func (*ProviderIDQuery) FirstID

func (piq *ProviderIDQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*ProviderIDQuery) FirstX

func (piq *ProviderIDQuery) FirstX(ctx context.Context) *ProviderID

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

func (*ProviderIDQuery) FirstXID

func (piq *ProviderIDQuery) FirstXID(ctx context.Context) string

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

func (*ProviderIDQuery) GroupBy

func (piq *ProviderIDQuery) GroupBy(field string, fields ...string) *ProviderIDGroupBy

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

client.ProviderID.Query().
	GroupBy(providerid.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProviderIDQuery) IDs

func (piq *ProviderIDQuery) IDs(ctx context.Context) ([]string, error)

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

func (*ProviderIDQuery) IDsX

func (piq *ProviderIDQuery) IDsX(ctx context.Context) []string

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

func (*ProviderIDQuery) Limit

func (piq *ProviderIDQuery) Limit(limit int) *ProviderIDQuery

Limit adds a limit step to the query.

func (*ProviderIDQuery) Offset

func (piq *ProviderIDQuery) Offset(offset int) *ProviderIDQuery

Offset adds an offset step to the query.

func (*ProviderIDQuery) Only

func (piq *ProviderIDQuery) Only(ctx context.Context) (*ProviderID, error)

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

func (*ProviderIDQuery) OnlyID

func (piq *ProviderIDQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*ProviderIDQuery) OnlyIDX

func (piq *ProviderIDQuery) OnlyIDX(ctx context.Context) string

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

func (*ProviderIDQuery) OnlyX

func (piq *ProviderIDQuery) OnlyX(ctx context.Context) *ProviderID

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

func (*ProviderIDQuery) Order

func (piq *ProviderIDQuery) Order(o ...OrderFunc) *ProviderIDQuery

Order adds an order step to the query.

func (*ProviderIDQuery) QueryParticpant

func (piq *ProviderIDQuery) QueryParticpant() *ParticipantQuery

QueryParticpant chains the current query on the particpant edge.

func (*ProviderIDQuery) Select

func (piq *ProviderIDQuery) Select(field string, fields ...string) *ProviderIDSelect

Select one or more fields from the given query.

Example:

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

client.ProviderID.Query().
	Select(providerid.FieldCreatedAt).
	Scan(ctx, &v)

func (*ProviderIDQuery) Where

Where adds a new predicate for the builder.

func (*ProviderIDQuery) WithParticpant

func (piq *ProviderIDQuery) WithParticpant(opts ...func(*ParticipantQuery)) *ProviderIDQuery
WithParticpant tells the query-builder to eager-loads the nodes that are connected to

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

type ProviderIDSelect

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

ProviderIDSelect is the builder for select fields of ProviderID entities.

func (*ProviderIDSelect) Bool

func (pis *ProviderIDSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ProviderIDSelect) BoolX

func (pis *ProviderIDSelect) BoolX(ctx context.Context) bool

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

func (*ProviderIDSelect) Bools

func (pis *ProviderIDSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*ProviderIDSelect) BoolsX

func (pis *ProviderIDSelect) BoolsX(ctx context.Context) []bool

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

func (*ProviderIDSelect) Float64

func (pis *ProviderIDSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ProviderIDSelect) Float64X

func (pis *ProviderIDSelect) Float64X(ctx context.Context) float64

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

func (*ProviderIDSelect) Float64s

func (pis *ProviderIDSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ProviderIDSelect) Float64sX

func (pis *ProviderIDSelect) Float64sX(ctx context.Context) []float64

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

func (*ProviderIDSelect) Int

func (pis *ProviderIDSelect) Int(ctx context.Context) (_ int, err error)

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

func (*ProviderIDSelect) IntX

func (pis *ProviderIDSelect) IntX(ctx context.Context) int

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

func (*ProviderIDSelect) Ints

func (pis *ProviderIDSelect) Ints(ctx context.Context) ([]int, error)

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

func (*ProviderIDSelect) IntsX

func (pis *ProviderIDSelect) IntsX(ctx context.Context) []int

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

func (*ProviderIDSelect) Scan

func (pis *ProviderIDSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ProviderIDSelect) ScanX

func (pis *ProviderIDSelect) ScanX(ctx context.Context, v interface{})

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

func (*ProviderIDSelect) String

func (pis *ProviderIDSelect) String(ctx context.Context) (_ string, err error)

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

func (*ProviderIDSelect) StringX

func (pis *ProviderIDSelect) StringX(ctx context.Context) string

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

func (*ProviderIDSelect) Strings

func (pis *ProviderIDSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ProviderIDSelect) StringsX

func (pis *ProviderIDSelect) StringsX(ctx context.Context) []string

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

type ProviderIDUpdate

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

ProviderIDUpdate is the builder for updating ProviderID entities.

func (*ProviderIDUpdate) ClearParticpant

func (piu *ProviderIDUpdate) ClearParticpant() *ProviderIDUpdate

ClearParticpant clears the "particpant" edge to type Participant.

func (*ProviderIDUpdate) Exec

func (piu *ProviderIDUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProviderIDUpdate) ExecX

func (piu *ProviderIDUpdate) ExecX(ctx context.Context)

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

func (*ProviderIDUpdate) Mutation

func (piu *ProviderIDUpdate) Mutation() *ProviderIDMutation

Mutation returns the ProviderIDMutation object of the builder.

func (*ProviderIDUpdate) Save

func (piu *ProviderIDUpdate) Save(ctx context.Context) (int, error)

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

func (*ProviderIDUpdate) SaveX

func (piu *ProviderIDUpdate) SaveX(ctx context.Context) int

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

func (*ProviderIDUpdate) SetMturkWorkerID

func (piu *ProviderIDUpdate) SetMturkWorkerID(s string) *ProviderIDUpdate

SetMturkWorkerID sets the mturkWorkerID field.

func (*ProviderIDUpdate) SetNillableParticpantID

func (piu *ProviderIDUpdate) SetNillableParticpantID(id *string) *ProviderIDUpdate

SetNillableParticpantID sets the particpant edge to Participant by id if the given value is not nil.

func (*ProviderIDUpdate) SetParticpant

func (piu *ProviderIDUpdate) SetParticpant(p *Participant) *ProviderIDUpdate

SetParticpant sets the particpant edge to Participant.

func (*ProviderIDUpdate) SetParticpantID

func (piu *ProviderIDUpdate) SetParticpantID(id string) *ProviderIDUpdate

SetParticpantID sets the particpant edge to Participant by id.

func (*ProviderIDUpdate) SetUpdatedAt

func (piu *ProviderIDUpdate) SetUpdatedAt(t time.Time) *ProviderIDUpdate

SetUpdatedAt sets the updated_at field.

func (*ProviderIDUpdate) Where

Where adds a new predicate for the builder.

type ProviderIDUpdateOne

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

ProviderIDUpdateOne is the builder for updating a single ProviderID entity.

func (*ProviderIDUpdateOne) ClearParticpant

func (piuo *ProviderIDUpdateOne) ClearParticpant() *ProviderIDUpdateOne

ClearParticpant clears the "particpant" edge to type Participant.

func (*ProviderIDUpdateOne) Exec

func (piuo *ProviderIDUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProviderIDUpdateOne) ExecX

func (piuo *ProviderIDUpdateOne) ExecX(ctx context.Context)

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

func (*ProviderIDUpdateOne) Mutation

func (piuo *ProviderIDUpdateOne) Mutation() *ProviderIDMutation

Mutation returns the ProviderIDMutation object of the builder.

func (*ProviderIDUpdateOne) Save

func (piuo *ProviderIDUpdateOne) Save(ctx context.Context) (*ProviderID, error)

Save executes the query and returns the updated entity.

func (*ProviderIDUpdateOne) SaveX

func (piuo *ProviderIDUpdateOne) SaveX(ctx context.Context) *ProviderID

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

func (*ProviderIDUpdateOne) SetMturkWorkerID

func (piuo *ProviderIDUpdateOne) SetMturkWorkerID(s string) *ProviderIDUpdateOne

SetMturkWorkerID sets the mturkWorkerID field.

func (*ProviderIDUpdateOne) SetNillableParticpantID

func (piuo *ProviderIDUpdateOne) SetNillableParticpantID(id *string) *ProviderIDUpdateOne

SetNillableParticpantID sets the particpant edge to Participant by id if the given value is not nil.

func (*ProviderIDUpdateOne) SetParticpant

func (piuo *ProviderIDUpdateOne) SetParticpant(p *Participant) *ProviderIDUpdateOne

SetParticpant sets the particpant edge to Participant.

func (*ProviderIDUpdateOne) SetParticpantID

func (piuo *ProviderIDUpdateOne) SetParticpantID(id string) *ProviderIDUpdateOne

SetParticpantID sets the particpant edge to Participant by id.

func (*ProviderIDUpdateOne) SetUpdatedAt

func (piuo *ProviderIDUpdateOne) SetUpdatedAt(t time.Time) *ProviderIDUpdateOne

SetUpdatedAt sets the updated_at field.

type ProviderIDs

type ProviderIDs []*ProviderID

ProviderIDs is a parsable slice of ProviderID.

type Query

type Query = ent.Query

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

type RollbackFunc

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

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

func (RollbackFunc) Rollback

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

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

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

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

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollbacker method.

type Run

type Run struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status holds the value of the "status" field.
	Status run.Status `json:"status,omitempty"`
	// StartedAt holds the value of the "startedAt" field.
	StartedAt *time.Time `json:"startedAt,omitempty"`
	// EndedAt holds the value of the "endedAt" field.
	EndedAt *time.Time `json:"endedAt,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// StartAt holds the value of the "startAt" field.
	StartAt *time.Time `json:"startAt,omitempty"`
	// Error holds the value of the "error" field.
	Error *string `json:"error,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RunQuery when eager-loading is set.
	Edges RunEdges `json:"edges"`
	// contains filtered or unexported fields
}

Run is the model entity for the Run schema.

func (*Run) QueryCurrentStep

func (r *Run) QueryCurrentStep() *StepRunQuery

QueryCurrentStep queries the currentStep edge of the Run.

func (*Run) QueryProject

func (r *Run) QueryProject() *ProjectQuery

QueryProject queries the project edge of the Run.

func (*Run) QuerySteps

func (r *Run) QuerySteps() *StepRunQuery

QuerySteps queries the steps edge of the Run.

func (*Run) QueryTemplate

func (r *Run) QueryTemplate() *TemplateQuery

QueryTemplate queries the template edge of the Run.

func (*Run) Relations

func (run *Run) Relations() (currentStepRun *StepRun, currentStep *Step, stepRuns []*StepRun, template *Template, steps []*Step, err error)

Relations returns all the Run close relations (steps, stepRuns, and template).

func (*Run) String

func (r *Run) String() string

String implements the fmt.Stringer.

func (*Run) Unwrap

func (r *Run) Unwrap() *Run

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 (*Run) Update

func (r *Run) Update() *RunUpdateOne

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

func (*Run) Validate

func (run *Run) Validate() (err error)

Validate will validate all fields on Run

type RunClient

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

RunClient is a client for the Run schema.

func NewRunClient

func NewRunClient(c config) *RunClient

NewRunClient returns a client for the Run from the given config.

func (*RunClient) Create

func (c *RunClient) Create() *RunCreate

Create returns a create builder for Run.

func (*RunClient) CreateBulk

func (c *RunClient) CreateBulk(builders ...*RunCreate) *RunCreateBulk

BulkCreate returns a builder for creating a bulk of Run entities.

func (*RunClient) Delete

func (c *RunClient) Delete() *RunDelete

Delete returns a delete builder for Run.

func (*RunClient) DeleteOne

func (c *RunClient) DeleteOne(r *Run) *RunDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*RunClient) DeleteOneID

func (c *RunClient) DeleteOneID(id string) *RunDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*RunClient) Get

func (c *RunClient) Get(ctx context.Context, id string) (*Run, error)

Get returns a Run entity by its id.

func (*RunClient) GetX

func (c *RunClient) GetX(ctx context.Context, id string) *Run

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

func (*RunClient) Hooks

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

Hooks returns the client hooks.

func (*RunClient) Query

func (c *RunClient) Query() *RunQuery

Query returns a query builder for Run.

func (*RunClient) QueryCurrentStep

func (c *RunClient) QueryCurrentStep(r *Run) *StepRunQuery

QueryCurrentStep queries the currentStep edge of a Run.

func (*RunClient) QueryProject

func (c *RunClient) QueryProject(r *Run) *ProjectQuery

QueryProject queries the project edge of a Run.

func (*RunClient) QuerySteps

func (c *RunClient) QuerySteps(r *Run) *StepRunQuery

QuerySteps queries the steps edge of a Run.

func (*RunClient) QueryTemplate

func (c *RunClient) QueryTemplate(r *Run) *TemplateQuery

QueryTemplate queries the template edge of a Run.

func (*RunClient) Update

func (c *RunClient) Update() *RunUpdate

Update returns an update builder for Run.

func (*RunClient) UpdateOne

func (c *RunClient) UpdateOne(r *Run) *RunUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RunClient) UpdateOneID

func (c *RunClient) UpdateOneID(id string) *RunUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RunClient) Use

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

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

type RunCreate

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

RunCreate is the builder for creating a Run entity.

func (*RunCreate) AddStepIDs

func (rc *RunCreate) AddStepIDs(ids ...string) *RunCreate

AddStepIDs adds the steps edge to StepRun by ids.

func (*RunCreate) AddSteps

func (rc *RunCreate) AddSteps(s ...*StepRun) *RunCreate

AddSteps adds the steps edges to StepRun.

func (*RunCreate) Mutation

func (rc *RunCreate) Mutation() *RunMutation

Mutation returns the RunMutation object of the builder.

func (*RunCreate) Save

func (rc *RunCreate) Save(ctx context.Context) (*Run, error)

Save creates the Run in the database.

func (*RunCreate) SaveX

func (rc *RunCreate) SaveX(ctx context.Context) *Run

SaveX calls Save and panics if Save returns an error.

func (*RunCreate) SetCreatedAt

func (rc *RunCreate) SetCreatedAt(t time.Time) *RunCreate

SetCreatedAt sets the created_at field.

func (*RunCreate) SetCurrentStep

func (rc *RunCreate) SetCurrentStep(s *StepRun) *RunCreate

SetCurrentStep sets the currentStep edge to StepRun.

func (*RunCreate) SetCurrentStepID

func (rc *RunCreate) SetCurrentStepID(id string) *RunCreate

SetCurrentStepID sets the currentStep edge to StepRun by id.

func (*RunCreate) SetEndedAt

func (rc *RunCreate) SetEndedAt(t time.Time) *RunCreate

SetEndedAt sets the endedAt field.

func (*RunCreate) SetError

func (rc *RunCreate) SetError(s string) *RunCreate

SetError sets the error field.

func (*RunCreate) SetID

func (rc *RunCreate) SetID(s string) *RunCreate

SetID sets the id field.

func (*RunCreate) SetName

func (rc *RunCreate) SetName(s string) *RunCreate

SetName sets the name field.

func (*RunCreate) SetNillableCreatedAt

func (rc *RunCreate) SetNillableCreatedAt(t *time.Time) *RunCreate

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

func (*RunCreate) SetNillableCurrentStepID

func (rc *RunCreate) SetNillableCurrentStepID(id *string) *RunCreate

SetNillableCurrentStepID sets the currentStep edge to StepRun by id if the given value is not nil.

func (*RunCreate) SetNillableEndedAt

func (rc *RunCreate) SetNillableEndedAt(t *time.Time) *RunCreate

SetNillableEndedAt sets the endedAt field if the given value is not nil.

func (*RunCreate) SetNillableError

func (rc *RunCreate) SetNillableError(s *string) *RunCreate

SetNillableError sets the error field if the given value is not nil.

func (*RunCreate) SetNillableProjectID

func (rc *RunCreate) SetNillableProjectID(id *string) *RunCreate

SetNillableProjectID sets the project edge to Project by id if the given value is not nil.

func (*RunCreate) SetNillableStartAt

func (rc *RunCreate) SetNillableStartAt(t *time.Time) *RunCreate

SetNillableStartAt sets the startAt field if the given value is not nil.

func (*RunCreate) SetNillableStartedAt

func (rc *RunCreate) SetNillableStartedAt(t *time.Time) *RunCreate

SetNillableStartedAt sets the startedAt field if the given value is not nil.

func (*RunCreate) SetNillableUpdatedAt

func (rc *RunCreate) SetNillableUpdatedAt(t *time.Time) *RunCreate

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

func (*RunCreate) SetProject

func (rc *RunCreate) SetProject(p *Project) *RunCreate

SetProject sets the project edge to Project.

func (*RunCreate) SetProjectID

func (rc *RunCreate) SetProjectID(id string) *RunCreate

SetProjectID sets the project edge to Project by id.

func (*RunCreate) SetStartAt

func (rc *RunCreate) SetStartAt(t time.Time) *RunCreate

SetStartAt sets the startAt field.

func (*RunCreate) SetStartedAt

func (rc *RunCreate) SetStartedAt(t time.Time) *RunCreate

SetStartedAt sets the startedAt field.

func (*RunCreate) SetStatus

func (rc *RunCreate) SetStatus(r run.Status) *RunCreate

SetStatus sets the status field.

func (*RunCreate) SetTemplate

func (rc *RunCreate) SetTemplate(t *Template) *RunCreate

SetTemplate sets the template edge to Template.

func (*RunCreate) SetTemplateID

func (rc *RunCreate) SetTemplateID(id string) *RunCreate

SetTemplateID sets the template edge to Template by id.

func (*RunCreate) SetUpdatedAt

func (rc *RunCreate) SetUpdatedAt(t time.Time) *RunCreate

SetUpdatedAt sets the updated_at field.

type RunCreateBulk

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

RunCreateBulk is the builder for creating a bulk of Run entities.

func (*RunCreateBulk) Save

func (rcb *RunCreateBulk) Save(ctx context.Context) ([]*Run, error)

Save creates the Run entities in the database.

func (*RunCreateBulk) SaveX

func (rcb *RunCreateBulk) SaveX(ctx context.Context) []*Run

SaveX calls Save and panics if Save returns an error.

type RunDelete

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

RunDelete is the builder for deleting a Run entity.

func (*RunDelete) Exec

func (rd *RunDelete) Exec(ctx context.Context) (int, error)

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

func (*RunDelete) ExecX

func (rd *RunDelete) ExecX(ctx context.Context) int

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

func (*RunDelete) Where

func (rd *RunDelete) Where(ps ...predicate.Run) *RunDelete

Where adds a new predicate to the delete builder.

type RunDeleteOne

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

RunDeleteOne is the builder for deleting a single Run entity.

func (*RunDeleteOne) Exec

func (rdo *RunDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RunDeleteOne) ExecX

func (rdo *RunDeleteOne) ExecX(ctx context.Context)

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

type RunEdges

type RunEdges struct {
	// Project holds the value of the project edge.
	Project *Project
	// Template holds the value of the template edge.
	Template *Template
	// CurrentStep holds the value of the currentStep edge.
	CurrentStep *StepRun
	// Steps holds the value of the steps edge.
	Steps []*StepRun
	// contains filtered or unexported fields
}

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

func (RunEdges) CurrentStepOrErr

func (e RunEdges) CurrentStepOrErr() (*StepRun, error)

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

func (RunEdges) ProjectOrErr

func (e RunEdges) ProjectOrErr() (*Project, error)

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

func (RunEdges) StepsOrErr

func (e RunEdges) StepsOrErr() ([]*StepRun, error)

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

func (RunEdges) TemplateOrErr

func (e RunEdges) TemplateOrErr() (*Template, error)

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

type RunGroupBy

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

RunGroupBy is the builder for group-by Run entities.

func (*RunGroupBy) Aggregate

func (rgb *RunGroupBy) Aggregate(fns ...AggregateFunc) *RunGroupBy

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

func (*RunGroupBy) Bool

func (rgb *RunGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*RunGroupBy) BoolX

func (rgb *RunGroupBy) BoolX(ctx context.Context) bool

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

func (*RunGroupBy) Bools

func (rgb *RunGroupBy) 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 (*RunGroupBy) BoolsX

func (rgb *RunGroupBy) BoolsX(ctx context.Context) []bool

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

func (*RunGroupBy) Float64

func (rgb *RunGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*RunGroupBy) Float64X

func (rgb *RunGroupBy) Float64X(ctx context.Context) float64

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

func (*RunGroupBy) Float64s

func (rgb *RunGroupBy) 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 (*RunGroupBy) Float64sX

func (rgb *RunGroupBy) Float64sX(ctx context.Context) []float64

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

func (*RunGroupBy) Int

func (rgb *RunGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*RunGroupBy) IntX

func (rgb *RunGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RunGroupBy) Ints

func (rgb *RunGroupBy) 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 (*RunGroupBy) IntsX

func (rgb *RunGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RunGroupBy) Scan

func (rgb *RunGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*RunGroupBy) ScanX

func (rgb *RunGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RunGroupBy) String

func (rgb *RunGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*RunGroupBy) StringX

func (rgb *RunGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RunGroupBy) Strings

func (rgb *RunGroupBy) 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 (*RunGroupBy) StringsX

func (rgb *RunGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RunMutation

type RunMutation struct {
	// contains filtered or unexported fields
}

RunMutation represents an operation that mutate the Runs nodes in the graph.

func (*RunMutation) AddField

func (m *RunMutation) 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 (*RunMutation) AddStepIDs

func (m *RunMutation) AddStepIDs(ids ...string)

AddStepIDs adds the steps edge to StepRun by ids.

func (*RunMutation) AddedEdges

func (m *RunMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RunMutation) AddedField

func (m *RunMutation) 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 (*RunMutation) AddedFields

func (m *RunMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented or decremented during this mutation.

func (*RunMutation) AddedIDs

func (m *RunMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*RunMutation) ClearCurrentStep

func (m *RunMutation) ClearCurrentStep()

ClearCurrentStep clears the currentStep edge to StepRun.

func (*RunMutation) ClearEdge

func (m *RunMutation) 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 (*RunMutation) ClearEndedAt

func (m *RunMutation) ClearEndedAt()

ClearEndedAt clears the value of endedAt.

func (*RunMutation) ClearError

func (m *RunMutation) ClearError()

ClearError clears the value of error.

func (*RunMutation) ClearField

func (m *RunMutation) 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 (*RunMutation) ClearProject

func (m *RunMutation) ClearProject()

ClearProject clears the project edge to Project.

func (*RunMutation) ClearStartAt

func (m *RunMutation) ClearStartAt()

ClearStartAt clears the value of startAt.

func (*RunMutation) ClearStartedAt

func (m *RunMutation) ClearStartedAt()

ClearStartedAt clears the value of startedAt.

func (*RunMutation) ClearSteps

func (m *RunMutation) ClearSteps()

ClearSteps clears the steps edge to StepRun.

func (*RunMutation) ClearTemplate

func (m *RunMutation) ClearTemplate()

ClearTemplate clears the template edge to Template.

func (*RunMutation) ClearedEdges

func (m *RunMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RunMutation) ClearedFields

func (m *RunMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RunMutation) Client

func (m RunMutation) 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 (*RunMutation) CreatedAt

func (m *RunMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*RunMutation) CurrentStepCleared

func (m *RunMutation) CurrentStepCleared() bool

CurrentStepCleared returns if the edge currentStep was cleared.

func (*RunMutation) CurrentStepID

func (m *RunMutation) CurrentStepID() (id string, exists bool)

CurrentStepID returns the currentStep id in the mutation.

func (*RunMutation) CurrentStepIDs

func (m *RunMutation) CurrentStepIDs() (ids []string)

CurrentStepIDs returns the currentStep ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use CurrentStepID instead. It exists only for internal usage by the builders.

func (*RunMutation) EdgeCleared

func (m *RunMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*RunMutation) EndedAt

func (m *RunMutation) EndedAt() (r time.Time, exists bool)

EndedAt returns the endedAt value in the mutation.

func (*RunMutation) EndedAtCleared

func (m *RunMutation) EndedAtCleared() bool

EndedAtCleared returns if the field endedAt was cleared in this mutation.

func (*RunMutation) Error

func (m *RunMutation) Error() (r string, exists bool)

Error returns the error value in the mutation.

func (*RunMutation) ErrorCleared

func (m *RunMutation) ErrorCleared() bool

ErrorCleared returns if the field error was cleared in this mutation.

func (*RunMutation) Field

func (m *RunMutation) 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 (*RunMutation) FieldCleared

func (m *RunMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*RunMutation) Fields

func (m *RunMutation) 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 (*RunMutation) ID

func (m *RunMutation) ID() (id string, 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 (*RunMutation) Name

func (m *RunMutation) Name() (r string, exists bool)

Name returns the name value in the mutation.

func (*RunMutation) OldCreatedAt

func (m *RunMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Run. If the Run object wasn'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 (*RunMutation) OldEndedAt

func (m *RunMutation) OldEndedAt(ctx context.Context) (v *time.Time, err error)

OldEndedAt returns the old endedAt value of the Run. If the Run object wasn'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 (*RunMutation) OldError

func (m *RunMutation) OldError(ctx context.Context) (v *string, err error)

OldError returns the old error value of the Run. If the Run object wasn'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 (*RunMutation) OldField

func (m *RunMutation) 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 (*RunMutation) OldName

func (m *RunMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old name value of the Run. If the Run object wasn'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 (*RunMutation) OldStartAt

func (m *RunMutation) OldStartAt(ctx context.Context) (v *time.Time, err error)

OldStartAt returns the old startAt value of the Run. If the Run object wasn'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 (*RunMutation) OldStartedAt

func (m *RunMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)

OldStartedAt returns the old startedAt value of the Run. If the Run object wasn'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 (*RunMutation) OldStatus

func (m *RunMutation) OldStatus(ctx context.Context) (v run.Status, err error)

OldStatus returns the old status value of the Run. If the Run object wasn'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 (*RunMutation) OldUpdatedAt

func (m *RunMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Run. If the Run object wasn'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 (*RunMutation) Op

func (m *RunMutation) Op() Op

Op returns the operation name.

func (*RunMutation) ProjectCleared

func (m *RunMutation) ProjectCleared() bool

ProjectCleared returns if the edge project was cleared.

func (*RunMutation) ProjectID

func (m *RunMutation) ProjectID() (id string, exists bool)

ProjectID returns the project id in the mutation.

func (*RunMutation) ProjectIDs

func (m *RunMutation) ProjectIDs() (ids []string)

ProjectIDs returns the project ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*RunMutation) RemoveStepIDs

func (m *RunMutation) RemoveStepIDs(ids ...string)

RemoveStepIDs removes the steps edge to StepRun by ids.

func (*RunMutation) RemovedEdges

func (m *RunMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RunMutation) RemovedIDs

func (m *RunMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*RunMutation) RemovedStepsIDs

func (m *RunMutation) RemovedStepsIDs() (ids []string)

RemovedSteps returns the removed ids of steps.

func (*RunMutation) ResetCreatedAt

func (m *RunMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*RunMutation) ResetCurrentStep

func (m *RunMutation) ResetCurrentStep()

ResetCurrentStep reset all changes of the "currentStep" edge.

func (*RunMutation) ResetEdge

func (m *RunMutation) 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 (*RunMutation) ResetEndedAt

func (m *RunMutation) ResetEndedAt()

ResetEndedAt reset all changes of the "endedAt" field.

func (*RunMutation) ResetError

func (m *RunMutation) ResetError()

ResetError reset all changes of the "error" field.

func (*RunMutation) ResetField

func (m *RunMutation) 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 (*RunMutation) ResetName

func (m *RunMutation) ResetName()

ResetName reset all changes of the "name" field.

func (*RunMutation) ResetProject

func (m *RunMutation) ResetProject()

ResetProject reset all changes of the "project" edge.

func (*RunMutation) ResetStartAt

func (m *RunMutation) ResetStartAt()

ResetStartAt reset all changes of the "startAt" field.

func (*RunMutation) ResetStartedAt

func (m *RunMutation) ResetStartedAt()

ResetStartedAt reset all changes of the "startedAt" field.

func (*RunMutation) ResetStatus

func (m *RunMutation) ResetStatus()

ResetStatus reset all changes of the "status" field.

func (*RunMutation) ResetSteps

func (m *RunMutation) ResetSteps()

ResetSteps reset all changes of the "steps" edge.

func (*RunMutation) ResetTemplate

func (m *RunMutation) ResetTemplate()

ResetTemplate reset all changes of the "template" edge.

func (*RunMutation) ResetUpdatedAt

func (m *RunMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*RunMutation) SetCreatedAt

func (m *RunMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*RunMutation) SetCurrentStepID

func (m *RunMutation) SetCurrentStepID(id string)

SetCurrentStepID sets the currentStep edge to StepRun by id.

func (*RunMutation) SetEndedAt

func (m *RunMutation) SetEndedAt(t time.Time)

SetEndedAt sets the endedAt field.

func (*RunMutation) SetError

func (m *RunMutation) SetError(s string)

SetError sets the error field.

func (*RunMutation) SetField

func (m *RunMutation) 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 (*RunMutation) SetID

func (m *RunMutation) SetID(id string)

SetID sets the value of the id field. Note that, this operation is accepted only on Run creation.

func (*RunMutation) SetName

func (m *RunMutation) SetName(s string)

SetName sets the name field.

func (*RunMutation) SetProjectID

func (m *RunMutation) SetProjectID(id string)

SetProjectID sets the project edge to Project by id.

func (*RunMutation) SetStartAt

func (m *RunMutation) SetStartAt(t time.Time)

SetStartAt sets the startAt field.

func (*RunMutation) SetStartedAt

func (m *RunMutation) SetStartedAt(t time.Time)

SetStartedAt sets the startedAt field.

func (*RunMutation) SetStatus

func (m *RunMutation) SetStatus(r run.Status)

SetStatus sets the status field.

func (*RunMutation) SetTemplateID

func (m *RunMutation) SetTemplateID(id string)

SetTemplateID sets the template edge to Template by id.

func (*RunMutation) SetUpdatedAt

func (m *RunMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*RunMutation) StartAt

func (m *RunMutation) StartAt() (r time.Time, exists bool)

StartAt returns the startAt value in the mutation.

func (*RunMutation) StartAtCleared

func (m *RunMutation) StartAtCleared() bool

StartAtCleared returns if the field startAt was cleared in this mutation.

func (*RunMutation) StartedAt

func (m *RunMutation) StartedAt() (r time.Time, exists bool)

StartedAt returns the startedAt value in the mutation.

func (*RunMutation) StartedAtCleared

func (m *RunMutation) StartedAtCleared() bool

StartedAtCleared returns if the field startedAt was cleared in this mutation.

func (*RunMutation) Status

func (m *RunMutation) Status() (r run.Status, exists bool)

Status returns the status value in the mutation.

func (*RunMutation) StepsCleared

func (m *RunMutation) StepsCleared() bool

StepsCleared returns if the edge steps was cleared.

func (*RunMutation) StepsIDs

func (m *RunMutation) StepsIDs() (ids []string)

StepsIDs returns the steps ids in the mutation.

func (*RunMutation) TemplateCleared

func (m *RunMutation) TemplateCleared() bool

TemplateCleared returns if the edge template was cleared.

func (*RunMutation) TemplateID

func (m *RunMutation) TemplateID() (id string, exists bool)

TemplateID returns the template id in the mutation.

func (*RunMutation) TemplateIDs

func (m *RunMutation) TemplateIDs() (ids []string)

TemplateIDs returns the template ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use TemplateID instead. It exists only for internal usage by the builders.

func (RunMutation) Tx

func (m RunMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RunMutation) Type

func (m *RunMutation) Type() string

Type returns the node type of this mutation (Run).

func (*RunMutation) UpdatedAt

func (m *RunMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

type RunQuery

type RunQuery struct {
	// contains filtered or unexported fields
}

RunQuery is the builder for querying Run entities.

func (*RunQuery) All

func (rq *RunQuery) All(ctx context.Context) ([]*Run, error)

All executes the query and returns a list of Runs.

func (*RunQuery) AllX

func (rq *RunQuery) AllX(ctx context.Context) []*Run

AllX is like All, but panics if an error occurs.

func (*RunQuery) Clone

func (rq *RunQuery) Clone() *RunQuery

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 (*RunQuery) Count

func (rq *RunQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RunQuery) CountX

func (rq *RunQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RunQuery) Exist

func (rq *RunQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RunQuery) ExistX

func (rq *RunQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RunQuery) First

func (rq *RunQuery) First(ctx context.Context) (*Run, error)

First returns the first Run entity in the query. Returns *NotFoundError when no run was found.

func (*RunQuery) FirstID

func (rq *RunQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Run id in the query. Returns *NotFoundError when no id was found.

func (*RunQuery) FirstX

func (rq *RunQuery) FirstX(ctx context.Context) *Run

FirstX is like First, but panics if an error occurs.

func (*RunQuery) FirstXID

func (rq *RunQuery) FirstXID(ctx context.Context) string

FirstXID is like FirstID, but panics if an error occurs.

func (*RunQuery) GroupBy

func (rq *RunQuery) GroupBy(field string, fields ...string) *RunGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Run.Query().
	GroupBy(run.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RunQuery) IDs

func (rq *RunQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Run ids.

func (*RunQuery) IDsX

func (rq *RunQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*RunQuery) Limit

func (rq *RunQuery) Limit(limit int) *RunQuery

Limit adds a limit step to the query.

func (*RunQuery) Offset

func (rq *RunQuery) Offset(offset int) *RunQuery

Offset adds an offset step to the query.

func (*RunQuery) Only

func (rq *RunQuery) Only(ctx context.Context) (*Run, error)

Only returns the only Run entity in the query, returns an error if not exactly one entity was returned.

func (*RunQuery) OnlyID

func (rq *RunQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID returns the only Run id in the query, returns an error if not exactly one id was returned.

func (*RunQuery) OnlyIDX

func (rq *RunQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RunQuery) OnlyX

func (rq *RunQuery) OnlyX(ctx context.Context) *Run

OnlyX is like Only, but panics if an error occurs.

func (*RunQuery) Order

func (rq *RunQuery) Order(o ...OrderFunc) *RunQuery

Order adds an order step to the query.

func (*RunQuery) QueryCurrentStep

func (rq *RunQuery) QueryCurrentStep() *StepRunQuery

QueryCurrentStep chains the current query on the currentStep edge.

func (*RunQuery) QueryProject

func (rq *RunQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the project edge.

func (*RunQuery) QuerySteps

func (rq *RunQuery) QuerySteps() *StepRunQuery

QuerySteps chains the current query on the steps edge.

func (*RunQuery) QueryTemplate

func (rq *RunQuery) QueryTemplate() *TemplateQuery

QueryTemplate chains the current query on the template edge.

func (*RunQuery) Select

func (rq *RunQuery) Select(field string, fields ...string) *RunSelect

Select one or more fields from the given query.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Run.Query().
	Select(run.FieldCreatedAt).
	Scan(ctx, &v)

func (*RunQuery) Where

func (rq *RunQuery) Where(ps ...predicate.Run) *RunQuery

Where adds a new predicate for the builder.

func (*RunQuery) WithCurrentStep

func (rq *RunQuery) WithCurrentStep(opts ...func(*StepRunQuery)) *RunQuery
WithCurrentStep tells the query-builder to eager-loads the nodes that are connected to

the "currentStep" edge. The optional arguments used to configure the query builder of the edge.

func (*RunQuery) WithProject

func (rq *RunQuery) WithProject(opts ...func(*ProjectQuery)) *RunQuery
WithProject tells the query-builder to eager-loads the nodes that are connected to

the "project" edge. The optional arguments used to configure the query builder of the edge.

func (*RunQuery) WithSteps

func (rq *RunQuery) WithSteps(opts ...func(*StepRunQuery)) *RunQuery
WithSteps tells the query-builder to eager-loads the nodes that are connected to

the "steps" edge. The optional arguments used to configure the query builder of the edge.

func (*RunQuery) WithTemplate

func (rq *RunQuery) WithTemplate(opts ...func(*TemplateQuery)) *RunQuery
WithTemplate tells the query-builder to eager-loads the nodes that are connected to

the "template" edge. The optional arguments used to configure the query builder of the edge.

type RunSelect

type RunSelect struct {
	// contains filtered or unexported fields
}

RunSelect is the builder for select fields of Run entities.

func (*RunSelect) Bool

func (rs *RunSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from selector. It is only allowed when selecting one field.

func (*RunSelect) BoolX

func (rs *RunSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RunSelect) Bools

func (rs *RunSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*RunSelect) BoolsX

func (rs *RunSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RunSelect) Float64

func (rs *RunSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from selector. It is only allowed when selecting one field.

func (*RunSelect) Float64X

func (rs *RunSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RunSelect) Float64s

func (rs *RunSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*RunSelect) Float64sX

func (rs *RunSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RunSelect) Int

func (rs *RunSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from selector. It is only allowed when selecting one field.

func (*RunSelect) IntX

func (rs *RunSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RunSelect) Ints

func (rs *RunSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*RunSelect) IntsX

func (rs *RunSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RunSelect) Scan

func (rs *RunSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*RunSelect) ScanX

func (rs *RunSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RunSelect) String

func (rs *RunSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from selector. It is only allowed when selecting one field.

func (*RunSelect) StringX

func (rs *RunSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RunSelect) Strings

func (rs *RunSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*RunSelect) StringsX

func (rs *RunSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RunUpdate

type RunUpdate struct {
	// contains filtered or unexported fields
}

RunUpdate is the builder for updating Run entities.

func (*RunUpdate) AddStepIDs

func (ru *RunUpdate) AddStepIDs(ids ...string) *RunUpdate

AddStepIDs adds the steps edge to StepRun by ids.

func (*RunUpdate) AddSteps

func (ru *RunUpdate) AddSteps(s ...*StepRun) *RunUpdate

AddSteps adds the steps edges to StepRun.

func (*RunUpdate) ClearCurrentStep

func (ru *RunUpdate) ClearCurrentStep() *RunUpdate

ClearCurrentStep clears the "currentStep" edge to type StepRun.

func (*RunUpdate) ClearEndedAt

func (ru *RunUpdate) ClearEndedAt() *RunUpdate

ClearEndedAt clears the value of endedAt.

func (*RunUpdate) ClearError

func (ru *RunUpdate) ClearError() *RunUpdate

ClearError clears the value of error.

func (*RunUpdate) ClearProject

func (ru *RunUpdate) ClearProject() *RunUpdate

ClearProject clears the "project" edge to type Project.

func (*RunUpdate) ClearStartAt

func (ru *RunUpdate) ClearStartAt() *RunUpdate

ClearStartAt clears the value of startAt.

func (*RunUpdate) ClearStartedAt

func (ru *RunUpdate) ClearStartedAt() *RunUpdate

ClearStartedAt clears the value of startedAt.

func (*RunUpdate) ClearSteps

func (ru *RunUpdate) ClearSteps() *RunUpdate

ClearSteps clears all "steps" edges to type StepRun.

func (*RunUpdate) ClearTemplate

func (ru *RunUpdate) ClearTemplate() *RunUpdate

ClearTemplate clears the "template" edge to type Template.

func (*RunUpdate) Exec

func (ru *RunUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RunUpdate) ExecX

func (ru *RunUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RunUpdate) Mutation

func (ru *RunUpdate) Mutation() *RunMutation

Mutation returns the RunMutation object of the builder.

func (*RunUpdate) RemoveStepIDs

func (ru *RunUpdate) RemoveStepIDs(ids ...string) *RunUpdate

RemoveStepIDs removes the steps edge to StepRun by ids.

func (*RunUpdate) RemoveSteps

func (ru *RunUpdate) RemoveSteps(s ...*StepRun) *RunUpdate

RemoveSteps removes steps edges to StepRun.

func (*RunUpdate) Save

func (ru *RunUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*RunUpdate) SaveX

func (ru *RunUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RunUpdate) SetCurrentStep

func (ru *RunUpdate) SetCurrentStep(s *StepRun) *RunUpdate

SetCurrentStep sets the currentStep edge to StepRun.

func (*RunUpdate) SetCurrentStepID

func (ru *RunUpdate) SetCurrentStepID(id string) *RunUpdate

SetCurrentStepID sets the currentStep edge to StepRun by id.

func (*RunUpdate) SetEndedAt

func (ru *RunUpdate) SetEndedAt(t time.Time) *RunUpdate

SetEndedAt sets the endedAt field.

func (*RunUpdate) SetError

func (ru *RunUpdate) SetError(s string) *RunUpdate

SetError sets the error field.

func (*RunUpdate) SetName

func (ru *RunUpdate) SetName(s string) *RunUpdate

SetName sets the name field.

func (*RunUpdate) SetNillableCurrentStepID

func (ru *RunUpdate) SetNillableCurrentStepID(id *string) *RunUpdate

SetNillableCurrentStepID sets the currentStep edge to StepRun by id if the given value is not nil.

func (*RunUpdate) SetNillableEndedAt

func (ru *RunUpdate) SetNillableEndedAt(t *time.Time) *RunUpdate

SetNillableEndedAt sets the endedAt field if the given value is not nil.

func (*RunUpdate) SetNillableError

func (ru *RunUpdate) SetNillableError(s *string) *RunUpdate

SetNillableError sets the error field if the given value is not nil.

func (*RunUpdate) SetNillableProjectID

func (ru *RunUpdate) SetNillableProjectID(id *string) *RunUpdate

SetNillableProjectID sets the project edge to Project by id if the given value is not nil.

func (*RunUpdate) SetNillableStartAt

func (ru *RunUpdate) SetNillableStartAt(t *time.Time) *RunUpdate

SetNillableStartAt sets the startAt field if the given value is not nil.

func (*RunUpdate) SetNillableStartedAt

func (ru *RunUpdate) SetNillableStartedAt(t *time.Time) *RunUpdate

SetNillableStartedAt sets the startedAt field if the given value is not nil.

func (*RunUpdate) SetProject

func (ru *RunUpdate) SetProject(p *Project) *RunUpdate

SetProject sets the project edge to Project.

func (*RunUpdate) SetProjectID

func (ru *RunUpdate) SetProjectID(id string) *RunUpdate

SetProjectID sets the project edge to Project by id.

func (*RunUpdate) SetStartAt

func (ru *RunUpdate) SetStartAt(t time.Time) *RunUpdate

SetStartAt sets the startAt field.

func (*RunUpdate) SetStartedAt

func (ru *RunUpdate) SetStartedAt(t time.Time) *RunUpdate

SetStartedAt sets the startedAt field.

func (*RunUpdate) SetStatus

func (ru *RunUpdate) SetStatus(r run.Status) *RunUpdate

SetStatus sets the status field.

func (*RunUpdate) SetTemplate

func (ru *RunUpdate) SetTemplate(t *Template) *RunUpdate

SetTemplate sets the template edge to Template.

func (*RunUpdate) SetTemplateID

func (ru *RunUpdate) SetTemplateID(id string) *RunUpdate

SetTemplateID sets the template edge to Template by id.

func (*RunUpdate) SetUpdatedAt

func (ru *RunUpdate) SetUpdatedAt(t time.Time) *RunUpdate

SetUpdatedAt sets the updated_at field.

func (*RunUpdate) Where

func (ru *RunUpdate) Where(ps ...predicate.Run) *RunUpdate

Where adds a new predicate for the builder.

type RunUpdateOne

type RunUpdateOne struct {
	// contains filtered or unexported fields
}

RunUpdateOne is the builder for updating a single Run entity.

func (*RunUpdateOne) AddStepIDs

func (ruo *RunUpdateOne) AddStepIDs(ids ...string) *RunUpdateOne

AddStepIDs adds the steps edge to StepRun by ids.

func (*RunUpdateOne) AddSteps

func (ruo *RunUpdateOne) AddSteps(s ...*StepRun) *RunUpdateOne

AddSteps adds the steps edges to StepRun.

func (*RunUpdateOne) ClearCurrentStep

func (ruo *RunUpdateOne) ClearCurrentStep() *RunUpdateOne

ClearCurrentStep clears the "currentStep" edge to type StepRun.

func (*RunUpdateOne) ClearEndedAt

func (ruo *RunUpdateOne) ClearEndedAt() *RunUpdateOne

ClearEndedAt clears the value of endedAt.

func (*RunUpdateOne) ClearError

func (ruo *RunUpdateOne) ClearError() *RunUpdateOne

ClearError clears the value of error.

func (*RunUpdateOne) ClearProject

func (ruo *RunUpdateOne) ClearProject() *RunUpdateOne

ClearProject clears the "project" edge to type Project.

func (*RunUpdateOne) ClearStartAt

func (ruo *RunUpdateOne) ClearStartAt() *RunUpdateOne

ClearStartAt clears the value of startAt.

func (*RunUpdateOne) ClearStartedAt

func (ruo *RunUpdateOne) ClearStartedAt() *RunUpdateOne

ClearStartedAt clears the value of startedAt.

func (*RunUpdateOne) ClearSteps

func (ruo *RunUpdateOne) ClearSteps() *RunUpdateOne

ClearSteps clears all "steps" edges to type StepRun.

func (*RunUpdateOne) ClearTemplate

func (ruo *RunUpdateOne) ClearTemplate() *RunUpdateOne

ClearTemplate clears the "template" edge to type Template.

func (*RunUpdateOne) Exec

func (ruo *RunUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RunUpdateOne) ExecX

func (ruo *RunUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RunUpdateOne) Mutation

func (ruo *RunUpdateOne) Mutation() *RunMutation

Mutation returns the RunMutation object of the builder.

func (*RunUpdateOne) RemoveStepIDs

func (ruo *RunUpdateOne) RemoveStepIDs(ids ...string) *RunUpdateOne

RemoveStepIDs removes the steps edge to StepRun by ids.

func (*RunUpdateOne) RemoveSteps

func (ruo *RunUpdateOne) RemoveSteps(s ...*StepRun) *RunUpdateOne

RemoveSteps removes steps edges to StepRun.

func (*RunUpdateOne) Save

func (ruo *RunUpdateOne) Save(ctx context.Context) (*Run, error)

Save executes the query and returns the updated entity.

func (*RunUpdateOne) SaveX

func (ruo *RunUpdateOne) SaveX(ctx context.Context) *Run

SaveX is like Save, but panics if an error occurs.

func (*RunUpdateOne) SetCurrentStep

func (ruo *RunUpdateOne) SetCurrentStep(s *StepRun) *RunUpdateOne

SetCurrentStep sets the currentStep edge to StepRun.

func (*RunUpdateOne) SetCurrentStepID

func (ruo *RunUpdateOne) SetCurrentStepID(id string) *RunUpdateOne

SetCurrentStepID sets the currentStep edge to StepRun by id.

func (*RunUpdateOne) SetEndedAt

func (ruo *RunUpdateOne) SetEndedAt(t time.Time) *RunUpdateOne

SetEndedAt sets the endedAt field.

func (*RunUpdateOne) SetError

func (ruo *RunUpdateOne) SetError(s string) *RunUpdateOne

SetError sets the error field.

func (*RunUpdateOne) SetName

func (ruo *RunUpdateOne) SetName(s string) *RunUpdateOne

SetName sets the name field.

func (*RunUpdateOne) SetNillableCurrentStepID

func (ruo *RunUpdateOne) SetNillableCurrentStepID(id *string) *RunUpdateOne

SetNillableCurrentStepID sets the currentStep edge to StepRun by id if the given value is not nil.

func (*RunUpdateOne) SetNillableEndedAt

func (ruo *RunUpdateOne) SetNillableEndedAt(t *time.Time) *RunUpdateOne

SetNillableEndedAt sets the endedAt field if the given value is not nil.

func (*RunUpdateOne) SetNillableError

func (ruo *RunUpdateOne) SetNillableError(s *string) *RunUpdateOne

SetNillableError sets the error field if the given value is not nil.

func (*RunUpdateOne) SetNillableProjectID

func (ruo *RunUpdateOne) SetNillableProjectID(id *string) *RunUpdateOne

SetNillableProjectID sets the project edge to Project by id if the given value is not nil.

func (*RunUpdateOne) SetNillableStartAt

func (ruo *RunUpdateOne) SetNillableStartAt(t *time.Time) *RunUpdateOne

SetNillableStartAt sets the startAt field if the given value is not nil.

func (*RunUpdateOne) SetNillableStartedAt

func (ruo *RunUpdateOne) SetNillableStartedAt(t *time.Time) *RunUpdateOne

SetNillableStartedAt sets the startedAt field if the given value is not nil.

func (*RunUpdateOne) SetProject

func (ruo *RunUpdateOne) SetProject(p *Project) *RunUpdateOne

SetProject sets the project edge to Project.

func (*RunUpdateOne) SetProjectID

func (ruo *RunUpdateOne) SetProjectID(id string) *RunUpdateOne

SetProjectID sets the project edge to Project by id.

func (*RunUpdateOne) SetStartAt

func (ruo *RunUpdateOne) SetStartAt(t time.Time) *RunUpdateOne

SetStartAt sets the startAt field.

func (*RunUpdateOne) SetStartedAt

func (ruo *RunUpdateOne) SetStartedAt(t time.Time) *RunUpdateOne

SetStartedAt sets the startedAt field.

func (*RunUpdateOne) SetStatus

func (ruo *RunUpdateOne) SetStatus(r run.Status) *RunUpdateOne

SetStatus sets the status field.

func (*RunUpdateOne) SetTemplate

func (ruo *RunUpdateOne) SetTemplate(t *Template) *RunUpdateOne

SetTemplate sets the template edge to Template.

func (*RunUpdateOne) SetTemplateID

func (ruo *RunUpdateOne) SetTemplateID(id string) *RunUpdateOne

SetTemplateID sets the template edge to Template by id.

func (*RunUpdateOne) SetUpdatedAt

func (ruo *RunUpdateOne) SetUpdatedAt(t time.Time) *RunUpdateOne

SetUpdatedAt sets the updated_at field.

type Runs

type Runs []*Run

Runs is a parsable slice of Run.

type Step

type Step struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Type holds the value of the "type" field.
	Type step.Type `json:"type,omitempty"`
	// Index holds the value of the "index" field.
	Index int `json:"index,omitempty"`
	// Duration holds the value of the "duration" field.
	Duration int `json:"duration,omitempty"`
	// MsgArgs holds the value of the "msgArgs" field.
	MsgArgs *model.MessageStepArgs `json:"msgArgs,omitempty"`
	// HitArgs holds the value of the "hitArgs" field.
	HitArgs *model.HITStepArgs `json:"hitArgs,omitempty"`
	// FilterArgs holds the value of the "filterArgs" field.
	FilterArgs *model.FilterStepArgs `json:"filterArgs,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StepQuery when eager-loading is set.
	Edges StepEdges `json:"edges"`
	// contains filtered or unexported fields
}

Step is the model entity for the Step schema.

func (*Step) QueryStepRun

func (s *Step) QueryStepRun() *StepRunQuery

QueryStepRun queries the stepRun edge of the Step.

func (*Step) QueryTemplate

func (s *Step) QueryTemplate() *TemplateQuery

QueryTemplate queries the template edge of the Step.

func (*Step) String

func (s *Step) String() string

String implements the fmt.Stringer.

func (*Step) Unwrap

func (s *Step) Unwrap() *Step

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 (*Step) Update

func (s *Step) Update() *StepUpdateOne

Update returns a builder for updating this Step. Note that, you need to call Step.Unwrap() before calling this method, if this Step was returned from a transaction, and the transaction was committed or rolled back.

type StepClient

type StepClient struct {
	// contains filtered or unexported fields
}

StepClient is a client for the Step schema.

func NewStepClient

func NewStepClient(c config) *StepClient

NewStepClient returns a client for the Step from the given config.

func (*StepClient) Create

func (c *StepClient) Create() *StepCreate

Create returns a create builder for Step.

func (*StepClient) CreateBulk

func (c *StepClient) CreateBulk(builders ...*StepCreate) *StepCreateBulk

BulkCreate returns a builder for creating a bulk of Step entities.

func (*StepClient) Delete

func (c *StepClient) Delete() *StepDelete

Delete returns a delete builder for Step.

func (*StepClient) DeleteOne

func (c *StepClient) DeleteOne(s *Step) *StepDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*StepClient) DeleteOneID

func (c *StepClient) DeleteOneID(id string) *StepDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*StepClient) Get

func (c *StepClient) Get(ctx context.Context, id string) (*Step, error)

Get returns a Step entity by its id.

func (*StepClient) GetX

func (c *StepClient) GetX(ctx context.Context, id string) *Step

GetX is like Get, but panics if an error occurs.

func (*StepClient) Hooks

func (c *StepClient) Hooks() []Hook

Hooks returns the client hooks.

func (*StepClient) Query

func (c *StepClient) Query() *StepQuery

Query returns a query builder for Step.

func (*StepClient) QueryStepRun

func (c *StepClient) QueryStepRun(s *Step) *StepRunQuery

QueryStepRun queries the stepRun edge of a Step.

func (*StepClient) QueryTemplate

func (c *StepClient) QueryTemplate(s *Step) *TemplateQuery

QueryTemplate queries the template edge of a Step.

func (*StepClient) Update

func (c *StepClient) Update() *StepUpdate

Update returns an update builder for Step.

func (*StepClient) UpdateOne

func (c *StepClient) UpdateOne(s *Step) *StepUpdateOne

UpdateOne returns an update builder for the given entity.

func (*StepClient) UpdateOneID

func (c *StepClient) UpdateOneID(id string) *StepUpdateOne

UpdateOneID returns an update builder for the given id.

func (*StepClient) Use

func (c *StepClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `step.Hooks(f(g(h())))`.

type StepCreate

type StepCreate struct {
	// contains filtered or unexported fields
}

StepCreate is the builder for creating a Step entity.

func (*StepCreate) Mutation

func (sc *StepCreate) Mutation() *StepMutation

Mutation returns the StepMutation object of the builder.

func (*StepCreate) Save

func (sc *StepCreate) Save(ctx context.Context) (*Step, error)

Save creates the Step in the database.

func (*StepCreate) SaveX

func (sc *StepCreate) SaveX(ctx context.Context) *Step

SaveX calls Save and panics if Save returns an error.

func (*StepCreate) SetCreatedAt

func (sc *StepCreate) SetCreatedAt(t time.Time) *StepCreate

SetCreatedAt sets the created_at field.

func (*StepCreate) SetDuration

func (sc *StepCreate) SetDuration(i int) *StepCreate

SetDuration sets the duration field.

func (*StepCreate) SetFilterArgs

func (sc *StepCreate) SetFilterArgs(msa *model.FilterStepArgs) *StepCreate

SetFilterArgs sets the filterArgs field.

func (*StepCreate) SetHitArgs

func (sc *StepCreate) SetHitArgs(msa *model.HITStepArgs) *StepCreate

SetHitArgs sets the hitArgs field.

func (*StepCreate) SetID

func (sc *StepCreate) SetID(s string) *StepCreate

SetID sets the id field.

func (*StepCreate) SetIndex

func (sc *StepCreate) SetIndex(i int) *StepCreate

SetIndex sets the index field.

func (*StepCreate) SetMsgArgs

func (sc *StepCreate) SetMsgArgs(msa *model.MessageStepArgs) *StepCreate

SetMsgArgs sets the msgArgs field.

func (*StepCreate) SetNillableCreatedAt

func (sc *StepCreate) SetNillableCreatedAt(t *time.Time) *StepCreate

SetNillableCreatedAt sets the created_at field if the given value is not nil.

func (*StepCreate) SetNillableStepRunID

func (sc *StepCreate) SetNillableStepRunID(id *string) *StepCreate

SetNillableStepRunID sets the stepRun edge to StepRun by id if the given value is not nil.

func (*StepCreate) SetNillableTemplateID

func (sc *StepCreate) SetNillableTemplateID(id *string) *StepCreate

SetNillableTemplateID sets the template edge to Template by id if the given value is not nil.

func (*StepCreate) SetNillableUpdatedAt

func (sc *StepCreate) SetNillableUpdatedAt(t *time.Time) *StepCreate

SetNillableUpdatedAt sets the updated_at field if the given value is not nil.

func (*StepCreate) SetStepRun

func (sc *StepCreate) SetStepRun(s *StepRun) *StepCreate

SetStepRun sets the stepRun edge to StepRun.

func (*StepCreate) SetStepRunID

func (sc *StepCreate) SetStepRunID(id string) *StepCreate

SetStepRunID sets the stepRun edge to StepRun by id.

func (*StepCreate) SetTemplate

func (sc *StepCreate) SetTemplate(t *Template) *StepCreate

SetTemplate sets the template edge to Template.

func (*StepCreate) SetTemplateID

func (sc *StepCreate) SetTemplateID(id string) *StepCreate

SetTemplateID sets the template edge to Template by id.

func (*StepCreate) SetType

func (sc *StepCreate) SetType(s step.Type) *StepCreate

SetType sets the type field.

func (*StepCreate) SetUpdatedAt

func (sc *StepCreate) SetUpdatedAt(t time.Time) *StepCreate

SetUpdatedAt sets the updated_at field.

type StepCreateBulk

type StepCreateBulk struct {
	// contains filtered or unexported fields
}

StepCreateBulk is the builder for creating a bulk of Step entities.

func (*StepCreateBulk) Save

func (scb *StepCreateBulk) Save(ctx context.Context) ([]*Step, error)

Save creates the Step entities in the database.

func (*StepCreateBulk) SaveX

func (scb *StepCreateBulk) SaveX(ctx context.Context) []*Step

SaveX calls Save and panics if Save returns an error.

type StepDelete

type StepDelete struct {
	// contains filtered or unexported fields
}

StepDelete is the builder for deleting a Step entity.

func (*StepDelete) Exec

func (sd *StepDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*StepDelete) ExecX

func (sd *StepDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*StepDelete) Where

func (sd *StepDelete) Where(ps ...predicate.Step) *StepDelete

Where adds a new predicate to the delete builder.

type StepDeleteOne

type StepDeleteOne struct {
	// contains filtered or unexported fields
}

StepDeleteOne is the builder for deleting a single Step entity.

func (*StepDeleteOne) Exec

func (sdo *StepDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*StepDeleteOne) ExecX

func (sdo *StepDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type StepEdges

type StepEdges struct {
	// StepRun holds the value of the stepRun edge.
	StepRun *StepRun
	// Template holds the value of the template edge.
	Template *Template
	// contains filtered or unexported fields
}

StepEdges holds the relations/edges for other nodes in the graph.

func (StepEdges) StepRunOrErr

func (e StepEdges) StepRunOrErr() (*StepRun, error)

StepRunOrErr returns the StepRun value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (StepEdges) TemplateOrErr

func (e StepEdges) TemplateOrErr() (*Template, error)

TemplateOrErr returns the Template value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type StepGroupBy

type StepGroupBy struct {
	// contains filtered or unexported fields
}

StepGroupBy is the builder for group-by Step entities.

func (*StepGroupBy) Aggregate

func (sgb *StepGroupBy) Aggregate(fns ...AggregateFunc) *StepGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*StepGroupBy) Bool

func (sgb *StepGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*StepGroupBy) BoolX

func (sgb *StepGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StepGroupBy) Bools

func (sgb *StepGroupBy) 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 (*StepGroupBy) BoolsX

func (sgb *StepGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StepGroupBy) Float64

func (sgb *StepGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*StepGroupBy) Float64X

func (sgb *StepGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StepGroupBy) Float64s

func (sgb *StepGroupBy) 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 (*StepGroupBy) Float64sX

func (sgb *StepGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StepGroupBy) Int

func (sgb *StepGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*StepGroupBy) IntX

func (sgb *StepGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StepGroupBy) Ints

func (sgb *StepGroupBy) 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 (*StepGroupBy) IntsX

func (sgb *StepGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StepGroupBy) Scan

func (sgb *StepGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*StepGroupBy) ScanX

func (sgb *StepGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*StepGroupBy) String

func (sgb *StepGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*StepGroupBy) StringX

func (sgb *StepGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StepGroupBy) Strings

func (sgb *StepGroupBy) 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 (*StepGroupBy) StringsX

func (sgb *StepGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StepMutation

type StepMutation struct {
	// contains filtered or unexported fields
}

StepMutation represents an operation that mutate the Steps nodes in the graph.

func (*StepMutation) AddDuration

func (m *StepMutation) AddDuration(i int)

AddDuration adds i to duration.

func (*StepMutation) AddField

func (m *StepMutation) 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 (*StepMutation) AddIndex

func (m *StepMutation) AddIndex(i int)

AddIndex adds i to index.

func (*StepMutation) AddedDuration

func (m *StepMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the duration field in this mutation.

func (*StepMutation) AddedEdges

func (m *StepMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*StepMutation) AddedField

func (m *StepMutation) 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 (*StepMutation) AddedFields

func (m *StepMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented or decremented during this mutation.

func (*StepMutation) AddedIDs

func (m *StepMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*StepMutation) AddedIndex

func (m *StepMutation) AddedIndex() (r int, exists bool)

AddedIndex returns the value that was added to the index field in this mutation.

func (*StepMutation) ClearEdge

func (m *StepMutation) 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 (*StepMutation) ClearField

func (m *StepMutation) 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 (*StepMutation) ClearFilterArgs

func (m *StepMutation) ClearFilterArgs()

ClearFilterArgs clears the value of filterArgs.

func (*StepMutation) ClearHitArgs

func (m *StepMutation) ClearHitArgs()

ClearHitArgs clears the value of hitArgs.

func (*StepMutation) ClearMsgArgs

func (m *StepMutation) ClearMsgArgs()

ClearMsgArgs clears the value of msgArgs.

func (*StepMutation) ClearStepRun

func (m *StepMutation) ClearStepRun()

ClearStepRun clears the stepRun edge to StepRun.

func (*StepMutation) ClearTemplate

func (m *StepMutation) ClearTemplate()

ClearTemplate clears the template edge to Template.

func (*StepMutation) ClearedEdges

func (m *StepMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*StepMutation) ClearedFields

func (m *StepMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (StepMutation) Client

func (m StepMutation) 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 (*StepMutation) CreatedAt

func (m *StepMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*StepMutation) Duration

func (m *StepMutation) Duration() (r int, exists bool)

Duration returns the duration value in the mutation.

func (*StepMutation) EdgeCleared

func (m *StepMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*StepMutation) Field

func (m *StepMutation) 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 (*StepMutation) FieldCleared

func (m *StepMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*StepMutation) Fields

func (m *StepMutation) 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 (*StepMutation) FilterArgs

func (m *StepMutation) FilterArgs() (r *model.FilterStepArgs, exists bool)

FilterArgs returns the filterArgs value in the mutation.

func (*StepMutation) FilterArgsCleared

func (m *StepMutation) FilterArgsCleared() bool

FilterArgsCleared returns if the field filterArgs was cleared in this mutation.

func (*StepMutation) GetType

func (m *StepMutation) GetType() (r step.Type, exists bool)

GetType returns the type value in the mutation.

func (*StepMutation) HitArgs

func (m *StepMutation) HitArgs() (r *model.HITStepArgs, exists bool)

HitArgs returns the hitArgs value in the mutation.

func (*StepMutation) HitArgsCleared

func (m *StepMutation) HitArgsCleared() bool

HitArgsCleared returns if the field hitArgs was cleared in this mutation.

func (*StepMutation) ID

func (m *StepMutation) ID() (id string, 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 (*StepMutation) Index

func (m *StepMutation) Index() (r int, exists bool)

Index returns the index value in the mutation.

func (*StepMutation) MsgArgs

func (m *StepMutation) MsgArgs() (r *model.MessageStepArgs, exists bool)

MsgArgs returns the msgArgs value in the mutation.

func (*StepMutation) MsgArgsCleared

func (m *StepMutation) MsgArgsCleared() bool

MsgArgsCleared returns if the field msgArgs was cleared in this mutation.

func (*StepMutation) OldCreatedAt

func (m *StepMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Step. If the Step object wasn'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 (*StepMutation) OldDuration

func (m *StepMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old duration value of the Step. If the Step object wasn'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 (*StepMutation) OldField

func (m *StepMutation) 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 (*StepMutation) OldFilterArgs

func (m *StepMutation) OldFilterArgs(ctx context.Context) (v *model.FilterStepArgs, err error)

OldFilterArgs returns the old filterArgs value of the Step. If the Step object wasn'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 (*StepMutation) OldHitArgs

func (m *StepMutation) OldHitArgs(ctx context.Context) (v *model.HITStepArgs, err error)

OldHitArgs returns the old hitArgs value of the Step. If the Step object wasn'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 (*StepMutation) OldIndex

func (m *StepMutation) OldIndex(ctx context.Context) (v int, err error)

OldIndex returns the old index value of the Step. If the Step object wasn'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 (*StepMutation) OldMsgArgs

func (m *StepMutation) OldMsgArgs(ctx context.Context) (v *model.MessageStepArgs, err error)

OldMsgArgs returns the old msgArgs value of the Step. If the Step object wasn'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 (*StepMutation) OldType

func (m *StepMutation) OldType(ctx context.Context) (v step.Type, err error)

OldType returns the old type value of the Step. If the Step object wasn'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 (*StepMutation) OldUpdatedAt

func (m *StepMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Step. If the Step object wasn'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 (*StepMutation) Op

func (m *StepMutation) Op() Op

Op returns the operation name.

func (*StepMutation) RemovedEdges

func (m *StepMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*StepMutation) RemovedIDs

func (m *StepMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*StepMutation) ResetCreatedAt

func (m *StepMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*StepMutation) ResetDuration

func (m *StepMutation) ResetDuration()

ResetDuration reset all changes of the "duration" field.

func (*StepMutation) ResetEdge

func (m *StepMutation) 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 (*StepMutation) ResetField

func (m *StepMutation) 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 (*StepMutation) ResetFilterArgs

func (m *StepMutation) ResetFilterArgs()

ResetFilterArgs reset all changes of the "filterArgs" field.

func (*StepMutation) ResetHitArgs

func (m *StepMutation) ResetHitArgs()

ResetHitArgs reset all changes of the "hitArgs" field.

func (*StepMutation) ResetIndex

func (m *StepMutation) ResetIndex()

ResetIndex reset all changes of the "index" field.

func (*StepMutation) ResetMsgArgs

func (m *StepMutation) ResetMsgArgs()

ResetMsgArgs reset all changes of the "msgArgs" field.

func (*StepMutation) ResetStepRun

func (m *StepMutation) ResetStepRun()

ResetStepRun reset all changes of the "stepRun" edge.

func (*StepMutation) ResetTemplate

func (m *StepMutation) ResetTemplate()

ResetTemplate reset all changes of the "template" edge.

func (*StepMutation) ResetType

func (m *StepMutation) ResetType()

ResetType reset all changes of the "type" field.

func (*StepMutation) ResetUpdatedAt

func (m *StepMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*StepMutation) SetCreatedAt

func (m *StepMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*StepMutation) SetDuration

func (m *StepMutation) SetDuration(i int)

SetDuration sets the duration field.

func (*StepMutation) SetField

func (m *StepMutation) 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 (*StepMutation) SetFilterArgs

func (m *StepMutation) SetFilterArgs(msa *model.FilterStepArgs)

SetFilterArgs sets the filterArgs field.

func (*StepMutation) SetHitArgs

func (m *StepMutation) SetHitArgs(msa *model.HITStepArgs)

SetHitArgs sets the hitArgs field.

func (*StepMutation) SetID

func (m *StepMutation) SetID(id string)

SetID sets the value of the id field. Note that, this operation is accepted only on Step creation.

func (*StepMutation) SetIndex

func (m *StepMutation) SetIndex(i int)

SetIndex sets the index field.

func (*StepMutation) SetMsgArgs

func (m *StepMutation) SetMsgArgs(msa *model.MessageStepArgs)

SetMsgArgs sets the msgArgs field.

func (*StepMutation) SetStepRunID

func (m *StepMutation) SetStepRunID(id string)

SetStepRunID sets the stepRun edge to StepRun by id.

func (*StepMutation) SetTemplateID

func (m *StepMutation) SetTemplateID(id string)

SetTemplateID sets the template edge to Template by id.

func (*StepMutation) SetType

func (m *StepMutation) SetType(s step.Type)

SetType sets the type field.

func (*StepMutation) SetUpdatedAt

func (m *StepMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*StepMutation) StepRunCleared

func (m *StepMutation) StepRunCleared() bool

StepRunCleared returns if the edge stepRun was cleared.

func (*StepMutation) StepRunID

func (m *StepMutation) StepRunID() (id string, exists bool)

StepRunID returns the stepRun id in the mutation.

func (*StepMutation) StepRunIDs

func (m *StepMutation) StepRunIDs() (ids []string)

StepRunIDs returns the stepRun ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use StepRunID instead. It exists only for internal usage by the builders.

func (*StepMutation) TemplateCleared

func (m *StepMutation) TemplateCleared() bool

TemplateCleared returns if the edge template was cleared.

func (*StepMutation) TemplateID

func (m *StepMutation) TemplateID() (id string, exists bool)

TemplateID returns the template id in the mutation.

func (*StepMutation) TemplateIDs

func (m *StepMutation) TemplateIDs() (ids []string)

TemplateIDs returns the template ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use TemplateID instead. It exists only for internal usage by the builders.

func (StepMutation) Tx

func (m StepMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*StepMutation) Type

func (m *StepMutation) Type() string

Type returns the node type of this mutation (Step).

func (*StepMutation) UpdatedAt

func (m *StepMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

type StepQuery

type StepQuery struct {
	// contains filtered or unexported fields
}

StepQuery is the builder for querying Step entities.

func (*StepQuery) All

func (sq *StepQuery) All(ctx context.Context) ([]*Step, error)

All executes the query and returns a list of Steps.

func (*StepQuery) AllX

func (sq *StepQuery) AllX(ctx context.Context) []*Step

AllX is like All, but panics if an error occurs.

func (*StepQuery) Clone

func (sq *StepQuery) Clone() *StepQuery

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 (*StepQuery) Count

func (sq *StepQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StepQuery) CountX

func (sq *StepQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*StepQuery) Exist

func (sq *StepQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*StepQuery) ExistX

func (sq *StepQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*StepQuery) First

func (sq *StepQuery) First(ctx context.Context) (*Step, error)

First returns the first Step entity in the query. Returns *NotFoundError when no step was found.

func (*StepQuery) FirstID

func (sq *StepQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Step id in the query. Returns *NotFoundError when no id was found.

func (*StepQuery) FirstX

func (sq *StepQuery) FirstX(ctx context.Context) *Step

FirstX is like First, but panics if an error occurs.

func (*StepQuery) FirstXID

func (sq *StepQuery) FirstXID(ctx context.Context) string

FirstXID is like FirstID, but panics if an error occurs.

func (*StepQuery) GroupBy

func (sq *StepQuery) GroupBy(field string, fields ...string) *StepGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Step.Query().
	GroupBy(step.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StepQuery) IDs

func (sq *StepQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Step ids.

func (*StepQuery) IDsX

func (sq *StepQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*StepQuery) Limit

func (sq *StepQuery) Limit(limit int) *StepQuery

Limit adds a limit step to the query.

func (*StepQuery) Offset

func (sq *StepQuery) Offset(offset int) *StepQuery

Offset adds an offset step to the query.

func (*StepQuery) Only

func (sq *StepQuery) Only(ctx context.Context) (*Step, error)

Only returns the only Step entity in the query, returns an error if not exactly one entity was returned.

func (*StepQuery) OnlyID

func (sq *StepQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID returns the only Step id in the query, returns an error if not exactly one id was returned.

func (*StepQuery) OnlyIDX

func (sq *StepQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*StepQuery) OnlyX

func (sq *StepQuery) OnlyX(ctx context.Context) *Step

OnlyX is like Only, but panics if an error occurs.

func (*StepQuery) Order

func (sq *StepQuery) Order(o ...OrderFunc) *StepQuery

Order adds an order step to the query.

func (*StepQuery) QueryStepRun

func (sq *StepQuery) QueryStepRun() *StepRunQuery

QueryStepRun chains the current query on the stepRun edge.

func (*StepQuery) QueryTemplate

func (sq *StepQuery) QueryTemplate() *TemplateQuery

QueryTemplate chains the current query on the template edge.

func (*StepQuery) Select

func (sq *StepQuery) Select(field string, fields ...string) *StepSelect

Select one or more fields from the given query.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Step.Query().
	Select(step.FieldCreatedAt).
	Scan(ctx, &v)

func (*StepQuery) Where

func (sq *StepQuery) Where(ps ...predicate.Step) *StepQuery

Where adds a new predicate for the builder.

func (*StepQuery) WithStepRun

func (sq *StepQuery) WithStepRun(opts ...func(*StepRunQuery)) *StepQuery
WithStepRun tells the query-builder to eager-loads the nodes that are connected to

the "stepRun" edge. The optional arguments used to configure the query builder of the edge.

func (*StepQuery) WithTemplate

func (sq *StepQuery) WithTemplate(opts ...func(*TemplateQuery)) *StepQuery
WithTemplate tells the query-builder to eager-loads the nodes that are connected to

the "template" edge. The optional arguments used to configure the query builder of the edge.

type StepRun

type StepRun struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status holds the value of the "status" field.
	Status steprun.Status `json:"status,omitempty"`
	// StartedAt holds the value of the "startedAt" field.
	StartedAt *time.Time `json:"startedAt,omitempty"`
	// EndedAt holds the value of the "endedAt" field.
	EndedAt *time.Time `json:"endedAt,omitempty"`
	// Index holds the value of the "index" field.
	Index int `json:"index,omitempty"`
	// ParticipantsCount holds the value of the "participantsCount" field.
	ParticipantsCount int `json:"participantsCount,omitempty"`
	// HitID holds the value of the "hitID" field.
	HitID *string `json:"hitID,omitempty"`
	// UrlToken holds the value of the "urlToken" field.
	UrlToken string `json:"urlToken,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StepRunQuery when eager-loading is set.
	Edges StepRunEdges `json:"edges"`
	// contains filtered or unexported fields
}

StepRun is the model entity for the StepRun schema.

func (*StepRun) QueryCreatedParticipants

func (sr *StepRun) QueryCreatedParticipants() *ParticipantQuery

QueryCreatedParticipants queries the createdParticipants edge of the StepRun.

func (*StepRun) QueryParticipants

func (sr *StepRun) QueryParticipants() *ParticipantQuery

QueryParticipants queries the participants edge of the StepRun.

func (*StepRun) QueryParticipations

func (sr *StepRun) QueryParticipations() *ParticipationQuery

QueryParticipations queries the participations edge of the StepRun.

func (*StepRun) QueryRun

func (sr *StepRun) QueryRun() *RunQuery

QueryRun queries the run edge of the StepRun.

func (*StepRun) QueryStep

func (sr *StepRun) QueryStep() *StepQuery

QueryStep queries the step edge of the StepRun.

func (*StepRun) String

func (sr *StepRun) String() string

String implements the fmt.Stringer.

func (*StepRun) Unwrap

func (sr *StepRun) Unwrap() *StepRun

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 (*StepRun) Update

func (sr *StepRun) Update() *StepRunUpdateOne

Update returns a builder for updating this StepRun. Note that, you need to call StepRun.Unwrap() before calling this method, if this StepRun was returned from a transaction, and the transaction was committed or rolled back.

type StepRunClient

type StepRunClient struct {
	// contains filtered or unexported fields
}

StepRunClient is a client for the StepRun schema.

func NewStepRunClient

func NewStepRunClient(c config) *StepRunClient

NewStepRunClient returns a client for the StepRun from the given config.

func (*StepRunClient) Create

func (c *StepRunClient) Create() *StepRunCreate

Create returns a create builder for StepRun.

func (*StepRunClient) CreateBulk

func (c *StepRunClient) CreateBulk(builders ...*StepRunCreate) *StepRunCreateBulk

BulkCreate returns a builder for creating a bulk of StepRun entities.

func (*StepRunClient) Delete

func (c *StepRunClient) Delete() *StepRunDelete

Delete returns a delete builder for StepRun.

func (*StepRunClient) DeleteOne

func (c *StepRunClient) DeleteOne(sr *StepRun) *StepRunDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*StepRunClient) DeleteOneID

func (c *StepRunClient) DeleteOneID(id string) *StepRunDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*StepRunClient) Get

func (c *StepRunClient) Get(ctx context.Context, id string) (*StepRun, error)

Get returns a StepRun entity by its id.

func (*StepRunClient) GetX

func (c *StepRunClient) GetX(ctx context.Context, id string) *StepRun

GetX is like Get, but panics if an error occurs.

func (*StepRunClient) Hooks

func (c *StepRunClient) Hooks() []Hook

Hooks returns the client hooks.

func (*StepRunClient) Query

func (c *StepRunClient) Query() *StepRunQuery

Query returns a query builder for StepRun.

func (*StepRunClient) QueryCreatedParticipants

func (c *StepRunClient) QueryCreatedParticipants(sr *StepRun) *ParticipantQuery

QueryCreatedParticipants queries the createdParticipants edge of a StepRun.

func (*StepRunClient) QueryParticipants

func (c *StepRunClient) QueryParticipants(sr *StepRun) *ParticipantQuery

QueryParticipants queries the participants edge of a StepRun.

func (*StepRunClient) QueryParticipations

func (c *StepRunClient) QueryParticipations(sr *StepRun) *ParticipationQuery

QueryParticipations queries the participations edge of a StepRun.

func (*StepRunClient) QueryRun

func (c *StepRunClient) QueryRun(sr *StepRun) *RunQuery

QueryRun queries the run edge of a StepRun.

func (*StepRunClient) QueryStep

func (c *StepRunClient) QueryStep(sr *StepRun) *StepQuery

QueryStep queries the step edge of a StepRun.

func (*StepRunClient) Update

func (c *StepRunClient) Update() *StepRunUpdate

Update returns an update builder for StepRun.

func (*StepRunClient) UpdateOne

func (c *StepRunClient) UpdateOne(sr *StepRun) *StepRunUpdateOne

UpdateOne returns an update builder for the given entity.

func (*StepRunClient) UpdateOneID

func (c *StepRunClient) UpdateOneID(id string) *StepRunUpdateOne

UpdateOneID returns an update builder for the given id.

func (*StepRunClient) Use

func (c *StepRunClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `steprun.Hooks(f(g(h())))`.

type StepRunCreate

type StepRunCreate struct {
	// contains filtered or unexported fields
}

StepRunCreate is the builder for creating a StepRun entity.

func (*StepRunCreate) AddCreatedParticipantIDs

func (src *StepRunCreate) AddCreatedParticipantIDs(ids ...string) *StepRunCreate

AddCreatedParticipantIDs adds the createdParticipants edge to Participant by ids.

func (*StepRunCreate) AddCreatedParticipants

func (src *StepRunCreate) AddCreatedParticipants(p ...*Participant) *StepRunCreate

AddCreatedParticipants adds the createdParticipants edges to Participant.

func (*StepRunCreate) AddParticipantIDs

func (src *StepRunCreate) AddParticipantIDs(ids ...string) *StepRunCreate

AddParticipantIDs adds the participants edge to Participant by ids.

func (*StepRunCreate) AddParticipants

func (src *StepRunCreate) AddParticipants(p ...*Participant) *StepRunCreate

AddParticipants adds the participants edges to Participant.

func (*StepRunCreate) AddParticipationIDs

func (src *StepRunCreate) AddParticipationIDs(ids ...string) *StepRunCreate

AddParticipationIDs adds the participations edge to Participation by ids.

func (*StepRunCreate) AddParticipations

func (src *StepRunCreate) AddParticipations(p ...*Participation) *StepRunCreate

AddParticipations adds the participations edges to Participation.

func (*StepRunCreate) Mutation

func (src *StepRunCreate) Mutation() *StepRunMutation

Mutation returns the StepRunMutation object of the builder.

func (*StepRunCreate) Save

func (src *StepRunCreate) Save(ctx context.Context) (*StepRun, error)

Save creates the StepRun in the database.

func (*StepRunCreate) SaveX

func (src *StepRunCreate) SaveX(ctx context.Context) *StepRun

SaveX calls Save and panics if Save returns an error.

func (*StepRunCreate) SetCreatedAt

func (src *StepRunCreate) SetCreatedAt(t time.Time) *StepRunCreate

SetCreatedAt sets the created_at field.

func (*StepRunCreate) SetEndedAt

func (src *StepRunCreate) SetEndedAt(t time.Time) *StepRunCreate

SetEndedAt sets the endedAt field.

func (*StepRunCreate) SetHitID

func (src *StepRunCreate) SetHitID(s string) *StepRunCreate

SetHitID sets the hitID field.

func (*StepRunCreate) SetID

func (src *StepRunCreate) SetID(s string) *StepRunCreate

SetID sets the id field.

func (*StepRunCreate) SetIndex

func (src *StepRunCreate) SetIndex(i int) *StepRunCreate

SetIndex sets the index field.

func (*StepRunCreate) SetNillableCreatedAt

func (src *StepRunCreate) SetNillableCreatedAt(t *time.Time) *StepRunCreate

SetNillableCreatedAt sets the created_at field if the given value is not nil.

func (*StepRunCreate) SetNillableEndedAt

func (src *StepRunCreate) SetNillableEndedAt(t *time.Time) *StepRunCreate

SetNillableEndedAt sets the endedAt field if the given value is not nil.

func (*StepRunCreate) SetNillableHitID

func (src *StepRunCreate) SetNillableHitID(s *string) *StepRunCreate

SetNillableHitID sets the hitID field if the given value is not nil.

func (*StepRunCreate) SetNillableRunID

func (src *StepRunCreate) SetNillableRunID(id *string) *StepRunCreate

SetNillableRunID sets the run edge to Run by id if the given value is not nil.

func (*StepRunCreate) SetNillableStartedAt

func (src *StepRunCreate) SetNillableStartedAt(t *time.Time) *StepRunCreate

SetNillableStartedAt sets the startedAt field if the given value is not nil.

func (*StepRunCreate) SetNillableUpdatedAt

func (src *StepRunCreate) SetNillableUpdatedAt(t *time.Time) *StepRunCreate

SetNillableUpdatedAt sets the updated_at field if the given value is not nil.

func (*StepRunCreate) SetParticipantsCount

func (src *StepRunCreate) SetParticipantsCount(i int) *StepRunCreate

SetParticipantsCount sets the participantsCount field.

func (*StepRunCreate) SetRun

func (src *StepRunCreate) SetRun(r *Run) *StepRunCreate

SetRun sets the run edge to Run.

func (*StepRunCreate) SetRunID

func (src *StepRunCreate) SetRunID(id string) *StepRunCreate

SetRunID sets the run edge to Run by id.

func (*StepRunCreate) SetStartedAt

func (src *StepRunCreate) SetStartedAt(t time.Time) *StepRunCreate

SetStartedAt sets the startedAt field.

func (*StepRunCreate) SetStatus

func (src *StepRunCreate) SetStatus(s steprun.Status) *StepRunCreate

SetStatus sets the status field.

func (*StepRunCreate) SetStep

func (src *StepRunCreate) SetStep(s *Step) *StepRunCreate

SetStep sets the step edge to Step.

func (*StepRunCreate) SetStepID

func (src *StepRunCreate) SetStepID(id string) *StepRunCreate

SetStepID sets the step edge to Step by id.

func (*StepRunCreate) SetUpdatedAt

func (src *StepRunCreate) SetUpdatedAt(t time.Time) *StepRunCreate

SetUpdatedAt sets the updated_at field.

func (*StepRunCreate) SetUrlToken

func (src *StepRunCreate) SetUrlToken(s string) *StepRunCreate

SetUrlToken sets the urlToken field.

type StepRunCreateBulk

type StepRunCreateBulk struct {
	// contains filtered or unexported fields
}

StepRunCreateBulk is the builder for creating a bulk of StepRun entities.

func (*StepRunCreateBulk) Save

func (srcb *StepRunCreateBulk) Save(ctx context.Context) ([]*StepRun, error)

Save creates the StepRun entities in the database.

func (*StepRunCreateBulk) SaveX

func (srcb *StepRunCreateBulk) SaveX(ctx context.Context) []*StepRun

SaveX calls Save and panics if Save returns an error.

type StepRunDelete

type StepRunDelete struct {
	// contains filtered or unexported fields
}

StepRunDelete is the builder for deleting a StepRun entity.

func (*StepRunDelete) Exec

func (srd *StepRunDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*StepRunDelete) ExecX

func (srd *StepRunDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*StepRunDelete) Where

func (srd *StepRunDelete) Where(ps ...predicate.StepRun) *StepRunDelete

Where adds a new predicate to the delete builder.

type StepRunDeleteOne

type StepRunDeleteOne struct {
	// contains filtered or unexported fields
}

StepRunDeleteOne is the builder for deleting a single StepRun entity.

func (*StepRunDeleteOne) Exec

func (srdo *StepRunDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*StepRunDeleteOne) ExecX

func (srdo *StepRunDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type StepRunEdges

type StepRunEdges struct {
	// CreatedParticipants holds the value of the createdParticipants edge.
	CreatedParticipants []*Participant
	// Participants holds the value of the participants edge.
	Participants []*Participant
	// Participations holds the value of the participations edge.
	Participations []*Participation
	// Step holds the value of the step edge.
	Step *Step
	// Run holds the value of the run edge.
	Run *Run
	// contains filtered or unexported fields
}

StepRunEdges holds the relations/edges for other nodes in the graph.

func (StepRunEdges) CreatedParticipantsOrErr

func (e StepRunEdges) CreatedParticipantsOrErr() ([]*Participant, error)

CreatedParticipantsOrErr returns the CreatedParticipants value or an error if the edge was not loaded in eager-loading.

func (StepRunEdges) ParticipantsOrErr

func (e StepRunEdges) ParticipantsOrErr() ([]*Participant, error)

ParticipantsOrErr returns the Participants value or an error if the edge was not loaded in eager-loading.

func (StepRunEdges) ParticipationsOrErr

func (e StepRunEdges) ParticipationsOrErr() ([]*Participation, error)

ParticipationsOrErr returns the Participations value or an error if the edge was not loaded in eager-loading.

func (StepRunEdges) RunOrErr

func (e StepRunEdges) RunOrErr() (*Run, error)

RunOrErr returns the Run value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (StepRunEdges) StepOrErr

func (e StepRunEdges) StepOrErr() (*Step, error)

StepOrErr returns the Step value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type StepRunGroupBy

type StepRunGroupBy struct {
	// contains filtered or unexported fields
}

StepRunGroupBy is the builder for group-by StepRun entities.

func (*StepRunGroupBy) Aggregate

func (srgb *StepRunGroupBy) Aggregate(fns ...AggregateFunc) *StepRunGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*StepRunGroupBy) Bool

func (srgb *StepRunGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*StepRunGroupBy) BoolX

func (srgb *StepRunGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StepRunGroupBy) Bools

func (srgb *StepRunGroupBy) 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 (*StepRunGroupBy) BoolsX

func (srgb *StepRunGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StepRunGroupBy) Float64

func (srgb *StepRunGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*StepRunGroupBy) Float64X

func (srgb *StepRunGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StepRunGroupBy) Float64s

func (srgb *StepRunGroupBy) 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 (*StepRunGroupBy) Float64sX

func (srgb *StepRunGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StepRunGroupBy) Int

func (srgb *StepRunGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*StepRunGroupBy) IntX

func (srgb *StepRunGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StepRunGroupBy) Ints

func (srgb *StepRunGroupBy) 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 (*StepRunGroupBy) IntsX

func (srgb *StepRunGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StepRunGroupBy) Scan

func (srgb *StepRunGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*StepRunGroupBy) ScanX

func (srgb *StepRunGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*StepRunGroupBy) String

func (srgb *StepRunGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*StepRunGroupBy) StringX

func (srgb *StepRunGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StepRunGroupBy) Strings

func (srgb *StepRunGroupBy) 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 (*StepRunGroupBy) StringsX

func (srgb *StepRunGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StepRunMutation

type StepRunMutation struct {
	// contains filtered or unexported fields
}

StepRunMutation represents an operation that mutate the StepRuns nodes in the graph.

func (*StepRunMutation) AddCreatedParticipantIDs

func (m *StepRunMutation) AddCreatedParticipantIDs(ids ...string)

AddCreatedParticipantIDs adds the createdParticipants edge to Participant by ids.

func (*StepRunMutation) AddField

func (m *StepRunMutation) 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 (*StepRunMutation) AddIndex

func (m *StepRunMutation) AddIndex(i int)

AddIndex adds i to index.

func (*StepRunMutation) AddParticipantIDs

func (m *StepRunMutation) AddParticipantIDs(ids ...string)

AddParticipantIDs adds the participants edge to Participant by ids.

func (*StepRunMutation) AddParticipantsCount

func (m *StepRunMutation) AddParticipantsCount(i int)

AddParticipantsCount adds i to participantsCount.

func (*StepRunMutation) AddParticipationIDs

func (m *StepRunMutation) AddParticipationIDs(ids ...string)

AddParticipationIDs adds the participations edge to Participation by ids.

func (*StepRunMutation) AddedEdges

func (m *StepRunMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*StepRunMutation) AddedField

func (m *StepRunMutation) 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 (*StepRunMutation) AddedFields

func (m *StepRunMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented or decremented during this mutation.

func (*StepRunMutation) AddedIDs

func (m *StepRunMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*StepRunMutation) AddedIndex

func (m *StepRunMutation) AddedIndex() (r int, exists bool)

AddedIndex returns the value that was added to the index field in this mutation.

func (*StepRunMutation) AddedParticipantsCount

func (m *StepRunMutation) AddedParticipantsCount() (r int, exists bool)

AddedParticipantsCount returns the value that was added to the participantsCount field in this mutation.

func (*StepRunMutation) ClearCreatedParticipants

func (m *StepRunMutation) ClearCreatedParticipants()

ClearCreatedParticipants clears the createdParticipants edge to Participant.

func (*StepRunMutation) ClearEdge

func (m *StepRunMutation) 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 (*StepRunMutation) ClearEndedAt

func (m *StepRunMutation) ClearEndedAt()

ClearEndedAt clears the value of endedAt.

func (*StepRunMutation) ClearField

func (m *StepRunMutation) 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 (*StepRunMutation) ClearHitID

func (m *StepRunMutation) ClearHitID()

ClearHitID clears the value of hitID.

func (*StepRunMutation) ClearParticipants

func (m *StepRunMutation) ClearParticipants()

ClearParticipants clears the participants edge to Participant.

func (*StepRunMutation) ClearParticipations

func (m *StepRunMutation) ClearParticipations()

ClearParticipations clears the participations edge to Participation.

func (*StepRunMutation) ClearRun

func (m *StepRunMutation) ClearRun()

ClearRun clears the run edge to Run.

func (*StepRunMutation) ClearStartedAt

func (m *StepRunMutation) ClearStartedAt()

ClearStartedAt clears the value of startedAt.

func (*StepRunMutation) ClearStep

func (m *StepRunMutation) ClearStep()

ClearStep clears the step edge to Step.

func (*StepRunMutation) ClearedEdges

func (m *StepRunMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*StepRunMutation) ClearedFields

func (m *StepRunMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (StepRunMutation) Client

func (m StepRunMutation) 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 (*StepRunMutation) CreatedAt

func (m *StepRunMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*StepRunMutation) CreatedParticipantsCleared

func (m *StepRunMutation) CreatedParticipantsCleared() bool

CreatedParticipantsCleared returns if the edge createdParticipants was cleared.

func (*StepRunMutation) CreatedParticipantsIDs

func (m *StepRunMutation) CreatedParticipantsIDs() (ids []string)

CreatedParticipantsIDs returns the createdParticipants ids in the mutation.

func (*StepRunMutation) EdgeCleared

func (m *StepRunMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*StepRunMutation) EndedAt

func (m *StepRunMutation) EndedAt() (r time.Time, exists bool)

EndedAt returns the endedAt value in the mutation.

func (*StepRunMutation) EndedAtCleared

func (m *StepRunMutation) EndedAtCleared() bool

EndedAtCleared returns if the field endedAt was cleared in this mutation.

func (*StepRunMutation) Field

func (m *StepRunMutation) 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 (*StepRunMutation) FieldCleared

func (m *StepRunMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*StepRunMutation) Fields

func (m *StepRunMutation) 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 (*StepRunMutation) HitID

func (m *StepRunMutation) HitID() (r string, exists bool)

HitID returns the hitID value in the mutation.

func (*StepRunMutation) HitIDCleared

func (m *StepRunMutation) HitIDCleared() bool

HitIDCleared returns if the field hitID was cleared in this mutation.

func (*StepRunMutation) ID

func (m *StepRunMutation) ID() (id string, 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 (*StepRunMutation) Index

func (m *StepRunMutation) Index() (r int, exists bool)

Index returns the index value in the mutation.

func (*StepRunMutation) OldCreatedAt

func (m *StepRunMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldEndedAt

func (m *StepRunMutation) OldEndedAt(ctx context.Context) (v *time.Time, err error)

OldEndedAt returns the old endedAt value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldField

func (m *StepRunMutation) 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 (*StepRunMutation) OldHitID

func (m *StepRunMutation) OldHitID(ctx context.Context) (v *string, err error)

OldHitID returns the old hitID value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldIndex

func (m *StepRunMutation) OldIndex(ctx context.Context) (v int, err error)

OldIndex returns the old index value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldParticipantsCount

func (m *StepRunMutation) OldParticipantsCount(ctx context.Context) (v int, err error)

OldParticipantsCount returns the old participantsCount value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldStartedAt

func (m *StepRunMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)

OldStartedAt returns the old startedAt value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldStatus

func (m *StepRunMutation) OldStatus(ctx context.Context) (v steprun.Status, err error)

OldStatus returns the old status value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldUpdatedAt

func (m *StepRunMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) OldUrlToken

func (m *StepRunMutation) OldUrlToken(ctx context.Context) (v string, err error)

OldUrlToken returns the old urlToken value of the StepRun. If the StepRun object wasn'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 (*StepRunMutation) Op

func (m *StepRunMutation) Op() Op

Op returns the operation name.

func (*StepRunMutation) ParticipantsCleared

func (m *StepRunMutation) ParticipantsCleared() bool

ParticipantsCleared returns if the edge participants was cleared.

func (*StepRunMutation) ParticipantsCount

func (m *StepRunMutation) ParticipantsCount() (r int, exists bool)

ParticipantsCount returns the participantsCount value in the mutation.

func (*StepRunMutation) ParticipantsIDs

func (m *StepRunMutation) ParticipantsIDs() (ids []string)

ParticipantsIDs returns the participants ids in the mutation.

func (*StepRunMutation) ParticipationsCleared

func (m *StepRunMutation) ParticipationsCleared() bool

ParticipationsCleared returns if the edge participations was cleared.

func (*StepRunMutation) ParticipationsIDs

func (m *StepRunMutation) ParticipationsIDs() (ids []string)

ParticipationsIDs returns the participations ids in the mutation.

func (*StepRunMutation) RemoveCreatedParticipantIDs

func (m *StepRunMutation) RemoveCreatedParticipantIDs(ids ...string)

RemoveCreatedParticipantIDs removes the createdParticipants edge to Participant by ids.

func (*StepRunMutation) RemoveParticipantIDs

func (m *StepRunMutation) RemoveParticipantIDs(ids ...string)

RemoveParticipantIDs removes the participants edge to Participant by ids.

func (*StepRunMutation) RemoveParticipationIDs

func (m *StepRunMutation) RemoveParticipationIDs(ids ...string)

RemoveParticipationIDs removes the participations edge to Participation by ids.

func (*StepRunMutation) RemovedCreatedParticipantsIDs

func (m *StepRunMutation) RemovedCreatedParticipantsIDs() (ids []string)

RemovedCreatedParticipants returns the removed ids of createdParticipants.

func (*StepRunMutation) RemovedEdges

func (m *StepRunMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*StepRunMutation) RemovedIDs

func (m *StepRunMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*StepRunMutation) RemovedParticipantsIDs

func (m *StepRunMutation) RemovedParticipantsIDs() (ids []string)

RemovedParticipants returns the removed ids of participants.

func (*StepRunMutation) RemovedParticipationsIDs

func (m *StepRunMutation) RemovedParticipationsIDs() (ids []string)

RemovedParticipations returns the removed ids of participations.

func (*StepRunMutation) ResetCreatedAt

func (m *StepRunMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*StepRunMutation) ResetCreatedParticipants

func (m *StepRunMutation) ResetCreatedParticipants()

ResetCreatedParticipants reset all changes of the "createdParticipants" edge.

func (*StepRunMutation) ResetEdge

func (m *StepRunMutation) 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 (*StepRunMutation) ResetEndedAt

func (m *StepRunMutation) ResetEndedAt()

ResetEndedAt reset all changes of the "endedAt" field.

func (*StepRunMutation) ResetField

func (m *StepRunMutation) 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 (*StepRunMutation) ResetHitID

func (m *StepRunMutation) ResetHitID()

ResetHitID reset all changes of the "hitID" field.

func (*StepRunMutation) ResetIndex

func (m *StepRunMutation) ResetIndex()

ResetIndex reset all changes of the "index" field.

func (*StepRunMutation) ResetParticipants

func (m *StepRunMutation) ResetParticipants()

ResetParticipants reset all changes of the "participants" edge.

func (*StepRunMutation) ResetParticipantsCount

func (m *StepRunMutation) ResetParticipantsCount()

ResetParticipantsCount reset all changes of the "participantsCount" field.

func (*StepRunMutation) ResetParticipations

func (m *StepRunMutation) ResetParticipations()

ResetParticipations reset all changes of the "participations" edge.

func (*StepRunMutation) ResetRun

func (m *StepRunMutation) ResetRun()

ResetRun reset all changes of the "run" edge.

func (*StepRunMutation) ResetStartedAt

func (m *StepRunMutation) ResetStartedAt()

ResetStartedAt reset all changes of the "startedAt" field.

func (*StepRunMutation) ResetStatus

func (m *StepRunMutation) ResetStatus()

ResetStatus reset all changes of the "status" field.

func (*StepRunMutation) ResetStep

func (m *StepRunMutation) ResetStep()

ResetStep reset all changes of the "step" edge.

func (*StepRunMutation) ResetUpdatedAt

func (m *StepRunMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*StepRunMutation) ResetUrlToken

func (m *StepRunMutation) ResetUrlToken()

ResetUrlToken reset all changes of the "urlToken" field.

func (*StepRunMutation) RunCleared

func (m *StepRunMutation) RunCleared() bool

RunCleared returns if the edge run was cleared.

func (*StepRunMutation) RunID

func (m *StepRunMutation) RunID() (id string, exists bool)

RunID returns the run id in the mutation.

func (*StepRunMutation) RunIDs

func (m *StepRunMutation) RunIDs() (ids []string)

RunIDs returns the run ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use RunID instead. It exists only for internal usage by the builders.

func (*StepRunMutation) SetCreatedAt

func (m *StepRunMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*StepRunMutation) SetEndedAt

func (m *StepRunMutation) SetEndedAt(t time.Time)

SetEndedAt sets the endedAt field.

func (*StepRunMutation) SetField

func (m *StepRunMutation) 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 (*StepRunMutation) SetHitID

func (m *StepRunMutation) SetHitID(s string)

SetHitID sets the hitID field.

func (*StepRunMutation) SetID

func (m *StepRunMutation) SetID(id string)

SetID sets the value of the id field. Note that, this operation is accepted only on StepRun creation.

func (*StepRunMutation) SetIndex

func (m *StepRunMutation) SetIndex(i int)

SetIndex sets the index field.

func (*StepRunMutation) SetParticipantsCount

func (m *StepRunMutation) SetParticipantsCount(i int)

SetParticipantsCount sets the participantsCount field.

func (*StepRunMutation) SetRunID

func (m *StepRunMutation) SetRunID(id string)

SetRunID sets the run edge to Run by id.

func (*StepRunMutation) SetStartedAt

func (m *StepRunMutation) SetStartedAt(t time.Time)

SetStartedAt sets the startedAt field.

func (*StepRunMutation) SetStatus

func (m *StepRunMutation) SetStatus(s steprun.Status)

SetStatus sets the status field.

func (*StepRunMutation) SetStepID

func (m *StepRunMutation) SetStepID(id string)

SetStepID sets the step edge to Step by id.

func (*StepRunMutation) SetUpdatedAt

func (m *StepRunMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*StepRunMutation) SetUrlToken

func (m *StepRunMutation) SetUrlToken(s string)

SetUrlToken sets the urlToken field.

func (*StepRunMutation) StartedAt

func (m *StepRunMutation) StartedAt() (r time.Time, exists bool)

StartedAt returns the startedAt value in the mutation.

func (*StepRunMutation) StartedAtCleared

func (m *StepRunMutation) StartedAtCleared() bool

StartedAtCleared returns if the field startedAt was cleared in this mutation.

func (*StepRunMutation) Status

func (m *StepRunMutation) Status() (r steprun.Status, exists bool)

Status returns the status value in the mutation.

func (*StepRunMutation) StepCleared

func (m *StepRunMutation) StepCleared() bool

StepCleared returns if the edge step was cleared.

func (*StepRunMutation) StepID

func (m *StepRunMutation) StepID() (id string, exists bool)

StepID returns the step id in the mutation.

func (*StepRunMutation) StepIDs

func (m *StepRunMutation) StepIDs() (ids []string)

StepIDs returns the step ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use StepID instead. It exists only for internal usage by the builders.

func (StepRunMutation) Tx

func (m StepRunMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*StepRunMutation) Type

func (m *StepRunMutation) Type() string

Type returns the node type of this mutation (StepRun).

func (*StepRunMutation) UpdatedAt

func (m *StepRunMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

func (*StepRunMutation) UrlToken

func (m *StepRunMutation) UrlToken() (r string, exists bool)

UrlToken returns the urlToken value in the mutation.

type StepRunQuery

type StepRunQuery struct {
	// contains filtered or unexported fields
}

StepRunQuery is the builder for querying StepRun entities.

func (*StepRunQuery) All

func (srq *StepRunQuery) All(ctx context.Context) ([]*StepRun, error)

All executes the query and returns a list of StepRuns.

func (*StepRunQuery) AllX

func (srq *StepRunQuery) AllX(ctx context.Context) []*StepRun

AllX is like All, but panics if an error occurs.

func (*StepRunQuery) Clone

func (srq *StepRunQuery) Clone() *StepRunQuery

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 (*StepRunQuery) Count

func (srq *StepRunQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StepRunQuery) CountX

func (srq *StepRunQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*StepRunQuery) Exist

func (srq *StepRunQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*StepRunQuery) ExistX

func (srq *StepRunQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*StepRunQuery) First

func (srq *StepRunQuery) First(ctx context.Context) (*StepRun, error)

First returns the first StepRun entity in the query. Returns *NotFoundError when no steprun was found.

func (*StepRunQuery) FirstID

func (srq *StepRunQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first StepRun id in the query. Returns *NotFoundError when no id was found.

func (*StepRunQuery) FirstX

func (srq *StepRunQuery) FirstX(ctx context.Context) *StepRun

FirstX is like First, but panics if an error occurs.

func (*StepRunQuery) FirstXID

func (srq *StepRunQuery) FirstXID(ctx context.Context) string

FirstXID is like FirstID, but panics if an error occurs.

func (*StepRunQuery) GroupBy

func (srq *StepRunQuery) GroupBy(field string, fields ...string) *StepRunGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.StepRun.Query().
	GroupBy(steprun.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StepRunQuery) IDs

func (srq *StepRunQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of StepRun ids.

func (*StepRunQuery) IDsX

func (srq *StepRunQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*StepRunQuery) Limit

func (srq *StepRunQuery) Limit(limit int) *StepRunQuery

Limit adds a limit step to the query.

func (*StepRunQuery) Offset

func (srq *StepRunQuery) Offset(offset int) *StepRunQuery

Offset adds an offset step to the query.

func (*StepRunQuery) Only

func (srq *StepRunQuery) Only(ctx context.Context) (*StepRun, error)

Only returns the only StepRun entity in the query, returns an error if not exactly one entity was returned.

func (*StepRunQuery) OnlyID

func (srq *StepRunQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID returns the only StepRun id in the query, returns an error if not exactly one id was returned.

func (*StepRunQuery) OnlyIDX

func (srq *StepRunQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*StepRunQuery) OnlyX

func (srq *StepRunQuery) OnlyX(ctx context.Context) *StepRun

OnlyX is like Only, but panics if an error occurs.

func (*StepRunQuery) Order

func (srq *StepRunQuery) Order(o ...OrderFunc) *StepRunQuery

Order adds an order step to the query.

func (*StepRunQuery) QueryCreatedParticipants

func (srq *StepRunQuery) QueryCreatedParticipants() *ParticipantQuery

QueryCreatedParticipants chains the current query on the createdParticipants edge.

func (*StepRunQuery) QueryParticipants

func (srq *StepRunQuery) QueryParticipants() *ParticipantQuery

QueryParticipants chains the current query on the participants edge.

func (*StepRunQuery) QueryParticipations

func (srq *StepRunQuery) QueryParticipations() *ParticipationQuery

QueryParticipations chains the current query on the participations edge.

func (*StepRunQuery) QueryRun

func (srq *StepRunQuery) QueryRun() *RunQuery

QueryRun chains the current query on the run edge.

func (*StepRunQuery) QueryStep

func (srq *StepRunQuery) QueryStep() *StepQuery

QueryStep chains the current query on the step edge.

func (*StepRunQuery) Select

func (srq *StepRunQuery) Select(field string, fields ...string) *StepRunSelect

Select one or more fields from the given query.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.StepRun.Query().
	Select(steprun.FieldCreatedAt).
	Scan(ctx, &v)

func (*StepRunQuery) Where

func (srq *StepRunQuery) Where(ps ...predicate.StepRun) *StepRunQuery

Where adds a new predicate for the builder.

func (*StepRunQuery) WithCreatedParticipants

func (srq *StepRunQuery) WithCreatedParticipants(opts ...func(*ParticipantQuery)) *StepRunQuery
WithCreatedParticipants tells the query-builder to eager-loads the nodes that are connected to

the "createdParticipants" edge. The optional arguments used to configure the query builder of the edge.

func (*StepRunQuery) WithParticipants

func (srq *StepRunQuery) WithParticipants(opts ...func(*ParticipantQuery)) *StepRunQuery
WithParticipants tells the query-builder to eager-loads the nodes that are connected to

the "participants" edge. The optional arguments used to configure the query builder of the edge.

func (*StepRunQuery) WithParticipations

func (srq *StepRunQuery) WithParticipations(opts ...func(*ParticipationQuery)) *StepRunQuery
WithParticipations tells the query-builder to eager-loads the nodes that are connected to

the "participations" edge. The optional arguments used to configure the query builder of the edge.

func (*StepRunQuery) WithRun

func (srq *StepRunQuery) WithRun(opts ...func(*RunQuery)) *StepRunQuery
WithRun tells the query-builder to eager-loads the nodes that are connected to

the "run" edge. The optional arguments used to configure the query builder of the edge.

func (*StepRunQuery) WithStep

func (srq *StepRunQuery) WithStep(opts ...func(*StepQuery)) *StepRunQuery
WithStep tells the query-builder to eager-loads the nodes that are connected to

the "step" edge. The optional arguments used to configure the query builder of the edge.

type StepRunSelect

type StepRunSelect struct {
	// contains filtered or unexported fields
}

StepRunSelect is the builder for select fields of StepRun entities.

func (*StepRunSelect) Bool

func (srs *StepRunSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from selector. It is only allowed when selecting one field.

func (*StepRunSelect) BoolX

func (srs *StepRunSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StepRunSelect) Bools

func (srs *StepRunSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*StepRunSelect) BoolsX

func (srs *StepRunSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StepRunSelect) Float64

func (srs *StepRunSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from selector. It is only allowed when selecting one field.

func (*StepRunSelect) Float64X

func (srs *StepRunSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StepRunSelect) Float64s

func (srs *StepRunSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*StepRunSelect) Float64sX

func (srs *StepRunSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StepRunSelect) Int

func (srs *StepRunSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from selector. It is only allowed when selecting one field.

func (*StepRunSelect) IntX

func (srs *StepRunSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StepRunSelect) Ints

func (srs *StepRunSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*StepRunSelect) IntsX

func (srs *StepRunSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StepRunSelect) Scan

func (srs *StepRunSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*StepRunSelect) ScanX

func (srs *StepRunSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*StepRunSelect) String

func (srs *StepRunSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from selector. It is only allowed when selecting one field.

func (*StepRunSelect) StringX

func (srs *StepRunSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StepRunSelect) Strings

func (srs *StepRunSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*StepRunSelect) StringsX

func (srs *StepRunSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StepRunUpdate

type StepRunUpdate struct {
	// contains filtered or unexported fields
}

StepRunUpdate is the builder for updating StepRun entities.

func (*StepRunUpdate) AddCreatedParticipantIDs

func (sru *StepRunUpdate) AddCreatedParticipantIDs(ids ...string) *StepRunUpdate

AddCreatedParticipantIDs adds the createdParticipants edge to Participant by ids.

func (*StepRunUpdate) AddCreatedParticipants

func (sru *StepRunUpdate) AddCreatedParticipants(p ...*Participant) *StepRunUpdate

AddCreatedParticipants adds the createdParticipants edges to Participant.

func (*StepRunUpdate) AddIndex

func (sru *StepRunUpdate) AddIndex(i int) *StepRunUpdate

AddIndex adds i to index.

func (*StepRunUpdate) AddParticipantIDs

func (sru *StepRunUpdate) AddParticipantIDs(ids ...string) *StepRunUpdate

AddParticipantIDs adds the participants edge to Participant by ids.

func (*StepRunUpdate) AddParticipants

func (sru *StepRunUpdate) AddParticipants(p ...*Participant) *StepRunUpdate

AddParticipants adds the participants edges to Participant.

func (*StepRunUpdate) AddParticipantsCount

func (sru *StepRunUpdate) AddParticipantsCount(i int) *StepRunUpdate

AddParticipantsCount adds i to participantsCount.

func (*StepRunUpdate) AddParticipationIDs

func (sru *StepRunUpdate) AddParticipationIDs(ids ...string) *StepRunUpdate

AddParticipationIDs adds the participations edge to Participation by ids.

func (*StepRunUpdate) AddParticipations

func (sru *StepRunUpdate) AddParticipations(p ...*Participation) *StepRunUpdate

AddParticipations adds the participations edges to Participation.

func (*StepRunUpdate) ClearCreatedParticipants

func (sru *StepRunUpdate) ClearCreatedParticipants() *StepRunUpdate

ClearCreatedParticipants clears all "createdParticipants" edges to type Participant.

func (*StepRunUpdate) ClearEndedAt

func (sru *StepRunUpdate) ClearEndedAt() *StepRunUpdate

ClearEndedAt clears the value of endedAt.

func (*StepRunUpdate) ClearHitID

func (sru *StepRunUpdate) ClearHitID() *StepRunUpdate

ClearHitID clears the value of hitID.

func (*StepRunUpdate) ClearParticipants

func (sru *StepRunUpdate) ClearParticipants() *StepRunUpdate

ClearParticipants clears all "participants" edges to type Participant.

func (*StepRunUpdate) ClearParticipations

func (sru *StepRunUpdate) ClearParticipations() *StepRunUpdate

ClearParticipations clears all "participations" edges to type Participation.

func (*StepRunUpdate) ClearRun

func (sru *StepRunUpdate) ClearRun() *StepRunUpdate

ClearRun clears the "run" edge to type Run.

func (*StepRunUpdate) ClearStartedAt

func (sru *StepRunUpdate) ClearStartedAt() *StepRunUpdate

ClearStartedAt clears the value of startedAt.

func (*StepRunUpdate) ClearStep

func (sru *StepRunUpdate) ClearStep() *StepRunUpdate

ClearStep clears the "step" edge to type Step.

func (*StepRunUpdate) Exec

func (sru *StepRunUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*StepRunUpdate) ExecX

func (sru *StepRunUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StepRunUpdate) Mutation

func (sru *StepRunUpdate) Mutation() *StepRunMutation

Mutation returns the StepRunMutation object of the builder.

func (*StepRunUpdate) RemoveCreatedParticipantIDs

func (sru *StepRunUpdate) RemoveCreatedParticipantIDs(ids ...string) *StepRunUpdate

RemoveCreatedParticipantIDs removes the createdParticipants edge to Participant by ids.

func (*StepRunUpdate) RemoveCreatedParticipants

func (sru *StepRunUpdate) RemoveCreatedParticipants(p ...*Participant) *StepRunUpdate

RemoveCreatedParticipants removes createdParticipants edges to Participant.

func (*StepRunUpdate) RemoveParticipantIDs

func (sru *StepRunUpdate) RemoveParticipantIDs(ids ...string) *StepRunUpdate

RemoveParticipantIDs removes the participants edge to Participant by ids.

func (*StepRunUpdate) RemoveParticipants

func (sru *StepRunUpdate) RemoveParticipants(p ...*Participant) *StepRunUpdate

RemoveParticipants removes participants edges to Participant.

func (*StepRunUpdate) RemoveParticipationIDs

func (sru *StepRunUpdate) RemoveParticipationIDs(ids ...string) *StepRunUpdate

RemoveParticipationIDs removes the participations edge to Participation by ids.

func (*StepRunUpdate) RemoveParticipations

func (sru *StepRunUpdate) RemoveParticipations(p ...*Participation) *StepRunUpdate

RemoveParticipations removes participations edges to Participation.

func (*StepRunUpdate) Save

func (sru *StepRunUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*StepRunUpdate) SaveX

func (sru *StepRunUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*StepRunUpdate) SetEndedAt

func (sru *StepRunUpdate) SetEndedAt(t time.Time) *StepRunUpdate

SetEndedAt sets the endedAt field.

func (*StepRunUpdate) SetHitID

func (sru *StepRunUpdate) SetHitID(s string) *StepRunUpdate

SetHitID sets the hitID field.

func (*StepRunUpdate) SetIndex

func (sru *StepRunUpdate) SetIndex(i int) *StepRunUpdate

SetIndex sets the index field.

func (*StepRunUpdate) SetNillableEndedAt

func (sru *StepRunUpdate) SetNillableEndedAt(t *time.Time) *StepRunUpdate

SetNillableEndedAt sets the endedAt field if the given value is not nil.

func (*StepRunUpdate) SetNillableHitID

func (sru *StepRunUpdate) SetNillableHitID(s *string) *StepRunUpdate

SetNillableHitID sets the hitID field if the given value is not nil.

func (*StepRunUpdate) SetNillableRunID

func (sru *StepRunUpdate) SetNillableRunID(id *string) *StepRunUpdate

SetNillableRunID sets the run edge to Run by id if the given value is not nil.

func (*StepRunUpdate) SetNillableStartedAt

func (sru *StepRunUpdate) SetNillableStartedAt(t *time.Time) *StepRunUpdate

SetNillableStartedAt sets the startedAt field if the given value is not nil.

func (*StepRunUpdate) SetParticipantsCount

func (sru *StepRunUpdate) SetParticipantsCount(i int) *StepRunUpdate

SetParticipantsCount sets the participantsCount field.

func (*StepRunUpdate) SetRun

func (sru *StepRunUpdate) SetRun(r *Run) *StepRunUpdate

SetRun sets the run edge to Run.

func (*StepRunUpdate) SetRunID

func (sru *StepRunUpdate) SetRunID(id string) *StepRunUpdate

SetRunID sets the run edge to Run by id.

func (*StepRunUpdate) SetStartedAt

func (sru *StepRunUpdate) SetStartedAt(t time.Time) *StepRunUpdate

SetStartedAt sets the startedAt field.

func (*StepRunUpdate) SetStatus

func (sru *StepRunUpdate) SetStatus(s steprun.Status) *StepRunUpdate

SetStatus sets the status field.

func (*StepRunUpdate) SetStep

func (sru *StepRunUpdate) SetStep(s *Step) *StepRunUpdate

SetStep sets the step edge to Step.

func (*StepRunUpdate) SetStepID

func (sru *StepRunUpdate) SetStepID(id string) *StepRunUpdate

SetStepID sets the step edge to Step by id.

func (*StepRunUpdate) SetUpdatedAt

func (sru *StepRunUpdate) SetUpdatedAt(t time.Time) *StepRunUpdate

SetUpdatedAt sets the updated_at field.

func (*StepRunUpdate) SetUrlToken

func (sru *StepRunUpdate) SetUrlToken(s string) *StepRunUpdate

SetUrlToken sets the urlToken field.

func (*StepRunUpdate) Where

func (sru *StepRunUpdate) Where(ps ...predicate.StepRun) *StepRunUpdate

Where adds a new predicate for the builder.

type StepRunUpdateOne

type StepRunUpdateOne struct {
	// contains filtered or unexported fields
}

StepRunUpdateOne is the builder for updating a single StepRun entity.

func (*StepRunUpdateOne) AddCreatedParticipantIDs

func (sruo *StepRunUpdateOne) AddCreatedParticipantIDs(ids ...string) *StepRunUpdateOne

AddCreatedParticipantIDs adds the createdParticipants edge to Participant by ids.

func (*StepRunUpdateOne) AddCreatedParticipants

func (sruo *StepRunUpdateOne) AddCreatedParticipants(p ...*Participant) *StepRunUpdateOne

AddCreatedParticipants adds the createdParticipants edges to Participant.

func (*StepRunUpdateOne) AddIndex

func (sruo *StepRunUpdateOne) AddIndex(i int) *StepRunUpdateOne

AddIndex adds i to index.

func (*StepRunUpdateOne) AddParticipantIDs

func (sruo *StepRunUpdateOne) AddParticipantIDs(ids ...string) *StepRunUpdateOne

AddParticipantIDs adds the participants edge to Participant by ids.

func (*StepRunUpdateOne) AddParticipants

func (sruo *StepRunUpdateOne) AddParticipants(p ...*Participant) *StepRunUpdateOne

AddParticipants adds the participants edges to Participant.

func (*StepRunUpdateOne) AddParticipantsCount

func (sruo *StepRunUpdateOne) AddParticipantsCount(i int) *StepRunUpdateOne

AddParticipantsCount adds i to participantsCount.

func (*StepRunUpdateOne) AddParticipationIDs

func (sruo *StepRunUpdateOne) AddParticipationIDs(ids ...string) *StepRunUpdateOne

AddParticipationIDs adds the participations edge to Participation by ids.

func (*StepRunUpdateOne) AddParticipations

func (sruo *StepRunUpdateOne) AddParticipations(p ...*Participation) *StepRunUpdateOne

AddParticipations adds the participations edges to Participation.

func (*StepRunUpdateOne) ClearCreatedParticipants

func (sruo *StepRunUpdateOne) ClearCreatedParticipants() *StepRunUpdateOne

ClearCreatedParticipants clears all "createdParticipants" edges to type Participant.

func (*StepRunUpdateOne) ClearEndedAt

func (sruo *StepRunUpdateOne) ClearEndedAt() *StepRunUpdateOne

ClearEndedAt clears the value of endedAt.

func (*StepRunUpdateOne) ClearHitID

func (sruo *StepRunUpdateOne) ClearHitID() *StepRunUpdateOne

ClearHitID clears the value of hitID.

func (*StepRunUpdateOne) ClearParticipants

func (sruo *StepRunUpdateOne) ClearParticipants() *StepRunUpdateOne

ClearParticipants clears all "participants" edges to type Participant.

func (*StepRunUpdateOne) ClearParticipations

func (sruo *StepRunUpdateOne) ClearParticipations() *StepRunUpdateOne

ClearParticipations clears all "participations" edges to type Participation.

func (*StepRunUpdateOne) ClearRun

func (sruo *StepRunUpdateOne) ClearRun() *StepRunUpdateOne

ClearRun clears the "run" edge to type Run.

func (*StepRunUpdateOne) ClearStartedAt

func (sruo *StepRunUpdateOne) ClearStartedAt() *StepRunUpdateOne

ClearStartedAt clears the value of startedAt.

func (*StepRunUpdateOne) ClearStep

func (sruo *StepRunUpdateOne) ClearStep() *StepRunUpdateOne

ClearStep clears the "step" edge to type Step.

func (*StepRunUpdateOne) Exec

func (sruo *StepRunUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*StepRunUpdateOne) ExecX

func (sruo *StepRunUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StepRunUpdateOne) Mutation

func (sruo *StepRunUpdateOne) Mutation() *StepRunMutation

Mutation returns the StepRunMutation object of the builder.

func (*StepRunUpdateOne) RemoveCreatedParticipantIDs

func (sruo *StepRunUpdateOne) RemoveCreatedParticipantIDs(ids ...string) *StepRunUpdateOne

RemoveCreatedParticipantIDs removes the createdParticipants edge to Participant by ids.

func (*StepRunUpdateOne) RemoveCreatedParticipants

func (sruo *StepRunUpdateOne) RemoveCreatedParticipants(p ...*Participant) *StepRunUpdateOne

RemoveCreatedParticipants removes createdParticipants edges to Participant.

func (*StepRunUpdateOne) RemoveParticipantIDs

func (sruo *StepRunUpdateOne) RemoveParticipantIDs(ids ...string) *StepRunUpdateOne

RemoveParticipantIDs removes the participants edge to Participant by ids.

func (*StepRunUpdateOne) RemoveParticipants

func (sruo *StepRunUpdateOne) RemoveParticipants(p ...*Participant) *StepRunUpdateOne

RemoveParticipants removes participants edges to Participant.

func (*StepRunUpdateOne) RemoveParticipationIDs

func (sruo *StepRunUpdateOne) RemoveParticipationIDs(ids ...string) *StepRunUpdateOne

RemoveParticipationIDs removes the participations edge to Participation by ids.

func (*StepRunUpdateOne) RemoveParticipations

func (sruo *StepRunUpdateOne) RemoveParticipations(p ...*Participation) *StepRunUpdateOne

RemoveParticipations removes participations edges to Participation.

func (*StepRunUpdateOne) Save

func (sruo *StepRunUpdateOne) Save(ctx context.Context) (*StepRun, error)

Save executes the query and returns the updated entity.

func (*StepRunUpdateOne) SaveX

func (sruo *StepRunUpdateOne) SaveX(ctx context.Context) *StepRun

SaveX is like Save, but panics if an error occurs.

func (*StepRunUpdateOne) SetEndedAt

func (sruo *StepRunUpdateOne) SetEndedAt(t time.Time) *StepRunUpdateOne

SetEndedAt sets the endedAt field.

func (*StepRunUpdateOne) SetHitID

func (sruo *StepRunUpdateOne) SetHitID(s string) *StepRunUpdateOne

SetHitID sets the hitID field.

func (*StepRunUpdateOne) SetIndex

func (sruo *StepRunUpdateOne) SetIndex(i int) *StepRunUpdateOne

SetIndex sets the index field.

func (*StepRunUpdateOne) SetNillableEndedAt

func (sruo *StepRunUpdateOne) SetNillableEndedAt(t *time.Time) *StepRunUpdateOne

SetNillableEndedAt sets the endedAt field if the given value is not nil.

func (*StepRunUpdateOne) SetNillableHitID

func (sruo *StepRunUpdateOne) SetNillableHitID(s *string) *StepRunUpdateOne

SetNillableHitID sets the hitID field if the given value is not nil.

func (*StepRunUpdateOne) SetNillableRunID

func (sruo *StepRunUpdateOne) SetNillableRunID(id *string) *StepRunUpdateOne

SetNillableRunID sets the run edge to Run by id if the given value is not nil.

func (*StepRunUpdateOne) SetNillableStartedAt

func (sruo *StepRunUpdateOne) SetNillableStartedAt(t *time.Time) *StepRunUpdateOne

SetNillableStartedAt sets the startedAt field if the given value is not nil.

func (*StepRunUpdateOne) SetParticipantsCount

func (sruo *StepRunUpdateOne) SetParticipantsCount(i int) *StepRunUpdateOne

SetParticipantsCount sets the participantsCount field.

func (*StepRunUpdateOne) SetRun

func (sruo *StepRunUpdateOne) SetRun(r *Run) *StepRunUpdateOne

SetRun sets the run edge to Run.

func (*StepRunUpdateOne) SetRunID

func (sruo *StepRunUpdateOne) SetRunID(id string) *StepRunUpdateOne

SetRunID sets the run edge to Run by id.

func (*StepRunUpdateOne) SetStartedAt

func (sruo *StepRunUpdateOne) SetStartedAt(t time.Time) *StepRunUpdateOne

SetStartedAt sets the startedAt field.

func (*StepRunUpdateOne) SetStatus

func (sruo *StepRunUpdateOne) SetStatus(s steprun.Status) *StepRunUpdateOne

SetStatus sets the status field.

func (*StepRunUpdateOne) SetStep

func (sruo *StepRunUpdateOne) SetStep(s *Step) *StepRunUpdateOne

SetStep sets the step edge to Step.

func (*StepRunUpdateOne) SetStepID

func (sruo *StepRunUpdateOne) SetStepID(id string) *StepRunUpdateOne

SetStepID sets the step edge to Step by id.

func (*StepRunUpdateOne) SetUpdatedAt

func (sruo *StepRunUpdateOne) SetUpdatedAt(t time.Time) *StepRunUpdateOne

SetUpdatedAt sets the updated_at field.

func (*StepRunUpdateOne) SetUrlToken

func (sruo *StepRunUpdateOne) SetUrlToken(s string) *StepRunUpdateOne

SetUrlToken sets the urlToken field.

type StepRuns

type StepRuns []*StepRun

StepRuns is a parsable slice of StepRun.

type StepSelect

type StepSelect struct {
	// contains filtered or unexported fields
}

StepSelect is the builder for select fields of Step entities.

func (*StepSelect) Bool

func (ss *StepSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from selector. It is only allowed when selecting one field.

func (*StepSelect) BoolX

func (ss *StepSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StepSelect) Bools

func (ss *StepSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*StepSelect) BoolsX

func (ss *StepSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StepSelect) Float64

func (ss *StepSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from selector. It is only allowed when selecting one field.

func (*StepSelect) Float64X

func (ss *StepSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StepSelect) Float64s

func (ss *StepSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*StepSelect) Float64sX

func (ss *StepSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StepSelect) Int

func (ss *StepSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from selector. It is only allowed when selecting one field.

func (*StepSelect) IntX

func (ss *StepSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StepSelect) Ints

func (ss *StepSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*StepSelect) IntsX

func (ss *StepSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StepSelect) Scan

func (ss *StepSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*StepSelect) ScanX

func (ss *StepSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*StepSelect) String

func (ss *StepSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from selector. It is only allowed when selecting one field.

func (*StepSelect) StringX

func (ss *StepSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StepSelect) Strings

func (ss *StepSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*StepSelect) StringsX

func (ss *StepSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StepUpdate

type StepUpdate struct {
	// contains filtered or unexported fields
}

StepUpdate is the builder for updating Step entities.

func (*StepUpdate) AddDuration

func (su *StepUpdate) AddDuration(i int) *StepUpdate

AddDuration adds i to duration.

func (*StepUpdate) AddIndex

func (su *StepUpdate) AddIndex(i int) *StepUpdate

AddIndex adds i to index.

func (*StepUpdate) ClearFilterArgs

func (su *StepUpdate) ClearFilterArgs() *StepUpdate

ClearFilterArgs clears the value of filterArgs.

func (*StepUpdate) ClearHitArgs

func (su *StepUpdate) ClearHitArgs() *StepUpdate

ClearHitArgs clears the value of hitArgs.

func (*StepUpdate) ClearMsgArgs

func (su *StepUpdate) ClearMsgArgs() *StepUpdate

ClearMsgArgs clears the value of msgArgs.

func (*StepUpdate) ClearStepRun

func (su *StepUpdate) ClearStepRun() *StepUpdate

ClearStepRun clears the "stepRun" edge to type StepRun.

func (*StepUpdate) ClearTemplate

func (su *StepUpdate) ClearTemplate() *StepUpdate

ClearTemplate clears the "template" edge to type Template.

func (*StepUpdate) Exec

func (su *StepUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*StepUpdate) ExecX

func (su *StepUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StepUpdate) Mutation

func (su *StepUpdate) Mutation() *StepMutation

Mutation returns the StepMutation object of the builder.

func (*StepUpdate) Save

func (su *StepUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*StepUpdate) SaveX

func (su *StepUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*StepUpdate) SetDuration

func (su *StepUpdate) SetDuration(i int) *StepUpdate

SetDuration sets the duration field.

func (*StepUpdate) SetFilterArgs

func (su *StepUpdate) SetFilterArgs(msa *model.FilterStepArgs) *StepUpdate

SetFilterArgs sets the filterArgs field.

func (*StepUpdate) SetHitArgs

func (su *StepUpdate) SetHitArgs(msa *model.HITStepArgs) *StepUpdate

SetHitArgs sets the hitArgs field.

func (*StepUpdate) SetIndex

func (su *StepUpdate) SetIndex(i int) *StepUpdate

SetIndex sets the index field.

func (*StepUpdate) SetMsgArgs

func (su *StepUpdate) SetMsgArgs(msa *model.MessageStepArgs) *StepUpdate

SetMsgArgs sets the msgArgs field.

func (*StepUpdate) SetNillableStepRunID

func (su *StepUpdate) SetNillableStepRunID(id *string) *StepUpdate

SetNillableStepRunID sets the stepRun edge to StepRun by id if the given value is not nil.

func (*StepUpdate) SetNillableTemplateID

func (su *StepUpdate) SetNillableTemplateID(id *string) *StepUpdate

SetNillableTemplateID sets the template edge to Template by id if the given value is not nil.

func (*StepUpdate) SetStepRun

func (su *StepUpdate) SetStepRun(s *StepRun) *StepUpdate

SetStepRun sets the stepRun edge to StepRun.

func (*StepUpdate) SetStepRunID

func (su *StepUpdate) SetStepRunID(id string) *StepUpdate

SetStepRunID sets the stepRun edge to StepRun by id.

func (*StepUpdate) SetTemplate

func (su *StepUpdate) SetTemplate(t *Template) *StepUpdate

SetTemplate sets the template edge to Template.

func (*StepUpdate) SetTemplateID

func (su *StepUpdate) SetTemplateID(id string) *StepUpdate

SetTemplateID sets the template edge to Template by id.

func (*StepUpdate) SetType

func (su *StepUpdate) SetType(s step.Type) *StepUpdate

SetType sets the type field.

func (*StepUpdate) SetUpdatedAt

func (su *StepUpdate) SetUpdatedAt(t time.Time) *StepUpdate

SetUpdatedAt sets the updated_at field.

func (*StepUpdate) Where

func (su *StepUpdate) Where(ps ...predicate.Step) *StepUpdate

Where adds a new predicate for the builder.

type StepUpdateOne

type StepUpdateOne struct {
	// contains filtered or unexported fields
}

StepUpdateOne is the builder for updating a single Step entity.

func (*StepUpdateOne) AddDuration

func (suo *StepUpdateOne) AddDuration(i int) *StepUpdateOne

AddDuration adds i to duration.

func (*StepUpdateOne) AddIndex

func (suo *StepUpdateOne) AddIndex(i int) *StepUpdateOne

AddIndex adds i to index.

func (*StepUpdateOne) ClearFilterArgs

func (suo *StepUpdateOne) ClearFilterArgs() *StepUpdateOne

ClearFilterArgs clears the value of filterArgs.

func (*StepUpdateOne) ClearHitArgs

func (suo *StepUpdateOne) ClearHitArgs() *StepUpdateOne

ClearHitArgs clears the value of hitArgs.

func (*StepUpdateOne) ClearMsgArgs

func (suo *StepUpdateOne) ClearMsgArgs() *StepUpdateOne

ClearMsgArgs clears the value of msgArgs.

func (*StepUpdateOne) ClearStepRun

func (suo *StepUpdateOne) ClearStepRun() *StepUpdateOne

ClearStepRun clears the "stepRun" edge to type StepRun.

func (*StepUpdateOne) ClearTemplate

func (suo *StepUpdateOne) ClearTemplate() *StepUpdateOne

ClearTemplate clears the "template" edge to type Template.

func (*StepUpdateOne) Exec

func (suo *StepUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*StepUpdateOne) ExecX

func (suo *StepUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StepUpdateOne) Mutation

func (suo *StepUpdateOne) Mutation() *StepMutation

Mutation returns the StepMutation object of the builder.

func (*StepUpdateOne) Save

func (suo *StepUpdateOne) Save(ctx context.Context) (*Step, error)

Save executes the query and returns the updated entity.

func (*StepUpdateOne) SaveX

func (suo *StepUpdateOne) SaveX(ctx context.Context) *Step

SaveX is like Save, but panics if an error occurs.

func (*StepUpdateOne) SetDuration

func (suo *StepUpdateOne) SetDuration(i int) *StepUpdateOne

SetDuration sets the duration field.

func (*StepUpdateOne) SetFilterArgs

func (suo *StepUpdateOne) SetFilterArgs(msa *model.FilterStepArgs) *StepUpdateOne

SetFilterArgs sets the filterArgs field.

func (*StepUpdateOne) SetHitArgs

func (suo *StepUpdateOne) SetHitArgs(msa *model.HITStepArgs) *StepUpdateOne

SetHitArgs sets the hitArgs field.

func (*StepUpdateOne) SetIndex

func (suo *StepUpdateOne) SetIndex(i int) *StepUpdateOne

SetIndex sets the index field.

func (*StepUpdateOne) SetMsgArgs

func (suo *StepUpdateOne) SetMsgArgs(msa *model.MessageStepArgs) *StepUpdateOne

SetMsgArgs sets the msgArgs field.

func (*StepUpdateOne) SetNillableStepRunID

func (suo *StepUpdateOne) SetNillableStepRunID(id *string) *StepUpdateOne

SetNillableStepRunID sets the stepRun edge to StepRun by id if the given value is not nil.

func (*StepUpdateOne) SetNillableTemplateID

func (suo *StepUpdateOne) SetNillableTemplateID(id *string) *StepUpdateOne

SetNillableTemplateID sets the template edge to Template by id if the given value is not nil.

func (*StepUpdateOne) SetStepRun

func (suo *StepUpdateOne) SetStepRun(s *StepRun) *StepUpdateOne

SetStepRun sets the stepRun edge to StepRun.

func (*StepUpdateOne) SetStepRunID

func (suo *StepUpdateOne) SetStepRunID(id string) *StepUpdateOne

SetStepRunID sets the stepRun edge to StepRun by id.

func (*StepUpdateOne) SetTemplate

func (suo *StepUpdateOne) SetTemplate(t *Template) *StepUpdateOne

SetTemplate sets the template edge to Template.

func (*StepUpdateOne) SetTemplateID

func (suo *StepUpdateOne) SetTemplateID(id string) *StepUpdateOne

SetTemplateID sets the template edge to Template by id.

func (*StepUpdateOne) SetType

func (suo *StepUpdateOne) SetType(s step.Type) *StepUpdateOne

SetType sets the type field.

func (*StepUpdateOne) SetUpdatedAt

func (suo *StepUpdateOne) SetUpdatedAt(t time.Time) *StepUpdateOne

SetUpdatedAt sets the updated_at field.

type Steps

type Steps []*Step

Steps is a parsable slice of Step.

type Template

type Template struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// SelectionType holds the value of the "selectionType" field.
	SelectionType template.SelectionType `json:"selectionType,omitempty"`
	// ParticipantCount holds the value of the "participantCount" field.
	ParticipantCount int `json:"participantCount,omitempty"`
	// InternalCriteria holds the value of the "internalCriteria" field.
	InternalCriteria *model.InternalCriteria `json:"internalCriteria,omitempty"`
	// MturkCriteria holds the value of the "mturkCriteria" field.
	MturkCriteria *model.MTurkCriteria `json:"mturkCriteria,omitempty"`
	// Adult holds the value of the "adult" field.
	Adult bool `json:"adult,omitempty"`
	// Sandbox holds the value of the "sandbox" field.
	Sandbox bool `json:"sandbox,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TemplateQuery when eager-loading is set.
	Edges TemplateEdges `json:"edges"`
	// contains filtered or unexported fields
}

Template is the model entity for the Template schema.

func (*Template) QueryCreator

func (t *Template) QueryCreator() *AdminQuery

QueryCreator queries the creator edge of the Template.

func (*Template) QueryProject

func (t *Template) QueryProject() *ProjectQuery

QueryProject queries the project edge of the Template.

func (*Template) QueryRun

func (t *Template) QueryRun() *RunQuery

QueryRun queries the run edge of the Template.

func (*Template) QuerySteps

func (t *Template) QuerySteps() *StepQuery

QuerySteps queries the steps edge of the Template.

func (*Template) String

func (t *Template) String() string

String implements the fmt.Stringer.

func (*Template) Unwrap

func (t *Template) Unwrap() *Template

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 (*Template) Update

func (t *Template) Update() *TemplateUpdateOne

Update returns a builder for updating this Template. Note that, you need to call Template.Unwrap() before calling this method, if this Template was returned from a transaction, and the transaction was committed or rolled back.

type TemplateClient

type TemplateClient struct {
	// contains filtered or unexported fields
}

TemplateClient is a client for the Template schema.

func NewTemplateClient

func NewTemplateClient(c config) *TemplateClient

NewTemplateClient returns a client for the Template from the given config.

func (*TemplateClient) Create

func (c *TemplateClient) Create() *TemplateCreate

Create returns a create builder for Template.

func (*TemplateClient) CreateBulk

func (c *TemplateClient) CreateBulk(builders ...*TemplateCreate) *TemplateCreateBulk

BulkCreate returns a builder for creating a bulk of Template entities.

func (*TemplateClient) Delete

func (c *TemplateClient) Delete() *TemplateDelete

Delete returns a delete builder for Template.

func (*TemplateClient) DeleteOne

func (c *TemplateClient) DeleteOne(t *Template) *TemplateDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TemplateClient) DeleteOneID

func (c *TemplateClient) DeleteOneID(id string) *TemplateDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*TemplateClient) Get

func (c *TemplateClient) Get(ctx context.Context, id string) (*Template, error)

Get returns a Template entity by its id.

func (*TemplateClient) GetX

func (c *TemplateClient) GetX(ctx context.Context, id string) *Template

GetX is like Get, but panics if an error occurs.

func (*TemplateClient) Hooks

func (c *TemplateClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TemplateClient) Query

func (c *TemplateClient) Query() *TemplateQuery

Query returns a query builder for Template.

func (*TemplateClient) QueryCreator

func (c *TemplateClient) QueryCreator(t *Template) *AdminQuery

QueryCreator queries the creator edge of a Template.

func (*TemplateClient) QueryProject

func (c *TemplateClient) QueryProject(t *Template) *ProjectQuery

QueryProject queries the project edge of a Template.

func (*TemplateClient) QueryRun

func (c *TemplateClient) QueryRun(t *Template) *RunQuery

QueryRun queries the run edge of a Template.

func (*TemplateClient) QuerySteps

func (c *TemplateClient) QuerySteps(t *Template) *StepQuery

QuerySteps queries the steps edge of a Template.

func (*TemplateClient) Update

func (c *TemplateClient) Update() *TemplateUpdate

Update returns an update builder for Template.

func (*TemplateClient) UpdateOne

func (c *TemplateClient) UpdateOne(t *Template) *TemplateUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TemplateClient) UpdateOneID

func (c *TemplateClient) UpdateOneID(id string) *TemplateUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TemplateClient) Use

func (c *TemplateClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `template.Hooks(f(g(h())))`.

type TemplateCreate

type TemplateCreate struct {
	// contains filtered or unexported fields
}

TemplateCreate is the builder for creating a Template entity.

func (*TemplateCreate) AddStepIDs

func (tc *TemplateCreate) AddStepIDs(ids ...string) *TemplateCreate

AddStepIDs adds the steps edge to Step by ids.

func (*TemplateCreate) AddSteps

func (tc *TemplateCreate) AddSteps(s ...*Step) *TemplateCreate

AddSteps adds the steps edges to Step.

func (*TemplateCreate) Mutation

func (tc *TemplateCreate) Mutation() *TemplateMutation

Mutation returns the TemplateMutation object of the builder.

func (*TemplateCreate) Save

func (tc *TemplateCreate) Save(ctx context.Context) (*Template, error)

Save creates the Template in the database.

func (*TemplateCreate) SaveX

func (tc *TemplateCreate) SaveX(ctx context.Context) *Template

SaveX calls Save and panics if Save returns an error.

func (*TemplateCreate) SetAdult

func (tc *TemplateCreate) SetAdult(b bool) *TemplateCreate

SetAdult sets the adult field.

func (*TemplateCreate) SetCreatedAt

func (tc *TemplateCreate) SetCreatedAt(t time.Time) *TemplateCreate

SetCreatedAt sets the created_at field.

func (*TemplateCreate) SetCreator

func (tc *TemplateCreate) SetCreator(a *Admin) *TemplateCreate

SetCreator sets the creator edge to Admin.

func (*TemplateCreate) SetCreatorID

func (tc *TemplateCreate) SetCreatorID(id string) *TemplateCreate

SetCreatorID sets the creator edge to Admin by id.

func (*TemplateCreate) SetID

func (tc *TemplateCreate) SetID(s string) *TemplateCreate

SetID sets the id field.

func (*TemplateCreate) SetInternalCriteria

func (tc *TemplateCreate) SetInternalCriteria(mc *model.InternalCriteria) *TemplateCreate

SetInternalCriteria sets the internalCriteria field.

func (*TemplateCreate) SetMturkCriteria

func (tc *TemplateCreate) SetMturkCriteria(mtc *model.MTurkCriteria) *TemplateCreate

SetMturkCriteria sets the mturkCriteria field.

func (*TemplateCreate) SetName

func (tc *TemplateCreate) SetName(s string) *TemplateCreate

SetName sets the name field.

func (*TemplateCreate) SetNillableAdult

func (tc *TemplateCreate) SetNillableAdult(b *bool) *TemplateCreate

SetNillableAdult sets the adult field if the given value is not nil.

func (*TemplateCreate) SetNillableCreatedAt

func (tc *TemplateCreate) SetNillableCreatedAt(t *time.Time) *TemplateCreate

SetNillableCreatedAt sets the created_at field if the given value is not nil.

func (*TemplateCreate) SetNillableCreatorID

func (tc *TemplateCreate) SetNillableCreatorID(id *string) *TemplateCreate

SetNillableCreatorID sets the creator edge to Admin by id if the given value is not nil.

func (*TemplateCreate) SetNillableParticipantCount

func (tc *TemplateCreate) SetNillableParticipantCount(i *int) *TemplateCreate

SetNillableParticipantCount sets the participantCount field if the given value is not nil.

func (*TemplateCreate) SetNillableProjectID

func (tc *TemplateCreate) SetNillableProjectID(id *string) *TemplateCreate

SetNillableProjectID sets the project edge to Project by id if the given value is not nil.

func (*TemplateCreate) SetNillableRunID

func (tc *TemplateCreate) SetNillableRunID(id *string) *TemplateCreate

SetNillableRunID sets the run edge to Run by id if the given value is not nil.

func (*TemplateCreate) SetNillableSandbox

func (tc *TemplateCreate) SetNillableSandbox(b *bool) *TemplateCreate

SetNillableSandbox sets the sandbox field if the given value is not nil.

func (*TemplateCreate) SetNillableUpdatedAt

func (tc *TemplateCreate) SetNillableUpdatedAt(t *time.Time) *TemplateCreate

SetNillableUpdatedAt sets the updated_at field if the given value is not nil.

func (*TemplateCreate) SetParticipantCount

func (tc *TemplateCreate) SetParticipantCount(i int) *TemplateCreate

SetParticipantCount sets the participantCount field.

func (*TemplateCreate) SetProject

func (tc *TemplateCreate) SetProject(p *Project) *TemplateCreate

SetProject sets the project edge to Project.

func (*TemplateCreate) SetProjectID

func (tc *TemplateCreate) SetProjectID(id string) *TemplateCreate

SetProjectID sets the project edge to Project by id.

func (*TemplateCreate) SetRun

func (tc *TemplateCreate) SetRun(r *Run) *TemplateCreate

SetRun sets the run edge to Run.

func (*TemplateCreate) SetRunID

func (tc *TemplateCreate) SetRunID(id string) *TemplateCreate

SetRunID sets the run edge to Run by id.

func (*TemplateCreate) SetSandbox

func (tc *TemplateCreate) SetSandbox(b bool) *TemplateCreate

SetSandbox sets the sandbox field.

func (*TemplateCreate) SetSelectionType

func (tc *TemplateCreate) SetSelectionType(tt template.SelectionType) *TemplateCreate

SetSelectionType sets the selectionType field.

func (*TemplateCreate) SetUpdatedAt

func (tc *TemplateCreate) SetUpdatedAt(t time.Time) *TemplateCreate

SetUpdatedAt sets the updated_at field.

type TemplateCreateBulk

type TemplateCreateBulk struct {
	// contains filtered or unexported fields
}

TemplateCreateBulk is the builder for creating a bulk of Template entities.

func (*TemplateCreateBulk) Save

func (tcb *TemplateCreateBulk) Save(ctx context.Context) ([]*Template, error)

Save creates the Template entities in the database.

func (*TemplateCreateBulk) SaveX

func (tcb *TemplateCreateBulk) SaveX(ctx context.Context) []*Template

SaveX calls Save and panics if Save returns an error.

type TemplateDelete

type TemplateDelete struct {
	// contains filtered or unexported fields
}

TemplateDelete is the builder for deleting a Template entity.

func (*TemplateDelete) Exec

func (td *TemplateDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TemplateDelete) ExecX

func (td *TemplateDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TemplateDelete) Where

func (td *TemplateDelete) Where(ps ...predicate.Template) *TemplateDelete

Where adds a new predicate to the delete builder.

type TemplateDeleteOne

type TemplateDeleteOne struct {
	// contains filtered or unexported fields
}

TemplateDeleteOne is the builder for deleting a single Template entity.

func (*TemplateDeleteOne) Exec

func (tdo *TemplateDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TemplateDeleteOne) ExecX

func (tdo *TemplateDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TemplateEdges

type TemplateEdges struct {
	// Steps holds the value of the steps edge.
	Steps []*Step
	// Project holds the value of the project edge.
	Project *Project
	// Creator holds the value of the creator edge.
	Creator *Admin
	// Run holds the value of the run edge.
	Run *Run
	// contains filtered or unexported fields
}

TemplateEdges holds the relations/edges for other nodes in the graph.

func (TemplateEdges) CreatorOrErr

func (e TemplateEdges) CreatorOrErr() (*Admin, error)

CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TemplateEdges) ProjectOrErr

func (e TemplateEdges) ProjectOrErr() (*Project, error)

ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TemplateEdges) RunOrErr

func (e TemplateEdges) RunOrErr() (*Run, error)

RunOrErr returns the Run value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TemplateEdges) StepsOrErr

func (e TemplateEdges) StepsOrErr() ([]*Step, error)

StepsOrErr returns the Steps value or an error if the edge was not loaded in eager-loading.

type TemplateGroupBy

type TemplateGroupBy struct {
	// contains filtered or unexported fields
}

TemplateGroupBy is the builder for group-by Template entities.

func (*TemplateGroupBy) Aggregate

func (tgb *TemplateGroupBy) Aggregate(fns ...AggregateFunc) *TemplateGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TemplateGroupBy) Bool

func (tgb *TemplateGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.

func (*TemplateGroupBy) BoolX

func (tgb *TemplateGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TemplateGroupBy) Bools

func (tgb *TemplateGroupBy) 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 (*TemplateGroupBy) BoolsX

func (tgb *TemplateGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TemplateGroupBy) Float64

func (tgb *TemplateGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.

func (*TemplateGroupBy) Float64X

func (tgb *TemplateGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TemplateGroupBy) Float64s

func (tgb *TemplateGroupBy) 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 (*TemplateGroupBy) Float64sX

func (tgb *TemplateGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TemplateGroupBy) Int

func (tgb *TemplateGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from group-by. It is only allowed when querying group-by with one field.

func (*TemplateGroupBy) IntX

func (tgb *TemplateGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TemplateGroupBy) Ints

func (tgb *TemplateGroupBy) 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 (*TemplateGroupBy) IntsX

func (tgb *TemplateGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TemplateGroupBy) Scan

func (tgb *TemplateGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*TemplateGroupBy) ScanX

func (tgb *TemplateGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TemplateGroupBy) String

func (tgb *TemplateGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from group-by. It is only allowed when querying group-by with one field.

func (*TemplateGroupBy) StringX

func (tgb *TemplateGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TemplateGroupBy) Strings

func (tgb *TemplateGroupBy) 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 (*TemplateGroupBy) StringsX

func (tgb *TemplateGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TemplateMutation

type TemplateMutation struct {
	// contains filtered or unexported fields
}

TemplateMutation represents an operation that mutate the Templates nodes in the graph.

func (*TemplateMutation) AddField

func (m *TemplateMutation) 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 (*TemplateMutation) AddParticipantCount

func (m *TemplateMutation) AddParticipantCount(i int)

AddParticipantCount adds i to participantCount.

func (*TemplateMutation) AddStepIDs

func (m *TemplateMutation) AddStepIDs(ids ...string)

AddStepIDs adds the steps edge to Step by ids.

func (*TemplateMutation) AddedEdges

func (m *TemplateMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TemplateMutation) AddedField

func (m *TemplateMutation) 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 (*TemplateMutation) AddedFields

func (m *TemplateMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented or decremented during this mutation.

func (*TemplateMutation) AddedIDs

func (m *TemplateMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all ids (to other nodes) that were added for the given edge name.

func (*TemplateMutation) AddedParticipantCount

func (m *TemplateMutation) AddedParticipantCount() (r int, exists bool)

AddedParticipantCount returns the value that was added to the participantCount field in this mutation.

func (*TemplateMutation) Adult

func (m *TemplateMutation) Adult() (r bool, exists bool)

Adult returns the adult value in the mutation.

func (*TemplateMutation) ClearCreator

func (m *TemplateMutation) ClearCreator()

ClearCreator clears the creator edge to Admin.

func (*TemplateMutation) ClearEdge

func (m *TemplateMutation) 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 (*TemplateMutation) ClearField

func (m *TemplateMutation) 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 (*TemplateMutation) ClearProject

func (m *TemplateMutation) ClearProject()

ClearProject clears the project edge to Project.

func (*TemplateMutation) ClearRun

func (m *TemplateMutation) ClearRun()

ClearRun clears the run edge to Run.

func (*TemplateMutation) ClearSteps

func (m *TemplateMutation) ClearSteps()

ClearSteps clears the steps edge to Step.

func (*TemplateMutation) ClearedEdges

func (m *TemplateMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TemplateMutation) ClearedFields

func (m *TemplateMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TemplateMutation) Client

func (m TemplateMutation) 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 (*TemplateMutation) CreatedAt

func (m *TemplateMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the created_at value in the mutation.

func (*TemplateMutation) CreatorCleared

func (m *TemplateMutation) CreatorCleared() bool

CreatorCleared returns if the edge creator was cleared.

func (*TemplateMutation) CreatorID

func (m *TemplateMutation) CreatorID() (id string, exists bool)

CreatorID returns the creator id in the mutation.

func (*TemplateMutation) CreatorIDs

func (m *TemplateMutation) CreatorIDs() (ids []string)

CreatorIDs returns the creator ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.

func (*TemplateMutation) EdgeCleared

func (m *TemplateMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.

func (*TemplateMutation) Field

func (m *TemplateMutation) 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 (*TemplateMutation) FieldCleared

func (m *TemplateMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicates if this field was cleared in this mutation.

func (*TemplateMutation) Fields

func (m *TemplateMutation) 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 (*TemplateMutation) ID

func (m *TemplateMutation) ID() (id string, 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 (*TemplateMutation) InternalCriteria

func (m *TemplateMutation) InternalCriteria() (r *model.InternalCriteria, exists bool)

InternalCriteria returns the internalCriteria value in the mutation.

func (*TemplateMutation) MturkCriteria

func (m *TemplateMutation) MturkCriteria() (r *model.MTurkCriteria, exists bool)

MturkCriteria returns the mturkCriteria value in the mutation.

func (*TemplateMutation) Name

func (m *TemplateMutation) Name() (r string, exists bool)

Name returns the name value in the mutation.

func (*TemplateMutation) OldAdult

func (m *TemplateMutation) OldAdult(ctx context.Context) (v bool, err error)

OldAdult returns the old adult value of the Template. If the Template object wasn'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 (*TemplateMutation) OldCreatedAt

func (m *TemplateMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old created_at value of the Template. If the Template object wasn'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 (*TemplateMutation) OldField

func (m *TemplateMutation) 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 (*TemplateMutation) OldInternalCriteria

func (m *TemplateMutation) OldInternalCriteria(ctx context.Context) (v *model.InternalCriteria, err error)

OldInternalCriteria returns the old internalCriteria value of the Template. If the Template object wasn'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 (*TemplateMutation) OldMturkCriteria

func (m *TemplateMutation) OldMturkCriteria(ctx context.Context) (v *model.MTurkCriteria, err error)

OldMturkCriteria returns the old mturkCriteria value of the Template. If the Template object wasn'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 (*TemplateMutation) OldName

func (m *TemplateMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old name value of the Template. If the Template object wasn'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 (*TemplateMutation) OldParticipantCount

func (m *TemplateMutation) OldParticipantCount(ctx context.Context) (v int, err error)

OldParticipantCount returns the old participantCount value of the Template. If the Template object wasn'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 (*TemplateMutation) OldSandbox

func (m *TemplateMutation) OldSandbox(ctx context.Context) (v bool, err error)

OldSandbox returns the old sandbox value of the Template. If the Template object wasn'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 (*TemplateMutation) OldSelectionType

func (m *TemplateMutation) OldSelectionType(ctx context.Context) (v template.SelectionType, err error)

OldSelectionType returns the old selectionType value of the Template. If the Template object wasn'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 (*TemplateMutation) OldUpdatedAt

func (m *TemplateMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old updated_at value of the Template. If the Template object wasn'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 (*TemplateMutation) Op

func (m *TemplateMutation) Op() Op

Op returns the operation name.

func (*TemplateMutation) ParticipantCount

func (m *TemplateMutation) ParticipantCount() (r int, exists bool)

ParticipantCount returns the participantCount value in the mutation.

func (*TemplateMutation) ProjectCleared

func (m *TemplateMutation) ProjectCleared() bool

ProjectCleared returns if the edge project was cleared.

func (*TemplateMutation) ProjectID

func (m *TemplateMutation) ProjectID() (id string, exists bool)

ProjectID returns the project id in the mutation.

func (*TemplateMutation) ProjectIDs

func (m *TemplateMutation) ProjectIDs() (ids []string)

ProjectIDs returns the project ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.

func (*TemplateMutation) RemoveStepIDs

func (m *TemplateMutation) RemoveStepIDs(ids ...string)

RemoveStepIDs removes the steps edge to Step by ids.

func (*TemplateMutation) RemovedEdges

func (m *TemplateMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TemplateMutation) RemovedIDs

func (m *TemplateMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.

func (*TemplateMutation) RemovedStepsIDs

func (m *TemplateMutation) RemovedStepsIDs() (ids []string)

RemovedSteps returns the removed ids of steps.

func (*TemplateMutation) ResetAdult

func (m *TemplateMutation) ResetAdult()

ResetAdult reset all changes of the "adult" field.

func (*TemplateMutation) ResetCreatedAt

func (m *TemplateMutation) ResetCreatedAt()

ResetCreatedAt reset all changes of the "created_at" field.

func (*TemplateMutation) ResetCreator

func (m *TemplateMutation) ResetCreator()

ResetCreator reset all changes of the "creator" edge.

func (*TemplateMutation) ResetEdge

func (m *TemplateMutation) 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 (*TemplateMutation) ResetField

func (m *TemplateMutation) 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 (*TemplateMutation) ResetInternalCriteria

func (m *TemplateMutation) ResetInternalCriteria()

ResetInternalCriteria reset all changes of the "internalCriteria" field.

func (*TemplateMutation) ResetMturkCriteria

func (m *TemplateMutation) ResetMturkCriteria()

ResetMturkCriteria reset all changes of the "mturkCriteria" field.

func (*TemplateMutation) ResetName

func (m *TemplateMutation) ResetName()

ResetName reset all changes of the "name" field.

func (*TemplateMutation) ResetParticipantCount

func (m *TemplateMutation) ResetParticipantCount()

ResetParticipantCount reset all changes of the "participantCount" field.

func (*TemplateMutation) ResetProject

func (m *TemplateMutation) ResetProject()

ResetProject reset all changes of the "project" edge.

func (*TemplateMutation) ResetRun

func (m *TemplateMutation) ResetRun()

ResetRun reset all changes of the "run" edge.

func (*TemplateMutation) ResetSandbox

func (m *TemplateMutation) ResetSandbox()

ResetSandbox reset all changes of the "sandbox" field.

func (*TemplateMutation) ResetSelectionType

func (m *TemplateMutation) ResetSelectionType()

ResetSelectionType reset all changes of the "selectionType" field.

func (*TemplateMutation) ResetSteps

func (m *TemplateMutation) ResetSteps()

ResetSteps reset all changes of the "steps" edge.

func (*TemplateMutation) ResetUpdatedAt

func (m *TemplateMutation) ResetUpdatedAt()

ResetUpdatedAt reset all changes of the "updated_at" field.

func (*TemplateMutation) RunCleared

func (m *TemplateMutation) RunCleared() bool

RunCleared returns if the edge run was cleared.

func (*TemplateMutation) RunID

func (m *TemplateMutation) RunID() (id string, exists bool)

RunID returns the run id in the mutation.

func (*TemplateMutation) RunIDs

func (m *TemplateMutation) RunIDs() (ids []string)

RunIDs returns the run ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use RunID instead. It exists only for internal usage by the builders.

func (*TemplateMutation) Sandbox

func (m *TemplateMutation) Sandbox() (r bool, exists bool)

Sandbox returns the sandbox value in the mutation.

func (*TemplateMutation) SelectionType

func (m *TemplateMutation) SelectionType() (r template.SelectionType, exists bool)

SelectionType returns the selectionType value in the mutation.

func (*TemplateMutation) SetAdult

func (m *TemplateMutation) SetAdult(b bool)

SetAdult sets the adult field.

func (*TemplateMutation) SetCreatedAt

func (m *TemplateMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the created_at field.

func (*TemplateMutation) SetCreatorID

func (m *TemplateMutation) SetCreatorID(id string)

SetCreatorID sets the creator edge to Admin by id.

func (*TemplateMutation) SetField

func (m *TemplateMutation) 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 (*TemplateMutation) SetID

func (m *TemplateMutation) SetID(id string)

SetID sets the value of the id field. Note that, this operation is accepted only on Template creation.

func (*TemplateMutation) SetInternalCriteria

func (m *TemplateMutation) SetInternalCriteria(mc *model.InternalCriteria)

SetInternalCriteria sets the internalCriteria field.

func (*TemplateMutation) SetMturkCriteria

func (m *TemplateMutation) SetMturkCriteria(mtc *model.MTurkCriteria)

SetMturkCriteria sets the mturkCriteria field.

func (*TemplateMutation) SetName

func (m *TemplateMutation) SetName(s string)

SetName sets the name field.

func (*TemplateMutation) SetParticipantCount

func (m *TemplateMutation) SetParticipantCount(i int)

SetParticipantCount sets the participantCount field.

func (*TemplateMutation) SetProjectID

func (m *TemplateMutation) SetProjectID(id string)

SetProjectID sets the project edge to Project by id.

func (*TemplateMutation) SetRunID

func (m *TemplateMutation) SetRunID(id string)

SetRunID sets the run edge to Run by id.

func (*TemplateMutation) SetSandbox

func (m *TemplateMutation) SetSandbox(b bool)

SetSandbox sets the sandbox field.

func (*TemplateMutation) SetSelectionType

func (m *TemplateMutation) SetSelectionType(tt template.SelectionType)

SetSelectionType sets the selectionType field.

func (*TemplateMutation) SetUpdatedAt

func (m *TemplateMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the updated_at field.

func (*TemplateMutation) StepsCleared

func (m *TemplateMutation) StepsCleared() bool

StepsCleared returns if the edge steps was cleared.

func (*TemplateMutation) StepsIDs

func (m *TemplateMutation) StepsIDs() (ids []string)

StepsIDs returns the steps ids in the mutation.

func (TemplateMutation) Tx

func (m TemplateMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TemplateMutation) Type

func (m *TemplateMutation) Type() string

Type returns the node type of this mutation (Template).

func (*TemplateMutation) UpdatedAt

func (m *TemplateMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the updated_at value in the mutation.

type TemplateQuery

type TemplateQuery struct {
	// contains filtered or unexported fields
}

TemplateQuery is the builder for querying Template entities.

func (*TemplateQuery) All

func (tq *TemplateQuery) All(ctx context.Context) ([]*Template, error)

All executes the query and returns a list of Templates.

func (*TemplateQuery) AllX

func (tq *TemplateQuery) AllX(ctx context.Context) []*Template

AllX is like All, but panics if an error occurs.

func (*TemplateQuery) Clone

func (tq *TemplateQuery) Clone() *TemplateQuery

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 (*TemplateQuery) Count

func (tq *TemplateQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TemplateQuery) CountX

func (tq *TemplateQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TemplateQuery) Exist

func (tq *TemplateQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TemplateQuery) ExistX

func (tq *TemplateQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TemplateQuery) First

func (tq *TemplateQuery) First(ctx context.Context) (*Template, error)

First returns the first Template entity in the query. Returns *NotFoundError when no template was found.

func (*TemplateQuery) FirstID

func (tq *TemplateQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Template id in the query. Returns *NotFoundError when no id was found.

func (*TemplateQuery) FirstX

func (tq *TemplateQuery) FirstX(ctx context.Context) *Template

FirstX is like First, but panics if an error occurs.

func (*TemplateQuery) FirstXID

func (tq *TemplateQuery) FirstXID(ctx context.Context) string

FirstXID is like FirstID, but panics if an error occurs.

func (*TemplateQuery) GroupBy

func (tq *TemplateQuery) GroupBy(field string, fields ...string) *TemplateGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Template.Query().
	GroupBy(template.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TemplateQuery) IDs

func (tq *TemplateQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Template ids.

func (*TemplateQuery) IDsX

func (tq *TemplateQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*TemplateQuery) Limit

func (tq *TemplateQuery) Limit(limit int) *TemplateQuery

Limit adds a limit step to the query.

func (*TemplateQuery) Offset

func (tq *TemplateQuery) Offset(offset int) *TemplateQuery

Offset adds an offset step to the query.

func (*TemplateQuery) Only

func (tq *TemplateQuery) Only(ctx context.Context) (*Template, error)

Only returns the only Template entity in the query, returns an error if not exactly one entity was returned.

func (*TemplateQuery) OnlyID

func (tq *TemplateQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID returns the only Template id in the query, returns an error if not exactly one id was returned.

func (*TemplateQuery) OnlyIDX

func (tq *TemplateQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TemplateQuery) OnlyX

func (tq *TemplateQuery) OnlyX(ctx context.Context) *Template

OnlyX is like Only, but panics if an error occurs.

func (*TemplateQuery) Order

func (tq *TemplateQuery) Order(o ...OrderFunc) *TemplateQuery

Order adds an order step to the query.

func (*TemplateQuery) QueryCreator

func (tq *TemplateQuery) QueryCreator() *AdminQuery

QueryCreator chains the current query on the creator edge.

func (*TemplateQuery) QueryProject

func (tq *TemplateQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the project edge.

func (*TemplateQuery) QueryRun

func (tq *TemplateQuery) QueryRun() *RunQuery

QueryRun chains the current query on the run edge.

func (*TemplateQuery) QuerySteps

func (tq *TemplateQuery) QuerySteps() *StepQuery

QuerySteps chains the current query on the steps edge.

func (*TemplateQuery) Select

func (tq *TemplateQuery) Select(field string, fields ...string) *TemplateSelect

Select one or more fields from the given query.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Template.Query().
	Select(template.FieldCreatedAt).
	Scan(ctx, &v)

func (*TemplateQuery) Where

func (tq *TemplateQuery) Where(ps ...predicate.Template) *TemplateQuery

Where adds a new predicate for the builder.

func (*TemplateQuery) WithCreator

func (tq *TemplateQuery) WithCreator(opts ...func(*AdminQuery)) *TemplateQuery
WithCreator tells the query-builder to eager-loads the nodes that are connected to

the "creator" edge. The optional arguments used to configure the query builder of the edge.

func (*TemplateQuery) WithProject

func (tq *TemplateQuery) WithProject(opts ...func(*ProjectQuery)) *TemplateQuery
WithProject tells the query-builder to eager-loads the nodes that are connected to

the "project" edge. The optional arguments used to configure the query builder of the edge.

func (*TemplateQuery) WithRun

func (tq *TemplateQuery) WithRun(opts ...func(*RunQuery)) *TemplateQuery
WithRun tells the query-builder to eager-loads the nodes that are connected to

the "run" edge. The optional arguments used to configure the query builder of the edge.

func (*TemplateQuery) WithSteps

func (tq *TemplateQuery) WithSteps(opts ...func(*StepQuery)) *TemplateQuery
WithSteps tells the query-builder to eager-loads the nodes that are connected to

the "steps" edge. The optional arguments used to configure the query builder of the edge.

type TemplateSelect

type TemplateSelect struct {
	// contains filtered or unexported fields
}

TemplateSelect is the builder for select fields of Template entities.

func (*TemplateSelect) Bool

func (ts *TemplateSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from selector. It is only allowed when selecting one field.

func (*TemplateSelect) BoolX

func (ts *TemplateSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TemplateSelect) Bools

func (ts *TemplateSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*TemplateSelect) BoolsX

func (ts *TemplateSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TemplateSelect) Float64

func (ts *TemplateSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from selector. It is only allowed when selecting one field.

func (*TemplateSelect) Float64X

func (ts *TemplateSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TemplateSelect) Float64s

func (ts *TemplateSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*TemplateSelect) Float64sX

func (ts *TemplateSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TemplateSelect) Int

func (ts *TemplateSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from selector. It is only allowed when selecting one field.

func (*TemplateSelect) IntX

func (ts *TemplateSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TemplateSelect) Ints

func (ts *TemplateSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*TemplateSelect) IntsX

func (ts *TemplateSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TemplateSelect) Scan

func (ts *TemplateSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*TemplateSelect) ScanX

func (ts *TemplateSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TemplateSelect) String

func (ts *TemplateSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from selector. It is only allowed when selecting one field.

func (*TemplateSelect) StringX

func (ts *TemplateSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TemplateSelect) Strings

func (ts *TemplateSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*TemplateSelect) StringsX

func (ts *TemplateSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TemplateUpdate

type TemplateUpdate struct {
	// contains filtered or unexported fields
}

TemplateUpdate is the builder for updating Template entities.

func (*TemplateUpdate) AddParticipantCount

func (tu *TemplateUpdate) AddParticipantCount(i int) *TemplateUpdate

AddParticipantCount adds i to participantCount.

func (*TemplateUpdate) AddStepIDs

func (tu *TemplateUpdate) AddStepIDs(ids ...string) *TemplateUpdate

AddStepIDs adds the steps edge to Step by ids.

func (*TemplateUpdate) AddSteps

func (tu *TemplateUpdate) AddSteps(s ...*Step) *TemplateUpdate

AddSteps adds the steps edges to Step.

func (*TemplateUpdate) ClearCreator

func (tu *TemplateUpdate) ClearCreator() *TemplateUpdate

ClearCreator clears the "creator" edge to type Admin.

func (*TemplateUpdate) ClearProject

func (tu *TemplateUpdate) ClearProject() *TemplateUpdate

ClearProject clears the "project" edge to type Project.

func (*TemplateUpdate) ClearRun

func (tu *TemplateUpdate) ClearRun() *TemplateUpdate

ClearRun clears the "run" edge to type Run.

func (*TemplateUpdate) ClearSteps

func (tu *TemplateUpdate) ClearSteps() *TemplateUpdate

ClearSteps clears all "steps" edges to type Step.

func (*TemplateUpdate) Exec

func (tu *TemplateUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TemplateUpdate) ExecX

func (tu *TemplateUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateUpdate) Mutation

func (tu *TemplateUpdate) Mutation() *TemplateMutation

Mutation returns the TemplateMutation object of the builder.

func (*TemplateUpdate) RemoveStepIDs

func (tu *TemplateUpdate) RemoveStepIDs(ids ...string) *TemplateUpdate

RemoveStepIDs removes the steps edge to Step by ids.

func (*TemplateUpdate) RemoveSteps

func (tu *TemplateUpdate) RemoveSteps(s ...*Step) *TemplateUpdate

RemoveSteps removes steps edges to Step.

func (*TemplateUpdate) Save

func (tu *TemplateUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*TemplateUpdate) SaveX

func (tu *TemplateUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TemplateUpdate) SetAdult

func (tu *TemplateUpdate) SetAdult(b bool) *TemplateUpdate

SetAdult sets the adult field.

func (*TemplateUpdate) SetCreator

func (tu *TemplateUpdate) SetCreator(a *Admin) *TemplateUpdate

SetCreator sets the creator edge to Admin.

func (*TemplateUpdate) SetCreatorID

func (tu *TemplateUpdate) SetCreatorID(id string) *TemplateUpdate

SetCreatorID sets the creator edge to Admin by id.

func (*TemplateUpdate) SetInternalCriteria

func (tu *TemplateUpdate) SetInternalCriteria(mc *model.InternalCriteria) *TemplateUpdate

SetInternalCriteria sets the internalCriteria field.

func (*TemplateUpdate) SetMturkCriteria

func (tu *TemplateUpdate) SetMturkCriteria(mtc *model.MTurkCriteria) *TemplateUpdate

SetMturkCriteria sets the mturkCriteria field.

func (*TemplateUpdate) SetName

func (tu *TemplateUpdate) SetName(s string) *TemplateUpdate

SetName sets the name field.

func (*TemplateUpdate) SetNillableAdult

func (tu *TemplateUpdate) SetNillableAdult(b *bool) *TemplateUpdate

SetNillableAdult sets the adult field if the given value is not nil.

func (*TemplateUpdate) SetNillableCreatorID

func (tu *TemplateUpdate) SetNillableCreatorID(id *string) *TemplateUpdate

SetNillableCreatorID sets the creator edge to Admin by id if the given value is not nil.

func (*TemplateUpdate) SetNillableParticipantCount

func (tu *TemplateUpdate) SetNillableParticipantCount(i *int) *TemplateUpdate

SetNillableParticipantCount sets the participantCount field if the given value is not nil.

func (*TemplateUpdate) SetNillableProjectID

func (tu *TemplateUpdate) SetNillableProjectID(id *string) *TemplateUpdate

SetNillableProjectID sets the project edge to Project by id if the given value is not nil.

func (*TemplateUpdate) SetNillableRunID

func (tu *TemplateUpdate) SetNillableRunID(id *string) *TemplateUpdate

SetNillableRunID sets the run edge to Run by id if the given value is not nil.

func (*TemplateUpdate) SetNillableSandbox

func (tu *TemplateUpdate) SetNillableSandbox(b *bool) *TemplateUpdate

SetNillableSandbox sets the sandbox field if the given value is not nil.

func (*TemplateUpdate) SetParticipantCount

func (tu *TemplateUpdate) SetParticipantCount(i int) *TemplateUpdate

SetParticipantCount sets the participantCount field.

func (*TemplateUpdate) SetProject

func (tu *TemplateUpdate) SetProject(p *Project) *TemplateUpdate

SetProject sets the project edge to Project.

func (*TemplateUpdate) SetProjectID

func (tu *TemplateUpdate) SetProjectID(id string) *TemplateUpdate

SetProjectID sets the project edge to Project by id.

func (*TemplateUpdate) SetRun

func (tu *TemplateUpdate) SetRun(r *Run) *TemplateUpdate

SetRun sets the run edge to Run.

func (*TemplateUpdate) SetRunID

func (tu *TemplateUpdate) SetRunID(id string) *TemplateUpdate

SetRunID sets the run edge to Run by id.

func (*TemplateUpdate) SetSandbox

func (tu *TemplateUpdate) SetSandbox(b bool) *TemplateUpdate

SetSandbox sets the sandbox field.

func (*TemplateUpdate) SetSelectionType

func (tu *TemplateUpdate) SetSelectionType(tt template.SelectionType) *TemplateUpdate

SetSelectionType sets the selectionType field.

func (*TemplateUpdate) SetUpdatedAt

func (tu *TemplateUpdate) SetUpdatedAt(t time.Time) *TemplateUpdate

SetUpdatedAt sets the updated_at field.

func (*TemplateUpdate) Where

func (tu *TemplateUpdate) Where(ps ...predicate.Template) *TemplateUpdate

Where adds a new predicate for the builder.

type TemplateUpdateOne

type TemplateUpdateOne struct {
	// contains filtered or unexported fields
}

TemplateUpdateOne is the builder for updating a single Template entity.

func (*TemplateUpdateOne) AddParticipantCount

func (tuo *TemplateUpdateOne) AddParticipantCount(i int) *TemplateUpdateOne

AddParticipantCount adds i to participantCount.

func (*TemplateUpdateOne) AddStepIDs

func (tuo *TemplateUpdateOne) AddStepIDs(ids ...string) *TemplateUpdateOne

AddStepIDs adds the steps edge to Step by ids.

func (*TemplateUpdateOne) AddSteps

func (tuo *TemplateUpdateOne) AddSteps(s ...*Step) *TemplateUpdateOne

AddSteps adds the steps edges to Step.

func (*TemplateUpdateOne) ClearCreator

func (tuo *TemplateUpdateOne) ClearCreator() *TemplateUpdateOne

ClearCreator clears the "creator" edge to type Admin.

func (*TemplateUpdateOne) ClearProject

func (tuo *TemplateUpdateOne) ClearProject() *TemplateUpdateOne

ClearProject clears the "project" edge to type Project.

func (*TemplateUpdateOne) ClearRun

func (tuo *TemplateUpdateOne) ClearRun() *TemplateUpdateOne

ClearRun clears the "run" edge to type Run.

func (*TemplateUpdateOne) ClearSteps

func (tuo *TemplateUpdateOne) ClearSteps() *TemplateUpdateOne

ClearSteps clears all "steps" edges to type Step.

func (*TemplateUpdateOne) Exec

func (tuo *TemplateUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TemplateUpdateOne) ExecX

func (tuo *TemplateUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TemplateUpdateOne) Mutation

func (tuo *TemplateUpdateOne) Mutation() *TemplateMutation

Mutation returns the TemplateMutation object of the builder.

func (*TemplateUpdateOne) RemoveStepIDs

func (tuo *TemplateUpdateOne) RemoveStepIDs(ids ...string) *TemplateUpdateOne

RemoveStepIDs removes the steps edge to Step by ids.

func (*TemplateUpdateOne) RemoveSteps

func (tuo *TemplateUpdateOne) RemoveSteps(s ...*Step) *TemplateUpdateOne

RemoveSteps removes steps edges to Step.

func (*TemplateUpdateOne) Save

func (tuo *TemplateUpdateOne) Save(ctx context.Context) (*Template, error)

Save executes the query and returns the updated entity.

func (*TemplateUpdateOne) SaveX

func (tuo *TemplateUpdateOne) SaveX(ctx context.Context) *Template

SaveX is like Save, but panics if an error occurs.

func (*TemplateUpdateOne) SetAdult

func (tuo *TemplateUpdateOne) SetAdult(b bool) *TemplateUpdateOne

SetAdult sets the adult field.

func (*TemplateUpdateOne) SetCreator

func (tuo *TemplateUpdateOne) SetCreator(a *Admin) *TemplateUpdateOne

SetCreator sets the creator edge to Admin.

func (*TemplateUpdateOne) SetCreatorID

func (tuo *TemplateUpdateOne) SetCreatorID(id string) *TemplateUpdateOne

SetCreatorID sets the creator edge to Admin by id.

func (*TemplateUpdateOne) SetInternalCriteria

func (tuo *TemplateUpdateOne) SetInternalCriteria(mc *model.InternalCriteria) *TemplateUpdateOne

SetInternalCriteria sets the internalCriteria field.

func (*TemplateUpdateOne) SetMturkCriteria

func (tuo *TemplateUpdateOne) SetMturkCriteria(mtc *model.MTurkCriteria) *TemplateUpdateOne

SetMturkCriteria sets the mturkCriteria field.

func (*TemplateUpdateOne) SetName

func (tuo *TemplateUpdateOne) SetName(s string) *TemplateUpdateOne

SetName sets the name field.

func (*TemplateUpdateOne) SetNillableAdult

func (tuo *TemplateUpdateOne) SetNillableAdult(b *bool) *TemplateUpdateOne

SetNillableAdult sets the adult field if the given value is not nil.

func (*TemplateUpdateOne) SetNillableCreatorID

func (tuo *TemplateUpdateOne) SetNillableCreatorID(id *string) *TemplateUpdateOne

SetNillableCreatorID sets the creator edge to Admin by id if the given value is not nil.

func (*TemplateUpdateOne) SetNillableParticipantCount

func (tuo *TemplateUpdateOne) SetNillableParticipantCount(i *int) *TemplateUpdateOne

SetNillableParticipantCount sets the participantCount field if the given value is not nil.

func (*TemplateUpdateOne) SetNillableProjectID

func (tuo *TemplateUpdateOne) SetNillableProjectID(id *string) *TemplateUpdateOne

SetNillableProjectID sets the project edge to Project by id if the given value is not nil.

func (*TemplateUpdateOne) SetNillableRunID

func (tuo *TemplateUpdateOne) SetNillableRunID(id *string) *TemplateUpdateOne

SetNillableRunID sets the run edge to Run by id if the given value is not nil.

func (*TemplateUpdateOne) SetNillableSandbox

func (tuo *TemplateUpdateOne) SetNillableSandbox(b *bool) *TemplateUpdateOne

SetNillableSandbox sets the sandbox field if the given value is not nil.

func (*TemplateUpdateOne) SetParticipantCount

func (tuo *TemplateUpdateOne) SetParticipantCount(i int) *TemplateUpdateOne

SetParticipantCount sets the participantCount field.

func (*TemplateUpdateOne) SetProject

func (tuo *TemplateUpdateOne) SetProject(p *Project) *TemplateUpdateOne

SetProject sets the project edge to Project.

func (*TemplateUpdateOne) SetProjectID

func (tuo *TemplateUpdateOne) SetProjectID(id string) *TemplateUpdateOne

SetProjectID sets the project edge to Project by id.

func (*TemplateUpdateOne) SetRun

func (tuo *TemplateUpdateOne) SetRun(r *Run) *TemplateUpdateOne

SetRun sets the run edge to Run.

func (*TemplateUpdateOne) SetRunID

func (tuo *TemplateUpdateOne) SetRunID(id string) *TemplateUpdateOne

SetRunID sets the run edge to Run by id.

func (*TemplateUpdateOne) SetSandbox

func (tuo *TemplateUpdateOne) SetSandbox(b bool) *TemplateUpdateOne

SetSandbox sets the sandbox field.

func (*TemplateUpdateOne) SetSelectionType

func (tuo *TemplateUpdateOne) SetSelectionType(tt template.SelectionType) *TemplateUpdateOne

SetSelectionType sets the selectionType field.

func (*TemplateUpdateOne) SetUpdatedAt

func (tuo *TemplateUpdateOne) SetUpdatedAt(t time.Time) *TemplateUpdateOne

SetUpdatedAt sets the updated_at field.

type Templates

type Templates []*Template

Templates is a parsable slice of Template.

type Tx

type Tx struct {

	// Admin is the client for interacting with the Admin builders.
	Admin *AdminClient
	// Datum is the client for interacting with the Datum builders.
	Datum *DatumClient
	// Participant is the client for interacting with the Participant builders.
	Participant *ParticipantClient
	// Participation is the client for interacting with the Participation builders.
	Participation *ParticipationClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// ProviderID is the client for interacting with the ProviderID builders.
	ProviderID *ProviderIDClient
	// Run is the client for interacting with the Run builders.
	Run *RunClient
	// Step is the client for interacting with the Step builders.
	Step *StepClient
	// StepRun is the client for interacting with the StepRun builders.
	StepRun *StepRunClient
	// Template is the client for interacting with the Template builders.
	Template *TemplateClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns the Tx stored in a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflict in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL