Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.1 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.1 KB

go-sql-raw

Tests Gosec Go Reference GitHub go.mod Go version (branch)

The main reason that this module has been created was generic querying database without knowing table structure.

How to use it

Install

go get github.com/mysiar-org/go-sql-raw

Example use

rows, err: = Db.Query("SELECT * FROM album")

defer rows.Close()
var data []go_sql_raw.RawSqlType
for rows.Next() {
	rec := go_sql_raw.Rows2Map(rows)
	data = append(data, rec)
}

check also go_sql_raw_test.go

TODO

  • update type converting from DB to go in function convertType

Credits