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