instance

package
Version: v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 7 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"`
	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) ([][]interface{}, []string, error)

GetQueryResults returns all rows for the user provided SQL query.

Source Files

Jump to

Keyboard shortcuts

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