engine

package
v1.1.0-rc05 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execer

type Execer interface {
	// NamedExecContext 使用命名参数执行sql
	NamedExecContext(ctx context.Context, execSQL string, arg any) (sql.Result, error)
	// NamedExec 使用命名参数执行sql
	NamedExec(query string, arg any) (sql.Result, error)

	// ExecContext 使用数组参数执行sql
	ExecContext(ctx context.Context, execSQL string, args ...any) (sql.Result, error)
	// Exec 使用数组参数执行sql
	Exec(query string, args ...any) (sql.Result, error)
}

Execer 更新语句执行器

type Queryer

type Queryer interface {

	// Select 查询多条数据
	Select(dest any, query string, args ...any) error
	// SelectContext 查询多条数据
	SelectContext(ctx context.Context, dest any, query string, args ...any) error

	// Get 查询单条数据
	Get(dest any, query string, args ...any) error
	// GetContext 查询单条数据
	GetContext(ctx context.Context, dest any, query string, args ...any) error
}

Queryer 查询语句执行器

Jump to

Keyboard shortcuts

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