lib

package
v0.0.0-...-3359686 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArraysEqual

func ArraysEqual(a []string, b []string) bool

Types

type Comparison

type Comparison struct {
	Column      string
	ColumnIndex int
	Operator    string
	Values      []string
}

func ConstructComparison

func ConstructComparison(operation string, column string, operator string, args []string) (error, *Comparison, []string)

func (*Comparison) Match

func (this *Comparison) Match(row []string) bool

func (*Comparison) PrepareMatch

func (this *Comparison) PrepareMatch(source *Source) error

type On

type On struct {
	ColumnLeft  string
	ColumnRight string
	IndexLeft   int
	IndexRight  int
	Operator    string
}

func ConstructOn

func ConstructOn(operation string, columnLeft string, operator string, columnRight string) (error, *On)

func (*On) Match

func (this *On) Match(leftRow []string, rightRow []string) bool

func (*On) PrepareMatch

func (this *On) PrepareMatch(source *Source) error

type Operation

type Operation interface {
	Construct(*Source, []string) (error, []string)
	Run(*Source) error
}

type OperationConcat

type OperationConcat struct{}

func (*OperationConcat) Construct

func (this *OperationConcat) Construct(source *Source, args []string) (error, []string)

func (*OperationConcat) Run

func (this *OperationConcat) Run(source *Source) error

type OperationCount

type OperationCount struct {
	// contains filtered or unexported fields
}

func (*OperationCount) Construct

func (this *OperationCount) Construct(source *Source, args []string) (error, []string)

func (*OperationCount) Run

func (this *OperationCount) Run(source *Source) error

type OperationDistinct

type OperationDistinct struct {
	// contains filtered or unexported fields
}

func (*OperationDistinct) Construct

func (this *OperationDistinct) Construct(source *Source, args []string) (error, []string)

func (*OperationDistinct) Run

func (this *OperationDistinct) Run(source *Source) error

type OperationExcept

type OperationExcept struct {
	// contains filtered or unexported fields
}

func (*OperationExcept) Construct

func (this *OperationExcept) Construct(source *Source, args []string) (error, []string)

func (*OperationExcept) Run

func (this *OperationExcept) Run(source *Source) error

type OperationJoin

type OperationJoin struct {
	Comparisons []*On
}

func (*OperationJoin) Construct

func (this *OperationJoin) Construct(source *Source, args []string) (error, []string)

func (*OperationJoin) Run

func (this *OperationJoin) Run(source *Source) error

type OperationOr

type OperationOr struct{}

func (*OperationOr) Construct

func (this *OperationOr) Construct(source *Source, args []string) (error, []string)

func (*OperationOr) Run

func (this *OperationOr) Run(source *Source) error

type OperationSelect

type OperationSelect struct {
	// contains filtered or unexported fields
}

func (*OperationSelect) Construct

func (this *OperationSelect) Construct(source *Source, args []string) (error, []string)

func (*OperationSelect) Run

func (this *OperationSelect) Run(source *Source) error

type OperationSort

type OperationSort struct {
	// contains filtered or unexported fields
}

func (*OperationSort) Construct

func (this *OperationSort) Construct(source *Source, args []string) (error, []string)

func (*OperationSort) Run

func (this *OperationSort) Run(source *Source) error

type OperationValues

type OperationValues struct {
	// contains filtered or unexported fields
}

func (*OperationValues) Construct

func (this *OperationValues) Construct(source *Source, args []string) (error, []string)

func (*OperationValues) Run

func (this *OperationValues) Run(source *Source) error

type OperationWhere

type OperationWhere struct {
	Comparisons []*Comparison
}

func (*OperationWhere) Construct

func (this *OperationWhere) Construct(source *Source, args []string) (error, []string)

func (*OperationWhere) Run

func (this *OperationWhere) Run(source *Source) error

type Source

type Source struct {
	Operations []Operation
	Previous   *Source
	Path       string
	Rows       [][]string
}

func ArgList

func ArgList(args []string, source *Source) (error, *Source)

func (*Source) ColumnIndex

func (this *Source) ColumnIndex(key string) (error, int)

func (*Source) MapOperation

func (this *Source) MapOperation(args []string) (error, Operation, []string)

func (*Source) ReadAll

func (this *Source) ReadAll() error

func (*Source) Run

func (this *Source) Run() error

Jump to

Keyboard shortcuts

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