mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
Added method "tableExist" to RetroDb.
This commit is contained in:
parent
3665238e61
commit
6ac107a954
2 changed files with 57 additions and 17 deletions
|
@ -38,8 +38,6 @@
|
|||
|
||||
#include "contentvalue.h"
|
||||
|
||||
|
||||
|
||||
class RetroCursor;
|
||||
|
||||
/*!
|
||||
|
@ -90,8 +88,6 @@ public:
|
|||
/* modifying db */
|
||||
public:
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* Start transaction
|
||||
* @return true/false
|
||||
|
@ -171,22 +167,13 @@ public:
|
|||
*/
|
||||
void vacuum();
|
||||
|
||||
|
||||
/*!
|
||||
* Build the "VALUE" part of an insertiong sql query
|
||||
* @param parameter contains place holder query
|
||||
* @param paramBindings
|
||||
* Check if table exist in database
|
||||
* @param tableName table to check
|
||||
* @return true/false
|
||||
*/
|
||||
void buildInsertQueryValue(const std::map<std::string, uint8_t> keyMap, const ContentValue& cv,
|
||||
std::string& parameter, std::list<RetroBind*>& paramBindings);
|
||||
bool tableExists(const std::string& tableName);
|
||||
|
||||
/*!
|
||||
* Build the "VALUE" part of an insertiong sql query
|
||||
* @param parameter contains place holder query
|
||||
* @param paramBindings
|
||||
*/
|
||||
void buildUpdateQueryValue(const std::map<std::string, uint8_t> keyMap, const ContentValue& cv,
|
||||
std::string& parameter, std::list<RetroBind*>& paramBindings);
|
||||
public:
|
||||
|
||||
static const int OPEN_READONLY;
|
||||
|
@ -197,6 +184,22 @@ private:
|
|||
|
||||
bool execSQL_bind(const std::string &query, std::list<RetroBind*>& blobs);
|
||||
|
||||
/*!
|
||||
* Build the "VALUE" part of an insertiong sql query
|
||||
* @param parameter contains place holder query
|
||||
* @param paramBindings
|
||||
*/
|
||||
void buildInsertQueryValue(const std::map<std::string, uint8_t> keyMap, const ContentValue& cv,
|
||||
std::string& parameter, std::list<RetroBind*>& paramBindings);
|
||||
|
||||
/*!
|
||||
* Build the "VALUE" part of an insertiong sql query
|
||||
* @param parameter contains place holder query
|
||||
* @param paramBindings
|
||||
*/
|
||||
void buildUpdateQueryValue(const std::map<std::string, uint8_t> keyMap, const ContentValue& cv,
|
||||
std::string& parameter, std::list<RetroBind*>& paramBindings);
|
||||
|
||||
private:
|
||||
|
||||
sqlite3* mDb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue