Leosac  0.8.0
Open Source Access Control
Leosac::db::PGSQLTracer Class Reference

An implementation of odb::tracer that use the logging infrastructure of Leosac. More...

#include <PGSQLTracer.hpp>

+ Inheritance diagram for Leosac::db::PGSQLTracer:
+ Collaboration diagram for Leosac::db::PGSQLTracer:

Public Member Functions

 PGSQLTracer (bool count_only)
 
virtual void execute (odb::connection &connection, const char *statement)
 
virtual size_t count () const override
 Return the number of statement that have been traced. More...
 
- Public Member Functions inherited from Leosac::db::DatabaseTracer
 DatabaseTracer ()=default
 

Private Attributes

size_t count_
 
bool count_only_
 

Detailed Description

An implementation of odb::tracer that use the logging infrastructure of Leosac.

Definition at line 35 of file PGSQLTracer.hpp.

Constructor & Destructor Documentation

◆ PGSQLTracer()

PGSQLTracer::PGSQLTracer ( bool  count_only)
Parameters
count_onlyDo not log request, only count them.

Definition at line 26 of file PGSQLTracer.cpp.

Member Function Documentation

◆ count()

size_t PGSQLTracer::count ( ) const
overridevirtual

Return the number of statement that have been traced.

Implements Leosac::db::DatabaseTracer.

Definition at line 38 of file PGSQLTracer.cpp.

◆ execute()

void PGSQLTracer::execute ( odb::connection &  connection,
const char *  statement 
)
virtual

Definition at line 31 of file PGSQLTracer.cpp.

Member Data Documentation

◆ count_

size_t Leosac::db::PGSQLTracer::count_
private

Definition at line 47 of file PGSQLTracer.hpp.

◆ count_only_

bool Leosac::db::PGSQLTracer::count_only_
private

Definition at line 48 of file PGSQLTracer.hpp.


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