iface

package
v3.98.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPreparedStatement

func IsPreparedStatement(ctx context.Context) bool

func WithPreparedStatement

func WithPreparedStatement(ctx context.Context) context.Context

Types

type Conn

type Conn interface {
	driver.Validator
	driver.Pinger

	ID() string

	Exec(ctx context.Context, sql string, params *params.Params) (result driver.Result, err error)
	Query(ctx context.Context, sql string, params *params.Params) (result driver.RowsNextResultSet, err error)
	Explain(ctx context.Context, sql string, params *params.Params) (ast string, plan string, err error)
	BeginTx(ctx context.Context, opts driver.TxOptions) (Tx, error)

	Close() error
}

type Tx

type Tx interface {
	ID() string

	Exec(ctx context.Context, sql string, params *params.Params) (driver.Result, error)
	Query(ctx context.Context, sql string, params *params.Params) (driver.RowsNextResultSet, error)

	Rollback(ctx context.Context) error
	Commit(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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