#include <iostream>
#include <libpq-fe.h>
#include "CivHydrFuncInter.h"

#include "iostream"
#include "time.h"
#include "string.h"


using namespace std;
int main(int argc, char* argv[])
{

    const char* uri = "host=192.168.19.100 port=5432 dbname=JinXian user=postgres password=admin";
    char* findUri = const_cast<char*>(uri);

    
    char net[128];
    char flag[128];
    const char* file = "test.inp";
    const char netName[128] = "水力模型管网";

    strcpy_s(net, "水力模型管网");
    strcpy_s(flag, "QUALITY");

    /*bool msg = simulation(findUri, net, flag);
    std::cout << msg << std::endl;*/

   const char* date = "2020-07-01";
   char* dates = const_cast<char*>(date);

    const char* interval = "3";
    char* intervals = const_cast<char*>(interval);
    bool isSucces = getDataByInterval(findUri, dates, intervals);
    std::cout << isSucces << std::endl;
    getchar();

    return 0;
}