db_pool

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	*sql.DB
	// contains filtered or unexported fields
}

func (*Conn) Release

func (c *Conn) Release()

type DB

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

func Open

func Open(dbPath string, opts ...Option) (*DB, error)

func (*DB) Acquire

func (db *DB) Acquire() (*Conn, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) Exec

func (db *DB) Exec(ctx context.Context, sql string, args ...interface{}) (*Result, error)

func (*DB) Query

func (db *DB) Query(ctx context.Context, sql string, args ...interface{}) (*Rows, error)

type Option

type Option struct {
	NumConn     int
	PoolTimeout time.Duration
}

type Result

type Result struct {
	sql.Result
}

type Rows

type Rows struct {
	*sql.Rows
}

Jump to

Keyboard shortcuts

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