determine NOT NULL constraint from std::optional
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "matador/utils/cascade_type.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
namespace matador::utils {
|
||||
|
||||
@@ -44,6 +45,11 @@ void attribute(Operator &op, const char *id, Type &value, const field_attributes
|
||||
op.on_attribute(id, value, attr);
|
||||
}
|
||||
|
||||
template<class Operator, class Type>
|
||||
void attribute(Operator &op, const char *id, std::optional<Type> &value, const field_attributes &attr) {
|
||||
op.on_attribute(id, value, attr);
|
||||
}
|
||||
|
||||
template<class Operator, class Type>
|
||||
void attribute(Operator &op, const char *id, Type &value) {
|
||||
op.on_attribute(id, value);
|
||||
|
||||
Reference in New Issue
Block a user