func (tr Row) Int(nn int) (val int) {
	val, err := tr.IntErr(nn)
	if err != nil {
		panic(err)
	}
	return
}
Int gets the nn-th value and returns it as int (0 if NULL). Panics if conversion is
impossible.
package mysql
import (
	"bytes"
	"fmt"
	"math"
	"os"
	"reflect"
	"strconv"
	"time"
)
type Row []interface{}
func (tr Row) Bin(nn int) (bin []byte) {
	switch data := tr[nn].(type) {
	case nil:
	case []byte:
		bin = data
	default:
		buf := new(bytes.Buffer)
		fmt.Fprint(buf, data)
		bin = buf.Bytes()
	}
	return
}
func (tr Row) Str(nn int) (str string) {
	switch data := tr[nn].(type) {
	case nil:
	case []byte:
		str = string(data)
	case time.Time:
		str = TimeString(data)
	case time.Duration:
		str = DurationString(data)
	default:
		str = fmt.Sprint(data)
	}
	return
}
const _MAX_INT = int64(int(^uint(0) >> 1))
const _MIN_INT = -_MAX_INT - 1
func (tr Row) IntErr(nn int) (val int, err error) {
	switch data := tr[nn].(type) {
	case nil:
	case int32:
		val = int(data)
	case int16:
		val = int(data)
	case uint16:
		val = int(data)
	case int8:
		val = int(data)
	case uint8:
		val = int(data)
	case []byte:
		val, err = strconv.Atoi(string(data))
	case int64:
		if data >= _MIN_INT && data <= _MAX_INT {
			val = int(data)
		} else {
			err = strconv.ErrRange
		}
	case uint32:
		if int64(data) <= _MAX_INT {
			val = int(data)
		} else {
			err = strconv.ErrRange
		}
	case uint64:
		if data <= uint64(_MAX_INT) {
			val = int(data)
		} else {
			err = strconv.ErrRange
		}
	default:
		err = os.ErrInvalid
	}
	return
}