/* * Copyright (c) 2021, Jan de Visser * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include namespace SQL { Row::Row() : Tuple() { } Row::Row(TupleDescriptor const& descriptor) : Tuple(descriptor) { } Row::Row(RefPtr table, u32 pointer) : Tuple(table->to_tuple_descriptor()) , m_table(table) { set_pointer(pointer); } Row::Row(RefPtr table, u32 pointer, Serializer& serializer) : Row(move(table), pointer) { Row::deserialize(serializer); } void Row::deserialize(Serializer& serializer) { Tuple::deserialize(serializer); m_next_pointer = serializer.deserialize(); } void Row::serialize(Serializer& serializer) const { Tuple::serialize(serializer); serializer.serialize(next_pointer()); } void Row::copy_from(Row const& other) { Tuple::copy_from(other); m_next_pointer = other.next_pointer(); } }