function

Field

Field names a field by its segments, such as Field("seo", "title"). Like regexp.MustCompile, it panics when a name is malformed. Filter helpers also accept the dot-separated string "seo.title" directly; use Field when you need a Path value, such as for ListOptions.Select.

Arguments

ArgumentTypeDescription
segments[]stringThe segments value.

Returns

The declared result.

Path

Full signature

func Field(segments ...string) Path

Source query/path.go:88

Related types

  • Path

    An immutable, validated document field path.

Related guides