Bitcoin Core  0.20.99
P2P Digital Currency
Classes | Enumerations | Functions
db.h File Reference
#include <clientversion.h>
#include <fs.h>
#include <optional.h>
#include <streams.h>
#include <support/allocators/secure.h>
#include <util/memory.h>
#include <atomic>
#include <memory>
#include <string>
Include dependency graph for db.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DatabaseBatch
 RAII class that provides access to a WalletDatabase. More...
 
class  WalletDatabase
 An instance of this class represents one database. More...
 
class  DummyBatch
 RAII class that provides access to a DummyDatabase. More...
 
class  DummyDatabase
 A dummy WalletDatabase that does nothing and never fails. More...
 
struct  DatabaseOptions
 

Enumerations

enum  DatabaseFormat { DatabaseFormat::BERKELEY, DatabaseFormat::SQLITE }
 
enum  DatabaseStatus {
  DatabaseStatus::SUCCESS, DatabaseStatus::FAILED_BAD_PATH, DatabaseStatus::FAILED_BAD_FORMAT, DatabaseStatus::FAILED_ALREADY_LOADED,
  DatabaseStatus::FAILED_ALREADY_EXISTS, DatabaseStatus::FAILED_NOT_FOUND, DatabaseStatus::FAILED_CREATE, DatabaseStatus::FAILED_LOAD,
  DatabaseStatus::FAILED_VERIFY, DatabaseStatus::FAILED_ENCRYPT
}
 

Functions

void SplitWalletPath (const fs::path &wallet_path, fs::path &env_directory, std::string &database_filename)
 
std::unique_ptr< WalletDatabaseMakeDatabase (const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
 

Enumeration Type Documentation

◆ DatabaseFormat

enum DatabaseFormat
strong
Enumerator
BERKELEY 
SQLITE 

Definition at line 199 of file db.h.

◆ DatabaseStatus

enum DatabaseStatus
strong
Enumerator
SUCCESS 
FAILED_BAD_PATH 
FAILED_BAD_FORMAT 
FAILED_ALREADY_LOADED 
FAILED_ALREADY_EXISTS 
FAILED_NOT_FOUND 
FAILED_CREATE 
FAILED_LOAD 
FAILED_VERIFY 
FAILED_ENCRYPT 

Definition at line 213 of file db.h.

Function Documentation

◆ MakeDatabase()

std::unique_ptr<WalletDatabase> MakeDatabase ( const fs::path &  path,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error 
)

Definition at line 999 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SplitWalletPath()

void SplitWalletPath ( const fs::path &  wallet_path,
fs::path &  env_directory,
std::string &  database_filename 
)

Definition at line 11 of file db.cpp.

Here is the caller graph for this function: