SQLamarr
The stand-alone ultra-fast simulation option for the LHCb experiment
SQLamarr::UpdateDBConnection Class Reference

Reset the database connection forcing flushing the db status. More...

#include <UpdateDBConnection.h>

Inheritance diagram for SQLamarr::UpdateDBConnection:

Classes

class  UpdateDBConnection
 Update the reference to the DB Connection, to ensure synchronization with disk. More...
 

Public Member Functions

 UpdateDBConnection (SQLite3DB &db, std::string filename, int flags=SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_URI)
 Constructor. More...
 
void execute () override
 Execute the algorithm, cleaning the database. More...
 

Public Attributes

 argtypes
 
 restype
 

Detailed Description

Reset the database connection forcing flushing the db status.

In the interaction with Python or other frameworks it is sometimes necessary to ensure db synchronization with disk or shared memory. This can be achieved refreshing the connection to the database, by closing it and reopening.

WARNING! Executing UpdateDBConnection drops TEMPORARY tables and views.

Definition at line 30 of file UpdateDBConnection.h.

Constructor & Destructor Documentation

◆ UpdateDBConnection()

SQLamarr::UpdateDBConnection::UpdateDBConnection ( SQLite3DB db,
std::string  filename,
int  flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_URI 
)

Constructor.

Parameters
dbReference to the database
filenameFilename or URI of the (possibly new) connection to the database
flagsFlags

Definition at line 28 of file UpdateDBConnection.cpp.

Member Function Documentation

◆ execute()

void SQLamarr::UpdateDBConnection::execute ( void  )
overridevirtual

Execute the algorithm, cleaning the database.

Implements SQLamarr::Transformer.

Definition at line 41 of file UpdateDBConnection.cpp.

Member Data Documentation

◆ argtypes

SQLamarr.UpdateDBConnection.argtypes

Definition at line 15 of file UpdateDBConnection.py.

◆ restype

SQLamarr.UpdateDBConnection.restype

Definition at line 16 of file UpdateDBConnection.py.


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