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

Removes all data from DB without affecting the schema. More...

#include <CleanEventStore.h>

Inheritance diagram for SQLamarr::CleanEventStore:

Classes

class  CleanEventStore
 Delete all rows from all tables without affecting the schema. More...
 

Public Member Functions

void execute () override
 Execute the algorithm, cleaning the database. More...
 
 BaseSqlInterface (SQLite3DB &db)
 Constructor, acquiring the database without ownership. More...
 
- Public Member Functions inherited from SQLamarr::BaseSqlInterface
 BaseSqlInterface (SQLite3DB &db)
 Constructor, acquiring the database without ownership. More...
 
virtual ~BaseSqlInterface ()
 
void sync_database (const std::string &db_uri)
 
void invalidate_cache (void)
 Invalidate the cache of the queries. More...
 

Public Attributes

 argtypes
 
 restype
 

Additional Inherited Members

- Protected Member Functions inherited from SQLamarr::BaseSqlInterface
sqlite3_stmt * get_statement (const std::string &name, const std::string &query)
 Creates or retrieve from cache a statement. More...
 
void begin_transaction ()
 Begin an SQL transaction stopping update to disk util end_transaction() is issued
More...
 
void end_transaction ()
 End an SQL transaction re-enabling disk updates. More...
 
int last_insert_row ()
 Return the index of the last rows inserted in any table. More...
 
void using_sql_function (const std::string &name, int argc, void(*xFunc)(sqlite3_context *, int, sqlite3_value **))
 Register a static function in DB, enabling usage from SQL. More...
 
bool exec_stmt (sqlite3_stmt *)
 Execute a statement, possibly throwing an exception on failure. More...
 
- Protected Attributes inherited from SQLamarr::BaseSqlInterface
SQLite3DBm_database
 Reference to the SQLite database (not owned). More...
 

Detailed Description

Removes all data from DB without affecting the schema.

When executed, CleanEventStore gets a list of tables, including temporary instances, from SQLite3 schema, then loops over the existing tables and deletes all the rows. This won't change the DB schema, nor change the DB connection data, but clean the database to process another batch

Definition at line 26 of file CleanEventStore.h.

Member Function Documentation

◆ BaseSqlInterface()

SQLamarr::BaseSqlInterface::BaseSqlInterface

Constructor, acquiring the database without ownership.

Definition at line 38 of file BaseSqlInterface.cpp.

◆ execute()

void SQLamarr::CleanEventStore::execute ( void  )
overridevirtual

Execute the algorithm, cleaning the database.

Implements SQLamarr::Transformer.

Definition at line 28 of file CleanEventStore.cpp.

Member Data Documentation

◆ argtypes

SQLamarr.CleanEventStore.argtypes

Definition at line 15 of file CleanEventStore.py.

◆ restype

SQLamarr.CleanEventStore.restype

Definition at line 16 of file CleanEventStore.py.


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