func GetByID(id uint64) (*Foo, error) { item, err := dbutil.Select( dbutil.ParseRowFunc(ParseRow), BY_ID_STMT, id, ) return item.(*Foo), err }
func GetAll() ([]*Foo, error) { var items []*Foo objects, err := dbutil.SelectList( dbutil.ParseRowFunc(ParseRow), SELECT_STMT, ) for _, i := range objects { items = append(items, i.(*Foo)) } return items, err }