Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A small library that maps the results of *sql.Rows to map[string]any.

License

Notifications You must be signed in to change notification settings

devlights/sqlmap

Repository files navigation

sql-map

A small library that maps the results of Go's *sql.Rows to []map[string]any.

Install

go get github.com/devlights/sqlmap@latest

Usage

db, _ := sql.Open("sqlite", "path/to/db")
defer db.Close()

rows, _ := db.Query("SELECT * FROM xxxxx")
defer rows.Close()

mapRows, err := sqlmap.MapRows(rows)
if err != nil {
    return err
}

fmt.Println(mapRows)

About

A small library that maps the results of *sql.Rows to map[string]any.

Topics

Resources

License

Stars

Watchers

Forks

Languages