Few issues with compilation and layout
This commit is contained in:
parent
15ee7962f1
commit
9305053e34
|
@ -32,6 +32,11 @@
|
|||
class Database : public LuaObject
|
||||
{
|
||||
public:
|
||||
friend class DBTransaction;
|
||||
|
||||
Database(): m_connected(false) {}
|
||||
virtual ~Database() { m_connected = false; }
|
||||
|
||||
/**
|
||||
* Database connector.
|
||||
*
|
||||
|
@ -126,8 +131,6 @@ class Database : public LuaObject
|
|||
*/
|
||||
bool isConnected() { return m_connected; }
|
||||
|
||||
friend class DBTransaction;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Database set connected.
|
||||
|
@ -141,9 +144,6 @@ class Database : public LuaObject
|
|||
|
||||
DBResultPtr verifyResult(DBResultPtr result);
|
||||
|
||||
Database(): m_connected(false) {}
|
||||
virtual ~Database() { m_connected = false; }
|
||||
|
||||
ticks_t m_use;
|
||||
bool m_connected;
|
||||
|
||||
|
@ -154,6 +154,9 @@ class Database : public LuaObject
|
|||
class DBResult : public LuaObject
|
||||
{
|
||||
public:
|
||||
DBResult() {}
|
||||
virtual ~DBResult() {}
|
||||
|
||||
/** Get the Integer value of a field in database
|
||||
*\returns The Integer value of the selected field and row
|
||||
*\param s The name of the field
|
||||
|
@ -191,10 +194,6 @@ class DBResult : public LuaObject
|
|||
*\returns integer value of row amount, 0 if result is empty.
|
||||
*/
|
||||
virtual int getRowCount() { return 0; }
|
||||
|
||||
protected:
|
||||
DBResult() {}
|
||||
virtual ~DBResult() {}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -229,7 +228,7 @@ class DBInsert
|
|||
*
|
||||
* @param DatabasePtr database wrapper
|
||||
*/
|
||||
DBInsert(DatabasePtr db): m_db(db), m_rows(0) {}
|
||||
DBInsert(const DatabasePtr& db): m_db(db), m_rows(0) {}
|
||||
~DBInsert() {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -64,8 +64,13 @@ class DatabaseMySQL : public Database
|
|||
|
||||
class MySQLResult : public DBResult
|
||||
{
|
||||
|
||||
friend class DatabaseMySQL;
|
||||
|
||||
public:
|
||||
MySQLResult(MYSQL_RES* result);
|
||||
virtual ~MySQLResult();
|
||||
|
||||
virtual int32 getDataInt(const std::string& s);
|
||||
virtual int64 getDataLong(const std::string& s);
|
||||
virtual std::string getDataString(const std::string& s);
|
||||
|
@ -76,9 +81,6 @@ class MySQLResult : public DBResult
|
|||
virtual int getRowCount() { return mysql_num_rows(m_result); }
|
||||
|
||||
protected:
|
||||
MySQLResult(MYSQL_RES* result);
|
||||
virtual ~MySQLResult();
|
||||
|
||||
typedef std::map<const std::string, uint32> RowNames_t;
|
||||
RowNames_t m_names;
|
||||
|
||||
|
|
Loading…
Reference in New Issue