// GetInt32 returns the entry's value as int32, based on its key.
// If not found returns -1 and a non-nil error.
437781
func (r *Store) GetInt32(key string) (int32, error) {
	v, ok := r.GetEntry(key)
	if !ok {
		return -1, errFindParse.Format("int32", key)
	}
	return v.Int32Default(-1)
}
923626
func (r Row) GetInt64(colIdx int) int64 {
	col := r.c.columns[colIdx]
	return *(*int64)(unsafe.Pointer(&col.data[r.idx*8]))
}
389361
func (v *Object) GetInt64(keys ...string) (int64, error) {
	child, err := v.getPath(keys)

	if err != nil {
		return 0, err
	}
	n, err := child.Int64()

	if err != nil {
		return 0, err
	}
	return n, nil
}
909163
func readInt32(rd io.Reader) (int32, error) {
	var i int32
	if err := binary.Read(rd, binary.LittleEndian, &i); err != nil {
		return 0, err
	}
	return i, nil
}
1068734
func (r *Store) GetInt64(key string) (int64, error) {
	v, ok := r.GetEntry(key)
	if !ok {
		return -1, errFindParse.Format("int64", key)
	}
	return v.Int64Default(-1)
}
888901
func (f *Flash) GetInt(key string) int {
	r, _ := f.Get(key).(int)
	return r
}
204706
func GetInt(key string) (int, error) {
	value, err := Get(key)
	if err != nil {
		return 0, err
	}
	if v, ok := value.(int); ok {
		return v, nil
	} else if v, ok := value.(string); ok {
		if i, err := strconv.ParseInt(v, 10, 64); err == nil {
			return int(i), nil
		}
	} else if v, err := GetFloat(key); err == nil {
		if float64(int(v)) == v {
			return int(v), nil
		}
	}
	return 0, &InvalidValue{key, "int"}
}
310433
func (iter *Iterator) ReadInt32() (ret int32) {
	c := iter.nextToken()
	if c == '-' {
		val := iter.readUint32(iter.readByte())
		if val > math.MaxInt32+1 {
			iter.ReportError("ReadInt32", "overflow: "+strconv.FormatInt(int64(val), 10))
			return
		}
		return -int32(val)
	}
	val := iter.readUint32(c)
	if val > math.MaxInt32 {
		iter.ReportError("ReadInt32", "overflow: "+strconv.FormatInt(int64(val), 10))
		return
	}
	return int32(val)
}
1307149
func (c *Context) GetInt(key string) (i int) {
	if val, ok := c.Get(key); ok && val != nil {
		i, _ = val.(int)
	}
	return
}
365610
func (m *Manager) GetInt8(key string) int8 {
	return cast.ToInt8(m.Get(key))
}
1039931
func (r *Store) GetIntDefault(key string, def int) int {
	if v, err := r.GetInt(key); err == nil {
		return v
	}

	return def
}
1091559
func GetInt64(r Retriever, k Key) (int64, error) {
	val, err := r.Get(k)
	if IsErrNotFound(err) {
		return 0, nil
	}
	if err != nil {
		return 0, err
	}
	intVal, err := strconv.ParseInt(string(val), 10, 0)
	if err != nil {
		return intVal, errors.Trace(err)
	}
	return intVal, nil
}
652935
func (c *Context) GetInt64(key string) (i64 int64) {
	if val, ok := c.Get(key); ok && val != nil {
		i64, _ = val.(int64)
	}
	return
}
1349110
func (context *BaseContext) GetInt64(
	key string, defaultValue ...int64) int64 {
	if value, ok := context.userData[key]; ok {
		if value, ok := value.(int64); ok {
			return value
		}
	}
	if len(defaultValue) > 0 {
		return defaultValue[0]
	}
	return 0
}
457467
func (s *Session) GetInt64(key string) (int64, error) {
	v := s.Get(key)

	if vint64, ok := v.(int64); ok {
		return vint64, nil
	}

	if vfloat64, ok := v.(float64); ok {
		return int64(vfloat64), nil
	}

	if vint, ok := v.(int); ok {
		return int64(vint), nil
	}

	if vstring, sok := v.(string); sok {
		return strconv.ParseInt(vstring, 10, 64)
	}

	return -1, errFindParse.Format("int64", key, v)
}
30337
func (a *Attribute) getInt() int64 {
	if a.Int == nil {
		return 0
	}

	i := *a.Int

	// Get the unit
	u := a.getTypedUnit()

	// If there is no unit just return the int
	if u == nil {
		return i
	}

	if u.InverseMultiplier {
		i /= u.Multiplier
	} else {
		i *= u.Multiplier
	}

	return i
}
1363430
func readInt32(r io.Reader) (int, error) {
	var value int32
	err := binary.Read(r, binary.LittleEndian, &value)
	return int(value), err
}