code: func GetAllACIInfos(tx *sql.Tx, sortfields []string, ascending bool) ([]*ACIInfo, error) {
  	var aciinfos []*ACIInfo
  	query := "SELECT * from aciinfo"
  	if len(sortfields) > 0 {
  		query += fmt.Sprintf(" ORDER BY %s ", strings.Join(sortfields, ", "))
  		if ascending {
  			query += "ASC"
  		} else {
  			query += "DESC"
  		}
  	}
  	rows, err := tx.Query(query)
  	if err != nil {
  		return nil, err
  	}
  	defer rows.Close()
  	for rows.Next() {
  		aciinfo := &ACIInfo{}
  		if err := aciinfoRowScan(rows, aciinfo); err != nil {
  			return nil, err
  		}
  		aciinfos = append(aciinfos, aciinfo)
  	}
  	if err := rows.Err(); err != nil {
  		return nil, err
  	}
  	return aciinfos, err
  }
docs: // GetAllACIInfos returns all the ACIInfos sorted by optional sortfields and
  // with ascending or descending order.