db

package
v0.0.0-...-2adb2a2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColInfo

type ColInfo struct {
	Name string
	Type string
}

ColInfo contains a columns information

type Connection

type Connection interface {
	GetTables(ctx context.Context) ([]Table, error)
	Query(ctx context.Context, queryStr string) (QueryResult, error)
	Close() error
}

Connection defines the db interface each driver should implement

type ConnectionConfig

type ConnectionConfig struct {
	Username string
	Password string
	Dbname   string
	Host     string
	Persist  bool
}

ConnectionConfig defines the input configuration of a Connection

type QueryResult

type QueryResult struct {
	Columns []ColInfo
	Rows    [][]interface{}
}

QueryResult defines an output from a successful query operation

type Table

type Table struct {
	Name          string
	AproxRowCount int64
}

Table represents a table meta-data in the db

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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