mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Implement SQLiteDatabaseVersion
This commit is contained in:
parent
7577b6e1c8
commit
ca8b7e04ab
2 changed files with 8 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
#include <util/translation.h>
|
#include <util/translation.h>
|
||||||
#include <wallet/db.h>
|
#include <wallet/db.h>
|
||||||
|
|
||||||
|
#include <sqlite3.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
static const char* const DATABASE_FILENAME = "wallet.dat";
|
static const char* const DATABASE_FILENAME = "wallet.dat";
|
||||||
|
|
@ -107,3 +108,8 @@ std::unique_ptr<SQLiteDatabase> MakeSQLiteDatabase(const fs::path& path, const D
|
||||||
{
|
{
|
||||||
return MakeUnique<SQLiteDatabase>(path, path / DATABASE_FILENAME);
|
return MakeUnique<SQLiteDatabase>(path, path / DATABASE_FILENAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string SQLiteDatabaseVersion()
|
||||||
|
{
|
||||||
|
return std::string(sqlite3_libversion());
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,4 +96,6 @@ public:
|
||||||
bool ExistsSQLiteDatabase(const fs::path& path);
|
bool ExistsSQLiteDatabase(const fs::path& path);
|
||||||
std::unique_ptr<SQLiteDatabase> MakeSQLiteDatabase(const fs::path& path, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error);
|
std::unique_ptr<SQLiteDatabase> MakeSQLiteDatabase(const fs::path& path, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error);
|
||||||
|
|
||||||
|
std::string SQLiteDatabaseVersion();
|
||||||
|
|
||||||
#endif // BITCOIN_WALLET_SQLITE_H
|
#endif // BITCOIN_WALLET_SQLITE_H
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue