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.
Click to show internal directories.
Click to hide internal directories.