ledger-core
Public Member Functions | List of all members
ledger::core::api::DatabaseEngine Class Referenceabstract

#include <DatabaseEngine.hpp>

+ Inheritance diagram for ledger::core::api::DatabaseEngine:

Public Member Functions

virtual std::shared_ptr< DatabaseConnectionPoolconnect (const std::string &databaseName)=0
 
virtual int32_t getPoolSize ()=0
 

Detailed Description

An interface to implement a custom SQL backend on host side instead of using a native backend.

Member Function Documentation

◆ connect()

virtual std::shared_ptr<DatabaseConnectionPool> ledger::core::api::DatabaseEngine::connect ( const std::string &  databaseName)
pure virtual

Open a connection to a database using the given database name. databaseName The name of the database to open

Returns
A connection pool to the given database

Implemented in MemoryDatabaseProxy.

◆ getPoolSize()

virtual int32_t ledger::core::api::DatabaseEngine::getPoolSize ( )
pure virtual

Get the maximum number of concurrent connection on a single database.

Returns
the maximum number of concurrent connection that the engine is able to open on a single database.

Implemented in MemoryDatabaseProxy.


The documentation for this class was generated from the following file: