GitXplorerGitXplorer
i

sqlconvenient

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a187cfaf3d21f2f54f4a246fcb092b368d4e41a6

Fix gotcha: Initialize return slice in SqlQuery() with make

iinstance01 committed 6 years ago
Verified
c2ec35a2634e3940bc11459a0e3075234e1d495e

Update README.md

iinstance01 committed 6 years ago
Verified
6836629df1b1b1f5ae37efe46a76b33ca6ccc94b

Create LICENSE

iinstance01 committed 6 years ago
Unverified
0738635d69c5ee6e6aa000f64de07b5ffcc3aa2a

Initial commit

iinstance01 committed 6 years ago

README

The README file for this repository.

This package exports two functions

SqlExec(db *sql.DB, query string, params ...interface{})

SqlQuery(db *sql.DB, rettype interface{}, query string, params ...interface{})

and allows querying/executing sql operations in just 2-3 lines, resulting in less boilerplate. Example:

var e Entry
var query = "select * from testtable"
return sqlconvenient.SqlQuery(db, &e, query)

See a more in depth example in _example/ and documentation over here.