GoSQL

GoSQL is a fast, easy query builder for Golang.

Getting Started

Get the package:

$ go get github.com/twharmon/gosql

Open a connection to a database:

sqliteDB, _ := sql.Open("sqlite3", "my-db.sql")
db := gosql.New(sqliteDB)

Register your structs that have corresponding tables in the database:

type User struct {
ID int `gosql:"primary"`
Email string
IsActive bool
}
db.Register(User{})

You must register all struct types before using them with GoSQL.