sqlexec

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sqlexec provides the SQL execution implementation for sqlcredo. It wraps sqlx database operations with debugging support, implementing the domain.SQLExecutor interface for executing queries and statements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLExecutor

type SQLExecutor struct {
	DebugFunc domain.DebugFunc
	// contains filtered or unexported fields
}

func NewSQLExecutor

func NewSQLExecutor(db SQLXExecutor) *SQLExecutor

func (*SQLExecutor) Exec

func (r *SQLExecutor) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)

func (*SQLExecutor) SelectMany

func (r *SQLExecutor) SelectMany(ctx context.Context, dest any, query string, args ...any) error

func (*SQLExecutor) SelectOne

func (r *SQLExecutor) SelectOne(ctx context.Context, dest any, query string, args ...any) error

type SQLXExecutor added in v0.8.0

type SQLXExecutor interface {
	GetContext(ctx context.Context, dest any, query string, args ...any) error
	SelectContext(ctx context.Context, dest any, query string, args ...any) error
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
}

Jump to

Keyboard shortcuts

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