client

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MPL-2.0 Imports: 6 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(host string, port int, defaultDatabase string, username string, password string, maxOpenConnections int, maxIdleConnections int) (*Client, error)

func (*Client) Exec

func (c *Client) Exec(ctx context.Context, database string, resourceLockName string, queryTemplate string, args ...any) (string, sql.Result, error)

func (*Client) GetConn added in v0.1.5

func (c *Client) GetConn(database string) (*sql.DB, error)

func (*Client) Query

func (c *Client) Query(ctx context.Context, database string, queryTemplate string, args ...any) (string, *sql.Rows, error)

func (*Client) QueryRow

func (c *Client) QueryRow(ctx context.Context, database string, queryTemplate string, args ...any) (string, *sql.Row, error)

type DatabaseNotExistError added in v0.1.13

type DatabaseNotExistError struct {
	Database string
}

func (*DatabaseNotExistError) Error added in v0.1.13

func (e *DatabaseNotExistError) Error() string

Jump to

Keyboard shortcuts

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