predicate

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(n Node) (influxdb.Predicate, error)

New predicate from a node

func NodeComparison

func NodeComparison(op influxdb.Operator) (datatypes.Node_Comparison, error)

NodeComparison convert influxdb.Operator to Node_Comparison.

func NodeTypeLiteral

func NodeTypeLiteral(tr TagRuleNode) *datatypes.Node

NodeTypeLiteral convert a TagRuleNode to a nodeTypeLiteral.

Types

type LogicalNode

type LogicalNode struct {
	Operator LogicalOperator `json:"operator"`
	Children [2]Node         `json:"children"`
}

LogicalNode is a node type includes a logical expression with other nodes.

func (LogicalNode) ToDataType

func (n LogicalNode) ToDataType() (*datatypes.Node, error)

ToDataType convert a LogicalNode to datatypes.Node.

type LogicalOperator

type LogicalOperator int

LogicalOperator is a string type of logical operator.

var (
	LogicalAnd LogicalOperator = 1
)

LogicalOperators

func (LogicalOperator) Value

Value returns the node logical type.

type Node

type Node interface {
	ToDataType() (*datatypes.Node, error)
}

Node is a predicate node.

func Parse

func Parse(sts string) (n Node, err error)

Parse the predicate statement.

type TagRuleNode

type TagRuleNode influxdb.TagRule

TagRuleNode is a node type of a single tag rule.

func (TagRuleNode) ToDataType

func (n TagRuleNode) ToDataType() (*datatypes.Node, error)

ToDataType convert a TagRuleNode to datatypes.Node.

Jump to

Keyboard shortcuts

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