client

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	Capabilities() core.CapabilityFlag
	AffectedRows() uint64
	LastInsertId() uint64

	ReadPacket() ([]byte, error)

	WritePacket(packet.Packet) error
	WriteCommandPacket(packet.Packet) error

	Exec(string) (*mysql.Result, error)
	Query(string) (Rows, error)

	Ping() error
	Close() error
}

func CreateConnection

func CreateConnection(opts ...Option) (Conn, error)

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithAttribute

func WithAttribute(key string, val string) Option

func WithCollation added in v1.0.5

func WithCollation(collation *core.Collation) Option

func WithHost

func WithHost(host string) Option

func WithInsecureSkipVerify added in v1.0.5

func WithInsecureSkipVerify(insecureSkipVerify bool) Option

func WithLocation added in v1.0.5

func WithLocation(loc *time.Location) Option

func WithPassword

func WithPassword(password string) Option

func WithPort

func WithPort(port int) Option

func WithSSLCA added in v1.0.5

func WithSSLCA(sslCA string) Option

func WithSSLCert added in v1.0.5

func WithSSLCert(sslCert string) Option

func WithSSLKey added in v1.0.5

func WithSSLKey(sslKey string) Option

func WithUseSSL added in v1.0.5

func WithUseSSL(useSSL bool) Option

func WithUser

func WithUser(user string) Option

type Rows added in v1.0.5

type Rows interface {
	Columns() []packet.Column

	Next() (packet.Row, error)

	// HasNextResultSet is called at the end of the current result set and
	// reports whether there is another result set after the current one.
	HasNextResultSet() bool

	// NextResultSet advances the driver to the next result set even
	// if there are remaining rows in the current result set.
	//
	// NextResultSet should return io.EOF when there are no more result sets.
	NextResultSet() error
}

Jump to

Keyboard shortcuts

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