summaryrefslogtreecommitdiff
path: root/src/database/database.cpp
AgeCommit message (Collapse)Author
2018-02-10Always return the oldest matching messages from MAM, even if no date is setlouiz’
2017-12-16db_name also accepts postgres:// scheme for PostgreSQL connectionslouiz’
2017-12-02Handle postgresql and sqlite3 libs properlylouiz’
Do not fail to compile when one of them is missing but the other one is not. Raise an error when trying to open a database with the missing library. see #3237
2017-12-02Actually free the database on Database::close()Jonas Wielicki
.release() returns the pointer and releases ownership *without* destruction.
2017-12-02Support for full postgresql URIsJonas Wielicki
(cf. https://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING)
2017-12-02Add postgresql supportlouiz’
2017-09-21compat: revert to using sqlite's close() function for compat with older distros.Romain DEP.
close_v2(), in use before this commit, was introduced as part of sqlite 3.7.14 (2012-09-03), and is as such incompatible with debian wheezy (3.7.13) and centos6 (3.6.20). FTR, Wheezy will be supported until May 2018, and centos6, until November 2020.
2017-09-09Add the persistent_by_default configuration optionlouiz’
fix #3293
2017-08-26Add an index for the muc_log_line tablelouiz’
This immensely speeds up the archive select queries. fix #3292
2017-08-26Cache the encoding_in database value, to avoid doing a query for each messagelouiz’
2017-08-19Fix a sqlite3 leak when the database fails to openlouiz’
2017-08-19Display the correct error message when we fail to open the sqlite3 dblouiz’
fix #3290
2017-07-16Use a db roster to manage biboumi’s presence with the contactslouiz’
2017-06-23Move a few functions from select_query to querylouiz’
2017-06-22Set the database pointer to nullptr after a closelouiz’
2017-06-21Re-implement correctly the handling of failure to open the databaselouiz’
If we can’t open it at startup, we exit. If we can’t open it on reload, we keep the previously-opened database. This way, we’re assured to always have a valid and open database available.
2017-06-16At startup, upgrade all database tables by adding missing columnslouiz’
2017-06-14Implement our own database ORM, and update the whole code to use itlouiz’
Entirely replace LiteSQL fix #3271
2017-03-30Add the archive ID to messages when they are sent to userslouiz’
This makes us compatible with mam 6.0 fix #3249
2017-03-29Remove two sneaky log_debuglouiz’
2016-12-10Properly convert the data into a number of seconds by using duration_castlouiz’
2016-09-29Look for uuid/uuid.h instead of just uuid.hlouiz’
Avoids a conflict between /usr/include/uuid.h and /usr/local/include/uuid/uuid.h on freebsd
2016-09-04MAM results can be filtered by start and end dateslouiz’
2016-08-28Respond to MAM requests on a channel JIDlouiz’
At the moment, result-set-management is not implemented, the whole history (well, at most 1024 messages) is returned.
2016-08-23If the maxHistoryLength is negative, make it 0louiz’
Instead of doing a broken SQL request that returns weird lines
2016-08-22When joining a channel, send the most recent history found in the databaselouiz’
2016-08-22When saving the logs, the date must be in seconds, not nanosecondslouiz’
2016-08-22Add a global configure ad-hoc command, with max history lengthlouiz’
2016-08-21Add get_first_non_empty and use it into Database to simplify a little bitlouiz’
2016-08-12Save received and sent messages into the databaselouiz’
2016-07-12Properly catch and handle database errorslouiz’
Do not use a singleton for the database. fix #3203
2016-01-04Add a ChannelOptions table in the DBFlorent Le Coz
And a way to retrieve its values, defaulting on the ServerOptions for unset values.
2015-10-29Remove a write to std::cout from Database’s constructorFlorent Le Coz
2015-10-24Only compile database.cpp if configured with litesqlFlorent Le Coz
2015-09-18Introduce an optional Database moduleFlorent Le Coz
Uses litesql