func (r *Rows) GetUintByName(row int, name string) (uint, error) {
	column, err := r.NameIndex(name)
	if err != nil {
		return constant.ZeroInt, err
	}
	return r.GetUint(row, column)
}
GetUintByName returns uint type value of given row number and column name
package result
import (
	"database/sql/driver"
	"fmt"
	"reflect"
	"github.com/pkg/errors"
	"github.com/romberli/go-util/common"
	"github.com/romberli/go-util/constant"
)
const mapColumnNum = 2
type Rows struct {
	FieldSlice []string
	FieldMap   map[string]int
	Values     [][]driver.Value
}
func NewRows(fieldSlice []string, fieldMap map[string]int, values [][]driver.Value) *Rows {
	return &Rows{
		fieldSlice,
		fieldMap,
		values,
	}
}
func NewRowsWithRows(rows driver.Rows) *Rows {
	var values [][]driver.Value
	columns := rows.Columns()
	fieldMap := make(map[string]int)
	for i, column := range columns {
		fieldMap[column] = i
	}
	row := make([]driver.Value, len(columns))
	for rows.Next(row) == nil {
		r := make([]driver.Value, len(columns))
		_ = copy(r, row)
		values = append(values, r)
	}
	return &Rows{
		columns,
		fieldMap,
		values,
	}
}
func NewEmptyRows() *Rows {
	return &Rows{}
}
func (r *Rows) RowNumber() int {
	return len(r.Values)
}
func (r *Rows) ColumnNumber() int {
	return len(r.FieldSlice)
}
func (r *Rows) GetValue(row, column int) (interface{}, error) {
	if row >= len(r.Values) || row < constant.ZeroInt {
		return nil, errors.Errorf("invalid row index %d", row)
	}
	if column >= len(r.FieldSlice) || column < constant.ZeroInt {
		return nil, errors.Errorf("invalid column index %d", column)
	}
	return r.Values[row][column], nil
}
func (r *Rows) ColumnExists(name string) bool {
	_, ok := r.FieldMap[name]
	return ok
}
func (r *Rows) NameIndex(name string) (int, error) {
	column, ok := r.FieldMap[name]
	if ok {
		return column, nil
	}
	return constant.ZeroInt, errors.Errorf("invalid field name %s", name)
}
func (r *Rows) GetValueByName(row int, name string) (interface{}, error) {
	column, err := r.NameIndex(name)
	if err != nil {
		return nil, err
	}
	return r.GetValue(row, column)
}
func (r *Rows) IsNull(row, column int) (bool, error) {
	value, err := r.GetValue(row, column)
	if err != nil {
		return false, err
	}
	return value == nil, nil
}
func (r *Rows) IsNullByName(row int, name string) (bool, error) {
	column, err := r.NameIndex(name)
	if err != nil {
		return false, err
	}
	return r.IsNull(row, column)
}
func (r *Rows) GetUint(row, column int) (uint, error) {
	value, err := r.GetValue(row, column)
	if err != nil {
		return constant.ZeroInt, err
	}
	return common.ConvertToUint(value)
}