Lbug C++ API
Loading...
Searching...
No Matches
query_summary.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5#include "api.h"
6
7namespace lbug {
8namespace common {
9enum class StatementType : uint8_t;
10}
11
12namespace main {
13
17struct PreparedSummary { // NOLINT(*-pro-type-member-init)
18 double compilingTime = 0;
19 common::StatementType statementType;
20};
21
26
27public:
28 QuerySummary() = default;
29 explicit QuerySummary(const PreparedSummary& preparedSummary)
30 : preparedSummary{preparedSummary} {}
31
34 LBUG_API double getCompilingTime() const;
38 LBUG_API double getExecutionTime() const;
39
40 void setExecutionTime(double time);
41
42 void incrementCompilingTime(double increment);
43
44 void incrementExecutionTime(double increment);
45
49 bool isExplain() const;
50
54 common::StatementType getStatementType() const;
55
56private:
57 double executionTime = 0;
58 PreparedSummary preparedSummary;
59};
60
61} // namespace main
62} // namespace lbug
#define LBUG_API
Definition api.h:25
void setExecutionTime(double time)
LBUG_API double getCompilingTime() const
void incrementExecutionTime(double increment)
LBUG_API double getExecutionTime() const
common::StatementType getStatementType() const
QuerySummary(const PreparedSummary &preparedSummary)
Definition query_summary.h:29
void incrementCompilingTime(double increment)
Definition array_utils.h:7
Definition bind_input.h:16
Definition array_utils.h:7
PreparedSummary stores the compiling time and query options of a query.
Definition query_summary.h:17
common::StatementType statementType
Definition query_summary.h:19
double compilingTime
Definition query_summary.h:18