mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
6d3f68cc11
Also return a direct reference to the table from its getter.
31 lines
606 B
C++
31 lines
606 B
C++
/*
|
|
* Copyright (c) 2021, Jan de Visser <jan@de-visser.net>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibSQL/Meta.h>
|
|
#include <LibSQL/Row.h>
|
|
|
|
namespace SQL {
|
|
|
|
Row::Row(NonnullRefPtr<TableDef> table, u32 pointer)
|
|
: Tuple(table->to_tuple_descriptor())
|
|
, m_table(move(table))
|
|
{
|
|
set_pointer(pointer);
|
|
}
|
|
|
|
void Row::deserialize(Serializer& serializer)
|
|
{
|
|
Tuple::deserialize(serializer);
|
|
m_next_pointer = serializer.deserialize<u32>();
|
|
}
|
|
|
|
void Row::serialize(Serializer& serializer) const
|
|
{
|
|
Tuple::serialize(serializer);
|
|
serializer.serialize<u32>(next_pointer());
|
|
}
|
|
|
|
}
|