an ORM-free SQL experience
at main 536 B view raw
1norm 2---- 3 4norm provides helpers for query construction and row 5scanning for golang projects that make use of the 6database/sql package: 7 8 db, _ := sql.Open("sqlite3", ":memory:") 9 10 rows := 11 norm.Select("*"). 12 From("users"). 13 Where(norm.Eq("active", true)). 14 MustQuery(db) 15 16 var users []User 17 _ = norm.ScanAll(rows, &users) 18 19 20norm uses string builders to construct queries and 21reflection to provide a generic struct scanner. handling 22migrations and managing field orderings is left to the end 23user.