Added optionals

This commit is contained in:
Dr. Patrick Urbanke
2025-03-22 03:56:09 +01:00
parent 4b88ed886d
commit 2ab4aa1099
2 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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;
};