From 58841ef12f6cba1bb622353c1fcaa0e3c6fb46c9 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Tue, 23 Oct 2012 01:18:44 +0400 Subject: Add dummy and LevelDB database backends --- src/map.h | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 2f8bfaeba..15725f00e 100644 --- a/src/map.h +++ b/src/map.h @@ -33,10 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "modifiedstate.h" #include "util/container.h" #include "nodetimer.h" - -extern "C" { - #include "sqlite3.h" -} +#include "database.h" class ClientMap; class MapSector; @@ -425,13 +422,8 @@ public: /* Database functions */ - // Create the database structure - void createDatabase(); // Verify we can read/write to the database void verifyDatabase(); - // Get an integer suitable for a block - static sqlite3_int64 getBlockAsInteger(const v3s16 pos); - static v3s16 getIntegerAsBlock(sqlite3_int64 i); // Returns true if the database file does not exist bool loadFromFolders(); @@ -511,14 +503,7 @@ private: This is reset to false when written on disk. */ bool m_map_metadata_changed; - - /* - SQLite database and statements - */ - sqlite3 *m_database; - sqlite3_stmt *m_database_read; - sqlite3_stmt *m_database_write; - sqlite3_stmt *m_database_list; + Database *dbase; }; #define VMANIP_BLOCK_DATA_INEXIST 1 -- cgit v1.2.3