field

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeFieldMaskPaths

func NormalizeFieldMaskPaths(fm *fieldmaskpb.FieldMask)

NormalizeFieldMaskPaths normalizes the paths in the given FieldMask to snake_case

func NormalizePaths

func NormalizePaths(fields []string) []string

NormalizePaths 将字段路径标准化(简单地为标识符添加反引号,保留 *)。

Types

type Selector

type Selector struct{}

Selector 用于构建 InfluxDB 查询中的 SELECT 列表

func NewFieldSelector

func NewFieldSelector() *Selector

NewFieldSelector 返回一个新的 Selector。

func (Selector) BuildSelector

func (fs Selector) BuildSelector(builder *query.Builder, fields []string) (*query.Builder, error)

BuildSelector 为给定的 builder 构建 SELECT 列表并设置到 builder 中。 当 fields 为空或无有效字段时返回原 builder 和 nil 错误。 支持 "*" 表示全选(会调用 builder.Select(nil))。

Jump to

Keyboard shortcuts

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