intercept

package
v0.0.0-...-24d6c83 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceDurationElephantFunc

type DeviceDurationElephantFunc func(context.Context, *ent.DeviceDurationElephantQuery) (ent.Value, error)

The DeviceDurationElephantFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceDurationElephantFunc) Query

Query calls f(ctx, q).

type DeviceDurationFunc

type DeviceDurationFunc func(context.Context, *ent.DeviceDurationQuery) (ent.Value, error)

The DeviceDurationFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceDurationFunc) Query

Query calls f(ctx, q).

type DeviceEventFunc

type DeviceEventFunc func(context.Context, *ent.DeviceEventQuery) (ent.Value, error)

The DeviceEventFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceEventFunc) Query

func (f DeviceEventFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type DeviceKpiFunc

type DeviceKpiFunc func(context.Context, *ent.DeviceKpiQuery) (ent.Value, error)

The DeviceKpiFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceKpiFunc) Query

func (f DeviceKpiFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error)

Query calls f(ctx, q).

type DeviceOfflineTimeFunc

type DeviceOfflineTimeFunc func(context.Context, *ent.DeviceOfflineTimeQuery) (ent.Value, error)

The DeviceOfflineTimeFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceOfflineTimeFunc) Query

Query calls f(ctx, q).

type DeviceOnTimeDailyFunc

type DeviceOnTimeDailyFunc func(context.Context, *ent.DeviceOnTimeDailyQuery) (ent.Value, error)

The DeviceOnTimeDailyFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceOnTimeDailyFunc) Query

Query calls f(ctx, q).

type DeviceOnlineTimeFunc

type DeviceOnlineTimeFunc func(context.Context, *ent.DeviceOnlineTimeQuery) (ent.Value, error)

The DeviceOnlineTimeFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceOnlineTimeFunc) Query

Query calls f(ctx, q).

type DeviceUpsterCycleFunc

type DeviceUpsterCycleFunc func(context.Context, *ent.DeviceUpsterCycleQuery) (ent.Value, error)

The DeviceUpsterCycleFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceUpsterCycleFunc) Query

Query calls f(ctx, q).

type DeviceUpsterStatisticsFunc

type DeviceUpsterStatisticsFunc func(context.Context, *ent.DeviceUpsterStatisticsQuery) (ent.Value, error)

The DeviceUpsterStatisticsFunc type is an adapter to allow the use of ordinary function as a Querier.

func (DeviceUpsterStatisticsFunc) Query

Query calls f(ctx, q).

type Func

type Func func(context.Context, Query) error

The Func type is an adapter that allows ordinary functions to be used as interceptors. Unlike traversal functions, interceptors are skipped during graph traversals. Note that the implementation of Func is different from the one defined in entgo.io/ent.InterceptFunc.

func (Func) Intercept

func (f Func) Intercept(next ent.Querier) ent.Querier

Intercept calls f(ctx, q) and then applied the next Querier.

type Query

type Query interface {
	// Type returns the string representation of the query type.
	Type() string
	// Limit the number of records to be returned by this query.
	Limit(int)
	// Offset to start from.
	Offset(int)
	// Unique configures the query builder to filter duplicate records.
	Unique(bool)
	// Order specifies how the records should be ordered.
	Order(...func(*sql.Selector))
	// WhereP appends storage-level predicates to the query builder. Using this method, users
	// can use type-assertion to append predicates that do not depend on any generated package.
	WhereP(...func(*sql.Selector))
}

The Query interface represents an operation that queries a graph. By using this interface, users can write generic code that manipulates query builders of different types.

func NewQuery

func NewQuery(q ent.Query) (Query, error)

NewQuery returns the generic Query interface for the given typed query.

type TraverseDeviceDuration

type TraverseDeviceDuration func(context.Context, *ent.DeviceDurationQuery) error

The TraverseDeviceDuration type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceDuration) Intercept

func (f TraverseDeviceDuration) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceDuration) Traverse

func (f TraverseDeviceDuration) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseDeviceDurationElephant

type TraverseDeviceDurationElephant func(context.Context, *ent.DeviceDurationElephantQuery) error

The TraverseDeviceDurationElephant type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceDurationElephant) Intercept

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceDurationElephant) Traverse

Traverse calls f(ctx, q).

type TraverseDeviceEvent

type TraverseDeviceEvent func(context.Context, *ent.DeviceEventQuery) error

The TraverseDeviceEvent type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceEvent) Intercept

func (f TraverseDeviceEvent) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceEvent) Traverse

func (f TraverseDeviceEvent) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseDeviceKpi

type TraverseDeviceKpi func(context.Context, *ent.DeviceKpiQuery) error

The TraverseDeviceKpi type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceKpi) Intercept

func (f TraverseDeviceKpi) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceKpi) Traverse

func (f TraverseDeviceKpi) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

type TraverseDeviceOfflineTime

type TraverseDeviceOfflineTime func(context.Context, *ent.DeviceOfflineTimeQuery) error

The TraverseDeviceOfflineTime type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceOfflineTime) Intercept

func (f TraverseDeviceOfflineTime) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceOfflineTime) Traverse

Traverse calls f(ctx, q).

type TraverseDeviceOnTimeDaily

type TraverseDeviceOnTimeDaily func(context.Context, *ent.DeviceOnTimeDailyQuery) error

The TraverseDeviceOnTimeDaily type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceOnTimeDaily) Intercept

func (f TraverseDeviceOnTimeDaily) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceOnTimeDaily) Traverse

Traverse calls f(ctx, q).

type TraverseDeviceOnlineTime

type TraverseDeviceOnlineTime func(context.Context, *ent.DeviceOnlineTimeQuery) error

The TraverseDeviceOnlineTime type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceOnlineTime) Intercept

func (f TraverseDeviceOnlineTime) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceOnlineTime) Traverse

Traverse calls f(ctx, q).

type TraverseDeviceUpsterCycle

type TraverseDeviceUpsterCycle func(context.Context, *ent.DeviceUpsterCycleQuery) error

The TraverseDeviceUpsterCycle type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceUpsterCycle) Intercept

func (f TraverseDeviceUpsterCycle) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceUpsterCycle) Traverse

Traverse calls f(ctx, q).

type TraverseDeviceUpsterStatistics

type TraverseDeviceUpsterStatistics func(context.Context, *ent.DeviceUpsterStatisticsQuery) error

The TraverseDeviceUpsterStatistics type is an adapter to allow the use of ordinary function as Traverser.

func (TraverseDeviceUpsterStatistics) Intercept

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseDeviceUpsterStatistics) Traverse

Traverse calls f(ctx, q).

type TraverseFunc

type TraverseFunc func(context.Context, Query) error

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

func (TraverseFunc) Intercept

func (f TraverseFunc) Intercept(next ent.Querier) ent.Querier

Intercept is a dummy implementation of Intercept that returns the next Querier in the pipeline.

func (TraverseFunc) Traverse

func (f TraverseFunc) Traverse(ctx context.Context, q ent.Query) error

Traverse calls f(ctx, q).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL