func (db *Database) GetInfo(name string, block uint64) (PoolInfo, error) {
	name = strings.ToLower(name)
	db.namedLock.RLock(name)
	defer db.namedLock.RUnlock(name)
	var pool Pool
	if err := db.db.Where("name = ?", name).First(&pool, datatypes.JSONQuery("infos").HasKey(strconv.FormatUint(block, 10))).Error; err != nil {
		return PoolInfo{}, err
	}
	data, err := json.Marshal(pool.Infos[strconv.FormatUint(block, 10)])
	if err != nil {
		return PoolInfo{}, err
	}
	var info PoolInfo
	return info, json.Unmarshal(data, &info)
}
// GetInfo returns the record PoolInfo at the given block
GetInfo returns the record PoolInfo at the given block
// GetInfo returns the record PoolInfo at the given block
func (db *Database) GetInfo(name string, block uint64) (PoolInfo, error) {
	name = strings.ToLower(name)
	db.namedLock.RLock(name)
	defer db.namedLock.RUnlock(name)
	var pool Pool
	if err := db.db.Where("name = ?", name).First(&pool, datatypes.JSONQuery("infos").HasKey(strconv.FormatUint(block, 10))).Error; err != nil {
		return PoolInfo{}, err
	}
	data, err := json.Marshal(pool.Infos[strconv.FormatUint(block, 10)])
	if err != nil {
		return PoolInfo{}, err
	}
	var info PoolInfo
	return info, json.Unmarshal(data, &info)
}
func ( db * Database ) GetInfo ( name string , block uint64 ) ( PoolInfo , error ) { name = strings . ToLower ( name ) db . namedLock . RLock ( name ) defer db . namedLock . RUnlock ( name ) var pool Pool if err := db . db . Where ( " " , name ) . First ( & pool , datatypes . JSONQuery ( " " ) . HasKey ( strconv . FormatUint ( block , 10 ) ) ) . Error ; err != nil { return PoolInfo { } , err } data , err := json . Marshal ( pool . Infos [ strconv . FormatUint ( block , 10 ) ] ) if err != nil { return PoolInfo { } , err } var info PoolInfo return info , json . Unmarshal ( data , & info ) }
GetInfo returns the record PoolInfo at the given block
GetInfo returns the record PoolInfo at the given block