mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibSQL: Introduce Serializer as a mediator between Heap and client code
Classes reading and writing to the data heap would communicate directly with the Heap object, and transfer ByteBuffers back and forth with it. This makes things like caching and locking hard. Therefore all data persistence activity will be funneled through a Serializer object which in turn submits it to the Heap. Introducing this unfortunately resulted in a huge amount of churn, in which a number of smaller refactorings got caught up as well.
This commit is contained in:
committed by
Andreas Kling
parent
9e43508d30
commit
85a84b0794
@@ -9,11 +9,6 @@
|
||||
|
||||
namespace SQL {
|
||||
|
||||
Key::Key()
|
||||
: Tuple()
|
||||
{
|
||||
}
|
||||
|
||||
Key::Key(NonnullRefPtr<TupleDescriptor> const& descriptor)
|
||||
: Tuple(descriptor)
|
||||
{
|
||||
@@ -25,15 +20,15 @@ Key::Key(NonnullRefPtr<IndexDef> index)
|
||||
{
|
||||
}
|
||||
|
||||
Key::Key(NonnullRefPtr<TupleDescriptor> const& descriptor, ByteBuffer& buffer, size_t& offset)
|
||||
: Tuple(descriptor, buffer, offset)
|
||||
Key::Key(NonnullRefPtr<TupleDescriptor> const& descriptor, Serializer& serializer)
|
||||
: Tuple(descriptor, serializer)
|
||||
{
|
||||
}
|
||||
|
||||
Key::Key(RefPtr<IndexDef> index, ByteBuffer& buffer, size_t& offset)
|
||||
Key::Key(RefPtr<IndexDef> index, Serializer& serializer)
|
||||
: Key(index->to_tuple_descriptor())
|
||||
{
|
||||
deserialize(buffer, offset);
|
||||
Tuple::deserialize(serializer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user