ent

package
v0.0.0-...-39cb53b Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 27 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.
	TypeDeviceDuration         = "DeviceDuration"
	TypeDeviceDurationElephant = "DeviceDurationElephant"
	TypeDeviceEvent            = "DeviceEvent"
	TypeDeviceKpi              = "DeviceKpi"
	TypeDeviceOfflineTime      = "DeviceOfflineTime"
	TypeDeviceOnTimeDaily      = "DeviceOnTimeDaily"
	TypeDeviceOnlineTime       = "DeviceOnlineTime"
	TypeDeviceUpsterCycle      = "DeviceUpsterCycle"
	TypeDeviceUpsterStatistics = "DeviceUpsterStatistics"
)

Variables

View Source
var DefaultDeviceDurationElephantOrder = Desc(devicedurationelephant.FieldID)

DefaultDeviceDurationElephantOrder is the default ordering of DeviceDurationElephant.

View Source
var DefaultDeviceDurationOrder = Desc(deviceduration.FieldID)

DefaultDeviceDurationOrder is the default ordering of DeviceDuration.

View Source
var DefaultDeviceEventOrder = Desc(deviceevent.FieldID)

DefaultDeviceEventOrder is the default ordering of DeviceEvent.

View Source
var DefaultDeviceKpiOrder = Desc(devicekpi.FieldID)

DefaultDeviceKpiOrder is the default ordering of DeviceKpi.

View Source
var DefaultDeviceOfflineTimeOrder = Desc(deviceofflinetime.FieldID)

DefaultDeviceOfflineTimeOrder is the default ordering of DeviceOfflineTime.

View Source
var DefaultDeviceOnTimeDailyOrder = Desc(deviceontimedaily.FieldID)

DefaultDeviceOnTimeDailyOrder is the default ordering of DeviceOnTimeDaily.

View Source
var DefaultDeviceOnlineTimeOrder = Desc(deviceonlinetime.FieldID)

DefaultDeviceOnlineTimeOrder is the default ordering of DeviceOnlineTime.

View Source
var DefaultDeviceUpsterCycleOrder = Desc(deviceupstercycle.FieldID)

DefaultDeviceUpsterCycleOrder is the default ordering of DeviceUpsterCycle.

View Source
var DefaultDeviceUpsterStatisticsOrder = Desc(deviceupsterstatistics.FieldID)

DefaultDeviceUpsterStatisticsOrder is the default ordering of DeviceUpsterStatistics.

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

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

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

GroupBy(field1, field2).
Aggregate(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
	// DeviceDuration is the client for interacting with the DeviceDuration builders.
	DeviceDuration *DeviceDurationClient
	// DeviceDurationElephant is the client for interacting with the DeviceDurationElephant builders.
	DeviceDurationElephant *DeviceDurationElephantClient
	// DeviceEvent is the client for interacting with the DeviceEvent builders.
	DeviceEvent *DeviceEventClient
	// DeviceKpi is the client for interacting with the DeviceKpi builders.
	DeviceKpi *DeviceKpiClient
	// DeviceOfflineTime is the client for interacting with the DeviceOfflineTime builders.
	DeviceOfflineTime *DeviceOfflineTimeClient
	// DeviceOnTimeDaily is the client for interacting with the DeviceOnTimeDaily builders.
	DeviceOnTimeDaily *DeviceOnTimeDailyClient
	// DeviceOnlineTime is the client for interacting with the DeviceOnlineTime builders.
	DeviceOnlineTime *DeviceOnlineTimeClient
	// DeviceUpsterCycle is the client for interacting with the DeviceUpsterCycle builders.
	DeviceUpsterCycle *DeviceUpsterCycleClient
	// DeviceUpsterStatistics is the client for interacting with the DeviceUpsterStatistics builders.
	DeviceUpsterStatistics *DeviceUpsterStatisticsClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

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

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

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

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

func (*Client) BeginTx

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

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

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

func (*Client) Debug

func (c *Client) Debug() *Client

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

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

func (*Client) ExecContext

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

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

func (*Client) Intercept

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

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

func (*Client) Mutate

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

Mutate implements the ent.Mutator interface.

func (*Client) QueryContext

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

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

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type DeviceDuration

type DeviceDuration struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// Date | 日期
	Date string `json:"date,omitempty"`
	// StandBy | 待机
	StandBy int32 `json:"standBy,omitempty"`
	// Preparation | 准备
	Preparation int32 `json:"preparation,omitempty"`
	// Waiting | 等待
	Waiting int32 `json:"waiting,omitempty"`
	// Washing Cold | 洗涤冷
	WashingCold int32 `json:"washingCold,omitempty"`
	// Washing | 洗涤热
	Washing int32 `json:"washing,omitempty"`
	// Ebutton | 紧急按钮
	Ebutton int32 `json:"ebutton,omitempty"`
	// Day Json | 每日详情
	DayJson string `json:"dayJson,omitempty"`
	// contains filtered or unexported fields
}

DeviceDuration is the model entity for the DeviceDuration schema.

func (*DeviceDuration) ExecContext

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

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

func (*DeviceDuration) QueryContext

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

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

func (*DeviceDuration) String

func (dd *DeviceDuration) String() string

String implements the fmt.Stringer.

func (*DeviceDuration) Unwrap

func (dd *DeviceDuration) Unwrap() *DeviceDuration

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

func (*DeviceDuration) Update

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

func (*DeviceDuration) Value

func (dd *DeviceDuration) Value(name string) (ent.Value, error)

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

type DeviceDurationClient

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

DeviceDurationClient is a client for the DeviceDuration schema.

func NewDeviceDurationClient

func NewDeviceDurationClient(c config) *DeviceDurationClient

NewDeviceDurationClient returns a client for the DeviceDuration from the given config.

func (*DeviceDurationClient) Create

Create returns a builder for creating a DeviceDuration entity.

func (*DeviceDurationClient) CreateBulk

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

func (*DeviceDurationClient) Delete

Delete returns a delete builder for DeviceDuration.

func (*DeviceDurationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceDurationClient) DeleteOneID

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

func (*DeviceDurationClient) ExecContext

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

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

func (*DeviceDurationClient) Get

Get returns a DeviceDuration entity by its id.

func (*DeviceDurationClient) GetX

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

func (*DeviceDurationClient) Hooks

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

Hooks returns the client hooks.

func (*DeviceDurationClient) Intercept

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

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

func (*DeviceDurationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DeviceDurationClient) MapCreateBulk

func (c *DeviceDurationClient) MapCreateBulk(slice any, setFunc func(*DeviceDurationCreate, int)) *DeviceDurationCreateBulk

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

func (*DeviceDurationClient) Query

Query returns a query builder for DeviceDuration.

func (*DeviceDurationClient) QueryContext

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

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

func (*DeviceDurationClient) Update

Update returns an update builder for DeviceDuration.

func (*DeviceDurationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceDurationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeviceDurationClient) Use

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

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

type DeviceDurationCreate

type DeviceDurationCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceDurationCreate is the builder for creating a DeviceDuration entity.

func (*DeviceDurationCreate) Exec

func (ddc *DeviceDurationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceDurationCreate) ExecContext

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

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

func (*DeviceDurationCreate) ExecX

func (ddc *DeviceDurationCreate) ExecX(ctx context.Context)

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

func (*DeviceDurationCreate) Mutation

Mutation returns the DeviceDurationMutation object of the builder.

func (*DeviceDurationCreate) OnConflict

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

client.DeviceDuration.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceDurationUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceDurationCreate) OnConflictColumns

func (ddc *DeviceDurationCreate) OnConflictColumns(columns ...string) *DeviceDurationUpsertOne

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

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

func (*DeviceDurationCreate) QueryContext

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

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

func (*DeviceDurationCreate) Save

Save creates the DeviceDuration in the database.

func (*DeviceDurationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceDurationCreate) SetCreatedAt

func (ddc *DeviceDurationCreate) SetCreatedAt(t time.Time) *DeviceDurationCreate

SetCreatedAt sets the "created_at" field.

func (*DeviceDurationCreate) SetDate

SetDate sets the "date" field.

func (*DeviceDurationCreate) SetDayJson

func (ddc *DeviceDurationCreate) SetDayJson(s string) *DeviceDurationCreate

SetDayJson sets the "dayJson" field.

func (*DeviceDurationCreate) SetDeviceName

func (ddc *DeviceDurationCreate) SetDeviceName(s string) *DeviceDurationCreate

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationCreate) SetEbutton

func (ddc *DeviceDurationCreate) SetEbutton(i int32) *DeviceDurationCreate

SetEbutton sets the "ebutton" field.

func (*DeviceDurationCreate) SetID

SetID sets the "id" field.

func (*DeviceDurationCreate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationCreate) SetNillableCreatedAt

func (ddc *DeviceDurationCreate) SetNillableCreatedAt(t *time.Time) *DeviceDurationCreate

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

func (*DeviceDurationCreate) SetNillableDate

func (ddc *DeviceDurationCreate) SetNillableDate(s *string) *DeviceDurationCreate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableDayJson

func (ddc *DeviceDurationCreate) SetNillableDayJson(s *string) *DeviceDurationCreate

SetNillableDayJson sets the "dayJson" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableEbutton

func (ddc *DeviceDurationCreate) SetNillableEbutton(i *int32) *DeviceDurationCreate

SetNillableEbutton sets the "ebutton" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillablePreparation

func (ddc *DeviceDurationCreate) SetNillablePreparation(i *int32) *DeviceDurationCreate

SetNillablePreparation sets the "preparation" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableSort

func (ddc *DeviceDurationCreate) SetNillableSort(u *uint32) *DeviceDurationCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableStandBy

func (ddc *DeviceDurationCreate) SetNillableStandBy(i *int32) *DeviceDurationCreate

SetNillableStandBy sets the "standBy" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableStatus

func (ddc *DeviceDurationCreate) SetNillableStatus(u *uint8) *DeviceDurationCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableUpdatedAt

func (ddc *DeviceDurationCreate) SetNillableUpdatedAt(t *time.Time) *DeviceDurationCreate

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

func (*DeviceDurationCreate) SetNillableWaiting

func (ddc *DeviceDurationCreate) SetNillableWaiting(i *int32) *DeviceDurationCreate

SetNillableWaiting sets the "waiting" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableWashing

func (ddc *DeviceDurationCreate) SetNillableWashing(i *int32) *DeviceDurationCreate

SetNillableWashing sets the "washing" field if the given value is not nil.

func (*DeviceDurationCreate) SetNillableWashingCold

func (ddc *DeviceDurationCreate) SetNillableWashingCold(i *int32) *DeviceDurationCreate

SetNillableWashingCold sets the "washingCold" field if the given value is not nil.

func (*DeviceDurationCreate) SetNotNilDate

func (dd *DeviceDurationCreate) SetNotNilDate(value *string) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilDayJson

func (dd *DeviceDurationCreate) SetNotNilDayJson(value *string) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilDeviceName

func (dd *DeviceDurationCreate) SetNotNilDeviceName(value *string) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilEbutton

func (dd *DeviceDurationCreate) SetNotNilEbutton(value *int32) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilIotID

func (dd *DeviceDurationCreate) SetNotNilIotID(value *string) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilPreparation

func (dd *DeviceDurationCreate) SetNotNilPreparation(value *int32) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilProductKey

func (dd *DeviceDurationCreate) SetNotNilProductKey(value *string) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilSort

func (dd *DeviceDurationCreate) SetNotNilSort(value *uint32) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilStandBy

func (dd *DeviceDurationCreate) SetNotNilStandBy(value *int32) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilStatus

func (dd *DeviceDurationCreate) SetNotNilStatus(value *uint8) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilUpdatedAt

func (dd *DeviceDurationCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilWaiting

func (dd *DeviceDurationCreate) SetNotNilWaiting(value *int32) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilWashing

func (dd *DeviceDurationCreate) SetNotNilWashing(value *int32) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetNotNilWashingCold

func (dd *DeviceDurationCreate) SetNotNilWashingCold(value *int32) *DeviceDurationCreate

set field if value's pointer is not nil.

func (*DeviceDurationCreate) SetPreparation

func (ddc *DeviceDurationCreate) SetPreparation(i int32) *DeviceDurationCreate

SetPreparation sets the "preparation" field.

func (*DeviceDurationCreate) SetProductKey

func (ddc *DeviceDurationCreate) SetProductKey(s string) *DeviceDurationCreate

SetProductKey sets the "productKey" field.

func (*DeviceDurationCreate) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationCreate) SetStandBy

func (ddc *DeviceDurationCreate) SetStandBy(i int32) *DeviceDurationCreate

SetStandBy sets the "standBy" field.

func (*DeviceDurationCreate) SetStatus

func (ddc *DeviceDurationCreate) SetStatus(u uint8) *DeviceDurationCreate

SetStatus sets the "status" field.

func (*DeviceDurationCreate) SetUpdatedAt

func (ddc *DeviceDurationCreate) SetUpdatedAt(t time.Time) *DeviceDurationCreate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationCreate) SetWaiting

func (ddc *DeviceDurationCreate) SetWaiting(i int32) *DeviceDurationCreate

SetWaiting sets the "waiting" field.

func (*DeviceDurationCreate) SetWashing

func (ddc *DeviceDurationCreate) SetWashing(i int32) *DeviceDurationCreate

SetWashing sets the "washing" field.

func (*DeviceDurationCreate) SetWashingCold

func (ddc *DeviceDurationCreate) SetWashingCold(i int32) *DeviceDurationCreate

SetWashingCold sets the "washingCold" field.

func (*DeviceDurationCreate) TableName

type DeviceDurationCreateBulk

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

DeviceDurationCreateBulk is the builder for creating many DeviceDuration entities in bulk.

func (*DeviceDurationCreateBulk) Exec

Exec executes the query.

func (*DeviceDurationCreateBulk) ExecContext

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

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

func (*DeviceDurationCreateBulk) ExecX

func (ddcb *DeviceDurationCreateBulk) ExecX(ctx context.Context)

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

func (*DeviceDurationCreateBulk) OnConflict

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

client.DeviceDuration.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceDurationUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceDurationCreateBulk) OnConflictColumns

func (ddcb *DeviceDurationCreateBulk) OnConflictColumns(columns ...string) *DeviceDurationUpsertBulk

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

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

func (*DeviceDurationCreateBulk) QueryContext

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

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

func (*DeviceDurationCreateBulk) Save

Save creates the DeviceDuration entities in the database.

func (*DeviceDurationCreateBulk) SaveX

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

type DeviceDurationDelete

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

DeviceDurationDelete is the builder for deleting a DeviceDuration entity.

func (*DeviceDurationDelete) Exec

func (ddd *DeviceDurationDelete) Exec(ctx context.Context) (int, error)

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

func (*DeviceDurationDelete) ExecContext

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

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

func (*DeviceDurationDelete) ExecX

func (ddd *DeviceDurationDelete) ExecX(ctx context.Context) int

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

func (*DeviceDurationDelete) QueryContext

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

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

func (*DeviceDurationDelete) Where

Where appends a list predicates to the DeviceDurationDelete builder.

type DeviceDurationDeleteOne

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

DeviceDurationDeleteOne is the builder for deleting a single DeviceDuration entity.

func (*DeviceDurationDeleteOne) Exec

func (dddo *DeviceDurationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeviceDurationDeleteOne) ExecX

func (dddo *DeviceDurationDeleteOne) ExecX(ctx context.Context)

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

func (*DeviceDurationDeleteOne) Where

Where appends a list predicates to the DeviceDurationDelete builder.

type DeviceDurationElephant

type DeviceDurationElephant struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// Date | 日期
	Date string `json:"date,omitempty"`
	// Connected | 已连接
	Connected int32 `json:"connected,omitempty"`
	// running | 运行
	Running int32 `json:"running,omitempty"`
	// Ebutton | 紧急按钮
	Ebutton int32 `json:"ebutton,omitempty"`
	// Day Json | 每日详情
	DayJson string `json:"dayJson,omitempty"`
	// contains filtered or unexported fields
}

DeviceDurationElephant is the model entity for the DeviceDurationElephant schema.

func (*DeviceDurationElephant) ExecContext

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

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

func (*DeviceDurationElephant) QueryContext

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

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

func (*DeviceDurationElephant) String

func (dde *DeviceDurationElephant) String() string

String implements the fmt.Stringer.

func (*DeviceDurationElephant) Unwrap

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

func (*DeviceDurationElephant) Update

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

func (*DeviceDurationElephant) Value

func (dde *DeviceDurationElephant) Value(name string) (ent.Value, error)

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

type DeviceDurationElephantClient

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

DeviceDurationElephantClient is a client for the DeviceDurationElephant schema.

func NewDeviceDurationElephantClient

func NewDeviceDurationElephantClient(c config) *DeviceDurationElephantClient

NewDeviceDurationElephantClient returns a client for the DeviceDurationElephant from the given config.

func (*DeviceDurationElephantClient) Create

Create returns a builder for creating a DeviceDurationElephant entity.

func (*DeviceDurationElephantClient) CreateBulk

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

func (*DeviceDurationElephantClient) Delete

Delete returns a delete builder for DeviceDurationElephant.

func (*DeviceDurationElephantClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceDurationElephantClient) DeleteOneID

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

func (*DeviceDurationElephantClient) ExecContext

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

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

func (*DeviceDurationElephantClient) Get

Get returns a DeviceDurationElephant entity by its id.

func (*DeviceDurationElephantClient) GetX

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

func (*DeviceDurationElephantClient) Hooks

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

Hooks returns the client hooks.

func (*DeviceDurationElephantClient) Intercept

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

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

func (*DeviceDurationElephantClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DeviceDurationElephantClient) MapCreateBulk

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

func (*DeviceDurationElephantClient) Query

Query returns a query builder for DeviceDurationElephant.

func (*DeviceDurationElephantClient) QueryContext

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

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

func (*DeviceDurationElephantClient) Update

Update returns an update builder for DeviceDurationElephant.

func (*DeviceDurationElephantClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceDurationElephantClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeviceDurationElephantClient) Use

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

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

type DeviceDurationElephantCreate

type DeviceDurationElephantCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceDurationElephantCreate is the builder for creating a DeviceDurationElephant entity.

func (*DeviceDurationElephantCreate) Exec

Exec executes the query.

func (*DeviceDurationElephantCreate) ExecContext

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

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

func (*DeviceDurationElephantCreate) ExecX

func (ddec *DeviceDurationElephantCreate) ExecX(ctx context.Context)

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

func (*DeviceDurationElephantCreate) Mutation

Mutation returns the DeviceDurationElephantMutation object of the builder.

func (*DeviceDurationElephantCreate) OnConflict

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

client.DeviceDurationElephant.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceDurationElephantUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceDurationElephantCreate) OnConflictColumns

func (ddec *DeviceDurationElephantCreate) OnConflictColumns(columns ...string) *DeviceDurationElephantUpsertOne

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

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

func (*DeviceDurationElephantCreate) QueryContext

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

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

func (*DeviceDurationElephantCreate) Save

Save creates the DeviceDurationElephant in the database.

func (*DeviceDurationElephantCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceDurationElephantCreate) SetConnected

SetConnected sets the "connected" field.

func (*DeviceDurationElephantCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeviceDurationElephantCreate) SetDate

SetDate sets the "date" field.

func (*DeviceDurationElephantCreate) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationElephantCreate) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationElephantCreate) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationElephantCreate) SetID

SetID sets the "id" field.

func (*DeviceDurationElephantCreate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationElephantCreate) SetNillableConnected

func (ddec *DeviceDurationElephantCreate) SetNillableConnected(i *int32) *DeviceDurationElephantCreate

SetNillableConnected sets the "connected" field if the given value is not nil.

func (*DeviceDurationElephantCreate) SetNillableCreatedAt

func (ddec *DeviceDurationElephantCreate) SetNillableCreatedAt(t *time.Time) *DeviceDurationElephantCreate

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

func (*DeviceDurationElephantCreate) SetNillableDate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceDurationElephantCreate) SetNillableDayJson

SetNillableDayJson sets the "dayJson" field if the given value is not nil.

func (*DeviceDurationElephantCreate) SetNillableEbutton

func (ddec *DeviceDurationElephantCreate) SetNillableEbutton(i *int32) *DeviceDurationElephantCreate

SetNillableEbutton sets the "ebutton" field if the given value is not nil.

func (*DeviceDurationElephantCreate) SetNillableRunning

func (ddec *DeviceDurationElephantCreate) SetNillableRunning(i *int32) *DeviceDurationElephantCreate

SetNillableRunning sets the "running" field if the given value is not nil.

func (*DeviceDurationElephantCreate) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceDurationElephantCreate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceDurationElephantCreate) SetNillableUpdatedAt

func (ddec *DeviceDurationElephantCreate) SetNillableUpdatedAt(t *time.Time) *DeviceDurationElephantCreate

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

func (*DeviceDurationElephantCreate) SetNotNilConnected

func (dde *DeviceDurationElephantCreate) SetNotNilConnected(value *int32) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilDate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilDayJson

func (dde *DeviceDurationElephantCreate) SetNotNilDayJson(value *string) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilDeviceName

func (dde *DeviceDurationElephantCreate) SetNotNilDeviceName(value *string) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilEbutton

func (dde *DeviceDurationElephantCreate) SetNotNilEbutton(value *int32) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilIotID

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilProductKey

func (dde *DeviceDurationElephantCreate) SetNotNilProductKey(value *string) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilRunning

func (dde *DeviceDurationElephantCreate) SetNotNilRunning(value *int32) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilSort

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilStatus

func (dde *DeviceDurationElephantCreate) SetNotNilStatus(value *uint8) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetNotNilUpdatedAt

func (dde *DeviceDurationElephantCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceDurationElephantCreate

set field if value's pointer is not nil.

func (*DeviceDurationElephantCreate) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationElephantCreate) SetRunning

SetRunning sets the "running" field.

func (*DeviceDurationElephantCreate) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationElephantCreate) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationElephantCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationElephantCreate) TableName

type DeviceDurationElephantCreateBulk

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

DeviceDurationElephantCreateBulk is the builder for creating many DeviceDurationElephant entities in bulk.

func (*DeviceDurationElephantCreateBulk) Exec

Exec executes the query.

func (*DeviceDurationElephantCreateBulk) ExecContext

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

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

func (*DeviceDurationElephantCreateBulk) ExecX

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

func (*DeviceDurationElephantCreateBulk) OnConflict

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

client.DeviceDurationElephant.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceDurationElephantUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceDurationElephantCreateBulk) OnConflictColumns

func (ddecb *DeviceDurationElephantCreateBulk) OnConflictColumns(columns ...string) *DeviceDurationElephantUpsertBulk

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

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

func (*DeviceDurationElephantCreateBulk) QueryContext

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

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

func (*DeviceDurationElephantCreateBulk) Save

Save creates the DeviceDurationElephant entities in the database.

func (*DeviceDurationElephantCreateBulk) SaveX

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

type DeviceDurationElephantDelete

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

DeviceDurationElephantDelete is the builder for deleting a DeviceDurationElephant entity.

func (*DeviceDurationElephantDelete) Exec

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

func (*DeviceDurationElephantDelete) ExecContext

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

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

func (*DeviceDurationElephantDelete) ExecX

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

func (*DeviceDurationElephantDelete) QueryContext

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

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

func (*DeviceDurationElephantDelete) Where

Where appends a list predicates to the DeviceDurationElephantDelete builder.

type DeviceDurationElephantDeleteOne

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

DeviceDurationElephantDeleteOne is the builder for deleting a single DeviceDurationElephant entity.

func (*DeviceDurationElephantDeleteOne) Exec

Exec executes the deletion query.

func (*DeviceDurationElephantDeleteOne) ExecX

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

func (*DeviceDurationElephantDeleteOne) Where

Where appends a list predicates to the DeviceDurationElephantDelete builder.

type DeviceDurationElephantGroupBy

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

DeviceDurationElephantGroupBy is the group-by builder for DeviceDurationElephant entities.

func (*DeviceDurationElephantGroupBy) Aggregate

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

func (*DeviceDurationElephantGroupBy) Bool

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

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

func (*DeviceDurationElephantGroupBy) BoolX

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

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

func (*DeviceDurationElephantGroupBy) Bools

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

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

func (*DeviceDurationElephantGroupBy) BoolsX

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

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

func (*DeviceDurationElephantGroupBy) Float64

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

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

func (*DeviceDurationElephantGroupBy) Float64X

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

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

func (*DeviceDurationElephantGroupBy) Float64s

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

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

func (*DeviceDurationElephantGroupBy) Float64sX

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

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

func (*DeviceDurationElephantGroupBy) Int

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

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

func (*DeviceDurationElephantGroupBy) IntX

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

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

func (*DeviceDurationElephantGroupBy) Ints

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

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

func (*DeviceDurationElephantGroupBy) IntsX

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

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

func (*DeviceDurationElephantGroupBy) Scan

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

func (*DeviceDurationElephantGroupBy) ScanX

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

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

func (*DeviceDurationElephantGroupBy) String

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

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

func (*DeviceDurationElephantGroupBy) StringX

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

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

func (*DeviceDurationElephantGroupBy) Strings

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

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

func (*DeviceDurationElephantGroupBy) StringsX

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

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

type DeviceDurationElephantMutation

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

DeviceDurationElephantMutation represents an operation that mutates the DeviceDurationElephant nodes in the graph.

func (*DeviceDurationElephantMutation) AddConnected

func (m *DeviceDurationElephantMutation) AddConnected(i int32)

AddConnected adds i to the "connected" field.

func (*DeviceDurationElephantMutation) AddEbutton

func (m *DeviceDurationElephantMutation) AddEbutton(i int32)

AddEbutton adds i to the "ebutton" field.

func (*DeviceDurationElephantMutation) AddField

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

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

func (*DeviceDurationElephantMutation) AddRunning

func (m *DeviceDurationElephantMutation) AddRunning(i int32)

AddRunning adds i to the "running" field.

func (*DeviceDurationElephantMutation) AddSort

func (m *DeviceDurationElephantMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceDurationElephantMutation) AddStatus

func (m *DeviceDurationElephantMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceDurationElephantMutation) AddedConnected

func (m *DeviceDurationElephantMutation) AddedConnected() (r int32, exists bool)

AddedConnected returns the value that was added to the "connected" field in this mutation.

func (*DeviceDurationElephantMutation) AddedEbutton

func (m *DeviceDurationElephantMutation) AddedEbutton() (r int32, exists bool)

AddedEbutton returns the value that was added to the "ebutton" field in this mutation.

func (*DeviceDurationElephantMutation) AddedEdges

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

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

func (*DeviceDurationElephantMutation) AddedField

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

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceDurationElephantMutation) AddedFields

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

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

func (*DeviceDurationElephantMutation) AddedIDs

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

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

func (*DeviceDurationElephantMutation) AddedRunning

func (m *DeviceDurationElephantMutation) AddedRunning() (r int32, exists bool)

AddedRunning returns the value that was added to the "running" field in this mutation.

func (*DeviceDurationElephantMutation) AddedSort

func (m *DeviceDurationElephantMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceDurationElephantMutation) AddedStatus

func (m *DeviceDurationElephantMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceDurationElephantMutation) ClearConnected

func (m *DeviceDurationElephantMutation) ClearConnected()

ClearConnected clears the value of the "connected" field.

func (*DeviceDurationElephantMutation) ClearDate

func (m *DeviceDurationElephantMutation) ClearDate()

ClearDate clears the value of the "date" field.

func (*DeviceDurationElephantMutation) ClearDayJson

func (m *DeviceDurationElephantMutation) ClearDayJson()

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationElephantMutation) ClearEbutton

func (m *DeviceDurationElephantMutation) ClearEbutton()

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationElephantMutation) ClearEdge

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

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

func (*DeviceDurationElephantMutation) ClearField

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

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

func (*DeviceDurationElephantMutation) ClearRunning

func (m *DeviceDurationElephantMutation) ClearRunning()

ClearRunning clears the value of the "running" field.

func (*DeviceDurationElephantMutation) ClearStatus

func (m *DeviceDurationElephantMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceDurationElephantMutation) ClearedEdges

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

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

func (*DeviceDurationElephantMutation) ClearedFields

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

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

func (DeviceDurationElephantMutation) 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 (*DeviceDurationElephantMutation) Connected

func (m *DeviceDurationElephantMutation) Connected() (r int32, exists bool)

Connected returns the value of the "connected" field in the mutation.

func (*DeviceDurationElephantMutation) ConnectedCleared

func (m *DeviceDurationElephantMutation) ConnectedCleared() bool

ConnectedCleared returns if the "connected" field was cleared in this mutation.

func (*DeviceDurationElephantMutation) CreatedAt

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

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceDurationElephantMutation) Date

func (m *DeviceDurationElephantMutation) Date() (r string, exists bool)

Date returns the value of the "date" field in the mutation.

func (*DeviceDurationElephantMutation) DateCleared

func (m *DeviceDurationElephantMutation) DateCleared() bool

DateCleared returns if the "date" field was cleared in this mutation.

func (*DeviceDurationElephantMutation) DayJson

func (m *DeviceDurationElephantMutation) DayJson() (r string, exists bool)

DayJson returns the value of the "dayJson" field in the mutation.

func (*DeviceDurationElephantMutation) DayJsonCleared

func (m *DeviceDurationElephantMutation) DayJsonCleared() bool

DayJsonCleared returns if the "dayJson" field was cleared in this mutation.

func (*DeviceDurationElephantMutation) DeviceName

func (m *DeviceDurationElephantMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceDurationElephantMutation) Ebutton

func (m *DeviceDurationElephantMutation) Ebutton() (r int32, exists bool)

Ebutton returns the value of the "ebutton" field in the mutation.

func (*DeviceDurationElephantMutation) EbuttonCleared

func (m *DeviceDurationElephantMutation) EbuttonCleared() bool

EbuttonCleared returns if the "ebutton" field was cleared in this mutation.

func (*DeviceDurationElephantMutation) EdgeCleared

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

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

func (*DeviceDurationElephantMutation) ExecContext

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

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

func (*DeviceDurationElephantMutation) Field

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

func (*DeviceDurationElephantMutation) FieldCleared

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

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

func (*DeviceDurationElephantMutation) Fields

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

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

func (*DeviceDurationElephantMutation) ID

func (m *DeviceDurationElephantMutation) ID() (id uint64, exists bool)

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

func (*DeviceDurationElephantMutation) IDs

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

func (*DeviceDurationElephantMutation) IotID

func (m *DeviceDurationElephantMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceDurationElephantMutation) OldConnected

func (m *DeviceDurationElephantMutation) OldConnected(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationElephantMutation) OldCreatedAt

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

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

func (*DeviceDurationElephantMutation) OldDate

func (m *DeviceDurationElephantMutation) OldDate(ctx context.Context) (v string, err error)

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

func (*DeviceDurationElephantMutation) OldDayJson

func (m *DeviceDurationElephantMutation) OldDayJson(ctx context.Context) (v string, err error)

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

func (*DeviceDurationElephantMutation) OldDeviceName

func (m *DeviceDurationElephantMutation) OldDeviceName(ctx context.Context) (v string, err error)

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

func (*DeviceDurationElephantMutation) OldEbutton

func (m *DeviceDurationElephantMutation) OldEbutton(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationElephantMutation) OldField

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

func (*DeviceDurationElephantMutation) OldIotID

func (m *DeviceDurationElephantMutation) OldIotID(ctx context.Context) (v string, err error)

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

func (*DeviceDurationElephantMutation) OldProductKey

func (m *DeviceDurationElephantMutation) OldProductKey(ctx context.Context) (v string, err error)

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

func (*DeviceDurationElephantMutation) OldRunning

func (m *DeviceDurationElephantMutation) OldRunning(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationElephantMutation) OldSort

func (m *DeviceDurationElephantMutation) OldSort(ctx context.Context) (v uint32, err error)

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

func (*DeviceDurationElephantMutation) OldStatus

func (m *DeviceDurationElephantMutation) OldStatus(ctx context.Context) (v uint8, err error)

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

func (*DeviceDurationElephantMutation) OldUpdatedAt

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

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

func (*DeviceDurationElephantMutation) Op

Op returns the operation name.

func (*DeviceDurationElephantMutation) ProductKey

func (m *DeviceDurationElephantMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceDurationElephantMutation) QueryContext

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

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

func (*DeviceDurationElephantMutation) RemovedEdges

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

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

func (*DeviceDurationElephantMutation) RemovedIDs

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

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceDurationElephantMutation) ResetConnected

func (m *DeviceDurationElephantMutation) ResetConnected()

ResetConnected resets all changes to the "connected" field.

func (*DeviceDurationElephantMutation) ResetCreatedAt

func (m *DeviceDurationElephantMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceDurationElephantMutation) ResetDate

func (m *DeviceDurationElephantMutation) ResetDate()

ResetDate resets all changes to the "date" field.

func (*DeviceDurationElephantMutation) ResetDayJson

func (m *DeviceDurationElephantMutation) ResetDayJson()

ResetDayJson resets all changes to the "dayJson" field.

func (*DeviceDurationElephantMutation) ResetDeviceName

func (m *DeviceDurationElephantMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceDurationElephantMutation) ResetEbutton

func (m *DeviceDurationElephantMutation) ResetEbutton()

ResetEbutton resets all changes to the "ebutton" field.

func (*DeviceDurationElephantMutation) ResetEdge

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

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

func (*DeviceDurationElephantMutation) ResetField

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

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

func (*DeviceDurationElephantMutation) ResetIotID

func (m *DeviceDurationElephantMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceDurationElephantMutation) ResetProductKey

func (m *DeviceDurationElephantMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceDurationElephantMutation) ResetRunning

func (m *DeviceDurationElephantMutation) ResetRunning()

ResetRunning resets all changes to the "running" field.

func (*DeviceDurationElephantMutation) ResetSort

func (m *DeviceDurationElephantMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceDurationElephantMutation) ResetStatus

func (m *DeviceDurationElephantMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceDurationElephantMutation) ResetUpdatedAt

func (m *DeviceDurationElephantMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceDurationElephantMutation) Running

func (m *DeviceDurationElephantMutation) Running() (r int32, exists bool)

Running returns the value of the "running" field in the mutation.

func (*DeviceDurationElephantMutation) RunningCleared

func (m *DeviceDurationElephantMutation) RunningCleared() bool

RunningCleared returns if the "running" field was cleared in this mutation.

func (*DeviceDurationElephantMutation) SetConnected

func (m *DeviceDurationElephantMutation) SetConnected(i int32)

SetConnected sets the "connected" field.

func (*DeviceDurationElephantMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*DeviceDurationElephantMutation) SetDate

func (m *DeviceDurationElephantMutation) SetDate(s string)

SetDate sets the "date" field.

func (*DeviceDurationElephantMutation) SetDayJson

func (m *DeviceDurationElephantMutation) SetDayJson(s string)

SetDayJson sets the "dayJson" field.

func (*DeviceDurationElephantMutation) SetDeviceName

func (m *DeviceDurationElephantMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationElephantMutation) SetEbutton

func (m *DeviceDurationElephantMutation) SetEbutton(i int32)

SetEbutton sets the "ebutton" field.

func (*DeviceDurationElephantMutation) SetField

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

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceDurationElephantMutation) SetID

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

func (*DeviceDurationElephantMutation) SetIotID

func (m *DeviceDurationElephantMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceDurationElephantMutation) SetOp

func (m *DeviceDurationElephantMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceDurationElephantMutation) SetProductKey

func (m *DeviceDurationElephantMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceDurationElephantMutation) SetRunning

func (m *DeviceDurationElephantMutation) SetRunning(i int32)

SetRunning sets the "running" field.

func (*DeviceDurationElephantMutation) SetSort

func (m *DeviceDurationElephantMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceDurationElephantMutation) SetStatus

func (m *DeviceDurationElephantMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceDurationElephantMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationElephantMutation) Sort

func (m *DeviceDurationElephantMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceDurationElephantMutation) Status

func (m *DeviceDurationElephantMutation) Status() (r uint8, exists bool)

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

func (*DeviceDurationElephantMutation) StatusCleared

func (m *DeviceDurationElephantMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (DeviceDurationElephantMutation) Tx

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

func (*DeviceDurationElephantMutation) Type

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

func (*DeviceDurationElephantMutation) UpdatedAt

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

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceDurationElephantMutation) Where

Where appends a list predicates to the DeviceDurationElephantMutation builder.

func (*DeviceDurationElephantMutation) WhereP

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

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

type DeviceDurationElephantPageList

type DeviceDurationElephantPageList struct {
	List        []*DeviceDurationElephant `json:"list"`
	PageDetails *PageDetails              `json:"pageDetails"`
}

DeviceDurationElephantPageList is DeviceDurationElephant PageList result.

type DeviceDurationElephantPager

type DeviceDurationElephantPager struct {
	Order  devicedurationelephant.OrderOption
	Filter func(*DeviceDurationElephantQuery) (*DeviceDurationElephantQuery, error)
}

func (*DeviceDurationElephantPager) ApplyFilter

type DeviceDurationElephantPaginateOption

type DeviceDurationElephantPaginateOption func(*DeviceDurationElephantPager)

DeviceDurationElephantPaginateOption enables pagination customization.

type DeviceDurationElephantQuery

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

DeviceDurationElephantQuery is the builder for querying DeviceDurationElephant entities.

func (*DeviceDurationElephantQuery) Aggregate

Aggregate returns a DeviceDurationElephantSelect configured with the given aggregations.

func (*DeviceDurationElephantQuery) All

All executes the query and returns a list of DeviceDurationElephants.

func (*DeviceDurationElephantQuery) AllX

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

func (*DeviceDurationElephantQuery) Clone

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

func (*DeviceDurationElephantQuery) Count

func (ddeq *DeviceDurationElephantQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceDurationElephantQuery) CountX

func (ddeq *DeviceDurationElephantQuery) CountX(ctx context.Context) int

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

func (*DeviceDurationElephantQuery) ExecContext

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

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

func (*DeviceDurationElephantQuery) Exist

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

func (*DeviceDurationElephantQuery) ExistX

func (ddeq *DeviceDurationElephantQuery) ExistX(ctx context.Context) bool

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

func (*DeviceDurationElephantQuery) First

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

func (*DeviceDurationElephantQuery) FirstID

func (ddeq *DeviceDurationElephantQuery) FirstID(ctx context.Context) (id uint64, err error)

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

func (*DeviceDurationElephantQuery) FirstIDX

func (ddeq *DeviceDurationElephantQuery) FirstIDX(ctx context.Context) uint64

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

func (*DeviceDurationElephantQuery) FirstX

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

func (*DeviceDurationElephantQuery) GroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

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

client.DeviceDurationElephant.Query().
	GroupBy(devicedurationelephant.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceDurationElephantQuery) IDs

func (ddeq *DeviceDurationElephantQuery) IDs(ctx context.Context) (ids []uint64, err error)

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

func (*DeviceDurationElephantQuery) IDsX

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

func (*DeviceDurationElephantQuery) Limit

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

func (*DeviceDurationElephantQuery) Modify

func (ddeq *DeviceDurationElephantQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceDurationElephantSelect

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

func (*DeviceDurationElephantQuery) Offset

Offset to start from.

func (*DeviceDurationElephantQuery) Only

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

func (*DeviceDurationElephantQuery) OnlyID

func (ddeq *DeviceDurationElephantQuery) OnlyID(ctx context.Context) (id uint64, err error)

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

func (*DeviceDurationElephantQuery) OnlyIDX

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

func (*DeviceDurationElephantQuery) OnlyX

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

func (*DeviceDurationElephantQuery) Order

Order specifies how the records should be ordered.

func (*DeviceDurationElephantQuery) Page

func (*DeviceDurationElephantQuery) QueryContext

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

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

func (*DeviceDurationElephantQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

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

client.DeviceDurationElephant.Query().
	Select(devicedurationelephant.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceDurationElephantQuery) Unique

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

func (*DeviceDurationElephantQuery) Where

Where adds a new predicate for the DeviceDurationElephantQuery builder.

type DeviceDurationElephantSelect

type DeviceDurationElephantSelect struct {
	*DeviceDurationElephantQuery
	// contains filtered or unexported fields
}

DeviceDurationElephantSelect is the builder for selecting fields of DeviceDurationElephant entities.

func (*DeviceDurationElephantSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceDurationElephantSelect) Bool

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

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

func (*DeviceDurationElephantSelect) BoolX

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

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

func (*DeviceDurationElephantSelect) Bools

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

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

func (*DeviceDurationElephantSelect) BoolsX

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

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

func (DeviceDurationElephantSelect) ExecContext

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

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

func (*DeviceDurationElephantSelect) Float64

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

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

func (*DeviceDurationElephantSelect) Float64X

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

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

func (*DeviceDurationElephantSelect) Float64s

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

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

func (*DeviceDurationElephantSelect) Float64sX

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

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

func (*DeviceDurationElephantSelect) Int

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

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

func (*DeviceDurationElephantSelect) IntX

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

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

func (*DeviceDurationElephantSelect) Ints

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

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

func (*DeviceDurationElephantSelect) IntsX

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

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

func (*DeviceDurationElephantSelect) Modify

func (ddes *DeviceDurationElephantSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceDurationElephantSelect

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

func (DeviceDurationElephantSelect) QueryContext

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

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

func (*DeviceDurationElephantSelect) Scan

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

func (*DeviceDurationElephantSelect) ScanX

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

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

func (*DeviceDurationElephantSelect) String

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

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

func (*DeviceDurationElephantSelect) StringX

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

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

func (*DeviceDurationElephantSelect) Strings

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

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

func (*DeviceDurationElephantSelect) StringsX

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

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

type DeviceDurationElephantUpdate

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

DeviceDurationElephantUpdate is the builder for updating DeviceDurationElephant entities.

func (*DeviceDurationElephantUpdate) AddConnected

AddConnected adds i to the "connected" field.

func (*DeviceDurationElephantUpdate) AddEbutton

AddEbutton adds i to the "ebutton" field.

func (*DeviceDurationElephantUpdate) AddRunning

AddRunning adds i to the "running" field.

func (*DeviceDurationElephantUpdate) AddSort

AddSort adds u to the "sort" field.

func (*DeviceDurationElephantUpdate) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceDurationElephantUpdate) ClearConnected

ClearConnected clears the value of the "connected" field.

func (*DeviceDurationElephantUpdate) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationElephantUpdate) ClearDayJson

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationElephantUpdate) ClearEbutton

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationElephantUpdate) ClearRunning

ClearRunning clears the value of the "running" field.

func (*DeviceDurationElephantUpdate) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceDurationElephantUpdate) Exec

Exec executes the query.

func (*DeviceDurationElephantUpdate) ExecContext

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

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

func (*DeviceDurationElephantUpdate) ExecX

func (ddeu *DeviceDurationElephantUpdate) ExecX(ctx context.Context)

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

func (*DeviceDurationElephantUpdate) Modify

func (ddeu *DeviceDurationElephantUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceDurationElephantUpdate

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

func (*DeviceDurationElephantUpdate) Mutation

Mutation returns the DeviceDurationElephantMutation object of the builder.

func (*DeviceDurationElephantUpdate) QueryContext

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

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

func (*DeviceDurationElephantUpdate) Save

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

func (*DeviceDurationElephantUpdate) SaveX

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

func (*DeviceDurationElephantUpdate) SetConnected

SetConnected sets the "connected" field.

func (*DeviceDurationElephantUpdate) SetDate

SetDate sets the "date" field.

func (*DeviceDurationElephantUpdate) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationElephantUpdate) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationElephantUpdate) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationElephantUpdate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationElephantUpdate) SetNillableConnected

func (ddeu *DeviceDurationElephantUpdate) SetNillableConnected(i *int32) *DeviceDurationElephantUpdate

SetNillableConnected sets the "connected" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableDate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableDayJson

SetNillableDayJson sets the "dayJson" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableDeviceName

func (ddeu *DeviceDurationElephantUpdate) SetNillableDeviceName(s *string) *DeviceDurationElephantUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableEbutton

func (ddeu *DeviceDurationElephantUpdate) SetNillableEbutton(i *int32) *DeviceDurationElephantUpdate

SetNillableEbutton sets the "ebutton" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableIotID

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableProductKey

func (ddeu *DeviceDurationElephantUpdate) SetNillableProductKey(s *string) *DeviceDurationElephantUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableRunning

func (ddeu *DeviceDurationElephantUpdate) SetNillableRunning(i *int32) *DeviceDurationElephantUpdate

SetNillableRunning sets the "running" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilConnected

func (dde *DeviceDurationElephantUpdate) SetNotNilConnected(value *int32) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilDate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilDayJson

func (dde *DeviceDurationElephantUpdate) SetNotNilDayJson(value *string) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilDeviceName

func (dde *DeviceDurationElephantUpdate) SetNotNilDeviceName(value *string) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilEbutton

func (dde *DeviceDurationElephantUpdate) SetNotNilEbutton(value *int32) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilIotID

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilProductKey

func (dde *DeviceDurationElephantUpdate) SetNotNilProductKey(value *string) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilRunning

func (dde *DeviceDurationElephantUpdate) SetNotNilRunning(value *int32) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilSort

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilStatus

func (dde *DeviceDurationElephantUpdate) SetNotNilStatus(value *uint8) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetNotNilUpdatedAt

func (dde *DeviceDurationElephantUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceDurationElephantUpdate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdate) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationElephantUpdate) SetRunning

SetRunning sets the "running" field.

func (*DeviceDurationElephantUpdate) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationElephantUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationElephantUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationElephantUpdate) Where

Where appends a list predicates to the DeviceDurationElephantUpdate builder.

type DeviceDurationElephantUpdateOne

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

DeviceDurationElephantUpdateOne is the builder for updating a single DeviceDurationElephant entity.

func (*DeviceDurationElephantUpdateOne) AddConnected

AddConnected adds i to the "connected" field.

func (*DeviceDurationElephantUpdateOne) AddEbutton

AddEbutton adds i to the "ebutton" field.

func (*DeviceDurationElephantUpdateOne) AddRunning

AddRunning adds i to the "running" field.

func (*DeviceDurationElephantUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceDurationElephantUpdateOne) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceDurationElephantUpdateOne) ClearConnected

ClearConnected clears the value of the "connected" field.

func (*DeviceDurationElephantUpdateOne) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationElephantUpdateOne) ClearDayJson

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationElephantUpdateOne) ClearEbutton

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationElephantUpdateOne) ClearRunning

ClearRunning clears the value of the "running" field.

func (*DeviceDurationElephantUpdateOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceDurationElephantUpdateOne) Exec

Exec executes the query on the entity.

func (*DeviceDurationElephantUpdateOne) ExecContext

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

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

func (*DeviceDurationElephantUpdateOne) ExecX

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

func (*DeviceDurationElephantUpdateOne) Modify

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

func (*DeviceDurationElephantUpdateOne) Mutation

Mutation returns the DeviceDurationElephantMutation object of the builder.

func (*DeviceDurationElephantUpdateOne) QueryContext

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

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

func (*DeviceDurationElephantUpdateOne) Save

Save executes the query and returns the updated DeviceDurationElephant entity.

func (*DeviceDurationElephantUpdateOne) SaveX

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

func (*DeviceDurationElephantUpdateOne) Select

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

func (*DeviceDurationElephantUpdateOne) SetConnected

SetConnected sets the "connected" field.

func (*DeviceDurationElephantUpdateOne) SetDate

SetDate sets the "date" field.

func (*DeviceDurationElephantUpdateOne) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationElephantUpdateOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationElephantUpdateOne) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationElephantUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationElephantUpdateOne) SetNillableConnected

SetNillableConnected sets the "connected" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableDate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableDayJson

SetNillableDayJson sets the "dayJson" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableDeviceName

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableEbutton

SetNillableEbutton sets the "ebutton" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableIotID

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableProductKey

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableRunning

SetNillableRunning sets the "running" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilConnected

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilDate

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilDayJson

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilDeviceName

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilEbutton

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilIotID

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilProductKey

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilRunning

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilSort

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilStatus

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetNotNilUpdatedAt

set field if value's pointer is not nil.

func (*DeviceDurationElephantUpdateOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationElephantUpdateOne) SetRunning

SetRunning sets the "running" field.

func (*DeviceDurationElephantUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationElephantUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationElephantUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationElephantUpdateOne) Where

Where appends a list predicates to the DeviceDurationElephantUpdate builder.

type DeviceDurationElephantUpsert

type DeviceDurationElephantUpsert struct {
	*sql.UpdateSet
}

DeviceDurationElephantUpsert is the "OnConflict" setter.

func (*DeviceDurationElephantUpsert) AddConnected

AddConnected adds v to the "connected" field.

func (*DeviceDurationElephantUpsert) AddEbutton

AddEbutton adds v to the "ebutton" field.

func (*DeviceDurationElephantUpsert) AddRunning

AddRunning adds v to the "running" field.

func (*DeviceDurationElephantUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceDurationElephantUpsert) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceDurationElephantUpsert) ClearConnected

ClearConnected clears the value of the "connected" field.

func (*DeviceDurationElephantUpsert) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationElephantUpsert) ClearDayJson

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationElephantUpsert) ClearEbutton

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationElephantUpsert) ClearRunning

ClearRunning clears the value of the "running" field.

func (*DeviceDurationElephantUpsert) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceDurationElephantUpsert) SetConnected

SetConnected sets the "connected" field.

func (*DeviceDurationElephantUpsert) SetDate

SetDate sets the "date" field.

func (*DeviceDurationElephantUpsert) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationElephantUpsert) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationElephantUpsert) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationElephantUpsert) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationElephantUpsert) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationElephantUpsert) SetRunning

SetRunning sets the "running" field.

func (*DeviceDurationElephantUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationElephantUpsert) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationElephantUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationElephantUpsert) UpdateConnected

UpdateConnected sets the "connected" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateDayJson

UpdateDayJson sets the "dayJson" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateEbutton

UpdateEbutton sets the "ebutton" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateRunning

UpdateRunning sets the "running" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceDurationElephantUpsert) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceDurationElephantUpsertBulk

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

DeviceDurationElephantUpsertBulk is the builder for "upsert"-ing a bulk of DeviceDurationElephant nodes.

func (*DeviceDurationElephantUpsertBulk) AddConnected

AddConnected adds v to the "connected" field.

func (*DeviceDurationElephantUpsertBulk) AddEbutton

AddEbutton adds v to the "ebutton" field.

func (*DeviceDurationElephantUpsertBulk) AddRunning

AddRunning adds v to the "running" field.

func (*DeviceDurationElephantUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceDurationElephantUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceDurationElephantUpsertBulk) ClearConnected

ClearConnected clears the value of the "connected" field.

func (*DeviceDurationElephantUpsertBulk) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationElephantUpsertBulk) ClearDayJson

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationElephantUpsertBulk) ClearEbutton

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationElephantUpsertBulk) ClearRunning

ClearRunning clears the value of the "running" field.

func (*DeviceDurationElephantUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceDurationElephantUpsertBulk) DoNothing

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

func (*DeviceDurationElephantUpsertBulk) Exec

Exec executes the query.

func (*DeviceDurationElephantUpsertBulk) ExecX

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

func (*DeviceDurationElephantUpsertBulk) Ignore

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

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

func (*DeviceDurationElephantUpsertBulk) SetConnected

SetConnected sets the "connected" field.

func (*DeviceDurationElephantUpsertBulk) SetDate

SetDate sets the "date" field.

func (*DeviceDurationElephantUpsertBulk) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationElephantUpsertBulk) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationElephantUpsertBulk) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationElephantUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationElephantUpsertBulk) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationElephantUpsertBulk) SetRunning

SetRunning sets the "running" field.

func (*DeviceDurationElephantUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationElephantUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationElephantUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationElephantUpsertBulk) Update

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

func (*DeviceDurationElephantUpsertBulk) UpdateConnected

UpdateConnected sets the "connected" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateDayJson

UpdateDayJson sets the "dayJson" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateEbutton

UpdateEbutton sets the "ebutton" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateNewValues

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

client.DeviceDurationElephant.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(devicedurationelephant.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceDurationElephantUpsertBulk) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateRunning

UpdateRunning sets the "running" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceDurationElephantUpsertOne

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

DeviceDurationElephantUpsertOne is the builder for "upsert"-ing

one DeviceDurationElephant node.

func (*DeviceDurationElephantUpsertOne) AddConnected

AddConnected adds v to the "connected" field.

func (*DeviceDurationElephantUpsertOne) AddEbutton

AddEbutton adds v to the "ebutton" field.

func (*DeviceDurationElephantUpsertOne) AddRunning

AddRunning adds v to the "running" field.

func (*DeviceDurationElephantUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceDurationElephantUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceDurationElephantUpsertOne) ClearConnected

ClearConnected clears the value of the "connected" field.

func (*DeviceDurationElephantUpsertOne) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationElephantUpsertOne) ClearDayJson

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationElephantUpsertOne) ClearEbutton

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationElephantUpsertOne) ClearRunning

ClearRunning clears the value of the "running" field.

func (*DeviceDurationElephantUpsertOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceDurationElephantUpsertOne) DoNothing

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

func (*DeviceDurationElephantUpsertOne) Exec

Exec executes the query.

func (*DeviceDurationElephantUpsertOne) ExecX

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

func (*DeviceDurationElephantUpsertOne) ID

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

func (*DeviceDurationElephantUpsertOne) IDX

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

func (*DeviceDurationElephantUpsertOne) Ignore

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

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

func (*DeviceDurationElephantUpsertOne) SetConnected

SetConnected sets the "connected" field.

func (*DeviceDurationElephantUpsertOne) SetDate

SetDate sets the "date" field.

func (*DeviceDurationElephantUpsertOne) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationElephantUpsertOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationElephantUpsertOne) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationElephantUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationElephantUpsertOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationElephantUpsertOne) SetRunning

SetRunning sets the "running" field.

func (*DeviceDurationElephantUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationElephantUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationElephantUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationElephantUpsertOne) Update

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

func (*DeviceDurationElephantUpsertOne) UpdateConnected

UpdateConnected sets the "connected" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateDayJson

UpdateDayJson sets the "dayJson" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateEbutton

UpdateEbutton sets the "ebutton" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateNewValues

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

client.DeviceDurationElephant.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(devicedurationelephant.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceDurationElephantUpsertOne) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateRunning

UpdateRunning sets the "running" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceDurationElephantUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceDurationElephants

type DeviceDurationElephants []*DeviceDurationElephant

DeviceDurationElephants is a parsable slice of DeviceDurationElephant.

type DeviceDurationGroupBy

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

DeviceDurationGroupBy is the group-by builder for DeviceDuration entities.

func (*DeviceDurationGroupBy) Aggregate

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

func (*DeviceDurationGroupBy) Bool

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

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

func (*DeviceDurationGroupBy) BoolX

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

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

func (*DeviceDurationGroupBy) Bools

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

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

func (*DeviceDurationGroupBy) BoolsX

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

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

func (*DeviceDurationGroupBy) Float64

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

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

func (*DeviceDurationGroupBy) Float64X

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

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

func (*DeviceDurationGroupBy) Float64s

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

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

func (*DeviceDurationGroupBy) Float64sX

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

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

func (*DeviceDurationGroupBy) Int

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

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

func (*DeviceDurationGroupBy) IntX

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

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

func (*DeviceDurationGroupBy) Ints

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

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

func (*DeviceDurationGroupBy) IntsX

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

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

func (*DeviceDurationGroupBy) Scan

func (ddgb *DeviceDurationGroupBy) Scan(ctx context.Context, v any) error

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

func (*DeviceDurationGroupBy) ScanX

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

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

func (*DeviceDurationGroupBy) String

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

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

func (*DeviceDurationGroupBy) StringX

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

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

func (*DeviceDurationGroupBy) Strings

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

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

func (*DeviceDurationGroupBy) StringsX

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

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

type DeviceDurationMutation

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

DeviceDurationMutation represents an operation that mutates the DeviceDuration nodes in the graph.

func (*DeviceDurationMutation) AddEbutton

func (m *DeviceDurationMutation) AddEbutton(i int32)

AddEbutton adds i to the "ebutton" field.

func (*DeviceDurationMutation) AddField

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

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

func (*DeviceDurationMutation) AddPreparation

func (m *DeviceDurationMutation) AddPreparation(i int32)

AddPreparation adds i to the "preparation" field.

func (*DeviceDurationMutation) AddSort

func (m *DeviceDurationMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceDurationMutation) AddStandBy

func (m *DeviceDurationMutation) AddStandBy(i int32)

AddStandBy adds i to the "standBy" field.

func (*DeviceDurationMutation) AddStatus

func (m *DeviceDurationMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceDurationMutation) AddWaiting

func (m *DeviceDurationMutation) AddWaiting(i int32)

AddWaiting adds i to the "waiting" field.

func (*DeviceDurationMutation) AddWashing

func (m *DeviceDurationMutation) AddWashing(i int32)

AddWashing adds i to the "washing" field.

func (*DeviceDurationMutation) AddWashingCold

func (m *DeviceDurationMutation) AddWashingCold(i int32)

AddWashingCold adds i to the "washingCold" field.

func (*DeviceDurationMutation) AddedEbutton

func (m *DeviceDurationMutation) AddedEbutton() (r int32, exists bool)

AddedEbutton returns the value that was added to the "ebutton" field in this mutation.

func (*DeviceDurationMutation) AddedEdges

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

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

func (*DeviceDurationMutation) AddedField

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

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceDurationMutation) AddedFields

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

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

func (*DeviceDurationMutation) AddedIDs

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

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

func (*DeviceDurationMutation) AddedPreparation

func (m *DeviceDurationMutation) AddedPreparation() (r int32, exists bool)

AddedPreparation returns the value that was added to the "preparation" field in this mutation.

func (*DeviceDurationMutation) AddedSort

func (m *DeviceDurationMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceDurationMutation) AddedStandBy

func (m *DeviceDurationMutation) AddedStandBy() (r int32, exists bool)

AddedStandBy returns the value that was added to the "standBy" field in this mutation.

func (*DeviceDurationMutation) AddedStatus

func (m *DeviceDurationMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceDurationMutation) AddedWaiting

func (m *DeviceDurationMutation) AddedWaiting() (r int32, exists bool)

AddedWaiting returns the value that was added to the "waiting" field in this mutation.

func (*DeviceDurationMutation) AddedWashing

func (m *DeviceDurationMutation) AddedWashing() (r int32, exists bool)

AddedWashing returns the value that was added to the "washing" field in this mutation.

func (*DeviceDurationMutation) AddedWashingCold

func (m *DeviceDurationMutation) AddedWashingCold() (r int32, exists bool)

AddedWashingCold returns the value that was added to the "washingCold" field in this mutation.

func (*DeviceDurationMutation) ClearDate

func (m *DeviceDurationMutation) ClearDate()

ClearDate clears the value of the "date" field.

func (*DeviceDurationMutation) ClearDayJson

func (m *DeviceDurationMutation) ClearDayJson()

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationMutation) ClearEbutton

func (m *DeviceDurationMutation) ClearEbutton()

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationMutation) ClearEdge

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

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

func (*DeviceDurationMutation) ClearField

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

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

func (*DeviceDurationMutation) ClearPreparation

func (m *DeviceDurationMutation) ClearPreparation()

ClearPreparation clears the value of the "preparation" field.

func (*DeviceDurationMutation) ClearStandBy

func (m *DeviceDurationMutation) ClearStandBy()

ClearStandBy clears the value of the "standBy" field.

func (*DeviceDurationMutation) ClearStatus

func (m *DeviceDurationMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceDurationMutation) ClearWaiting

func (m *DeviceDurationMutation) ClearWaiting()

ClearWaiting clears the value of the "waiting" field.

func (*DeviceDurationMutation) ClearWashing

func (m *DeviceDurationMutation) ClearWashing()

ClearWashing clears the value of the "washing" field.

func (*DeviceDurationMutation) ClearWashingCold

func (m *DeviceDurationMutation) ClearWashingCold()

ClearWashingCold clears the value of the "washingCold" field.

func (*DeviceDurationMutation) ClearedEdges

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

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

func (*DeviceDurationMutation) ClearedFields

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

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

func (DeviceDurationMutation) Client

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

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

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceDurationMutation) Date

func (m *DeviceDurationMutation) Date() (r string, exists bool)

Date returns the value of the "date" field in the mutation.

func (*DeviceDurationMutation) DateCleared

func (m *DeviceDurationMutation) DateCleared() bool

DateCleared returns if the "date" field was cleared in this mutation.

func (*DeviceDurationMutation) DayJson

func (m *DeviceDurationMutation) DayJson() (r string, exists bool)

DayJson returns the value of the "dayJson" field in the mutation.

func (*DeviceDurationMutation) DayJsonCleared

func (m *DeviceDurationMutation) DayJsonCleared() bool

DayJsonCleared returns if the "dayJson" field was cleared in this mutation.

func (*DeviceDurationMutation) DeviceName

func (m *DeviceDurationMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceDurationMutation) Ebutton

func (m *DeviceDurationMutation) Ebutton() (r int32, exists bool)

Ebutton returns the value of the "ebutton" field in the mutation.

func (*DeviceDurationMutation) EbuttonCleared

func (m *DeviceDurationMutation) EbuttonCleared() bool

EbuttonCleared returns if the "ebutton" field was cleared in this mutation.

func (*DeviceDurationMutation) EdgeCleared

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

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

func (*DeviceDurationMutation) ExecContext

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

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

func (*DeviceDurationMutation) Field

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

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

func (*DeviceDurationMutation) FieldCleared

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

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

func (*DeviceDurationMutation) Fields

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

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

func (*DeviceDurationMutation) ID

func (m *DeviceDurationMutation) ID() (id uint64, exists bool)

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

func (*DeviceDurationMutation) IDs

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

func (*DeviceDurationMutation) IotID

func (m *DeviceDurationMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceDurationMutation) OldCreatedAt

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

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

func (*DeviceDurationMutation) OldDate

func (m *DeviceDurationMutation) OldDate(ctx context.Context) (v string, err error)

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

func (*DeviceDurationMutation) OldDayJson

func (m *DeviceDurationMutation) OldDayJson(ctx context.Context) (v string, err error)

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

func (*DeviceDurationMutation) OldDeviceName

func (m *DeviceDurationMutation) OldDeviceName(ctx context.Context) (v string, err error)

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

func (*DeviceDurationMutation) OldEbutton

func (m *DeviceDurationMutation) OldEbutton(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationMutation) OldField

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

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

func (*DeviceDurationMutation) OldIotID

func (m *DeviceDurationMutation) OldIotID(ctx context.Context) (v string, err error)

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

func (*DeviceDurationMutation) OldPreparation

func (m *DeviceDurationMutation) OldPreparation(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationMutation) OldProductKey

func (m *DeviceDurationMutation) OldProductKey(ctx context.Context) (v string, err error)

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

func (*DeviceDurationMutation) OldSort

func (m *DeviceDurationMutation) OldSort(ctx context.Context) (v uint32, err error)

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

func (*DeviceDurationMutation) OldStandBy

func (m *DeviceDurationMutation) OldStandBy(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationMutation) OldStatus

func (m *DeviceDurationMutation) OldStatus(ctx context.Context) (v uint8, err error)

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

func (*DeviceDurationMutation) OldUpdatedAt

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

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

func (*DeviceDurationMutation) OldWaiting

func (m *DeviceDurationMutation) OldWaiting(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationMutation) OldWashing

func (m *DeviceDurationMutation) OldWashing(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationMutation) OldWashingCold

func (m *DeviceDurationMutation) OldWashingCold(ctx context.Context) (v int32, err error)

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

func (*DeviceDurationMutation) Op

func (m *DeviceDurationMutation) Op() Op

Op returns the operation name.

func (*DeviceDurationMutation) Preparation

func (m *DeviceDurationMutation) Preparation() (r int32, exists bool)

Preparation returns the value of the "preparation" field in the mutation.

func (*DeviceDurationMutation) PreparationCleared

func (m *DeviceDurationMutation) PreparationCleared() bool

PreparationCleared returns if the "preparation" field was cleared in this mutation.

func (*DeviceDurationMutation) ProductKey

func (m *DeviceDurationMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceDurationMutation) QueryContext

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

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

func (*DeviceDurationMutation) RemovedEdges

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

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

func (*DeviceDurationMutation) RemovedIDs

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

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceDurationMutation) ResetCreatedAt

func (m *DeviceDurationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceDurationMutation) ResetDate

func (m *DeviceDurationMutation) ResetDate()

ResetDate resets all changes to the "date" field.

func (*DeviceDurationMutation) ResetDayJson

func (m *DeviceDurationMutation) ResetDayJson()

ResetDayJson resets all changes to the "dayJson" field.

func (*DeviceDurationMutation) ResetDeviceName

func (m *DeviceDurationMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceDurationMutation) ResetEbutton

func (m *DeviceDurationMutation) ResetEbutton()

ResetEbutton resets all changes to the "ebutton" field.

func (*DeviceDurationMutation) ResetEdge

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

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

func (*DeviceDurationMutation) ResetField

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

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

func (*DeviceDurationMutation) ResetIotID

func (m *DeviceDurationMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceDurationMutation) ResetPreparation

func (m *DeviceDurationMutation) ResetPreparation()

ResetPreparation resets all changes to the "preparation" field.

func (*DeviceDurationMutation) ResetProductKey

func (m *DeviceDurationMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceDurationMutation) ResetSort

func (m *DeviceDurationMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceDurationMutation) ResetStandBy

func (m *DeviceDurationMutation) ResetStandBy()

ResetStandBy resets all changes to the "standBy" field.

func (*DeviceDurationMutation) ResetStatus

func (m *DeviceDurationMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceDurationMutation) ResetUpdatedAt

func (m *DeviceDurationMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceDurationMutation) ResetWaiting

func (m *DeviceDurationMutation) ResetWaiting()

ResetWaiting resets all changes to the "waiting" field.

func (*DeviceDurationMutation) ResetWashing

func (m *DeviceDurationMutation) ResetWashing()

ResetWashing resets all changes to the "washing" field.

func (*DeviceDurationMutation) ResetWashingCold

func (m *DeviceDurationMutation) ResetWashingCold()

ResetWashingCold resets all changes to the "washingCold" field.

func (*DeviceDurationMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*DeviceDurationMutation) SetDate

func (m *DeviceDurationMutation) SetDate(s string)

SetDate sets the "date" field.

func (*DeviceDurationMutation) SetDayJson

func (m *DeviceDurationMutation) SetDayJson(s string)

SetDayJson sets the "dayJson" field.

func (*DeviceDurationMutation) SetDeviceName

func (m *DeviceDurationMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationMutation) SetEbutton

func (m *DeviceDurationMutation) SetEbutton(i int32)

SetEbutton sets the "ebutton" field.

func (*DeviceDurationMutation) SetField

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

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceDurationMutation) SetID

func (m *DeviceDurationMutation) SetID(id uint64)

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

func (*DeviceDurationMutation) SetIotID

func (m *DeviceDurationMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceDurationMutation) SetOp

func (m *DeviceDurationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceDurationMutation) SetPreparation

func (m *DeviceDurationMutation) SetPreparation(i int32)

SetPreparation sets the "preparation" field.

func (*DeviceDurationMutation) SetProductKey

func (m *DeviceDurationMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceDurationMutation) SetSort

func (m *DeviceDurationMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceDurationMutation) SetStandBy

func (m *DeviceDurationMutation) SetStandBy(i int32)

SetStandBy sets the "standBy" field.

func (*DeviceDurationMutation) SetStatus

func (m *DeviceDurationMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceDurationMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationMutation) SetWaiting

func (m *DeviceDurationMutation) SetWaiting(i int32)

SetWaiting sets the "waiting" field.

func (*DeviceDurationMutation) SetWashing

func (m *DeviceDurationMutation) SetWashing(i int32)

SetWashing sets the "washing" field.

func (*DeviceDurationMutation) SetWashingCold

func (m *DeviceDurationMutation) SetWashingCold(i int32)

SetWashingCold sets the "washingCold" field.

func (*DeviceDurationMutation) Sort

func (m *DeviceDurationMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceDurationMutation) StandBy

func (m *DeviceDurationMutation) StandBy() (r int32, exists bool)

StandBy returns the value of the "standBy" field in the mutation.

func (*DeviceDurationMutation) StandByCleared

func (m *DeviceDurationMutation) StandByCleared() bool

StandByCleared returns if the "standBy" field was cleared in this mutation.

func (*DeviceDurationMutation) Status

func (m *DeviceDurationMutation) Status() (r uint8, exists bool)

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

func (*DeviceDurationMutation) StatusCleared

func (m *DeviceDurationMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (DeviceDurationMutation) Tx

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

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

func (*DeviceDurationMutation) Type

func (m *DeviceDurationMutation) Type() string

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

func (*DeviceDurationMutation) UpdatedAt

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

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceDurationMutation) Waiting

func (m *DeviceDurationMutation) Waiting() (r int32, exists bool)

Waiting returns the value of the "waiting" field in the mutation.

func (*DeviceDurationMutation) WaitingCleared

func (m *DeviceDurationMutation) WaitingCleared() bool

WaitingCleared returns if the "waiting" field was cleared in this mutation.

func (*DeviceDurationMutation) Washing

func (m *DeviceDurationMutation) Washing() (r int32, exists bool)

Washing returns the value of the "washing" field in the mutation.

func (*DeviceDurationMutation) WashingCleared

func (m *DeviceDurationMutation) WashingCleared() bool

WashingCleared returns if the "washing" field was cleared in this mutation.

func (*DeviceDurationMutation) WashingCold

func (m *DeviceDurationMutation) WashingCold() (r int32, exists bool)

WashingCold returns the value of the "washingCold" field in the mutation.

func (*DeviceDurationMutation) WashingColdCleared

func (m *DeviceDurationMutation) WashingColdCleared() bool

WashingColdCleared returns if the "washingCold" field was cleared in this mutation.

func (*DeviceDurationMutation) Where

Where appends a list predicates to the DeviceDurationMutation builder.

func (*DeviceDurationMutation) WhereP

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

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

type DeviceDurationPageList

type DeviceDurationPageList struct {
	List        []*DeviceDuration `json:"list"`
	PageDetails *PageDetails      `json:"pageDetails"`
}

DeviceDurationPageList is DeviceDuration PageList result.

type DeviceDurationPager

type DeviceDurationPager struct {
	Order  deviceduration.OrderOption
	Filter func(*DeviceDurationQuery) (*DeviceDurationQuery, error)
}

func (*DeviceDurationPager) ApplyFilter

type DeviceDurationPaginateOption

type DeviceDurationPaginateOption func(*DeviceDurationPager)

DeviceDurationPaginateOption enables pagination customization.

type DeviceDurationQuery

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

DeviceDurationQuery is the builder for querying DeviceDuration entities.

func (*DeviceDurationQuery) Aggregate

func (ddq *DeviceDurationQuery) Aggregate(fns ...AggregateFunc) *DeviceDurationSelect

Aggregate returns a DeviceDurationSelect configured with the given aggregations.

func (*DeviceDurationQuery) All

All executes the query and returns a list of DeviceDurations.

func (*DeviceDurationQuery) AllX

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

func (*DeviceDurationQuery) Clone

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

func (*DeviceDurationQuery) Count

func (ddq *DeviceDurationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceDurationQuery) CountX

func (ddq *DeviceDurationQuery) CountX(ctx context.Context) int

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

func (*DeviceDurationQuery) ExecContext

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

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

func (*DeviceDurationQuery) Exist

func (ddq *DeviceDurationQuery) Exist(ctx context.Context) (bool, error)

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

func (*DeviceDurationQuery) ExistX

func (ddq *DeviceDurationQuery) ExistX(ctx context.Context) bool

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

func (*DeviceDurationQuery) First

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

func (*DeviceDurationQuery) FirstID

func (ddq *DeviceDurationQuery) FirstID(ctx context.Context) (id uint64, err error)

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

func (*DeviceDurationQuery) FirstIDX

func (ddq *DeviceDurationQuery) FirstIDX(ctx context.Context) uint64

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

func (*DeviceDurationQuery) FirstX

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

func (*DeviceDurationQuery) GroupBy

func (ddq *DeviceDurationQuery) GroupBy(field string, fields ...string) *DeviceDurationGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

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

client.DeviceDuration.Query().
	GroupBy(deviceduration.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceDurationQuery) IDs

func (ddq *DeviceDurationQuery) IDs(ctx context.Context) (ids []uint64, err error)

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

func (*DeviceDurationQuery) IDsX

func (ddq *DeviceDurationQuery) IDsX(ctx context.Context) []uint64

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

func (*DeviceDurationQuery) Limit

func (ddq *DeviceDurationQuery) Limit(limit int) *DeviceDurationQuery

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

func (*DeviceDurationQuery) Modify

func (ddq *DeviceDurationQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceDurationSelect

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

func (*DeviceDurationQuery) Offset

func (ddq *DeviceDurationQuery) Offset(offset int) *DeviceDurationQuery

Offset to start from.

func (*DeviceDurationQuery) Only

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

func (*DeviceDurationQuery) OnlyID

func (ddq *DeviceDurationQuery) OnlyID(ctx context.Context) (id uint64, err error)

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

func (*DeviceDurationQuery) OnlyIDX

func (ddq *DeviceDurationQuery) OnlyIDX(ctx context.Context) uint64

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

func (*DeviceDurationQuery) OnlyX

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

func (*DeviceDurationQuery) Order

Order specifies how the records should be ordered.

func (*DeviceDurationQuery) Page

func (*DeviceDurationQuery) QueryContext

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

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

func (*DeviceDurationQuery) Select

func (ddq *DeviceDurationQuery) Select(fields ...string) *DeviceDurationSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

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

client.DeviceDuration.Query().
	Select(deviceduration.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceDurationQuery) Unique

func (ddq *DeviceDurationQuery) Unique(unique bool) *DeviceDurationQuery

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

func (*DeviceDurationQuery) Where

Where adds a new predicate for the DeviceDurationQuery builder.

type DeviceDurationSelect

type DeviceDurationSelect struct {
	*DeviceDurationQuery
	// contains filtered or unexported fields
}

DeviceDurationSelect is the builder for selecting fields of DeviceDuration entities.

func (*DeviceDurationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceDurationSelect) Bool

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

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

func (*DeviceDurationSelect) BoolX

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

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

func (*DeviceDurationSelect) Bools

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

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

func (*DeviceDurationSelect) BoolsX

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

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

func (DeviceDurationSelect) ExecContext

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

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

func (*DeviceDurationSelect) Float64

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

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

func (*DeviceDurationSelect) Float64X

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

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

func (*DeviceDurationSelect) Float64s

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

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

func (*DeviceDurationSelect) Float64sX

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

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

func (*DeviceDurationSelect) Int

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

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

func (*DeviceDurationSelect) IntX

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

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

func (*DeviceDurationSelect) Ints

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

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

func (*DeviceDurationSelect) IntsX

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

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

func (*DeviceDurationSelect) Modify

func (dds *DeviceDurationSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceDurationSelect

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

func (DeviceDurationSelect) QueryContext

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

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

func (*DeviceDurationSelect) Scan

func (dds *DeviceDurationSelect) Scan(ctx context.Context, v any) error

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

func (*DeviceDurationSelect) ScanX

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

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

func (*DeviceDurationSelect) String

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

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

func (*DeviceDurationSelect) StringX

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

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

func (*DeviceDurationSelect) Strings

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

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

func (*DeviceDurationSelect) StringsX

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

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

type DeviceDurationUpdate

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

DeviceDurationUpdate is the builder for updating DeviceDuration entities.

func (*DeviceDurationUpdate) AddEbutton

func (ddu *DeviceDurationUpdate) AddEbutton(i int32) *DeviceDurationUpdate

AddEbutton adds i to the "ebutton" field.

func (*DeviceDurationUpdate) AddPreparation

func (ddu *DeviceDurationUpdate) AddPreparation(i int32) *DeviceDurationUpdate

AddPreparation adds i to the "preparation" field.

func (*DeviceDurationUpdate) AddSort

AddSort adds u to the "sort" field.

func (*DeviceDurationUpdate) AddStandBy

func (ddu *DeviceDurationUpdate) AddStandBy(i int32) *DeviceDurationUpdate

AddStandBy adds i to the "standBy" field.

func (*DeviceDurationUpdate) AddStatus

func (ddu *DeviceDurationUpdate) AddStatus(u int8) *DeviceDurationUpdate

AddStatus adds u to the "status" field.

func (*DeviceDurationUpdate) AddWaiting

func (ddu *DeviceDurationUpdate) AddWaiting(i int32) *DeviceDurationUpdate

AddWaiting adds i to the "waiting" field.

func (*DeviceDurationUpdate) AddWashing

func (ddu *DeviceDurationUpdate) AddWashing(i int32) *DeviceDurationUpdate

AddWashing adds i to the "washing" field.

func (*DeviceDurationUpdate) AddWashingCold

func (ddu *DeviceDurationUpdate) AddWashingCold(i int32) *DeviceDurationUpdate

AddWashingCold adds i to the "washingCold" field.

func (*DeviceDurationUpdate) ClearDate

func (ddu *DeviceDurationUpdate) ClearDate() *DeviceDurationUpdate

ClearDate clears the value of the "date" field.

func (*DeviceDurationUpdate) ClearDayJson

func (ddu *DeviceDurationUpdate) ClearDayJson() *DeviceDurationUpdate

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationUpdate) ClearEbutton

func (ddu *DeviceDurationUpdate) ClearEbutton() *DeviceDurationUpdate

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationUpdate) ClearPreparation

func (ddu *DeviceDurationUpdate) ClearPreparation() *DeviceDurationUpdate

ClearPreparation clears the value of the "preparation" field.

func (*DeviceDurationUpdate) ClearStandBy

func (ddu *DeviceDurationUpdate) ClearStandBy() *DeviceDurationUpdate

ClearStandBy clears the value of the "standBy" field.

func (*DeviceDurationUpdate) ClearStatus

func (ddu *DeviceDurationUpdate) ClearStatus() *DeviceDurationUpdate

ClearStatus clears the value of the "status" field.

func (*DeviceDurationUpdate) ClearWaiting

func (ddu *DeviceDurationUpdate) ClearWaiting() *DeviceDurationUpdate

ClearWaiting clears the value of the "waiting" field.

func (*DeviceDurationUpdate) ClearWashing

func (ddu *DeviceDurationUpdate) ClearWashing() *DeviceDurationUpdate

ClearWashing clears the value of the "washing" field.

func (*DeviceDurationUpdate) ClearWashingCold

func (ddu *DeviceDurationUpdate) ClearWashingCold() *DeviceDurationUpdate

ClearWashingCold clears the value of the "washingCold" field.

func (*DeviceDurationUpdate) Exec

func (ddu *DeviceDurationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceDurationUpdate) ExecContext

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

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

func (*DeviceDurationUpdate) ExecX

func (ddu *DeviceDurationUpdate) ExecX(ctx context.Context)

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

func (*DeviceDurationUpdate) Modify

func (ddu *DeviceDurationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceDurationUpdate

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

func (*DeviceDurationUpdate) Mutation

Mutation returns the DeviceDurationMutation object of the builder.

func (*DeviceDurationUpdate) QueryContext

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

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

func (*DeviceDurationUpdate) Save

func (ddu *DeviceDurationUpdate) Save(ctx context.Context) (int, error)

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

func (*DeviceDurationUpdate) SaveX

func (ddu *DeviceDurationUpdate) SaveX(ctx context.Context) int

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

func (*DeviceDurationUpdate) SetDate

SetDate sets the "date" field.

func (*DeviceDurationUpdate) SetDayJson

func (ddu *DeviceDurationUpdate) SetDayJson(s string) *DeviceDurationUpdate

SetDayJson sets the "dayJson" field.

func (*DeviceDurationUpdate) SetDeviceName

func (ddu *DeviceDurationUpdate) SetDeviceName(s string) *DeviceDurationUpdate

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationUpdate) SetEbutton

func (ddu *DeviceDurationUpdate) SetEbutton(i int32) *DeviceDurationUpdate

SetEbutton sets the "ebutton" field.

func (*DeviceDurationUpdate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationUpdate) SetNillableDate

func (ddu *DeviceDurationUpdate) SetNillableDate(s *string) *DeviceDurationUpdate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableDayJson

func (ddu *DeviceDurationUpdate) SetNillableDayJson(s *string) *DeviceDurationUpdate

SetNillableDayJson sets the "dayJson" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableDeviceName

func (ddu *DeviceDurationUpdate) SetNillableDeviceName(s *string) *DeviceDurationUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableEbutton

func (ddu *DeviceDurationUpdate) SetNillableEbutton(i *int32) *DeviceDurationUpdate

SetNillableEbutton sets the "ebutton" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableIotID

func (ddu *DeviceDurationUpdate) SetNillableIotID(s *string) *DeviceDurationUpdate

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillablePreparation

func (ddu *DeviceDurationUpdate) SetNillablePreparation(i *int32) *DeviceDurationUpdate

SetNillablePreparation sets the "preparation" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableProductKey

func (ddu *DeviceDurationUpdate) SetNillableProductKey(s *string) *DeviceDurationUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableSort

func (ddu *DeviceDurationUpdate) SetNillableSort(u *uint32) *DeviceDurationUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableStandBy

func (ddu *DeviceDurationUpdate) SetNillableStandBy(i *int32) *DeviceDurationUpdate

SetNillableStandBy sets the "standBy" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableStatus

func (ddu *DeviceDurationUpdate) SetNillableStatus(u *uint8) *DeviceDurationUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableWaiting

func (ddu *DeviceDurationUpdate) SetNillableWaiting(i *int32) *DeviceDurationUpdate

SetNillableWaiting sets the "waiting" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableWashing

func (ddu *DeviceDurationUpdate) SetNillableWashing(i *int32) *DeviceDurationUpdate

SetNillableWashing sets the "washing" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNillableWashingCold

func (ddu *DeviceDurationUpdate) SetNillableWashingCold(i *int32) *DeviceDurationUpdate

SetNillableWashingCold sets the "washingCold" field if the given value is not nil.

func (*DeviceDurationUpdate) SetNotNilDate

func (dd *DeviceDurationUpdate) SetNotNilDate(value *string) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilDayJson

func (dd *DeviceDurationUpdate) SetNotNilDayJson(value *string) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilDeviceName

func (dd *DeviceDurationUpdate) SetNotNilDeviceName(value *string) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilEbutton

func (dd *DeviceDurationUpdate) SetNotNilEbutton(value *int32) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilIotID

func (dd *DeviceDurationUpdate) SetNotNilIotID(value *string) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilPreparation

func (dd *DeviceDurationUpdate) SetNotNilPreparation(value *int32) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilProductKey

func (dd *DeviceDurationUpdate) SetNotNilProductKey(value *string) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilSort

func (dd *DeviceDurationUpdate) SetNotNilSort(value *uint32) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilStandBy

func (dd *DeviceDurationUpdate) SetNotNilStandBy(value *int32) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilStatus

func (dd *DeviceDurationUpdate) SetNotNilStatus(value *uint8) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilUpdatedAt

func (dd *DeviceDurationUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilWaiting

func (dd *DeviceDurationUpdate) SetNotNilWaiting(value *int32) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilWashing

func (dd *DeviceDurationUpdate) SetNotNilWashing(value *int32) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetNotNilWashingCold

func (dd *DeviceDurationUpdate) SetNotNilWashingCold(value *int32) *DeviceDurationUpdate

set field if value's pointer is not nil.

func (*DeviceDurationUpdate) SetPreparation

func (ddu *DeviceDurationUpdate) SetPreparation(i int32) *DeviceDurationUpdate

SetPreparation sets the "preparation" field.

func (*DeviceDurationUpdate) SetProductKey

func (ddu *DeviceDurationUpdate) SetProductKey(s string) *DeviceDurationUpdate

SetProductKey sets the "productKey" field.

func (*DeviceDurationUpdate) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationUpdate) SetStandBy

func (ddu *DeviceDurationUpdate) SetStandBy(i int32) *DeviceDurationUpdate

SetStandBy sets the "standBy" field.

func (*DeviceDurationUpdate) SetStatus

func (ddu *DeviceDurationUpdate) SetStatus(u uint8) *DeviceDurationUpdate

SetStatus sets the "status" field.

func (*DeviceDurationUpdate) SetUpdatedAt

func (ddu *DeviceDurationUpdate) SetUpdatedAt(t time.Time) *DeviceDurationUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationUpdate) SetWaiting

func (ddu *DeviceDurationUpdate) SetWaiting(i int32) *DeviceDurationUpdate

SetWaiting sets the "waiting" field.

func (*DeviceDurationUpdate) SetWashing

func (ddu *DeviceDurationUpdate) SetWashing(i int32) *DeviceDurationUpdate

SetWashing sets the "washing" field.

func (*DeviceDurationUpdate) SetWashingCold

func (ddu *DeviceDurationUpdate) SetWashingCold(i int32) *DeviceDurationUpdate

SetWashingCold sets the "washingCold" field.

func (*DeviceDurationUpdate) Where

Where appends a list predicates to the DeviceDurationUpdate builder.

type DeviceDurationUpdateOne

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

DeviceDurationUpdateOne is the builder for updating a single DeviceDuration entity.

func (*DeviceDurationUpdateOne) AddEbutton

AddEbutton adds i to the "ebutton" field.

func (*DeviceDurationUpdateOne) AddPreparation

func (dduo *DeviceDurationUpdateOne) AddPreparation(i int32) *DeviceDurationUpdateOne

AddPreparation adds i to the "preparation" field.

func (*DeviceDurationUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceDurationUpdateOne) AddStandBy

AddStandBy adds i to the "standBy" field.

func (*DeviceDurationUpdateOne) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceDurationUpdateOne) AddWaiting

AddWaiting adds i to the "waiting" field.

func (*DeviceDurationUpdateOne) AddWashing

AddWashing adds i to the "washing" field.

func (*DeviceDurationUpdateOne) AddWashingCold

func (dduo *DeviceDurationUpdateOne) AddWashingCold(i int32) *DeviceDurationUpdateOne

AddWashingCold adds i to the "washingCold" field.

func (*DeviceDurationUpdateOne) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationUpdateOne) ClearDayJson

func (dduo *DeviceDurationUpdateOne) ClearDayJson() *DeviceDurationUpdateOne

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationUpdateOne) ClearEbutton

func (dduo *DeviceDurationUpdateOne) ClearEbutton() *DeviceDurationUpdateOne

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationUpdateOne) ClearPreparation

func (dduo *DeviceDurationUpdateOne) ClearPreparation() *DeviceDurationUpdateOne

ClearPreparation clears the value of the "preparation" field.

func (*DeviceDurationUpdateOne) ClearStandBy

func (dduo *DeviceDurationUpdateOne) ClearStandBy() *DeviceDurationUpdateOne

ClearStandBy clears the value of the "standBy" field.

func (*DeviceDurationUpdateOne) ClearStatus

func (dduo *DeviceDurationUpdateOne) ClearStatus() *DeviceDurationUpdateOne

ClearStatus clears the value of the "status" field.

func (*DeviceDurationUpdateOne) ClearWaiting

func (dduo *DeviceDurationUpdateOne) ClearWaiting() *DeviceDurationUpdateOne

ClearWaiting clears the value of the "waiting" field.

func (*DeviceDurationUpdateOne) ClearWashing

func (dduo *DeviceDurationUpdateOne) ClearWashing() *DeviceDurationUpdateOne

ClearWashing clears the value of the "washing" field.

func (*DeviceDurationUpdateOne) ClearWashingCold

func (dduo *DeviceDurationUpdateOne) ClearWashingCold() *DeviceDurationUpdateOne

ClearWashingCold clears the value of the "washingCold" field.

func (*DeviceDurationUpdateOne) Exec

func (dduo *DeviceDurationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeviceDurationUpdateOne) ExecContext

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

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

func (*DeviceDurationUpdateOne) ExecX

func (dduo *DeviceDurationUpdateOne) ExecX(ctx context.Context)

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

func (*DeviceDurationUpdateOne) Modify

func (dduo *DeviceDurationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceDurationUpdateOne

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

func (*DeviceDurationUpdateOne) Mutation

Mutation returns the DeviceDurationMutation object of the builder.

func (*DeviceDurationUpdateOne) QueryContext

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

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

func (*DeviceDurationUpdateOne) Save

Save executes the query and returns the updated DeviceDuration entity.

func (*DeviceDurationUpdateOne) SaveX

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

func (*DeviceDurationUpdateOne) Select

func (dduo *DeviceDurationUpdateOne) Select(field string, fields ...string) *DeviceDurationUpdateOne

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

func (*DeviceDurationUpdateOne) SetDate

SetDate sets the "date" field.

func (*DeviceDurationUpdateOne) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationUpdateOne) SetDeviceName

func (dduo *DeviceDurationUpdateOne) SetDeviceName(s string) *DeviceDurationUpdateOne

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationUpdateOne) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationUpdateOne) SetNillableDate

func (dduo *DeviceDurationUpdateOne) SetNillableDate(s *string) *DeviceDurationUpdateOne

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableDayJson

func (dduo *DeviceDurationUpdateOne) SetNillableDayJson(s *string) *DeviceDurationUpdateOne

SetNillableDayJson sets the "dayJson" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableDeviceName

func (dduo *DeviceDurationUpdateOne) SetNillableDeviceName(s *string) *DeviceDurationUpdateOne

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableEbutton

func (dduo *DeviceDurationUpdateOne) SetNillableEbutton(i *int32) *DeviceDurationUpdateOne

SetNillableEbutton sets the "ebutton" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableIotID

func (dduo *DeviceDurationUpdateOne) SetNillableIotID(s *string) *DeviceDurationUpdateOne

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillablePreparation

func (dduo *DeviceDurationUpdateOne) SetNillablePreparation(i *int32) *DeviceDurationUpdateOne

SetNillablePreparation sets the "preparation" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableProductKey

func (dduo *DeviceDurationUpdateOne) SetNillableProductKey(s *string) *DeviceDurationUpdateOne

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableSort

func (dduo *DeviceDurationUpdateOne) SetNillableSort(u *uint32) *DeviceDurationUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableStandBy

func (dduo *DeviceDurationUpdateOne) SetNillableStandBy(i *int32) *DeviceDurationUpdateOne

SetNillableStandBy sets the "standBy" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableStatus

func (dduo *DeviceDurationUpdateOne) SetNillableStatus(u *uint8) *DeviceDurationUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableWaiting

func (dduo *DeviceDurationUpdateOne) SetNillableWaiting(i *int32) *DeviceDurationUpdateOne

SetNillableWaiting sets the "waiting" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableWashing

func (dduo *DeviceDurationUpdateOne) SetNillableWashing(i *int32) *DeviceDurationUpdateOne

SetNillableWashing sets the "washing" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNillableWashingCold

func (dduo *DeviceDurationUpdateOne) SetNillableWashingCold(i *int32) *DeviceDurationUpdateOne

SetNillableWashingCold sets the "washingCold" field if the given value is not nil.

func (*DeviceDurationUpdateOne) SetNotNilDate

func (dd *DeviceDurationUpdateOne) SetNotNilDate(value *string) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilDayJson

func (dd *DeviceDurationUpdateOne) SetNotNilDayJson(value *string) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilDeviceName

func (dd *DeviceDurationUpdateOne) SetNotNilDeviceName(value *string) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilEbutton

func (dd *DeviceDurationUpdateOne) SetNotNilEbutton(value *int32) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilIotID

func (dd *DeviceDurationUpdateOne) SetNotNilIotID(value *string) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilPreparation

func (dd *DeviceDurationUpdateOne) SetNotNilPreparation(value *int32) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilProductKey

func (dd *DeviceDurationUpdateOne) SetNotNilProductKey(value *string) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilSort

func (dd *DeviceDurationUpdateOne) SetNotNilSort(value *uint32) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilStandBy

func (dd *DeviceDurationUpdateOne) SetNotNilStandBy(value *int32) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilStatus

func (dd *DeviceDurationUpdateOne) SetNotNilStatus(value *uint8) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilUpdatedAt

func (dd *DeviceDurationUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilWaiting

func (dd *DeviceDurationUpdateOne) SetNotNilWaiting(value *int32) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilWashing

func (dd *DeviceDurationUpdateOne) SetNotNilWashing(value *int32) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetNotNilWashingCold

func (dd *DeviceDurationUpdateOne) SetNotNilWashingCold(value *int32) *DeviceDurationUpdateOne

set field if value's pointer is not nil.

func (*DeviceDurationUpdateOne) SetPreparation

func (dduo *DeviceDurationUpdateOne) SetPreparation(i int32) *DeviceDurationUpdateOne

SetPreparation sets the "preparation" field.

func (*DeviceDurationUpdateOne) SetProductKey

func (dduo *DeviceDurationUpdateOne) SetProductKey(s string) *DeviceDurationUpdateOne

SetProductKey sets the "productKey" field.

func (*DeviceDurationUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationUpdateOne) SetStandBy

SetStandBy sets the "standBy" field.

func (*DeviceDurationUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationUpdateOne) SetWaiting

SetWaiting sets the "waiting" field.

func (*DeviceDurationUpdateOne) SetWashing

SetWashing sets the "washing" field.

func (*DeviceDurationUpdateOne) SetWashingCold

func (dduo *DeviceDurationUpdateOne) SetWashingCold(i int32) *DeviceDurationUpdateOne

SetWashingCold sets the "washingCold" field.

func (*DeviceDurationUpdateOne) Where

Where appends a list predicates to the DeviceDurationUpdate builder.

type DeviceDurationUpsert

type DeviceDurationUpsert struct {
	*sql.UpdateSet
}

DeviceDurationUpsert is the "OnConflict" setter.

func (*DeviceDurationUpsert) AddEbutton

AddEbutton adds v to the "ebutton" field.

func (*DeviceDurationUpsert) AddPreparation

func (u *DeviceDurationUpsert) AddPreparation(v int32) *DeviceDurationUpsert

AddPreparation adds v to the "preparation" field.

func (*DeviceDurationUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceDurationUpsert) AddStandBy

AddStandBy adds v to the "standBy" field.

func (*DeviceDurationUpsert) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceDurationUpsert) AddWaiting

AddWaiting adds v to the "waiting" field.

func (*DeviceDurationUpsert) AddWashing

AddWashing adds v to the "washing" field.

func (*DeviceDurationUpsert) AddWashingCold

func (u *DeviceDurationUpsert) AddWashingCold(v int32) *DeviceDurationUpsert

AddWashingCold adds v to the "washingCold" field.

func (*DeviceDurationUpsert) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationUpsert) ClearDayJson

func (u *DeviceDurationUpsert) ClearDayJson() *DeviceDurationUpsert

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationUpsert) ClearEbutton

func (u *DeviceDurationUpsert) ClearEbutton() *DeviceDurationUpsert

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationUpsert) ClearPreparation

func (u *DeviceDurationUpsert) ClearPreparation() *DeviceDurationUpsert

ClearPreparation clears the value of the "preparation" field.

func (*DeviceDurationUpsert) ClearStandBy

func (u *DeviceDurationUpsert) ClearStandBy() *DeviceDurationUpsert

ClearStandBy clears the value of the "standBy" field.

func (*DeviceDurationUpsert) ClearStatus

func (u *DeviceDurationUpsert) ClearStatus() *DeviceDurationUpsert

ClearStatus clears the value of the "status" field.

func (*DeviceDurationUpsert) ClearWaiting

func (u *DeviceDurationUpsert) ClearWaiting() *DeviceDurationUpsert

ClearWaiting clears the value of the "waiting" field.

func (*DeviceDurationUpsert) ClearWashing

func (u *DeviceDurationUpsert) ClearWashing() *DeviceDurationUpsert

ClearWashing clears the value of the "washing" field.

func (*DeviceDurationUpsert) ClearWashingCold

func (u *DeviceDurationUpsert) ClearWashingCold() *DeviceDurationUpsert

ClearWashingCold clears the value of the "washingCold" field.

func (*DeviceDurationUpsert) SetDate

SetDate sets the "date" field.

func (*DeviceDurationUpsert) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationUpsert) SetDeviceName

func (u *DeviceDurationUpsert) SetDeviceName(v string) *DeviceDurationUpsert

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationUpsert) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationUpsert) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationUpsert) SetPreparation

func (u *DeviceDurationUpsert) SetPreparation(v int32) *DeviceDurationUpsert

SetPreparation sets the "preparation" field.

func (*DeviceDurationUpsert) SetProductKey

func (u *DeviceDurationUpsert) SetProductKey(v string) *DeviceDurationUpsert

SetProductKey sets the "productKey" field.

func (*DeviceDurationUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationUpsert) SetStandBy

SetStandBy sets the "standBy" field.

func (*DeviceDurationUpsert) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationUpsert) SetUpdatedAt

func (u *DeviceDurationUpsert) SetUpdatedAt(v time.Time) *DeviceDurationUpsert

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationUpsert) SetWaiting

SetWaiting sets the "waiting" field.

func (*DeviceDurationUpsert) SetWashing

SetWashing sets the "washing" field.

func (*DeviceDurationUpsert) SetWashingCold

func (u *DeviceDurationUpsert) SetWashingCold(v int32) *DeviceDurationUpsert

SetWashingCold sets the "washingCold" field.

func (*DeviceDurationUpsert) UpdateDate

func (u *DeviceDurationUpsert) UpdateDate() *DeviceDurationUpsert

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateDayJson

func (u *DeviceDurationUpsert) UpdateDayJson() *DeviceDurationUpsert

UpdateDayJson sets the "dayJson" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateDeviceName

func (u *DeviceDurationUpsert) UpdateDeviceName() *DeviceDurationUpsert

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateEbutton

func (u *DeviceDurationUpsert) UpdateEbutton() *DeviceDurationUpsert

UpdateEbutton sets the "ebutton" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateIotID

func (u *DeviceDurationUpsert) UpdateIotID() *DeviceDurationUpsert

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdatePreparation

func (u *DeviceDurationUpsert) UpdatePreparation() *DeviceDurationUpsert

UpdatePreparation sets the "preparation" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateProductKey

func (u *DeviceDurationUpsert) UpdateProductKey() *DeviceDurationUpsert

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateSort

func (u *DeviceDurationUpsert) UpdateSort() *DeviceDurationUpsert

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateStandBy

func (u *DeviceDurationUpsert) UpdateStandBy() *DeviceDurationUpsert

UpdateStandBy sets the "standBy" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateStatus

func (u *DeviceDurationUpsert) UpdateStatus() *DeviceDurationUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateUpdatedAt

func (u *DeviceDurationUpsert) UpdateUpdatedAt() *DeviceDurationUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateWaiting

func (u *DeviceDurationUpsert) UpdateWaiting() *DeviceDurationUpsert

UpdateWaiting sets the "waiting" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateWashing

func (u *DeviceDurationUpsert) UpdateWashing() *DeviceDurationUpsert

UpdateWashing sets the "washing" field to the value that was provided on create.

func (*DeviceDurationUpsert) UpdateWashingCold

func (u *DeviceDurationUpsert) UpdateWashingCold() *DeviceDurationUpsert

UpdateWashingCold sets the "washingCold" field to the value that was provided on create.

type DeviceDurationUpsertBulk

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

DeviceDurationUpsertBulk is the builder for "upsert"-ing a bulk of DeviceDuration nodes.

func (*DeviceDurationUpsertBulk) AddEbutton

AddEbutton adds v to the "ebutton" field.

func (*DeviceDurationUpsertBulk) AddPreparation

AddPreparation adds v to the "preparation" field.

func (*DeviceDurationUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceDurationUpsertBulk) AddStandBy

AddStandBy adds v to the "standBy" field.

func (*DeviceDurationUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceDurationUpsertBulk) AddWaiting

AddWaiting adds v to the "waiting" field.

func (*DeviceDurationUpsertBulk) AddWashing

AddWashing adds v to the "washing" field.

func (*DeviceDurationUpsertBulk) AddWashingCold

AddWashingCold adds v to the "washingCold" field.

func (*DeviceDurationUpsertBulk) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationUpsertBulk) ClearDayJson

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationUpsertBulk) ClearEbutton

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationUpsertBulk) ClearPreparation

func (u *DeviceDurationUpsertBulk) ClearPreparation() *DeviceDurationUpsertBulk

ClearPreparation clears the value of the "preparation" field.

func (*DeviceDurationUpsertBulk) ClearStandBy

ClearStandBy clears the value of the "standBy" field.

func (*DeviceDurationUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceDurationUpsertBulk) ClearWaiting

ClearWaiting clears the value of the "waiting" field.

func (*DeviceDurationUpsertBulk) ClearWashing

ClearWashing clears the value of the "washing" field.

func (*DeviceDurationUpsertBulk) ClearWashingCold

func (u *DeviceDurationUpsertBulk) ClearWashingCold() *DeviceDurationUpsertBulk

ClearWashingCold clears the value of the "washingCold" field.

func (*DeviceDurationUpsertBulk) DoNothing

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

func (*DeviceDurationUpsertBulk) Exec

Exec executes the query.

func (*DeviceDurationUpsertBulk) ExecX

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

func (*DeviceDurationUpsertBulk) Ignore

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

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

func (*DeviceDurationUpsertBulk) SetDate

SetDate sets the "date" field.

func (*DeviceDurationUpsertBulk) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationUpsertBulk) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationUpsertBulk) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationUpsertBulk) SetPreparation

SetPreparation sets the "preparation" field.

func (*DeviceDurationUpsertBulk) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationUpsertBulk) SetStandBy

SetStandBy sets the "standBy" field.

func (*DeviceDurationUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationUpsertBulk) SetWaiting

SetWaiting sets the "waiting" field.

func (*DeviceDurationUpsertBulk) SetWashing

SetWashing sets the "washing" field.

func (*DeviceDurationUpsertBulk) SetWashingCold

SetWashingCold sets the "washingCold" field.

func (*DeviceDurationUpsertBulk) Update

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

func (*DeviceDurationUpsertBulk) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateDayJson

UpdateDayJson sets the "dayJson" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateDeviceName

func (u *DeviceDurationUpsertBulk) UpdateDeviceName() *DeviceDurationUpsertBulk

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateEbutton

UpdateEbutton sets the "ebutton" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateNewValues

func (u *DeviceDurationUpsertBulk) UpdateNewValues() *DeviceDurationUpsertBulk

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

client.DeviceDuration.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceduration.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceDurationUpsertBulk) UpdatePreparation

func (u *DeviceDurationUpsertBulk) UpdatePreparation() *DeviceDurationUpsertBulk

UpdatePreparation sets the "preparation" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateProductKey

func (u *DeviceDurationUpsertBulk) UpdateProductKey() *DeviceDurationUpsertBulk

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateStandBy

UpdateStandBy sets the "standBy" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateUpdatedAt

func (u *DeviceDurationUpsertBulk) UpdateUpdatedAt() *DeviceDurationUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateWaiting

UpdateWaiting sets the "waiting" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateWashing

UpdateWashing sets the "washing" field to the value that was provided on create.

func (*DeviceDurationUpsertBulk) UpdateWashingCold

func (u *DeviceDurationUpsertBulk) UpdateWashingCold() *DeviceDurationUpsertBulk

UpdateWashingCold sets the "washingCold" field to the value that was provided on create.

type DeviceDurationUpsertOne

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

DeviceDurationUpsertOne is the builder for "upsert"-ing

one DeviceDuration node.

func (*DeviceDurationUpsertOne) AddEbutton

AddEbutton adds v to the "ebutton" field.

func (*DeviceDurationUpsertOne) AddPreparation

AddPreparation adds v to the "preparation" field.

func (*DeviceDurationUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceDurationUpsertOne) AddStandBy

AddStandBy adds v to the "standBy" field.

func (*DeviceDurationUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceDurationUpsertOne) AddWaiting

AddWaiting adds v to the "waiting" field.

func (*DeviceDurationUpsertOne) AddWashing

AddWashing adds v to the "washing" field.

func (*DeviceDurationUpsertOne) AddWashingCold

AddWashingCold adds v to the "washingCold" field.

func (*DeviceDurationUpsertOne) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceDurationUpsertOne) ClearDayJson

ClearDayJson clears the value of the "dayJson" field.

func (*DeviceDurationUpsertOne) ClearEbutton

ClearEbutton clears the value of the "ebutton" field.

func (*DeviceDurationUpsertOne) ClearPreparation

func (u *DeviceDurationUpsertOne) ClearPreparation() *DeviceDurationUpsertOne

ClearPreparation clears the value of the "preparation" field.

func (*DeviceDurationUpsertOne) ClearStandBy

ClearStandBy clears the value of the "standBy" field.

func (*DeviceDurationUpsertOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceDurationUpsertOne) ClearWaiting

ClearWaiting clears the value of the "waiting" field.

func (*DeviceDurationUpsertOne) ClearWashing

ClearWashing clears the value of the "washing" field.

func (*DeviceDurationUpsertOne) ClearWashingCold

func (u *DeviceDurationUpsertOne) ClearWashingCold() *DeviceDurationUpsertOne

ClearWashingCold clears the value of the "washingCold" field.

func (*DeviceDurationUpsertOne) DoNothing

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

func (*DeviceDurationUpsertOne) Exec

Exec executes the query.

func (*DeviceDurationUpsertOne) ExecX

func (u *DeviceDurationUpsertOne) ExecX(ctx context.Context)

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

func (*DeviceDurationUpsertOne) ID

func (u *DeviceDurationUpsertOne) ID(ctx context.Context) (id uint64, err error)

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

func (*DeviceDurationUpsertOne) IDX

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

func (*DeviceDurationUpsertOne) Ignore

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

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

func (*DeviceDurationUpsertOne) SetDate

SetDate sets the "date" field.

func (*DeviceDurationUpsertOne) SetDayJson

SetDayJson sets the "dayJson" field.

func (*DeviceDurationUpsertOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceDurationUpsertOne) SetEbutton

SetEbutton sets the "ebutton" field.

func (*DeviceDurationUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceDurationUpsertOne) SetPreparation

SetPreparation sets the "preparation" field.

func (*DeviceDurationUpsertOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceDurationUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceDurationUpsertOne) SetStandBy

SetStandBy sets the "standBy" field.

func (*DeviceDurationUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceDurationUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceDurationUpsertOne) SetWaiting

SetWaiting sets the "waiting" field.

func (*DeviceDurationUpsertOne) SetWashing

SetWashing sets the "washing" field.

func (*DeviceDurationUpsertOne) SetWashingCold

SetWashingCold sets the "washingCold" field.

func (*DeviceDurationUpsertOne) Update

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

func (*DeviceDurationUpsertOne) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateDayJson

UpdateDayJson sets the "dayJson" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateDeviceName

func (u *DeviceDurationUpsertOne) UpdateDeviceName() *DeviceDurationUpsertOne

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateEbutton

UpdateEbutton sets the "ebutton" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateNewValues

func (u *DeviceDurationUpsertOne) UpdateNewValues() *DeviceDurationUpsertOne

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

client.DeviceDuration.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceduration.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceDurationUpsertOne) UpdatePreparation

func (u *DeviceDurationUpsertOne) UpdatePreparation() *DeviceDurationUpsertOne

UpdatePreparation sets the "preparation" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateProductKey

func (u *DeviceDurationUpsertOne) UpdateProductKey() *DeviceDurationUpsertOne

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateStandBy

UpdateStandBy sets the "standBy" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateUpdatedAt

func (u *DeviceDurationUpsertOne) UpdateUpdatedAt() *DeviceDurationUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateWaiting

UpdateWaiting sets the "waiting" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateWashing

UpdateWashing sets the "washing" field to the value that was provided on create.

func (*DeviceDurationUpsertOne) UpdateWashingCold

func (u *DeviceDurationUpsertOne) UpdateWashingCold() *DeviceDurationUpsertOne

UpdateWashingCold sets the "washingCold" field to the value that was provided on create.

type DeviceDurations

type DeviceDurations []*DeviceDuration

DeviceDurations is a parsable slice of DeviceDuration.

type DeviceEvent

type DeviceEvent struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// EventType | 事件类型,INFO_EVENT_TYPE:信息。ALERT_EVENT_TYPE:告警。ERROR_EVENT_TYPE:故障。
	EventType string `json:"eventType,omitempty"`
	// Identifier | 事件的标识符
	Identifier string `json:"identifier,omitempty"`
	// Name | 事件名称
	Name string `json:"name,omitempty"`
	// Output data | 事件的输出参数
	OutputData string `json:"outputData,omitempty"`
	// Time | 事件发生时间。毫秒级时间戳。
	Time string `json:"time,omitempty"`
	// contains filtered or unexported fields
}

DeviceEvent is the model entity for the DeviceEvent schema.

func (*DeviceEvent) ExecContext

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

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

func (*DeviceEvent) QueryContext

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

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

func (*DeviceEvent) String

func (de *DeviceEvent) String() string

String implements the fmt.Stringer.

func (*DeviceEvent) Unwrap

func (de *DeviceEvent) Unwrap() *DeviceEvent

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

func (*DeviceEvent) Update

func (de *DeviceEvent) Update() *DeviceEventUpdateOne

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

func (*DeviceEvent) Value

func (de *DeviceEvent) Value(name string) (ent.Value, error)

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

type DeviceEventClient

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

DeviceEventClient is a client for the DeviceEvent schema.

func NewDeviceEventClient

func NewDeviceEventClient(c config) *DeviceEventClient

NewDeviceEventClient returns a client for the DeviceEvent from the given config.

func (*DeviceEventClient) Create

func (c *DeviceEventClient) Create() *DeviceEventCreate

Create returns a builder for creating a DeviceEvent entity.

func (*DeviceEventClient) CreateBulk

func (c *DeviceEventClient) CreateBulk(builders ...*DeviceEventCreate) *DeviceEventCreateBulk

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

func (*DeviceEventClient) Delete

func (c *DeviceEventClient) Delete() *DeviceEventDelete

Delete returns a delete builder for DeviceEvent.

func (*DeviceEventClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceEventClient) DeleteOneID

func (c *DeviceEventClient) DeleteOneID(id uint64) *DeviceEventDeleteOne

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

func (*DeviceEventClient) ExecContext

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

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

func (*DeviceEventClient) Get

Get returns a DeviceEvent entity by its id.

func (*DeviceEventClient) GetX

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

func (*DeviceEventClient) Hooks

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

Hooks returns the client hooks.

func (*DeviceEventClient) Intercept

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

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

func (*DeviceEventClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DeviceEventClient) MapCreateBulk

func (c *DeviceEventClient) MapCreateBulk(slice any, setFunc func(*DeviceEventCreate, int)) *DeviceEventCreateBulk

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

func (*DeviceEventClient) Query

func (c *DeviceEventClient) Query() *DeviceEventQuery

Query returns a query builder for DeviceEvent.

func (*DeviceEventClient) QueryContext

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

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

func (*DeviceEventClient) Update

func (c *DeviceEventClient) Update() *DeviceEventUpdate

Update returns an update builder for DeviceEvent.

func (*DeviceEventClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceEventClient) UpdateOneID

func (c *DeviceEventClient) UpdateOneID(id uint64) *DeviceEventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeviceEventClient) Use

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

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

type DeviceEventCreate

type DeviceEventCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceEventCreate is the builder for creating a DeviceEvent entity.

func (*DeviceEventCreate) Exec

func (dec *DeviceEventCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceEventCreate) ExecContext

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

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

func (*DeviceEventCreate) ExecX

func (dec *DeviceEventCreate) ExecX(ctx context.Context)

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

func (*DeviceEventCreate) Mutation

func (dec *DeviceEventCreate) Mutation() *DeviceEventMutation

Mutation returns the DeviceEventMutation object of the builder.

func (*DeviceEventCreate) OnConflict

func (dec *DeviceEventCreate) OnConflict(opts ...sql.ConflictOption) *DeviceEventUpsertOne

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

client.DeviceEvent.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceEventUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceEventCreate) OnConflictColumns

func (dec *DeviceEventCreate) OnConflictColumns(columns ...string) *DeviceEventUpsertOne

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

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

func (*DeviceEventCreate) QueryContext

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

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

func (*DeviceEventCreate) Save

func (dec *DeviceEventCreate) Save(ctx context.Context) (*DeviceEvent, error)

Save creates the DeviceEvent in the database.

func (*DeviceEventCreate) SaveX

func (dec *DeviceEventCreate) SaveX(ctx context.Context) *DeviceEvent

SaveX calls Save and panics if Save returns an error.

func (*DeviceEventCreate) SetCreatedAt

func (dec *DeviceEventCreate) SetCreatedAt(t time.Time) *DeviceEventCreate

SetCreatedAt sets the "created_at" field.

func (*DeviceEventCreate) SetEventType

func (dec *DeviceEventCreate) SetEventType(s string) *DeviceEventCreate

SetEventType sets the "eventType" field.

func (*DeviceEventCreate) SetID

SetID sets the "id" field.

func (*DeviceEventCreate) SetIdentifier

func (dec *DeviceEventCreate) SetIdentifier(s string) *DeviceEventCreate

SetIdentifier sets the "identifier" field.

func (*DeviceEventCreate) SetIotID

func (dec *DeviceEventCreate) SetIotID(s string) *DeviceEventCreate

SetIotID sets the "iotID" field.

func (*DeviceEventCreate) SetName

func (dec *DeviceEventCreate) SetName(s string) *DeviceEventCreate

SetName sets the "name" field.

func (*DeviceEventCreate) SetNillableCreatedAt

func (dec *DeviceEventCreate) SetNillableCreatedAt(t *time.Time) *DeviceEventCreate

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

func (*DeviceEventCreate) SetNillableEventType

func (dec *DeviceEventCreate) SetNillableEventType(s *string) *DeviceEventCreate

SetNillableEventType sets the "eventType" field if the given value is not nil.

func (*DeviceEventCreate) SetNillableOutputData

func (dec *DeviceEventCreate) SetNillableOutputData(s *string) *DeviceEventCreate

SetNillableOutputData sets the "outputData" field if the given value is not nil.

func (*DeviceEventCreate) SetNillableSort

func (dec *DeviceEventCreate) SetNillableSort(u *uint32) *DeviceEventCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceEventCreate) SetNillableStatus

func (dec *DeviceEventCreate) SetNillableStatus(u *uint8) *DeviceEventCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceEventCreate) SetNillableUpdatedAt

func (dec *DeviceEventCreate) SetNillableUpdatedAt(t *time.Time) *DeviceEventCreate

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

func (*DeviceEventCreate) SetNotNilEventType

func (de *DeviceEventCreate) SetNotNilEventType(value *string) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilIdentifier

func (de *DeviceEventCreate) SetNotNilIdentifier(value *string) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilIotID

func (de *DeviceEventCreate) SetNotNilIotID(value *string) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilName

func (de *DeviceEventCreate) SetNotNilName(value *string) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilOutputData

func (de *DeviceEventCreate) SetNotNilOutputData(value *string) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilSort

func (de *DeviceEventCreate) SetNotNilSort(value *uint32) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilStatus

func (de *DeviceEventCreate) SetNotNilStatus(value *uint8) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilTime

func (de *DeviceEventCreate) SetNotNilTime(value *string) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetNotNilUpdatedAt

func (de *DeviceEventCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceEventCreate

set field if value's pointer is not nil.

func (*DeviceEventCreate) SetOutputData

func (dec *DeviceEventCreate) SetOutputData(s string) *DeviceEventCreate

SetOutputData sets the "outputData" field.

func (*DeviceEventCreate) SetSort

func (dec *DeviceEventCreate) SetSort(u uint32) *DeviceEventCreate

SetSort sets the "sort" field.

func (*DeviceEventCreate) SetStatus

func (dec *DeviceEventCreate) SetStatus(u uint8) *DeviceEventCreate

SetStatus sets the "status" field.

func (*DeviceEventCreate) SetTime

func (dec *DeviceEventCreate) SetTime(s string) *DeviceEventCreate

SetTime sets the "time" field.

func (*DeviceEventCreate) SetUpdatedAt

func (dec *DeviceEventCreate) SetUpdatedAt(t time.Time) *DeviceEventCreate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceEventCreate) TableName

func (dec *DeviceEventCreate) TableName(s string) *DeviceEventCreate

type DeviceEventCreateBulk

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

DeviceEventCreateBulk is the builder for creating many DeviceEvent entities in bulk.

func (*DeviceEventCreateBulk) Exec

func (decb *DeviceEventCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceEventCreateBulk) ExecContext

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

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

func (*DeviceEventCreateBulk) ExecX

func (decb *DeviceEventCreateBulk) ExecX(ctx context.Context)

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

func (*DeviceEventCreateBulk) OnConflict

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

client.DeviceEvent.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceEventUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceEventCreateBulk) OnConflictColumns

func (decb *DeviceEventCreateBulk) OnConflictColumns(columns ...string) *DeviceEventUpsertBulk

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

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

func (*DeviceEventCreateBulk) QueryContext

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

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

func (*DeviceEventCreateBulk) Save

func (decb *DeviceEventCreateBulk) Save(ctx context.Context) ([]*DeviceEvent, error)

Save creates the DeviceEvent entities in the database.

func (*DeviceEventCreateBulk) SaveX

func (decb *DeviceEventCreateBulk) SaveX(ctx context.Context) []*DeviceEvent

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

type DeviceEventDelete

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

DeviceEventDelete is the builder for deleting a DeviceEvent entity.

func (*DeviceEventDelete) Exec

func (ded *DeviceEventDelete) Exec(ctx context.Context) (int, error)

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

func (*DeviceEventDelete) ExecContext

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

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

func (*DeviceEventDelete) ExecX

func (ded *DeviceEventDelete) ExecX(ctx context.Context) int

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

func (*DeviceEventDelete) QueryContext

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

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

func (*DeviceEventDelete) Where

Where appends a list predicates to the DeviceEventDelete builder.

type DeviceEventDeleteOne

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

DeviceEventDeleteOne is the builder for deleting a single DeviceEvent entity.

func (*DeviceEventDeleteOne) Exec

func (dedo *DeviceEventDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeviceEventDeleteOne) ExecX

func (dedo *DeviceEventDeleteOne) ExecX(ctx context.Context)

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

func (*DeviceEventDeleteOne) Where

Where appends a list predicates to the DeviceEventDelete builder.

type DeviceEventGroupBy

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

DeviceEventGroupBy is the group-by builder for DeviceEvent entities.

func (*DeviceEventGroupBy) Aggregate

func (degb *DeviceEventGroupBy) Aggregate(fns ...AggregateFunc) *DeviceEventGroupBy

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

func (*DeviceEventGroupBy) Bool

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

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

func (*DeviceEventGroupBy) BoolX

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

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

func (*DeviceEventGroupBy) Bools

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

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

func (*DeviceEventGroupBy) BoolsX

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

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

func (*DeviceEventGroupBy) Float64

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

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

func (*DeviceEventGroupBy) Float64X

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

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

func (*DeviceEventGroupBy) Float64s

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

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

func (*DeviceEventGroupBy) Float64sX

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

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

func (*DeviceEventGroupBy) Int

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

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

func (*DeviceEventGroupBy) IntX

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

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

func (*DeviceEventGroupBy) Ints

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

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

func (*DeviceEventGroupBy) IntsX

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

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

func (*DeviceEventGroupBy) Scan

func (degb *DeviceEventGroupBy) Scan(ctx context.Context, v any) error

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

func (*DeviceEventGroupBy) ScanX

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

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

func (*DeviceEventGroupBy) String

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

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

func (*DeviceEventGroupBy) StringX

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

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

func (*DeviceEventGroupBy) Strings

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

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

func (*DeviceEventGroupBy) StringsX

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

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

type DeviceEventMutation

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

DeviceEventMutation represents an operation that mutates the DeviceEvent nodes in the graph.

func (*DeviceEventMutation) AddField

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

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

func (*DeviceEventMutation) AddSort

func (m *DeviceEventMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceEventMutation) AddStatus

func (m *DeviceEventMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceEventMutation) AddedEdges

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

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

func (*DeviceEventMutation) AddedField

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

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceEventMutation) AddedFields

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

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

func (*DeviceEventMutation) AddedIDs

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

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

func (*DeviceEventMutation) AddedSort

func (m *DeviceEventMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceEventMutation) AddedStatus

func (m *DeviceEventMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceEventMutation) ClearEdge

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

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

func (*DeviceEventMutation) ClearEventType

func (m *DeviceEventMutation) ClearEventType()

ClearEventType clears the value of the "eventType" field.

func (*DeviceEventMutation) ClearField

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

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

func (*DeviceEventMutation) ClearOutputData

func (m *DeviceEventMutation) ClearOutputData()

ClearOutputData clears the value of the "outputData" field.

func (*DeviceEventMutation) ClearStatus

func (m *DeviceEventMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceEventMutation) ClearedEdges

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

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

func (*DeviceEventMutation) ClearedFields

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

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

func (DeviceEventMutation) Client

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

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

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceEventMutation) EdgeCleared

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

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

func (*DeviceEventMutation) EventType

func (m *DeviceEventMutation) EventType() (r string, exists bool)

EventType returns the value of the "eventType" field in the mutation.

func (*DeviceEventMutation) EventTypeCleared

func (m *DeviceEventMutation) EventTypeCleared() bool

EventTypeCleared returns if the "eventType" field was cleared in this mutation.

func (*DeviceEventMutation) ExecContext

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

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

func (*DeviceEventMutation) Field

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

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

func (*DeviceEventMutation) FieldCleared

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

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

func (*DeviceEventMutation) Fields

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

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

func (*DeviceEventMutation) ID

func (m *DeviceEventMutation) ID() (id uint64, exists bool)

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

func (*DeviceEventMutation) IDs

func (m *DeviceEventMutation) IDs(ctx context.Context) ([]uint64, error)

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

func (*DeviceEventMutation) Identifier

func (m *DeviceEventMutation) Identifier() (r string, exists bool)

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

func (*DeviceEventMutation) IotID

func (m *DeviceEventMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceEventMutation) Name

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

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

func (*DeviceEventMutation) OldCreatedAt

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

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

func (*DeviceEventMutation) OldEventType

func (m *DeviceEventMutation) OldEventType(ctx context.Context) (v string, err error)

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

func (*DeviceEventMutation) OldField

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

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

func (*DeviceEventMutation) OldIdentifier

func (m *DeviceEventMutation) OldIdentifier(ctx context.Context) (v string, err error)

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

func (*DeviceEventMutation) OldIotID

func (m *DeviceEventMutation) OldIotID(ctx context.Context) (v string, err error)

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

func (*DeviceEventMutation) OldName

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

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

func (*DeviceEventMutation) OldOutputData

func (m *DeviceEventMutation) OldOutputData(ctx context.Context) (v string, err error)

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

func (*DeviceEventMutation) OldSort

func (m *DeviceEventMutation) OldSort(ctx context.Context) (v uint32, err error)

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

func (*DeviceEventMutation) OldStatus

func (m *DeviceEventMutation) OldStatus(ctx context.Context) (v uint8, err error)

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

func (*DeviceEventMutation) OldTime

func (m *DeviceEventMutation) OldTime(ctx context.Context) (v string, err error)

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

func (*DeviceEventMutation) OldUpdatedAt

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

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

func (*DeviceEventMutation) Op

func (m *DeviceEventMutation) Op() Op

Op returns the operation name.

func (*DeviceEventMutation) OutputData

func (m *DeviceEventMutation) OutputData() (r string, exists bool)

OutputData returns the value of the "outputData" field in the mutation.

func (*DeviceEventMutation) OutputDataCleared

func (m *DeviceEventMutation) OutputDataCleared() bool

OutputDataCleared returns if the "outputData" field was cleared in this mutation.

func (*DeviceEventMutation) QueryContext

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

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

func (*DeviceEventMutation) RemovedEdges

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

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

func (*DeviceEventMutation) RemovedIDs

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

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceEventMutation) ResetCreatedAt

func (m *DeviceEventMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceEventMutation) ResetEdge

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

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

func (*DeviceEventMutation) ResetEventType

func (m *DeviceEventMutation) ResetEventType()

ResetEventType resets all changes to the "eventType" field.

func (*DeviceEventMutation) ResetField

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

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

func (*DeviceEventMutation) ResetIdentifier

func (m *DeviceEventMutation) ResetIdentifier()

ResetIdentifier resets all changes to the "identifier" field.

func (*DeviceEventMutation) ResetIotID

func (m *DeviceEventMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceEventMutation) ResetName

func (m *DeviceEventMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*DeviceEventMutation) ResetOutputData

func (m *DeviceEventMutation) ResetOutputData()

ResetOutputData resets all changes to the "outputData" field.

func (*DeviceEventMutation) ResetSort

func (m *DeviceEventMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceEventMutation) ResetStatus

func (m *DeviceEventMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceEventMutation) ResetTime

func (m *DeviceEventMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*DeviceEventMutation) ResetUpdatedAt

func (m *DeviceEventMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceEventMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*DeviceEventMutation) SetEventType

func (m *DeviceEventMutation) SetEventType(s string)

SetEventType sets the "eventType" field.

func (*DeviceEventMutation) SetField

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

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceEventMutation) SetID

func (m *DeviceEventMutation) SetID(id uint64)

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

func (*DeviceEventMutation) SetIdentifier

func (m *DeviceEventMutation) SetIdentifier(s string)

SetIdentifier sets the "identifier" field.

func (*DeviceEventMutation) SetIotID

func (m *DeviceEventMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceEventMutation) SetName

func (m *DeviceEventMutation) SetName(s string)

SetName sets the "name" field.

func (*DeviceEventMutation) SetOp

func (m *DeviceEventMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceEventMutation) SetOutputData

func (m *DeviceEventMutation) SetOutputData(s string)

SetOutputData sets the "outputData" field.

func (*DeviceEventMutation) SetSort

func (m *DeviceEventMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceEventMutation) SetStatus

func (m *DeviceEventMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceEventMutation) SetTime

func (m *DeviceEventMutation) SetTime(s string)

SetTime sets the "time" field.

func (*DeviceEventMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*DeviceEventMutation) Sort

func (m *DeviceEventMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceEventMutation) Status

func (m *DeviceEventMutation) Status() (r uint8, exists bool)

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

func (*DeviceEventMutation) StatusCleared

func (m *DeviceEventMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*DeviceEventMutation) Time

func (m *DeviceEventMutation) Time() (r string, exists bool)

Time returns the value of the "time" field in the mutation.

func (DeviceEventMutation) Tx

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

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

func (*DeviceEventMutation) Type

func (m *DeviceEventMutation) Type() string

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

func (*DeviceEventMutation) UpdatedAt

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

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceEventMutation) Where

func (m *DeviceEventMutation) Where(ps ...predicate.DeviceEvent)

Where appends a list predicates to the DeviceEventMutation builder.

func (*DeviceEventMutation) WhereP

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

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

type DeviceEventPageList

type DeviceEventPageList struct {
	List        []*DeviceEvent `json:"list"`
	PageDetails *PageDetails   `json:"pageDetails"`
}

DeviceEventPageList is DeviceEvent PageList result.

type DeviceEventPager

type DeviceEventPager struct {
	Order  deviceevent.OrderOption
	Filter func(*DeviceEventQuery) (*DeviceEventQuery, error)
}

func (*DeviceEventPager) ApplyFilter

func (p *DeviceEventPager) ApplyFilter(query *DeviceEventQuery) (*DeviceEventQuery, error)

type DeviceEventPaginateOption

type DeviceEventPaginateOption func(*DeviceEventPager)

DeviceEventPaginateOption enables pagination customization.

type DeviceEventQuery

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

DeviceEventQuery is the builder for querying DeviceEvent entities.

func (*DeviceEventQuery) Aggregate

func (deq *DeviceEventQuery) Aggregate(fns ...AggregateFunc) *DeviceEventSelect

Aggregate returns a DeviceEventSelect configured with the given aggregations.

func (*DeviceEventQuery) All

func (deq *DeviceEventQuery) All(ctx context.Context) ([]*DeviceEvent, error)

All executes the query and returns a list of DeviceEvents.

func (*DeviceEventQuery) AllX

func (deq *DeviceEventQuery) AllX(ctx context.Context) []*DeviceEvent

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

func (*DeviceEventQuery) Clone

func (deq *DeviceEventQuery) Clone() *DeviceEventQuery

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

func (*DeviceEventQuery) Count

func (deq *DeviceEventQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceEventQuery) CountX

func (deq *DeviceEventQuery) CountX(ctx context.Context) int

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

func (*DeviceEventQuery) ExecContext

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

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

func (*DeviceEventQuery) Exist

func (deq *DeviceEventQuery) Exist(ctx context.Context) (bool, error)

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

func (*DeviceEventQuery) ExistX

func (deq *DeviceEventQuery) ExistX(ctx context.Context) bool

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

func (*DeviceEventQuery) First

func (deq *DeviceEventQuery) First(ctx context.Context) (*DeviceEvent, error)

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

func (*DeviceEventQuery) FirstID

func (deq *DeviceEventQuery) FirstID(ctx context.Context) (id uint64, err error)

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

func (*DeviceEventQuery) FirstIDX

func (deq *DeviceEventQuery) FirstIDX(ctx context.Context) uint64

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

func (*DeviceEventQuery) FirstX

func (deq *DeviceEventQuery) FirstX(ctx context.Context) *DeviceEvent

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

func (*DeviceEventQuery) GroupBy

func (deq *DeviceEventQuery) GroupBy(field string, fields ...string) *DeviceEventGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

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

client.DeviceEvent.Query().
	GroupBy(deviceevent.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceEventQuery) IDs

func (deq *DeviceEventQuery) IDs(ctx context.Context) (ids []uint64, err error)

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

func (*DeviceEventQuery) IDsX

func (deq *DeviceEventQuery) IDsX(ctx context.Context) []uint64

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

func (*DeviceEventQuery) Limit

func (deq *DeviceEventQuery) Limit(limit int) *DeviceEventQuery

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

func (*DeviceEventQuery) Modify

func (deq *DeviceEventQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceEventSelect

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

func (*DeviceEventQuery) Offset

func (deq *DeviceEventQuery) Offset(offset int) *DeviceEventQuery

Offset to start from.

func (*DeviceEventQuery) Only

func (deq *DeviceEventQuery) Only(ctx context.Context) (*DeviceEvent, error)

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

func (*DeviceEventQuery) OnlyID

func (deq *DeviceEventQuery) OnlyID(ctx context.Context) (id uint64, err error)

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

func (*DeviceEventQuery) OnlyIDX

func (deq *DeviceEventQuery) OnlyIDX(ctx context.Context) uint64

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

func (*DeviceEventQuery) OnlyX

func (deq *DeviceEventQuery) OnlyX(ctx context.Context) *DeviceEvent

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

func (*DeviceEventQuery) Order

Order specifies how the records should be ordered.

func (*DeviceEventQuery) Page

func (de *DeviceEventQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...DeviceEventPaginateOption,
) (*DeviceEventPageList, error)

func (*DeviceEventQuery) QueryContext

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

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

func (*DeviceEventQuery) Select

func (deq *DeviceEventQuery) Select(fields ...string) *DeviceEventSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

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

client.DeviceEvent.Query().
	Select(deviceevent.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceEventQuery) Unique

func (deq *DeviceEventQuery) Unique(unique bool) *DeviceEventQuery

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

func (*DeviceEventQuery) Where

Where adds a new predicate for the DeviceEventQuery builder.

type DeviceEventSelect

type DeviceEventSelect struct {
	*DeviceEventQuery
	// contains filtered or unexported fields
}

DeviceEventSelect is the builder for selecting fields of DeviceEvent entities.

func (*DeviceEventSelect) Aggregate

func (des *DeviceEventSelect) Aggregate(fns ...AggregateFunc) *DeviceEventSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceEventSelect) Bool

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

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

func (*DeviceEventSelect) BoolX

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

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

func (*DeviceEventSelect) Bools

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

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

func (*DeviceEventSelect) BoolsX

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

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

func (DeviceEventSelect) ExecContext

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

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

func (*DeviceEventSelect) Float64

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

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

func (*DeviceEventSelect) Float64X

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

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

func (*DeviceEventSelect) Float64s

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

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

func (*DeviceEventSelect) Float64sX

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

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

func (*DeviceEventSelect) Int

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

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

func (*DeviceEventSelect) IntX

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

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

func (*DeviceEventSelect) Ints

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

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

func (*DeviceEventSelect) IntsX

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

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

func (*DeviceEventSelect) Modify

func (des *DeviceEventSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceEventSelect

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

func (DeviceEventSelect) QueryContext

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

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

func (*DeviceEventSelect) Scan

func (des *DeviceEventSelect) Scan(ctx context.Context, v any) error

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

func (*DeviceEventSelect) ScanX

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

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

func (*DeviceEventSelect) String

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

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

func (*DeviceEventSelect) StringX

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

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

func (*DeviceEventSelect) Strings

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

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

func (*DeviceEventSelect) StringsX

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

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

type DeviceEventUpdate

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

DeviceEventUpdate is the builder for updating DeviceEvent entities.

func (*DeviceEventUpdate) AddSort

func (deu *DeviceEventUpdate) AddSort(u int32) *DeviceEventUpdate

AddSort adds u to the "sort" field.

func (*DeviceEventUpdate) AddStatus

func (deu *DeviceEventUpdate) AddStatus(u int8) *DeviceEventUpdate

AddStatus adds u to the "status" field.

func (*DeviceEventUpdate) ClearEventType

func (deu *DeviceEventUpdate) ClearEventType() *DeviceEventUpdate

ClearEventType clears the value of the "eventType" field.

func (*DeviceEventUpdate) ClearOutputData

func (deu *DeviceEventUpdate) ClearOutputData() *DeviceEventUpdate

ClearOutputData clears the value of the "outputData" field.

func (*DeviceEventUpdate) ClearStatus

func (deu *DeviceEventUpdate) ClearStatus() *DeviceEventUpdate

ClearStatus clears the value of the "status" field.

func (*DeviceEventUpdate) Exec

func (deu *DeviceEventUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceEventUpdate) ExecContext

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

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

func (*DeviceEventUpdate) ExecX

func (deu *DeviceEventUpdate) ExecX(ctx context.Context)

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

func (*DeviceEventUpdate) Modify

func (deu *DeviceEventUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceEventUpdate

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

func (*DeviceEventUpdate) Mutation

func (deu *DeviceEventUpdate) Mutation() *DeviceEventMutation

Mutation returns the DeviceEventMutation object of the builder.

func (*DeviceEventUpdate) QueryContext

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

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

func (*DeviceEventUpdate) Save

func (deu *DeviceEventUpdate) Save(ctx context.Context) (int, error)

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

func (*DeviceEventUpdate) SaveX

func (deu *DeviceEventUpdate) SaveX(ctx context.Context) int

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

func (*DeviceEventUpdate) SetEventType

func (deu *DeviceEventUpdate) SetEventType(s string) *DeviceEventUpdate

SetEventType sets the "eventType" field.

func (*DeviceEventUpdate) SetIdentifier

func (deu *DeviceEventUpdate) SetIdentifier(s string) *DeviceEventUpdate

SetIdentifier sets the "identifier" field.

func (*DeviceEventUpdate) SetIotID

func (deu *DeviceEventUpdate) SetIotID(s string) *DeviceEventUpdate

SetIotID sets the "iotID" field.

func (*DeviceEventUpdate) SetName

func (deu *DeviceEventUpdate) SetName(s string) *DeviceEventUpdate

SetName sets the "name" field.

func (*DeviceEventUpdate) SetNillableEventType

func (deu *DeviceEventUpdate) SetNillableEventType(s *string) *DeviceEventUpdate

SetNillableEventType sets the "eventType" field if the given value is not nil.

func (*DeviceEventUpdate) SetNillableIdentifier

func (deu *DeviceEventUpdate) SetNillableIdentifier(s *string) *DeviceEventUpdate

SetNillableIdentifier sets the "identifier" field if the given value is not nil.

func (*DeviceEventUpdate) SetNillableIotID

func (deu *DeviceEventUpdate) SetNillableIotID(s *string) *DeviceEventUpdate

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceEventUpdate) SetNillableName

func (deu *DeviceEventUpdate) SetNillableName(s *string) *DeviceEventUpdate

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

func (*DeviceEventUpdate) SetNillableOutputData

func (deu *DeviceEventUpdate) SetNillableOutputData(s *string) *DeviceEventUpdate

SetNillableOutputData sets the "outputData" field if the given value is not nil.

func (*DeviceEventUpdate) SetNillableSort

func (deu *DeviceEventUpdate) SetNillableSort(u *uint32) *DeviceEventUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceEventUpdate) SetNillableStatus

func (deu *DeviceEventUpdate) SetNillableStatus(u *uint8) *DeviceEventUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceEventUpdate) SetNillableTime

func (deu *DeviceEventUpdate) SetNillableTime(s *string) *DeviceEventUpdate

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceEventUpdate) SetNotNilEventType

func (de *DeviceEventUpdate) SetNotNilEventType(value *string) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilIdentifier

func (de *DeviceEventUpdate) SetNotNilIdentifier(value *string) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilIotID

func (de *DeviceEventUpdate) SetNotNilIotID(value *string) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilName

func (de *DeviceEventUpdate) SetNotNilName(value *string) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilOutputData

func (de *DeviceEventUpdate) SetNotNilOutputData(value *string) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilSort

func (de *DeviceEventUpdate) SetNotNilSort(value *uint32) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilStatus

func (de *DeviceEventUpdate) SetNotNilStatus(value *uint8) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilTime

func (de *DeviceEventUpdate) SetNotNilTime(value *string) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetNotNilUpdatedAt

func (de *DeviceEventUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceEventUpdate

set field if value's pointer is not nil.

func (*DeviceEventUpdate) SetOutputData

func (deu *DeviceEventUpdate) SetOutputData(s string) *DeviceEventUpdate

SetOutputData sets the "outputData" field.

func (*DeviceEventUpdate) SetSort

func (deu *DeviceEventUpdate) SetSort(u uint32) *DeviceEventUpdate

SetSort sets the "sort" field.

func (*DeviceEventUpdate) SetStatus

func (deu *DeviceEventUpdate) SetStatus(u uint8) *DeviceEventUpdate

SetStatus sets the "status" field.

func (*DeviceEventUpdate) SetTime

func (deu *DeviceEventUpdate) SetTime(s string) *DeviceEventUpdate

SetTime sets the "time" field.

func (*DeviceEventUpdate) SetUpdatedAt

func (deu *DeviceEventUpdate) SetUpdatedAt(t time.Time) *DeviceEventUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceEventUpdate) Where

Where appends a list predicates to the DeviceEventUpdate builder.

type DeviceEventUpdateOne

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

DeviceEventUpdateOne is the builder for updating a single DeviceEvent entity.

func (*DeviceEventUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceEventUpdateOne) AddStatus

func (deuo *DeviceEventUpdateOne) AddStatus(u int8) *DeviceEventUpdateOne

AddStatus adds u to the "status" field.

func (*DeviceEventUpdateOne) ClearEventType

func (deuo *DeviceEventUpdateOne) ClearEventType() *DeviceEventUpdateOne

ClearEventType clears the value of the "eventType" field.

func (*DeviceEventUpdateOne) ClearOutputData

func (deuo *DeviceEventUpdateOne) ClearOutputData() *DeviceEventUpdateOne

ClearOutputData clears the value of the "outputData" field.

func (*DeviceEventUpdateOne) ClearStatus

func (deuo *DeviceEventUpdateOne) ClearStatus() *DeviceEventUpdateOne

ClearStatus clears the value of the "status" field.

func (*DeviceEventUpdateOne) Exec

func (deuo *DeviceEventUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeviceEventUpdateOne) ExecContext

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

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

func (*DeviceEventUpdateOne) ExecX

func (deuo *DeviceEventUpdateOne) ExecX(ctx context.Context)

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

func (*DeviceEventUpdateOne) Modify

func (deuo *DeviceEventUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceEventUpdateOne

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

func (*DeviceEventUpdateOne) Mutation

func (deuo *DeviceEventUpdateOne) Mutation() *DeviceEventMutation

Mutation returns the DeviceEventMutation object of the builder.

func (*DeviceEventUpdateOne) QueryContext

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

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

func (*DeviceEventUpdateOne) Save

Save executes the query and returns the updated DeviceEvent entity.

func (*DeviceEventUpdateOne) SaveX

func (deuo *DeviceEventUpdateOne) SaveX(ctx context.Context) *DeviceEvent

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

func (*DeviceEventUpdateOne) Select

func (deuo *DeviceEventUpdateOne) Select(field string, fields ...string) *DeviceEventUpdateOne

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

func (*DeviceEventUpdateOne) SetEventType

func (deuo *DeviceEventUpdateOne) SetEventType(s string) *DeviceEventUpdateOne

SetEventType sets the "eventType" field.

func (*DeviceEventUpdateOne) SetIdentifier

func (deuo *DeviceEventUpdateOne) SetIdentifier(s string) *DeviceEventUpdateOne

SetIdentifier sets the "identifier" field.

func (*DeviceEventUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceEventUpdateOne) SetName

SetName sets the "name" field.

func (*DeviceEventUpdateOne) SetNillableEventType

func (deuo *DeviceEventUpdateOne) SetNillableEventType(s *string) *DeviceEventUpdateOne

SetNillableEventType sets the "eventType" field if the given value is not nil.

func (*DeviceEventUpdateOne) SetNillableIdentifier

func (deuo *DeviceEventUpdateOne) SetNillableIdentifier(s *string) *DeviceEventUpdateOne

SetNillableIdentifier sets the "identifier" field if the given value is not nil.

func (*DeviceEventUpdateOne) SetNillableIotID

func (deuo *DeviceEventUpdateOne) SetNillableIotID(s *string) *DeviceEventUpdateOne

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceEventUpdateOne) SetNillableName

func (deuo *DeviceEventUpdateOne) SetNillableName(s *string) *DeviceEventUpdateOne

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

func (*DeviceEventUpdateOne) SetNillableOutputData

func (deuo *DeviceEventUpdateOne) SetNillableOutputData(s *string) *DeviceEventUpdateOne

SetNillableOutputData sets the "outputData" field if the given value is not nil.

func (*DeviceEventUpdateOne) SetNillableSort

func (deuo *DeviceEventUpdateOne) SetNillableSort(u *uint32) *DeviceEventUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceEventUpdateOne) SetNillableStatus

func (deuo *DeviceEventUpdateOne) SetNillableStatus(u *uint8) *DeviceEventUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceEventUpdateOne) SetNillableTime

func (deuo *DeviceEventUpdateOne) SetNillableTime(s *string) *DeviceEventUpdateOne

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceEventUpdateOne) SetNotNilEventType

func (de *DeviceEventUpdateOne) SetNotNilEventType(value *string) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilIdentifier

func (de *DeviceEventUpdateOne) SetNotNilIdentifier(value *string) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilIotID

func (de *DeviceEventUpdateOne) SetNotNilIotID(value *string) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilName

func (de *DeviceEventUpdateOne) SetNotNilName(value *string) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilOutputData

func (de *DeviceEventUpdateOne) SetNotNilOutputData(value *string) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilSort

func (de *DeviceEventUpdateOne) SetNotNilSort(value *uint32) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilStatus

func (de *DeviceEventUpdateOne) SetNotNilStatus(value *uint8) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilTime

func (de *DeviceEventUpdateOne) SetNotNilTime(value *string) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetNotNilUpdatedAt

func (de *DeviceEventUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DeviceEventUpdateOne

set field if value's pointer is not nil.

func (*DeviceEventUpdateOne) SetOutputData

func (deuo *DeviceEventUpdateOne) SetOutputData(s string) *DeviceEventUpdateOne

SetOutputData sets the "outputData" field.

func (*DeviceEventUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceEventUpdateOne) SetStatus

func (deuo *DeviceEventUpdateOne) SetStatus(u uint8) *DeviceEventUpdateOne

SetStatus sets the "status" field.

func (*DeviceEventUpdateOne) SetTime

SetTime sets the "time" field.

func (*DeviceEventUpdateOne) SetUpdatedAt

func (deuo *DeviceEventUpdateOne) SetUpdatedAt(t time.Time) *DeviceEventUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*DeviceEventUpdateOne) Where

Where appends a list predicates to the DeviceEventUpdate builder.

type DeviceEventUpsert

type DeviceEventUpsert struct {
	*sql.UpdateSet
}

DeviceEventUpsert is the "OnConflict" setter.

func (*DeviceEventUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceEventUpsert) AddStatus

func (u *DeviceEventUpsert) AddStatus(v uint8) *DeviceEventUpsert

AddStatus adds v to the "status" field.

func (*DeviceEventUpsert) ClearEventType

func (u *DeviceEventUpsert) ClearEventType() *DeviceEventUpsert

ClearEventType clears the value of the "eventType" field.

func (*DeviceEventUpsert) ClearOutputData

func (u *DeviceEventUpsert) ClearOutputData() *DeviceEventUpsert

ClearOutputData clears the value of the "outputData" field.

func (*DeviceEventUpsert) ClearStatus

func (u *DeviceEventUpsert) ClearStatus() *DeviceEventUpsert

ClearStatus clears the value of the "status" field.

func (*DeviceEventUpsert) SetEventType

func (u *DeviceEventUpsert) SetEventType(v string) *DeviceEventUpsert

SetEventType sets the "eventType" field.

func (*DeviceEventUpsert) SetIdentifier

func (u *DeviceEventUpsert) SetIdentifier(v string) *DeviceEventUpsert

SetIdentifier sets the "identifier" field.

func (*DeviceEventUpsert) SetIotID

func (u *DeviceEventUpsert) SetIotID(v string) *DeviceEventUpsert

SetIotID sets the "iotID" field.

func (*DeviceEventUpsert) SetName

SetName sets the "name" field.

func (*DeviceEventUpsert) SetOutputData

func (u *DeviceEventUpsert) SetOutputData(v string) *DeviceEventUpsert

SetOutputData sets the "outputData" field.

func (*DeviceEventUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceEventUpsert) SetStatus

func (u *DeviceEventUpsert) SetStatus(v uint8) *DeviceEventUpsert

SetStatus sets the "status" field.

func (*DeviceEventUpsert) SetTime

SetTime sets the "time" field.

func (*DeviceEventUpsert) SetUpdatedAt

func (u *DeviceEventUpsert) SetUpdatedAt(v time.Time) *DeviceEventUpsert

SetUpdatedAt sets the "updated_at" field.

func (*DeviceEventUpsert) UpdateEventType

func (u *DeviceEventUpsert) UpdateEventType() *DeviceEventUpsert

UpdateEventType sets the "eventType" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateIdentifier

func (u *DeviceEventUpsert) UpdateIdentifier() *DeviceEventUpsert

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateIotID

func (u *DeviceEventUpsert) UpdateIotID() *DeviceEventUpsert

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateName

func (u *DeviceEventUpsert) UpdateName() *DeviceEventUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateOutputData

func (u *DeviceEventUpsert) UpdateOutputData() *DeviceEventUpsert

UpdateOutputData sets the "outputData" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateSort

func (u *DeviceEventUpsert) UpdateSort() *DeviceEventUpsert

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateStatus

func (u *DeviceEventUpsert) UpdateStatus() *DeviceEventUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateTime

func (u *DeviceEventUpsert) UpdateTime() *DeviceEventUpsert

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceEventUpsert) UpdateUpdatedAt

func (u *DeviceEventUpsert) UpdateUpdatedAt() *DeviceEventUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceEventUpsertBulk

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

DeviceEventUpsertBulk is the builder for "upsert"-ing a bulk of DeviceEvent nodes.

func (*DeviceEventUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceEventUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceEventUpsertBulk) ClearEventType

func (u *DeviceEventUpsertBulk) ClearEventType() *DeviceEventUpsertBulk

ClearEventType clears the value of the "eventType" field.

func (*DeviceEventUpsertBulk) ClearOutputData

func (u *DeviceEventUpsertBulk) ClearOutputData() *DeviceEventUpsertBulk

ClearOutputData clears the value of the "outputData" field.

func (*DeviceEventUpsertBulk) ClearStatus

func (u *DeviceEventUpsertBulk) ClearStatus() *DeviceEventUpsertBulk

ClearStatus clears the value of the "status" field.

func (*DeviceEventUpsertBulk) DoNothing

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

func (*DeviceEventUpsertBulk) Exec

Exec executes the query.

func (*DeviceEventUpsertBulk) ExecX

func (u *DeviceEventUpsertBulk) ExecX(ctx context.Context)

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

func (*DeviceEventUpsertBulk) Ignore

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

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

func (*DeviceEventUpsertBulk) SetEventType

SetEventType sets the "eventType" field.

func (*DeviceEventUpsertBulk) SetIdentifier

func (u *DeviceEventUpsertBulk) SetIdentifier(v string) *DeviceEventUpsertBulk

SetIdentifier sets the "identifier" field.

func (*DeviceEventUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceEventUpsertBulk) SetName

SetName sets the "name" field.

func (*DeviceEventUpsertBulk) SetOutputData

func (u *DeviceEventUpsertBulk) SetOutputData(v string) *DeviceEventUpsertBulk

SetOutputData sets the "outputData" field.

func (*DeviceEventUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceEventUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceEventUpsertBulk) SetTime

SetTime sets the "time" field.

func (*DeviceEventUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceEventUpsertBulk) Update

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

func (*DeviceEventUpsertBulk) UpdateEventType

func (u *DeviceEventUpsertBulk) UpdateEventType() *DeviceEventUpsertBulk

UpdateEventType sets the "eventType" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateIdentifier

func (u *DeviceEventUpsertBulk) UpdateIdentifier() *DeviceEventUpsertBulk

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateIotID

func (u *DeviceEventUpsertBulk) UpdateIotID() *DeviceEventUpsertBulk

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateNewValues

func (u *DeviceEventUpsertBulk) UpdateNewValues() *DeviceEventUpsertBulk

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

client.DeviceEvent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceevent.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceEventUpsertBulk) UpdateOutputData

func (u *DeviceEventUpsertBulk) UpdateOutputData() *DeviceEventUpsertBulk

UpdateOutputData sets the "outputData" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateStatus

func (u *DeviceEventUpsertBulk) UpdateStatus() *DeviceEventUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateTime

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceEventUpsertBulk) UpdateUpdatedAt

func (u *DeviceEventUpsertBulk) UpdateUpdatedAt() *DeviceEventUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceEventUpsertOne

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

DeviceEventUpsertOne is the builder for "upsert"-ing

one DeviceEvent node.

func (*DeviceEventUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceEventUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceEventUpsertOne) ClearEventType

func (u *DeviceEventUpsertOne) ClearEventType() *DeviceEventUpsertOne

ClearEventType clears the value of the "eventType" field.

func (*DeviceEventUpsertOne) ClearOutputData

func (u *DeviceEventUpsertOne) ClearOutputData() *DeviceEventUpsertOne

ClearOutputData clears the value of the "outputData" field.

func (*DeviceEventUpsertOne) ClearStatus

func (u *DeviceEventUpsertOne) ClearStatus() *DeviceEventUpsertOne

ClearStatus clears the value of the "status" field.

func (*DeviceEventUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceEventUpsertOne) Exec

Exec executes the query.

func (*DeviceEventUpsertOne) ExecX

func (u *DeviceEventUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceEventUpsertOne) ID

func (u *DeviceEventUpsertOne) ID(ctx context.Context) (id uint64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceEventUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceEventUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceEvent.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceEventUpsertOne) SetEventType

func (u *DeviceEventUpsertOne) SetEventType(v string) *DeviceEventUpsertOne

SetEventType sets the "eventType" field.

func (*DeviceEventUpsertOne) SetIdentifier

func (u *DeviceEventUpsertOne) SetIdentifier(v string) *DeviceEventUpsertOne

SetIdentifier sets the "identifier" field.

func (*DeviceEventUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceEventUpsertOne) SetName

SetName sets the "name" field.

func (*DeviceEventUpsertOne) SetOutputData

func (u *DeviceEventUpsertOne) SetOutputData(v string) *DeviceEventUpsertOne

SetOutputData sets the "outputData" field.

func (*DeviceEventUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceEventUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceEventUpsertOne) SetTime

SetTime sets the "time" field.

func (*DeviceEventUpsertOne) SetUpdatedAt

func (u *DeviceEventUpsertOne) SetUpdatedAt(v time.Time) *DeviceEventUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*DeviceEventUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeviceEventCreate.OnConflict documentation for more info.

func (*DeviceEventUpsertOne) UpdateEventType

func (u *DeviceEventUpsertOne) UpdateEventType() *DeviceEventUpsertOne

UpdateEventType sets the "eventType" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateIdentifier

func (u *DeviceEventUpsertOne) UpdateIdentifier() *DeviceEventUpsertOne

UpdateIdentifier sets the "identifier" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateIotID

func (u *DeviceEventUpsertOne) UpdateIotID() *DeviceEventUpsertOne

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateName

func (u *DeviceEventUpsertOne) UpdateName() *DeviceEventUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateNewValues

func (u *DeviceEventUpsertOne) UpdateNewValues() *DeviceEventUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceEvent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceevent.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceEventUpsertOne) UpdateOutputData

func (u *DeviceEventUpsertOne) UpdateOutputData() *DeviceEventUpsertOne

UpdateOutputData sets the "outputData" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateSort

func (u *DeviceEventUpsertOne) UpdateSort() *DeviceEventUpsertOne

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateStatus

func (u *DeviceEventUpsertOne) UpdateStatus() *DeviceEventUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateTime

func (u *DeviceEventUpsertOne) UpdateTime() *DeviceEventUpsertOne

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceEventUpsertOne) UpdateUpdatedAt

func (u *DeviceEventUpsertOne) UpdateUpdatedAt() *DeviceEventUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceEvents

type DeviceEvents []*DeviceEvent

DeviceEvents is a parsable slice of DeviceEvent.

type DeviceKpi

type DeviceKpi struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// KPI
	Kpi float64 `json:"kpi,omitempty"`
	// X
	X float64 `json:"x,omitempty"`
	// Y
	Y float64 `json:"y,omitempty"`
	// A
	A float64 `json:"a,omitempty"`
	// B
	B float64 `json:"b,omitempty"`
	// WeekKpi
	WeekKpi float64 `json:"weekKpi,omitempty"`
	// MonthKpi
	MonthKpi float64 `json:"monthKpi,omitempty"`
	// CurrentDay1
	CurrentDay1 int64 `json:"currentDay1,omitempty"`
	// currentDay7
	CurrentDay7 int64 `json:"currentDay7,omitempty"`
	// currentDay28
	CurrentDay28 int64 `json:"currentDay28,omitempty"`
	// contains filtered or unexported fields
}

DeviceKpi is the model entity for the DeviceKpi schema.

func (*DeviceKpi) ExecContext

func (c *DeviceKpi) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpi) QueryContext

func (c *DeviceKpi) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpi) String

func (dk *DeviceKpi) String() string

String implements the fmt.Stringer.

func (*DeviceKpi) Unwrap

func (dk *DeviceKpi) Unwrap() *DeviceKpi

Unwrap unwraps the DeviceKpi entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceKpi) Update

func (dk *DeviceKpi) Update() *DeviceKpiUpdateOne

Update returns a builder for updating this DeviceKpi. Note that you need to call DeviceKpi.Unwrap() before calling this method if this DeviceKpi was returned from a transaction, and the transaction was committed or rolled back.

func (*DeviceKpi) Value

func (dk *DeviceKpi) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DeviceKpi. This includes values selected through modifiers, order, etc.

type DeviceKpiClient

type DeviceKpiClient struct {
	// contains filtered or unexported fields
}

DeviceKpiClient is a client for the DeviceKpi schema.

func NewDeviceKpiClient

func NewDeviceKpiClient(c config) *DeviceKpiClient

NewDeviceKpiClient returns a client for the DeviceKpi from the given config.

func (*DeviceKpiClient) Create

func (c *DeviceKpiClient) Create() *DeviceKpiCreate

Create returns a builder for creating a DeviceKpi entity.

func (*DeviceKpiClient) CreateBulk

func (c *DeviceKpiClient) CreateBulk(builders ...*DeviceKpiCreate) *DeviceKpiCreateBulk

CreateBulk returns a builder for creating a bulk of DeviceKpi entities.

func (*DeviceKpiClient) Delete

func (c *DeviceKpiClient) Delete() *DeviceKpiDelete

Delete returns a delete builder for DeviceKpi.

func (*DeviceKpiClient) DeleteOne

func (c *DeviceKpiClient) DeleteOne(dk *DeviceKpi) *DeviceKpiDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceKpiClient) DeleteOneID

func (c *DeviceKpiClient) DeleteOneID(id uint64) *DeviceKpiDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceKpiClient) ExecContext

func (c *DeviceKpiClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiClient) Get

func (c *DeviceKpiClient) Get(ctx context.Context, id uint64) (*DeviceKpi, error)

Get returns a DeviceKpi entity by its id.

func (*DeviceKpiClient) GetX

func (c *DeviceKpiClient) GetX(ctx context.Context, id uint64) *DeviceKpi

GetX is like Get, but panics if an error occurs.

func (*DeviceKpiClient) Hooks

func (c *DeviceKpiClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceKpiClient) Intercept

func (c *DeviceKpiClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `devicekpi.Intercept(f(g(h())))`.

func (*DeviceKpiClient) Interceptors

func (c *DeviceKpiClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceKpiClient) MapCreateBulk

func (c *DeviceKpiClient) MapCreateBulk(slice any, setFunc func(*DeviceKpiCreate, int)) *DeviceKpiCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DeviceKpiClient) Query

func (c *DeviceKpiClient) Query() *DeviceKpiQuery

Query returns a query builder for DeviceKpi.

func (*DeviceKpiClient) QueryContext

func (c *DeviceKpiClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiClient) Update

func (c *DeviceKpiClient) Update() *DeviceKpiUpdate

Update returns an update builder for DeviceKpi.

func (*DeviceKpiClient) UpdateOne

func (c *DeviceKpiClient) UpdateOne(dk *DeviceKpi) *DeviceKpiUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceKpiClient) UpdateOneID

func (c *DeviceKpiClient) UpdateOneID(id uint64) *DeviceKpiUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeviceKpiClient) Use

func (c *DeviceKpiClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `devicekpi.Hooks(f(g(h())))`.

type DeviceKpiCreate

type DeviceKpiCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceKpiCreate is the builder for creating a DeviceKpi entity.

func (*DeviceKpiCreate) Exec

func (dkc *DeviceKpiCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceKpiCreate) ExecContext

func (c *DeviceKpiCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiCreate) ExecX

func (dkc *DeviceKpiCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiCreate) Mutation

func (dkc *DeviceKpiCreate) Mutation() *DeviceKpiMutation

Mutation returns the DeviceKpiMutation object of the builder.

func (*DeviceKpiCreate) OnConflict

func (dkc *DeviceKpiCreate) OnConflict(opts ...sql.ConflictOption) *DeviceKpiUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceKpi.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceKpiUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceKpiCreate) OnConflictColumns

func (dkc *DeviceKpiCreate) OnConflictColumns(columns ...string) *DeviceKpiUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceKpi.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceKpiCreate) QueryContext

func (c *DeviceKpiCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiCreate) Save

func (dkc *DeviceKpiCreate) Save(ctx context.Context) (*DeviceKpi, error)

Save creates the DeviceKpi in the database.

func (*DeviceKpiCreate) SaveX

func (dkc *DeviceKpiCreate) SaveX(ctx context.Context) *DeviceKpi

SaveX calls Save and panics if Save returns an error.

func (*DeviceKpiCreate) SetA

func (dkc *DeviceKpiCreate) SetA(f float64) *DeviceKpiCreate

SetA sets the "a" field.

func (*DeviceKpiCreate) SetB

func (dkc *DeviceKpiCreate) SetB(f float64) *DeviceKpiCreate

SetB sets the "b" field.

func (*DeviceKpiCreate) SetCreatedAt

func (dkc *DeviceKpiCreate) SetCreatedAt(t time.Time) *DeviceKpiCreate

SetCreatedAt sets the "created_at" field.

func (*DeviceKpiCreate) SetCurrentDay1

func (dkc *DeviceKpiCreate) SetCurrentDay1(i int64) *DeviceKpiCreate

SetCurrentDay1 sets the "currentDay1" field.

func (*DeviceKpiCreate) SetCurrentDay28

func (dkc *DeviceKpiCreate) SetCurrentDay28(i int64) *DeviceKpiCreate

SetCurrentDay28 sets the "currentDay28" field.

func (*DeviceKpiCreate) SetCurrentDay7

func (dkc *DeviceKpiCreate) SetCurrentDay7(i int64) *DeviceKpiCreate

SetCurrentDay7 sets the "currentDay7" field.

func (*DeviceKpiCreate) SetDeviceName

func (dkc *DeviceKpiCreate) SetDeviceName(s string) *DeviceKpiCreate

SetDeviceName sets the "deviceName" field.

func (*DeviceKpiCreate) SetID

func (dkc *DeviceKpiCreate) SetID(u uint64) *DeviceKpiCreate

SetID sets the "id" field.

func (*DeviceKpiCreate) SetIotID

func (dkc *DeviceKpiCreate) SetIotID(s string) *DeviceKpiCreate

SetIotID sets the "iotID" field.

func (*DeviceKpiCreate) SetKpi

func (dkc *DeviceKpiCreate) SetKpi(f float64) *DeviceKpiCreate

SetKpi sets the "kpi" field.

func (*DeviceKpiCreate) SetMonthKpi

func (dkc *DeviceKpiCreate) SetMonthKpi(f float64) *DeviceKpiCreate

SetMonthKpi sets the "monthKpi" field.

func (*DeviceKpiCreate) SetNillableA

func (dkc *DeviceKpiCreate) SetNillableA(f *float64) *DeviceKpiCreate

SetNillableA sets the "a" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableB

func (dkc *DeviceKpiCreate) SetNillableB(f *float64) *DeviceKpiCreate

SetNillableB sets the "b" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableCreatedAt

func (dkc *DeviceKpiCreate) SetNillableCreatedAt(t *time.Time) *DeviceKpiCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableCurrentDay1

func (dkc *DeviceKpiCreate) SetNillableCurrentDay1(i *int64) *DeviceKpiCreate

SetNillableCurrentDay1 sets the "currentDay1" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableCurrentDay28

func (dkc *DeviceKpiCreate) SetNillableCurrentDay28(i *int64) *DeviceKpiCreate

SetNillableCurrentDay28 sets the "currentDay28" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableCurrentDay7

func (dkc *DeviceKpiCreate) SetNillableCurrentDay7(i *int64) *DeviceKpiCreate

SetNillableCurrentDay7 sets the "currentDay7" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableKpi

func (dkc *DeviceKpiCreate) SetNillableKpi(f *float64) *DeviceKpiCreate

SetNillableKpi sets the "kpi" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableMonthKpi

func (dkc *DeviceKpiCreate) SetNillableMonthKpi(f *float64) *DeviceKpiCreate

SetNillableMonthKpi sets the "monthKpi" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableSort

func (dkc *DeviceKpiCreate) SetNillableSort(u *uint32) *DeviceKpiCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableStatus

func (dkc *DeviceKpiCreate) SetNillableStatus(u *uint8) *DeviceKpiCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableUpdatedAt

func (dkc *DeviceKpiCreate) SetNillableUpdatedAt(t *time.Time) *DeviceKpiCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableWeekKpi

func (dkc *DeviceKpiCreate) SetNillableWeekKpi(f *float64) *DeviceKpiCreate

SetNillableWeekKpi sets the "weekKpi" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableX

func (dkc *DeviceKpiCreate) SetNillableX(f *float64) *DeviceKpiCreate

SetNillableX sets the "x" field if the given value is not nil.

func (*DeviceKpiCreate) SetNillableY

func (dkc *DeviceKpiCreate) SetNillableY(f *float64) *DeviceKpiCreate

SetNillableY sets the "y" field if the given value is not nil.

func (*DeviceKpiCreate) SetNotNilA

func (dk *DeviceKpiCreate) SetNotNilA(value *float64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilB

func (dk *DeviceKpiCreate) SetNotNilB(value *float64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilCurrentDay1

func (dk *DeviceKpiCreate) SetNotNilCurrentDay1(value *int64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilCurrentDay28

func (dk *DeviceKpiCreate) SetNotNilCurrentDay28(value *int64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilCurrentDay7

func (dk *DeviceKpiCreate) SetNotNilCurrentDay7(value *int64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilDeviceName

func (dk *DeviceKpiCreate) SetNotNilDeviceName(value *string) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilIotID

func (dk *DeviceKpiCreate) SetNotNilIotID(value *string) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilKpi

func (dk *DeviceKpiCreate) SetNotNilKpi(value *float64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilMonthKpi

func (dk *DeviceKpiCreate) SetNotNilMonthKpi(value *float64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilProductKey

func (dk *DeviceKpiCreate) SetNotNilProductKey(value *string) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilSort

func (dk *DeviceKpiCreate) SetNotNilSort(value *uint32) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilStatus

func (dk *DeviceKpiCreate) SetNotNilStatus(value *uint8) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilUpdatedAt

func (dk *DeviceKpiCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilWeekKpi

func (dk *DeviceKpiCreate) SetNotNilWeekKpi(value *float64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilX

func (dk *DeviceKpiCreate) SetNotNilX(value *float64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetNotNilY

func (dk *DeviceKpiCreate) SetNotNilY(value *float64) *DeviceKpiCreate

set field if value's pointer is not nil.

func (*DeviceKpiCreate) SetProductKey

func (dkc *DeviceKpiCreate) SetProductKey(s string) *DeviceKpiCreate

SetProductKey sets the "productKey" field.

func (*DeviceKpiCreate) SetSort

func (dkc *DeviceKpiCreate) SetSort(u uint32) *DeviceKpiCreate

SetSort sets the "sort" field.

func (*DeviceKpiCreate) SetStatus

func (dkc *DeviceKpiCreate) SetStatus(u uint8) *DeviceKpiCreate

SetStatus sets the "status" field.

func (*DeviceKpiCreate) SetUpdatedAt

func (dkc *DeviceKpiCreate) SetUpdatedAt(t time.Time) *DeviceKpiCreate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceKpiCreate) SetWeekKpi

func (dkc *DeviceKpiCreate) SetWeekKpi(f float64) *DeviceKpiCreate

SetWeekKpi sets the "weekKpi" field.

func (*DeviceKpiCreate) SetX

func (dkc *DeviceKpiCreate) SetX(f float64) *DeviceKpiCreate

SetX sets the "x" field.

func (*DeviceKpiCreate) SetY

func (dkc *DeviceKpiCreate) SetY(f float64) *DeviceKpiCreate

SetY sets the "y" field.

func (*DeviceKpiCreate) TableName

func (dkc *DeviceKpiCreate) TableName(s string) *DeviceKpiCreate

type DeviceKpiCreateBulk

type DeviceKpiCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceKpiCreateBulk is the builder for creating many DeviceKpi entities in bulk.

func (*DeviceKpiCreateBulk) Exec

func (dkcb *DeviceKpiCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceKpiCreateBulk) ExecContext

func (c *DeviceKpiCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiCreateBulk) ExecX

func (dkcb *DeviceKpiCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiCreateBulk) OnConflict

func (dkcb *DeviceKpiCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeviceKpiUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceKpi.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceKpiUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceKpiCreateBulk) OnConflictColumns

func (dkcb *DeviceKpiCreateBulk) OnConflictColumns(columns ...string) *DeviceKpiUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceKpi.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceKpiCreateBulk) QueryContext

func (c *DeviceKpiCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiCreateBulk) Save

func (dkcb *DeviceKpiCreateBulk) Save(ctx context.Context) ([]*DeviceKpi, error)

Save creates the DeviceKpi entities in the database.

func (*DeviceKpiCreateBulk) SaveX

func (dkcb *DeviceKpiCreateBulk) SaveX(ctx context.Context) []*DeviceKpi

SaveX is like Save, but panics if an error occurs.

type DeviceKpiDelete

type DeviceKpiDelete struct {
	// contains filtered or unexported fields
}

DeviceKpiDelete is the builder for deleting a DeviceKpi entity.

func (*DeviceKpiDelete) Exec

func (dkd *DeviceKpiDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceKpiDelete) ExecContext

func (c *DeviceKpiDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiDelete) ExecX

func (dkd *DeviceKpiDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiDelete) QueryContext

func (c *DeviceKpiDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiDelete) Where

Where appends a list predicates to the DeviceKpiDelete builder.

type DeviceKpiDeleteOne

type DeviceKpiDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceKpiDeleteOne is the builder for deleting a single DeviceKpi entity.

func (*DeviceKpiDeleteOne) Exec

func (dkdo *DeviceKpiDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeviceKpiDeleteOne) ExecX

func (dkdo *DeviceKpiDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiDeleteOne) Where

Where appends a list predicates to the DeviceKpiDelete builder.

type DeviceKpiGroupBy

type DeviceKpiGroupBy struct {
	// contains filtered or unexported fields
}

DeviceKpiGroupBy is the group-by builder for DeviceKpi entities.

func (*DeviceKpiGroupBy) Aggregate

func (dkgb *DeviceKpiGroupBy) Aggregate(fns ...AggregateFunc) *DeviceKpiGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceKpiGroupBy) Bool

func (s *DeviceKpiGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) BoolX

func (s *DeviceKpiGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceKpiGroupBy) Bools

func (s *DeviceKpiGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) BoolsX

func (s *DeviceKpiGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceKpiGroupBy) Float64

func (s *DeviceKpiGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) Float64X

func (s *DeviceKpiGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceKpiGroupBy) Float64s

func (s *DeviceKpiGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) Float64sX

func (s *DeviceKpiGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceKpiGroupBy) Int

func (s *DeviceKpiGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) IntX

func (s *DeviceKpiGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceKpiGroupBy) Ints

func (s *DeviceKpiGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) IntsX

func (s *DeviceKpiGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceKpiGroupBy) Scan

func (dkgb *DeviceKpiGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceKpiGroupBy) ScanX

func (s *DeviceKpiGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceKpiGroupBy) String

func (s *DeviceKpiGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) StringX

func (s *DeviceKpiGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceKpiGroupBy) Strings

func (s *DeviceKpiGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceKpiGroupBy) StringsX

func (s *DeviceKpiGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceKpiMutation

type DeviceKpiMutation struct {
	// contains filtered or unexported fields
}

DeviceKpiMutation represents an operation that mutates the DeviceKpi nodes in the graph.

func (*DeviceKpiMutation) A

func (m *DeviceKpiMutation) A() (r float64, exists bool)

A returns the value of the "a" field in the mutation.

func (*DeviceKpiMutation) ACleared

func (m *DeviceKpiMutation) ACleared() bool

ACleared returns if the "a" field was cleared in this mutation.

func (*DeviceKpiMutation) AddA

func (m *DeviceKpiMutation) AddA(f float64)

AddA adds f to the "a" field.

func (*DeviceKpiMutation) AddB

func (m *DeviceKpiMutation) AddB(f float64)

AddB adds f to the "b" field.

func (*DeviceKpiMutation) AddCurrentDay1

func (m *DeviceKpiMutation) AddCurrentDay1(i int64)

AddCurrentDay1 adds i to the "currentDay1" field.

func (*DeviceKpiMutation) AddCurrentDay28

func (m *DeviceKpiMutation) AddCurrentDay28(i int64)

AddCurrentDay28 adds i to the "currentDay28" field.

func (*DeviceKpiMutation) AddCurrentDay7

func (m *DeviceKpiMutation) AddCurrentDay7(i int64)

AddCurrentDay7 adds i to the "currentDay7" field.

func (*DeviceKpiMutation) AddField

func (m *DeviceKpiMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceKpiMutation) AddKpi

func (m *DeviceKpiMutation) AddKpi(f float64)

AddKpi adds f to the "kpi" field.

func (*DeviceKpiMutation) AddMonthKpi

func (m *DeviceKpiMutation) AddMonthKpi(f float64)

AddMonthKpi adds f to the "monthKpi" field.

func (*DeviceKpiMutation) AddSort

func (m *DeviceKpiMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceKpiMutation) AddStatus

func (m *DeviceKpiMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceKpiMutation) AddWeekKpi

func (m *DeviceKpiMutation) AddWeekKpi(f float64)

AddWeekKpi adds f to the "weekKpi" field.

func (*DeviceKpiMutation) AddX

func (m *DeviceKpiMutation) AddX(f float64)

AddX adds f to the "x" field.

func (*DeviceKpiMutation) AddY

func (m *DeviceKpiMutation) AddY(f float64)

AddY adds f to the "y" field.

func (*DeviceKpiMutation) AddedA

func (m *DeviceKpiMutation) AddedA() (r float64, exists bool)

AddedA returns the value that was added to the "a" field in this mutation.

func (*DeviceKpiMutation) AddedB

func (m *DeviceKpiMutation) AddedB() (r float64, exists bool)

AddedB returns the value that was added to the "b" field in this mutation.

func (*DeviceKpiMutation) AddedCurrentDay1

func (m *DeviceKpiMutation) AddedCurrentDay1() (r int64, exists bool)

AddedCurrentDay1 returns the value that was added to the "currentDay1" field in this mutation.

func (*DeviceKpiMutation) AddedCurrentDay28

func (m *DeviceKpiMutation) AddedCurrentDay28() (r int64, exists bool)

AddedCurrentDay28 returns the value that was added to the "currentDay28" field in this mutation.

func (*DeviceKpiMutation) AddedCurrentDay7

func (m *DeviceKpiMutation) AddedCurrentDay7() (r int64, exists bool)

AddedCurrentDay7 returns the value that was added to the "currentDay7" field in this mutation.

func (*DeviceKpiMutation) AddedEdges

func (m *DeviceKpiMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceKpiMutation) AddedField

func (m *DeviceKpiMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceKpiMutation) AddedFields

func (m *DeviceKpiMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceKpiMutation) AddedIDs

func (m *DeviceKpiMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceKpiMutation) AddedKpi

func (m *DeviceKpiMutation) AddedKpi() (r float64, exists bool)

AddedKpi returns the value that was added to the "kpi" field in this mutation.

func (*DeviceKpiMutation) AddedMonthKpi

func (m *DeviceKpiMutation) AddedMonthKpi() (r float64, exists bool)

AddedMonthKpi returns the value that was added to the "monthKpi" field in this mutation.

func (*DeviceKpiMutation) AddedSort

func (m *DeviceKpiMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceKpiMutation) AddedStatus

func (m *DeviceKpiMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceKpiMutation) AddedWeekKpi

func (m *DeviceKpiMutation) AddedWeekKpi() (r float64, exists bool)

AddedWeekKpi returns the value that was added to the "weekKpi" field in this mutation.

func (*DeviceKpiMutation) AddedX

func (m *DeviceKpiMutation) AddedX() (r float64, exists bool)

AddedX returns the value that was added to the "x" field in this mutation.

func (*DeviceKpiMutation) AddedY

func (m *DeviceKpiMutation) AddedY() (r float64, exists bool)

AddedY returns the value that was added to the "y" field in this mutation.

func (*DeviceKpiMutation) B

func (m *DeviceKpiMutation) B() (r float64, exists bool)

B returns the value of the "b" field in the mutation.

func (*DeviceKpiMutation) BCleared

func (m *DeviceKpiMutation) BCleared() bool

BCleared returns if the "b" field was cleared in this mutation.

func (*DeviceKpiMutation) ClearA

func (m *DeviceKpiMutation) ClearA()

ClearA clears the value of the "a" field.

func (*DeviceKpiMutation) ClearB

func (m *DeviceKpiMutation) ClearB()

ClearB clears the value of the "b" field.

func (*DeviceKpiMutation) ClearCurrentDay1

func (m *DeviceKpiMutation) ClearCurrentDay1()

ClearCurrentDay1 clears the value of the "currentDay1" field.

func (*DeviceKpiMutation) ClearCurrentDay28

func (m *DeviceKpiMutation) ClearCurrentDay28()

ClearCurrentDay28 clears the value of the "currentDay28" field.

func (*DeviceKpiMutation) ClearCurrentDay7

func (m *DeviceKpiMutation) ClearCurrentDay7()

ClearCurrentDay7 clears the value of the "currentDay7" field.

func (*DeviceKpiMutation) ClearEdge

func (m *DeviceKpiMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceKpiMutation) ClearField

func (m *DeviceKpiMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceKpiMutation) ClearKpi

func (m *DeviceKpiMutation) ClearKpi()

ClearKpi clears the value of the "kpi" field.

func (*DeviceKpiMutation) ClearMonthKpi

func (m *DeviceKpiMutation) ClearMonthKpi()

ClearMonthKpi clears the value of the "monthKpi" field.

func (*DeviceKpiMutation) ClearStatus

func (m *DeviceKpiMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceKpiMutation) ClearWeekKpi

func (m *DeviceKpiMutation) ClearWeekKpi()

ClearWeekKpi clears the value of the "weekKpi" field.

func (*DeviceKpiMutation) ClearX

func (m *DeviceKpiMutation) ClearX()

ClearX clears the value of the "x" field.

func (*DeviceKpiMutation) ClearY

func (m *DeviceKpiMutation) ClearY()

ClearY clears the value of the "y" field.

func (*DeviceKpiMutation) ClearedEdges

func (m *DeviceKpiMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceKpiMutation) ClearedFields

func (m *DeviceKpiMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceKpiMutation) Client

func (m DeviceKpiMutation) 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 (*DeviceKpiMutation) CreatedAt

func (m *DeviceKpiMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceKpiMutation) CurrentDay1

func (m *DeviceKpiMutation) CurrentDay1() (r int64, exists bool)

CurrentDay1 returns the value of the "currentDay1" field in the mutation.

func (*DeviceKpiMutation) CurrentDay1Cleared

func (m *DeviceKpiMutation) CurrentDay1Cleared() bool

CurrentDay1Cleared returns if the "currentDay1" field was cleared in this mutation.

func (*DeviceKpiMutation) CurrentDay28

func (m *DeviceKpiMutation) CurrentDay28() (r int64, exists bool)

CurrentDay28 returns the value of the "currentDay28" field in the mutation.

func (*DeviceKpiMutation) CurrentDay28Cleared

func (m *DeviceKpiMutation) CurrentDay28Cleared() bool

CurrentDay28Cleared returns if the "currentDay28" field was cleared in this mutation.

func (*DeviceKpiMutation) CurrentDay7

func (m *DeviceKpiMutation) CurrentDay7() (r int64, exists bool)

CurrentDay7 returns the value of the "currentDay7" field in the mutation.

func (*DeviceKpiMutation) CurrentDay7Cleared

func (m *DeviceKpiMutation) CurrentDay7Cleared() bool

CurrentDay7Cleared returns if the "currentDay7" field was cleared in this mutation.

func (*DeviceKpiMutation) DeviceName

func (m *DeviceKpiMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceKpiMutation) EdgeCleared

func (m *DeviceKpiMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceKpiMutation) ExecContext

func (c *DeviceKpiMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiMutation) Field

func (m *DeviceKpiMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceKpiMutation) FieldCleared

func (m *DeviceKpiMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceKpiMutation) Fields

func (m *DeviceKpiMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceKpiMutation) ID

func (m *DeviceKpiMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceKpiMutation) IDs

func (m *DeviceKpiMutation) IDs(ctx context.Context) ([]uint64, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceKpiMutation) IotID

func (m *DeviceKpiMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceKpiMutation) Kpi

func (m *DeviceKpiMutation) Kpi() (r float64, exists bool)

Kpi returns the value of the "kpi" field in the mutation.

func (*DeviceKpiMutation) KpiCleared

func (m *DeviceKpiMutation) KpiCleared() bool

KpiCleared returns if the "kpi" field was cleared in this mutation.

func (*DeviceKpiMutation) MonthKpi

func (m *DeviceKpiMutation) MonthKpi() (r float64, exists bool)

MonthKpi returns the value of the "monthKpi" field in the mutation.

func (*DeviceKpiMutation) MonthKpiCleared

func (m *DeviceKpiMutation) MonthKpiCleared() bool

MonthKpiCleared returns if the "monthKpi" field was cleared in this mutation.

func (*DeviceKpiMutation) OldA

func (m *DeviceKpiMutation) OldA(ctx context.Context) (v float64, err error)

OldA returns the old "a" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldB

func (m *DeviceKpiMutation) OldB(ctx context.Context) (v float64, err error)

OldB returns the old "b" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldCreatedAt

func (m *DeviceKpiMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldCurrentDay1

func (m *DeviceKpiMutation) OldCurrentDay1(ctx context.Context) (v int64, err error)

OldCurrentDay1 returns the old "currentDay1" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldCurrentDay28

func (m *DeviceKpiMutation) OldCurrentDay28(ctx context.Context) (v int64, err error)

OldCurrentDay28 returns the old "currentDay28" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldCurrentDay7

func (m *DeviceKpiMutation) OldCurrentDay7(ctx context.Context) (v int64, err error)

OldCurrentDay7 returns the old "currentDay7" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldDeviceName

func (m *DeviceKpiMutation) OldDeviceName(ctx context.Context) (v string, err error)

OldDeviceName returns the old "deviceName" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldField

func (m *DeviceKpiMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceKpiMutation) OldIotID

func (m *DeviceKpiMutation) OldIotID(ctx context.Context) (v string, err error)

OldIotID returns the old "iotID" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldKpi

func (m *DeviceKpiMutation) OldKpi(ctx context.Context) (v float64, err error)

OldKpi returns the old "kpi" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldMonthKpi

func (m *DeviceKpiMutation) OldMonthKpi(ctx context.Context) (v float64, err error)

OldMonthKpi returns the old "monthKpi" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldProductKey

func (m *DeviceKpiMutation) OldProductKey(ctx context.Context) (v string, err error)

OldProductKey returns the old "productKey" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldSort

func (m *DeviceKpiMutation) OldSort(ctx context.Context) (v uint32, err error)

OldSort returns the old "sort" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldStatus

func (m *DeviceKpiMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldUpdatedAt

func (m *DeviceKpiMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldWeekKpi

func (m *DeviceKpiMutation) OldWeekKpi(ctx context.Context) (v float64, err error)

OldWeekKpi returns the old "weekKpi" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldX

func (m *DeviceKpiMutation) OldX(ctx context.Context) (v float64, err error)

OldX returns the old "x" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) OldY

func (m *DeviceKpiMutation) OldY(ctx context.Context) (v float64, err error)

OldY returns the old "y" field's value of the DeviceKpi entity. If the DeviceKpi object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceKpiMutation) Op

func (m *DeviceKpiMutation) Op() Op

Op returns the operation name.

func (*DeviceKpiMutation) ProductKey

func (m *DeviceKpiMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceKpiMutation) QueryContext

func (c *DeviceKpiMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiMutation) RemovedEdges

func (m *DeviceKpiMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceKpiMutation) RemovedIDs

func (m *DeviceKpiMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceKpiMutation) ResetA

func (m *DeviceKpiMutation) ResetA()

ResetA resets all changes to the "a" field.

func (*DeviceKpiMutation) ResetB

func (m *DeviceKpiMutation) ResetB()

ResetB resets all changes to the "b" field.

func (*DeviceKpiMutation) ResetCreatedAt

func (m *DeviceKpiMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceKpiMutation) ResetCurrentDay1

func (m *DeviceKpiMutation) ResetCurrentDay1()

ResetCurrentDay1 resets all changes to the "currentDay1" field.

func (*DeviceKpiMutation) ResetCurrentDay28

func (m *DeviceKpiMutation) ResetCurrentDay28()

ResetCurrentDay28 resets all changes to the "currentDay28" field.

func (*DeviceKpiMutation) ResetCurrentDay7

func (m *DeviceKpiMutation) ResetCurrentDay7()

ResetCurrentDay7 resets all changes to the "currentDay7" field.

func (*DeviceKpiMutation) ResetDeviceName

func (m *DeviceKpiMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceKpiMutation) ResetEdge

func (m *DeviceKpiMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceKpiMutation) ResetField

func (m *DeviceKpiMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceKpiMutation) ResetIotID

func (m *DeviceKpiMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceKpiMutation) ResetKpi

func (m *DeviceKpiMutation) ResetKpi()

ResetKpi resets all changes to the "kpi" field.

func (*DeviceKpiMutation) ResetMonthKpi

func (m *DeviceKpiMutation) ResetMonthKpi()

ResetMonthKpi resets all changes to the "monthKpi" field.

func (*DeviceKpiMutation) ResetProductKey

func (m *DeviceKpiMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceKpiMutation) ResetSort

func (m *DeviceKpiMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceKpiMutation) ResetStatus

func (m *DeviceKpiMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceKpiMutation) ResetUpdatedAt

func (m *DeviceKpiMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceKpiMutation) ResetWeekKpi

func (m *DeviceKpiMutation) ResetWeekKpi()

ResetWeekKpi resets all changes to the "weekKpi" field.

func (*DeviceKpiMutation) ResetX

func (m *DeviceKpiMutation) ResetX()

ResetX resets all changes to the "x" field.

func (*DeviceKpiMutation) ResetY

func (m *DeviceKpiMutation) ResetY()

ResetY resets all changes to the "y" field.

func (*DeviceKpiMutation) SetA

func (m *DeviceKpiMutation) SetA(f float64)

SetA sets the "a" field.

func (*DeviceKpiMutation) SetB

func (m *DeviceKpiMutation) SetB(f float64)

SetB sets the "b" field.

func (*DeviceKpiMutation) SetCreatedAt

func (m *DeviceKpiMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeviceKpiMutation) SetCurrentDay1

func (m *DeviceKpiMutation) SetCurrentDay1(i int64)

SetCurrentDay1 sets the "currentDay1" field.

func (*DeviceKpiMutation) SetCurrentDay28

func (m *DeviceKpiMutation) SetCurrentDay28(i int64)

SetCurrentDay28 sets the "currentDay28" field.

func (*DeviceKpiMutation) SetCurrentDay7

func (m *DeviceKpiMutation) SetCurrentDay7(i int64)

SetCurrentDay7 sets the "currentDay7" field.

func (*DeviceKpiMutation) SetDeviceName

func (m *DeviceKpiMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceKpiMutation) SetField

func (m *DeviceKpiMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceKpiMutation) SetID

func (m *DeviceKpiMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DeviceKpi entities.

func (*DeviceKpiMutation) SetIotID

func (m *DeviceKpiMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceKpiMutation) SetKpi

func (m *DeviceKpiMutation) SetKpi(f float64)

SetKpi sets the "kpi" field.

func (*DeviceKpiMutation) SetMonthKpi

func (m *DeviceKpiMutation) SetMonthKpi(f float64)

SetMonthKpi sets the "monthKpi" field.

func (*DeviceKpiMutation) SetOp

func (m *DeviceKpiMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceKpiMutation) SetProductKey

func (m *DeviceKpiMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceKpiMutation) SetSort

func (m *DeviceKpiMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceKpiMutation) SetStatus

func (m *DeviceKpiMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceKpiMutation) SetUpdatedAt

func (m *DeviceKpiMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeviceKpiMutation) SetWeekKpi

func (m *DeviceKpiMutation) SetWeekKpi(f float64)

SetWeekKpi sets the "weekKpi" field.

func (*DeviceKpiMutation) SetX

func (m *DeviceKpiMutation) SetX(f float64)

SetX sets the "x" field.

func (*DeviceKpiMutation) SetY

func (m *DeviceKpiMutation) SetY(f float64)

SetY sets the "y" field.

func (*DeviceKpiMutation) Sort

func (m *DeviceKpiMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceKpiMutation) Status

func (m *DeviceKpiMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DeviceKpiMutation) StatusCleared

func (m *DeviceKpiMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (DeviceKpiMutation) Tx

func (m DeviceKpiMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceKpiMutation) Type

func (m *DeviceKpiMutation) Type() string

Type returns the node type of this mutation (DeviceKpi).

func (*DeviceKpiMutation) UpdatedAt

func (m *DeviceKpiMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceKpiMutation) WeekKpi

func (m *DeviceKpiMutation) WeekKpi() (r float64, exists bool)

WeekKpi returns the value of the "weekKpi" field in the mutation.

func (*DeviceKpiMutation) WeekKpiCleared

func (m *DeviceKpiMutation) WeekKpiCleared() bool

WeekKpiCleared returns if the "weekKpi" field was cleared in this mutation.

func (*DeviceKpiMutation) Where

func (m *DeviceKpiMutation) Where(ps ...predicate.DeviceKpi)

Where appends a list predicates to the DeviceKpiMutation builder.

func (*DeviceKpiMutation) WhereP

func (m *DeviceKpiMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceKpiMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*DeviceKpiMutation) X

func (m *DeviceKpiMutation) X() (r float64, exists bool)

X returns the value of the "x" field in the mutation.

func (*DeviceKpiMutation) XCleared

func (m *DeviceKpiMutation) XCleared() bool

XCleared returns if the "x" field was cleared in this mutation.

func (*DeviceKpiMutation) Y

func (m *DeviceKpiMutation) Y() (r float64, exists bool)

Y returns the value of the "y" field in the mutation.

func (*DeviceKpiMutation) YCleared

func (m *DeviceKpiMutation) YCleared() bool

YCleared returns if the "y" field was cleared in this mutation.

type DeviceKpiPageList

type DeviceKpiPageList struct {
	List        []*DeviceKpi `json:"list"`
	PageDetails *PageDetails `json:"pageDetails"`
}

DeviceKpiPageList is DeviceKpi PageList result.

type DeviceKpiPager

type DeviceKpiPager struct {
	Order  devicekpi.OrderOption
	Filter func(*DeviceKpiQuery) (*DeviceKpiQuery, error)
}

func (*DeviceKpiPager) ApplyFilter

func (p *DeviceKpiPager) ApplyFilter(query *DeviceKpiQuery) (*DeviceKpiQuery, error)

type DeviceKpiPaginateOption

type DeviceKpiPaginateOption func(*DeviceKpiPager)

DeviceKpiPaginateOption enables pagination customization.

type DeviceKpiQuery

type DeviceKpiQuery struct {
	// contains filtered or unexported fields
}

DeviceKpiQuery is the builder for querying DeviceKpi entities.

func (*DeviceKpiQuery) Aggregate

func (dkq *DeviceKpiQuery) Aggregate(fns ...AggregateFunc) *DeviceKpiSelect

Aggregate returns a DeviceKpiSelect configured with the given aggregations.

func (*DeviceKpiQuery) All

func (dkq *DeviceKpiQuery) All(ctx context.Context) ([]*DeviceKpi, error)

All executes the query and returns a list of DeviceKpis.

func (*DeviceKpiQuery) AllX

func (dkq *DeviceKpiQuery) AllX(ctx context.Context) []*DeviceKpi

AllX is like All, but panics if an error occurs.

func (*DeviceKpiQuery) Clone

func (dkq *DeviceKpiQuery) Clone() *DeviceKpiQuery

Clone returns a duplicate of the DeviceKpiQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceKpiQuery) Count

func (dkq *DeviceKpiQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceKpiQuery) CountX

func (dkq *DeviceKpiQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceKpiQuery) ExecContext

func (c *DeviceKpiQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiQuery) Exist

func (dkq *DeviceKpiQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceKpiQuery) ExistX

func (dkq *DeviceKpiQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceKpiQuery) First

func (dkq *DeviceKpiQuery) First(ctx context.Context) (*DeviceKpi, error)

First returns the first DeviceKpi entity from the query. Returns a *NotFoundError when no DeviceKpi was found.

func (*DeviceKpiQuery) FirstID

func (dkq *DeviceKpiQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first DeviceKpi ID from the query. Returns a *NotFoundError when no DeviceKpi ID was found.

func (*DeviceKpiQuery) FirstIDX

func (dkq *DeviceKpiQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceKpiQuery) FirstX

func (dkq *DeviceKpiQuery) FirstX(ctx context.Context) *DeviceKpi

FirstX is like First, but panics if an error occurs.

func (*DeviceKpiQuery) GroupBy

func (dkq *DeviceKpiQuery) GroupBy(field string, fields ...string) *DeviceKpiGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceKpi.Query().
	GroupBy(devicekpi.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceKpiQuery) IDs

func (dkq *DeviceKpiQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of DeviceKpi IDs.

func (*DeviceKpiQuery) IDsX

func (dkq *DeviceKpiQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*DeviceKpiQuery) Limit

func (dkq *DeviceKpiQuery) Limit(limit int) *DeviceKpiQuery

Limit the number of records to be returned by this query.

func (*DeviceKpiQuery) Modify

func (dkq *DeviceKpiQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceKpiSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DeviceKpiQuery) Offset

func (dkq *DeviceKpiQuery) Offset(offset int) *DeviceKpiQuery

Offset to start from.

func (*DeviceKpiQuery) Only

func (dkq *DeviceKpiQuery) Only(ctx context.Context) (*DeviceKpi, error)

Only returns a single DeviceKpi entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceKpi entity is found. Returns a *NotFoundError when no DeviceKpi entities are found.

func (*DeviceKpiQuery) OnlyID

func (dkq *DeviceKpiQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only DeviceKpi ID in the query. Returns a *NotSingularError when more than one DeviceKpi ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceKpiQuery) OnlyIDX

func (dkq *DeviceKpiQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceKpiQuery) OnlyX

func (dkq *DeviceKpiQuery) OnlyX(ctx context.Context) *DeviceKpi

OnlyX is like Only, but panics if an error occurs.

func (*DeviceKpiQuery) Order

Order specifies how the records should be ordered.

func (*DeviceKpiQuery) Page

func (dk *DeviceKpiQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...DeviceKpiPaginateOption,
) (*DeviceKpiPageList, error)

func (*DeviceKpiQuery) QueryContext

func (c *DeviceKpiQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiQuery) Select

func (dkq *DeviceKpiQuery) Select(fields ...string) *DeviceKpiSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.DeviceKpi.Query().
	Select(devicekpi.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceKpiQuery) Unique

func (dkq *DeviceKpiQuery) Unique(unique bool) *DeviceKpiQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceKpiQuery) Where

func (dkq *DeviceKpiQuery) Where(ps ...predicate.DeviceKpi) *DeviceKpiQuery

Where adds a new predicate for the DeviceKpiQuery builder.

type DeviceKpiSelect

type DeviceKpiSelect struct {
	*DeviceKpiQuery
	// contains filtered or unexported fields
}

DeviceKpiSelect is the builder for selecting fields of DeviceKpi entities.

func (*DeviceKpiSelect) Aggregate

func (dks *DeviceKpiSelect) Aggregate(fns ...AggregateFunc) *DeviceKpiSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceKpiSelect) Bool

func (s *DeviceKpiSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) BoolX

func (s *DeviceKpiSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceKpiSelect) Bools

func (s *DeviceKpiSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) BoolsX

func (s *DeviceKpiSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeviceKpiSelect) ExecContext

func (c DeviceKpiSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiSelect) Float64

func (s *DeviceKpiSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) Float64X

func (s *DeviceKpiSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceKpiSelect) Float64s

func (s *DeviceKpiSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) Float64sX

func (s *DeviceKpiSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceKpiSelect) Int

func (s *DeviceKpiSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) IntX

func (s *DeviceKpiSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceKpiSelect) Ints

func (s *DeviceKpiSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) IntsX

func (s *DeviceKpiSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceKpiSelect) Modify

func (dks *DeviceKpiSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceKpiSelect

Modify adds a query modifier for attaching custom logic to queries.

func (DeviceKpiSelect) QueryContext

func (c DeviceKpiSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiSelect) Scan

func (dks *DeviceKpiSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceKpiSelect) ScanX

func (s *DeviceKpiSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceKpiSelect) String

func (s *DeviceKpiSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) StringX

func (s *DeviceKpiSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceKpiSelect) Strings

func (s *DeviceKpiSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceKpiSelect) StringsX

func (s *DeviceKpiSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceKpiUpdate

type DeviceKpiUpdate struct {
	// contains filtered or unexported fields
}

DeviceKpiUpdate is the builder for updating DeviceKpi entities.

func (*DeviceKpiUpdate) AddA

func (dku *DeviceKpiUpdate) AddA(f float64) *DeviceKpiUpdate

AddA adds f to the "a" field.

func (*DeviceKpiUpdate) AddB

func (dku *DeviceKpiUpdate) AddB(f float64) *DeviceKpiUpdate

AddB adds f to the "b" field.

func (*DeviceKpiUpdate) AddCurrentDay1

func (dku *DeviceKpiUpdate) AddCurrentDay1(i int64) *DeviceKpiUpdate

AddCurrentDay1 adds i to the "currentDay1" field.

func (*DeviceKpiUpdate) AddCurrentDay28

func (dku *DeviceKpiUpdate) AddCurrentDay28(i int64) *DeviceKpiUpdate

AddCurrentDay28 adds i to the "currentDay28" field.

func (*DeviceKpiUpdate) AddCurrentDay7

func (dku *DeviceKpiUpdate) AddCurrentDay7(i int64) *DeviceKpiUpdate

AddCurrentDay7 adds i to the "currentDay7" field.

func (*DeviceKpiUpdate) AddKpi

func (dku *DeviceKpiUpdate) AddKpi(f float64) *DeviceKpiUpdate

AddKpi adds f to the "kpi" field.

func (*DeviceKpiUpdate) AddMonthKpi

func (dku *DeviceKpiUpdate) AddMonthKpi(f float64) *DeviceKpiUpdate

AddMonthKpi adds f to the "monthKpi" field.

func (*DeviceKpiUpdate) AddSort

func (dku *DeviceKpiUpdate) AddSort(u int32) *DeviceKpiUpdate

AddSort adds u to the "sort" field.

func (*DeviceKpiUpdate) AddStatus

func (dku *DeviceKpiUpdate) AddStatus(u int8) *DeviceKpiUpdate

AddStatus adds u to the "status" field.

func (*DeviceKpiUpdate) AddWeekKpi

func (dku *DeviceKpiUpdate) AddWeekKpi(f float64) *DeviceKpiUpdate

AddWeekKpi adds f to the "weekKpi" field.

func (*DeviceKpiUpdate) AddX

func (dku *DeviceKpiUpdate) AddX(f float64) *DeviceKpiUpdate

AddX adds f to the "x" field.

func (*DeviceKpiUpdate) AddY

func (dku *DeviceKpiUpdate) AddY(f float64) *DeviceKpiUpdate

AddY adds f to the "y" field.

func (*DeviceKpiUpdate) ClearA

func (dku *DeviceKpiUpdate) ClearA() *DeviceKpiUpdate

ClearA clears the value of the "a" field.

func (*DeviceKpiUpdate) ClearB

func (dku *DeviceKpiUpdate) ClearB() *DeviceKpiUpdate

ClearB clears the value of the "b" field.

func (*DeviceKpiUpdate) ClearCurrentDay1

func (dku *DeviceKpiUpdate) ClearCurrentDay1() *DeviceKpiUpdate

ClearCurrentDay1 clears the value of the "currentDay1" field.

func (*DeviceKpiUpdate) ClearCurrentDay28

func (dku *DeviceKpiUpdate) ClearCurrentDay28() *DeviceKpiUpdate

ClearCurrentDay28 clears the value of the "currentDay28" field.

func (*DeviceKpiUpdate) ClearCurrentDay7

func (dku *DeviceKpiUpdate) ClearCurrentDay7() *DeviceKpiUpdate

ClearCurrentDay7 clears the value of the "currentDay7" field.

func (*DeviceKpiUpdate) ClearKpi

func (dku *DeviceKpiUpdate) ClearKpi() *DeviceKpiUpdate

ClearKpi clears the value of the "kpi" field.

func (*DeviceKpiUpdate) ClearMonthKpi

func (dku *DeviceKpiUpdate) ClearMonthKpi() *DeviceKpiUpdate

ClearMonthKpi clears the value of the "monthKpi" field.

func (*DeviceKpiUpdate) ClearStatus

func (dku *DeviceKpiUpdate) ClearStatus() *DeviceKpiUpdate

ClearStatus clears the value of the "status" field.

func (*DeviceKpiUpdate) ClearWeekKpi

func (dku *DeviceKpiUpdate) ClearWeekKpi() *DeviceKpiUpdate

ClearWeekKpi clears the value of the "weekKpi" field.

func (*DeviceKpiUpdate) ClearX

func (dku *DeviceKpiUpdate) ClearX() *DeviceKpiUpdate

ClearX clears the value of the "x" field.

func (*DeviceKpiUpdate) ClearY

func (dku *DeviceKpiUpdate) ClearY() *DeviceKpiUpdate

ClearY clears the value of the "y" field.

func (*DeviceKpiUpdate) Exec

func (dku *DeviceKpiUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceKpiUpdate) ExecContext

func (c *DeviceKpiUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiUpdate) ExecX

func (dku *DeviceKpiUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiUpdate) Modify

func (dku *DeviceKpiUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceKpiUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceKpiUpdate) Mutation

func (dku *DeviceKpiUpdate) Mutation() *DeviceKpiMutation

Mutation returns the DeviceKpiMutation object of the builder.

func (*DeviceKpiUpdate) QueryContext

func (c *DeviceKpiUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiUpdate) Save

func (dku *DeviceKpiUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceKpiUpdate) SaveX

func (dku *DeviceKpiUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceKpiUpdate) SetA

func (dku *DeviceKpiUpdate) SetA(f float64) *DeviceKpiUpdate

SetA sets the "a" field.

func (*DeviceKpiUpdate) SetB

func (dku *DeviceKpiUpdate) SetB(f float64) *DeviceKpiUpdate

SetB sets the "b" field.

func (*DeviceKpiUpdate) SetCurrentDay1

func (dku *DeviceKpiUpdate) SetCurrentDay1(i int64) *DeviceKpiUpdate

SetCurrentDay1 sets the "currentDay1" field.

func (*DeviceKpiUpdate) SetCurrentDay28

func (dku *DeviceKpiUpdate) SetCurrentDay28(i int64) *DeviceKpiUpdate

SetCurrentDay28 sets the "currentDay28" field.

func (*DeviceKpiUpdate) SetCurrentDay7

func (dku *DeviceKpiUpdate) SetCurrentDay7(i int64) *DeviceKpiUpdate

SetCurrentDay7 sets the "currentDay7" field.

func (*DeviceKpiUpdate) SetDeviceName

func (dku *DeviceKpiUpdate) SetDeviceName(s string) *DeviceKpiUpdate

SetDeviceName sets the "deviceName" field.

func (*DeviceKpiUpdate) SetIotID

func (dku *DeviceKpiUpdate) SetIotID(s string) *DeviceKpiUpdate

SetIotID sets the "iotID" field.

func (*DeviceKpiUpdate) SetKpi

func (dku *DeviceKpiUpdate) SetKpi(f float64) *DeviceKpiUpdate

SetKpi sets the "kpi" field.

func (*DeviceKpiUpdate) SetMonthKpi

func (dku *DeviceKpiUpdate) SetMonthKpi(f float64) *DeviceKpiUpdate

SetMonthKpi sets the "monthKpi" field.

func (*DeviceKpiUpdate) SetNillableA

func (dku *DeviceKpiUpdate) SetNillableA(f *float64) *DeviceKpiUpdate

SetNillableA sets the "a" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableB

func (dku *DeviceKpiUpdate) SetNillableB(f *float64) *DeviceKpiUpdate

SetNillableB sets the "b" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableCurrentDay1

func (dku *DeviceKpiUpdate) SetNillableCurrentDay1(i *int64) *DeviceKpiUpdate

SetNillableCurrentDay1 sets the "currentDay1" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableCurrentDay28

func (dku *DeviceKpiUpdate) SetNillableCurrentDay28(i *int64) *DeviceKpiUpdate

SetNillableCurrentDay28 sets the "currentDay28" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableCurrentDay7

func (dku *DeviceKpiUpdate) SetNillableCurrentDay7(i *int64) *DeviceKpiUpdate

SetNillableCurrentDay7 sets the "currentDay7" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableDeviceName

func (dku *DeviceKpiUpdate) SetNillableDeviceName(s *string) *DeviceKpiUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableIotID

func (dku *DeviceKpiUpdate) SetNillableIotID(s *string) *DeviceKpiUpdate

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableKpi

func (dku *DeviceKpiUpdate) SetNillableKpi(f *float64) *DeviceKpiUpdate

SetNillableKpi sets the "kpi" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableMonthKpi

func (dku *DeviceKpiUpdate) SetNillableMonthKpi(f *float64) *DeviceKpiUpdate

SetNillableMonthKpi sets the "monthKpi" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableProductKey

func (dku *DeviceKpiUpdate) SetNillableProductKey(s *string) *DeviceKpiUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableSort

func (dku *DeviceKpiUpdate) SetNillableSort(u *uint32) *DeviceKpiUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableStatus

func (dku *DeviceKpiUpdate) SetNillableStatus(u *uint8) *DeviceKpiUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableWeekKpi

func (dku *DeviceKpiUpdate) SetNillableWeekKpi(f *float64) *DeviceKpiUpdate

SetNillableWeekKpi sets the "weekKpi" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableX

func (dku *DeviceKpiUpdate) SetNillableX(f *float64) *DeviceKpiUpdate

SetNillableX sets the "x" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNillableY

func (dku *DeviceKpiUpdate) SetNillableY(f *float64) *DeviceKpiUpdate

SetNillableY sets the "y" field if the given value is not nil.

func (*DeviceKpiUpdate) SetNotNilA

func (dk *DeviceKpiUpdate) SetNotNilA(value *float64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilB

func (dk *DeviceKpiUpdate) SetNotNilB(value *float64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilCurrentDay1

func (dk *DeviceKpiUpdate) SetNotNilCurrentDay1(value *int64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilCurrentDay28

func (dk *DeviceKpiUpdate) SetNotNilCurrentDay28(value *int64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilCurrentDay7

func (dk *DeviceKpiUpdate) SetNotNilCurrentDay7(value *int64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilDeviceName

func (dk *DeviceKpiUpdate) SetNotNilDeviceName(value *string) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilIotID

func (dk *DeviceKpiUpdate) SetNotNilIotID(value *string) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilKpi

func (dk *DeviceKpiUpdate) SetNotNilKpi(value *float64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilMonthKpi

func (dk *DeviceKpiUpdate) SetNotNilMonthKpi(value *float64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilProductKey

func (dk *DeviceKpiUpdate) SetNotNilProductKey(value *string) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilSort

func (dk *DeviceKpiUpdate) SetNotNilSort(value *uint32) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilStatus

func (dk *DeviceKpiUpdate) SetNotNilStatus(value *uint8) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilUpdatedAt

func (dk *DeviceKpiUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilWeekKpi

func (dk *DeviceKpiUpdate) SetNotNilWeekKpi(value *float64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilX

func (dk *DeviceKpiUpdate) SetNotNilX(value *float64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetNotNilY

func (dk *DeviceKpiUpdate) SetNotNilY(value *float64) *DeviceKpiUpdate

set field if value's pointer is not nil.

func (*DeviceKpiUpdate) SetProductKey

func (dku *DeviceKpiUpdate) SetProductKey(s string) *DeviceKpiUpdate

SetProductKey sets the "productKey" field.

func (*DeviceKpiUpdate) SetSort

func (dku *DeviceKpiUpdate) SetSort(u uint32) *DeviceKpiUpdate

SetSort sets the "sort" field.

func (*DeviceKpiUpdate) SetStatus

func (dku *DeviceKpiUpdate) SetStatus(u uint8) *DeviceKpiUpdate

SetStatus sets the "status" field.

func (*DeviceKpiUpdate) SetUpdatedAt

func (dku *DeviceKpiUpdate) SetUpdatedAt(t time.Time) *DeviceKpiUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceKpiUpdate) SetWeekKpi

func (dku *DeviceKpiUpdate) SetWeekKpi(f float64) *DeviceKpiUpdate

SetWeekKpi sets the "weekKpi" field.

func (*DeviceKpiUpdate) SetX

func (dku *DeviceKpiUpdate) SetX(f float64) *DeviceKpiUpdate

SetX sets the "x" field.

func (*DeviceKpiUpdate) SetY

func (dku *DeviceKpiUpdate) SetY(f float64) *DeviceKpiUpdate

SetY sets the "y" field.

func (*DeviceKpiUpdate) Where

Where appends a list predicates to the DeviceKpiUpdate builder.

type DeviceKpiUpdateOne

type DeviceKpiUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceKpiUpdateOne is the builder for updating a single DeviceKpi entity.

func (*DeviceKpiUpdateOne) AddA

AddA adds f to the "a" field.

func (*DeviceKpiUpdateOne) AddB

AddB adds f to the "b" field.

func (*DeviceKpiUpdateOne) AddCurrentDay1

func (dkuo *DeviceKpiUpdateOne) AddCurrentDay1(i int64) *DeviceKpiUpdateOne

AddCurrentDay1 adds i to the "currentDay1" field.

func (*DeviceKpiUpdateOne) AddCurrentDay28

func (dkuo *DeviceKpiUpdateOne) AddCurrentDay28(i int64) *DeviceKpiUpdateOne

AddCurrentDay28 adds i to the "currentDay28" field.

func (*DeviceKpiUpdateOne) AddCurrentDay7

func (dkuo *DeviceKpiUpdateOne) AddCurrentDay7(i int64) *DeviceKpiUpdateOne

AddCurrentDay7 adds i to the "currentDay7" field.

func (*DeviceKpiUpdateOne) AddKpi

AddKpi adds f to the "kpi" field.

func (*DeviceKpiUpdateOne) AddMonthKpi

func (dkuo *DeviceKpiUpdateOne) AddMonthKpi(f float64) *DeviceKpiUpdateOne

AddMonthKpi adds f to the "monthKpi" field.

func (*DeviceKpiUpdateOne) AddSort

func (dkuo *DeviceKpiUpdateOne) AddSort(u int32) *DeviceKpiUpdateOne

AddSort adds u to the "sort" field.

func (*DeviceKpiUpdateOne) AddStatus

func (dkuo *DeviceKpiUpdateOne) AddStatus(u int8) *DeviceKpiUpdateOne

AddStatus adds u to the "status" field.

func (*DeviceKpiUpdateOne) AddWeekKpi

func (dkuo *DeviceKpiUpdateOne) AddWeekKpi(f float64) *DeviceKpiUpdateOne

AddWeekKpi adds f to the "weekKpi" field.

func (*DeviceKpiUpdateOne) AddX

AddX adds f to the "x" field.

func (*DeviceKpiUpdateOne) AddY

AddY adds f to the "y" field.

func (*DeviceKpiUpdateOne) ClearA

func (dkuo *DeviceKpiUpdateOne) ClearA() *DeviceKpiUpdateOne

ClearA clears the value of the "a" field.

func (*DeviceKpiUpdateOne) ClearB

func (dkuo *DeviceKpiUpdateOne) ClearB() *DeviceKpiUpdateOne

ClearB clears the value of the "b" field.

func (*DeviceKpiUpdateOne) ClearCurrentDay1

func (dkuo *DeviceKpiUpdateOne) ClearCurrentDay1() *DeviceKpiUpdateOne

ClearCurrentDay1 clears the value of the "currentDay1" field.

func (*DeviceKpiUpdateOne) ClearCurrentDay28

func (dkuo *DeviceKpiUpdateOne) ClearCurrentDay28() *DeviceKpiUpdateOne

ClearCurrentDay28 clears the value of the "currentDay28" field.

func (*DeviceKpiUpdateOne) ClearCurrentDay7

func (dkuo *DeviceKpiUpdateOne) ClearCurrentDay7() *DeviceKpiUpdateOne

ClearCurrentDay7 clears the value of the "currentDay7" field.

func (*DeviceKpiUpdateOne) ClearKpi

func (dkuo *DeviceKpiUpdateOne) ClearKpi() *DeviceKpiUpdateOne

ClearKpi clears the value of the "kpi" field.

func (*DeviceKpiUpdateOne) ClearMonthKpi

func (dkuo *DeviceKpiUpdateOne) ClearMonthKpi() *DeviceKpiUpdateOne

ClearMonthKpi clears the value of the "monthKpi" field.

func (*DeviceKpiUpdateOne) ClearStatus

func (dkuo *DeviceKpiUpdateOne) ClearStatus() *DeviceKpiUpdateOne

ClearStatus clears the value of the "status" field.

func (*DeviceKpiUpdateOne) ClearWeekKpi

func (dkuo *DeviceKpiUpdateOne) ClearWeekKpi() *DeviceKpiUpdateOne

ClearWeekKpi clears the value of the "weekKpi" field.

func (*DeviceKpiUpdateOne) ClearX

func (dkuo *DeviceKpiUpdateOne) ClearX() *DeviceKpiUpdateOne

ClearX clears the value of the "x" field.

func (*DeviceKpiUpdateOne) ClearY

func (dkuo *DeviceKpiUpdateOne) ClearY() *DeviceKpiUpdateOne

ClearY clears the value of the "y" field.

func (*DeviceKpiUpdateOne) Exec

func (dkuo *DeviceKpiUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeviceKpiUpdateOne) ExecContext

func (c *DeviceKpiUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceKpiUpdateOne) ExecX

func (dkuo *DeviceKpiUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiUpdateOne) Modify

func (dkuo *DeviceKpiUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceKpiUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceKpiUpdateOne) Mutation

func (dkuo *DeviceKpiUpdateOne) Mutation() *DeviceKpiMutation

Mutation returns the DeviceKpiMutation object of the builder.

func (*DeviceKpiUpdateOne) QueryContext

func (c *DeviceKpiUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceKpiUpdateOne) Save

func (dkuo *DeviceKpiUpdateOne) Save(ctx context.Context) (*DeviceKpi, error)

Save executes the query and returns the updated DeviceKpi entity.

func (*DeviceKpiUpdateOne) SaveX

func (dkuo *DeviceKpiUpdateOne) SaveX(ctx context.Context) *DeviceKpi

SaveX is like Save, but panics if an error occurs.

func (*DeviceKpiUpdateOne) Select

func (dkuo *DeviceKpiUpdateOne) Select(field string, fields ...string) *DeviceKpiUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceKpiUpdateOne) SetA

SetA sets the "a" field.

func (*DeviceKpiUpdateOne) SetB

SetB sets the "b" field.

func (*DeviceKpiUpdateOne) SetCurrentDay1

func (dkuo *DeviceKpiUpdateOne) SetCurrentDay1(i int64) *DeviceKpiUpdateOne

SetCurrentDay1 sets the "currentDay1" field.

func (*DeviceKpiUpdateOne) SetCurrentDay28

func (dkuo *DeviceKpiUpdateOne) SetCurrentDay28(i int64) *DeviceKpiUpdateOne

SetCurrentDay28 sets the "currentDay28" field.

func (*DeviceKpiUpdateOne) SetCurrentDay7

func (dkuo *DeviceKpiUpdateOne) SetCurrentDay7(i int64) *DeviceKpiUpdateOne

SetCurrentDay7 sets the "currentDay7" field.

func (*DeviceKpiUpdateOne) SetDeviceName

func (dkuo *DeviceKpiUpdateOne) SetDeviceName(s string) *DeviceKpiUpdateOne

SetDeviceName sets the "deviceName" field.

func (*DeviceKpiUpdateOne) SetIotID

func (dkuo *DeviceKpiUpdateOne) SetIotID(s string) *DeviceKpiUpdateOne

SetIotID sets the "iotID" field.

func (*DeviceKpiUpdateOne) SetKpi

SetKpi sets the "kpi" field.

func (*DeviceKpiUpdateOne) SetMonthKpi

func (dkuo *DeviceKpiUpdateOne) SetMonthKpi(f float64) *DeviceKpiUpdateOne

SetMonthKpi sets the "monthKpi" field.

func (*DeviceKpiUpdateOne) SetNillableA

func (dkuo *DeviceKpiUpdateOne) SetNillableA(f *float64) *DeviceKpiUpdateOne

SetNillableA sets the "a" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableB

func (dkuo *DeviceKpiUpdateOne) SetNillableB(f *float64) *DeviceKpiUpdateOne

SetNillableB sets the "b" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableCurrentDay1

func (dkuo *DeviceKpiUpdateOne) SetNillableCurrentDay1(i *int64) *DeviceKpiUpdateOne

SetNillableCurrentDay1 sets the "currentDay1" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableCurrentDay28

func (dkuo *DeviceKpiUpdateOne) SetNillableCurrentDay28(i *int64) *DeviceKpiUpdateOne

SetNillableCurrentDay28 sets the "currentDay28" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableCurrentDay7

func (dkuo *DeviceKpiUpdateOne) SetNillableCurrentDay7(i *int64) *DeviceKpiUpdateOne

SetNillableCurrentDay7 sets the "currentDay7" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableDeviceName

func (dkuo *DeviceKpiUpdateOne) SetNillableDeviceName(s *string) *DeviceKpiUpdateOne

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableIotID

func (dkuo *DeviceKpiUpdateOne) SetNillableIotID(s *string) *DeviceKpiUpdateOne

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableKpi

func (dkuo *DeviceKpiUpdateOne) SetNillableKpi(f *float64) *DeviceKpiUpdateOne

SetNillableKpi sets the "kpi" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableMonthKpi

func (dkuo *DeviceKpiUpdateOne) SetNillableMonthKpi(f *float64) *DeviceKpiUpdateOne

SetNillableMonthKpi sets the "monthKpi" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableProductKey

func (dkuo *DeviceKpiUpdateOne) SetNillableProductKey(s *string) *DeviceKpiUpdateOne

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableSort

func (dkuo *DeviceKpiUpdateOne) SetNillableSort(u *uint32) *DeviceKpiUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableStatus

func (dkuo *DeviceKpiUpdateOne) SetNillableStatus(u *uint8) *DeviceKpiUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableWeekKpi

func (dkuo *DeviceKpiUpdateOne) SetNillableWeekKpi(f *float64) *DeviceKpiUpdateOne

SetNillableWeekKpi sets the "weekKpi" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableX

func (dkuo *DeviceKpiUpdateOne) SetNillableX(f *float64) *DeviceKpiUpdateOne

SetNillableX sets the "x" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNillableY

func (dkuo *DeviceKpiUpdateOne) SetNillableY(f *float64) *DeviceKpiUpdateOne

SetNillableY sets the "y" field if the given value is not nil.

func (*DeviceKpiUpdateOne) SetNotNilA

func (dk *DeviceKpiUpdateOne) SetNotNilA(value *float64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilB

func (dk *DeviceKpiUpdateOne) SetNotNilB(value *float64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilCurrentDay1

func (dk *DeviceKpiUpdateOne) SetNotNilCurrentDay1(value *int64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilCurrentDay28

func (dk *DeviceKpiUpdateOne) SetNotNilCurrentDay28(value *int64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilCurrentDay7

func (dk *DeviceKpiUpdateOne) SetNotNilCurrentDay7(value *int64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilDeviceName

func (dk *DeviceKpiUpdateOne) SetNotNilDeviceName(value *string) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilIotID

func (dk *DeviceKpiUpdateOne) SetNotNilIotID(value *string) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilKpi

func (dk *DeviceKpiUpdateOne) SetNotNilKpi(value *float64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilMonthKpi

func (dk *DeviceKpiUpdateOne) SetNotNilMonthKpi(value *float64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilProductKey

func (dk *DeviceKpiUpdateOne) SetNotNilProductKey(value *string) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilSort

func (dk *DeviceKpiUpdateOne) SetNotNilSort(value *uint32) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilStatus

func (dk *DeviceKpiUpdateOne) SetNotNilStatus(value *uint8) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilUpdatedAt

func (dk *DeviceKpiUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilWeekKpi

func (dk *DeviceKpiUpdateOne) SetNotNilWeekKpi(value *float64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilX

func (dk *DeviceKpiUpdateOne) SetNotNilX(value *float64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetNotNilY

func (dk *DeviceKpiUpdateOne) SetNotNilY(value *float64) *DeviceKpiUpdateOne

set field if value's pointer is not nil.

func (*DeviceKpiUpdateOne) SetProductKey

func (dkuo *DeviceKpiUpdateOne) SetProductKey(s string) *DeviceKpiUpdateOne

SetProductKey sets the "productKey" field.

func (*DeviceKpiUpdateOne) SetSort

func (dkuo *DeviceKpiUpdateOne) SetSort(u uint32) *DeviceKpiUpdateOne

SetSort sets the "sort" field.

func (*DeviceKpiUpdateOne) SetStatus

func (dkuo *DeviceKpiUpdateOne) SetStatus(u uint8) *DeviceKpiUpdateOne

SetStatus sets the "status" field.

func (*DeviceKpiUpdateOne) SetUpdatedAt

func (dkuo *DeviceKpiUpdateOne) SetUpdatedAt(t time.Time) *DeviceKpiUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*DeviceKpiUpdateOne) SetWeekKpi

func (dkuo *DeviceKpiUpdateOne) SetWeekKpi(f float64) *DeviceKpiUpdateOne

SetWeekKpi sets the "weekKpi" field.

func (*DeviceKpiUpdateOne) SetX

SetX sets the "x" field.

func (*DeviceKpiUpdateOne) SetY

SetY sets the "y" field.

func (*DeviceKpiUpdateOne) Where

Where appends a list predicates to the DeviceKpiUpdate builder.

type DeviceKpiUpsert

type DeviceKpiUpsert struct {
	*sql.UpdateSet
}

DeviceKpiUpsert is the "OnConflict" setter.

func (*DeviceKpiUpsert) AddA

AddA adds v to the "a" field.

func (*DeviceKpiUpsert) AddB

AddB adds v to the "b" field.

func (*DeviceKpiUpsert) AddCurrentDay1

func (u *DeviceKpiUpsert) AddCurrentDay1(v int64) *DeviceKpiUpsert

AddCurrentDay1 adds v to the "currentDay1" field.

func (*DeviceKpiUpsert) AddCurrentDay28

func (u *DeviceKpiUpsert) AddCurrentDay28(v int64) *DeviceKpiUpsert

AddCurrentDay28 adds v to the "currentDay28" field.

func (*DeviceKpiUpsert) AddCurrentDay7

func (u *DeviceKpiUpsert) AddCurrentDay7(v int64) *DeviceKpiUpsert

AddCurrentDay7 adds v to the "currentDay7" field.

func (*DeviceKpiUpsert) AddKpi

func (u *DeviceKpiUpsert) AddKpi(v float64) *DeviceKpiUpsert

AddKpi adds v to the "kpi" field.

func (*DeviceKpiUpsert) AddMonthKpi

func (u *DeviceKpiUpsert) AddMonthKpi(v float64) *DeviceKpiUpsert

AddMonthKpi adds v to the "monthKpi" field.

func (*DeviceKpiUpsert) AddSort

func (u *DeviceKpiUpsert) AddSort(v uint32) *DeviceKpiUpsert

AddSort adds v to the "sort" field.

func (*DeviceKpiUpsert) AddStatus

func (u *DeviceKpiUpsert) AddStatus(v uint8) *DeviceKpiUpsert

AddStatus adds v to the "status" field.

func (*DeviceKpiUpsert) AddWeekKpi

func (u *DeviceKpiUpsert) AddWeekKpi(v float64) *DeviceKpiUpsert

AddWeekKpi adds v to the "weekKpi" field.

func (*DeviceKpiUpsert) AddX

AddX adds v to the "x" field.

func (*DeviceKpiUpsert) AddY

AddY adds v to the "y" field.

func (*DeviceKpiUpsert) ClearA

func (u *DeviceKpiUpsert) ClearA() *DeviceKpiUpsert

ClearA clears the value of the "a" field.

func (*DeviceKpiUpsert) ClearB

func (u *DeviceKpiUpsert) ClearB() *DeviceKpiUpsert

ClearB clears the value of the "b" field.

func (*DeviceKpiUpsert) ClearCurrentDay1

func (u *DeviceKpiUpsert) ClearCurrentDay1() *DeviceKpiUpsert

ClearCurrentDay1 clears the value of the "currentDay1" field.

func (*DeviceKpiUpsert) ClearCurrentDay28

func (u *DeviceKpiUpsert) ClearCurrentDay28() *DeviceKpiUpsert

ClearCurrentDay28 clears the value of the "currentDay28" field.

func (*DeviceKpiUpsert) ClearCurrentDay7

func (u *DeviceKpiUpsert) ClearCurrentDay7() *DeviceKpiUpsert

ClearCurrentDay7 clears the value of the "currentDay7" field.

func (*DeviceKpiUpsert) ClearKpi

func (u *DeviceKpiUpsert) ClearKpi() *DeviceKpiUpsert

ClearKpi clears the value of the "kpi" field.

func (*DeviceKpiUpsert) ClearMonthKpi

func (u *DeviceKpiUpsert) ClearMonthKpi() *DeviceKpiUpsert

ClearMonthKpi clears the value of the "monthKpi" field.

func (*DeviceKpiUpsert) ClearStatus

func (u *DeviceKpiUpsert) ClearStatus() *DeviceKpiUpsert

ClearStatus clears the value of the "status" field.

func (*DeviceKpiUpsert) ClearWeekKpi

func (u *DeviceKpiUpsert) ClearWeekKpi() *DeviceKpiUpsert

ClearWeekKpi clears the value of the "weekKpi" field.

func (*DeviceKpiUpsert) ClearX

func (u *DeviceKpiUpsert) ClearX() *DeviceKpiUpsert

ClearX clears the value of the "x" field.

func (*DeviceKpiUpsert) ClearY

func (u *DeviceKpiUpsert) ClearY() *DeviceKpiUpsert

ClearY clears the value of the "y" field.

func (*DeviceKpiUpsert) SetA

SetA sets the "a" field.

func (*DeviceKpiUpsert) SetB

SetB sets the "b" field.

func (*DeviceKpiUpsert) SetCurrentDay1

func (u *DeviceKpiUpsert) SetCurrentDay1(v int64) *DeviceKpiUpsert

SetCurrentDay1 sets the "currentDay1" field.

func (*DeviceKpiUpsert) SetCurrentDay28

func (u *DeviceKpiUpsert) SetCurrentDay28(v int64) *DeviceKpiUpsert

SetCurrentDay28 sets the "currentDay28" field.

func (*DeviceKpiUpsert) SetCurrentDay7

func (u *DeviceKpiUpsert) SetCurrentDay7(v int64) *DeviceKpiUpsert

SetCurrentDay7 sets the "currentDay7" field.

func (*DeviceKpiUpsert) SetDeviceName

func (u *DeviceKpiUpsert) SetDeviceName(v string) *DeviceKpiUpsert

SetDeviceName sets the "deviceName" field.

func (*DeviceKpiUpsert) SetIotID

func (u *DeviceKpiUpsert) SetIotID(v string) *DeviceKpiUpsert

SetIotID sets the "iotID" field.

func (*DeviceKpiUpsert) SetKpi

func (u *DeviceKpiUpsert) SetKpi(v float64) *DeviceKpiUpsert

SetKpi sets the "kpi" field.

func (*DeviceKpiUpsert) SetMonthKpi

func (u *DeviceKpiUpsert) SetMonthKpi(v float64) *DeviceKpiUpsert

SetMonthKpi sets the "monthKpi" field.

func (*DeviceKpiUpsert) SetProductKey

func (u *DeviceKpiUpsert) SetProductKey(v string) *DeviceKpiUpsert

SetProductKey sets the "productKey" field.

func (*DeviceKpiUpsert) SetSort

func (u *DeviceKpiUpsert) SetSort(v uint32) *DeviceKpiUpsert

SetSort sets the "sort" field.

func (*DeviceKpiUpsert) SetStatus

func (u *DeviceKpiUpsert) SetStatus(v uint8) *DeviceKpiUpsert

SetStatus sets the "status" field.

func (*DeviceKpiUpsert) SetUpdatedAt

func (u *DeviceKpiUpsert) SetUpdatedAt(v time.Time) *DeviceKpiUpsert

SetUpdatedAt sets the "updated_at" field.

func (*DeviceKpiUpsert) SetWeekKpi

func (u *DeviceKpiUpsert) SetWeekKpi(v float64) *DeviceKpiUpsert

SetWeekKpi sets the "weekKpi" field.

func (*DeviceKpiUpsert) SetX

SetX sets the "x" field.

func (*DeviceKpiUpsert) SetY

SetY sets the "y" field.

func (*DeviceKpiUpsert) UpdateA

func (u *DeviceKpiUpsert) UpdateA() *DeviceKpiUpsert

UpdateA sets the "a" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateB

func (u *DeviceKpiUpsert) UpdateB() *DeviceKpiUpsert

UpdateB sets the "b" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateCurrentDay1

func (u *DeviceKpiUpsert) UpdateCurrentDay1() *DeviceKpiUpsert

UpdateCurrentDay1 sets the "currentDay1" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateCurrentDay28

func (u *DeviceKpiUpsert) UpdateCurrentDay28() *DeviceKpiUpsert

UpdateCurrentDay28 sets the "currentDay28" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateCurrentDay7

func (u *DeviceKpiUpsert) UpdateCurrentDay7() *DeviceKpiUpsert

UpdateCurrentDay7 sets the "currentDay7" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateDeviceName

func (u *DeviceKpiUpsert) UpdateDeviceName() *DeviceKpiUpsert

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateIotID

func (u *DeviceKpiUpsert) UpdateIotID() *DeviceKpiUpsert

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateKpi

func (u *DeviceKpiUpsert) UpdateKpi() *DeviceKpiUpsert

UpdateKpi sets the "kpi" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateMonthKpi

func (u *DeviceKpiUpsert) UpdateMonthKpi() *DeviceKpiUpsert

UpdateMonthKpi sets the "monthKpi" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateProductKey

func (u *DeviceKpiUpsert) UpdateProductKey() *DeviceKpiUpsert

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateSort

func (u *DeviceKpiUpsert) UpdateSort() *DeviceKpiUpsert

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateStatus

func (u *DeviceKpiUpsert) UpdateStatus() *DeviceKpiUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateUpdatedAt

func (u *DeviceKpiUpsert) UpdateUpdatedAt() *DeviceKpiUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateWeekKpi

func (u *DeviceKpiUpsert) UpdateWeekKpi() *DeviceKpiUpsert

UpdateWeekKpi sets the "weekKpi" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateX

func (u *DeviceKpiUpsert) UpdateX() *DeviceKpiUpsert

UpdateX sets the "x" field to the value that was provided on create.

func (*DeviceKpiUpsert) UpdateY

func (u *DeviceKpiUpsert) UpdateY() *DeviceKpiUpsert

UpdateY sets the "y" field to the value that was provided on create.

type DeviceKpiUpsertBulk

type DeviceKpiUpsertBulk struct {
	// contains filtered or unexported fields
}

DeviceKpiUpsertBulk is the builder for "upsert"-ing a bulk of DeviceKpi nodes.

func (*DeviceKpiUpsertBulk) AddA

AddA adds v to the "a" field.

func (*DeviceKpiUpsertBulk) AddB

AddB adds v to the "b" field.

func (*DeviceKpiUpsertBulk) AddCurrentDay1

func (u *DeviceKpiUpsertBulk) AddCurrentDay1(v int64) *DeviceKpiUpsertBulk

AddCurrentDay1 adds v to the "currentDay1" field.

func (*DeviceKpiUpsertBulk) AddCurrentDay28

func (u *DeviceKpiUpsertBulk) AddCurrentDay28(v int64) *DeviceKpiUpsertBulk

AddCurrentDay28 adds v to the "currentDay28" field.

func (*DeviceKpiUpsertBulk) AddCurrentDay7

func (u *DeviceKpiUpsertBulk) AddCurrentDay7(v int64) *DeviceKpiUpsertBulk

AddCurrentDay7 adds v to the "currentDay7" field.

func (*DeviceKpiUpsertBulk) AddKpi

AddKpi adds v to the "kpi" field.

func (*DeviceKpiUpsertBulk) AddMonthKpi

func (u *DeviceKpiUpsertBulk) AddMonthKpi(v float64) *DeviceKpiUpsertBulk

AddMonthKpi adds v to the "monthKpi" field.

func (*DeviceKpiUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceKpiUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceKpiUpsertBulk) AddWeekKpi

AddWeekKpi adds v to the "weekKpi" field.

func (*DeviceKpiUpsertBulk) AddX

AddX adds v to the "x" field.

func (*DeviceKpiUpsertBulk) AddY

AddY adds v to the "y" field.

func (*DeviceKpiUpsertBulk) ClearA

ClearA clears the value of the "a" field.

func (*DeviceKpiUpsertBulk) ClearB

ClearB clears the value of the "b" field.

func (*DeviceKpiUpsertBulk) ClearCurrentDay1

func (u *DeviceKpiUpsertBulk) ClearCurrentDay1() *DeviceKpiUpsertBulk

ClearCurrentDay1 clears the value of the "currentDay1" field.

func (*DeviceKpiUpsertBulk) ClearCurrentDay28

func (u *DeviceKpiUpsertBulk) ClearCurrentDay28() *DeviceKpiUpsertBulk

ClearCurrentDay28 clears the value of the "currentDay28" field.

func (*DeviceKpiUpsertBulk) ClearCurrentDay7

func (u *DeviceKpiUpsertBulk) ClearCurrentDay7() *DeviceKpiUpsertBulk

ClearCurrentDay7 clears the value of the "currentDay7" field.

func (*DeviceKpiUpsertBulk) ClearKpi

ClearKpi clears the value of the "kpi" field.

func (*DeviceKpiUpsertBulk) ClearMonthKpi

func (u *DeviceKpiUpsertBulk) ClearMonthKpi() *DeviceKpiUpsertBulk

ClearMonthKpi clears the value of the "monthKpi" field.

func (*DeviceKpiUpsertBulk) ClearStatus

func (u *DeviceKpiUpsertBulk) ClearStatus() *DeviceKpiUpsertBulk

ClearStatus clears the value of the "status" field.

func (*DeviceKpiUpsertBulk) ClearWeekKpi

func (u *DeviceKpiUpsertBulk) ClearWeekKpi() *DeviceKpiUpsertBulk

ClearWeekKpi clears the value of the "weekKpi" field.

func (*DeviceKpiUpsertBulk) ClearX

ClearX clears the value of the "x" field.

func (*DeviceKpiUpsertBulk) ClearY

ClearY clears the value of the "y" field.

func (*DeviceKpiUpsertBulk) DoNothing

func (u *DeviceKpiUpsertBulk) DoNothing() *DeviceKpiUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceKpiUpsertBulk) Exec

Exec executes the query.

func (*DeviceKpiUpsertBulk) ExecX

func (u *DeviceKpiUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceKpi.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeviceKpiUpsertBulk) SetA

SetA sets the "a" field.

func (*DeviceKpiUpsertBulk) SetB

SetB sets the "b" field.

func (*DeviceKpiUpsertBulk) SetCurrentDay1

func (u *DeviceKpiUpsertBulk) SetCurrentDay1(v int64) *DeviceKpiUpsertBulk

SetCurrentDay1 sets the "currentDay1" field.

func (*DeviceKpiUpsertBulk) SetCurrentDay28

func (u *DeviceKpiUpsertBulk) SetCurrentDay28(v int64) *DeviceKpiUpsertBulk

SetCurrentDay28 sets the "currentDay28" field.

func (*DeviceKpiUpsertBulk) SetCurrentDay7

func (u *DeviceKpiUpsertBulk) SetCurrentDay7(v int64) *DeviceKpiUpsertBulk

SetCurrentDay7 sets the "currentDay7" field.

func (*DeviceKpiUpsertBulk) SetDeviceName

func (u *DeviceKpiUpsertBulk) SetDeviceName(v string) *DeviceKpiUpsertBulk

SetDeviceName sets the "deviceName" field.

func (*DeviceKpiUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceKpiUpsertBulk) SetKpi

SetKpi sets the "kpi" field.

func (*DeviceKpiUpsertBulk) SetMonthKpi

func (u *DeviceKpiUpsertBulk) SetMonthKpi(v float64) *DeviceKpiUpsertBulk

SetMonthKpi sets the "monthKpi" field.

func (*DeviceKpiUpsertBulk) SetProductKey

func (u *DeviceKpiUpsertBulk) SetProductKey(v string) *DeviceKpiUpsertBulk

SetProductKey sets the "productKey" field.

func (*DeviceKpiUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceKpiUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceKpiUpsertBulk) SetUpdatedAt

func (u *DeviceKpiUpsertBulk) SetUpdatedAt(v time.Time) *DeviceKpiUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*DeviceKpiUpsertBulk) SetWeekKpi

SetWeekKpi sets the "weekKpi" field.

func (*DeviceKpiUpsertBulk) SetX

SetX sets the "x" field.

func (*DeviceKpiUpsertBulk) SetY

SetY sets the "y" field.

func (*DeviceKpiUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeviceKpiCreateBulk.OnConflict documentation for more info.

func (*DeviceKpiUpsertBulk) UpdateA

UpdateA sets the "a" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateB

UpdateB sets the "b" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateCurrentDay1

func (u *DeviceKpiUpsertBulk) UpdateCurrentDay1() *DeviceKpiUpsertBulk

UpdateCurrentDay1 sets the "currentDay1" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateCurrentDay28

func (u *DeviceKpiUpsertBulk) UpdateCurrentDay28() *DeviceKpiUpsertBulk

UpdateCurrentDay28 sets the "currentDay28" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateCurrentDay7

func (u *DeviceKpiUpsertBulk) UpdateCurrentDay7() *DeviceKpiUpsertBulk

UpdateCurrentDay7 sets the "currentDay7" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateDeviceName

func (u *DeviceKpiUpsertBulk) UpdateDeviceName() *DeviceKpiUpsertBulk

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateIotID

func (u *DeviceKpiUpsertBulk) UpdateIotID() *DeviceKpiUpsertBulk

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateKpi

func (u *DeviceKpiUpsertBulk) UpdateKpi() *DeviceKpiUpsertBulk

UpdateKpi sets the "kpi" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateMonthKpi

func (u *DeviceKpiUpsertBulk) UpdateMonthKpi() *DeviceKpiUpsertBulk

UpdateMonthKpi sets the "monthKpi" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateNewValues

func (u *DeviceKpiUpsertBulk) UpdateNewValues() *DeviceKpiUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DeviceKpi.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(devicekpi.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceKpiUpsertBulk) UpdateProductKey

func (u *DeviceKpiUpsertBulk) UpdateProductKey() *DeviceKpiUpsertBulk

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateSort

func (u *DeviceKpiUpsertBulk) UpdateSort() *DeviceKpiUpsertBulk

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateStatus

func (u *DeviceKpiUpsertBulk) UpdateStatus() *DeviceKpiUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateUpdatedAt

func (u *DeviceKpiUpsertBulk) UpdateUpdatedAt() *DeviceKpiUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateWeekKpi

func (u *DeviceKpiUpsertBulk) UpdateWeekKpi() *DeviceKpiUpsertBulk

UpdateWeekKpi sets the "weekKpi" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateX

UpdateX sets the "x" field to the value that was provided on create.

func (*DeviceKpiUpsertBulk) UpdateY

UpdateY sets the "y" field to the value that was provided on create.

type DeviceKpiUpsertOne

type DeviceKpiUpsertOne struct {
	// contains filtered or unexported fields
}

DeviceKpiUpsertOne is the builder for "upsert"-ing

one DeviceKpi node.

func (*DeviceKpiUpsertOne) AddA

AddA adds v to the "a" field.

func (*DeviceKpiUpsertOne) AddB

AddB adds v to the "b" field.

func (*DeviceKpiUpsertOne) AddCurrentDay1

func (u *DeviceKpiUpsertOne) AddCurrentDay1(v int64) *DeviceKpiUpsertOne

AddCurrentDay1 adds v to the "currentDay1" field.

func (*DeviceKpiUpsertOne) AddCurrentDay28

func (u *DeviceKpiUpsertOne) AddCurrentDay28(v int64) *DeviceKpiUpsertOne

AddCurrentDay28 adds v to the "currentDay28" field.

func (*DeviceKpiUpsertOne) AddCurrentDay7

func (u *DeviceKpiUpsertOne) AddCurrentDay7(v int64) *DeviceKpiUpsertOne

AddCurrentDay7 adds v to the "currentDay7" field.

func (*DeviceKpiUpsertOne) AddKpi

AddKpi adds v to the "kpi" field.

func (*DeviceKpiUpsertOne) AddMonthKpi

func (u *DeviceKpiUpsertOne) AddMonthKpi(v float64) *DeviceKpiUpsertOne

AddMonthKpi adds v to the "monthKpi" field.

func (*DeviceKpiUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceKpiUpsertOne) AddStatus

func (u *DeviceKpiUpsertOne) AddStatus(v uint8) *DeviceKpiUpsertOne

AddStatus adds v to the "status" field.

func (*DeviceKpiUpsertOne) AddWeekKpi

func (u *DeviceKpiUpsertOne) AddWeekKpi(v float64) *DeviceKpiUpsertOne

AddWeekKpi adds v to the "weekKpi" field.

func (*DeviceKpiUpsertOne) AddX

AddX adds v to the "x" field.

func (*DeviceKpiUpsertOne) AddY

AddY adds v to the "y" field.

func (*DeviceKpiUpsertOne) ClearA

ClearA clears the value of the "a" field.

func (*DeviceKpiUpsertOne) ClearB

ClearB clears the value of the "b" field.

func (*DeviceKpiUpsertOne) ClearCurrentDay1

func (u *DeviceKpiUpsertOne) ClearCurrentDay1() *DeviceKpiUpsertOne

ClearCurrentDay1 clears the value of the "currentDay1" field.

func (*DeviceKpiUpsertOne) ClearCurrentDay28

func (u *DeviceKpiUpsertOne) ClearCurrentDay28() *DeviceKpiUpsertOne

ClearCurrentDay28 clears the value of the "currentDay28" field.

func (*DeviceKpiUpsertOne) ClearCurrentDay7

func (u *DeviceKpiUpsertOne) ClearCurrentDay7() *DeviceKpiUpsertOne

ClearCurrentDay7 clears the value of the "currentDay7" field.

func (*DeviceKpiUpsertOne) ClearKpi

func (u *DeviceKpiUpsertOne) ClearKpi() *DeviceKpiUpsertOne

ClearKpi clears the value of the "kpi" field.

func (*DeviceKpiUpsertOne) ClearMonthKpi

func (u *DeviceKpiUpsertOne) ClearMonthKpi() *DeviceKpiUpsertOne

ClearMonthKpi clears the value of the "monthKpi" field.

func (*DeviceKpiUpsertOne) ClearStatus

func (u *DeviceKpiUpsertOne) ClearStatus() *DeviceKpiUpsertOne

ClearStatus clears the value of the "status" field.

func (*DeviceKpiUpsertOne) ClearWeekKpi

func (u *DeviceKpiUpsertOne) ClearWeekKpi() *DeviceKpiUpsertOne

ClearWeekKpi clears the value of the "weekKpi" field.

func (*DeviceKpiUpsertOne) ClearX

ClearX clears the value of the "x" field.

func (*DeviceKpiUpsertOne) ClearY

ClearY clears the value of the "y" field.

func (*DeviceKpiUpsertOne) DoNothing

func (u *DeviceKpiUpsertOne) DoNothing() *DeviceKpiUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceKpiUpsertOne) Exec

func (u *DeviceKpiUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceKpiUpsertOne) ExecX

func (u *DeviceKpiUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceKpiUpsertOne) ID

func (u *DeviceKpiUpsertOne) ID(ctx context.Context) (id uint64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceKpiUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceKpiUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceKpi.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceKpiUpsertOne) SetA

SetA sets the "a" field.

func (*DeviceKpiUpsertOne) SetB

SetB sets the "b" field.

func (*DeviceKpiUpsertOne) SetCurrentDay1

func (u *DeviceKpiUpsertOne) SetCurrentDay1(v int64) *DeviceKpiUpsertOne

SetCurrentDay1 sets the "currentDay1" field.

func (*DeviceKpiUpsertOne) SetCurrentDay28

func (u *DeviceKpiUpsertOne) SetCurrentDay28(v int64) *DeviceKpiUpsertOne

SetCurrentDay28 sets the "currentDay28" field.

func (*DeviceKpiUpsertOne) SetCurrentDay7

func (u *DeviceKpiUpsertOne) SetCurrentDay7(v int64) *DeviceKpiUpsertOne

SetCurrentDay7 sets the "currentDay7" field.

func (*DeviceKpiUpsertOne) SetDeviceName

func (u *DeviceKpiUpsertOne) SetDeviceName(v string) *DeviceKpiUpsertOne

SetDeviceName sets the "deviceName" field.

func (*DeviceKpiUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceKpiUpsertOne) SetKpi

SetKpi sets the "kpi" field.

func (*DeviceKpiUpsertOne) SetMonthKpi

func (u *DeviceKpiUpsertOne) SetMonthKpi(v float64) *DeviceKpiUpsertOne

SetMonthKpi sets the "monthKpi" field.

func (*DeviceKpiUpsertOne) SetProductKey

func (u *DeviceKpiUpsertOne) SetProductKey(v string) *DeviceKpiUpsertOne

SetProductKey sets the "productKey" field.

func (*DeviceKpiUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceKpiUpsertOne) SetStatus

func (u *DeviceKpiUpsertOne) SetStatus(v uint8) *DeviceKpiUpsertOne

SetStatus sets the "status" field.

func (*DeviceKpiUpsertOne) SetUpdatedAt

func (u *DeviceKpiUpsertOne) SetUpdatedAt(v time.Time) *DeviceKpiUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*DeviceKpiUpsertOne) SetWeekKpi

func (u *DeviceKpiUpsertOne) SetWeekKpi(v float64) *DeviceKpiUpsertOne

SetWeekKpi sets the "weekKpi" field.

func (*DeviceKpiUpsertOne) SetX

SetX sets the "x" field.

func (*DeviceKpiUpsertOne) SetY

SetY sets the "y" field.

func (*DeviceKpiUpsertOne) Update

func (u *DeviceKpiUpsertOne) Update(set func(*DeviceKpiUpsert)) *DeviceKpiUpsertOne

Update allows overriding fields `UPDATE` values. See the DeviceKpiCreate.OnConflict documentation for more info.

func (*DeviceKpiUpsertOne) UpdateA

func (u *DeviceKpiUpsertOne) UpdateA() *DeviceKpiUpsertOne

UpdateA sets the "a" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateB

func (u *DeviceKpiUpsertOne) UpdateB() *DeviceKpiUpsertOne

UpdateB sets the "b" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateCurrentDay1

func (u *DeviceKpiUpsertOne) UpdateCurrentDay1() *DeviceKpiUpsertOne

UpdateCurrentDay1 sets the "currentDay1" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateCurrentDay28

func (u *DeviceKpiUpsertOne) UpdateCurrentDay28() *DeviceKpiUpsertOne

UpdateCurrentDay28 sets the "currentDay28" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateCurrentDay7

func (u *DeviceKpiUpsertOne) UpdateCurrentDay7() *DeviceKpiUpsertOne

UpdateCurrentDay7 sets the "currentDay7" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateDeviceName

func (u *DeviceKpiUpsertOne) UpdateDeviceName() *DeviceKpiUpsertOne

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateIotID

func (u *DeviceKpiUpsertOne) UpdateIotID() *DeviceKpiUpsertOne

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateKpi

func (u *DeviceKpiUpsertOne) UpdateKpi() *DeviceKpiUpsertOne

UpdateKpi sets the "kpi" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateMonthKpi

func (u *DeviceKpiUpsertOne) UpdateMonthKpi() *DeviceKpiUpsertOne

UpdateMonthKpi sets the "monthKpi" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateNewValues

func (u *DeviceKpiUpsertOne) UpdateNewValues() *DeviceKpiUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceKpi.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(devicekpi.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceKpiUpsertOne) UpdateProductKey

func (u *DeviceKpiUpsertOne) UpdateProductKey() *DeviceKpiUpsertOne

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateSort

func (u *DeviceKpiUpsertOne) UpdateSort() *DeviceKpiUpsertOne

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateStatus

func (u *DeviceKpiUpsertOne) UpdateStatus() *DeviceKpiUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateUpdatedAt

func (u *DeviceKpiUpsertOne) UpdateUpdatedAt() *DeviceKpiUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateWeekKpi

func (u *DeviceKpiUpsertOne) UpdateWeekKpi() *DeviceKpiUpsertOne

UpdateWeekKpi sets the "weekKpi" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateX

func (u *DeviceKpiUpsertOne) UpdateX() *DeviceKpiUpsertOne

UpdateX sets the "x" field to the value that was provided on create.

func (*DeviceKpiUpsertOne) UpdateY

func (u *DeviceKpiUpsertOne) UpdateY() *DeviceKpiUpsertOne

UpdateY sets the "y" field to the value that was provided on create.

type DeviceKpis

type DeviceKpis []*DeviceKpi

DeviceKpis is a parsable slice of DeviceKpi.

type DeviceOfflineTime

type DeviceOfflineTime struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// Time | 离线时间
	Time string `json:"time,omitempty"`
	// contains filtered or unexported fields
}

DeviceOfflineTime is the model entity for the DeviceOfflineTime schema.

func (*DeviceOfflineTime) ExecContext

func (c *DeviceOfflineTime) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTime) QueryContext

func (c *DeviceOfflineTime) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTime) String

func (dot *DeviceOfflineTime) String() string

String implements the fmt.Stringer.

func (*DeviceOfflineTime) Unwrap

func (dot *DeviceOfflineTime) Unwrap() *DeviceOfflineTime

Unwrap unwraps the DeviceOfflineTime entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceOfflineTime) Update

Update returns a builder for updating this DeviceOfflineTime. Note that you need to call DeviceOfflineTime.Unwrap() before calling this method if this DeviceOfflineTime was returned from a transaction, and the transaction was committed or rolled back.

func (*DeviceOfflineTime) Value

func (dot *DeviceOfflineTime) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DeviceOfflineTime. This includes values selected through modifiers, order, etc.

type DeviceOfflineTimeClient

type DeviceOfflineTimeClient struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeClient is a client for the DeviceOfflineTime schema.

func NewDeviceOfflineTimeClient

func NewDeviceOfflineTimeClient(c config) *DeviceOfflineTimeClient

NewDeviceOfflineTimeClient returns a client for the DeviceOfflineTime from the given config.

func (*DeviceOfflineTimeClient) Create

Create returns a builder for creating a DeviceOfflineTime entity.

func (*DeviceOfflineTimeClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeviceOfflineTime entities.

func (*DeviceOfflineTimeClient) Delete

Delete returns a delete builder for DeviceOfflineTime.

func (*DeviceOfflineTimeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceOfflineTimeClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceOfflineTimeClient) ExecContext

func (c *DeviceOfflineTimeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeClient) Get

Get returns a DeviceOfflineTime entity by its id.

func (*DeviceOfflineTimeClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeviceOfflineTimeClient) Hooks

func (c *DeviceOfflineTimeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceOfflineTimeClient) Intercept

func (c *DeviceOfflineTimeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deviceofflinetime.Intercept(f(g(h())))`.

func (*DeviceOfflineTimeClient) Interceptors

func (c *DeviceOfflineTimeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceOfflineTimeClient) MapCreateBulk

func (c *DeviceOfflineTimeClient) MapCreateBulk(slice any, setFunc func(*DeviceOfflineTimeCreate, int)) *DeviceOfflineTimeCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DeviceOfflineTimeClient) Query

Query returns a query builder for DeviceOfflineTime.

func (*DeviceOfflineTimeClient) QueryContext

func (c *DeviceOfflineTimeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeClient) Update

Update returns an update builder for DeviceOfflineTime.

func (*DeviceOfflineTimeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceOfflineTimeClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeviceOfflineTimeClient) Use

func (c *DeviceOfflineTimeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deviceofflinetime.Hooks(f(g(h())))`.

type DeviceOfflineTimeCreate

type DeviceOfflineTimeCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceOfflineTimeCreate is the builder for creating a DeviceOfflineTime entity.

func (*DeviceOfflineTimeCreate) Exec

func (dotc *DeviceOfflineTimeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceOfflineTimeCreate) ExecContext

func (c *DeviceOfflineTimeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeCreate) ExecX

func (dotc *DeviceOfflineTimeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeCreate) Mutation

Mutation returns the DeviceOfflineTimeMutation object of the builder.

func (*DeviceOfflineTimeCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceOfflineTime.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceOfflineTimeUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceOfflineTimeCreate) OnConflictColumns

func (dotc *DeviceOfflineTimeCreate) OnConflictColumns(columns ...string) *DeviceOfflineTimeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceOfflineTime.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceOfflineTimeCreate) QueryContext

func (c *DeviceOfflineTimeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeCreate) Save

Save creates the DeviceOfflineTime in the database.

func (*DeviceOfflineTimeCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceOfflineTimeCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeviceOfflineTimeCreate) SetDeviceName

func (dotc *DeviceOfflineTimeCreate) SetDeviceName(s string) *DeviceOfflineTimeCreate

SetDeviceName sets the "deviceName" field.

func (*DeviceOfflineTimeCreate) SetID

SetID sets the "id" field.

func (*DeviceOfflineTimeCreate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOfflineTimeCreate) SetNillableCreatedAt

func (dotc *DeviceOfflineTimeCreate) SetNillableCreatedAt(t *time.Time) *DeviceOfflineTimeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeviceOfflineTimeCreate) SetNillableSort

func (dotc *DeviceOfflineTimeCreate) SetNillableSort(u *uint32) *DeviceOfflineTimeCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOfflineTimeCreate) SetNillableStatus

func (dotc *DeviceOfflineTimeCreate) SetNillableStatus(u *uint8) *DeviceOfflineTimeCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOfflineTimeCreate) SetNillableTime

func (dotc *DeviceOfflineTimeCreate) SetNillableTime(s *string) *DeviceOfflineTimeCreate

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceOfflineTimeCreate) SetNillableUpdatedAt

func (dotc *DeviceOfflineTimeCreate) SetNillableUpdatedAt(t *time.Time) *DeviceOfflineTimeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeviceOfflineTimeCreate) SetNotNilDeviceName

func (dot *DeviceOfflineTimeCreate) SetNotNilDeviceName(value *string) *DeviceOfflineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeCreate) SetNotNilIotID

func (dot *DeviceOfflineTimeCreate) SetNotNilIotID(value *string) *DeviceOfflineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeCreate) SetNotNilProductKey

func (dot *DeviceOfflineTimeCreate) SetNotNilProductKey(value *string) *DeviceOfflineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeCreate) SetNotNilSort

func (dot *DeviceOfflineTimeCreate) SetNotNilSort(value *uint32) *DeviceOfflineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeCreate) SetNotNilStatus

func (dot *DeviceOfflineTimeCreate) SetNotNilStatus(value *uint8) *DeviceOfflineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeCreate) SetNotNilTime

func (dot *DeviceOfflineTimeCreate) SetNotNilTime(value *string) *DeviceOfflineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeCreate) SetNotNilUpdatedAt

func (dot *DeviceOfflineTimeCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceOfflineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeCreate) SetProductKey

func (dotc *DeviceOfflineTimeCreate) SetProductKey(s string) *DeviceOfflineTimeCreate

SetProductKey sets the "productKey" field.

func (*DeviceOfflineTimeCreate) SetSort

SetSort sets the "sort" field.

func (*DeviceOfflineTimeCreate) SetStatus

SetStatus sets the "status" field.

func (*DeviceOfflineTimeCreate) SetTime

SetTime sets the "time" field.

func (*DeviceOfflineTimeCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOfflineTimeCreate) TableName

type DeviceOfflineTimeCreateBulk

type DeviceOfflineTimeCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeCreateBulk is the builder for creating many DeviceOfflineTime entities in bulk.

func (*DeviceOfflineTimeCreateBulk) Exec

Exec executes the query.

func (*DeviceOfflineTimeCreateBulk) ExecContext

func (c *DeviceOfflineTimeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeCreateBulk) ExecX

func (dotcb *DeviceOfflineTimeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceOfflineTime.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceOfflineTimeUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceOfflineTimeCreateBulk) OnConflictColumns

func (dotcb *DeviceOfflineTimeCreateBulk) OnConflictColumns(columns ...string) *DeviceOfflineTimeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceOfflineTime.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceOfflineTimeCreateBulk) QueryContext

func (c *DeviceOfflineTimeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeCreateBulk) Save

Save creates the DeviceOfflineTime entities in the database.

func (*DeviceOfflineTimeCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeviceOfflineTimeDelete

type DeviceOfflineTimeDelete struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeDelete is the builder for deleting a DeviceOfflineTime entity.

func (*DeviceOfflineTimeDelete) Exec

func (dotd *DeviceOfflineTimeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceOfflineTimeDelete) ExecContext

func (c *DeviceOfflineTimeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeDelete) ExecX

func (dotd *DeviceOfflineTimeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeDelete) QueryContext

func (c *DeviceOfflineTimeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeDelete) Where

Where appends a list predicates to the DeviceOfflineTimeDelete builder.

type DeviceOfflineTimeDeleteOne

type DeviceOfflineTimeDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeDeleteOne is the builder for deleting a single DeviceOfflineTime entity.

func (*DeviceOfflineTimeDeleteOne) Exec

Exec executes the deletion query.

func (*DeviceOfflineTimeDeleteOne) ExecX

func (dotdo *DeviceOfflineTimeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeDeleteOne) Where

Where appends a list predicates to the DeviceOfflineTimeDelete builder.

type DeviceOfflineTimeGroupBy

type DeviceOfflineTimeGroupBy struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeGroupBy is the group-by builder for DeviceOfflineTime entities.

func (*DeviceOfflineTimeGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceOfflineTimeGroupBy) Bool

func (s *DeviceOfflineTimeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) BoolX

func (s *DeviceOfflineTimeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) Bools

func (s *DeviceOfflineTimeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) BoolsX

func (s *DeviceOfflineTimeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) Float64

func (s *DeviceOfflineTimeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) Float64X

func (s *DeviceOfflineTimeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) Float64s

func (s *DeviceOfflineTimeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) Float64sX

func (s *DeviceOfflineTimeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) Int

func (s *DeviceOfflineTimeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) IntX

func (s *DeviceOfflineTimeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) Ints

func (s *DeviceOfflineTimeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) IntsX

func (s *DeviceOfflineTimeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) Scan

func (dotgb *DeviceOfflineTimeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceOfflineTimeGroupBy) ScanX

func (s *DeviceOfflineTimeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) String

func (s *DeviceOfflineTimeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) StringX

func (s *DeviceOfflineTimeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceOfflineTimeGroupBy) Strings

func (s *DeviceOfflineTimeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeGroupBy) StringsX

func (s *DeviceOfflineTimeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceOfflineTimeMutation

type DeviceOfflineTimeMutation struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeMutation represents an operation that mutates the DeviceOfflineTime nodes in the graph.

func (*DeviceOfflineTimeMutation) AddField

func (m *DeviceOfflineTimeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceOfflineTimeMutation) AddSort

func (m *DeviceOfflineTimeMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceOfflineTimeMutation) AddStatus

func (m *DeviceOfflineTimeMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceOfflineTimeMutation) AddedEdges

func (m *DeviceOfflineTimeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceOfflineTimeMutation) AddedField

func (m *DeviceOfflineTimeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceOfflineTimeMutation) AddedFields

func (m *DeviceOfflineTimeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceOfflineTimeMutation) AddedIDs

func (m *DeviceOfflineTimeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceOfflineTimeMutation) AddedSort

func (m *DeviceOfflineTimeMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceOfflineTimeMutation) AddedStatus

func (m *DeviceOfflineTimeMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceOfflineTimeMutation) ClearEdge

func (m *DeviceOfflineTimeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceOfflineTimeMutation) ClearField

func (m *DeviceOfflineTimeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceOfflineTimeMutation) ClearStatus

func (m *DeviceOfflineTimeMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceOfflineTimeMutation) ClearTime

func (m *DeviceOfflineTimeMutation) ClearTime()

ClearTime clears the value of the "time" field.

func (*DeviceOfflineTimeMutation) ClearedEdges

func (m *DeviceOfflineTimeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceOfflineTimeMutation) ClearedFields

func (m *DeviceOfflineTimeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceOfflineTimeMutation) Client

func (m DeviceOfflineTimeMutation) 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 (*DeviceOfflineTimeMutation) CreatedAt

func (m *DeviceOfflineTimeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceOfflineTimeMutation) DeviceName

func (m *DeviceOfflineTimeMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceOfflineTimeMutation) EdgeCleared

func (m *DeviceOfflineTimeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceOfflineTimeMutation) ExecContext

func (c *DeviceOfflineTimeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeMutation) Field

func (m *DeviceOfflineTimeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceOfflineTimeMutation) FieldCleared

func (m *DeviceOfflineTimeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceOfflineTimeMutation) Fields

func (m *DeviceOfflineTimeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceOfflineTimeMutation) ID

func (m *DeviceOfflineTimeMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceOfflineTimeMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceOfflineTimeMutation) IotID

func (m *DeviceOfflineTimeMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceOfflineTimeMutation) OldCreatedAt

func (m *DeviceOfflineTimeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) OldDeviceName

func (m *DeviceOfflineTimeMutation) OldDeviceName(ctx context.Context) (v string, err error)

OldDeviceName returns the old "deviceName" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) OldField

func (m *DeviceOfflineTimeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceOfflineTimeMutation) OldIotID

func (m *DeviceOfflineTimeMutation) OldIotID(ctx context.Context) (v string, err error)

OldIotID returns the old "iotID" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) OldProductKey

func (m *DeviceOfflineTimeMutation) OldProductKey(ctx context.Context) (v string, err error)

OldProductKey returns the old "productKey" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) OldSort

func (m *DeviceOfflineTimeMutation) OldSort(ctx context.Context) (v uint32, err error)

OldSort returns the old "sort" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) OldStatus

func (m *DeviceOfflineTimeMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) OldTime

func (m *DeviceOfflineTimeMutation) OldTime(ctx context.Context) (v string, err error)

OldTime returns the old "time" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) OldUpdatedAt

func (m *DeviceOfflineTimeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeviceOfflineTime entity. If the DeviceOfflineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOfflineTimeMutation) Op

func (m *DeviceOfflineTimeMutation) Op() Op

Op returns the operation name.

func (*DeviceOfflineTimeMutation) ProductKey

func (m *DeviceOfflineTimeMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceOfflineTimeMutation) QueryContext

func (c *DeviceOfflineTimeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeMutation) RemovedEdges

func (m *DeviceOfflineTimeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceOfflineTimeMutation) RemovedIDs

func (m *DeviceOfflineTimeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceOfflineTimeMutation) ResetCreatedAt

func (m *DeviceOfflineTimeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceOfflineTimeMutation) ResetDeviceName

func (m *DeviceOfflineTimeMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceOfflineTimeMutation) ResetEdge

func (m *DeviceOfflineTimeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceOfflineTimeMutation) ResetField

func (m *DeviceOfflineTimeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceOfflineTimeMutation) ResetIotID

func (m *DeviceOfflineTimeMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceOfflineTimeMutation) ResetProductKey

func (m *DeviceOfflineTimeMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceOfflineTimeMutation) ResetSort

func (m *DeviceOfflineTimeMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceOfflineTimeMutation) ResetStatus

func (m *DeviceOfflineTimeMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceOfflineTimeMutation) ResetTime

func (m *DeviceOfflineTimeMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*DeviceOfflineTimeMutation) ResetUpdatedAt

func (m *DeviceOfflineTimeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceOfflineTimeMutation) SetCreatedAt

func (m *DeviceOfflineTimeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeviceOfflineTimeMutation) SetDeviceName

func (m *DeviceOfflineTimeMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceOfflineTimeMutation) SetField

func (m *DeviceOfflineTimeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceOfflineTimeMutation) SetID

func (m *DeviceOfflineTimeMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DeviceOfflineTime entities.

func (*DeviceOfflineTimeMutation) SetIotID

func (m *DeviceOfflineTimeMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceOfflineTimeMutation) SetOp

func (m *DeviceOfflineTimeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceOfflineTimeMutation) SetProductKey

func (m *DeviceOfflineTimeMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceOfflineTimeMutation) SetSort

func (m *DeviceOfflineTimeMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceOfflineTimeMutation) SetStatus

func (m *DeviceOfflineTimeMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceOfflineTimeMutation) SetTime

func (m *DeviceOfflineTimeMutation) SetTime(s string)

SetTime sets the "time" field.

func (*DeviceOfflineTimeMutation) SetUpdatedAt

func (m *DeviceOfflineTimeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOfflineTimeMutation) Sort

func (m *DeviceOfflineTimeMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceOfflineTimeMutation) Status

func (m *DeviceOfflineTimeMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DeviceOfflineTimeMutation) StatusCleared

func (m *DeviceOfflineTimeMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*DeviceOfflineTimeMutation) Time

func (m *DeviceOfflineTimeMutation) Time() (r string, exists bool)

Time returns the value of the "time" field in the mutation.

func (*DeviceOfflineTimeMutation) TimeCleared

func (m *DeviceOfflineTimeMutation) TimeCleared() bool

TimeCleared returns if the "time" field was cleared in this mutation.

func (DeviceOfflineTimeMutation) Tx

func (m DeviceOfflineTimeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceOfflineTimeMutation) Type

Type returns the node type of this mutation (DeviceOfflineTime).

func (*DeviceOfflineTimeMutation) UpdatedAt

func (m *DeviceOfflineTimeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceOfflineTimeMutation) Where

Where appends a list predicates to the DeviceOfflineTimeMutation builder.

func (*DeviceOfflineTimeMutation) WhereP

func (m *DeviceOfflineTimeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceOfflineTimeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceOfflineTimePageList

type DeviceOfflineTimePageList struct {
	List        []*DeviceOfflineTime `json:"list"`
	PageDetails *PageDetails         `json:"pageDetails"`
}

DeviceOfflineTimePageList is DeviceOfflineTime PageList result.

type DeviceOfflineTimePager

type DeviceOfflineTimePager struct {
	Order  deviceofflinetime.OrderOption
	Filter func(*DeviceOfflineTimeQuery) (*DeviceOfflineTimeQuery, error)
}

func (*DeviceOfflineTimePager) ApplyFilter

type DeviceOfflineTimePaginateOption

type DeviceOfflineTimePaginateOption func(*DeviceOfflineTimePager)

DeviceOfflineTimePaginateOption enables pagination customization.

type DeviceOfflineTimeQuery

type DeviceOfflineTimeQuery struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeQuery is the builder for querying DeviceOfflineTime entities.

func (*DeviceOfflineTimeQuery) Aggregate

Aggregate returns a DeviceOfflineTimeSelect configured with the given aggregations.

func (*DeviceOfflineTimeQuery) All

All executes the query and returns a list of DeviceOfflineTimes.

func (*DeviceOfflineTimeQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) Clone

Clone returns a duplicate of the DeviceOfflineTimeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceOfflineTimeQuery) Count

func (dotq *DeviceOfflineTimeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceOfflineTimeQuery) CountX

func (dotq *DeviceOfflineTimeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) ExecContext

func (c *DeviceOfflineTimeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeQuery) Exist

func (dotq *DeviceOfflineTimeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceOfflineTimeQuery) ExistX

func (dotq *DeviceOfflineTimeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) First

First returns the first DeviceOfflineTime entity from the query. Returns a *NotFoundError when no DeviceOfflineTime was found.

func (*DeviceOfflineTimeQuery) FirstID

func (dotq *DeviceOfflineTimeQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first DeviceOfflineTime ID from the query. Returns a *NotFoundError when no DeviceOfflineTime ID was found.

func (*DeviceOfflineTimeQuery) FirstIDX

func (dotq *DeviceOfflineTimeQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) GroupBy

func (dotq *DeviceOfflineTimeQuery) GroupBy(field string, fields ...string) *DeviceOfflineTimeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceOfflineTime.Query().
	GroupBy(deviceofflinetime.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceOfflineTimeQuery) IDs

func (dotq *DeviceOfflineTimeQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of DeviceOfflineTime IDs.

func (*DeviceOfflineTimeQuery) IDsX

func (dotq *DeviceOfflineTimeQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) Limit

Limit the number of records to be returned by this query.

func (*DeviceOfflineTimeQuery) Modify

func (dotq *DeviceOfflineTimeQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceOfflineTimeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DeviceOfflineTimeQuery) Offset

func (dotq *DeviceOfflineTimeQuery) Offset(offset int) *DeviceOfflineTimeQuery

Offset to start from.

func (*DeviceOfflineTimeQuery) Only

Only returns a single DeviceOfflineTime entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceOfflineTime entity is found. Returns a *NotFoundError when no DeviceOfflineTime entities are found.

func (*DeviceOfflineTimeQuery) OnlyID

func (dotq *DeviceOfflineTimeQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only DeviceOfflineTime ID in the query. Returns a *NotSingularError when more than one DeviceOfflineTime ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceOfflineTimeQuery) OnlyIDX

func (dotq *DeviceOfflineTimeQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeviceOfflineTimeQuery) Order

Order specifies how the records should be ordered.

func (*DeviceOfflineTimeQuery) Page

func (*DeviceOfflineTimeQuery) QueryContext

func (c *DeviceOfflineTimeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeQuery) Select

func (dotq *DeviceOfflineTimeQuery) Select(fields ...string) *DeviceOfflineTimeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.DeviceOfflineTime.Query().
	Select(deviceofflinetime.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceOfflineTimeQuery) Unique

func (dotq *DeviceOfflineTimeQuery) Unique(unique bool) *DeviceOfflineTimeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceOfflineTimeQuery) Where

Where adds a new predicate for the DeviceOfflineTimeQuery builder.

type DeviceOfflineTimeSelect

type DeviceOfflineTimeSelect struct {
	*DeviceOfflineTimeQuery
	// contains filtered or unexported fields
}

DeviceOfflineTimeSelect is the builder for selecting fields of DeviceOfflineTime entities.

func (*DeviceOfflineTimeSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceOfflineTimeSelect) Bool

func (s *DeviceOfflineTimeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) BoolX

func (s *DeviceOfflineTimeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceOfflineTimeSelect) Bools

func (s *DeviceOfflineTimeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) BoolsX

func (s *DeviceOfflineTimeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeviceOfflineTimeSelect) ExecContext

func (c DeviceOfflineTimeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeSelect) Float64

func (s *DeviceOfflineTimeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) Float64X

func (s *DeviceOfflineTimeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceOfflineTimeSelect) Float64s

func (s *DeviceOfflineTimeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) Float64sX

func (s *DeviceOfflineTimeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceOfflineTimeSelect) Int

func (s *DeviceOfflineTimeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) IntX

func (s *DeviceOfflineTimeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceOfflineTimeSelect) Ints

func (s *DeviceOfflineTimeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) IntsX

func (s *DeviceOfflineTimeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceOfflineTimeSelect) Modify

func (dots *DeviceOfflineTimeSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceOfflineTimeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (DeviceOfflineTimeSelect) QueryContext

func (c DeviceOfflineTimeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeSelect) Scan

func (dots *DeviceOfflineTimeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceOfflineTimeSelect) ScanX

func (s *DeviceOfflineTimeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceOfflineTimeSelect) String

func (s *DeviceOfflineTimeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) StringX

func (s *DeviceOfflineTimeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceOfflineTimeSelect) Strings

func (s *DeviceOfflineTimeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceOfflineTimeSelect) StringsX

func (s *DeviceOfflineTimeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceOfflineTimeUpdate

type DeviceOfflineTimeUpdate struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeUpdate is the builder for updating DeviceOfflineTime entities.

func (*DeviceOfflineTimeUpdate) AddSort

AddSort adds u to the "sort" field.

func (*DeviceOfflineTimeUpdate) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceOfflineTimeUpdate) ClearStatus

func (dotu *DeviceOfflineTimeUpdate) ClearStatus() *DeviceOfflineTimeUpdate

ClearStatus clears the value of the "status" field.

func (*DeviceOfflineTimeUpdate) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOfflineTimeUpdate) Exec

func (dotu *DeviceOfflineTimeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceOfflineTimeUpdate) ExecContext

func (c *DeviceOfflineTimeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeUpdate) ExecX

func (dotu *DeviceOfflineTimeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeUpdate) Modify

func (dotu *DeviceOfflineTimeUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceOfflineTimeUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceOfflineTimeUpdate) Mutation

Mutation returns the DeviceOfflineTimeMutation object of the builder.

func (*DeviceOfflineTimeUpdate) QueryContext

func (c *DeviceOfflineTimeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeUpdate) Save

func (dotu *DeviceOfflineTimeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceOfflineTimeUpdate) SaveX

func (dotu *DeviceOfflineTimeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceOfflineTimeUpdate) SetDeviceName

func (dotu *DeviceOfflineTimeUpdate) SetDeviceName(s string) *DeviceOfflineTimeUpdate

SetDeviceName sets the "deviceName" field.

func (*DeviceOfflineTimeUpdate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOfflineTimeUpdate) SetNillableDeviceName

func (dotu *DeviceOfflineTimeUpdate) SetNillableDeviceName(s *string) *DeviceOfflineTimeUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceOfflineTimeUpdate) SetNillableIotID

func (dotu *DeviceOfflineTimeUpdate) SetNillableIotID(s *string) *DeviceOfflineTimeUpdate

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceOfflineTimeUpdate) SetNillableProductKey

func (dotu *DeviceOfflineTimeUpdate) SetNillableProductKey(s *string) *DeviceOfflineTimeUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceOfflineTimeUpdate) SetNillableSort

func (dotu *DeviceOfflineTimeUpdate) SetNillableSort(u *uint32) *DeviceOfflineTimeUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOfflineTimeUpdate) SetNillableStatus

func (dotu *DeviceOfflineTimeUpdate) SetNillableStatus(u *uint8) *DeviceOfflineTimeUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOfflineTimeUpdate) SetNillableTime

func (dotu *DeviceOfflineTimeUpdate) SetNillableTime(s *string) *DeviceOfflineTimeUpdate

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceOfflineTimeUpdate) SetNotNilDeviceName

func (dot *DeviceOfflineTimeUpdate) SetNotNilDeviceName(value *string) *DeviceOfflineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdate) SetNotNilIotID

func (dot *DeviceOfflineTimeUpdate) SetNotNilIotID(value *string) *DeviceOfflineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdate) SetNotNilProductKey

func (dot *DeviceOfflineTimeUpdate) SetNotNilProductKey(value *string) *DeviceOfflineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdate) SetNotNilSort

func (dot *DeviceOfflineTimeUpdate) SetNotNilSort(value *uint32) *DeviceOfflineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdate) SetNotNilStatus

func (dot *DeviceOfflineTimeUpdate) SetNotNilStatus(value *uint8) *DeviceOfflineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdate) SetNotNilTime

func (dot *DeviceOfflineTimeUpdate) SetNotNilTime(value *string) *DeviceOfflineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdate) SetNotNilUpdatedAt

func (dot *DeviceOfflineTimeUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceOfflineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdate) SetProductKey

func (dotu *DeviceOfflineTimeUpdate) SetProductKey(s string) *DeviceOfflineTimeUpdate

SetProductKey sets the "productKey" field.

func (*DeviceOfflineTimeUpdate) SetSort

SetSort sets the "sort" field.

func (*DeviceOfflineTimeUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeviceOfflineTimeUpdate) SetTime

SetTime sets the "time" field.

func (*DeviceOfflineTimeUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOfflineTimeUpdate) Where

Where appends a list predicates to the DeviceOfflineTimeUpdate builder.

type DeviceOfflineTimeUpdateOne

type DeviceOfflineTimeUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeUpdateOne is the builder for updating a single DeviceOfflineTime entity.

func (*DeviceOfflineTimeUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceOfflineTimeUpdateOne) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceOfflineTimeUpdateOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOfflineTimeUpdateOne) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOfflineTimeUpdateOne) Exec

Exec executes the query on the entity.

func (*DeviceOfflineTimeUpdateOne) ExecContext

func (c *DeviceOfflineTimeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOfflineTimeUpdateOne) ExecX

func (dotuo *DeviceOfflineTimeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeUpdateOne) Modify

func (dotuo *DeviceOfflineTimeUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceOfflineTimeUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceOfflineTimeUpdateOne) Mutation

Mutation returns the DeviceOfflineTimeMutation object of the builder.

func (*DeviceOfflineTimeUpdateOne) QueryContext

func (c *DeviceOfflineTimeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOfflineTimeUpdateOne) Save

Save executes the query and returns the updated DeviceOfflineTime entity.

func (*DeviceOfflineTimeUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeviceOfflineTimeUpdateOne) Select

func (dotuo *DeviceOfflineTimeUpdateOne) Select(field string, fields ...string) *DeviceOfflineTimeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceOfflineTimeUpdateOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOfflineTimeUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOfflineTimeUpdateOne) SetNillableDeviceName

func (dotuo *DeviceOfflineTimeUpdateOne) SetNillableDeviceName(s *string) *DeviceOfflineTimeUpdateOne

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNillableIotID

func (dotuo *DeviceOfflineTimeUpdateOne) SetNillableIotID(s *string) *DeviceOfflineTimeUpdateOne

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNillableProductKey

func (dotuo *DeviceOfflineTimeUpdateOne) SetNillableProductKey(s *string) *DeviceOfflineTimeUpdateOne

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNillableSort

func (dotuo *DeviceOfflineTimeUpdateOne) SetNillableSort(u *uint32) *DeviceOfflineTimeUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNillableStatus

func (dotuo *DeviceOfflineTimeUpdateOne) SetNillableStatus(u *uint8) *DeviceOfflineTimeUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNillableTime

func (dotuo *DeviceOfflineTimeUpdateOne) SetNillableTime(s *string) *DeviceOfflineTimeUpdateOne

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNotNilDeviceName

func (dot *DeviceOfflineTimeUpdateOne) SetNotNilDeviceName(value *string) *DeviceOfflineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNotNilIotID

func (dot *DeviceOfflineTimeUpdateOne) SetNotNilIotID(value *string) *DeviceOfflineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNotNilProductKey

func (dot *DeviceOfflineTimeUpdateOne) SetNotNilProductKey(value *string) *DeviceOfflineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNotNilSort

func (dot *DeviceOfflineTimeUpdateOne) SetNotNilSort(value *uint32) *DeviceOfflineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNotNilStatus

func (dot *DeviceOfflineTimeUpdateOne) SetNotNilStatus(value *uint8) *DeviceOfflineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNotNilTime

func (dot *DeviceOfflineTimeUpdateOne) SetNotNilTime(value *string) *DeviceOfflineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdateOne) SetNotNilUpdatedAt

func (dot *DeviceOfflineTimeUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DeviceOfflineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOfflineTimeUpdateOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOfflineTimeUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceOfflineTimeUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceOfflineTimeUpdateOne) SetTime

SetTime sets the "time" field.

func (*DeviceOfflineTimeUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOfflineTimeUpdateOne) Where

Where appends a list predicates to the DeviceOfflineTimeUpdate builder.

type DeviceOfflineTimeUpsert

type DeviceOfflineTimeUpsert struct {
	*sql.UpdateSet
}

DeviceOfflineTimeUpsert is the "OnConflict" setter.

func (*DeviceOfflineTimeUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOfflineTimeUpsert) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOfflineTimeUpsert) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOfflineTimeUpsert) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOfflineTimeUpsert) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOfflineTimeUpsert) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOfflineTimeUpsert) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOfflineTimeUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceOfflineTimeUpsert) SetStatus

SetStatus sets the "status" field.

func (*DeviceOfflineTimeUpsert) SetTime

SetTime sets the "time" field.

func (*DeviceOfflineTimeUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOfflineTimeUpsert) UpdateDeviceName

func (u *DeviceOfflineTimeUpsert) UpdateDeviceName() *DeviceOfflineTimeUpsert

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsert) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsert) UpdateProductKey

func (u *DeviceOfflineTimeUpsert) UpdateProductKey() *DeviceOfflineTimeUpsert

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsert) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsert) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsert) UpdateTime

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsert) UpdateUpdatedAt

func (u *DeviceOfflineTimeUpsert) UpdateUpdatedAt() *DeviceOfflineTimeUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceOfflineTimeUpsertBulk

type DeviceOfflineTimeUpsertBulk struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeUpsertBulk is the builder for "upsert"-ing a bulk of DeviceOfflineTime nodes.

func (*DeviceOfflineTimeUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOfflineTimeUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOfflineTimeUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOfflineTimeUpsertBulk) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOfflineTimeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceOfflineTimeUpsertBulk) Exec

Exec executes the query.

func (*DeviceOfflineTimeUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceOfflineTime.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeviceOfflineTimeUpsertBulk) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOfflineTimeUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOfflineTimeUpsertBulk) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOfflineTimeUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceOfflineTimeUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceOfflineTimeUpsertBulk) SetTime

SetTime sets the "time" field.

func (*DeviceOfflineTimeUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOfflineTimeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeviceOfflineTimeCreateBulk.OnConflict documentation for more info.

func (*DeviceOfflineTimeUpsertBulk) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertBulk) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DeviceOfflineTime.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceofflinetime.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceOfflineTimeUpsertBulk) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertBulk) UpdateTime

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceOfflineTimeUpsertOne

type DeviceOfflineTimeUpsertOne struct {
	// contains filtered or unexported fields
}

DeviceOfflineTimeUpsertOne is the builder for "upsert"-ing

one DeviceOfflineTime node.

func (*DeviceOfflineTimeUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOfflineTimeUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOfflineTimeUpsertOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOfflineTimeUpsertOne) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOfflineTimeUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceOfflineTimeUpsertOne) Exec

Exec executes the query.

func (*DeviceOfflineTimeUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOfflineTimeUpsertOne) ID

func (u *DeviceOfflineTimeUpsertOne) ID(ctx context.Context) (id uint64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceOfflineTimeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceOfflineTimeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceOfflineTime.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceOfflineTimeUpsertOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOfflineTimeUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOfflineTimeUpsertOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOfflineTimeUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceOfflineTimeUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceOfflineTimeUpsertOne) SetTime

SetTime sets the "time" field.

func (*DeviceOfflineTimeUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOfflineTimeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeviceOfflineTimeCreate.OnConflict documentation for more info.

func (*DeviceOfflineTimeUpsertOne) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertOne) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceOfflineTime.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceofflinetime.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceOfflineTimeUpsertOne) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertOne) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertOne) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertOne) UpdateTime

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceOfflineTimeUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceOfflineTimes

type DeviceOfflineTimes []*DeviceOfflineTime

DeviceOfflineTimes is a parsable slice of DeviceOfflineTime.

type DeviceOnTimeDailies

type DeviceOnTimeDailies []*DeviceOnTimeDaily

DeviceOnTimeDailies is a parsable slice of DeviceOnTimeDaily.

type DeviceOnTimeDaily

type DeviceOnTimeDaily struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// Time | 记录时间
	Time string `json:"time,omitempty"`
	// Value | 统计总时间
	Value string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

DeviceOnTimeDaily is the model entity for the DeviceOnTimeDaily schema.

func (*DeviceOnTimeDaily) ExecContext

func (c *DeviceOnTimeDaily) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDaily) GetValue

func (dotd *DeviceOnTimeDaily) GetValue(name string) (ent.Value, error)

GetValue returns the ent.Value that was dynamically selected and assigned to the DeviceOnTimeDaily. This includes values selected through modifiers, order, etc.

func (*DeviceOnTimeDaily) QueryContext

func (c *DeviceOnTimeDaily) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDaily) String

func (dotd *DeviceOnTimeDaily) String() string

String implements the fmt.Stringer.

func (*DeviceOnTimeDaily) Unwrap

func (dotd *DeviceOnTimeDaily) Unwrap() *DeviceOnTimeDaily

Unwrap unwraps the DeviceOnTimeDaily entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceOnTimeDaily) Update

Update returns a builder for updating this DeviceOnTimeDaily. Note that you need to call DeviceOnTimeDaily.Unwrap() before calling this method if this DeviceOnTimeDaily was returned from a transaction, and the transaction was committed or rolled back.

type DeviceOnTimeDailyClient

type DeviceOnTimeDailyClient struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyClient is a client for the DeviceOnTimeDaily schema.

func NewDeviceOnTimeDailyClient

func NewDeviceOnTimeDailyClient(c config) *DeviceOnTimeDailyClient

NewDeviceOnTimeDailyClient returns a client for the DeviceOnTimeDaily from the given config.

func (*DeviceOnTimeDailyClient) Create

Create returns a builder for creating a DeviceOnTimeDaily entity.

func (*DeviceOnTimeDailyClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeviceOnTimeDaily entities.

func (*DeviceOnTimeDailyClient) Delete

Delete returns a delete builder for DeviceOnTimeDaily.

func (*DeviceOnTimeDailyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceOnTimeDailyClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceOnTimeDailyClient) ExecContext

func (c *DeviceOnTimeDailyClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyClient) Get

Get returns a DeviceOnTimeDaily entity by its id.

func (*DeviceOnTimeDailyClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeviceOnTimeDailyClient) Hooks

func (c *DeviceOnTimeDailyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceOnTimeDailyClient) Intercept

func (c *DeviceOnTimeDailyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deviceontimedaily.Intercept(f(g(h())))`.

func (*DeviceOnTimeDailyClient) Interceptors

func (c *DeviceOnTimeDailyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceOnTimeDailyClient) MapCreateBulk

func (c *DeviceOnTimeDailyClient) MapCreateBulk(slice any, setFunc func(*DeviceOnTimeDailyCreate, int)) *DeviceOnTimeDailyCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DeviceOnTimeDailyClient) Query

Query returns a query builder for DeviceOnTimeDaily.

func (*DeviceOnTimeDailyClient) QueryContext

func (c *DeviceOnTimeDailyClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyClient) Update

Update returns an update builder for DeviceOnTimeDaily.

func (*DeviceOnTimeDailyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceOnTimeDailyClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeviceOnTimeDailyClient) Use

func (c *DeviceOnTimeDailyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deviceontimedaily.Hooks(f(g(h())))`.

type DeviceOnTimeDailyCreate

type DeviceOnTimeDailyCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceOnTimeDailyCreate is the builder for creating a DeviceOnTimeDaily entity.

func (*DeviceOnTimeDailyCreate) Exec

func (dotdc *DeviceOnTimeDailyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceOnTimeDailyCreate) ExecContext

func (c *DeviceOnTimeDailyCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyCreate) ExecX

func (dotdc *DeviceOnTimeDailyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyCreate) Mutation

Mutation returns the DeviceOnTimeDailyMutation object of the builder.

func (*DeviceOnTimeDailyCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceOnTimeDaily.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceOnTimeDailyUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceOnTimeDailyCreate) OnConflictColumns

func (dotdc *DeviceOnTimeDailyCreate) OnConflictColumns(columns ...string) *DeviceOnTimeDailyUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceOnTimeDaily.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceOnTimeDailyCreate) QueryContext

func (c *DeviceOnTimeDailyCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyCreate) Save

Save creates the DeviceOnTimeDaily in the database.

func (*DeviceOnTimeDailyCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceOnTimeDailyCreate) SetCreatedAt

func (dotdc *DeviceOnTimeDailyCreate) SetCreatedAt(t time.Time) *DeviceOnTimeDailyCreate

SetCreatedAt sets the "created_at" field.

func (*DeviceOnTimeDailyCreate) SetDeviceName

func (dotdc *DeviceOnTimeDailyCreate) SetDeviceName(s string) *DeviceOnTimeDailyCreate

SetDeviceName sets the "deviceName" field.

func (*DeviceOnTimeDailyCreate) SetID

SetID sets the "id" field.

func (*DeviceOnTimeDailyCreate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnTimeDailyCreate) SetNillableCreatedAt

func (dotdc *DeviceOnTimeDailyCreate) SetNillableCreatedAt(t *time.Time) *DeviceOnTimeDailyCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeviceOnTimeDailyCreate) SetNillableSort

func (dotdc *DeviceOnTimeDailyCreate) SetNillableSort(u *uint32) *DeviceOnTimeDailyCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOnTimeDailyCreate) SetNillableStatus

func (dotdc *DeviceOnTimeDailyCreate) SetNillableStatus(u *uint8) *DeviceOnTimeDailyCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOnTimeDailyCreate) SetNillableTime

func (dotdc *DeviceOnTimeDailyCreate) SetNillableTime(s *string) *DeviceOnTimeDailyCreate

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceOnTimeDailyCreate) SetNillableUpdatedAt

func (dotdc *DeviceOnTimeDailyCreate) SetNillableUpdatedAt(t *time.Time) *DeviceOnTimeDailyCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeviceOnTimeDailyCreate) SetNillableValue

func (dotdc *DeviceOnTimeDailyCreate) SetNillableValue(s *string) *DeviceOnTimeDailyCreate

SetNillableValue sets the "value" field if the given value is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilDeviceName

func (dotd *DeviceOnTimeDailyCreate) SetNotNilDeviceName(value *string) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilIotID

func (dotd *DeviceOnTimeDailyCreate) SetNotNilIotID(value *string) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilProductKey

func (dotd *DeviceOnTimeDailyCreate) SetNotNilProductKey(value *string) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilSort

func (dotd *DeviceOnTimeDailyCreate) SetNotNilSort(value *uint32) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilStatus

func (dotd *DeviceOnTimeDailyCreate) SetNotNilStatus(value *uint8) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilTime

func (dotd *DeviceOnTimeDailyCreate) SetNotNilTime(value *string) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilUpdatedAt

func (dotd *DeviceOnTimeDailyCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetNotNilValue

func (dotd *DeviceOnTimeDailyCreate) SetNotNilValue(value *string) *DeviceOnTimeDailyCreate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyCreate) SetProductKey

func (dotdc *DeviceOnTimeDailyCreate) SetProductKey(s string) *DeviceOnTimeDailyCreate

SetProductKey sets the "productKey" field.

func (*DeviceOnTimeDailyCreate) SetSort

SetSort sets the "sort" field.

func (*DeviceOnTimeDailyCreate) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnTimeDailyCreate) SetTime

SetTime sets the "time" field.

func (*DeviceOnTimeDailyCreate) SetUpdatedAt

func (dotdc *DeviceOnTimeDailyCreate) SetUpdatedAt(t time.Time) *DeviceOnTimeDailyCreate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnTimeDailyCreate) SetValue

SetValue sets the "value" field.

func (*DeviceOnTimeDailyCreate) TableName

type DeviceOnTimeDailyCreateBulk

type DeviceOnTimeDailyCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyCreateBulk is the builder for creating many DeviceOnTimeDaily entities in bulk.

func (*DeviceOnTimeDailyCreateBulk) Exec

Exec executes the query.

func (*DeviceOnTimeDailyCreateBulk) ExecContext

func (c *DeviceOnTimeDailyCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyCreateBulk) ExecX

func (dotdcb *DeviceOnTimeDailyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceOnTimeDaily.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceOnTimeDailyUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceOnTimeDailyCreateBulk) OnConflictColumns

func (dotdcb *DeviceOnTimeDailyCreateBulk) OnConflictColumns(columns ...string) *DeviceOnTimeDailyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceOnTimeDaily.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceOnTimeDailyCreateBulk) QueryContext

func (c *DeviceOnTimeDailyCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyCreateBulk) Save

Save creates the DeviceOnTimeDaily entities in the database.

func (*DeviceOnTimeDailyCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeviceOnTimeDailyDelete

type DeviceOnTimeDailyDelete struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyDelete is the builder for deleting a DeviceOnTimeDaily entity.

func (*DeviceOnTimeDailyDelete) Exec

func (dotdd *DeviceOnTimeDailyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceOnTimeDailyDelete) ExecContext

func (c *DeviceOnTimeDailyDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyDelete) ExecX

func (dotdd *DeviceOnTimeDailyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyDelete) QueryContext

func (c *DeviceOnTimeDailyDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyDelete) Where

Where appends a list predicates to the DeviceOnTimeDailyDelete builder.

type DeviceOnTimeDailyDeleteOne

type DeviceOnTimeDailyDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyDeleteOne is the builder for deleting a single DeviceOnTimeDaily entity.

func (*DeviceOnTimeDailyDeleteOne) Exec

func (dotddo *DeviceOnTimeDailyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeviceOnTimeDailyDeleteOne) ExecX

func (dotddo *DeviceOnTimeDailyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyDeleteOne) Where

Where appends a list predicates to the DeviceOnTimeDailyDelete builder.

type DeviceOnTimeDailyGroupBy

type DeviceOnTimeDailyGroupBy struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyGroupBy is the group-by builder for DeviceOnTimeDaily entities.

func (*DeviceOnTimeDailyGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceOnTimeDailyGroupBy) Bool

func (s *DeviceOnTimeDailyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) BoolX

func (s *DeviceOnTimeDailyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) Bools

func (s *DeviceOnTimeDailyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) BoolsX

func (s *DeviceOnTimeDailyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) Float64

func (s *DeviceOnTimeDailyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) Float64X

func (s *DeviceOnTimeDailyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) Float64s

func (s *DeviceOnTimeDailyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) Float64sX

func (s *DeviceOnTimeDailyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) Int

func (s *DeviceOnTimeDailyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) IntX

func (s *DeviceOnTimeDailyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) Ints

func (s *DeviceOnTimeDailyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) IntsX

func (s *DeviceOnTimeDailyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) Scan

func (dotdgb *DeviceOnTimeDailyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceOnTimeDailyGroupBy) ScanX

func (s *DeviceOnTimeDailyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) String

func (s *DeviceOnTimeDailyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) StringX

func (s *DeviceOnTimeDailyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceOnTimeDailyGroupBy) Strings

func (s *DeviceOnTimeDailyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailyGroupBy) StringsX

func (s *DeviceOnTimeDailyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceOnTimeDailyMutation

type DeviceOnTimeDailyMutation struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyMutation represents an operation that mutates the DeviceOnTimeDaily nodes in the graph.

func (*DeviceOnTimeDailyMutation) AddField

func (m *DeviceOnTimeDailyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceOnTimeDailyMutation) AddSort

func (m *DeviceOnTimeDailyMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceOnTimeDailyMutation) AddStatus

func (m *DeviceOnTimeDailyMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceOnTimeDailyMutation) AddedEdges

func (m *DeviceOnTimeDailyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceOnTimeDailyMutation) AddedField

func (m *DeviceOnTimeDailyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceOnTimeDailyMutation) AddedFields

func (m *DeviceOnTimeDailyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceOnTimeDailyMutation) AddedIDs

func (m *DeviceOnTimeDailyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceOnTimeDailyMutation) AddedSort

func (m *DeviceOnTimeDailyMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceOnTimeDailyMutation) AddedStatus

func (m *DeviceOnTimeDailyMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceOnTimeDailyMutation) ClearEdge

func (m *DeviceOnTimeDailyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceOnTimeDailyMutation) ClearField

func (m *DeviceOnTimeDailyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceOnTimeDailyMutation) ClearStatus

func (m *DeviceOnTimeDailyMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceOnTimeDailyMutation) ClearTime

func (m *DeviceOnTimeDailyMutation) ClearTime()

ClearTime clears the value of the "time" field.

func (*DeviceOnTimeDailyMutation) ClearValue

func (m *DeviceOnTimeDailyMutation) ClearValue()

ClearValue clears the value of the "value" field.

func (*DeviceOnTimeDailyMutation) ClearedEdges

func (m *DeviceOnTimeDailyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceOnTimeDailyMutation) ClearedFields

func (m *DeviceOnTimeDailyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceOnTimeDailyMutation) Client

func (m DeviceOnTimeDailyMutation) 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 (*DeviceOnTimeDailyMutation) CreatedAt

func (m *DeviceOnTimeDailyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceOnTimeDailyMutation) DeviceName

func (m *DeviceOnTimeDailyMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceOnTimeDailyMutation) EdgeCleared

func (m *DeviceOnTimeDailyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceOnTimeDailyMutation) ExecContext

func (c *DeviceOnTimeDailyMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyMutation) Field

func (m *DeviceOnTimeDailyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceOnTimeDailyMutation) FieldCleared

func (m *DeviceOnTimeDailyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceOnTimeDailyMutation) Fields

func (m *DeviceOnTimeDailyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceOnTimeDailyMutation) ID

func (m *DeviceOnTimeDailyMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceOnTimeDailyMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceOnTimeDailyMutation) IotID

func (m *DeviceOnTimeDailyMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceOnTimeDailyMutation) OldCreatedAt

func (m *DeviceOnTimeDailyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldDeviceName

func (m *DeviceOnTimeDailyMutation) OldDeviceName(ctx context.Context) (v string, err error)

OldDeviceName returns the old "deviceName" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldField

func (m *DeviceOnTimeDailyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceOnTimeDailyMutation) OldIotID

func (m *DeviceOnTimeDailyMutation) OldIotID(ctx context.Context) (v string, err error)

OldIotID returns the old "iotID" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldProductKey

func (m *DeviceOnTimeDailyMutation) OldProductKey(ctx context.Context) (v string, err error)

OldProductKey returns the old "productKey" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldSort

func (m *DeviceOnTimeDailyMutation) OldSort(ctx context.Context) (v uint32, err error)

OldSort returns the old "sort" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldStatus

func (m *DeviceOnTimeDailyMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldTime

func (m *DeviceOnTimeDailyMutation) OldTime(ctx context.Context) (v string, err error)

OldTime returns the old "time" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldUpdatedAt

func (m *DeviceOnTimeDailyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) OldValue

func (m *DeviceOnTimeDailyMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the DeviceOnTimeDaily entity. If the DeviceOnTimeDaily object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnTimeDailyMutation) Op

func (m *DeviceOnTimeDailyMutation) Op() Op

Op returns the operation name.

func (*DeviceOnTimeDailyMutation) ProductKey

func (m *DeviceOnTimeDailyMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceOnTimeDailyMutation) QueryContext

func (c *DeviceOnTimeDailyMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyMutation) RemovedEdges

func (m *DeviceOnTimeDailyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceOnTimeDailyMutation) RemovedIDs

func (m *DeviceOnTimeDailyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceOnTimeDailyMutation) ResetCreatedAt

func (m *DeviceOnTimeDailyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceOnTimeDailyMutation) ResetDeviceName

func (m *DeviceOnTimeDailyMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceOnTimeDailyMutation) ResetEdge

func (m *DeviceOnTimeDailyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceOnTimeDailyMutation) ResetField

func (m *DeviceOnTimeDailyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceOnTimeDailyMutation) ResetIotID

func (m *DeviceOnTimeDailyMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceOnTimeDailyMutation) ResetProductKey

func (m *DeviceOnTimeDailyMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceOnTimeDailyMutation) ResetSort

func (m *DeviceOnTimeDailyMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceOnTimeDailyMutation) ResetStatus

func (m *DeviceOnTimeDailyMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceOnTimeDailyMutation) ResetTime

func (m *DeviceOnTimeDailyMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*DeviceOnTimeDailyMutation) ResetUpdatedAt

func (m *DeviceOnTimeDailyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceOnTimeDailyMutation) ResetValue

func (m *DeviceOnTimeDailyMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*DeviceOnTimeDailyMutation) SetCreatedAt

func (m *DeviceOnTimeDailyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeviceOnTimeDailyMutation) SetDeviceName

func (m *DeviceOnTimeDailyMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceOnTimeDailyMutation) SetField

func (m *DeviceOnTimeDailyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceOnTimeDailyMutation) SetID

func (m *DeviceOnTimeDailyMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DeviceOnTimeDaily entities.

func (*DeviceOnTimeDailyMutation) SetIotID

func (m *DeviceOnTimeDailyMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceOnTimeDailyMutation) SetOp

func (m *DeviceOnTimeDailyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceOnTimeDailyMutation) SetProductKey

func (m *DeviceOnTimeDailyMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceOnTimeDailyMutation) SetSort

func (m *DeviceOnTimeDailyMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceOnTimeDailyMutation) SetStatus

func (m *DeviceOnTimeDailyMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceOnTimeDailyMutation) SetTime

func (m *DeviceOnTimeDailyMutation) SetTime(s string)

SetTime sets the "time" field.

func (*DeviceOnTimeDailyMutation) SetUpdatedAt

func (m *DeviceOnTimeDailyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnTimeDailyMutation) SetValue

func (m *DeviceOnTimeDailyMutation) SetValue(s string)

SetValue sets the "value" field.

func (*DeviceOnTimeDailyMutation) Sort

func (m *DeviceOnTimeDailyMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceOnTimeDailyMutation) Status

func (m *DeviceOnTimeDailyMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DeviceOnTimeDailyMutation) StatusCleared

func (m *DeviceOnTimeDailyMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*DeviceOnTimeDailyMutation) Time

func (m *DeviceOnTimeDailyMutation) Time() (r string, exists bool)

Time returns the value of the "time" field in the mutation.

func (*DeviceOnTimeDailyMutation) TimeCleared

func (m *DeviceOnTimeDailyMutation) TimeCleared() bool

TimeCleared returns if the "time" field was cleared in this mutation.

func (DeviceOnTimeDailyMutation) Tx

func (m DeviceOnTimeDailyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceOnTimeDailyMutation) Type

Type returns the node type of this mutation (DeviceOnTimeDaily).

func (*DeviceOnTimeDailyMutation) UpdatedAt

func (m *DeviceOnTimeDailyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceOnTimeDailyMutation) Value

func (m *DeviceOnTimeDailyMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*DeviceOnTimeDailyMutation) ValueCleared

func (m *DeviceOnTimeDailyMutation) ValueCleared() bool

ValueCleared returns if the "value" field was cleared in this mutation.

func (*DeviceOnTimeDailyMutation) Where

Where appends a list predicates to the DeviceOnTimeDailyMutation builder.

func (*DeviceOnTimeDailyMutation) WhereP

func (m *DeviceOnTimeDailyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceOnTimeDailyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceOnTimeDailyPageList

type DeviceOnTimeDailyPageList struct {
	List        []*DeviceOnTimeDaily `json:"list"`
	PageDetails *PageDetails         `json:"pageDetails"`
}

DeviceOnTimeDailyPageList is DeviceOnTimeDaily PageList result.

type DeviceOnTimeDailyPager

type DeviceOnTimeDailyPager struct {
	Order  deviceontimedaily.OrderOption
	Filter func(*DeviceOnTimeDailyQuery) (*DeviceOnTimeDailyQuery, error)
}

func (*DeviceOnTimeDailyPager) ApplyFilter

type DeviceOnTimeDailyPaginateOption

type DeviceOnTimeDailyPaginateOption func(*DeviceOnTimeDailyPager)

DeviceOnTimeDailyPaginateOption enables pagination customization.

type DeviceOnTimeDailyQuery

type DeviceOnTimeDailyQuery struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyQuery is the builder for querying DeviceOnTimeDaily entities.

func (*DeviceOnTimeDailyQuery) Aggregate

Aggregate returns a DeviceOnTimeDailySelect configured with the given aggregations.

func (*DeviceOnTimeDailyQuery) All

All executes the query and returns a list of DeviceOnTimeDailies.

func (*DeviceOnTimeDailyQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) Clone

Clone returns a duplicate of the DeviceOnTimeDailyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceOnTimeDailyQuery) Count

func (dotdq *DeviceOnTimeDailyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceOnTimeDailyQuery) CountX

func (dotdq *DeviceOnTimeDailyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) ExecContext

func (c *DeviceOnTimeDailyQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyQuery) Exist

func (dotdq *DeviceOnTimeDailyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceOnTimeDailyQuery) ExistX

func (dotdq *DeviceOnTimeDailyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) First

First returns the first DeviceOnTimeDaily entity from the query. Returns a *NotFoundError when no DeviceOnTimeDaily was found.

func (*DeviceOnTimeDailyQuery) FirstID

func (dotdq *DeviceOnTimeDailyQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first DeviceOnTimeDaily ID from the query. Returns a *NotFoundError when no DeviceOnTimeDaily ID was found.

func (*DeviceOnTimeDailyQuery) FirstIDX

func (dotdq *DeviceOnTimeDailyQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) GroupBy

func (dotdq *DeviceOnTimeDailyQuery) GroupBy(field string, fields ...string) *DeviceOnTimeDailyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceOnTimeDaily.Query().
	GroupBy(deviceontimedaily.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceOnTimeDailyQuery) IDs

func (dotdq *DeviceOnTimeDailyQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of DeviceOnTimeDaily IDs.

func (*DeviceOnTimeDailyQuery) IDsX

func (dotdq *DeviceOnTimeDailyQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) Limit

func (dotdq *DeviceOnTimeDailyQuery) Limit(limit int) *DeviceOnTimeDailyQuery

Limit the number of records to be returned by this query.

func (*DeviceOnTimeDailyQuery) Modify

func (dotdq *DeviceOnTimeDailyQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceOnTimeDailySelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DeviceOnTimeDailyQuery) Offset

func (dotdq *DeviceOnTimeDailyQuery) Offset(offset int) *DeviceOnTimeDailyQuery

Offset to start from.

func (*DeviceOnTimeDailyQuery) Only

Only returns a single DeviceOnTimeDaily entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceOnTimeDaily entity is found. Returns a *NotFoundError when no DeviceOnTimeDaily entities are found.

func (*DeviceOnTimeDailyQuery) OnlyID

func (dotdq *DeviceOnTimeDailyQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only DeviceOnTimeDaily ID in the query. Returns a *NotSingularError when more than one DeviceOnTimeDaily ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceOnTimeDailyQuery) OnlyIDX

func (dotdq *DeviceOnTimeDailyQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeviceOnTimeDailyQuery) Order

Order specifies how the records should be ordered.

func (*DeviceOnTimeDailyQuery) Page

func (*DeviceOnTimeDailyQuery) QueryContext

func (c *DeviceOnTimeDailyQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyQuery) Select

func (dotdq *DeviceOnTimeDailyQuery) Select(fields ...string) *DeviceOnTimeDailySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.DeviceOnTimeDaily.Query().
	Select(deviceontimedaily.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceOnTimeDailyQuery) Unique

func (dotdq *DeviceOnTimeDailyQuery) Unique(unique bool) *DeviceOnTimeDailyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceOnTimeDailyQuery) Where

Where adds a new predicate for the DeviceOnTimeDailyQuery builder.

type DeviceOnTimeDailySelect

type DeviceOnTimeDailySelect struct {
	*DeviceOnTimeDailyQuery
	// contains filtered or unexported fields
}

DeviceOnTimeDailySelect is the builder for selecting fields of DeviceOnTimeDaily entities.

func (*DeviceOnTimeDailySelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceOnTimeDailySelect) Bool

func (s *DeviceOnTimeDailySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) BoolX

func (s *DeviceOnTimeDailySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceOnTimeDailySelect) Bools

func (s *DeviceOnTimeDailySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) BoolsX

func (s *DeviceOnTimeDailySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeviceOnTimeDailySelect) ExecContext

func (c DeviceOnTimeDailySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailySelect) Float64

func (s *DeviceOnTimeDailySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) Float64X

func (s *DeviceOnTimeDailySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceOnTimeDailySelect) Float64s

func (s *DeviceOnTimeDailySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) Float64sX

func (s *DeviceOnTimeDailySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceOnTimeDailySelect) Int

func (s *DeviceOnTimeDailySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) IntX

func (s *DeviceOnTimeDailySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceOnTimeDailySelect) Ints

func (s *DeviceOnTimeDailySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) IntsX

func (s *DeviceOnTimeDailySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceOnTimeDailySelect) Modify

func (dotds *DeviceOnTimeDailySelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceOnTimeDailySelect

Modify adds a query modifier for attaching custom logic to queries.

func (DeviceOnTimeDailySelect) QueryContext

func (c DeviceOnTimeDailySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailySelect) Scan

func (dotds *DeviceOnTimeDailySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceOnTimeDailySelect) ScanX

func (s *DeviceOnTimeDailySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceOnTimeDailySelect) String

func (s *DeviceOnTimeDailySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) StringX

func (s *DeviceOnTimeDailySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceOnTimeDailySelect) Strings

func (s *DeviceOnTimeDailySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceOnTimeDailySelect) StringsX

func (s *DeviceOnTimeDailySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceOnTimeDailyUpdate

type DeviceOnTimeDailyUpdate struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyUpdate is the builder for updating DeviceOnTimeDaily entities.

func (*DeviceOnTimeDailyUpdate) AddSort

AddSort adds u to the "sort" field.

func (*DeviceOnTimeDailyUpdate) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceOnTimeDailyUpdate) ClearStatus

func (dotdu *DeviceOnTimeDailyUpdate) ClearStatus() *DeviceOnTimeDailyUpdate

ClearStatus clears the value of the "status" field.

func (*DeviceOnTimeDailyUpdate) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOnTimeDailyUpdate) ClearValue

func (dotdu *DeviceOnTimeDailyUpdate) ClearValue() *DeviceOnTimeDailyUpdate

ClearValue clears the value of the "value" field.

func (*DeviceOnTimeDailyUpdate) Exec

func (dotdu *DeviceOnTimeDailyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceOnTimeDailyUpdate) ExecContext

func (c *DeviceOnTimeDailyUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyUpdate) ExecX

func (dotdu *DeviceOnTimeDailyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyUpdate) Modify

func (dotdu *DeviceOnTimeDailyUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceOnTimeDailyUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceOnTimeDailyUpdate) Mutation

Mutation returns the DeviceOnTimeDailyMutation object of the builder.

func (*DeviceOnTimeDailyUpdate) QueryContext

func (c *DeviceOnTimeDailyUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyUpdate) Save

func (dotdu *DeviceOnTimeDailyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceOnTimeDailyUpdate) SaveX

func (dotdu *DeviceOnTimeDailyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceOnTimeDailyUpdate) SetDeviceName

func (dotdu *DeviceOnTimeDailyUpdate) SetDeviceName(s string) *DeviceOnTimeDailyUpdate

SetDeviceName sets the "deviceName" field.

func (*DeviceOnTimeDailyUpdate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnTimeDailyUpdate) SetNillableDeviceName

func (dotdu *DeviceOnTimeDailyUpdate) SetNillableDeviceName(s *string) *DeviceOnTimeDailyUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdate) SetNillableIotID

func (dotdu *DeviceOnTimeDailyUpdate) SetNillableIotID(s *string) *DeviceOnTimeDailyUpdate

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdate) SetNillableProductKey

func (dotdu *DeviceOnTimeDailyUpdate) SetNillableProductKey(s *string) *DeviceOnTimeDailyUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdate) SetNillableSort

func (dotdu *DeviceOnTimeDailyUpdate) SetNillableSort(u *uint32) *DeviceOnTimeDailyUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdate) SetNillableStatus

func (dotdu *DeviceOnTimeDailyUpdate) SetNillableStatus(u *uint8) *DeviceOnTimeDailyUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdate) SetNillableTime

func (dotdu *DeviceOnTimeDailyUpdate) SetNillableTime(s *string) *DeviceOnTimeDailyUpdate

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdate) SetNillableValue

func (dotdu *DeviceOnTimeDailyUpdate) SetNillableValue(s *string) *DeviceOnTimeDailyUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilDeviceName

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilDeviceName(value *string) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilIotID

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilIotID(value *string) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilProductKey

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilProductKey(value *string) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilSort

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilSort(value *uint32) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilStatus

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilStatus(value *uint8) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilTime

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilTime(value *string) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilUpdatedAt

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetNotNilValue

func (dotd *DeviceOnTimeDailyUpdate) SetNotNilValue(value *string) *DeviceOnTimeDailyUpdate

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdate) SetProductKey

func (dotdu *DeviceOnTimeDailyUpdate) SetProductKey(s string) *DeviceOnTimeDailyUpdate

SetProductKey sets the "productKey" field.

func (*DeviceOnTimeDailyUpdate) SetSort

SetSort sets the "sort" field.

func (*DeviceOnTimeDailyUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnTimeDailyUpdate) SetTime

SetTime sets the "time" field.

func (*DeviceOnTimeDailyUpdate) SetUpdatedAt

func (dotdu *DeviceOnTimeDailyUpdate) SetUpdatedAt(t time.Time) *DeviceOnTimeDailyUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnTimeDailyUpdate) SetValue

SetValue sets the "value" field.

func (*DeviceOnTimeDailyUpdate) Where

Where appends a list predicates to the DeviceOnTimeDailyUpdate builder.

type DeviceOnTimeDailyUpdateOne

type DeviceOnTimeDailyUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyUpdateOne is the builder for updating a single DeviceOnTimeDaily entity.

func (*DeviceOnTimeDailyUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceOnTimeDailyUpdateOne) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceOnTimeDailyUpdateOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnTimeDailyUpdateOne) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOnTimeDailyUpdateOne) ClearValue

ClearValue clears the value of the "value" field.

func (*DeviceOnTimeDailyUpdateOne) Exec

func (dotduo *DeviceOnTimeDailyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeviceOnTimeDailyUpdateOne) ExecContext

func (c *DeviceOnTimeDailyUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnTimeDailyUpdateOne) ExecX

func (dotduo *DeviceOnTimeDailyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyUpdateOne) Modify

func (dotduo *DeviceOnTimeDailyUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceOnTimeDailyUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceOnTimeDailyUpdateOne) Mutation

Mutation returns the DeviceOnTimeDailyMutation object of the builder.

func (*DeviceOnTimeDailyUpdateOne) QueryContext

func (c *DeviceOnTimeDailyUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnTimeDailyUpdateOne) Save

Save executes the query and returns the updated DeviceOnTimeDaily entity.

func (*DeviceOnTimeDailyUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeviceOnTimeDailyUpdateOne) Select

func (dotduo *DeviceOnTimeDailyUpdateOne) Select(field string, fields ...string) *DeviceOnTimeDailyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceOnTimeDailyUpdateOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnTimeDailyUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnTimeDailyUpdateOne) SetNillableDeviceName

func (dotduo *DeviceOnTimeDailyUpdateOne) SetNillableDeviceName(s *string) *DeviceOnTimeDailyUpdateOne

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNillableIotID

func (dotduo *DeviceOnTimeDailyUpdateOne) SetNillableIotID(s *string) *DeviceOnTimeDailyUpdateOne

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNillableProductKey

func (dotduo *DeviceOnTimeDailyUpdateOne) SetNillableProductKey(s *string) *DeviceOnTimeDailyUpdateOne

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNillableSort

func (dotduo *DeviceOnTimeDailyUpdateOne) SetNillableSort(u *uint32) *DeviceOnTimeDailyUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNillableStatus

func (dotduo *DeviceOnTimeDailyUpdateOne) SetNillableStatus(u *uint8) *DeviceOnTimeDailyUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNillableTime

func (dotduo *DeviceOnTimeDailyUpdateOne) SetNillableTime(s *string) *DeviceOnTimeDailyUpdateOne

SetNillableTime sets the "time" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNillableValue

func (dotduo *DeviceOnTimeDailyUpdateOne) SetNillableValue(s *string) *DeviceOnTimeDailyUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilDeviceName

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilDeviceName(value *string) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilIotID

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilIotID(value *string) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilProductKey

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilProductKey(value *string) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilSort

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilSort(value *uint32) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilStatus

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilStatus(value *uint8) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilTime

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilTime(value *string) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilUpdatedAt

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetNotNilValue

func (dotd *DeviceOnTimeDailyUpdateOne) SetNotNilValue(value *string) *DeviceOnTimeDailyUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnTimeDailyUpdateOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnTimeDailyUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceOnTimeDailyUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnTimeDailyUpdateOne) SetTime

SetTime sets the "time" field.

func (*DeviceOnTimeDailyUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnTimeDailyUpdateOne) SetValue

SetValue sets the "value" field.

func (*DeviceOnTimeDailyUpdateOne) Where

Where appends a list predicates to the DeviceOnTimeDailyUpdate builder.

type DeviceOnTimeDailyUpsert

type DeviceOnTimeDailyUpsert struct {
	*sql.UpdateSet
}

DeviceOnTimeDailyUpsert is the "OnConflict" setter.

func (*DeviceOnTimeDailyUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOnTimeDailyUpsert) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOnTimeDailyUpsert) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnTimeDailyUpsert) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOnTimeDailyUpsert) ClearValue

ClearValue clears the value of the "value" field.

func (*DeviceOnTimeDailyUpsert) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnTimeDailyUpsert) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnTimeDailyUpsert) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnTimeDailyUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceOnTimeDailyUpsert) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnTimeDailyUpsert) SetTime

SetTime sets the "time" field.

func (*DeviceOnTimeDailyUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnTimeDailyUpsert) SetValue

SetValue sets the "value" field.

func (*DeviceOnTimeDailyUpsert) UpdateDeviceName

func (u *DeviceOnTimeDailyUpsert) UpdateDeviceName() *DeviceOnTimeDailyUpsert

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsert) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsert) UpdateProductKey

func (u *DeviceOnTimeDailyUpsert) UpdateProductKey() *DeviceOnTimeDailyUpsert

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsert) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsert) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsert) UpdateTime

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsert) UpdateUpdatedAt

func (u *DeviceOnTimeDailyUpsert) UpdateUpdatedAt() *DeviceOnTimeDailyUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsert) UpdateValue

UpdateValue sets the "value" field to the value that was provided on create.

type DeviceOnTimeDailyUpsertBulk

type DeviceOnTimeDailyUpsertBulk struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyUpsertBulk is the builder for "upsert"-ing a bulk of DeviceOnTimeDaily nodes.

func (*DeviceOnTimeDailyUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOnTimeDailyUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOnTimeDailyUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnTimeDailyUpsertBulk) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOnTimeDailyUpsertBulk) ClearValue

ClearValue clears the value of the "value" field.

func (*DeviceOnTimeDailyUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceOnTimeDailyUpsertBulk) Exec

Exec executes the query.

func (*DeviceOnTimeDailyUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceOnTimeDaily.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeviceOnTimeDailyUpsertBulk) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnTimeDailyUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnTimeDailyUpsertBulk) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnTimeDailyUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceOnTimeDailyUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnTimeDailyUpsertBulk) SetTime

SetTime sets the "time" field.

func (*DeviceOnTimeDailyUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnTimeDailyUpsertBulk) SetValue

SetValue sets the "value" field.

func (*DeviceOnTimeDailyUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeviceOnTimeDailyCreateBulk.OnConflict documentation for more info.

func (*DeviceOnTimeDailyUpsertBulk) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertBulk) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DeviceOnTimeDaily.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceontimedaily.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceOnTimeDailyUpsertBulk) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertBulk) UpdateTime

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertBulk) UpdateValue

UpdateValue sets the "value" field to the value that was provided on create.

type DeviceOnTimeDailyUpsertOne

type DeviceOnTimeDailyUpsertOne struct {
	// contains filtered or unexported fields
}

DeviceOnTimeDailyUpsertOne is the builder for "upsert"-ing

one DeviceOnTimeDaily node.

func (*DeviceOnTimeDailyUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOnTimeDailyUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOnTimeDailyUpsertOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnTimeDailyUpsertOne) ClearTime

ClearTime clears the value of the "time" field.

func (*DeviceOnTimeDailyUpsertOne) ClearValue

ClearValue clears the value of the "value" field.

func (*DeviceOnTimeDailyUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceOnTimeDailyUpsertOne) Exec

Exec executes the query.

func (*DeviceOnTimeDailyUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnTimeDailyUpsertOne) ID

func (u *DeviceOnTimeDailyUpsertOne) ID(ctx context.Context) (id uint64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceOnTimeDailyUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceOnTimeDailyUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceOnTimeDaily.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceOnTimeDailyUpsertOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnTimeDailyUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnTimeDailyUpsertOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnTimeDailyUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceOnTimeDailyUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnTimeDailyUpsertOne) SetTime

SetTime sets the "time" field.

func (*DeviceOnTimeDailyUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnTimeDailyUpsertOne) SetValue

SetValue sets the "value" field.

func (*DeviceOnTimeDailyUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeviceOnTimeDailyCreate.OnConflict documentation for more info.

func (*DeviceOnTimeDailyUpsertOne) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertOne) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceOnTimeDaily.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceontimedaily.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceOnTimeDailyUpsertOne) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertOne) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertOne) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertOne) UpdateTime

UpdateTime sets the "time" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*DeviceOnTimeDailyUpsertOne) UpdateValue

UpdateValue sets the "value" field to the value that was provided on create.

type DeviceOnlineTime

type DeviceOnlineTime struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// GMT Online | GMT最近一次上线的时间
	GmtOnline string `json:"gmtOnline,omitempty"`
	// contains filtered or unexported fields
}

DeviceOnlineTime is the model entity for the DeviceOnlineTime schema.

func (*DeviceOnlineTime) ExecContext

func (c *DeviceOnlineTime) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTime) QueryContext

func (c *DeviceOnlineTime) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTime) String

func (dot *DeviceOnlineTime) String() string

String implements the fmt.Stringer.

func (*DeviceOnlineTime) Unwrap

func (dot *DeviceOnlineTime) Unwrap() *DeviceOnlineTime

Unwrap unwraps the DeviceOnlineTime entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceOnlineTime) Update

Update returns a builder for updating this DeviceOnlineTime. Note that you need to call DeviceOnlineTime.Unwrap() before calling this method if this DeviceOnlineTime was returned from a transaction, and the transaction was committed or rolled back.

func (*DeviceOnlineTime) Value

func (dot *DeviceOnlineTime) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DeviceOnlineTime. This includes values selected through modifiers, order, etc.

type DeviceOnlineTimeClient

type DeviceOnlineTimeClient struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeClient is a client for the DeviceOnlineTime schema.

func NewDeviceOnlineTimeClient

func NewDeviceOnlineTimeClient(c config) *DeviceOnlineTimeClient

NewDeviceOnlineTimeClient returns a client for the DeviceOnlineTime from the given config.

func (*DeviceOnlineTimeClient) Create

Create returns a builder for creating a DeviceOnlineTime entity.

func (*DeviceOnlineTimeClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeviceOnlineTime entities.

func (*DeviceOnlineTimeClient) Delete

Delete returns a delete builder for DeviceOnlineTime.

func (*DeviceOnlineTimeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceOnlineTimeClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceOnlineTimeClient) ExecContext

func (c *DeviceOnlineTimeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeClient) Get

Get returns a DeviceOnlineTime entity by its id.

func (*DeviceOnlineTimeClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeviceOnlineTimeClient) Hooks

func (c *DeviceOnlineTimeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceOnlineTimeClient) Intercept

func (c *DeviceOnlineTimeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deviceonlinetime.Intercept(f(g(h())))`.

func (*DeviceOnlineTimeClient) Interceptors

func (c *DeviceOnlineTimeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceOnlineTimeClient) MapCreateBulk

func (c *DeviceOnlineTimeClient) MapCreateBulk(slice any, setFunc func(*DeviceOnlineTimeCreate, int)) *DeviceOnlineTimeCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DeviceOnlineTimeClient) Query

Query returns a query builder for DeviceOnlineTime.

func (*DeviceOnlineTimeClient) QueryContext

func (c *DeviceOnlineTimeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeClient) Update

Update returns an update builder for DeviceOnlineTime.

func (*DeviceOnlineTimeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceOnlineTimeClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeviceOnlineTimeClient) Use

func (c *DeviceOnlineTimeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deviceonlinetime.Hooks(f(g(h())))`.

type DeviceOnlineTimeCreate

type DeviceOnlineTimeCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceOnlineTimeCreate is the builder for creating a DeviceOnlineTime entity.

func (*DeviceOnlineTimeCreate) Exec

func (dotc *DeviceOnlineTimeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceOnlineTimeCreate) ExecContext

func (c *DeviceOnlineTimeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeCreate) ExecX

func (dotc *DeviceOnlineTimeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeCreate) Mutation

Mutation returns the DeviceOnlineTimeMutation object of the builder.

func (*DeviceOnlineTimeCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceOnlineTime.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceOnlineTimeUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceOnlineTimeCreate) OnConflictColumns

func (dotc *DeviceOnlineTimeCreate) OnConflictColumns(columns ...string) *DeviceOnlineTimeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceOnlineTime.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceOnlineTimeCreate) QueryContext

func (c *DeviceOnlineTimeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeCreate) Save

Save creates the DeviceOnlineTime in the database.

func (*DeviceOnlineTimeCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceOnlineTimeCreate) SetCreatedAt

func (dotc *DeviceOnlineTimeCreate) SetCreatedAt(t time.Time) *DeviceOnlineTimeCreate

SetCreatedAt sets the "created_at" field.

func (*DeviceOnlineTimeCreate) SetDeviceName

func (dotc *DeviceOnlineTimeCreate) SetDeviceName(s string) *DeviceOnlineTimeCreate

SetDeviceName sets the "deviceName" field.

func (*DeviceOnlineTimeCreate) SetGmtOnline

func (dotc *DeviceOnlineTimeCreate) SetGmtOnline(s string) *DeviceOnlineTimeCreate

SetGmtOnline sets the "gmtOnline" field.

func (*DeviceOnlineTimeCreate) SetID

SetID sets the "id" field.

func (*DeviceOnlineTimeCreate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnlineTimeCreate) SetNillableCreatedAt

func (dotc *DeviceOnlineTimeCreate) SetNillableCreatedAt(t *time.Time) *DeviceOnlineTimeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeviceOnlineTimeCreate) SetNillableGmtOnline

func (dotc *DeviceOnlineTimeCreate) SetNillableGmtOnline(s *string) *DeviceOnlineTimeCreate

SetNillableGmtOnline sets the "gmtOnline" field if the given value is not nil.

func (*DeviceOnlineTimeCreate) SetNillableSort

func (dotc *DeviceOnlineTimeCreate) SetNillableSort(u *uint32) *DeviceOnlineTimeCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOnlineTimeCreate) SetNillableStatus

func (dotc *DeviceOnlineTimeCreate) SetNillableStatus(u *uint8) *DeviceOnlineTimeCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOnlineTimeCreate) SetNillableUpdatedAt

func (dotc *DeviceOnlineTimeCreate) SetNillableUpdatedAt(t *time.Time) *DeviceOnlineTimeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeviceOnlineTimeCreate) SetNotNilDeviceName

func (dot *DeviceOnlineTimeCreate) SetNotNilDeviceName(value *string) *DeviceOnlineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeCreate) SetNotNilGmtOnline

func (dot *DeviceOnlineTimeCreate) SetNotNilGmtOnline(value *string) *DeviceOnlineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeCreate) SetNotNilIotID

func (dot *DeviceOnlineTimeCreate) SetNotNilIotID(value *string) *DeviceOnlineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeCreate) SetNotNilProductKey

func (dot *DeviceOnlineTimeCreate) SetNotNilProductKey(value *string) *DeviceOnlineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeCreate) SetNotNilSort

func (dot *DeviceOnlineTimeCreate) SetNotNilSort(value *uint32) *DeviceOnlineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeCreate) SetNotNilStatus

func (dot *DeviceOnlineTimeCreate) SetNotNilStatus(value *uint8) *DeviceOnlineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeCreate) SetNotNilUpdatedAt

func (dot *DeviceOnlineTimeCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceOnlineTimeCreate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeCreate) SetProductKey

func (dotc *DeviceOnlineTimeCreate) SetProductKey(s string) *DeviceOnlineTimeCreate

SetProductKey sets the "productKey" field.

func (*DeviceOnlineTimeCreate) SetSort

SetSort sets the "sort" field.

func (*DeviceOnlineTimeCreate) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnlineTimeCreate) SetUpdatedAt

func (dotc *DeviceOnlineTimeCreate) SetUpdatedAt(t time.Time) *DeviceOnlineTimeCreate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnlineTimeCreate) TableName

type DeviceOnlineTimeCreateBulk

type DeviceOnlineTimeCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeCreateBulk is the builder for creating many DeviceOnlineTime entities in bulk.

func (*DeviceOnlineTimeCreateBulk) Exec

Exec executes the query.

func (*DeviceOnlineTimeCreateBulk) ExecContext

func (c *DeviceOnlineTimeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeCreateBulk) ExecX

func (dotcb *DeviceOnlineTimeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceOnlineTime.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceOnlineTimeUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceOnlineTimeCreateBulk) OnConflictColumns

func (dotcb *DeviceOnlineTimeCreateBulk) OnConflictColumns(columns ...string) *DeviceOnlineTimeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceOnlineTime.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceOnlineTimeCreateBulk) QueryContext

func (c *DeviceOnlineTimeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeCreateBulk) Save

Save creates the DeviceOnlineTime entities in the database.

func (*DeviceOnlineTimeCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeviceOnlineTimeDelete

type DeviceOnlineTimeDelete struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeDelete is the builder for deleting a DeviceOnlineTime entity.

func (*DeviceOnlineTimeDelete) Exec

func (dotd *DeviceOnlineTimeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceOnlineTimeDelete) ExecContext

func (c *DeviceOnlineTimeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeDelete) ExecX

func (dotd *DeviceOnlineTimeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeDelete) QueryContext

func (c *DeviceOnlineTimeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeDelete) Where

Where appends a list predicates to the DeviceOnlineTimeDelete builder.

type DeviceOnlineTimeDeleteOne

type DeviceOnlineTimeDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeDeleteOne is the builder for deleting a single DeviceOnlineTime entity.

func (*DeviceOnlineTimeDeleteOne) Exec

Exec executes the deletion query.

func (*DeviceOnlineTimeDeleteOne) ExecX

func (dotdo *DeviceOnlineTimeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeDeleteOne) Where

Where appends a list predicates to the DeviceOnlineTimeDelete builder.

type DeviceOnlineTimeGroupBy

type DeviceOnlineTimeGroupBy struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeGroupBy is the group-by builder for DeviceOnlineTime entities.

func (*DeviceOnlineTimeGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceOnlineTimeGroupBy) Bool

func (s *DeviceOnlineTimeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) BoolX

func (s *DeviceOnlineTimeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) Bools

func (s *DeviceOnlineTimeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) BoolsX

func (s *DeviceOnlineTimeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) Float64

func (s *DeviceOnlineTimeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) Float64X

func (s *DeviceOnlineTimeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) Float64s

func (s *DeviceOnlineTimeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) Float64sX

func (s *DeviceOnlineTimeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) Int

func (s *DeviceOnlineTimeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) IntX

func (s *DeviceOnlineTimeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) Ints

func (s *DeviceOnlineTimeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) IntsX

func (s *DeviceOnlineTimeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) Scan

func (dotgb *DeviceOnlineTimeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceOnlineTimeGroupBy) ScanX

func (s *DeviceOnlineTimeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) String

func (s *DeviceOnlineTimeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) StringX

func (s *DeviceOnlineTimeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceOnlineTimeGroupBy) Strings

func (s *DeviceOnlineTimeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeGroupBy) StringsX

func (s *DeviceOnlineTimeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceOnlineTimeMutation

type DeviceOnlineTimeMutation struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeMutation represents an operation that mutates the DeviceOnlineTime nodes in the graph.

func (*DeviceOnlineTimeMutation) AddField

func (m *DeviceOnlineTimeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceOnlineTimeMutation) AddSort

func (m *DeviceOnlineTimeMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceOnlineTimeMutation) AddStatus

func (m *DeviceOnlineTimeMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceOnlineTimeMutation) AddedEdges

func (m *DeviceOnlineTimeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceOnlineTimeMutation) AddedField

func (m *DeviceOnlineTimeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceOnlineTimeMutation) AddedFields

func (m *DeviceOnlineTimeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceOnlineTimeMutation) AddedIDs

func (m *DeviceOnlineTimeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceOnlineTimeMutation) AddedSort

func (m *DeviceOnlineTimeMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceOnlineTimeMutation) AddedStatus

func (m *DeviceOnlineTimeMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceOnlineTimeMutation) ClearEdge

func (m *DeviceOnlineTimeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceOnlineTimeMutation) ClearField

func (m *DeviceOnlineTimeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceOnlineTimeMutation) ClearGmtOnline

func (m *DeviceOnlineTimeMutation) ClearGmtOnline()

ClearGmtOnline clears the value of the "gmtOnline" field.

func (*DeviceOnlineTimeMutation) ClearStatus

func (m *DeviceOnlineTimeMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceOnlineTimeMutation) ClearedEdges

func (m *DeviceOnlineTimeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceOnlineTimeMutation) ClearedFields

func (m *DeviceOnlineTimeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceOnlineTimeMutation) Client

func (m DeviceOnlineTimeMutation) 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 (*DeviceOnlineTimeMutation) CreatedAt

func (m *DeviceOnlineTimeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceOnlineTimeMutation) DeviceName

func (m *DeviceOnlineTimeMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceOnlineTimeMutation) EdgeCleared

func (m *DeviceOnlineTimeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceOnlineTimeMutation) ExecContext

func (c *DeviceOnlineTimeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeMutation) Field

func (m *DeviceOnlineTimeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceOnlineTimeMutation) FieldCleared

func (m *DeviceOnlineTimeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceOnlineTimeMutation) Fields

func (m *DeviceOnlineTimeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceOnlineTimeMutation) GmtOnline

func (m *DeviceOnlineTimeMutation) GmtOnline() (r string, exists bool)

GmtOnline returns the value of the "gmtOnline" field in the mutation.

func (*DeviceOnlineTimeMutation) GmtOnlineCleared

func (m *DeviceOnlineTimeMutation) GmtOnlineCleared() bool

GmtOnlineCleared returns if the "gmtOnline" field was cleared in this mutation.

func (*DeviceOnlineTimeMutation) ID

func (m *DeviceOnlineTimeMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceOnlineTimeMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceOnlineTimeMutation) IotID

func (m *DeviceOnlineTimeMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceOnlineTimeMutation) OldCreatedAt

func (m *DeviceOnlineTimeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) OldDeviceName

func (m *DeviceOnlineTimeMutation) OldDeviceName(ctx context.Context) (v string, err error)

OldDeviceName returns the old "deviceName" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) OldField

func (m *DeviceOnlineTimeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceOnlineTimeMutation) OldGmtOnline

func (m *DeviceOnlineTimeMutation) OldGmtOnline(ctx context.Context) (v string, err error)

OldGmtOnline returns the old "gmtOnline" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) OldIotID

func (m *DeviceOnlineTimeMutation) OldIotID(ctx context.Context) (v string, err error)

OldIotID returns the old "iotID" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) OldProductKey

func (m *DeviceOnlineTimeMutation) OldProductKey(ctx context.Context) (v string, err error)

OldProductKey returns the old "productKey" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) OldSort

func (m *DeviceOnlineTimeMutation) OldSort(ctx context.Context) (v uint32, err error)

OldSort returns the old "sort" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) OldStatus

func (m *DeviceOnlineTimeMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) OldUpdatedAt

func (m *DeviceOnlineTimeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeviceOnlineTime entity. If the DeviceOnlineTime object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceOnlineTimeMutation) Op

func (m *DeviceOnlineTimeMutation) Op() Op

Op returns the operation name.

func (*DeviceOnlineTimeMutation) ProductKey

func (m *DeviceOnlineTimeMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceOnlineTimeMutation) QueryContext

func (c *DeviceOnlineTimeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeMutation) RemovedEdges

func (m *DeviceOnlineTimeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceOnlineTimeMutation) RemovedIDs

func (m *DeviceOnlineTimeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceOnlineTimeMutation) ResetCreatedAt

func (m *DeviceOnlineTimeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceOnlineTimeMutation) ResetDeviceName

func (m *DeviceOnlineTimeMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceOnlineTimeMutation) ResetEdge

func (m *DeviceOnlineTimeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceOnlineTimeMutation) ResetField

func (m *DeviceOnlineTimeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceOnlineTimeMutation) ResetGmtOnline

func (m *DeviceOnlineTimeMutation) ResetGmtOnline()

ResetGmtOnline resets all changes to the "gmtOnline" field.

func (*DeviceOnlineTimeMutation) ResetIotID

func (m *DeviceOnlineTimeMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceOnlineTimeMutation) ResetProductKey

func (m *DeviceOnlineTimeMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceOnlineTimeMutation) ResetSort

func (m *DeviceOnlineTimeMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceOnlineTimeMutation) ResetStatus

func (m *DeviceOnlineTimeMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceOnlineTimeMutation) ResetUpdatedAt

func (m *DeviceOnlineTimeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceOnlineTimeMutation) SetCreatedAt

func (m *DeviceOnlineTimeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeviceOnlineTimeMutation) SetDeviceName

func (m *DeviceOnlineTimeMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceOnlineTimeMutation) SetField

func (m *DeviceOnlineTimeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceOnlineTimeMutation) SetGmtOnline

func (m *DeviceOnlineTimeMutation) SetGmtOnline(s string)

SetGmtOnline sets the "gmtOnline" field.

func (*DeviceOnlineTimeMutation) SetID

func (m *DeviceOnlineTimeMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DeviceOnlineTime entities.

func (*DeviceOnlineTimeMutation) SetIotID

func (m *DeviceOnlineTimeMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceOnlineTimeMutation) SetOp

func (m *DeviceOnlineTimeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceOnlineTimeMutation) SetProductKey

func (m *DeviceOnlineTimeMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceOnlineTimeMutation) SetSort

func (m *DeviceOnlineTimeMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceOnlineTimeMutation) SetStatus

func (m *DeviceOnlineTimeMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceOnlineTimeMutation) SetUpdatedAt

func (m *DeviceOnlineTimeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnlineTimeMutation) Sort

func (m *DeviceOnlineTimeMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceOnlineTimeMutation) Status

func (m *DeviceOnlineTimeMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DeviceOnlineTimeMutation) StatusCleared

func (m *DeviceOnlineTimeMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (DeviceOnlineTimeMutation) Tx

func (m DeviceOnlineTimeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceOnlineTimeMutation) Type

func (m *DeviceOnlineTimeMutation) Type() string

Type returns the node type of this mutation (DeviceOnlineTime).

func (*DeviceOnlineTimeMutation) UpdatedAt

func (m *DeviceOnlineTimeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceOnlineTimeMutation) Where

Where appends a list predicates to the DeviceOnlineTimeMutation builder.

func (*DeviceOnlineTimeMutation) WhereP

func (m *DeviceOnlineTimeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceOnlineTimeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceOnlineTimePageList

type DeviceOnlineTimePageList struct {
	List        []*DeviceOnlineTime `json:"list"`
	PageDetails *PageDetails        `json:"pageDetails"`
}

DeviceOnlineTimePageList is DeviceOnlineTime PageList result.

type DeviceOnlineTimePager

type DeviceOnlineTimePager struct {
	Order  deviceonlinetime.OrderOption
	Filter func(*DeviceOnlineTimeQuery) (*DeviceOnlineTimeQuery, error)
}

func (*DeviceOnlineTimePager) ApplyFilter

type DeviceOnlineTimePaginateOption

type DeviceOnlineTimePaginateOption func(*DeviceOnlineTimePager)

DeviceOnlineTimePaginateOption enables pagination customization.

type DeviceOnlineTimeQuery

type DeviceOnlineTimeQuery struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeQuery is the builder for querying DeviceOnlineTime entities.

func (*DeviceOnlineTimeQuery) Aggregate

Aggregate returns a DeviceOnlineTimeSelect configured with the given aggregations.

func (*DeviceOnlineTimeQuery) All

All executes the query and returns a list of DeviceOnlineTimes.

func (*DeviceOnlineTimeQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) Clone

Clone returns a duplicate of the DeviceOnlineTimeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceOnlineTimeQuery) Count

func (dotq *DeviceOnlineTimeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceOnlineTimeQuery) CountX

func (dotq *DeviceOnlineTimeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) ExecContext

func (c *DeviceOnlineTimeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeQuery) Exist

func (dotq *DeviceOnlineTimeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceOnlineTimeQuery) ExistX

func (dotq *DeviceOnlineTimeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) First

First returns the first DeviceOnlineTime entity from the query. Returns a *NotFoundError when no DeviceOnlineTime was found.

func (*DeviceOnlineTimeQuery) FirstID

func (dotq *DeviceOnlineTimeQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first DeviceOnlineTime ID from the query. Returns a *NotFoundError when no DeviceOnlineTime ID was found.

func (*DeviceOnlineTimeQuery) FirstIDX

func (dotq *DeviceOnlineTimeQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) GroupBy

func (dotq *DeviceOnlineTimeQuery) GroupBy(field string, fields ...string) *DeviceOnlineTimeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceOnlineTime.Query().
	GroupBy(deviceonlinetime.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceOnlineTimeQuery) IDs

func (dotq *DeviceOnlineTimeQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of DeviceOnlineTime IDs.

func (*DeviceOnlineTimeQuery) IDsX

func (dotq *DeviceOnlineTimeQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) Limit

func (dotq *DeviceOnlineTimeQuery) Limit(limit int) *DeviceOnlineTimeQuery

Limit the number of records to be returned by this query.

func (*DeviceOnlineTimeQuery) Modify

func (dotq *DeviceOnlineTimeQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceOnlineTimeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DeviceOnlineTimeQuery) Offset

func (dotq *DeviceOnlineTimeQuery) Offset(offset int) *DeviceOnlineTimeQuery

Offset to start from.

func (*DeviceOnlineTimeQuery) Only

Only returns a single DeviceOnlineTime entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceOnlineTime entity is found. Returns a *NotFoundError when no DeviceOnlineTime entities are found.

func (*DeviceOnlineTimeQuery) OnlyID

func (dotq *DeviceOnlineTimeQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only DeviceOnlineTime ID in the query. Returns a *NotSingularError when more than one DeviceOnlineTime ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceOnlineTimeQuery) OnlyIDX

func (dotq *DeviceOnlineTimeQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeviceOnlineTimeQuery) Order

Order specifies how the records should be ordered.

func (*DeviceOnlineTimeQuery) Page

func (*DeviceOnlineTimeQuery) QueryContext

func (c *DeviceOnlineTimeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeQuery) Select

func (dotq *DeviceOnlineTimeQuery) Select(fields ...string) *DeviceOnlineTimeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.DeviceOnlineTime.Query().
	Select(deviceonlinetime.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceOnlineTimeQuery) Unique

func (dotq *DeviceOnlineTimeQuery) Unique(unique bool) *DeviceOnlineTimeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceOnlineTimeQuery) Where

Where adds a new predicate for the DeviceOnlineTimeQuery builder.

type DeviceOnlineTimeSelect

type DeviceOnlineTimeSelect struct {
	*DeviceOnlineTimeQuery
	// contains filtered or unexported fields
}

DeviceOnlineTimeSelect is the builder for selecting fields of DeviceOnlineTime entities.

func (*DeviceOnlineTimeSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceOnlineTimeSelect) Bool

func (s *DeviceOnlineTimeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) BoolX

func (s *DeviceOnlineTimeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceOnlineTimeSelect) Bools

func (s *DeviceOnlineTimeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) BoolsX

func (s *DeviceOnlineTimeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeviceOnlineTimeSelect) ExecContext

func (c DeviceOnlineTimeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeSelect) Float64

func (s *DeviceOnlineTimeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) Float64X

func (s *DeviceOnlineTimeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceOnlineTimeSelect) Float64s

func (s *DeviceOnlineTimeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) Float64sX

func (s *DeviceOnlineTimeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceOnlineTimeSelect) Int

func (s *DeviceOnlineTimeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) IntX

func (s *DeviceOnlineTimeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceOnlineTimeSelect) Ints

func (s *DeviceOnlineTimeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) IntsX

func (s *DeviceOnlineTimeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceOnlineTimeSelect) Modify

func (dots *DeviceOnlineTimeSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceOnlineTimeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (DeviceOnlineTimeSelect) QueryContext

func (c DeviceOnlineTimeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeSelect) Scan

func (dots *DeviceOnlineTimeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceOnlineTimeSelect) ScanX

func (s *DeviceOnlineTimeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceOnlineTimeSelect) String

func (s *DeviceOnlineTimeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) StringX

func (s *DeviceOnlineTimeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceOnlineTimeSelect) Strings

func (s *DeviceOnlineTimeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceOnlineTimeSelect) StringsX

func (s *DeviceOnlineTimeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceOnlineTimeUpdate

type DeviceOnlineTimeUpdate struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeUpdate is the builder for updating DeviceOnlineTime entities.

func (*DeviceOnlineTimeUpdate) AddSort

AddSort adds u to the "sort" field.

func (*DeviceOnlineTimeUpdate) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceOnlineTimeUpdate) ClearGmtOnline

func (dotu *DeviceOnlineTimeUpdate) ClearGmtOnline() *DeviceOnlineTimeUpdate

ClearGmtOnline clears the value of the "gmtOnline" field.

func (*DeviceOnlineTimeUpdate) ClearStatus

func (dotu *DeviceOnlineTimeUpdate) ClearStatus() *DeviceOnlineTimeUpdate

ClearStatus clears the value of the "status" field.

func (*DeviceOnlineTimeUpdate) Exec

func (dotu *DeviceOnlineTimeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceOnlineTimeUpdate) ExecContext

func (c *DeviceOnlineTimeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeUpdate) ExecX

func (dotu *DeviceOnlineTimeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeUpdate) Modify

func (dotu *DeviceOnlineTimeUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceOnlineTimeUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceOnlineTimeUpdate) Mutation

Mutation returns the DeviceOnlineTimeMutation object of the builder.

func (*DeviceOnlineTimeUpdate) QueryContext

func (c *DeviceOnlineTimeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeUpdate) Save

func (dotu *DeviceOnlineTimeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceOnlineTimeUpdate) SaveX

func (dotu *DeviceOnlineTimeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceOnlineTimeUpdate) SetDeviceName

func (dotu *DeviceOnlineTimeUpdate) SetDeviceName(s string) *DeviceOnlineTimeUpdate

SetDeviceName sets the "deviceName" field.

func (*DeviceOnlineTimeUpdate) SetGmtOnline

func (dotu *DeviceOnlineTimeUpdate) SetGmtOnline(s string) *DeviceOnlineTimeUpdate

SetGmtOnline sets the "gmtOnline" field.

func (*DeviceOnlineTimeUpdate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnlineTimeUpdate) SetNillableDeviceName

func (dotu *DeviceOnlineTimeUpdate) SetNillableDeviceName(s *string) *DeviceOnlineTimeUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceOnlineTimeUpdate) SetNillableGmtOnline

func (dotu *DeviceOnlineTimeUpdate) SetNillableGmtOnline(s *string) *DeviceOnlineTimeUpdate

SetNillableGmtOnline sets the "gmtOnline" field if the given value is not nil.

func (*DeviceOnlineTimeUpdate) SetNillableIotID

func (dotu *DeviceOnlineTimeUpdate) SetNillableIotID(s *string) *DeviceOnlineTimeUpdate

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceOnlineTimeUpdate) SetNillableProductKey

func (dotu *DeviceOnlineTimeUpdate) SetNillableProductKey(s *string) *DeviceOnlineTimeUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceOnlineTimeUpdate) SetNillableSort

func (dotu *DeviceOnlineTimeUpdate) SetNillableSort(u *uint32) *DeviceOnlineTimeUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOnlineTimeUpdate) SetNillableStatus

func (dotu *DeviceOnlineTimeUpdate) SetNillableStatus(u *uint8) *DeviceOnlineTimeUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOnlineTimeUpdate) SetNotNilDeviceName

func (dot *DeviceOnlineTimeUpdate) SetNotNilDeviceName(value *string) *DeviceOnlineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdate) SetNotNilGmtOnline

func (dot *DeviceOnlineTimeUpdate) SetNotNilGmtOnline(value *string) *DeviceOnlineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdate) SetNotNilIotID

func (dot *DeviceOnlineTimeUpdate) SetNotNilIotID(value *string) *DeviceOnlineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdate) SetNotNilProductKey

func (dot *DeviceOnlineTimeUpdate) SetNotNilProductKey(value *string) *DeviceOnlineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdate) SetNotNilSort

func (dot *DeviceOnlineTimeUpdate) SetNotNilSort(value *uint32) *DeviceOnlineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdate) SetNotNilStatus

func (dot *DeviceOnlineTimeUpdate) SetNotNilStatus(value *uint8) *DeviceOnlineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdate) SetNotNilUpdatedAt

func (dot *DeviceOnlineTimeUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceOnlineTimeUpdate

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdate) SetProductKey

func (dotu *DeviceOnlineTimeUpdate) SetProductKey(s string) *DeviceOnlineTimeUpdate

SetProductKey sets the "productKey" field.

func (*DeviceOnlineTimeUpdate) SetSort

SetSort sets the "sort" field.

func (*DeviceOnlineTimeUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnlineTimeUpdate) SetUpdatedAt

func (dotu *DeviceOnlineTimeUpdate) SetUpdatedAt(t time.Time) *DeviceOnlineTimeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnlineTimeUpdate) Where

Where appends a list predicates to the DeviceOnlineTimeUpdate builder.

type DeviceOnlineTimeUpdateOne

type DeviceOnlineTimeUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeUpdateOne is the builder for updating a single DeviceOnlineTime entity.

func (*DeviceOnlineTimeUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceOnlineTimeUpdateOne) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceOnlineTimeUpdateOne) ClearGmtOnline

func (dotuo *DeviceOnlineTimeUpdateOne) ClearGmtOnline() *DeviceOnlineTimeUpdateOne

ClearGmtOnline clears the value of the "gmtOnline" field.

func (*DeviceOnlineTimeUpdateOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnlineTimeUpdateOne) Exec

Exec executes the query on the entity.

func (*DeviceOnlineTimeUpdateOne) ExecContext

func (c *DeviceOnlineTimeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceOnlineTimeUpdateOne) ExecX

func (dotuo *DeviceOnlineTimeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeUpdateOne) Modify

func (dotuo *DeviceOnlineTimeUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceOnlineTimeUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceOnlineTimeUpdateOne) Mutation

Mutation returns the DeviceOnlineTimeMutation object of the builder.

func (*DeviceOnlineTimeUpdateOne) QueryContext

func (c *DeviceOnlineTimeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceOnlineTimeUpdateOne) Save

Save executes the query and returns the updated DeviceOnlineTime entity.

func (*DeviceOnlineTimeUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeviceOnlineTimeUpdateOne) Select

func (dotuo *DeviceOnlineTimeUpdateOne) Select(field string, fields ...string) *DeviceOnlineTimeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceOnlineTimeUpdateOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnlineTimeUpdateOne) SetGmtOnline

SetGmtOnline sets the "gmtOnline" field.

func (*DeviceOnlineTimeUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnlineTimeUpdateOne) SetNillableDeviceName

func (dotuo *DeviceOnlineTimeUpdateOne) SetNillableDeviceName(s *string) *DeviceOnlineTimeUpdateOne

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNillableGmtOnline

func (dotuo *DeviceOnlineTimeUpdateOne) SetNillableGmtOnline(s *string) *DeviceOnlineTimeUpdateOne

SetNillableGmtOnline sets the "gmtOnline" field if the given value is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNillableIotID

func (dotuo *DeviceOnlineTimeUpdateOne) SetNillableIotID(s *string) *DeviceOnlineTimeUpdateOne

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNillableProductKey

func (dotuo *DeviceOnlineTimeUpdateOne) SetNillableProductKey(s *string) *DeviceOnlineTimeUpdateOne

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNillableSort

func (dotuo *DeviceOnlineTimeUpdateOne) SetNillableSort(u *uint32) *DeviceOnlineTimeUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNillableStatus

func (dotuo *DeviceOnlineTimeUpdateOne) SetNillableStatus(u *uint8) *DeviceOnlineTimeUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNotNilDeviceName

func (dot *DeviceOnlineTimeUpdateOne) SetNotNilDeviceName(value *string) *DeviceOnlineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNotNilGmtOnline

func (dot *DeviceOnlineTimeUpdateOne) SetNotNilGmtOnline(value *string) *DeviceOnlineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNotNilIotID

func (dot *DeviceOnlineTimeUpdateOne) SetNotNilIotID(value *string) *DeviceOnlineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNotNilProductKey

func (dot *DeviceOnlineTimeUpdateOne) SetNotNilProductKey(value *string) *DeviceOnlineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNotNilSort

func (dot *DeviceOnlineTimeUpdateOne) SetNotNilSort(value *uint32) *DeviceOnlineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNotNilStatus

func (dot *DeviceOnlineTimeUpdateOne) SetNotNilStatus(value *uint8) *DeviceOnlineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdateOne) SetNotNilUpdatedAt

func (dot *DeviceOnlineTimeUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DeviceOnlineTimeUpdateOne

set field if value's pointer is not nil.

func (*DeviceOnlineTimeUpdateOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnlineTimeUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceOnlineTimeUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnlineTimeUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnlineTimeUpdateOne) Where

Where appends a list predicates to the DeviceOnlineTimeUpdate builder.

type DeviceOnlineTimeUpsert

type DeviceOnlineTimeUpsert struct {
	*sql.UpdateSet
}

DeviceOnlineTimeUpsert is the "OnConflict" setter.

func (*DeviceOnlineTimeUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOnlineTimeUpsert) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOnlineTimeUpsert) ClearGmtOnline

func (u *DeviceOnlineTimeUpsert) ClearGmtOnline() *DeviceOnlineTimeUpsert

ClearGmtOnline clears the value of the "gmtOnline" field.

func (*DeviceOnlineTimeUpsert) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnlineTimeUpsert) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnlineTimeUpsert) SetGmtOnline

SetGmtOnline sets the "gmtOnline" field.

func (*DeviceOnlineTimeUpsert) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnlineTimeUpsert) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnlineTimeUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceOnlineTimeUpsert) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnlineTimeUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnlineTimeUpsert) UpdateDeviceName

func (u *DeviceOnlineTimeUpsert) UpdateDeviceName() *DeviceOnlineTimeUpsert

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsert) UpdateGmtOnline

func (u *DeviceOnlineTimeUpsert) UpdateGmtOnline() *DeviceOnlineTimeUpsert

UpdateGmtOnline sets the "gmtOnline" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsert) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsert) UpdateProductKey

func (u *DeviceOnlineTimeUpsert) UpdateProductKey() *DeviceOnlineTimeUpsert

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsert) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsert) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsert) UpdateUpdatedAt

func (u *DeviceOnlineTimeUpsert) UpdateUpdatedAt() *DeviceOnlineTimeUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceOnlineTimeUpsertBulk

type DeviceOnlineTimeUpsertBulk struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeUpsertBulk is the builder for "upsert"-ing a bulk of DeviceOnlineTime nodes.

func (*DeviceOnlineTimeUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOnlineTimeUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOnlineTimeUpsertBulk) ClearGmtOnline

ClearGmtOnline clears the value of the "gmtOnline" field.

func (*DeviceOnlineTimeUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnlineTimeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceOnlineTimeUpsertBulk) Exec

Exec executes the query.

func (*DeviceOnlineTimeUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceOnlineTime.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeviceOnlineTimeUpsertBulk) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnlineTimeUpsertBulk) SetGmtOnline

SetGmtOnline sets the "gmtOnline" field.

func (*DeviceOnlineTimeUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnlineTimeUpsertBulk) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnlineTimeUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceOnlineTimeUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnlineTimeUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnlineTimeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeviceOnlineTimeCreateBulk.OnConflict documentation for more info.

func (*DeviceOnlineTimeUpsertBulk) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertBulk) UpdateGmtOnline

UpdateGmtOnline sets the "gmtOnline" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertBulk) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DeviceOnlineTime.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceonlinetime.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceOnlineTimeUpsertBulk) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceOnlineTimeUpsertOne

type DeviceOnlineTimeUpsertOne struct {
	// contains filtered or unexported fields
}

DeviceOnlineTimeUpsertOne is the builder for "upsert"-ing

one DeviceOnlineTime node.

func (*DeviceOnlineTimeUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceOnlineTimeUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceOnlineTimeUpsertOne) ClearGmtOnline

ClearGmtOnline clears the value of the "gmtOnline" field.

func (*DeviceOnlineTimeUpsertOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceOnlineTimeUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceOnlineTimeUpsertOne) Exec

Exec executes the query.

func (*DeviceOnlineTimeUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceOnlineTimeUpsertOne) ID

func (u *DeviceOnlineTimeUpsertOne) ID(ctx context.Context) (id uint64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceOnlineTimeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceOnlineTimeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceOnlineTime.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceOnlineTimeUpsertOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceOnlineTimeUpsertOne) SetGmtOnline

SetGmtOnline sets the "gmtOnline" field.

func (*DeviceOnlineTimeUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceOnlineTimeUpsertOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceOnlineTimeUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceOnlineTimeUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceOnlineTimeUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceOnlineTimeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeviceOnlineTimeCreate.OnConflict documentation for more info.

func (*DeviceOnlineTimeUpsertOne) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertOne) UpdateGmtOnline

UpdateGmtOnline sets the "gmtOnline" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertOne) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceOnlineTime.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceonlinetime.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceOnlineTimeUpsertOne) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertOne) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertOne) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceOnlineTimeUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceOnlineTimes

type DeviceOnlineTimes []*DeviceOnlineTime

DeviceOnlineTimes is a parsable slice of DeviceOnlineTime.

type DeviceUpsterCycle

type DeviceUpsterCycle struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// Timestamp | 毫秒时间戳
	Timestamp string `json:"timestamp,omitempty"`
	// NumberOfProgramButton1 | 程序1
	Number1 int32 `json:"number1,omitempty"`
	// NumberOfProgramButton2 | 程序2
	Number2 int32 `json:"number2,omitempty"`
	// NumberOfProgramButton3 | 程序3
	Number3 int32 `json:"number3,omitempty"`
	// NumberOfProgramCycles | 程序总计数
	NumberCycles int32 `json:"numberCycles,omitempty"`
	// NumberOfRegeneration
	NumberRegeneration int32 `json:"numberRegeneration,omitempty"`
	// NumberOfRinsingCycles
	NumberRinsingCycles int32 `json:"numberRinsingCycles,omitempty"`
	// TotalOfOperatingTime
	TotalOperationTime int32 `json:"totalOperationTime,omitempty"`
	// contains filtered or unexported fields
}

DeviceUpsterCycle is the model entity for the DeviceUpsterCycle schema.

func (*DeviceUpsterCycle) ExecContext

func (c *DeviceUpsterCycle) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycle) QueryContext

func (c *DeviceUpsterCycle) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycle) String

func (duc *DeviceUpsterCycle) String() string

String implements the fmt.Stringer.

func (*DeviceUpsterCycle) Unwrap

func (duc *DeviceUpsterCycle) Unwrap() *DeviceUpsterCycle

Unwrap unwraps the DeviceUpsterCycle entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceUpsterCycle) Update

Update returns a builder for updating this DeviceUpsterCycle. Note that you need to call DeviceUpsterCycle.Unwrap() before calling this method if this DeviceUpsterCycle was returned from a transaction, and the transaction was committed or rolled back.

func (*DeviceUpsterCycle) Value

func (duc *DeviceUpsterCycle) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DeviceUpsterCycle. This includes values selected through modifiers, order, etc.

type DeviceUpsterCycleClient

type DeviceUpsterCycleClient struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleClient is a client for the DeviceUpsterCycle schema.

func NewDeviceUpsterCycleClient

func NewDeviceUpsterCycleClient(c config) *DeviceUpsterCycleClient

NewDeviceUpsterCycleClient returns a client for the DeviceUpsterCycle from the given config.

func (*DeviceUpsterCycleClient) Create

Create returns a builder for creating a DeviceUpsterCycle entity.

func (*DeviceUpsterCycleClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeviceUpsterCycle entities.

func (*DeviceUpsterCycleClient) Delete

Delete returns a delete builder for DeviceUpsterCycle.

func (*DeviceUpsterCycleClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceUpsterCycleClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceUpsterCycleClient) ExecContext

func (c *DeviceUpsterCycleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleClient) Get

Get returns a DeviceUpsterCycle entity by its id.

func (*DeviceUpsterCycleClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeviceUpsterCycleClient) Hooks

func (c *DeviceUpsterCycleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceUpsterCycleClient) Intercept

func (c *DeviceUpsterCycleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deviceupstercycle.Intercept(f(g(h())))`.

func (*DeviceUpsterCycleClient) Interceptors

func (c *DeviceUpsterCycleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceUpsterCycleClient) MapCreateBulk

func (c *DeviceUpsterCycleClient) MapCreateBulk(slice any, setFunc func(*DeviceUpsterCycleCreate, int)) *DeviceUpsterCycleCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DeviceUpsterCycleClient) Query

Query returns a query builder for DeviceUpsterCycle.

func (*DeviceUpsterCycleClient) QueryContext

func (c *DeviceUpsterCycleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleClient) Update

Update returns an update builder for DeviceUpsterCycle.

func (*DeviceUpsterCycleClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceUpsterCycleClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeviceUpsterCycleClient) Use

func (c *DeviceUpsterCycleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deviceupstercycle.Hooks(f(g(h())))`.

type DeviceUpsterCycleCreate

type DeviceUpsterCycleCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceUpsterCycleCreate is the builder for creating a DeviceUpsterCycle entity.

func (*DeviceUpsterCycleCreate) Exec

func (ducc *DeviceUpsterCycleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceUpsterCycleCreate) ExecContext

func (c *DeviceUpsterCycleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleCreate) ExecX

func (ducc *DeviceUpsterCycleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleCreate) Mutation

Mutation returns the DeviceUpsterCycleMutation object of the builder.

func (*DeviceUpsterCycleCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceUpsterCycle.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceUpsterCycleUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceUpsterCycleCreate) OnConflictColumns

func (ducc *DeviceUpsterCycleCreate) OnConflictColumns(columns ...string) *DeviceUpsterCycleUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceUpsterCycle.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceUpsterCycleCreate) QueryContext

func (c *DeviceUpsterCycleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleCreate) Save

Save creates the DeviceUpsterCycle in the database.

func (*DeviceUpsterCycleCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceUpsterCycleCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeviceUpsterCycleCreate) SetDeviceName

func (ducc *DeviceUpsterCycleCreate) SetDeviceName(s string) *DeviceUpsterCycleCreate

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterCycleCreate) SetID

SetID sets the "id" field.

func (*DeviceUpsterCycleCreate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterCycleCreate) SetNillableCreatedAt

func (ducc *DeviceUpsterCycleCreate) SetNillableCreatedAt(t *time.Time) *DeviceUpsterCycleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableNumber1

func (ducc *DeviceUpsterCycleCreate) SetNillableNumber1(i *int32) *DeviceUpsterCycleCreate

SetNillableNumber1 sets the "number1" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableNumber2

func (ducc *DeviceUpsterCycleCreate) SetNillableNumber2(i *int32) *DeviceUpsterCycleCreate

SetNillableNumber2 sets the "number2" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableNumber3

func (ducc *DeviceUpsterCycleCreate) SetNillableNumber3(i *int32) *DeviceUpsterCycleCreate

SetNillableNumber3 sets the "number3" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableNumberCycles

func (ducc *DeviceUpsterCycleCreate) SetNillableNumberCycles(i *int32) *DeviceUpsterCycleCreate

SetNillableNumberCycles sets the "numberCycles" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableNumberRegeneration

func (ducc *DeviceUpsterCycleCreate) SetNillableNumberRegeneration(i *int32) *DeviceUpsterCycleCreate

SetNillableNumberRegeneration sets the "numberRegeneration" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableNumberRinsingCycles

func (ducc *DeviceUpsterCycleCreate) SetNillableNumberRinsingCycles(i *int32) *DeviceUpsterCycleCreate

SetNillableNumberRinsingCycles sets the "numberRinsingCycles" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableSort

func (ducc *DeviceUpsterCycleCreate) SetNillableSort(u *uint32) *DeviceUpsterCycleCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableStatus

func (ducc *DeviceUpsterCycleCreate) SetNillableStatus(u *uint8) *DeviceUpsterCycleCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableTimestamp

func (ducc *DeviceUpsterCycleCreate) SetNillableTimestamp(s *string) *DeviceUpsterCycleCreate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableTotalOperationTime

func (ducc *DeviceUpsterCycleCreate) SetNillableTotalOperationTime(i *int32) *DeviceUpsterCycleCreate

SetNillableTotalOperationTime sets the "totalOperationTime" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNillableUpdatedAt

func (ducc *DeviceUpsterCycleCreate) SetNillableUpdatedAt(t *time.Time) *DeviceUpsterCycleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilDeviceName

func (duc *DeviceUpsterCycleCreate) SetNotNilDeviceName(value *string) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilIotID

func (duc *DeviceUpsterCycleCreate) SetNotNilIotID(value *string) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilNumber1

func (duc *DeviceUpsterCycleCreate) SetNotNilNumber1(value *int32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilNumber2

func (duc *DeviceUpsterCycleCreate) SetNotNilNumber2(value *int32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilNumber3

func (duc *DeviceUpsterCycleCreate) SetNotNilNumber3(value *int32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilNumberCycles

func (duc *DeviceUpsterCycleCreate) SetNotNilNumberCycles(value *int32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilNumberRegeneration

func (duc *DeviceUpsterCycleCreate) SetNotNilNumberRegeneration(value *int32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilNumberRinsingCycles

func (duc *DeviceUpsterCycleCreate) SetNotNilNumberRinsingCycles(value *int32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilProductKey

func (duc *DeviceUpsterCycleCreate) SetNotNilProductKey(value *string) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilSort

func (duc *DeviceUpsterCycleCreate) SetNotNilSort(value *uint32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilStatus

func (duc *DeviceUpsterCycleCreate) SetNotNilStatus(value *uint8) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilTimestamp

func (duc *DeviceUpsterCycleCreate) SetNotNilTimestamp(value *string) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilTotalOperationTime

func (duc *DeviceUpsterCycleCreate) SetNotNilTotalOperationTime(value *int32) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNotNilUpdatedAt

func (duc *DeviceUpsterCycleCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceUpsterCycleCreate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleCreate) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterCycleCreate) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterCycleCreate) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterCycleCreate) SetNumberCycles

func (ducc *DeviceUpsterCycleCreate) SetNumberCycles(i int32) *DeviceUpsterCycleCreate

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterCycleCreate) SetNumberRegeneration

func (ducc *DeviceUpsterCycleCreate) SetNumberRegeneration(i int32) *DeviceUpsterCycleCreate

SetNumberRegeneration sets the "numberRegeneration" field.

func (*DeviceUpsterCycleCreate) SetNumberRinsingCycles

func (ducc *DeviceUpsterCycleCreate) SetNumberRinsingCycles(i int32) *DeviceUpsterCycleCreate

SetNumberRinsingCycles sets the "numberRinsingCycles" field.

func (*DeviceUpsterCycleCreate) SetProductKey

func (ducc *DeviceUpsterCycleCreate) SetProductKey(s string) *DeviceUpsterCycleCreate

SetProductKey sets the "productKey" field.

func (*DeviceUpsterCycleCreate) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterCycleCreate) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterCycleCreate) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterCycleCreate) SetTotalOperationTime

func (ducc *DeviceUpsterCycleCreate) SetTotalOperationTime(i int32) *DeviceUpsterCycleCreate

SetTotalOperationTime sets the "totalOperationTime" field.

func (*DeviceUpsterCycleCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterCycleCreate) TableName

type DeviceUpsterCycleCreateBulk

type DeviceUpsterCycleCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleCreateBulk is the builder for creating many DeviceUpsterCycle entities in bulk.

func (*DeviceUpsterCycleCreateBulk) Exec

Exec executes the query.

func (*DeviceUpsterCycleCreateBulk) ExecContext

func (c *DeviceUpsterCycleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleCreateBulk) ExecX

func (duccb *DeviceUpsterCycleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceUpsterCycle.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceUpsterCycleUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceUpsterCycleCreateBulk) OnConflictColumns

func (duccb *DeviceUpsterCycleCreateBulk) OnConflictColumns(columns ...string) *DeviceUpsterCycleUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceUpsterCycle.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceUpsterCycleCreateBulk) QueryContext

func (c *DeviceUpsterCycleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleCreateBulk) Save

Save creates the DeviceUpsterCycle entities in the database.

func (*DeviceUpsterCycleCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeviceUpsterCycleDelete

type DeviceUpsterCycleDelete struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleDelete is the builder for deleting a DeviceUpsterCycle entity.

func (*DeviceUpsterCycleDelete) Exec

func (ducd *DeviceUpsterCycleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceUpsterCycleDelete) ExecContext

func (c *DeviceUpsterCycleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleDelete) ExecX

func (ducd *DeviceUpsterCycleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleDelete) QueryContext

func (c *DeviceUpsterCycleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleDelete) Where

Where appends a list predicates to the DeviceUpsterCycleDelete builder.

type DeviceUpsterCycleDeleteOne

type DeviceUpsterCycleDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleDeleteOne is the builder for deleting a single DeviceUpsterCycle entity.

func (*DeviceUpsterCycleDeleteOne) Exec

Exec executes the deletion query.

func (*DeviceUpsterCycleDeleteOne) ExecX

func (ducdo *DeviceUpsterCycleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleDeleteOne) Where

Where appends a list predicates to the DeviceUpsterCycleDelete builder.

type DeviceUpsterCycleGroupBy

type DeviceUpsterCycleGroupBy struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleGroupBy is the group-by builder for DeviceUpsterCycle entities.

func (*DeviceUpsterCycleGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceUpsterCycleGroupBy) Bool

func (s *DeviceUpsterCycleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) BoolX

func (s *DeviceUpsterCycleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) Bools

func (s *DeviceUpsterCycleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) BoolsX

func (s *DeviceUpsterCycleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) Float64

func (s *DeviceUpsterCycleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) Float64X

func (s *DeviceUpsterCycleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) Float64s

func (s *DeviceUpsterCycleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) Float64sX

func (s *DeviceUpsterCycleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) Int

func (s *DeviceUpsterCycleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) IntX

func (s *DeviceUpsterCycleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) Ints

func (s *DeviceUpsterCycleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) IntsX

func (s *DeviceUpsterCycleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) Scan

func (ducgb *DeviceUpsterCycleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceUpsterCycleGroupBy) ScanX

func (s *DeviceUpsterCycleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) String

func (s *DeviceUpsterCycleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) StringX

func (s *DeviceUpsterCycleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceUpsterCycleGroupBy) Strings

func (s *DeviceUpsterCycleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleGroupBy) StringsX

func (s *DeviceUpsterCycleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceUpsterCycleMutation

type DeviceUpsterCycleMutation struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleMutation represents an operation that mutates the DeviceUpsterCycle nodes in the graph.

func (*DeviceUpsterCycleMutation) AddField

func (m *DeviceUpsterCycleMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceUpsterCycleMutation) AddNumber1

func (m *DeviceUpsterCycleMutation) AddNumber1(i int32)

AddNumber1 adds i to the "number1" field.

func (*DeviceUpsterCycleMutation) AddNumber2

func (m *DeviceUpsterCycleMutation) AddNumber2(i int32)

AddNumber2 adds i to the "number2" field.

func (*DeviceUpsterCycleMutation) AddNumber3

func (m *DeviceUpsterCycleMutation) AddNumber3(i int32)

AddNumber3 adds i to the "number3" field.

func (*DeviceUpsterCycleMutation) AddNumberCycles

func (m *DeviceUpsterCycleMutation) AddNumberCycles(i int32)

AddNumberCycles adds i to the "numberCycles" field.

func (*DeviceUpsterCycleMutation) AddNumberRegeneration

func (m *DeviceUpsterCycleMutation) AddNumberRegeneration(i int32)

AddNumberRegeneration adds i to the "numberRegeneration" field.

func (*DeviceUpsterCycleMutation) AddNumberRinsingCycles

func (m *DeviceUpsterCycleMutation) AddNumberRinsingCycles(i int32)

AddNumberRinsingCycles adds i to the "numberRinsingCycles" field.

func (*DeviceUpsterCycleMutation) AddSort

func (m *DeviceUpsterCycleMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceUpsterCycleMutation) AddStatus

func (m *DeviceUpsterCycleMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceUpsterCycleMutation) AddTotalOperationTime

func (m *DeviceUpsterCycleMutation) AddTotalOperationTime(i int32)

AddTotalOperationTime adds i to the "totalOperationTime" field.

func (*DeviceUpsterCycleMutation) AddedEdges

func (m *DeviceUpsterCycleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceUpsterCycleMutation) AddedField

func (m *DeviceUpsterCycleMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceUpsterCycleMutation) AddedFields

func (m *DeviceUpsterCycleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceUpsterCycleMutation) AddedIDs

func (m *DeviceUpsterCycleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceUpsterCycleMutation) AddedNumber1

func (m *DeviceUpsterCycleMutation) AddedNumber1() (r int32, exists bool)

AddedNumber1 returns the value that was added to the "number1" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedNumber2

func (m *DeviceUpsterCycleMutation) AddedNumber2() (r int32, exists bool)

AddedNumber2 returns the value that was added to the "number2" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedNumber3

func (m *DeviceUpsterCycleMutation) AddedNumber3() (r int32, exists bool)

AddedNumber3 returns the value that was added to the "number3" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedNumberCycles

func (m *DeviceUpsterCycleMutation) AddedNumberCycles() (r int32, exists bool)

AddedNumberCycles returns the value that was added to the "numberCycles" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedNumberRegeneration

func (m *DeviceUpsterCycleMutation) AddedNumberRegeneration() (r int32, exists bool)

AddedNumberRegeneration returns the value that was added to the "numberRegeneration" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedNumberRinsingCycles

func (m *DeviceUpsterCycleMutation) AddedNumberRinsingCycles() (r int32, exists bool)

AddedNumberRinsingCycles returns the value that was added to the "numberRinsingCycles" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedSort

func (m *DeviceUpsterCycleMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedStatus

func (m *DeviceUpsterCycleMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceUpsterCycleMutation) AddedTotalOperationTime

func (m *DeviceUpsterCycleMutation) AddedTotalOperationTime() (r int32, exists bool)

AddedTotalOperationTime returns the value that was added to the "totalOperationTime" field in this mutation.

func (*DeviceUpsterCycleMutation) ClearEdge

func (m *DeviceUpsterCycleMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceUpsterCycleMutation) ClearField

func (m *DeviceUpsterCycleMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceUpsterCycleMutation) ClearNumber1

func (m *DeviceUpsterCycleMutation) ClearNumber1()

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterCycleMutation) ClearNumber2

func (m *DeviceUpsterCycleMutation) ClearNumber2()

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterCycleMutation) ClearNumber3

func (m *DeviceUpsterCycleMutation) ClearNumber3()

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterCycleMutation) ClearNumberCycles

func (m *DeviceUpsterCycleMutation) ClearNumberCycles()

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterCycleMutation) ClearNumberRegeneration

func (m *DeviceUpsterCycleMutation) ClearNumberRegeneration()

ClearNumberRegeneration clears the value of the "numberRegeneration" field.

func (*DeviceUpsterCycleMutation) ClearNumberRinsingCycles

func (m *DeviceUpsterCycleMutation) ClearNumberRinsingCycles()

ClearNumberRinsingCycles clears the value of the "numberRinsingCycles" field.

func (*DeviceUpsterCycleMutation) ClearStatus

func (m *DeviceUpsterCycleMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterCycleMutation) ClearTimestamp

func (m *DeviceUpsterCycleMutation) ClearTimestamp()

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterCycleMutation) ClearTotalOperationTime

func (m *DeviceUpsterCycleMutation) ClearTotalOperationTime()

ClearTotalOperationTime clears the value of the "totalOperationTime" field.

func (*DeviceUpsterCycleMutation) ClearedEdges

func (m *DeviceUpsterCycleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceUpsterCycleMutation) ClearedFields

func (m *DeviceUpsterCycleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceUpsterCycleMutation) Client

func (m DeviceUpsterCycleMutation) 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 (*DeviceUpsterCycleMutation) CreatedAt

func (m *DeviceUpsterCycleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceUpsterCycleMutation) DeviceName

func (m *DeviceUpsterCycleMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceUpsterCycleMutation) EdgeCleared

func (m *DeviceUpsterCycleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceUpsterCycleMutation) ExecContext

func (c *DeviceUpsterCycleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleMutation) Field

func (m *DeviceUpsterCycleMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceUpsterCycleMutation) FieldCleared

func (m *DeviceUpsterCycleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceUpsterCycleMutation) Fields

func (m *DeviceUpsterCycleMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceUpsterCycleMutation) ID

func (m *DeviceUpsterCycleMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceUpsterCycleMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceUpsterCycleMutation) IotID

func (m *DeviceUpsterCycleMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceUpsterCycleMutation) Number1

func (m *DeviceUpsterCycleMutation) Number1() (r int32, exists bool)

Number1 returns the value of the "number1" field in the mutation.

func (*DeviceUpsterCycleMutation) Number1Cleared

func (m *DeviceUpsterCycleMutation) Number1Cleared() bool

Number1Cleared returns if the "number1" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) Number2

func (m *DeviceUpsterCycleMutation) Number2() (r int32, exists bool)

Number2 returns the value of the "number2" field in the mutation.

func (*DeviceUpsterCycleMutation) Number2Cleared

func (m *DeviceUpsterCycleMutation) Number2Cleared() bool

Number2Cleared returns if the "number2" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) Number3

func (m *DeviceUpsterCycleMutation) Number3() (r int32, exists bool)

Number3 returns the value of the "number3" field in the mutation.

func (*DeviceUpsterCycleMutation) Number3Cleared

func (m *DeviceUpsterCycleMutation) Number3Cleared() bool

Number3Cleared returns if the "number3" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) NumberCycles

func (m *DeviceUpsterCycleMutation) NumberCycles() (r int32, exists bool)

NumberCycles returns the value of the "numberCycles" field in the mutation.

func (*DeviceUpsterCycleMutation) NumberCyclesCleared

func (m *DeviceUpsterCycleMutation) NumberCyclesCleared() bool

NumberCyclesCleared returns if the "numberCycles" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) NumberRegeneration

func (m *DeviceUpsterCycleMutation) NumberRegeneration() (r int32, exists bool)

NumberRegeneration returns the value of the "numberRegeneration" field in the mutation.

func (*DeviceUpsterCycleMutation) NumberRegenerationCleared

func (m *DeviceUpsterCycleMutation) NumberRegenerationCleared() bool

NumberRegenerationCleared returns if the "numberRegeneration" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) NumberRinsingCycles

func (m *DeviceUpsterCycleMutation) NumberRinsingCycles() (r int32, exists bool)

NumberRinsingCycles returns the value of the "numberRinsingCycles" field in the mutation.

func (*DeviceUpsterCycleMutation) NumberRinsingCyclesCleared

func (m *DeviceUpsterCycleMutation) NumberRinsingCyclesCleared() bool

NumberRinsingCyclesCleared returns if the "numberRinsingCycles" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) OldCreatedAt

func (m *DeviceUpsterCycleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldDeviceName

func (m *DeviceUpsterCycleMutation) OldDeviceName(ctx context.Context) (v string, err error)

OldDeviceName returns the old "deviceName" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldField

func (m *DeviceUpsterCycleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceUpsterCycleMutation) OldIotID

func (m *DeviceUpsterCycleMutation) OldIotID(ctx context.Context) (v string, err error)

OldIotID returns the old "iotID" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldNumber1

func (m *DeviceUpsterCycleMutation) OldNumber1(ctx context.Context) (v int32, err error)

OldNumber1 returns the old "number1" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldNumber2

func (m *DeviceUpsterCycleMutation) OldNumber2(ctx context.Context) (v int32, err error)

OldNumber2 returns the old "number2" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldNumber3

func (m *DeviceUpsterCycleMutation) OldNumber3(ctx context.Context) (v int32, err error)

OldNumber3 returns the old "number3" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldNumberCycles

func (m *DeviceUpsterCycleMutation) OldNumberCycles(ctx context.Context) (v int32, err error)

OldNumberCycles returns the old "numberCycles" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldNumberRegeneration

func (m *DeviceUpsterCycleMutation) OldNumberRegeneration(ctx context.Context) (v int32, err error)

OldNumberRegeneration returns the old "numberRegeneration" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldNumberRinsingCycles

func (m *DeviceUpsterCycleMutation) OldNumberRinsingCycles(ctx context.Context) (v int32, err error)

OldNumberRinsingCycles returns the old "numberRinsingCycles" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldProductKey

func (m *DeviceUpsterCycleMutation) OldProductKey(ctx context.Context) (v string, err error)

OldProductKey returns the old "productKey" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldSort

func (m *DeviceUpsterCycleMutation) OldSort(ctx context.Context) (v uint32, err error)

OldSort returns the old "sort" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldStatus

func (m *DeviceUpsterCycleMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldTimestamp

func (m *DeviceUpsterCycleMutation) OldTimestamp(ctx context.Context) (v string, err error)

OldTimestamp returns the old "timestamp" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldTotalOperationTime

func (m *DeviceUpsterCycleMutation) OldTotalOperationTime(ctx context.Context) (v int32, err error)

OldTotalOperationTime returns the old "totalOperationTime" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) OldUpdatedAt

func (m *DeviceUpsterCycleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeviceUpsterCycle entity. If the DeviceUpsterCycle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterCycleMutation) Op

func (m *DeviceUpsterCycleMutation) Op() Op

Op returns the operation name.

func (*DeviceUpsterCycleMutation) ProductKey

func (m *DeviceUpsterCycleMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceUpsterCycleMutation) QueryContext

func (c *DeviceUpsterCycleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleMutation) RemovedEdges

func (m *DeviceUpsterCycleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceUpsterCycleMutation) RemovedIDs

func (m *DeviceUpsterCycleMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceUpsterCycleMutation) ResetCreatedAt

func (m *DeviceUpsterCycleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceUpsterCycleMutation) ResetDeviceName

func (m *DeviceUpsterCycleMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceUpsterCycleMutation) ResetEdge

func (m *DeviceUpsterCycleMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceUpsterCycleMutation) ResetField

func (m *DeviceUpsterCycleMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceUpsterCycleMutation) ResetIotID

func (m *DeviceUpsterCycleMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceUpsterCycleMutation) ResetNumber1

func (m *DeviceUpsterCycleMutation) ResetNumber1()

ResetNumber1 resets all changes to the "number1" field.

func (*DeviceUpsterCycleMutation) ResetNumber2

func (m *DeviceUpsterCycleMutation) ResetNumber2()

ResetNumber2 resets all changes to the "number2" field.

func (*DeviceUpsterCycleMutation) ResetNumber3

func (m *DeviceUpsterCycleMutation) ResetNumber3()

ResetNumber3 resets all changes to the "number3" field.

func (*DeviceUpsterCycleMutation) ResetNumberCycles

func (m *DeviceUpsterCycleMutation) ResetNumberCycles()

ResetNumberCycles resets all changes to the "numberCycles" field.

func (*DeviceUpsterCycleMutation) ResetNumberRegeneration

func (m *DeviceUpsterCycleMutation) ResetNumberRegeneration()

ResetNumberRegeneration resets all changes to the "numberRegeneration" field.

func (*DeviceUpsterCycleMutation) ResetNumberRinsingCycles

func (m *DeviceUpsterCycleMutation) ResetNumberRinsingCycles()

ResetNumberRinsingCycles resets all changes to the "numberRinsingCycles" field.

func (*DeviceUpsterCycleMutation) ResetProductKey

func (m *DeviceUpsterCycleMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceUpsterCycleMutation) ResetSort

func (m *DeviceUpsterCycleMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceUpsterCycleMutation) ResetStatus

func (m *DeviceUpsterCycleMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceUpsterCycleMutation) ResetTimestamp

func (m *DeviceUpsterCycleMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*DeviceUpsterCycleMutation) ResetTotalOperationTime

func (m *DeviceUpsterCycleMutation) ResetTotalOperationTime()

ResetTotalOperationTime resets all changes to the "totalOperationTime" field.

func (*DeviceUpsterCycleMutation) ResetUpdatedAt

func (m *DeviceUpsterCycleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceUpsterCycleMutation) SetCreatedAt

func (m *DeviceUpsterCycleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeviceUpsterCycleMutation) SetDeviceName

func (m *DeviceUpsterCycleMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterCycleMutation) SetField

func (m *DeviceUpsterCycleMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceUpsterCycleMutation) SetID

func (m *DeviceUpsterCycleMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DeviceUpsterCycle entities.

func (*DeviceUpsterCycleMutation) SetIotID

func (m *DeviceUpsterCycleMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceUpsterCycleMutation) SetNumber1

func (m *DeviceUpsterCycleMutation) SetNumber1(i int32)

SetNumber1 sets the "number1" field.

func (*DeviceUpsterCycleMutation) SetNumber2

func (m *DeviceUpsterCycleMutation) SetNumber2(i int32)

SetNumber2 sets the "number2" field.

func (*DeviceUpsterCycleMutation) SetNumber3

func (m *DeviceUpsterCycleMutation) SetNumber3(i int32)

SetNumber3 sets the "number3" field.

func (*DeviceUpsterCycleMutation) SetNumberCycles

func (m *DeviceUpsterCycleMutation) SetNumberCycles(i int32)

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterCycleMutation) SetNumberRegeneration

func (m *DeviceUpsterCycleMutation) SetNumberRegeneration(i int32)

SetNumberRegeneration sets the "numberRegeneration" field.

func (*DeviceUpsterCycleMutation) SetNumberRinsingCycles

func (m *DeviceUpsterCycleMutation) SetNumberRinsingCycles(i int32)

SetNumberRinsingCycles sets the "numberRinsingCycles" field.

func (*DeviceUpsterCycleMutation) SetOp

func (m *DeviceUpsterCycleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceUpsterCycleMutation) SetProductKey

func (m *DeviceUpsterCycleMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceUpsterCycleMutation) SetSort

func (m *DeviceUpsterCycleMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceUpsterCycleMutation) SetStatus

func (m *DeviceUpsterCycleMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceUpsterCycleMutation) SetTimestamp

func (m *DeviceUpsterCycleMutation) SetTimestamp(s string)

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterCycleMutation) SetTotalOperationTime

func (m *DeviceUpsterCycleMutation) SetTotalOperationTime(i int32)

SetTotalOperationTime sets the "totalOperationTime" field.

func (*DeviceUpsterCycleMutation) SetUpdatedAt

func (m *DeviceUpsterCycleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterCycleMutation) Sort

func (m *DeviceUpsterCycleMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceUpsterCycleMutation) Status

func (m *DeviceUpsterCycleMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DeviceUpsterCycleMutation) StatusCleared

func (m *DeviceUpsterCycleMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) Timestamp

func (m *DeviceUpsterCycleMutation) Timestamp() (r string, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (*DeviceUpsterCycleMutation) TimestampCleared

func (m *DeviceUpsterCycleMutation) TimestampCleared() bool

TimestampCleared returns if the "timestamp" field was cleared in this mutation.

func (*DeviceUpsterCycleMutation) TotalOperationTime

func (m *DeviceUpsterCycleMutation) TotalOperationTime() (r int32, exists bool)

TotalOperationTime returns the value of the "totalOperationTime" field in the mutation.

func (*DeviceUpsterCycleMutation) TotalOperationTimeCleared

func (m *DeviceUpsterCycleMutation) TotalOperationTimeCleared() bool

TotalOperationTimeCleared returns if the "totalOperationTime" field was cleared in this mutation.

func (DeviceUpsterCycleMutation) Tx

func (m DeviceUpsterCycleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceUpsterCycleMutation) Type

Type returns the node type of this mutation (DeviceUpsterCycle).

func (*DeviceUpsterCycleMutation) UpdatedAt

func (m *DeviceUpsterCycleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceUpsterCycleMutation) Where

Where appends a list predicates to the DeviceUpsterCycleMutation builder.

func (*DeviceUpsterCycleMutation) WhereP

func (m *DeviceUpsterCycleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceUpsterCycleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceUpsterCyclePageList

type DeviceUpsterCyclePageList struct {
	List        []*DeviceUpsterCycle `json:"list"`
	PageDetails *PageDetails         `json:"pageDetails"`
}

DeviceUpsterCyclePageList is DeviceUpsterCycle PageList result.

type DeviceUpsterCyclePager

type DeviceUpsterCyclePager struct {
	Order  deviceupstercycle.OrderOption
	Filter func(*DeviceUpsterCycleQuery) (*DeviceUpsterCycleQuery, error)
}

func (*DeviceUpsterCyclePager) ApplyFilter

type DeviceUpsterCyclePaginateOption

type DeviceUpsterCyclePaginateOption func(*DeviceUpsterCyclePager)

DeviceUpsterCyclePaginateOption enables pagination customization.

type DeviceUpsterCycleQuery

type DeviceUpsterCycleQuery struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleQuery is the builder for querying DeviceUpsterCycle entities.

func (*DeviceUpsterCycleQuery) Aggregate

Aggregate returns a DeviceUpsterCycleSelect configured with the given aggregations.

func (*DeviceUpsterCycleQuery) All

All executes the query and returns a list of DeviceUpsterCycles.

func (*DeviceUpsterCycleQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) Clone

Clone returns a duplicate of the DeviceUpsterCycleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceUpsterCycleQuery) Count

func (ducq *DeviceUpsterCycleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceUpsterCycleQuery) CountX

func (ducq *DeviceUpsterCycleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) ExecContext

func (c *DeviceUpsterCycleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleQuery) Exist

func (ducq *DeviceUpsterCycleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceUpsterCycleQuery) ExistX

func (ducq *DeviceUpsterCycleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) First

First returns the first DeviceUpsterCycle entity from the query. Returns a *NotFoundError when no DeviceUpsterCycle was found.

func (*DeviceUpsterCycleQuery) FirstID

func (ducq *DeviceUpsterCycleQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first DeviceUpsterCycle ID from the query. Returns a *NotFoundError when no DeviceUpsterCycle ID was found.

func (*DeviceUpsterCycleQuery) FirstIDX

func (ducq *DeviceUpsterCycleQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) GroupBy

func (ducq *DeviceUpsterCycleQuery) GroupBy(field string, fields ...string) *DeviceUpsterCycleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceUpsterCycle.Query().
	GroupBy(deviceupstercycle.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceUpsterCycleQuery) IDs

func (ducq *DeviceUpsterCycleQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of DeviceUpsterCycle IDs.

func (*DeviceUpsterCycleQuery) IDsX

func (ducq *DeviceUpsterCycleQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) Limit

Limit the number of records to be returned by this query.

func (*DeviceUpsterCycleQuery) Modify

func (ducq *DeviceUpsterCycleQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceUpsterCycleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DeviceUpsterCycleQuery) Offset

func (ducq *DeviceUpsterCycleQuery) Offset(offset int) *DeviceUpsterCycleQuery

Offset to start from.

func (*DeviceUpsterCycleQuery) Only

Only returns a single DeviceUpsterCycle entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceUpsterCycle entity is found. Returns a *NotFoundError when no DeviceUpsterCycle entities are found.

func (*DeviceUpsterCycleQuery) OnlyID

func (ducq *DeviceUpsterCycleQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only DeviceUpsterCycle ID in the query. Returns a *NotSingularError when more than one DeviceUpsterCycle ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceUpsterCycleQuery) OnlyIDX

func (ducq *DeviceUpsterCycleQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeviceUpsterCycleQuery) Order

Order specifies how the records should be ordered.

func (*DeviceUpsterCycleQuery) Page

func (*DeviceUpsterCycleQuery) QueryContext

func (c *DeviceUpsterCycleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleQuery) Select

func (ducq *DeviceUpsterCycleQuery) Select(fields ...string) *DeviceUpsterCycleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.DeviceUpsterCycle.Query().
	Select(deviceupstercycle.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceUpsterCycleQuery) Unique

func (ducq *DeviceUpsterCycleQuery) Unique(unique bool) *DeviceUpsterCycleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceUpsterCycleQuery) Where

Where adds a new predicate for the DeviceUpsterCycleQuery builder.

type DeviceUpsterCycleSelect

type DeviceUpsterCycleSelect struct {
	*DeviceUpsterCycleQuery
	// contains filtered or unexported fields
}

DeviceUpsterCycleSelect is the builder for selecting fields of DeviceUpsterCycle entities.

func (*DeviceUpsterCycleSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceUpsterCycleSelect) Bool

func (s *DeviceUpsterCycleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) BoolX

func (s *DeviceUpsterCycleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceUpsterCycleSelect) Bools

func (s *DeviceUpsterCycleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) BoolsX

func (s *DeviceUpsterCycleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeviceUpsterCycleSelect) ExecContext

func (c DeviceUpsterCycleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleSelect) Float64

func (s *DeviceUpsterCycleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) Float64X

func (s *DeviceUpsterCycleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceUpsterCycleSelect) Float64s

func (s *DeviceUpsterCycleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) Float64sX

func (s *DeviceUpsterCycleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceUpsterCycleSelect) Int

func (s *DeviceUpsterCycleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) IntX

func (s *DeviceUpsterCycleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceUpsterCycleSelect) Ints

func (s *DeviceUpsterCycleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) IntsX

func (s *DeviceUpsterCycleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceUpsterCycleSelect) Modify

func (ducs *DeviceUpsterCycleSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceUpsterCycleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (DeviceUpsterCycleSelect) QueryContext

func (c DeviceUpsterCycleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleSelect) Scan

func (ducs *DeviceUpsterCycleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceUpsterCycleSelect) ScanX

func (s *DeviceUpsterCycleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceUpsterCycleSelect) String

func (s *DeviceUpsterCycleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) StringX

func (s *DeviceUpsterCycleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceUpsterCycleSelect) Strings

func (s *DeviceUpsterCycleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterCycleSelect) StringsX

func (s *DeviceUpsterCycleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceUpsterCycleUpdate

type DeviceUpsterCycleUpdate struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleUpdate is the builder for updating DeviceUpsterCycle entities.

func (*DeviceUpsterCycleUpdate) AddNumber1

AddNumber1 adds i to the "number1" field.

func (*DeviceUpsterCycleUpdate) AddNumber2

AddNumber2 adds i to the "number2" field.

func (*DeviceUpsterCycleUpdate) AddNumber3

AddNumber3 adds i to the "number3" field.

func (*DeviceUpsterCycleUpdate) AddNumberCycles

func (ducu *DeviceUpsterCycleUpdate) AddNumberCycles(i int32) *DeviceUpsterCycleUpdate

AddNumberCycles adds i to the "numberCycles" field.

func (*DeviceUpsterCycleUpdate) AddNumberRegeneration

func (ducu *DeviceUpsterCycleUpdate) AddNumberRegeneration(i int32) *DeviceUpsterCycleUpdate

AddNumberRegeneration adds i to the "numberRegeneration" field.

func (*DeviceUpsterCycleUpdate) AddNumberRinsingCycles

func (ducu *DeviceUpsterCycleUpdate) AddNumberRinsingCycles(i int32) *DeviceUpsterCycleUpdate

AddNumberRinsingCycles adds i to the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpdate) AddSort

AddSort adds u to the "sort" field.

func (*DeviceUpsterCycleUpdate) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceUpsterCycleUpdate) AddTotalOperationTime

func (ducu *DeviceUpsterCycleUpdate) AddTotalOperationTime(i int32) *DeviceUpsterCycleUpdate

AddTotalOperationTime adds i to the "totalOperationTime" field.

func (*DeviceUpsterCycleUpdate) ClearNumber1

func (ducu *DeviceUpsterCycleUpdate) ClearNumber1() *DeviceUpsterCycleUpdate

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterCycleUpdate) ClearNumber2

func (ducu *DeviceUpsterCycleUpdate) ClearNumber2() *DeviceUpsterCycleUpdate

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterCycleUpdate) ClearNumber3

func (ducu *DeviceUpsterCycleUpdate) ClearNumber3() *DeviceUpsterCycleUpdate

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterCycleUpdate) ClearNumberCycles

func (ducu *DeviceUpsterCycleUpdate) ClearNumberCycles() *DeviceUpsterCycleUpdate

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterCycleUpdate) ClearNumberRegeneration

func (ducu *DeviceUpsterCycleUpdate) ClearNumberRegeneration() *DeviceUpsterCycleUpdate

ClearNumberRegeneration clears the value of the "numberRegeneration" field.

func (*DeviceUpsterCycleUpdate) ClearNumberRinsingCycles

func (ducu *DeviceUpsterCycleUpdate) ClearNumberRinsingCycles() *DeviceUpsterCycleUpdate

ClearNumberRinsingCycles clears the value of the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpdate) ClearStatus

func (ducu *DeviceUpsterCycleUpdate) ClearStatus() *DeviceUpsterCycleUpdate

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterCycleUpdate) ClearTimestamp

func (ducu *DeviceUpsterCycleUpdate) ClearTimestamp() *DeviceUpsterCycleUpdate

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterCycleUpdate) ClearTotalOperationTime

func (ducu *DeviceUpsterCycleUpdate) ClearTotalOperationTime() *DeviceUpsterCycleUpdate

ClearTotalOperationTime clears the value of the "totalOperationTime" field.

func (*DeviceUpsterCycleUpdate) Exec

func (ducu *DeviceUpsterCycleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceUpsterCycleUpdate) ExecContext

func (c *DeviceUpsterCycleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleUpdate) ExecX

func (ducu *DeviceUpsterCycleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleUpdate) Modify

func (ducu *DeviceUpsterCycleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceUpsterCycleUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceUpsterCycleUpdate) Mutation

Mutation returns the DeviceUpsterCycleMutation object of the builder.

func (*DeviceUpsterCycleUpdate) QueryContext

func (c *DeviceUpsterCycleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleUpdate) Save

func (ducu *DeviceUpsterCycleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceUpsterCycleUpdate) SaveX

func (ducu *DeviceUpsterCycleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceUpsterCycleUpdate) SetDeviceName

func (ducu *DeviceUpsterCycleUpdate) SetDeviceName(s string) *DeviceUpsterCycleUpdate

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterCycleUpdate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterCycleUpdate) SetNillableDeviceName

func (ducu *DeviceUpsterCycleUpdate) SetNillableDeviceName(s *string) *DeviceUpsterCycleUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableIotID

func (ducu *DeviceUpsterCycleUpdate) SetNillableIotID(s *string) *DeviceUpsterCycleUpdate

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableNumber1

func (ducu *DeviceUpsterCycleUpdate) SetNillableNumber1(i *int32) *DeviceUpsterCycleUpdate

SetNillableNumber1 sets the "number1" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableNumber2

func (ducu *DeviceUpsterCycleUpdate) SetNillableNumber2(i *int32) *DeviceUpsterCycleUpdate

SetNillableNumber2 sets the "number2" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableNumber3

func (ducu *DeviceUpsterCycleUpdate) SetNillableNumber3(i *int32) *DeviceUpsterCycleUpdate

SetNillableNumber3 sets the "number3" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableNumberCycles

func (ducu *DeviceUpsterCycleUpdate) SetNillableNumberCycles(i *int32) *DeviceUpsterCycleUpdate

SetNillableNumberCycles sets the "numberCycles" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableNumberRegeneration

func (ducu *DeviceUpsterCycleUpdate) SetNillableNumberRegeneration(i *int32) *DeviceUpsterCycleUpdate

SetNillableNumberRegeneration sets the "numberRegeneration" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableNumberRinsingCycles

func (ducu *DeviceUpsterCycleUpdate) SetNillableNumberRinsingCycles(i *int32) *DeviceUpsterCycleUpdate

SetNillableNumberRinsingCycles sets the "numberRinsingCycles" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableProductKey

func (ducu *DeviceUpsterCycleUpdate) SetNillableProductKey(s *string) *DeviceUpsterCycleUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableSort

func (ducu *DeviceUpsterCycleUpdate) SetNillableSort(u *uint32) *DeviceUpsterCycleUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableStatus

func (ducu *DeviceUpsterCycleUpdate) SetNillableStatus(u *uint8) *DeviceUpsterCycleUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableTimestamp

func (ducu *DeviceUpsterCycleUpdate) SetNillableTimestamp(s *string) *DeviceUpsterCycleUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNillableTotalOperationTime

func (ducu *DeviceUpsterCycleUpdate) SetNillableTotalOperationTime(i *int32) *DeviceUpsterCycleUpdate

SetNillableTotalOperationTime sets the "totalOperationTime" field if the given value is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilDeviceName

func (duc *DeviceUpsterCycleUpdate) SetNotNilDeviceName(value *string) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilIotID

func (duc *DeviceUpsterCycleUpdate) SetNotNilIotID(value *string) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilNumber1

func (duc *DeviceUpsterCycleUpdate) SetNotNilNumber1(value *int32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilNumber2

func (duc *DeviceUpsterCycleUpdate) SetNotNilNumber2(value *int32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilNumber3

func (duc *DeviceUpsterCycleUpdate) SetNotNilNumber3(value *int32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilNumberCycles

func (duc *DeviceUpsterCycleUpdate) SetNotNilNumberCycles(value *int32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilNumberRegeneration

func (duc *DeviceUpsterCycleUpdate) SetNotNilNumberRegeneration(value *int32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilNumberRinsingCycles

func (duc *DeviceUpsterCycleUpdate) SetNotNilNumberRinsingCycles(value *int32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilProductKey

func (duc *DeviceUpsterCycleUpdate) SetNotNilProductKey(value *string) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilSort

func (duc *DeviceUpsterCycleUpdate) SetNotNilSort(value *uint32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilStatus

func (duc *DeviceUpsterCycleUpdate) SetNotNilStatus(value *uint8) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilTimestamp

func (duc *DeviceUpsterCycleUpdate) SetNotNilTimestamp(value *string) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilTotalOperationTime

func (duc *DeviceUpsterCycleUpdate) SetNotNilTotalOperationTime(value *int32) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNotNilUpdatedAt

func (duc *DeviceUpsterCycleUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceUpsterCycleUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdate) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterCycleUpdate) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterCycleUpdate) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterCycleUpdate) SetNumberCycles

func (ducu *DeviceUpsterCycleUpdate) SetNumberCycles(i int32) *DeviceUpsterCycleUpdate

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterCycleUpdate) SetNumberRegeneration

func (ducu *DeviceUpsterCycleUpdate) SetNumberRegeneration(i int32) *DeviceUpsterCycleUpdate

SetNumberRegeneration sets the "numberRegeneration" field.

func (*DeviceUpsterCycleUpdate) SetNumberRinsingCycles

func (ducu *DeviceUpsterCycleUpdate) SetNumberRinsingCycles(i int32) *DeviceUpsterCycleUpdate

SetNumberRinsingCycles sets the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpdate) SetProductKey

func (ducu *DeviceUpsterCycleUpdate) SetProductKey(s string) *DeviceUpsterCycleUpdate

SetProductKey sets the "productKey" field.

func (*DeviceUpsterCycleUpdate) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterCycleUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterCycleUpdate) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterCycleUpdate) SetTotalOperationTime

func (ducu *DeviceUpsterCycleUpdate) SetTotalOperationTime(i int32) *DeviceUpsterCycleUpdate

SetTotalOperationTime sets the "totalOperationTime" field.

func (*DeviceUpsterCycleUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterCycleUpdate) Where

Where appends a list predicates to the DeviceUpsterCycleUpdate builder.

type DeviceUpsterCycleUpdateOne

type DeviceUpsterCycleUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleUpdateOne is the builder for updating a single DeviceUpsterCycle entity.

func (*DeviceUpsterCycleUpdateOne) AddNumber1

AddNumber1 adds i to the "number1" field.

func (*DeviceUpsterCycleUpdateOne) AddNumber2

AddNumber2 adds i to the "number2" field.

func (*DeviceUpsterCycleUpdateOne) AddNumber3

AddNumber3 adds i to the "number3" field.

func (*DeviceUpsterCycleUpdateOne) AddNumberCycles

func (ducuo *DeviceUpsterCycleUpdateOne) AddNumberCycles(i int32) *DeviceUpsterCycleUpdateOne

AddNumberCycles adds i to the "numberCycles" field.

func (*DeviceUpsterCycleUpdateOne) AddNumberRegeneration

func (ducuo *DeviceUpsterCycleUpdateOne) AddNumberRegeneration(i int32) *DeviceUpsterCycleUpdateOne

AddNumberRegeneration adds i to the "numberRegeneration" field.

func (*DeviceUpsterCycleUpdateOne) AddNumberRinsingCycles

func (ducuo *DeviceUpsterCycleUpdateOne) AddNumberRinsingCycles(i int32) *DeviceUpsterCycleUpdateOne

AddNumberRinsingCycles adds i to the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceUpsterCycleUpdateOne) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceUpsterCycleUpdateOne) AddTotalOperationTime

func (ducuo *DeviceUpsterCycleUpdateOne) AddTotalOperationTime(i int32) *DeviceUpsterCycleUpdateOne

AddTotalOperationTime adds i to the "totalOperationTime" field.

func (*DeviceUpsterCycleUpdateOne) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterCycleUpdateOne) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterCycleUpdateOne) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterCycleUpdateOne) ClearNumberCycles

func (ducuo *DeviceUpsterCycleUpdateOne) ClearNumberCycles() *DeviceUpsterCycleUpdateOne

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterCycleUpdateOne) ClearNumberRegeneration

func (ducuo *DeviceUpsterCycleUpdateOne) ClearNumberRegeneration() *DeviceUpsterCycleUpdateOne

ClearNumberRegeneration clears the value of the "numberRegeneration" field.

func (*DeviceUpsterCycleUpdateOne) ClearNumberRinsingCycles

func (ducuo *DeviceUpsterCycleUpdateOne) ClearNumberRinsingCycles() *DeviceUpsterCycleUpdateOne

ClearNumberRinsingCycles clears the value of the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpdateOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterCycleUpdateOne) ClearTimestamp

func (ducuo *DeviceUpsterCycleUpdateOne) ClearTimestamp() *DeviceUpsterCycleUpdateOne

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterCycleUpdateOne) ClearTotalOperationTime

func (ducuo *DeviceUpsterCycleUpdateOne) ClearTotalOperationTime() *DeviceUpsterCycleUpdateOne

ClearTotalOperationTime clears the value of the "totalOperationTime" field.

func (*DeviceUpsterCycleUpdateOne) Exec

Exec executes the query on the entity.

func (*DeviceUpsterCycleUpdateOne) ExecContext

func (c *DeviceUpsterCycleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterCycleUpdateOne) ExecX

func (ducuo *DeviceUpsterCycleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleUpdateOne) Modify

func (ducuo *DeviceUpsterCycleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceUpsterCycleUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceUpsterCycleUpdateOne) Mutation

Mutation returns the DeviceUpsterCycleMutation object of the builder.

func (*DeviceUpsterCycleUpdateOne) QueryContext

func (c *DeviceUpsterCycleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterCycleUpdateOne) Save

Save executes the query and returns the updated DeviceUpsterCycle entity.

func (*DeviceUpsterCycleUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeviceUpsterCycleUpdateOne) Select

func (ducuo *DeviceUpsterCycleUpdateOne) Select(field string, fields ...string) *DeviceUpsterCycleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceUpsterCycleUpdateOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterCycleUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterCycleUpdateOne) SetNillableDeviceName

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableDeviceName(s *string) *DeviceUpsterCycleUpdateOne

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableIotID

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableIotID(s *string) *DeviceUpsterCycleUpdateOne

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableNumber1

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableNumber1(i *int32) *DeviceUpsterCycleUpdateOne

SetNillableNumber1 sets the "number1" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableNumber2

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableNumber2(i *int32) *DeviceUpsterCycleUpdateOne

SetNillableNumber2 sets the "number2" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableNumber3

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableNumber3(i *int32) *DeviceUpsterCycleUpdateOne

SetNillableNumber3 sets the "number3" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableNumberCycles

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableNumberCycles(i *int32) *DeviceUpsterCycleUpdateOne

SetNillableNumberCycles sets the "numberCycles" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableNumberRegeneration

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableNumberRegeneration(i *int32) *DeviceUpsterCycleUpdateOne

SetNillableNumberRegeneration sets the "numberRegeneration" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableNumberRinsingCycles

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableNumberRinsingCycles(i *int32) *DeviceUpsterCycleUpdateOne

SetNillableNumberRinsingCycles sets the "numberRinsingCycles" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableProductKey

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableProductKey(s *string) *DeviceUpsterCycleUpdateOne

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableSort

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableSort(u *uint32) *DeviceUpsterCycleUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableStatus

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableStatus(u *uint8) *DeviceUpsterCycleUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableTimestamp

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableTimestamp(s *string) *DeviceUpsterCycleUpdateOne

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNillableTotalOperationTime

func (ducuo *DeviceUpsterCycleUpdateOne) SetNillableTotalOperationTime(i *int32) *DeviceUpsterCycleUpdateOne

SetNillableTotalOperationTime sets the "totalOperationTime" field if the given value is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilDeviceName

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilDeviceName(value *string) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilIotID

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilIotID(value *string) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilNumber1

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilNumber1(value *int32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilNumber2

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilNumber2(value *int32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilNumber3

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilNumber3(value *int32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilNumberCycles

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilNumberCycles(value *int32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilNumberRegeneration

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilNumberRegeneration(value *int32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilNumberRinsingCycles

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilNumberRinsingCycles(value *int32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilProductKey

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilProductKey(value *string) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilSort

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilSort(value *uint32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilStatus

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilStatus(value *uint8) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilTimestamp

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilTimestamp(value *string) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilTotalOperationTime

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilTotalOperationTime(value *int32) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNotNilUpdatedAt

func (duc *DeviceUpsterCycleUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DeviceUpsterCycleUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterCycleUpdateOne) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterCycleUpdateOne) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterCycleUpdateOne) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterCycleUpdateOne) SetNumberCycles

func (ducuo *DeviceUpsterCycleUpdateOne) SetNumberCycles(i int32) *DeviceUpsterCycleUpdateOne

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterCycleUpdateOne) SetNumberRegeneration

func (ducuo *DeviceUpsterCycleUpdateOne) SetNumberRegeneration(i int32) *DeviceUpsterCycleUpdateOne

SetNumberRegeneration sets the "numberRegeneration" field.

func (*DeviceUpsterCycleUpdateOne) SetNumberRinsingCycles

func (ducuo *DeviceUpsterCycleUpdateOne) SetNumberRinsingCycles(i int32) *DeviceUpsterCycleUpdateOne

SetNumberRinsingCycles sets the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpdateOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterCycleUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterCycleUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterCycleUpdateOne) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterCycleUpdateOne) SetTotalOperationTime

func (ducuo *DeviceUpsterCycleUpdateOne) SetTotalOperationTime(i int32) *DeviceUpsterCycleUpdateOne

SetTotalOperationTime sets the "totalOperationTime" field.

func (*DeviceUpsterCycleUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterCycleUpdateOne) Where

Where appends a list predicates to the DeviceUpsterCycleUpdate builder.

type DeviceUpsterCycleUpsert

type DeviceUpsterCycleUpsert struct {
	*sql.UpdateSet
}

DeviceUpsterCycleUpsert is the "OnConflict" setter.

func (*DeviceUpsterCycleUpsert) AddNumber1

AddNumber1 adds v to the "number1" field.

func (*DeviceUpsterCycleUpsert) AddNumber2

AddNumber2 adds v to the "number2" field.

func (*DeviceUpsterCycleUpsert) AddNumber3

AddNumber3 adds v to the "number3" field.

func (*DeviceUpsterCycleUpsert) AddNumberCycles

func (u *DeviceUpsterCycleUpsert) AddNumberCycles(v int32) *DeviceUpsterCycleUpsert

AddNumberCycles adds v to the "numberCycles" field.

func (*DeviceUpsterCycleUpsert) AddNumberRegeneration

func (u *DeviceUpsterCycleUpsert) AddNumberRegeneration(v int32) *DeviceUpsterCycleUpsert

AddNumberRegeneration adds v to the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsert) AddNumberRinsingCycles

func (u *DeviceUpsterCycleUpsert) AddNumberRinsingCycles(v int32) *DeviceUpsterCycleUpsert

AddNumberRinsingCycles adds v to the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceUpsterCycleUpsert) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceUpsterCycleUpsert) AddTotalOperationTime

func (u *DeviceUpsterCycleUpsert) AddTotalOperationTime(v int32) *DeviceUpsterCycleUpsert

AddTotalOperationTime adds v to the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsert) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterCycleUpsert) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterCycleUpsert) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterCycleUpsert) ClearNumberCycles

func (u *DeviceUpsterCycleUpsert) ClearNumberCycles() *DeviceUpsterCycleUpsert

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterCycleUpsert) ClearNumberRegeneration

func (u *DeviceUpsterCycleUpsert) ClearNumberRegeneration() *DeviceUpsterCycleUpsert

ClearNumberRegeneration clears the value of the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsert) ClearNumberRinsingCycles

func (u *DeviceUpsterCycleUpsert) ClearNumberRinsingCycles() *DeviceUpsterCycleUpsert

ClearNumberRinsingCycles clears the value of the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsert) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterCycleUpsert) ClearTimestamp

func (u *DeviceUpsterCycleUpsert) ClearTimestamp() *DeviceUpsterCycleUpsert

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterCycleUpsert) ClearTotalOperationTime

func (u *DeviceUpsterCycleUpsert) ClearTotalOperationTime() *DeviceUpsterCycleUpsert

ClearTotalOperationTime clears the value of the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsert) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterCycleUpsert) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterCycleUpsert) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterCycleUpsert) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterCycleUpsert) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterCycleUpsert) SetNumberCycles

func (u *DeviceUpsterCycleUpsert) SetNumberCycles(v int32) *DeviceUpsterCycleUpsert

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterCycleUpsert) SetNumberRegeneration

func (u *DeviceUpsterCycleUpsert) SetNumberRegeneration(v int32) *DeviceUpsterCycleUpsert

SetNumberRegeneration sets the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsert) SetNumberRinsingCycles

func (u *DeviceUpsterCycleUpsert) SetNumberRinsingCycles(v int32) *DeviceUpsterCycleUpsert

SetNumberRinsingCycles sets the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsert) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterCycleUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterCycleUpsert) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterCycleUpsert) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterCycleUpsert) SetTotalOperationTime

func (u *DeviceUpsterCycleUpsert) SetTotalOperationTime(v int32) *DeviceUpsterCycleUpsert

SetTotalOperationTime sets the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterCycleUpsert) UpdateDeviceName

func (u *DeviceUpsterCycleUpsert) UpdateDeviceName() *DeviceUpsterCycleUpsert

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateNumber1

UpdateNumber1 sets the "number1" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateNumber2

UpdateNumber2 sets the "number2" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateNumber3

UpdateNumber3 sets the "number3" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateNumberCycles

func (u *DeviceUpsterCycleUpsert) UpdateNumberCycles() *DeviceUpsterCycleUpsert

UpdateNumberCycles sets the "numberCycles" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateNumberRegeneration

func (u *DeviceUpsterCycleUpsert) UpdateNumberRegeneration() *DeviceUpsterCycleUpsert

UpdateNumberRegeneration sets the "numberRegeneration" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateNumberRinsingCycles

func (u *DeviceUpsterCycleUpsert) UpdateNumberRinsingCycles() *DeviceUpsterCycleUpsert

UpdateNumberRinsingCycles sets the "numberRinsingCycles" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateProductKey

func (u *DeviceUpsterCycleUpsert) UpdateProductKey() *DeviceUpsterCycleUpsert

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateTimestamp

func (u *DeviceUpsterCycleUpsert) UpdateTimestamp() *DeviceUpsterCycleUpsert

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateTotalOperationTime

func (u *DeviceUpsterCycleUpsert) UpdateTotalOperationTime() *DeviceUpsterCycleUpsert

UpdateTotalOperationTime sets the "totalOperationTime" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsert) UpdateUpdatedAt

func (u *DeviceUpsterCycleUpsert) UpdateUpdatedAt() *DeviceUpsterCycleUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceUpsterCycleUpsertBulk

type DeviceUpsterCycleUpsertBulk struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleUpsertBulk is the builder for "upsert"-ing a bulk of DeviceUpsterCycle nodes.

func (*DeviceUpsterCycleUpsertBulk) AddNumber1

AddNumber1 adds v to the "number1" field.

func (*DeviceUpsterCycleUpsertBulk) AddNumber2

AddNumber2 adds v to the "number2" field.

func (*DeviceUpsterCycleUpsertBulk) AddNumber3

AddNumber3 adds v to the "number3" field.

func (*DeviceUpsterCycleUpsertBulk) AddNumberCycles

AddNumberCycles adds v to the "numberCycles" field.

func (*DeviceUpsterCycleUpsertBulk) AddNumberRegeneration

func (u *DeviceUpsterCycleUpsertBulk) AddNumberRegeneration(v int32) *DeviceUpsterCycleUpsertBulk

AddNumberRegeneration adds v to the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsertBulk) AddNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertBulk) AddNumberRinsingCycles(v int32) *DeviceUpsterCycleUpsertBulk

AddNumberRinsingCycles adds v to the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceUpsterCycleUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceUpsterCycleUpsertBulk) AddTotalOperationTime

func (u *DeviceUpsterCycleUpsertBulk) AddTotalOperationTime(v int32) *DeviceUpsterCycleUpsertBulk

AddTotalOperationTime adds v to the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsertBulk) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterCycleUpsertBulk) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterCycleUpsertBulk) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterCycleUpsertBulk) ClearNumberCycles

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterCycleUpsertBulk) ClearNumberRegeneration

func (u *DeviceUpsterCycleUpsertBulk) ClearNumberRegeneration() *DeviceUpsterCycleUpsertBulk

ClearNumberRegeneration clears the value of the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsertBulk) ClearNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertBulk) ClearNumberRinsingCycles() *DeviceUpsterCycleUpsertBulk

ClearNumberRinsingCycles clears the value of the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterCycleUpsertBulk) ClearTimestamp

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterCycleUpsertBulk) ClearTotalOperationTime

func (u *DeviceUpsterCycleUpsertBulk) ClearTotalOperationTime() *DeviceUpsterCycleUpsertBulk

ClearTotalOperationTime clears the value of the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceUpsterCycleUpsertBulk) Exec

Exec executes the query.

func (*DeviceUpsterCycleUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceUpsterCycle.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeviceUpsterCycleUpsertBulk) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterCycleUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterCycleUpsertBulk) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterCycleUpsertBulk) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterCycleUpsertBulk) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterCycleUpsertBulk) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterCycleUpsertBulk) SetNumberRegeneration

func (u *DeviceUpsterCycleUpsertBulk) SetNumberRegeneration(v int32) *DeviceUpsterCycleUpsertBulk

SetNumberRegeneration sets the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsertBulk) SetNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertBulk) SetNumberRinsingCycles(v int32) *DeviceUpsterCycleUpsertBulk

SetNumberRinsingCycles sets the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsertBulk) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterCycleUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterCycleUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterCycleUpsertBulk) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterCycleUpsertBulk) SetTotalOperationTime

func (u *DeviceUpsterCycleUpsertBulk) SetTotalOperationTime(v int32) *DeviceUpsterCycleUpsertBulk

SetTotalOperationTime sets the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterCycleUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeviceUpsterCycleCreateBulk.OnConflict documentation for more info.

func (*DeviceUpsterCycleUpsertBulk) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DeviceUpsterCycle.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceupstercycle.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceUpsterCycleUpsertBulk) UpdateNumber1

UpdateNumber1 sets the "number1" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateNumber2

UpdateNumber2 sets the "number2" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateNumber3

UpdateNumber3 sets the "number3" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateNumberCycles

UpdateNumberCycles sets the "numberCycles" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateNumberRegeneration

func (u *DeviceUpsterCycleUpsertBulk) UpdateNumberRegeneration() *DeviceUpsterCycleUpsertBulk

UpdateNumberRegeneration sets the "numberRegeneration" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertBulk) UpdateNumberRinsingCycles() *DeviceUpsterCycleUpsertBulk

UpdateNumberRinsingCycles sets the "numberRinsingCycles" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateTimestamp

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateTotalOperationTime

func (u *DeviceUpsterCycleUpsertBulk) UpdateTotalOperationTime() *DeviceUpsterCycleUpsertBulk

UpdateTotalOperationTime sets the "totalOperationTime" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceUpsterCycleUpsertOne

type DeviceUpsterCycleUpsertOne struct {
	// contains filtered or unexported fields
}

DeviceUpsterCycleUpsertOne is the builder for "upsert"-ing

one DeviceUpsterCycle node.

func (*DeviceUpsterCycleUpsertOne) AddNumber1

AddNumber1 adds v to the "number1" field.

func (*DeviceUpsterCycleUpsertOne) AddNumber2

AddNumber2 adds v to the "number2" field.

func (*DeviceUpsterCycleUpsertOne) AddNumber3

AddNumber3 adds v to the "number3" field.

func (*DeviceUpsterCycleUpsertOne) AddNumberCycles

AddNumberCycles adds v to the "numberCycles" field.

func (*DeviceUpsterCycleUpsertOne) AddNumberRegeneration

func (u *DeviceUpsterCycleUpsertOne) AddNumberRegeneration(v int32) *DeviceUpsterCycleUpsertOne

AddNumberRegeneration adds v to the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsertOne) AddNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertOne) AddNumberRinsingCycles(v int32) *DeviceUpsterCycleUpsertOne

AddNumberRinsingCycles adds v to the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceUpsterCycleUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceUpsterCycleUpsertOne) AddTotalOperationTime

func (u *DeviceUpsterCycleUpsertOne) AddTotalOperationTime(v int32) *DeviceUpsterCycleUpsertOne

AddTotalOperationTime adds v to the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsertOne) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterCycleUpsertOne) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterCycleUpsertOne) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterCycleUpsertOne) ClearNumberCycles

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterCycleUpsertOne) ClearNumberRegeneration

func (u *DeviceUpsterCycleUpsertOne) ClearNumberRegeneration() *DeviceUpsterCycleUpsertOne

ClearNumberRegeneration clears the value of the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsertOne) ClearNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertOne) ClearNumberRinsingCycles() *DeviceUpsterCycleUpsertOne

ClearNumberRinsingCycles clears the value of the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsertOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterCycleUpsertOne) ClearTimestamp

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterCycleUpsertOne) ClearTotalOperationTime

func (u *DeviceUpsterCycleUpsertOne) ClearTotalOperationTime() *DeviceUpsterCycleUpsertOne

ClearTotalOperationTime clears the value of the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceUpsterCycleUpsertOne) Exec

Exec executes the query.

func (*DeviceUpsterCycleUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterCycleUpsertOne) ID

func (u *DeviceUpsterCycleUpsertOne) ID(ctx context.Context) (id uint64, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceUpsterCycleUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceUpsterCycleUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceUpsterCycle.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceUpsterCycleUpsertOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterCycleUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterCycleUpsertOne) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterCycleUpsertOne) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterCycleUpsertOne) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterCycleUpsertOne) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterCycleUpsertOne) SetNumberRegeneration

func (u *DeviceUpsterCycleUpsertOne) SetNumberRegeneration(v int32) *DeviceUpsterCycleUpsertOne

SetNumberRegeneration sets the "numberRegeneration" field.

func (*DeviceUpsterCycleUpsertOne) SetNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertOne) SetNumberRinsingCycles(v int32) *DeviceUpsterCycleUpsertOne

SetNumberRinsingCycles sets the "numberRinsingCycles" field.

func (*DeviceUpsterCycleUpsertOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterCycleUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterCycleUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterCycleUpsertOne) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterCycleUpsertOne) SetTotalOperationTime

func (u *DeviceUpsterCycleUpsertOne) SetTotalOperationTime(v int32) *DeviceUpsterCycleUpsertOne

SetTotalOperationTime sets the "totalOperationTime" field.

func (*DeviceUpsterCycleUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterCycleUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeviceUpsterCycleCreate.OnConflict documentation for more info.

func (*DeviceUpsterCycleUpsertOne) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceUpsterCycle.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceupstercycle.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceUpsterCycleUpsertOne) UpdateNumber1

UpdateNumber1 sets the "number1" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateNumber2

UpdateNumber2 sets the "number2" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateNumber3

UpdateNumber3 sets the "number3" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateNumberCycles

func (u *DeviceUpsterCycleUpsertOne) UpdateNumberCycles() *DeviceUpsterCycleUpsertOne

UpdateNumberCycles sets the "numberCycles" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateNumberRegeneration

func (u *DeviceUpsterCycleUpsertOne) UpdateNumberRegeneration() *DeviceUpsterCycleUpsertOne

UpdateNumberRegeneration sets the "numberRegeneration" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateNumberRinsingCycles

func (u *DeviceUpsterCycleUpsertOne) UpdateNumberRinsingCycles() *DeviceUpsterCycleUpsertOne

UpdateNumberRinsingCycles sets the "numberRinsingCycles" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateTimestamp

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateTotalOperationTime

func (u *DeviceUpsterCycleUpsertOne) UpdateTotalOperationTime() *DeviceUpsterCycleUpsertOne

UpdateTotalOperationTime sets the "totalOperationTime" field to the value that was provided on create.

func (*DeviceUpsterCycleUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceUpsterCycles

type DeviceUpsterCycles []*DeviceUpsterCycle

DeviceUpsterCycles is a parsable slice of DeviceUpsterCycle.

type DeviceUpsterStatistics

type DeviceUpsterStatistics struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Sort Number | 排序编号
	Sort uint32 `json:"sort,omitempty"`
	// Iot Id | 设备ID
	IotID string `json:"iotID,omitempty"`
	// Device Name | 设备名称
	DeviceName string `json:"deviceName,omitempty"`
	// Product Key | 产品Key
	ProductKey string `json:"productKey,omitempty"`
	// Date | 日期
	Date string `json:"date,omitempty"`
	// Timestamp | 毫秒时间戳
	Timestamp string `json:"timestamp,omitempty"`
	// NumberOfProgramButton1 | 程序1
	Number1 int32 `json:"number1,omitempty"`
	// NumberOfProgramButton2 | 程序2
	Number2 int32 `json:"number2,omitempty"`
	// NumberOfProgramButton3 | 程序3
	Number3 int32 `json:"number3,omitempty"`
	// NumberOfProgramCycles | 程序总计数
	NumberCycles int32 `json:"numberCycles,omitempty"`
	// Hours | 每小时计数
	Hours string `json:"hours,omitempty"`
	// Initialize | 初始化
	Initialize bool `json:"initialize,omitempty"`
	// contains filtered or unexported fields
}

DeviceUpsterStatistics is the model entity for the DeviceUpsterStatistics schema.

func (*DeviceUpsterStatistics) ExecContext

func (c *DeviceUpsterStatistics) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatistics) QueryContext

func (c *DeviceUpsterStatistics) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatistics) String

func (dus *DeviceUpsterStatistics) String() string

String implements the fmt.Stringer.

func (*DeviceUpsterStatistics) Unwrap

Unwrap unwraps the DeviceUpsterStatistics entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeviceUpsterStatistics) Update

Update returns a builder for updating this DeviceUpsterStatistics. Note that you need to call DeviceUpsterStatistics.Unwrap() before calling this method if this DeviceUpsterStatistics was returned from a transaction, and the transaction was committed or rolled back.

func (*DeviceUpsterStatistics) Value

func (dus *DeviceUpsterStatistics) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DeviceUpsterStatistics. This includes values selected through modifiers, order, etc.

type DeviceUpsterStatisticsClient

type DeviceUpsterStatisticsClient struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsClient is a client for the DeviceUpsterStatistics schema.

func NewDeviceUpsterStatisticsClient

func NewDeviceUpsterStatisticsClient(c config) *DeviceUpsterStatisticsClient

NewDeviceUpsterStatisticsClient returns a client for the DeviceUpsterStatistics from the given config.

func (*DeviceUpsterStatisticsClient) Create

Create returns a builder for creating a DeviceUpsterStatistics entity.

func (*DeviceUpsterStatisticsClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeviceUpsterStatistics entities.

func (*DeviceUpsterStatisticsClient) Delete

Delete returns a delete builder for DeviceUpsterStatistics.

func (*DeviceUpsterStatisticsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceUpsterStatisticsClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceUpsterStatisticsClient) ExecContext

func (c *DeviceUpsterStatisticsClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsClient) Get

Get returns a DeviceUpsterStatistics entity by its id.

func (*DeviceUpsterStatisticsClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeviceUpsterStatisticsClient) Hooks

func (c *DeviceUpsterStatisticsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceUpsterStatisticsClient) Intercept

func (c *DeviceUpsterStatisticsClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deviceupsterstatistics.Intercept(f(g(h())))`.

func (*DeviceUpsterStatisticsClient) Interceptors

func (c *DeviceUpsterStatisticsClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceUpsterStatisticsClient) MapCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DeviceUpsterStatisticsClient) Query

Query returns a query builder for DeviceUpsterStatistics.

func (*DeviceUpsterStatisticsClient) QueryContext

func (c *DeviceUpsterStatisticsClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsClient) Update

Update returns an update builder for DeviceUpsterStatistics.

func (*DeviceUpsterStatisticsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceUpsterStatisticsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeviceUpsterStatisticsClient) Use

func (c *DeviceUpsterStatisticsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deviceupsterstatistics.Hooks(f(g(h())))`.

type DeviceUpsterStatisticsCreate

type DeviceUpsterStatisticsCreate struct {
	Table string
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsCreate is the builder for creating a DeviceUpsterStatistics entity.

func (*DeviceUpsterStatisticsCreate) Exec

Exec executes the query.

func (*DeviceUpsterStatisticsCreate) ExecContext

func (c *DeviceUpsterStatisticsCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsCreate) ExecX

func (dusc *DeviceUpsterStatisticsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsCreate) Mutation

Mutation returns the DeviceUpsterStatisticsMutation object of the builder.

func (*DeviceUpsterStatisticsCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceUpsterStatistics.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceUpsterStatisticsUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceUpsterStatisticsCreate) OnConflictColumns

func (dusc *DeviceUpsterStatisticsCreate) OnConflictColumns(columns ...string) *DeviceUpsterStatisticsUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceUpsterStatistics.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceUpsterStatisticsCreate) QueryContext

func (c *DeviceUpsterStatisticsCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsCreate) Save

Save creates the DeviceUpsterStatistics in the database.

func (*DeviceUpsterStatisticsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeviceUpsterStatisticsCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeviceUpsterStatisticsCreate) SetDate

SetDate sets the "date" field.

func (*DeviceUpsterStatisticsCreate) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterStatisticsCreate) SetHours

SetHours sets the "hours" field.

func (*DeviceUpsterStatisticsCreate) SetID

SetID sets the "id" field.

func (*DeviceUpsterStatisticsCreate) SetInitialize

SetInitialize sets the "initialize" field.

func (*DeviceUpsterStatisticsCreate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterStatisticsCreate) SetNillableCreatedAt

func (dusc *DeviceUpsterStatisticsCreate) SetNillableCreatedAt(t *time.Time) *DeviceUpsterStatisticsCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableDate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableHours

SetNillableHours sets the "hours" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableInitialize

func (dusc *DeviceUpsterStatisticsCreate) SetNillableInitialize(b *bool) *DeviceUpsterStatisticsCreate

SetNillableInitialize sets the "initialize" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableNumber1

func (dusc *DeviceUpsterStatisticsCreate) SetNillableNumber1(i *int32) *DeviceUpsterStatisticsCreate

SetNillableNumber1 sets the "number1" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableNumber2

func (dusc *DeviceUpsterStatisticsCreate) SetNillableNumber2(i *int32) *DeviceUpsterStatisticsCreate

SetNillableNumber2 sets the "number2" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableNumber3

func (dusc *DeviceUpsterStatisticsCreate) SetNillableNumber3(i *int32) *DeviceUpsterStatisticsCreate

SetNillableNumber3 sets the "number3" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableNumberCycles

func (dusc *DeviceUpsterStatisticsCreate) SetNillableNumberCycles(i *int32) *DeviceUpsterStatisticsCreate

SetNillableNumberCycles sets the "numberCycles" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableTimestamp

func (dusc *DeviceUpsterStatisticsCreate) SetNillableTimestamp(s *string) *DeviceUpsterStatisticsCreate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNillableUpdatedAt

func (dusc *DeviceUpsterStatisticsCreate) SetNillableUpdatedAt(t *time.Time) *DeviceUpsterStatisticsCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilDate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilDeviceName

func (dus *DeviceUpsterStatisticsCreate) SetNotNilDeviceName(value *string) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilHours

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilInitialize

func (dus *DeviceUpsterStatisticsCreate) SetNotNilInitialize(value *bool) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilIotID

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilNumber1

func (dus *DeviceUpsterStatisticsCreate) SetNotNilNumber1(value *int32) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilNumber2

func (dus *DeviceUpsterStatisticsCreate) SetNotNilNumber2(value *int32) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilNumber3

func (dus *DeviceUpsterStatisticsCreate) SetNotNilNumber3(value *int32) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilNumberCycles

func (dus *DeviceUpsterStatisticsCreate) SetNotNilNumberCycles(value *int32) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilProductKey

func (dus *DeviceUpsterStatisticsCreate) SetNotNilProductKey(value *string) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilSort

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilStatus

func (dus *DeviceUpsterStatisticsCreate) SetNotNilStatus(value *uint8) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilTimestamp

func (dus *DeviceUpsterStatisticsCreate) SetNotNilTimestamp(value *string) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNotNilUpdatedAt

func (dus *DeviceUpsterStatisticsCreate) SetNotNilUpdatedAt(value *time.Time) *DeviceUpsterStatisticsCreate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsCreate) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterStatisticsCreate) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterStatisticsCreate) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterStatisticsCreate) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterStatisticsCreate) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterStatisticsCreate) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterStatisticsCreate) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterStatisticsCreate) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterStatisticsCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterStatisticsCreate) TableName

type DeviceUpsterStatisticsCreateBulk

type DeviceUpsterStatisticsCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsCreateBulk is the builder for creating many DeviceUpsterStatistics entities in bulk.

func (*DeviceUpsterStatisticsCreateBulk) Exec

Exec executes the query.

func (*DeviceUpsterStatisticsCreateBulk) ExecContext

func (c *DeviceUpsterStatisticsCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceUpsterStatistics.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceUpsterStatisticsUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*DeviceUpsterStatisticsCreateBulk) OnConflictColumns

func (duscb *DeviceUpsterStatisticsCreateBulk) OnConflictColumns(columns ...string) *DeviceUpsterStatisticsUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceUpsterStatistics.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceUpsterStatisticsCreateBulk) QueryContext

func (c *DeviceUpsterStatisticsCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsCreateBulk) Save

Save creates the DeviceUpsterStatistics entities in the database.

func (*DeviceUpsterStatisticsCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeviceUpsterStatisticsDelete

type DeviceUpsterStatisticsDelete struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsDelete is the builder for deleting a DeviceUpsterStatistics entity.

func (*DeviceUpsterStatisticsDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceUpsterStatisticsDelete) ExecContext

func (c *DeviceUpsterStatisticsDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsDelete) QueryContext

func (c *DeviceUpsterStatisticsDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsDelete) Where

Where appends a list predicates to the DeviceUpsterStatisticsDelete builder.

type DeviceUpsterStatisticsDeleteOne

type DeviceUpsterStatisticsDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsDeleteOne is the builder for deleting a single DeviceUpsterStatistics entity.

func (*DeviceUpsterStatisticsDeleteOne) Exec

Exec executes the deletion query.

func (*DeviceUpsterStatisticsDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsDeleteOne) Where

Where appends a list predicates to the DeviceUpsterStatisticsDelete builder.

type DeviceUpsterStatisticsGroupBy

type DeviceUpsterStatisticsGroupBy struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsGroupBy is the group-by builder for DeviceUpsterStatistics entities.

func (*DeviceUpsterStatisticsGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceUpsterStatisticsGroupBy) Bool

func (s *DeviceUpsterStatisticsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) BoolX

func (s *DeviceUpsterStatisticsGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) Bools

func (s *DeviceUpsterStatisticsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) BoolsX

func (s *DeviceUpsterStatisticsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) Float64

func (s *DeviceUpsterStatisticsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) Float64X

func (s *DeviceUpsterStatisticsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) Float64s

func (s *DeviceUpsterStatisticsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) Float64sX

func (s *DeviceUpsterStatisticsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) Int

func (s *DeviceUpsterStatisticsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) IntX

func (s *DeviceUpsterStatisticsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) Ints

func (s *DeviceUpsterStatisticsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) IntsX

func (s *DeviceUpsterStatisticsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*DeviceUpsterStatisticsGroupBy) ScanX

func (s *DeviceUpsterStatisticsGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) String

func (s *DeviceUpsterStatisticsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) StringX

func (s *DeviceUpsterStatisticsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceUpsterStatisticsGroupBy) Strings

func (s *DeviceUpsterStatisticsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsGroupBy) StringsX

func (s *DeviceUpsterStatisticsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceUpsterStatisticsMutation

type DeviceUpsterStatisticsMutation struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsMutation represents an operation that mutates the DeviceUpsterStatistics nodes in the graph.

func (*DeviceUpsterStatisticsMutation) AddField

func (m *DeviceUpsterStatisticsMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceUpsterStatisticsMutation) AddNumber1

func (m *DeviceUpsterStatisticsMutation) AddNumber1(i int32)

AddNumber1 adds i to the "number1" field.

func (*DeviceUpsterStatisticsMutation) AddNumber2

func (m *DeviceUpsterStatisticsMutation) AddNumber2(i int32)

AddNumber2 adds i to the "number2" field.

func (*DeviceUpsterStatisticsMutation) AddNumber3

func (m *DeviceUpsterStatisticsMutation) AddNumber3(i int32)

AddNumber3 adds i to the "number3" field.

func (*DeviceUpsterStatisticsMutation) AddNumberCycles

func (m *DeviceUpsterStatisticsMutation) AddNumberCycles(i int32)

AddNumberCycles adds i to the "numberCycles" field.

func (*DeviceUpsterStatisticsMutation) AddSort

func (m *DeviceUpsterStatisticsMutation) AddSort(u int32)

AddSort adds u to the "sort" field.

func (*DeviceUpsterStatisticsMutation) AddStatus

func (m *DeviceUpsterStatisticsMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*DeviceUpsterStatisticsMutation) AddedEdges

func (m *DeviceUpsterStatisticsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceUpsterStatisticsMutation) AddedField

func (m *DeviceUpsterStatisticsMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceUpsterStatisticsMutation) AddedFields

func (m *DeviceUpsterStatisticsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceUpsterStatisticsMutation) AddedIDs

func (m *DeviceUpsterStatisticsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceUpsterStatisticsMutation) AddedNumber1

func (m *DeviceUpsterStatisticsMutation) AddedNumber1() (r int32, exists bool)

AddedNumber1 returns the value that was added to the "number1" field in this mutation.

func (*DeviceUpsterStatisticsMutation) AddedNumber2

func (m *DeviceUpsterStatisticsMutation) AddedNumber2() (r int32, exists bool)

AddedNumber2 returns the value that was added to the "number2" field in this mutation.

func (*DeviceUpsterStatisticsMutation) AddedNumber3

func (m *DeviceUpsterStatisticsMutation) AddedNumber3() (r int32, exists bool)

AddedNumber3 returns the value that was added to the "number3" field in this mutation.

func (*DeviceUpsterStatisticsMutation) AddedNumberCycles

func (m *DeviceUpsterStatisticsMutation) AddedNumberCycles() (r int32, exists bool)

AddedNumberCycles returns the value that was added to the "numberCycles" field in this mutation.

func (*DeviceUpsterStatisticsMutation) AddedSort

func (m *DeviceUpsterStatisticsMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*DeviceUpsterStatisticsMutation) AddedStatus

func (m *DeviceUpsterStatisticsMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*DeviceUpsterStatisticsMutation) ClearDate

func (m *DeviceUpsterStatisticsMutation) ClearDate()

ClearDate clears the value of the "date" field.

func (*DeviceUpsterStatisticsMutation) ClearEdge

func (m *DeviceUpsterStatisticsMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeviceUpsterStatisticsMutation) ClearField

func (m *DeviceUpsterStatisticsMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceUpsterStatisticsMutation) ClearHours

func (m *DeviceUpsterStatisticsMutation) ClearHours()

ClearHours clears the value of the "hours" field.

func (*DeviceUpsterStatisticsMutation) ClearInitialize

func (m *DeviceUpsterStatisticsMutation) ClearInitialize()

ClearInitialize clears the value of the "initialize" field.

func (*DeviceUpsterStatisticsMutation) ClearNumber1

func (m *DeviceUpsterStatisticsMutation) ClearNumber1()

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterStatisticsMutation) ClearNumber2

func (m *DeviceUpsterStatisticsMutation) ClearNumber2()

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterStatisticsMutation) ClearNumber3

func (m *DeviceUpsterStatisticsMutation) ClearNumber3()

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterStatisticsMutation) ClearNumberCycles

func (m *DeviceUpsterStatisticsMutation) ClearNumberCycles()

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterStatisticsMutation) ClearStatus

func (m *DeviceUpsterStatisticsMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterStatisticsMutation) ClearTimestamp

func (m *DeviceUpsterStatisticsMutation) ClearTimestamp()

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterStatisticsMutation) ClearedEdges

func (m *DeviceUpsterStatisticsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) ClearedFields

func (m *DeviceUpsterStatisticsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceUpsterStatisticsMutation) 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 (*DeviceUpsterStatisticsMutation) CreatedAt

func (m *DeviceUpsterStatisticsMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceUpsterStatisticsMutation) Date

func (m *DeviceUpsterStatisticsMutation) Date() (r string, exists bool)

Date returns the value of the "date" field in the mutation.

func (*DeviceUpsterStatisticsMutation) DateCleared

func (m *DeviceUpsterStatisticsMutation) DateCleared() bool

DateCleared returns if the "date" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) DeviceName

func (m *DeviceUpsterStatisticsMutation) DeviceName() (r string, exists bool)

DeviceName returns the value of the "deviceName" field in the mutation.

func (*DeviceUpsterStatisticsMutation) EdgeCleared

func (m *DeviceUpsterStatisticsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) ExecContext

func (c *DeviceUpsterStatisticsMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsMutation) Field

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeviceUpsterStatisticsMutation) FieldCleared

func (m *DeviceUpsterStatisticsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) Fields

func (m *DeviceUpsterStatisticsMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeviceUpsterStatisticsMutation) Hours

func (m *DeviceUpsterStatisticsMutation) Hours() (r string, exists bool)

Hours returns the value of the "hours" field in the mutation.

func (*DeviceUpsterStatisticsMutation) HoursCleared

func (m *DeviceUpsterStatisticsMutation) HoursCleared() bool

HoursCleared returns if the "hours" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) ID

func (m *DeviceUpsterStatisticsMutation) ID() (id uint64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeviceUpsterStatisticsMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeviceUpsterStatisticsMutation) Initialize

func (m *DeviceUpsterStatisticsMutation) Initialize() (r bool, exists bool)

Initialize returns the value of the "initialize" field in the mutation.

func (*DeviceUpsterStatisticsMutation) InitializeCleared

func (m *DeviceUpsterStatisticsMutation) InitializeCleared() bool

InitializeCleared returns if the "initialize" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) IotID

func (m *DeviceUpsterStatisticsMutation) IotID() (r string, exists bool)

IotID returns the value of the "iotID" field in the mutation.

func (*DeviceUpsterStatisticsMutation) Number1

func (m *DeviceUpsterStatisticsMutation) Number1() (r int32, exists bool)

Number1 returns the value of the "number1" field in the mutation.

func (*DeviceUpsterStatisticsMutation) Number1Cleared

func (m *DeviceUpsterStatisticsMutation) Number1Cleared() bool

Number1Cleared returns if the "number1" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) Number2

func (m *DeviceUpsterStatisticsMutation) Number2() (r int32, exists bool)

Number2 returns the value of the "number2" field in the mutation.

func (*DeviceUpsterStatisticsMutation) Number2Cleared

func (m *DeviceUpsterStatisticsMutation) Number2Cleared() bool

Number2Cleared returns if the "number2" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) Number3

func (m *DeviceUpsterStatisticsMutation) Number3() (r int32, exists bool)

Number3 returns the value of the "number3" field in the mutation.

func (*DeviceUpsterStatisticsMutation) Number3Cleared

func (m *DeviceUpsterStatisticsMutation) Number3Cleared() bool

Number3Cleared returns if the "number3" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) NumberCycles

func (m *DeviceUpsterStatisticsMutation) NumberCycles() (r int32, exists bool)

NumberCycles returns the value of the "numberCycles" field in the mutation.

func (*DeviceUpsterStatisticsMutation) NumberCyclesCleared

func (m *DeviceUpsterStatisticsMutation) NumberCyclesCleared() bool

NumberCyclesCleared returns if the "numberCycles" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) OldCreatedAt

func (m *DeviceUpsterStatisticsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldDate

func (m *DeviceUpsterStatisticsMutation) OldDate(ctx context.Context) (v string, err error)

OldDate returns the old "date" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldDeviceName

func (m *DeviceUpsterStatisticsMutation) OldDeviceName(ctx context.Context) (v string, err error)

OldDeviceName returns the old "deviceName" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeviceUpsterStatisticsMutation) OldHours

func (m *DeviceUpsterStatisticsMutation) OldHours(ctx context.Context) (v string, err error)

OldHours returns the old "hours" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldInitialize

func (m *DeviceUpsterStatisticsMutation) OldInitialize(ctx context.Context) (v bool, err error)

OldInitialize returns the old "initialize" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldIotID

func (m *DeviceUpsterStatisticsMutation) OldIotID(ctx context.Context) (v string, err error)

OldIotID returns the old "iotID" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldNumber1

func (m *DeviceUpsterStatisticsMutation) OldNumber1(ctx context.Context) (v int32, err error)

OldNumber1 returns the old "number1" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldNumber2

func (m *DeviceUpsterStatisticsMutation) OldNumber2(ctx context.Context) (v int32, err error)

OldNumber2 returns the old "number2" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldNumber3

func (m *DeviceUpsterStatisticsMutation) OldNumber3(ctx context.Context) (v int32, err error)

OldNumber3 returns the old "number3" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldNumberCycles

func (m *DeviceUpsterStatisticsMutation) OldNumberCycles(ctx context.Context) (v int32, err error)

OldNumberCycles returns the old "numberCycles" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldProductKey

func (m *DeviceUpsterStatisticsMutation) OldProductKey(ctx context.Context) (v string, err error)

OldProductKey returns the old "productKey" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldSort

func (m *DeviceUpsterStatisticsMutation) OldSort(ctx context.Context) (v uint32, err error)

OldSort returns the old "sort" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldStatus

func (m *DeviceUpsterStatisticsMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldTimestamp

func (m *DeviceUpsterStatisticsMutation) OldTimestamp(ctx context.Context) (v string, err error)

OldTimestamp returns the old "timestamp" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) OldUpdatedAt

func (m *DeviceUpsterStatisticsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeviceUpsterStatistics entity. If the DeviceUpsterStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeviceUpsterStatisticsMutation) Op

Op returns the operation name.

func (*DeviceUpsterStatisticsMutation) ProductKey

func (m *DeviceUpsterStatisticsMutation) ProductKey() (r string, exists bool)

ProductKey returns the value of the "productKey" field in the mutation.

func (*DeviceUpsterStatisticsMutation) QueryContext

func (c *DeviceUpsterStatisticsMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsMutation) RemovedEdges

func (m *DeviceUpsterStatisticsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceUpsterStatisticsMutation) RemovedIDs

func (m *DeviceUpsterStatisticsMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeviceUpsterStatisticsMutation) ResetCreatedAt

func (m *DeviceUpsterStatisticsMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceUpsterStatisticsMutation) ResetDate

func (m *DeviceUpsterStatisticsMutation) ResetDate()

ResetDate resets all changes to the "date" field.

func (*DeviceUpsterStatisticsMutation) ResetDeviceName

func (m *DeviceUpsterStatisticsMutation) ResetDeviceName()

ResetDeviceName resets all changes to the "deviceName" field.

func (*DeviceUpsterStatisticsMutation) ResetEdge

func (m *DeviceUpsterStatisticsMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeviceUpsterStatisticsMutation) ResetField

func (m *DeviceUpsterStatisticsMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeviceUpsterStatisticsMutation) ResetHours

func (m *DeviceUpsterStatisticsMutation) ResetHours()

ResetHours resets all changes to the "hours" field.

func (*DeviceUpsterStatisticsMutation) ResetInitialize

func (m *DeviceUpsterStatisticsMutation) ResetInitialize()

ResetInitialize resets all changes to the "initialize" field.

func (*DeviceUpsterStatisticsMutation) ResetIotID

func (m *DeviceUpsterStatisticsMutation) ResetIotID()

ResetIotID resets all changes to the "iotID" field.

func (*DeviceUpsterStatisticsMutation) ResetNumber1

func (m *DeviceUpsterStatisticsMutation) ResetNumber1()

ResetNumber1 resets all changes to the "number1" field.

func (*DeviceUpsterStatisticsMutation) ResetNumber2

func (m *DeviceUpsterStatisticsMutation) ResetNumber2()

ResetNumber2 resets all changes to the "number2" field.

func (*DeviceUpsterStatisticsMutation) ResetNumber3

func (m *DeviceUpsterStatisticsMutation) ResetNumber3()

ResetNumber3 resets all changes to the "number3" field.

func (*DeviceUpsterStatisticsMutation) ResetNumberCycles

func (m *DeviceUpsterStatisticsMutation) ResetNumberCycles()

ResetNumberCycles resets all changes to the "numberCycles" field.

func (*DeviceUpsterStatisticsMutation) ResetProductKey

func (m *DeviceUpsterStatisticsMutation) ResetProductKey()

ResetProductKey resets all changes to the "productKey" field.

func (*DeviceUpsterStatisticsMutation) ResetSort

func (m *DeviceUpsterStatisticsMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*DeviceUpsterStatisticsMutation) ResetStatus

func (m *DeviceUpsterStatisticsMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeviceUpsterStatisticsMutation) ResetTimestamp

func (m *DeviceUpsterStatisticsMutation) ResetTimestamp()

ResetTimestamp resets all changes to the "timestamp" field.

func (*DeviceUpsterStatisticsMutation) ResetUpdatedAt

func (m *DeviceUpsterStatisticsMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceUpsterStatisticsMutation) SetCreatedAt

func (m *DeviceUpsterStatisticsMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeviceUpsterStatisticsMutation) SetDate

func (m *DeviceUpsterStatisticsMutation) SetDate(s string)

SetDate sets the "date" field.

func (*DeviceUpsterStatisticsMutation) SetDeviceName

func (m *DeviceUpsterStatisticsMutation) SetDeviceName(s string)

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterStatisticsMutation) SetField

func (m *DeviceUpsterStatisticsMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeviceUpsterStatisticsMutation) SetHours

func (m *DeviceUpsterStatisticsMutation) SetHours(s string)

SetHours sets the "hours" field.

func (*DeviceUpsterStatisticsMutation) SetID

SetID sets the value of the id field. Note that this operation is only accepted on creation of DeviceUpsterStatistics entities.

func (*DeviceUpsterStatisticsMutation) SetInitialize

func (m *DeviceUpsterStatisticsMutation) SetInitialize(b bool)

SetInitialize sets the "initialize" field.

func (*DeviceUpsterStatisticsMutation) SetIotID

func (m *DeviceUpsterStatisticsMutation) SetIotID(s string)

SetIotID sets the "iotID" field.

func (*DeviceUpsterStatisticsMutation) SetNumber1

func (m *DeviceUpsterStatisticsMutation) SetNumber1(i int32)

SetNumber1 sets the "number1" field.

func (*DeviceUpsterStatisticsMutation) SetNumber2

func (m *DeviceUpsterStatisticsMutation) SetNumber2(i int32)

SetNumber2 sets the "number2" field.

func (*DeviceUpsterStatisticsMutation) SetNumber3

func (m *DeviceUpsterStatisticsMutation) SetNumber3(i int32)

SetNumber3 sets the "number3" field.

func (*DeviceUpsterStatisticsMutation) SetNumberCycles

func (m *DeviceUpsterStatisticsMutation) SetNumberCycles(i int32)

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterStatisticsMutation) SetOp

func (m *DeviceUpsterStatisticsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceUpsterStatisticsMutation) SetProductKey

func (m *DeviceUpsterStatisticsMutation) SetProductKey(s string)

SetProductKey sets the "productKey" field.

func (*DeviceUpsterStatisticsMutation) SetSort

func (m *DeviceUpsterStatisticsMutation) SetSort(u uint32)

SetSort sets the "sort" field.

func (*DeviceUpsterStatisticsMutation) SetStatus

func (m *DeviceUpsterStatisticsMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*DeviceUpsterStatisticsMutation) SetTimestamp

func (m *DeviceUpsterStatisticsMutation) SetTimestamp(s string)

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterStatisticsMutation) SetUpdatedAt

func (m *DeviceUpsterStatisticsMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterStatisticsMutation) Sort

func (m *DeviceUpsterStatisticsMutation) Sort() (r uint32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*DeviceUpsterStatisticsMutation) Status

func (m *DeviceUpsterStatisticsMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DeviceUpsterStatisticsMutation) StatusCleared

func (m *DeviceUpsterStatisticsMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*DeviceUpsterStatisticsMutation) Timestamp

func (m *DeviceUpsterStatisticsMutation) Timestamp() (r string, exists bool)

Timestamp returns the value of the "timestamp" field in the mutation.

func (*DeviceUpsterStatisticsMutation) TimestampCleared

func (m *DeviceUpsterStatisticsMutation) TimestampCleared() bool

TimestampCleared returns if the "timestamp" field was cleared in this mutation.

func (DeviceUpsterStatisticsMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceUpsterStatisticsMutation) Type

Type returns the node type of this mutation (DeviceUpsterStatistics).

func (*DeviceUpsterStatisticsMutation) UpdatedAt

func (m *DeviceUpsterStatisticsMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceUpsterStatisticsMutation) Where

Where appends a list predicates to the DeviceUpsterStatisticsMutation builder.

func (*DeviceUpsterStatisticsMutation) WhereP

func (m *DeviceUpsterStatisticsMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceUpsterStatisticsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceUpsterStatisticsPageList

type DeviceUpsterStatisticsPageList struct {
	List        []*DeviceUpsterStatistics `json:"list"`
	PageDetails *PageDetails              `json:"pageDetails"`
}

DeviceUpsterStatisticsPageList is DeviceUpsterStatistics PageList result.

type DeviceUpsterStatisticsPager

type DeviceUpsterStatisticsPager struct {
	Order  deviceupsterstatistics.OrderOption
	Filter func(*DeviceUpsterStatisticsQuery) (*DeviceUpsterStatisticsQuery, error)
}

func (*DeviceUpsterStatisticsPager) ApplyFilter

type DeviceUpsterStatisticsPaginateOption

type DeviceUpsterStatisticsPaginateOption func(*DeviceUpsterStatisticsPager)

DeviceUpsterStatisticsPaginateOption enables pagination customization.

type DeviceUpsterStatisticsQuery

type DeviceUpsterStatisticsQuery struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsQuery is the builder for querying DeviceUpsterStatistics entities.

func (*DeviceUpsterStatisticsQuery) Aggregate

Aggregate returns a DeviceUpsterStatisticsSelect configured with the given aggregations.

func (*DeviceUpsterStatisticsQuery) All

All executes the query and returns a list of DeviceUpsterStatisticsSlice.

func (*DeviceUpsterStatisticsQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) Clone

Clone returns a duplicate of the DeviceUpsterStatisticsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceUpsterStatisticsQuery) Count

func (dusq *DeviceUpsterStatisticsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceUpsterStatisticsQuery) CountX

func (dusq *DeviceUpsterStatisticsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) ExecContext

func (c *DeviceUpsterStatisticsQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsQuery) Exist

Exist returns true if the query has elements in the graph.

func (*DeviceUpsterStatisticsQuery) ExistX

func (dusq *DeviceUpsterStatisticsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) First

First returns the first DeviceUpsterStatistics entity from the query. Returns a *NotFoundError when no DeviceUpsterStatistics was found.

func (*DeviceUpsterStatisticsQuery) FirstID

func (dusq *DeviceUpsterStatisticsQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first DeviceUpsterStatistics ID from the query. Returns a *NotFoundError when no DeviceUpsterStatistics ID was found.

func (*DeviceUpsterStatisticsQuery) FirstIDX

func (dusq *DeviceUpsterStatisticsQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) GroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceUpsterStatistics.Query().
	GroupBy(deviceupsterstatistics.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceUpsterStatisticsQuery) IDs

func (dusq *DeviceUpsterStatisticsQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of DeviceUpsterStatistics IDs.

func (*DeviceUpsterStatisticsQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) Limit

Limit the number of records to be returned by this query.

func (*DeviceUpsterStatisticsQuery) Modify

func (dusq *DeviceUpsterStatisticsQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceUpsterStatisticsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DeviceUpsterStatisticsQuery) Offset

Offset to start from.

func (*DeviceUpsterStatisticsQuery) Only

Only returns a single DeviceUpsterStatistics entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceUpsterStatistics entity is found. Returns a *NotFoundError when no DeviceUpsterStatistics entities are found.

func (*DeviceUpsterStatisticsQuery) OnlyID

func (dusq *DeviceUpsterStatisticsQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only DeviceUpsterStatistics ID in the query. Returns a *NotSingularError when more than one DeviceUpsterStatistics ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceUpsterStatisticsQuery) OnlyIDX

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeviceUpsterStatisticsQuery) Order

Order specifies how the records should be ordered.

func (*DeviceUpsterStatisticsQuery) Page

func (*DeviceUpsterStatisticsQuery) QueryContext

func (c *DeviceUpsterStatisticsQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.DeviceUpsterStatistics.Query().
	Select(deviceupsterstatistics.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeviceUpsterStatisticsQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeviceUpsterStatisticsQuery) Where

Where adds a new predicate for the DeviceUpsterStatisticsQuery builder.

type DeviceUpsterStatisticsSelect

type DeviceUpsterStatisticsSelect struct {
	*DeviceUpsterStatisticsQuery
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsSelect is the builder for selecting fields of DeviceUpsterStatistics entities.

func (*DeviceUpsterStatisticsSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceUpsterStatisticsSelect) Bool

func (s *DeviceUpsterStatisticsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) BoolX

func (s *DeviceUpsterStatisticsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceUpsterStatisticsSelect) Bools

func (s *DeviceUpsterStatisticsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) BoolsX

func (s *DeviceUpsterStatisticsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeviceUpsterStatisticsSelect) ExecContext

func (c DeviceUpsterStatisticsSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsSelect) Float64

func (s *DeviceUpsterStatisticsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) Float64X

func (s *DeviceUpsterStatisticsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceUpsterStatisticsSelect) Float64s

func (s *DeviceUpsterStatisticsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) Float64sX

func (s *DeviceUpsterStatisticsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceUpsterStatisticsSelect) Int

func (s *DeviceUpsterStatisticsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) IntX

func (s *DeviceUpsterStatisticsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceUpsterStatisticsSelect) Ints

func (s *DeviceUpsterStatisticsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) IntsX

func (s *DeviceUpsterStatisticsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceUpsterStatisticsSelect) Modify

func (duss *DeviceUpsterStatisticsSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceUpsterStatisticsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (DeviceUpsterStatisticsSelect) QueryContext

func (c DeviceUpsterStatisticsSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*DeviceUpsterStatisticsSelect) ScanX

func (s *DeviceUpsterStatisticsSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceUpsterStatisticsSelect) String

func (s *DeviceUpsterStatisticsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) StringX

func (s *DeviceUpsterStatisticsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceUpsterStatisticsSelect) Strings

func (s *DeviceUpsterStatisticsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceUpsterStatisticsSelect) StringsX

func (s *DeviceUpsterStatisticsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceUpsterStatisticsSlice

type DeviceUpsterStatisticsSlice []*DeviceUpsterStatistics

DeviceUpsterStatisticsSlice is a parsable slice of DeviceUpsterStatistics.

type DeviceUpsterStatisticsUpdate

type DeviceUpsterStatisticsUpdate struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsUpdate is the builder for updating DeviceUpsterStatistics entities.

func (*DeviceUpsterStatisticsUpdate) AddNumber1

AddNumber1 adds i to the "number1" field.

func (*DeviceUpsterStatisticsUpdate) AddNumber2

AddNumber2 adds i to the "number2" field.

func (*DeviceUpsterStatisticsUpdate) AddNumber3

AddNumber3 adds i to the "number3" field.

func (*DeviceUpsterStatisticsUpdate) AddNumberCycles

AddNumberCycles adds i to the "numberCycles" field.

func (*DeviceUpsterStatisticsUpdate) AddSort

AddSort adds u to the "sort" field.

func (*DeviceUpsterStatisticsUpdate) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceUpsterStatisticsUpdate) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceUpsterStatisticsUpdate) ClearHours

ClearHours clears the value of the "hours" field.

func (*DeviceUpsterStatisticsUpdate) ClearInitialize

ClearInitialize clears the value of the "initialize" field.

func (*DeviceUpsterStatisticsUpdate) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterStatisticsUpdate) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterStatisticsUpdate) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterStatisticsUpdate) ClearNumberCycles

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterStatisticsUpdate) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterStatisticsUpdate) ClearTimestamp

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterStatisticsUpdate) Exec

Exec executes the query.

func (*DeviceUpsterStatisticsUpdate) ExecContext

func (c *DeviceUpsterStatisticsUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsUpdate) ExecX

func (dusu *DeviceUpsterStatisticsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsUpdate) Modify

func (dusu *DeviceUpsterStatisticsUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceUpsterStatisticsUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceUpsterStatisticsUpdate) Mutation

Mutation returns the DeviceUpsterStatisticsMutation object of the builder.

func (*DeviceUpsterStatisticsUpdate) QueryContext

func (c *DeviceUpsterStatisticsUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceUpsterStatisticsUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeviceUpsterStatisticsUpdate) SetDate

SetDate sets the "date" field.

func (*DeviceUpsterStatisticsUpdate) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterStatisticsUpdate) SetHours

SetHours sets the "hours" field.

func (*DeviceUpsterStatisticsUpdate) SetInitialize

SetInitialize sets the "initialize" field.

func (*DeviceUpsterStatisticsUpdate) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterStatisticsUpdate) SetNillableDate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableDeviceName

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableDeviceName(s *string) *DeviceUpsterStatisticsUpdate

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableHours

SetNillableHours sets the "hours" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableInitialize

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableInitialize(b *bool) *DeviceUpsterStatisticsUpdate

SetNillableInitialize sets the "initialize" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableIotID

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableNumber1

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableNumber1(i *int32) *DeviceUpsterStatisticsUpdate

SetNillableNumber1 sets the "number1" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableNumber2

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableNumber2(i *int32) *DeviceUpsterStatisticsUpdate

SetNillableNumber2 sets the "number2" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableNumber3

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableNumber3(i *int32) *DeviceUpsterStatisticsUpdate

SetNillableNumber3 sets the "number3" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableNumberCycles

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableNumberCycles(i *int32) *DeviceUpsterStatisticsUpdate

SetNillableNumberCycles sets the "numberCycles" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableProductKey

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableProductKey(s *string) *DeviceUpsterStatisticsUpdate

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNillableTimestamp

func (dusu *DeviceUpsterStatisticsUpdate) SetNillableTimestamp(s *string) *DeviceUpsterStatisticsUpdate

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilDate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilDeviceName

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilDeviceName(value *string) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilHours

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilInitialize

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilInitialize(value *bool) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilIotID

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilNumber1

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilNumber1(value *int32) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilNumber2

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilNumber2(value *int32) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilNumber3

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilNumber3(value *int32) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilNumberCycles

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilNumberCycles(value *int32) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilProductKey

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilProductKey(value *string) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilSort

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilStatus

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilStatus(value *uint8) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilTimestamp

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilTimestamp(value *string) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNotNilUpdatedAt

func (dus *DeviceUpsterStatisticsUpdate) SetNotNilUpdatedAt(value *time.Time) *DeviceUpsterStatisticsUpdate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdate) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterStatisticsUpdate) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterStatisticsUpdate) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterStatisticsUpdate) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterStatisticsUpdate) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterStatisticsUpdate) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterStatisticsUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterStatisticsUpdate) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterStatisticsUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterStatisticsUpdate) Where

Where appends a list predicates to the DeviceUpsterStatisticsUpdate builder.

type DeviceUpsterStatisticsUpdateOne

type DeviceUpsterStatisticsUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsUpdateOne is the builder for updating a single DeviceUpsterStatistics entity.

func (*DeviceUpsterStatisticsUpdateOne) AddNumber1

AddNumber1 adds i to the "number1" field.

func (*DeviceUpsterStatisticsUpdateOne) AddNumber2

AddNumber2 adds i to the "number2" field.

func (*DeviceUpsterStatisticsUpdateOne) AddNumber3

AddNumber3 adds i to the "number3" field.

func (*DeviceUpsterStatisticsUpdateOne) AddNumberCycles

AddNumberCycles adds i to the "numberCycles" field.

func (*DeviceUpsterStatisticsUpdateOne) AddSort

AddSort adds u to the "sort" field.

func (*DeviceUpsterStatisticsUpdateOne) AddStatus

AddStatus adds u to the "status" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearHours

ClearHours clears the value of the "hours" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearInitialize

ClearInitialize clears the value of the "initialize" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearNumberCycles

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterStatisticsUpdateOne) ClearTimestamp

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterStatisticsUpdateOne) Exec

Exec executes the query on the entity.

func (*DeviceUpsterStatisticsUpdateOne) ExecContext

func (c *DeviceUpsterStatisticsUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceUpsterStatisticsUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsUpdateOne) Modify

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceUpsterStatisticsUpdateOne) Mutation

Mutation returns the DeviceUpsterStatisticsMutation object of the builder.

func (*DeviceUpsterStatisticsUpdateOne) QueryContext

func (c *DeviceUpsterStatisticsUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceUpsterStatisticsUpdateOne) Save

Save executes the query and returns the updated DeviceUpsterStatistics entity.

func (*DeviceUpsterStatisticsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeviceUpsterStatisticsUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceUpsterStatisticsUpdateOne) SetDate

SetDate sets the "date" field.

func (*DeviceUpsterStatisticsUpdateOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterStatisticsUpdateOne) SetHours

SetHours sets the "hours" field.

func (*DeviceUpsterStatisticsUpdateOne) SetInitialize

SetInitialize sets the "initialize" field.

func (*DeviceUpsterStatisticsUpdateOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableDate

SetNillableDate sets the "date" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableDeviceName

SetNillableDeviceName sets the "deviceName" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableHours

SetNillableHours sets the "hours" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableInitialize

func (dusuo *DeviceUpsterStatisticsUpdateOne) SetNillableInitialize(b *bool) *DeviceUpsterStatisticsUpdateOne

SetNillableInitialize sets the "initialize" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableIotID

SetNillableIotID sets the "iotID" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableNumber1

SetNillableNumber1 sets the "number1" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableNumber2

SetNillableNumber2 sets the "number2" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableNumber3

SetNillableNumber3 sets the "number3" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableNumberCycles

func (dusuo *DeviceUpsterStatisticsUpdateOne) SetNillableNumberCycles(i *int32) *DeviceUpsterStatisticsUpdateOne

SetNillableNumberCycles sets the "numberCycles" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableProductKey

SetNillableProductKey sets the "productKey" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNillableTimestamp

SetNillableTimestamp sets the "timestamp" field if the given value is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilDate

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilDeviceName

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilHours

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilInitialize

func (dus *DeviceUpsterStatisticsUpdateOne) SetNotNilInitialize(value *bool) *DeviceUpsterStatisticsUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilIotID

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilNumber1

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilNumber2

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilNumber3

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilNumberCycles

func (dus *DeviceUpsterStatisticsUpdateOne) SetNotNilNumberCycles(value *int32) *DeviceUpsterStatisticsUpdateOne

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilProductKey

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilSort

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilStatus

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilTimestamp

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNotNilUpdatedAt

set field if value's pointer is not nil.

func (*DeviceUpsterStatisticsUpdateOne) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterStatisticsUpdateOne) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterStatisticsUpdateOne) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterStatisticsUpdateOne) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterStatisticsUpdateOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterStatisticsUpdateOne) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterStatisticsUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterStatisticsUpdateOne) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterStatisticsUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterStatisticsUpdateOne) Where

Where appends a list predicates to the DeviceUpsterStatisticsUpdate builder.

type DeviceUpsterStatisticsUpsert

type DeviceUpsterStatisticsUpsert struct {
	*sql.UpdateSet
}

DeviceUpsterStatisticsUpsert is the "OnConflict" setter.

func (*DeviceUpsterStatisticsUpsert) AddNumber1

AddNumber1 adds v to the "number1" field.

func (*DeviceUpsterStatisticsUpsert) AddNumber2

AddNumber2 adds v to the "number2" field.

func (*DeviceUpsterStatisticsUpsert) AddNumber3

AddNumber3 adds v to the "number3" field.

func (*DeviceUpsterStatisticsUpsert) AddNumberCycles

AddNumberCycles adds v to the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsert) AddSort

AddSort adds v to the "sort" field.

func (*DeviceUpsterStatisticsUpsert) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceUpsterStatisticsUpsert) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceUpsterStatisticsUpsert) ClearHours

ClearHours clears the value of the "hours" field.

func (*DeviceUpsterStatisticsUpsert) ClearInitialize

ClearInitialize clears the value of the "initialize" field.

func (*DeviceUpsterStatisticsUpsert) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterStatisticsUpsert) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterStatisticsUpsert) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterStatisticsUpsert) ClearNumberCycles

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsert) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterStatisticsUpsert) ClearTimestamp

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterStatisticsUpsert) SetDate

SetDate sets the "date" field.

func (*DeviceUpsterStatisticsUpsert) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterStatisticsUpsert) SetHours

SetHours sets the "hours" field.

func (*DeviceUpsterStatisticsUpsert) SetInitialize

SetInitialize sets the "initialize" field.

func (*DeviceUpsterStatisticsUpsert) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterStatisticsUpsert) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterStatisticsUpsert) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterStatisticsUpsert) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterStatisticsUpsert) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsert) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterStatisticsUpsert) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterStatisticsUpsert) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterStatisticsUpsert) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterStatisticsUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterStatisticsUpsert) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateHours

UpdateHours sets the "hours" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateInitialize

UpdateInitialize sets the "initialize" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateNumber1

UpdateNumber1 sets the "number1" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateNumber2

UpdateNumber2 sets the "number2" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateNumber3

UpdateNumber3 sets the "number3" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateNumberCycles

UpdateNumberCycles sets the "numberCycles" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateTimestamp

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsert) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceUpsterStatisticsUpsertBulk

type DeviceUpsterStatisticsUpsertBulk struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsUpsertBulk is the builder for "upsert"-ing a bulk of DeviceUpsterStatistics nodes.

func (*DeviceUpsterStatisticsUpsertBulk) AddNumber1

AddNumber1 adds v to the "number1" field.

func (*DeviceUpsterStatisticsUpsertBulk) AddNumber2

AddNumber2 adds v to the "number2" field.

func (*DeviceUpsterStatisticsUpsertBulk) AddNumber3

AddNumber3 adds v to the "number3" field.

func (*DeviceUpsterStatisticsUpsertBulk) AddNumberCycles

AddNumberCycles adds v to the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsertBulk) AddSort

AddSort adds v to the "sort" field.

func (*DeviceUpsterStatisticsUpsertBulk) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearHours

ClearHours clears the value of the "hours" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearInitialize

ClearInitialize clears the value of the "initialize" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearNumberCycles

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterStatisticsUpsertBulk) ClearTimestamp

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterStatisticsUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceUpsterStatisticsUpsertBulk) Exec

Exec executes the query.

func (*DeviceUpsterStatisticsUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceUpsterStatistics.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeviceUpsterStatisticsUpsertBulk) SetDate

SetDate sets the "date" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetHours

SetHours sets the "hours" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetInitialize

SetInitialize sets the "initialize" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterStatisticsUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterStatisticsUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeviceUpsterStatisticsCreateBulk.OnConflict documentation for more info.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateHours

UpdateHours sets the "hours" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateInitialize

UpdateInitialize sets the "initialize" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DeviceUpsterStatistics.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceupsterstatistics.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceUpsterStatisticsUpsertBulk) UpdateNumber1

UpdateNumber1 sets the "number1" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateNumber2

UpdateNumber2 sets the "number2" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateNumber3

UpdateNumber3 sets the "number3" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateNumberCycles

UpdateNumberCycles sets the "numberCycles" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateTimestamp

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceUpsterStatisticsUpsertOne

type DeviceUpsterStatisticsUpsertOne struct {
	// contains filtered or unexported fields
}

DeviceUpsterStatisticsUpsertOne is the builder for "upsert"-ing

one DeviceUpsterStatistics node.

func (*DeviceUpsterStatisticsUpsertOne) AddNumber1

AddNumber1 adds v to the "number1" field.

func (*DeviceUpsterStatisticsUpsertOne) AddNumber2

AddNumber2 adds v to the "number2" field.

func (*DeviceUpsterStatisticsUpsertOne) AddNumber3

AddNumber3 adds v to the "number3" field.

func (*DeviceUpsterStatisticsUpsertOne) AddNumberCycles

AddNumberCycles adds v to the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsertOne) AddSort

AddSort adds v to the "sort" field.

func (*DeviceUpsterStatisticsUpsertOne) AddStatus

AddStatus adds v to the "status" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearDate

ClearDate clears the value of the "date" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearHours

ClearHours clears the value of the "hours" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearInitialize

ClearInitialize clears the value of the "initialize" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearNumber1

ClearNumber1 clears the value of the "number1" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearNumber2

ClearNumber2 clears the value of the "number2" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearNumber3

ClearNumber3 clears the value of the "number3" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearNumberCycles

ClearNumberCycles clears the value of the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearStatus

ClearStatus clears the value of the "status" field.

func (*DeviceUpsterStatisticsUpsertOne) ClearTimestamp

ClearTimestamp clears the value of the "timestamp" field.

func (*DeviceUpsterStatisticsUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceUpsterStatisticsUpsertOne) Exec

Exec executes the query.

func (*DeviceUpsterStatisticsUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeviceUpsterStatisticsUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceUpsterStatisticsUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceUpsterStatisticsUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceUpsterStatistics.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceUpsterStatisticsUpsertOne) SetDate

SetDate sets the "date" field.

func (*DeviceUpsterStatisticsUpsertOne) SetDeviceName

SetDeviceName sets the "deviceName" field.

func (*DeviceUpsterStatisticsUpsertOne) SetHours

SetHours sets the "hours" field.

func (*DeviceUpsterStatisticsUpsertOne) SetInitialize

SetInitialize sets the "initialize" field.

func (*DeviceUpsterStatisticsUpsertOne) SetIotID

SetIotID sets the "iotID" field.

func (*DeviceUpsterStatisticsUpsertOne) SetNumber1

SetNumber1 sets the "number1" field.

func (*DeviceUpsterStatisticsUpsertOne) SetNumber2

SetNumber2 sets the "number2" field.

func (*DeviceUpsterStatisticsUpsertOne) SetNumber3

SetNumber3 sets the "number3" field.

func (*DeviceUpsterStatisticsUpsertOne) SetNumberCycles

SetNumberCycles sets the "numberCycles" field.

func (*DeviceUpsterStatisticsUpsertOne) SetProductKey

SetProductKey sets the "productKey" field.

func (*DeviceUpsterStatisticsUpsertOne) SetSort

SetSort sets the "sort" field.

func (*DeviceUpsterStatisticsUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*DeviceUpsterStatisticsUpsertOne) SetTimestamp

SetTimestamp sets the "timestamp" field.

func (*DeviceUpsterStatisticsUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeviceUpsterStatisticsUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeviceUpsterStatisticsCreate.OnConflict documentation for more info.

func (*DeviceUpsterStatisticsUpsertOne) UpdateDate

UpdateDate sets the "date" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateDeviceName

UpdateDeviceName sets the "deviceName" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateHours

UpdateHours sets the "hours" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateInitialize

UpdateInitialize sets the "initialize" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateIotID

UpdateIotID sets the "iotID" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceUpsterStatistics.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceupsterstatistics.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceUpsterStatisticsUpsertOne) UpdateNumber1

UpdateNumber1 sets the "number1" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateNumber2

UpdateNumber2 sets the "number2" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateNumber3

UpdateNumber3 sets the "number3" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateNumberCycles

UpdateNumberCycles sets the "numberCycles" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateProductKey

UpdateProductKey sets the "productKey" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateSort

UpdateSort sets the "sort" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateStatus

UpdateStatus sets the "status" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateTimestamp

UpdateTimestamp sets the "timestamp" field to the value that was provided on create.

func (*DeviceUpsterStatisticsUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection string

OrderDirection defines the directions in which to order a list of items.

const (
	// OrderDirectionAsc specifies an ascending order.
	OrderDirectionAsc OrderDirection = "ASC"
	// OrderDirectionDesc specifies a descending order.
	OrderDirectionDesc OrderDirection = "DESC"
)

func (OrderDirection) String

func (o OrderDirection) String() string

String implements fmt.Stringer interface.

func (OrderDirection) Validate

func (o OrderDirection) Validate() error

Validate the order direction value.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type PageDetails

type PageDetails struct {
	Page  uint64 `json:"page"`
	Size  uint64 `json:"size"`
	Total uint64 `json:"total"`
}

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// DeviceDuration is the client for interacting with the DeviceDuration builders.
	DeviceDuration *DeviceDurationClient
	// DeviceDurationElephant is the client for interacting with the DeviceDurationElephant builders.
	DeviceDurationElephant *DeviceDurationElephantClient
	// DeviceEvent is the client for interacting with the DeviceEvent builders.
	DeviceEvent *DeviceEventClient
	// DeviceKpi is the client for interacting with the DeviceKpi builders.
	DeviceKpi *DeviceKpiClient
	// DeviceOfflineTime is the client for interacting with the DeviceOfflineTime builders.
	DeviceOfflineTime *DeviceOfflineTimeClient
	// DeviceOnTimeDaily is the client for interacting with the DeviceOnTimeDaily builders.
	DeviceOnTimeDaily *DeviceOnTimeDailyClient
	// DeviceOnlineTime is the client for interacting with the DeviceOnlineTime builders.
	DeviceOnlineTime *DeviceOnlineTimeClient
	// DeviceUpsterCycle is the client for interacting with the DeviceUpsterCycle builders.
	DeviceUpsterCycle *DeviceUpsterCycleClient
	// DeviceUpsterStatistics is the client for interacting with the DeviceUpsterStatistics builders.
	DeviceUpsterStatistics *DeviceUpsterStatisticsClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL