1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add dummy and LevelDB database backends

This commit is contained in:
Ilya Zhuravlev 2012-10-23 01:18:44 +04:00 committed by Sfan5
parent 71a8769bb5
commit 58841ef12f
148 changed files with 26766 additions and 242 deletions

View file

@ -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