sqlx

package
v0.0.0-...-bdb8432 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sqlx implements generic.Executer for the sqlx databases

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executer

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

Executer implements the generic.Executer interface for a sqlx db

func NewExecuter

func NewExecuter(db *sqlx.DB, opts ...ExecuterOption) Executer

NewExecuter creates a new Executer

func (Executer) Execute

func (executer Executer) Execute(ctx context.Context, run func(generic.SQLXRemote) error) error

Execute executes the provided function in a transaction

type ExecuterOption

type ExecuterOption func(*Executer)

ExecuterOption configures the Executer instance

func WithTxOptions

func WithTxOptions(opts *sql.TxOptions) ExecuterOption

WithTxOptions allows setting the TxOptions to use when opening a new transaction

Jump to

Keyboard shortcuts

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