function

Virtual

func Virtual( name string, valueType ValueType, options ...CommonOption, ) Definition

Declare a computed, non-stored output field.

Source field/options.go:712

@param name
The name value.
@param valueType
The valueType value.
@param options
The options value.
@returns
The declared result.

Provide the resolver in Collection.Computed or Global.Computed.

Related types

  • ValueType

    The output type promised by a virtual field.

  • CommonOption

    Options accepted by every built-in and plugin field.

  • Definition

    An immutable authored field definition.

Related guides