#pragma once
#include "CivSimulResHelperAbs.h"
#include<vector>
#include<string>


#define RESDBHELPER __declspec(dllexport)

class RESDBHELPER CivSimulResDbHelper :public CivSimulResHelperAbs
{
public:
	explicit CivSimulResDbHelper(const std::string& uri);
	~CivSimulResDbHelper();

	virtual bool beginTransaction();
	virtual bool commitTransaction();
	virtual bool insertNodes(const NodeResultItems& nodeitems);
	virtual bool insertLinks(const LinkResultItems& linkMap);
	virtual bool insertTanks(const TankResultItems& tankMap);

	virtual bool insertLinksBulk(const std::map<int,LinkResultItems>& linksMap);
	virtual bool insertNodeBulk(const std::map<int, NodeResultItems>& nodesMap);

	virtual void getAllNodeCoords(NodeCoords& nodeCoords);
	virtual void getAllPipeCoords(PipeCoords& pipeCoords);
	virtual void getLinCodeSnMap(std::map<std::string, std::string>& map);
	virtual void getNodeCodeSnMap(std::map<std::string, std::string>& map);
private:
	std::vector<std::string> mNodeFields;
	std::vector<std::string> mLinkFileds;
	std::vector<std::string> mTankFileds;
}; 
