Documentation
¶
Overview ¶
internal/mysql/client.go
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) DescribeTable(ctx context.Context, database, table string) ([]map[string]any, error)
- func (c *Client) ListDatabases(ctx context.Context) ([]string, error)
- func (c *Client) ListTables(ctx context.Context, database string) ([]string, error)
- func (c *Client) RunQuery(ctx context.Context, sqlText string, maxRows int) ([]map[string]any, error)
- type Config
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
}
func NewWithDB ¶
NewWithDB constructs a Client from an existing *sql.DB. This is mainly useful for tests where we use a sqlmock.DB.
func (*Client) DescribeTable ¶
func (*Client) ListDatabases ¶
func (*Client) ListTables ¶
Click to show internal directories.
Click to hide internal directories.