Browse Source

docs: add documentation for some new functions

reviewable/pr5191/r3
TriKriSta 7 years ago
parent
commit
74468fde32
  1. 12
      src/persistence/db/rawdatabase.cpp
  2. 13
      src/persistence/history.cpp

12
src/persistence/db/rawdatabase.cpp

@ -718,11 +718,23 @@ QVariant RawDatabase::extractData(sqlite3_stmt* stmt, int col) @@ -718,11 +718,23 @@ QVariant RawDatabase::extractData(sqlite3_stmt* stmt, int col)
}
}
/**
* @brief Use for create function in db for search data use regular experessions without case sensitive
* @param ctx ctx the context in which an SQL function executes
* @param argc number of arguments
* @param argv arguments
*/
void RawDatabase::regexpInsensitive(sqlite3_context* ctx, int argc, sqlite3_value** argv)
{
regexp(ctx, argc, argv, Qt::CaseInsensitive);
}
/**
* @brief Use for create function in db for search data use regular experessions without case sensitive
* @param ctx the context in which an SQL function executes
* @param argc number of arguments
* @param argv arguments
*/
void RawDatabase::regexpSensitive(sqlite3_context* ctx, int argc, sqlite3_value** argv)
{
regexp(ctx, argc, argv, Qt::CaseSensitive);

13
src/persistence/history.cpp

@ -315,6 +315,14 @@ QList<History::DateMessages> History::getChatHistoryCounts(const ToxPk& friendPk @@ -315,6 +315,14 @@ QList<History::DateMessages> History::getChatHistoryCounts(const ToxPk& friendPk
return counts;
}
/**
* @brief Search phrase in chat messages
* @param friendPk Friend public key
* @param from a date message where need to start a search
* @param phrase what need to find
* @param parameter for search
* @return date of the message where the phrase was found
*/
QDateTime History::getDateWhereFindPhrase(const QString& friendPk, const QDateTime& from, QString phrase, const ParameterSearch& parameter)
{
QList<QDateTime> counts;
@ -389,6 +397,11 @@ QDateTime History::getDateWhereFindPhrase(const QString& friendPk, const QDateTi @@ -389,6 +397,11 @@ QDateTime History::getDateWhereFindPhrase(const QString& friendPk, const QDateTi
return QDateTime();
}
/**
* @brief get start date of correspondence
* @param friendPk Friend public key
* @return start date of correspondence
*/
QDateTime History::getStartDateChatHistory(const QString &friendPk)
{
QList<QDateTime> counts;

Loading…
Cancel
Save