func structMap(t reflect.Type) map[string][]int {
	m := make(map[string][]int)
	structTraverse(m, t, nil)
	return m
}
structMap builds index to fast lookup fields in struct
package reiner
import (
	"bytes"
	"database/sql"
	"database/sql/driver"
	"fmt"
	"reflect"
	"unicode"
)
var (
	dummyDest       sql.Scanner = dummyScanner{}
	typeScanner                 = reflect.TypeOf((*sql.Scanner)(nil)).Elem()
	typeKeyValueMap             = reflect.TypeOf(keyValueMap(nil))
	typeValuer                  = reflect.TypeOf((*driver.Valuer)(nil)).Elem()
)
type pointersExtractor func(columns []string, value reflect.Value) []interface{}
type dummyScanner struct{}
func (dummyScanner) Scan(interface{}) error {
	return nil
}
type keyValueMap map[string]interface{}
type kvScanner struct {
	column string
	m      keyValueMap
}
func (kv *kvScanner) Scan(v interface{}) error {
	kv.m[kv.column] = v
	return nil
}
func load(rows *sql.Rows, value interface{}) (int, error) {
	if value == nil {
		count := 0
		for rows.Next() {
			count++
		}
		return count, nil
	}
	column, err := rows.Columns()
	if err != nil {
		return 0, err
	}
	v := reflect.ValueOf(value)
	if v.Kind() != reflect.Ptr || v.IsNil() {
		return 0, ErrInvalidPointer
	}
	isSlice := v.Elem().Kind() == reflect.Slice && v.Elem().Type().Elem().Kind() != reflect.Uint8
	if isSlice {
		v.Elem().Set(reflect.MakeSlice(v.Type().Elem(), 0, v.Elem().Cap()))
	}
	v = v.Elem()
	count := 0
	var elemType reflect.Type
	if isSlice {
		elemType = v.Type().Elem()
	} else {
		elemType = v.Type()
	}
	extractor, err := findExtractor(elemType)
	if err != nil {
		return count, err
	}
	for rows.Next() {
		var elem reflect.Value
		if isSlice {
			elem = reflect.New(v.Type().Elem()).Elem()
		} else {
			elem = v
		}
		ptr := extractor(column, elem)
		err = rows.Scan(ptr...)
		if err != nil {
			return count, err
		}
		count++
		if isSlice {
			v.Set(reflect.Append(v, elem))
		} else {
			break
		}
	}
	err = rows.Close()
	if err != nil {
		return 0, err
	}
	return count, nil
}