go_sql_raw

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 5 Imported by: 0

README

go-sql-raw

Tests Gosec Go Reference

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error)

Types

type RawSqlType

type RawSqlType map[string]interface{}

func Rows2Map

func Rows2Map(rows *sql.Rows) RawSqlType

Jump to

Keyboard shortcuts

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