Skip to content

SQL conveniency functions: Query and exec in 2-3 lines

License

Notifications You must be signed in to change notification settings

instance01/sqlconvenient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

SQL conveniency functions: Query and exec in 2-3 lines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages