issue: ENG-8642
Usage of SQLiteStatementWrapper, bindStringToSQL, bindResult, sqlite3_step based on rekeyAllEntities
The UPDATE case is for edits - we want to update the entry for the original message. We want original_message_id to always point at the oldest message, message_id to point at the newest edit, and`processed_content` to be the content of the newest edit.
original_message_id == message_id means that the message is the original message, not an edit.
Details
Details
Added the following code at the end of updateMessageSearchResult, and verified that a non zero count if found after calling the function.
std::string query = "SELECT * FROM message_search"; comm::SQLiteStatementWrapper preparedSQL1( db, query, "Failed to fetch from search"); int count = 0; for (int stepResult = sqlite3_step(preparedSQL1); stepResult == SQLITE_ROW; stepResult = sqlite3_step(preparedSQL1)) { count++; } Logger::log("message search row count: "+ std::to_string(count));
Update tested with tests while developing search query
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Branch
- inka/search
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
Update SQL formatting
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp | ||
---|---|---|
1446–1448 ↗ | (On Diff #42353) | Formatting based on this |
native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h | ||
---|---|---|
171 ↗ | (On Diff #42377) | This name is a bit strange - we update a (virtual) table and not the result. I think updateMessageSearchTable is a better name, or even updateMessageSearchIndex, but it's up to you - keeping the current name also makes some sense. |
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp | ||
---|---|---|
1492 ↗ | (On Diff #42462) | Don't we normally use two spaces for indents rather than one? |
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp | ||
---|---|---|
1516 ↗ | (On Diff #42618) | Two spaces for indents |