tarantool

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIsNotSupportedByThisDriver = errors.New("is not supported by this driver")
View Source
var (
	ErrTransactionAlreadyClosed = errors.New("transaction already closed")
)

Functions

func NewTx

func NewTx(stream *tarantool.Stream) sqlex.Tx

Types

type Connection

type Connection interface {
	Do(req tarantool.Request) *tarantool.Future
	NewStream() (*tarantool.Stream, error)
	Close() error
}

type DB

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

func Open

func Open(dsn string) (*DB, error)

func (*DB) BeginTx

func (db *DB) BeginTx(ctx context.Context, _ *sql.TxOptions) (sqlex.Tx, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) ExecContext

func (db *DB) ExecContext(ctx context.Context, query string, args ...any) (sqlex.Result, error)

func (*DB) Ping

func (db *DB) Ping() error

func (*DB) QueryContext

func (db *DB) QueryContext(ctx context.Context, query string, args ...any) (sqlex.Rows, error)

type Done

type Done bool

Done implements [Result] for an INSERT or UPDATE operation which mutates a number of rows.

func (Done) LastInsertId

func (Done) LastInsertId() (int64, error)

func (Done) RowsAffected

func (v Done) RowsAffected() (int64, error)

type Stmt

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

func (*Stmt) ExecContext

func (s *Stmt) ExecContext(ctx context.Context, args ...any) (sqlex.Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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