#include "limitupstocksqlmanager.h"

LimitUpStockSqlManager::LimitUpStockSqlManager()
{

}

LimitUpStockSqlManager::~LimitUpStockSqlManager()
{

}

QString LimitUpStockSqlManager::toInsertSql(_limitUpStocksInfo stock)
{
    QString sql = QString("insert into stocks_limit_up (code, trade_day) "
                          "SELECT  ':code', ':trade_day' from DUAL where not exists(select code from stocks_limit_up where code = ':code' and trade_day = ':trade_day');");
    sql.replace(":code",stock.code);
    sql.replace(":trade_day",stock.tradeDay);
    return sql;
}

QString LimitUpStockSqlManager::toDeleteSql()
{
    return "";
}

QString LimitUpStockSqlManager::toQuerySql()
{
    return "";
}
