#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;
    getchar();
  /*  const char* date = "2020-06-19";
    char* dates = const_cast<char*>(date);

    const char* interval = "0";
    char* intervals = const_cast<char*>(interval);
    getDataByInterval(findUri, dates, intervals);*/
   // std::cout << flag << std::endl;

    return 0;
}