sqlreader

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLReader

type SQLReader interface {
	// Get gets data. Returned data expected to be one data only. Dest must be pointer to val/struct
	Get(ctx context.Context, query string, args []any, dest any) (err error)

	// Find finds data. Returned data can be more than one data. Dest must be pointer to slice
	Find(ctx context.Context, query string, args []any, dest any) (err error)
}

func New

func New(db *sqlx.DB, dbMaster *sqlx.DB) SQLReader

type SQLReaderImpl

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

func (*SQLReaderImpl) Find

func (impl *SQLReaderImpl) Find(ctx context.Context, query string, args []any, dest any) (err error)

func (*SQLReaderImpl) Get

func (impl *SQLReaderImpl) Get(ctx context.Context, query string, args []any, dest any) (err error)

Jump to

Keyboard shortcuts

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