platform/shared/db/DBAdapter.h in rhodes-3.5.1.12 vs platform/shared/db/DBAdapter.h in rhodes-5.5.0
- old
+ new
@@ -62,11 +62,11 @@
Hashtable<String,sqlite3_stmt*> m_mapStatements;
common::CRubyMutex m_mxRuby;
common::CMutex m_mxDB;
boolean m_bUIWaitDB;
- int m_nTransactionCounter;
+ unsigned m_nTransactionCounter;
CDBAttrManager m_attrMgr;
static HashtablePtr<String,CDBAdapter*> m_mapDBPartitions;
common::CAutoPtr<common::IRhoCrypt> m_ptrCrypt;
String m_strCryptKey;
@@ -99,12 +99,13 @@
m_strRhoVer = strRhoVer;
m_strAppVer = strAppVer;
}
};
- static const char* USER_PARTITION_NAME(){return "user";}
public:
+ static const char* USER_PARTITION_NAME(){return "user";}
+
DEFINE_LOGCLASS;
CDBAdapter(const char* szDBPartition, boolean bNoRubyLock) : m_dbHandle(0), m_strDbPath(""), m_strDbPartition(szDBPartition),
m_mxRuby(bNoRubyLock), m_bUIWaitDB(false), m_nTransactionCounter(0) {}
~CDBAdapter(void){}
@@ -141,11 +142,11 @@
{
sqlite3_bind_int(st, nPos, val);
}
void bind(sqlite3_stmt* st, int nPos, const String& val)
{
- sqlite3_bind_text(st, nPos, val.c_str(), -1, SQLITE_TRANSIENT);
+ sqlite3_bind_text(st, nPos, val.c_str(), val.length(), SQLITE_TRANSIENT);
}
void bind(sqlite3_stmt* st, int nPos, const char* val)
{
sqlite3_bind_text(st, nPos, val, -1, SQLITE_TRANSIENT);
}
@@ -354,10 +355,10 @@
void setImportDB(String fDataName, String strCryptKey);
void createTrigger(const String& strSQL);
void dropTrigger(const String& strName);
- virtual DBResultPtr prepareStatement( const char* szSt );
+ DBResultPtr prepareStatement( const char* szSt );
DBResultPtr executeStatement(common::CAutoPtr<CDBResult>& res, const char* szSt);
void updateAllAttribChanges();
void updateFullUpdateChanges(int nSrcID);
String exportDatabase();