api

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExecuteError = errors.New("error executing query")
	StatusError  = errors.New("error getting query query status")
	StopError    = errors.New("error stopping query")
)

Functions

func WaitOnQuery

func WaitOnQuery(ctx context.Context, api SQL, output *ExecuteQueryOutput) error

WaitOnQuery polls the datasource api until the query finishes, returning an error if it failed.

func WaitOnQueryID added in v0.11.1

func WaitOnQueryID(ctx context.Context, queryID string, db awsds.AsyncDB) error

Types

type AWSAPI

type AWSAPI interface {
	SQL
	Resources
}

type ExecuteQueryInput

type ExecuteQueryInput struct {
	ID    string
	Query string
}

type ExecuteQueryOutput

type ExecuteQueryOutput struct {
	ID string
}

type ExecuteQueryStatus

type ExecuteQueryStatus struct {
	ID       string
	Finished bool
	State    string
}

type Loader

type Loader func(cache *awsds.SessionCache, settings models.Settings) (AWSAPI, error)

type Resources

type Resources interface {
	Regions(aws.Context) ([]string, error)
	Databases(aws.Context, sqlds.Options) ([]string, error)
	CancelQuery(aws.Context, sqlds.Options, string) error
}

Jump to

Keyboard shortcuts

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