-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMySQL.h
More file actions
49 lines (43 loc) · 1.27 KB
/
MySQL.h
File metadata and controls
49 lines (43 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef MySQL_Header
#define MySQL_Header
#include <iostream>
#include <string>
#include <boost/optional.hpp>
/* MySQL Connector/C++ specific headers */
#include <driver.h>
#include <connection.h>
#include <statement.h>
#include <prepared_statement.h>
#include <resultset.h>
#include <metadata.h>
#include <resultset_metadata.h>
#include <exception.h>
#include "RTypes.pb.h"
#include "UpdateTrade.h"
using namespace Serializable;
namespace Framework
{
namespace ExecutionEngine
{
class DBaseConnection
{
private:
sql::Driver *driver;
sql::Statement *stmt;
sql::ResultSet *res;
sql::Connection *con;
sql::PreparedStatement *prep_stmt;
public:
void InitiateDBConnection();
void InsertNewOptionOrder(Serializable::CustROrder_ser& otype,const std::string FormGUID );
void UpdateOrder(Serializable::CustROrder_ser& otype);
void InsertNewTrade(Framework::ExecutionEngine::TradeUpdate& tupdate);
std::string ExtractFormNameById(std::string& client_id );
Serializable::CustROrder_ser ReturnOrderByID(const std::string Order_ID);
Serializable::CustROrder_ser ReturnOrderByRecordID(const std::string Order_ID);
void ClearTradesTable();
void ClearOrdersTable();
};
}//end namespace ExecutionEngine
}//end namespace Framework
#endif