Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
database-sqlite3.cpp File Reference
#include "database-sqlite3.h"
#include "log.h"
#include "filesys.h"
#include "exceptions.h"
#include "settings.h"
#include "porting.h"
#include "util/string.h"
#include "remoteplayer.h"
#include "irrlicht_changes/printing.h"
#include "server/player_sao.h"
#include <cassert>
+ Include dependency graph for database-sqlite3.cpp:

Macros

#define BUSY_INFO_TRESHOLD   100
 
#define BUSY_WARNING_TRESHOLD   250
 
#define BUSY_ERROR_TRESHOLD   1000
 
#define BUSY_FATAL_TRESHOLD   3000
 
#define BUSY_ERROR_INTERVAL   10000
 
#define SQLRES(s, r, m)
 
#define SQLOK(s, m)   SQLRES(s, SQLITE_OK, m)
 
#define PREPARE_STATEMENT(name, query)
 
#define SQLOK_ERRSTREAM(s, m)
 
#define FINALIZE_STATEMENT(statement)
 

Macro Definition Documentation

◆ BUSY_ERROR_INTERVAL

#define BUSY_ERROR_INTERVAL   10000

◆ BUSY_ERROR_TRESHOLD

#define BUSY_ERROR_TRESHOLD   1000

◆ BUSY_FATAL_TRESHOLD

#define BUSY_FATAL_TRESHOLD   3000

◆ BUSY_INFO_TRESHOLD

#define BUSY_INFO_TRESHOLD   100

◆ BUSY_WARNING_TRESHOLD

#define BUSY_WARNING_TRESHOLD   250

◆ FINALIZE_STATEMENT

#define FINALIZE_STATEMENT ( statement)

◆ PREPARE_STATEMENT

#define PREPARE_STATEMENT ( name,
query )
Value:
SQLOK(sqlite3_prepare_v2(m_database, query, -1, &m_stmt_##name, NULL),\
"Failed to prepare query '" query "'")
#define SQLOK(s, m)
Definition database-sqlite3.cpp:41

Referenced by AuthDatabaseSQLite3::initStatements(), MapDatabaseSQLite3::initStatements(), ModStorageDatabaseSQLite3::initStatements(), PlayerDatabaseSQLite3::initStatements(), and Database_SQLite3::verifyDatabase().

◆ SQLOK

◆ SQLOK_ERRSTREAM

#define SQLOK_ERRSTREAM ( s,
m )
Value:
if ((s) != SQLITE_OK) { \
errorstream << (m) << ": " \
<< sqlite3_errmsg(m_database) << std::endl; \
}
thread_local LogStream errorstream

Referenced by Database_SQLite3::~Database_SQLite3(), and RollbackManager::~RollbackManager().

◆ SQLRES

#define SQLRES ( s,
r,
m )
Value:
if ((s) != (r)) { \
throw DatabaseException(std::string(m) + ": " +\
sqlite3_errmsg(m_database)); \
}
Definition exceptions.h:40

Referenced by Database_SQLite3::beginSave(), Database_SQLite3::endSave(), RollbackManager::getActorId(), RollbackManager::getNodeId(), MapDatabaseSQLite3::saveBlock(), and ModStorageDatabaseSQLite3::setModEntry().