instance

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Description string `json:"description"`
	Home        bool   `json:"home"`
	Driver      string `json:"driver"`
	Connection  string `json:"connection"`
}

Config is the structure of the configuration for a single SQL database instance.

type Instance

type Instance struct {
	Name string
	// contains filtered or unexported fields
}

Instance represents a single SQL database instance, which can be added via the configuration file.

func New

func New(config Config) (*Instance, error)

New returns a new SQL database instance for the given configuration.

func (*Instance) GetQueryResults

func (i *Instance) GetQueryResults(ctx context.Context, query string) ([]map[string]interface{}, []string, error)

GetQueryResults returns all rows for the user provided SQL query.

Jump to

Keyboard shortcuts

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