executor

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

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExecutableNotFound = errors.New("executable not found")
)
View Source
var (
	ErrQueryNotFound = errors.New("query not found")
)

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// contains filtered or unexported methods
}

type FileExecutor

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

type GitExecutor

type GitExecutor struct {
	*FileExecutor
}

func NewGitExecutor

func NewGitExecutor() (*GitExecutor, error)

func (*GitExecutor) Checkout

func (r *GitExecutor) Checkout(issueBranch string) error

func (*GitExecutor) Stash

func (r *GitExecutor) Stash(pop bool) error

type QueryData

type QueryData struct {
	Column   string
	Operator sqlPredicateOperator
	Arg      any
}

type SqlExecutor

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

func NewSqlExecutor

func NewSqlExecutor(config SqlExecutorConfig) (*SqlExecutor, error)

func (*SqlExecutor) ListAvailableTemplates

func (r *SqlExecutor) ListAvailableTemplates() []string

func (*SqlExecutor) RunQuery

func (r *SqlExecutor) RunQuery(queryName string, condition QueryData) ([][]string, error)

RunQuery run specified query and return result set as matrix with first how af header

type SqlExecutorConfig

type SqlExecutorConfig struct {
	// do not change order or delete properties!!! this change will need changes in configview.go
	TemplatesPath      string `yaml:"templatesPath" placeholder:"Path to sql templates"`
	DbConnectionString string `yaml:"dbConnectionString" placeholder:"DB connection string"`
	DbVendor           string `yaml:"dbVendor" placeholder:"Database vendor"`
}

Jump to

Keyboard shortcuts

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