~singpolyma/biboumi

ref: ba61d2034058818fe76cef6b23f311259d37b3fe biboumi/src/database/statement.hpp -rw-r--r-- 634 bytes
ba61d203 — louiz’ Empty the <command/> nodes before reusing them in our responses 4 years ago
                                                                                
9defd0cc louiz’
0168b96b louiz’
9defd0cc louiz’
14dcc57a Jonas Wielicki
0168b96b louiz’
9defd0cc louiz’
0168b96b louiz’
9defd0cc louiz’
0168b96b louiz’
9defd0cc louiz’
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include <cstdint>
#include <string>
#include <vector>

enum class StepResult
{
  Row,
  Done,
  Error,
};

class Statement
{
 public:
  virtual ~Statement() = default;
  virtual StepResult step() = 0;

  virtual void bind(std::vector<std::string> params) = 0;

  virtual std::int64_t get_column_int64(const int col) = 0;
  virtual std::string get_column_text(const int col) = 0;
  virtual int get_column_int(const int col) = 0;

  virtual bool bind_text(const int pos, const std::string& data) = 0;
  virtual bool bind_int64(const int pos, const std::int64_t value) = 0;
  virtual bool bind_null(const int pos) = 0;
};