mysql

package
v0.11.135 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 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
}

func NewClient

func NewClient(c MySQLConfig) (*Client, error)

func (*Client) GetIngestrURI

func (c *Client) GetIngestrURI() (string, error)

func (*Client) RunQueryWithoutResult added in v0.11.133

func (c *Client) RunQueryWithoutResult(ctx context.Context, query *query.Query) error

func (*Client) Select added in v0.11.133

func (c *Client) Select(ctx context.Context, query *query.Query) ([][]interface{}, error)

func (*Client) SelectWithSchema added in v0.11.133

func (c *Client) SelectWithSchema(ctx context.Context, queryObj *query.Query) (*query.QueryResult, error)

type Config

type Config struct {
	Username    string
	Password    string
	Host        string
	Port        int
	Database    string
	Driver      string
	SslCaPath   string
	SslCertPath string
	SslKeyPath  string
}

func (Config) GetIngestrURI

func (c Config) GetIngestrURI() string

func (Config) ToDBConnectionURI

func (c Config) ToDBConnectionURI() string

type DB added in v0.11.133

type DB interface {
	Querier
	Selector
}

type MySQLConfig

type MySQLConfig interface {
	GetIngestrURI() string
	ToDBConnectionURI() string
}

type Querier added in v0.11.133

type Querier interface {
	RunQueryWithoutResult(ctx context.Context, query *query.Query) error
}

type Selector added in v0.11.133

type Selector interface {
	Select(ctx context.Context, query *query.Query) ([][]interface{}, error)
	SelectWithSchema(ctx context.Context, queryObj *query.Query) (*query.QueryResult, error)
}

Jump to

Keyboard shortcuts

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