type.go
func (rat *Rat) Scan(src interface{}) (err error) {
	rat.Rat = new(big.Rat)
	switch t := src.(type) {
	case string:
		_, err = fmt.Sscan(t, rat.Rat)
	case []byte:
		_, err = fmt.Sscan(string(t), rat.Rat)
	case float64:
		rat.Rat.SetFloat64(t)
	default:
		_, err = fmt.Sscan(fmt.Sprint(t), rat.Rat)
	}
	return err
}
func (rat *Rat) Scan(src interface{}) (err error) {
	rat.Rat = new(big.Rat)
	switch t := src.(type) {
	case string:
		_, err = fmt.Sscan(t, rat.Rat)
	case []byte:
		_, err = fmt.Sscan(string(t), rat.Rat)
	case float64:
		rat.Rat.SetFloat64(t)
	default:
		_, err = fmt.Sscan(fmt.Sprint(t), rat.Rat)
	}
	return err
}
// Scan implements the database/sql Scanner interface.