github.com/ryym/goq (go): Package goq provides a type-safe and fluent query builder.  You can construct various queries using Goq. All expression structs and interfaces are named as 'XxxExpr' and the Column struct implements basic operators like 'Add', 'Like', 'Between', etc. See the Expr interface for the documentation about these operators.  A collector collects *sql.Rows fetched from DB into a common data structure like a slice, map, etc.  Available collectors:  These collector methods can be used from the query builder. 'Table' in the above list means a table helper (see [TODO: link] for custom query builder).  For example, the following code collects users table records into a 'users' slice and other values into another slice.  The collectors defined in a table helper are called model collector. They collect rows into a model or models. The model collector structs are named 'ModelXxxCollector'. For example, 'Table.ToSlice' returns a ModelSliceCollector.  The collectors defined in a query builder are called generic collector. They collect rows into a generic structure such as a slice of non-model struct. The generic collector structs are named 'XxxCollector'. For example, 'ToSlice' returns a SliceCollector.  Furthermore, collectors are classified into two types: list collector or single collector. A list collector collects rows into a slice or a map of slices. A single collector collects a first row only into a struct or map. You need to pass them to Collect and First methods, respectively.  Note that we often use 'z' as a variable name of Goq query builder in example code. This name has no special meanings. We use it just because this character rarely duplicates with other common variable names and is easy to identify.
Keywords: go|orm|sql