client

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	History          []history.Record
	ConnectionString string
	// contains filtered or unexported fields
}

func New

func New() (*Client, error)

func NewFromUrl

func NewFromUrl(url string) (*Client, error)

func (*Client) Activity

func (client *Client) Activity() (*Result, error)

Returns all active queriers on the server

func (*Client) Close

func (client *Client) Close() error

Close database connection

func (*Client) Databases

func (client *Client) Databases() ([]string, error)

func (*Client) Info

func (client *Client) Info() (*Result, error)

func (*Client) Query

func (client *Client) Query(query string) (*Result, error)

func (*Client) Schemas

func (client *Client) Schemas() ([]string, error)

func (*Client) Table

func (client *Client) Table(table string) (*Result, error)

func (*Client) TableIndexes

func (client *Client) TableIndexes(table string) (*Result, error)

func (*Client) TableInfo

func (client *Client) TableInfo(table string) (*Result, error)

func (*Client) TableRows

func (client *Client) TableRows(table string, opts RowsOptions) (*Result, error)

func (*Client) Tables

func (client *Client) Tables() ([]string, error)

func (*Client) Test

func (client *Client) Test() error

type Result

type Result struct {
	Columns []string `json:"columns"`
	Rows    []Row    `json:"rows"`
}

func (*Result) CSV

func (res *Result) CSV() []byte

func (*Result) Format

func (res *Result) Format() []map[string]interface{}

type Row

type Row []interface{}

type RowsOptions

type RowsOptions struct {
	Limit      int    // Number of rows to fetch
	SortColumn string // Column to sort by
	SortOrder  string // Sort direction (ASC, DESC)
}

Struct to hold table rows browsing options

Jump to

Keyboard shortcuts

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