#include <database-sqlite3.h>
Inheritance diagram for MapDatabaseSQLite3:
Collaboration diagram for MapDatabaseSQLite3:Public Member Functions | |
| MapDatabaseSQLite3 (const std::string &savedir) | |
| virtual | ~MapDatabaseSQLite3 () |
| bool | saveBlock (const v3s16 &pos, std::string_view data) |
| void | loadBlock (const v3s16 &pos, std::string *block) |
| bool | deleteBlock (const v3s16 &pos) |
| void | listAllLoadableBlocks (std::vector< v3s16 > &dst) |
Public Member Functions inherited from MapDatabase | |
| virtual | ~MapDatabase ()=default |
Protected Member Functions | |
| virtual void | createDatabase () |
| virtual void | initStatements () |
Private Member Functions | |
| int | bindPos (sqlite3_stmt *stmt, v3s16 pos, int index=1) |
| Bind block position into statement at column index. | |
Private Member Functions inherited from Database_SQLite3 | |
| virtual | ~Database_SQLite3 () |
| void | beginSave () override |
| void | endSave () override |
| bool | initialized () const override |
| void | verifyDatabase () override |
| Database_SQLite3 (const std::string &savedir, const std::string &dbname) | |
| bool | checkTable (const char *table) |
| bool | checkColumn (const char *table, const char *column) |
| void | str_to_sqlite (sqlite3_stmt *s, int iCol, std::string_view str) const |
| void | blob_to_sqlite (sqlite3_stmt *s, int iCol, std::string_view str) const |
| void | int_to_sqlite (sqlite3_stmt *s, int iCol, int val) const |
| void | int64_to_sqlite (sqlite3_stmt *s, int iCol, s64 val) const |
| void | double_to_sqlite (sqlite3_stmt *s, int iCol, double val) const |
| std::string_view | sqlite_to_string_view (sqlite3_stmt *s, int iCol) |
| std::string | sqlite_to_string (sqlite3_stmt *s, int iCol) |
| std::string_view | sqlite_to_blob (sqlite3_stmt *s, int iCol) |
| s32 | sqlite_to_int (sqlite3_stmt *s, int iCol) |
| u32 | sqlite_to_uint (sqlite3_stmt *s, int iCol) |
| s64 | sqlite_to_int64 (sqlite3_stmt *s, int iCol) |
| u64 | sqlite_to_uint64 (sqlite3_stmt *s, int iCol) |
| float | sqlite_to_float (sqlite3_stmt *s, int iCol) |
| const v3f | sqlite_to_v3f (sqlite3_stmt *s, int iCol) |
| void | sqlite3_vrfy (int s, std::string_view m="", int r=SQLITE_OK) const |
| void | sqlite3_vrfy (const int s, const int r, std::string_view m="") const |
Private Attributes | |
| bool | m_new_format = false |
| sqlite3_stmt * | m_stmt_read = nullptr |
| sqlite3_stmt * | m_stmt_write = nullptr |
| sqlite3_stmt * | m_stmt_list = nullptr |
| sqlite3_stmt * | m_stmt_delete = nullptr |
Private Attributes inherited from Database_SQLite3 | |
| sqlite3 * | m_database = nullptr |
Additional Inherited Members | |
Static Public Member Functions inherited from MapDatabase | |
| static s64 | getBlockAsInteger (const v3s16 &pos) |
| static v3s16 | getIntegerAsBlock (s64 i) |
| MapDatabaseSQLite3::MapDatabaseSQLite3 | ( | const std::string & | savedir | ) |
|
virtual |
References FINALIZE_STATEMENT.
|
inlineprivate |
Bind block position into statement at column index.
References MapDatabase::getBlockAsInteger(), Database_SQLite3::int64_to_sqlite(), Database_SQLite3::int_to_sqlite(), and m_new_format.
Referenced by deleteBlock(), loadBlock(), and saveBlock().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements Database_SQLite3.
References Database_SQLite3::m_database, and SQLOK.
|
virtual |
Implements MapDatabase.
References bindPos(), Database_SQLite3::m_database, m_stmt_delete, Database_SQLite3::verifyDatabase(), and warningstream.
Here is the call graph for this function:
|
protectedvirtual |
Implements Database_SQLite3.
References Database_SQLite3::checkColumn(), Database_SQLite3::checkTable(), infostream, m_new_format, and PREPARE_STATEMENT.
Here is the call graph for this function:
|
virtual |
Implements MapDatabase.
References MapDatabase::getIntegerAsBlock(), m_new_format, m_stmt_list, p(), Database_SQLite3::sqlite_to_int(), Database_SQLite3::sqlite_to_int64(), and Database_SQLite3::verifyDatabase().
Here is the call graph for this function:
|
virtual |
Implements MapDatabase.
References bindPos(), m_stmt_read, Database_SQLite3::sqlite_to_blob(), and Database_SQLite3::verifyDatabase().
Here is the call graph for this function:
|
virtual |
Implements MapDatabase.
References bindPos(), Database_SQLite3::blob_to_sqlite(), m_stmt_write, SQLRES, and Database_SQLite3::verifyDatabase().
Here is the call graph for this function:
|
private |
Referenced by bindPos(), initStatements(), and listAllLoadableBlocks().
|
private |
Referenced by deleteBlock().
|
private |
Referenced by listAllLoadableBlocks().
|
private |
Referenced by loadBlock().
|
private |
Referenced by saveBlock().