Forward-declare SqliteConnectionSafe and SqliteDb. Finally, all DB usages are private.
GitOrigin-RevId: 63d904c6ba9e3896f46ce8844e328f77c7e50553
This commit is contained in:
parent
9bdc13e89f
commit
a062fa4f0c
@ -10,6 +10,7 @@
|
|||||||
#include "td/db/binlog/ConcurrentBinlog.h"
|
#include "td/db/binlog/ConcurrentBinlog.h"
|
||||||
#include "td/db/BinlogKeyValue.h"
|
#include "td/db/BinlogKeyValue.h"
|
||||||
#include "td/db/SeqKeyValue.h"
|
#include "td/db/SeqKeyValue.h"
|
||||||
|
#include "td/db/SqliteConnectionSafe.h"
|
||||||
#include "td/db/SqliteDb.h"
|
#include "td/db/SqliteDb.h"
|
||||||
#include "td/db/SqliteKeyValueAsync.h"
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
|
#include "td/db/SqliteConnectionSafe.h"
|
||||||
|
|
||||||
#include "td/utils/benchmark.h"
|
#include "td/utils/benchmark.h"
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
@ -77,7 +79,7 @@ class MessagesDbBench : public Benchmark {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
td::unique_ptr<td::ConcurrentScheduler> scheduler_;
|
td::unique_ptr<ConcurrentScheduler> scheduler_;
|
||||||
std::shared_ptr<SqliteConnectionSafe> sql_connection_;
|
std::shared_ptr<SqliteConnectionSafe> sql_connection_;
|
||||||
std::shared_ptr<MessagesDbSyncSafeInterface> messages_db_sync_safe_;
|
std::shared_ptr<MessagesDbSyncSafeInterface> messages_db_sync_safe_;
|
||||||
std::shared_ptr<MessagesDbAsyncInterface> messages_db_async_;
|
std::shared_ptr<MessagesDbAsyncInterface> messages_db_async_;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
#include "td/actor/SchedulerLocalStorage.h"
|
#include "td/actor/SchedulerLocalStorage.h"
|
||||||
|
|
||||||
|
#include "td/db/SqliteConnectionSafe.h"
|
||||||
#include "td/db/SqliteDb.h"
|
#include "td/db/SqliteDb.h"
|
||||||
#include "td/db/SqliteKeyValue.h"
|
#include "td/db/SqliteKeyValue.h"
|
||||||
#include "td/db/SqliteStatement.h"
|
#include "td/db/SqliteStatement.h"
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
#include "td/db/SqliteConnectionSafe.h"
|
|
||||||
|
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
@ -22,6 +20,10 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
class SqliteConnectionSafe;
|
||||||
|
class SqliteDb;
|
||||||
|
|
||||||
class DialogDbSyncInterface {
|
class DialogDbSyncInterface {
|
||||||
public:
|
public:
|
||||||
DialogDbSyncInterface() = default;
|
DialogDbSyncInterface() = default;
|
||||||
@ -87,4 +89,5 @@ std::shared_ptr<DialogDbSyncSafeInterface> create_dialog_db_sync(
|
|||||||
|
|
||||||
std::shared_ptr<DialogDbAsyncInterface> create_dialog_db_async(std::shared_ptr<DialogDbSyncSafeInterface> sync_db,
|
std::shared_ptr<DialogDbAsyncInterface> create_dialog_db_async(std::shared_ptr<DialogDbSyncSafeInterface> sync_db,
|
||||||
int32 scheduler_id);
|
int32 scheduler_id);
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "td/telegram/logevent/LogEvent.h"
|
#include "td/telegram/logevent/LogEvent.h"
|
||||||
#include "td/telegram/Version.h"
|
#include "td/telegram/Version.h"
|
||||||
|
|
||||||
|
#include "td/db/SqliteConnectionSafe.h"
|
||||||
#include "td/db/SqliteDb.h"
|
#include "td/db/SqliteDb.h"
|
||||||
#include "td/db/SqliteStatement.h"
|
#include "td/db/SqliteStatement.h"
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
#include "td/db/SqliteConnectionSafe.h"
|
|
||||||
|
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
@ -24,6 +22,9 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
class SqliteConnectionSafe;
|
||||||
|
class SqliteDb;
|
||||||
|
|
||||||
// append only before Size
|
// append only before Size
|
||||||
enum class SearchMessagesFilter : int32 {
|
enum class SearchMessagesFilter : int32 {
|
||||||
Empty,
|
Empty,
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "td/db/binlog/Binlog.h"
|
#include "td/db/binlog/Binlog.h"
|
||||||
#include "td/db/binlog/ConcurrentBinlog.h"
|
#include "td/db/binlog/ConcurrentBinlog.h"
|
||||||
#include "td/db/BinlogKeyValue.h"
|
#include "td/db/BinlogKeyValue.h"
|
||||||
|
#include "td/db/SqliteConnectionSafe.h"
|
||||||
#include "td/db/SqliteKeyValue.h"
|
#include "td/db/SqliteKeyValue.h"
|
||||||
#include "td/db/SqliteKeyValueAsync.h"
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
#include "td/db/SqliteKeyValueSafe.h"
|
#include "td/db/SqliteKeyValueSafe.h"
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
|
|
||||||
|
#include "td/db/SqliteConnectionSafe.h"
|
||||||
#include "td/db/SqliteKeyValue.h"
|
#include "td/db/SqliteKeyValue.h"
|
||||||
#include "td/db/SqliteKeyValueSafe.h"
|
#include "td/db/SqliteKeyValueSafe.h"
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
#include "td/db/binlog/BinlogHelper.h"
|
#include "td/db/binlog/BinlogHelper.h"
|
||||||
#include "td/db/binlog/ConcurrentBinlog.h"
|
#include "td/db/binlog/ConcurrentBinlog.h"
|
||||||
|
#include "td/db/SqliteConnectionSafe.h"
|
||||||
#include "td/db/BinlogKeyValue.h"
|
#include "td/db/BinlogKeyValue.h"
|
||||||
#include "td/db/SeqKeyValue.h"
|
#include "td/db/SeqKeyValue.h"
|
||||||
#include "td/db/SqliteKeyValue.h"
|
#include "td/db/SqliteKeyValue.h"
|
||||||
|
Reference in New Issue
Block a user