metaquery

package
v0.20.6-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Complete

func Complete(input *CompleterInput) []prompt.Suggest

Complete returns completions for metaqueries.

func Handle

func Handle(ctx context.Context, input *HandlerInput) error

Handle handles a metaquery execution from the interactive client

func IsMetaQuery

func IsMetaQuery(query string) bool

IsMetaQuery returns whether the query is a metaquery

func PromptSuggestions

func PromptSuggestions() []prompt.Suggest

PromptSuggestions returns a list of the metaquery suggestions for go-prompt

Types

type CompleterInput

type CompleterInput struct {
	Query            string
	TableSuggestions []prompt.Suggest
}

CompleterInput is a struct defining input data for the metaquery completer

type HandlerInput

type HandlerInput struct {
	Client db_common.Client
	Schema *db_common.SchemaMetadata

	Prompt          *prompt.Prompt
	ClosePrompt     func()
	Query           string
	ConnectionState steampipeconfig.ConnectionStateMap
	SearchPath      []string
}

HandlerInput defines input data for the metaquery handler

type ValidationResult

type ValidationResult struct {
	Err       error
	Message   string
	ShouldRun bool
}

ValidationResult :: response for Validate

func Validate

func Validate(query string) ValidationResult

Validate :: validate a full metaquery along with arguments - we can return err & validationResult

Jump to

Keyboard shortcuts

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