diff options
Diffstat (limited to 'src/database/database-postgresql.h')
-rw-r--r-- | src/database/database-postgresql.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/database/database-postgresql.h b/src/database/database-postgresql.h index db0b505c9..5a8b89a51 100644 --- a/src/database/database-postgresql.h +++ b/src/database/database-postgresql.h @@ -32,12 +32,13 @@ public: Database_PostgreSQL(const std::string &connect_string); ~Database_PostgreSQL(); + virtual void pingDatabase(); + void beginSave(); void endSave(); bool initialized() const; - protected: // Conversion helpers inline int pg_to_int(PGresult *res, int row, int col) @@ -82,7 +83,6 @@ protected: } void createTableIfNotExists(const std::string &table_name, const std::string &definition); - void verifyDatabase(); // Database initialization void connectToDatabase(); @@ -113,6 +113,8 @@ public: MapDatabasePostgreSQL(const std::string &connect_string); virtual ~MapDatabasePostgreSQL() = default; + virtual void pingDatabase() { Database_PostgreSQL::pingDatabase(); } + bool saveBlock(const v3s16 &pos, const std::string &data); void loadBlock(const v3s16 &pos, std::string *block); bool deleteBlock(const v3s16 &pos); @@ -132,6 +134,8 @@ public: PlayerDatabasePostgreSQL(const std::string &connect_string); virtual ~PlayerDatabasePostgreSQL() = default; + virtual void pingDatabase() { Database_PostgreSQL::pingDatabase(); } + void savePlayer(RemotePlayer *player); bool loadPlayer(RemotePlayer *player, PlayerSAO *sao); bool removePlayer(const std::string &name); |