client

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 8 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 {
	// contains filtered or unexported fields
}

Client is used to store the pool of db connection.

func New

func New(opts command.Options) (*Client, error)

New return an instance of the client.

func (*Client) Constraints added in v0.11.1

func (c *Client) Constraints(tableName string) ([][]string, []string, error)

Constraints returns the resultet of from information_schema.table_constraints.

func (*Client) DB

func (c *Client) DB() *sqlx.DB

DB Return the db attribute.

func (*Client) Driver

func (c *Client) Driver() string

Driver returns the driver of the database.

func (*Client) Indexes added in v0.12.0

func (c *Client) Indexes(tableName string) ([][]string, []string, error)

Indexes returns a resulset with the information of the indexes given a table name.

func (*Client) Query added in v0.2.0

func (c *Client) Query(q string, args ...interface{}) ([][]string, []string, error)

Query returns performs the query and returns the result set and the column names.

func (*Client) ShowTables added in v0.3.0

func (c *Client) ShowTables() ([]string, error)

ShowTables list all the tables in the database on the tables panel.

func (*Client) TableContent added in v0.2.0

func (c *Client) TableContent(tableName string) ([][]string, []string, error)

TableContent returns all the rows of a table.

func (*Client) TableStructure added in v0.6.0

func (c *Client) TableStructure(tableName string) ([][]string, []string, error)

TableStructure returns the structure of the table columns.

Jump to

Keyboard shortcuts

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