louiz’
bfcf294517
Add the persistent_by_default configuration option
...
fix #3293
2017-09-09 17:09:17 +02:00
louiz’
2c717d347d
Add an index for the muc_log_line table
...
This immensely speeds up the archive select queries.
fix #3292
2017-08-26 17:42:59 +02:00
louiz’
655151d88a
Cache the encoding_in database value, to avoid doing a query for each message
2017-08-26 13:51:15 +02:00
louiz’
2a62b8b082
Fix a sqlite3 leak when the database fails to open
2017-08-19 13:02:34 +02:00
louiz’
9648fd286c
Display the correct error message when we fail to open the sqlite3 db
...
fix #3290
2017-08-19 13:02:13 +02:00
louiz’
84034ed3dc
Use a db roster to manage biboumi’s presence with the contacts
2017-07-16 00:16:43 +02:00
louiz’
3974371e7b
Replace a function argument from ... to the template Args&&... thing
2017-07-08 19:07:53 +02:00
louiz’
fd7ee48a86
Remove many log_debug from the database module
2017-07-08 18:11:25 +02:00
louiz’
faed8952cb
Remove a bunch of useless string_literal usage
2017-07-08 14:04:35 +02:00
louiz’
7a9b2dca06
Use a more precise return type, instead of auto
2017-07-08 12:37:03 +02:00
louiz’
cf56b60fd3
Remove all the empty “options” members in Column classes
...
By using SFINAE to use that member only when it exists.
2017-07-08 12:36:08 +02:00
louiz’
9f7782bb0c
Add a global “persistent” option
2017-07-06 22:24:42 +02:00
louiz’
b71ca15a0f
Move a few functions from select_query to query
2017-06-23 00:13:38 +02:00
louiz’
8a7166eef9
Set the database pointer to nullptr after a close
2017-06-22 16:14:00 +02:00
louiz’
4d55a120d8
Re-implement correctly the handling of failure to open the database
...
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-21 17:41:03 +02:00
louiz’
40db183e37
Using OptionalBool, add RecordHistoryOptional col into IrcChannelOptions table
...
ref #3269
2017-06-16 09:54:36 +02:00
louiz’
4a963cc480
At startup, upgrade all database tables by adding missing columns
2017-06-16 09:53:49 +02:00
louiz’
a77c982f63
Fix cstdint -> cstddef, to fix compilation on freebsd
2017-06-14 18:47:01 +02:00
louiz’
34ed2cc1a9
Explicitely declare the add_param<Id> specialization
2017-06-14 17:25:15 +02:00
louiz’
5834dd53f3
Add a 0 default value for template argument N
2017-06-14 16:21:23 +02:00
louiz’
2677ac42e8
Fix compilation (many warnings, and a linkage error) with clang++
2017-06-14 10:46:44 +02:00
louiz’
dac19da4c7
Fix an inversion of tlsPorts_ and ports_
2017-06-14 10:46:44 +02:00
louiz’
9defd0ccb7
Add a Statement class to manage the sqlite3_stmt objects and avoid leaks
2017-06-14 00:19:15 +02:00
louiz’
369ccb0376
Add default values for the database columns
2017-06-14 00:19:15 +02:00
louiz’
50cadf3dac
Implement our own database ORM, and update the whole code to use it
...
Entirely replace LiteSQL
fix #3271
2017-06-14 00:19:15 +02:00
louiz’
7f2127a7ea
Add the archive ID to messages when they are sent to users
...
This makes us compatible with mam 6.0
fix #3249
2017-03-30 18:16:44 +02:00
louiz’
1a09c965eb
Remove two sneaky log_debug
2017-03-29 23:32:43 +02:00
louiz’
379fe026fb
Properly convert the data into a number of seconds by using duration_cast
2016-12-10 04:15:49 +01:00
louiz’
363a0bf02c
Look for uuid/uuid.h instead of just uuid.h
...
Avoids a conflict between /usr/include/uuid.h and
/usr/local/include/uuid/uuid.h on freebsd
2016-09-29 20:11:35 +02:00
louiz’
3047bd41b2
MAM results can be filtered by start and end dates
2016-09-04 22:58:38 +02:00
louiz’
7536a1b3f3
Respond to MAM requests on a channel JID
...
At the moment, result-set-management is not implemented, the whole history
(well, at most 1024 messages) is returned.
2016-08-28 22:42:50 +02:00
louiz’
88499d0379
If the maxHistoryLength is negative, make it 0
...
Instead of doing a broken SQL request that returns weird lines
2016-08-23 01:28:12 +02:00
louiz’
d1626c929f
When joining a channel, send the most recent history found in the database
2016-08-22 00:44:17 +02:00
louiz’
593b326827
When saving the logs, the date must be in seconds, not nanoseconds
2016-08-22 00:39:11 +02:00
louiz’
6776b827d2
Add a global configure ad-hoc command, with max history length
2016-08-22 00:38:44 +02:00
louiz’
992fa93895
Add get_first_non_empty and use it into Database to simplify a little bit
2016-08-21 01:51:52 +02:00
louiz’
8ec823be4f
Save received and sent messages into the database
2016-08-12 16:39:19 +02:00
louiz’
4c1b9abe7e
Properly catch and handle database errors
...
Do not use a singleton for the database.
fix #3203
2016-07-12 00:31:57 +02:00
louiz’
81f8f45b37
Replace all include guards by #pragma once
...
It’s $CURRENT_YEAR
2016-07-04 17:53:53 +02:00
louiz’
af42073830
Style fix
...
Move all constructors at the top of classes
2016-05-04 14:16:40 +02:00
Florent Le Coz
421c960df5
Add a ChannelOptions table in the DB
...
And a way to retrieve its values, defaulting on the ServerOptions for unset
values.
2016-01-04 13:47:26 +01:00
Florent Le Coz
580b721ba5
Remove a write to std::cout from Database’s constructor
2015-10-29 03:35:25 +01:00
Florent Le Coz
74c73799ab
Only compile database.cpp if configured with litesql
2015-10-24 15:17:53 +02:00
Florent Le Coz
88ae2599f6
Introduce an optional Database module
...
Uses litesql
2015-09-18 22:09:26 +02:00