path

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RenameOperator

type RenameOperator struct {
	stream.BaseOperator
	FieldNames []string
}

An RenameOperator iterates over all fields of the incoming document in order and renames them.

func PathsRename

func PathsRename(fieldNames ...string) *RenameOperator

PathsRename iterates over all fields of the incoming document in order and renames them. If the number of fields of the incoming document doesn't match the number of expected fields, it returns an error.

func (*RenameOperator) Iterate

func (op *RenameOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error

Iterate implements the Operator interface.

func (*RenameOperator) String

func (op *RenameOperator) String() string

type SetOperator

type SetOperator struct {
	stream.BaseOperator
	Path document.Path
	Expr expr.Expr
}

A SetOperator filters duplicate documents.

func Set

func Set(path document.Path, e expr.Expr) *SetOperator

Set filters duplicate documents based on one or more expressions.

func (*SetOperator) Iterate

func (op *SetOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error

Iterate implements the Operator interface.

func (*SetOperator) String

func (op *SetOperator) String() string

type UnsetOperator

type UnsetOperator struct {
	stream.BaseOperator
	Field string
}

A UnsetOperator filters duplicate documents.

func Unset

func Unset(field string) *UnsetOperator

Unset filters duplicate documents based on one or more expressions.

func (*UnsetOperator) Iterate

func (op *UnsetOperator) Iterate(in *environment.Environment, f func(out *environment.Environment) error) error

Iterate implements the Operator interface.

func (*UnsetOperator) String

func (op *UnsetOperator) String() string

Jump to

Keyboard shortcuts

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