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