dbex

package
v0.3.27 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryScan2Map

func QueryScan2Map(ctx context.Context, db *sql.DB, sqlstr string, args ...interface{}) ([]map[string]interface{}, error)

QueryScan2Map 执行SQL查询并将结果转换为map[string]interface{}格式的切片。 ctx: 上下文,用于控制查询的取消、超时等。 db: 用于执行查询的SQL数据库实例。 sqlstr: 待执行的SQL查询语句。 args: SQL查询语句中使用的参数。 返回值: 查询结果转换后的map切片和可能出现的错误。

Types

This section is empty.

Jump to

Keyboard shortcuts

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