using MMoneyCoderSharp.Data.Request;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static MMoneyCoderSharp.DBDefine;

namespace MMoneyCoderSharp.DB
{
    /// <summary>
    /// </summary>
    internal class MapUSA : ADataObject
    {
     
        /// <summary>
        /// 금일 데이터 쿼리
        /// </summary>
         string queryToday = @"SELECT 
                decode(f_symb, 'DJI@DJI', '다우', 'NAS@IXIC', '나스닥', 'SPI@SPX', 'S&P') NAME, 
                to_number(f_last) curr_price, 
                to_number(f_diff) net_chg, 
                f_sign chg_type, 
                to_number(f_rate) rate 
        FROM t_world_ix_eq_sise 
        WHERE f_symb in('DJI@DJI', 'NAS@IXIC', 'SPI@SPX')";

        public override IDataRequest buildData()
        {

            string bufQuery = "";

            bufQuery += String.Format(queryToday);

            mRequestQuery.Add("", bufQuery);

            return this;
        }
    }
}
