mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 11:04:59 +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:
parent
9e43508d30
commit
85a84b0794
30 changed files with 995 additions and 780 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue