1#include "duckdb/parser/constraints/not_null_constraint.hpp"
2
3#include "duckdb/common/serializer.hpp"
4
5using namespace std;
6using namespace duckdb;
7
8string NotNullConstraint::ToString() const {
9 return "NOT NULL Constraint";
10}
11
12unique_ptr<Constraint> NotNullConstraint::Copy() {
13 return make_unique<NotNullConstraint>(index);
14}
15
16void NotNullConstraint::Serialize(Serializer &serializer) {
17 Constraint::Serialize(serializer);
18 serializer.Write<idx_t>(index);
19}
20
21unique_ptr<Constraint> NotNullConstraint::Deserialize(Deserializer &source) {
22 auto index = source.Read<idx_t>();
23 return make_unique_base<Constraint, NotNullConstraint>(index);
24}
25