lintel 0.2.0
Loading...
Searching...
No Matches
PreparedStatement.h
Go to the documentation of this file.
1#ifndef LINTEL_PREPAREDSTATEMENT_H
2#define LINTEL_PREPAREDSTATEMENT_H
3
4#include <string_view>
5
11
12namespace lintel {
13namespace db {
18 {
19 private:
20 const Connection &m_connection;
21 std::unique_ptr<postgresql::PreparedStatement> m_preparedStatement = nullptr;
22 std::unique_ptr<sqlite::PreparedStatement> m_preparedStatementSQLite = nullptr;
23
24 public:
30 static constexpr int32_t initNParams(std::string_view tempStatement)
31 {
33 }
34
40 static std::string initStatement(const std::string &tempStatement);
41
48 explicit PreparedStatement(const Connection &connection,
49 const std::string &statement,
50 const std::string &statementName);
51
52 ~PreparedStatement() = default;
53
60
62 void close();
63 };
64}// namespace db
65
66}// namespace lintel
67#endif// LINTEL_PREPAREDSTATEMENT_H
Definition Connection.h:25
Definition ParameterBuilder.h:16
Definition PreparedStatement.h:18
static std::string initStatement(const std::string &tempStatement)
static constexpr int32_t initNParams(std::string_view tempStatement)
Definition PreparedStatement.h:30
PreparedStatement(const Connection &connection, const std::string &statement, const std::string &statementName)
Result execute(const ParameterBuilder &builder)
Definition Result.h:19
static constexpr int32_t initNParams(std::string_view tempStatement)
Definition PreparedStatement.h:33
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9