client

package
v0.0.0-...-6355219 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDSN

func OpenDSN(dsn string) (*conn, error)

Types

type Conn

type Conn interface {
	AuthInfo() *wire.AuthResult
	PrepareStmt(context.Context, string) (Stmt, error)
	ExecWithArgs(context.Context, string, []any) (Result, error)
	BeginTx() (*Tx, error)
	Close() error
}

func Open

func Open(dsn string) (Conn, error)

type Result

type Result interface {
	LastInsertId() (int64, error)
	RowsAffected() (int64, error)
}

type Rows

type Rows interface {
	Close() error
	ColumnCount() int
	Columns() []string
	NextRow([]any) error
}

type Stmt

type Stmt interface {
	Close() error
	NumInput() int
	ExecWithArgs(context.Context, []any) (Result, error)
	QueryWithArgs(context.Context, []any) (Rows, error)
}

type Tx

type Tx struct {
	// contains filtered or unexported fields
}

func (*Tx) Commit

func (tx *Tx) Commit() error

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Jump to

Keyboard shortcuts

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