mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-01 06:59:42 -06:00
Added optionals
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef SQLGEN_CONNECTION_HPP_
|
||||
#define SQLGEN_CONNECTION_HPP_
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -27,7 +28,7 @@ struct Connection {
|
||||
/// _stmt.columns.
|
||||
virtual Result<Nothing> write(
|
||||
const dynamic::Insert& _stmt,
|
||||
const std::vector<std::vector<std::string>>& _data) = 0;
|
||||
const std::vector<std::vector<std::optional<std::string>>>& _data) = 0;
|
||||
};
|
||||
|
||||
} // namespace sqlgen
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef SQLGEN_ITERATOR_HPP_
|
||||
#define SQLGEN_ITERATOR_HPP_
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -16,7 +17,7 @@ struct Iterator {
|
||||
/// Returns the next batch of rows.
|
||||
/// If _batch_size is greater than the number of rows left, returns all
|
||||
/// of the rows left.
|
||||
virtual Result<std::vector<std::vector<std::string>>> next(
|
||||
virtual Result<std::vector<std::vector<std::optional<std::string>>>> next(
|
||||
const size_t _batch_size) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user