smalljoin

package
v0.0.0-...-4ec9ac6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JoinTypeInner = iota
	JoinTypeLeft
	JoinTypeRightIsNull
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecResult

type ExecResult struct {
	ExecStdout string
	ExecStdErr string
	ExitCode   int
}

type IndexFileResult

type IndexFileResult struct {
	Index string // index is the thign that was attempted to be matched on
	Row   string // Row is the entire contents of the row from the matched result
}

type Joiner

type Joiner interface {
	Run() error
}

func New

func New(inputstream io.ReadCloser, outputstream io.WriteCloser, errStream io.WriteCloser, o Options) Joiner

type Jointype

type Jointype int

type LeftResult

type LeftResult struct {
	Index string
	Row   string
}

'Left' is the streaming side input value which was attempted to be matched and its indexes.

'Row' is the entire contents of the row from the matched result index is the thing that was attempted to be matched on eg: Given a successful match on this contents: "a, b, c" assuming that the index key is the second column then the entire 'row' contentents are "a, b, c" and the "index" is "b"

type Options

type Options struct {
	IncomingBufferSize int
	Concurrency        int
	IndexFile          string
	RightExecStr       string
	Jointype           Jointype
	LeftQueryOptions   QueryOptions
	RightQueryOptions  QueryOptions
	ContinueOnErr      bool
	OutputDebugMode    bool
}

type QueryOptions

type QueryOptions struct {
	JsonSubquery   string
	Separator      string
	JoinColumn     int
	AttemptToClean bool
}

type Result

type Result struct {
	Left  *LeftResult
	Right *RightResult
}

func (Result) String

func (r Result) String() string

func (Result) SuccessfulJoin

func (r Result) SuccessfulJoin(joinType Jointype) bool

type RightResult

type RightResult struct {
	IndexFileResult *IndexFileResult `json:"IndexFileResult,omitempty"`
	ExecResult      *ExecResult      `json:"ExecResult,omitempty"`
}

Right is either the input side or whatever side that's being checked against for the stream. Its either going to be a small file of indexes or maybe some eval result or whatever.

Jump to

Keyboard shortcuts

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