mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
85a84b0794
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.
29 lines
625 B
C++
29 lines
625 B
C++
/*
|
|
* Copyright (c) 2021, Jan de Visser <jan@de-visser.net>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibSQL/Heap.h>
|
|
#include <LibSQL/Index.h>
|
|
#include <LibSQL/Meta.h>
|
|
|
|
namespace SQL {
|
|
|
|
Index::Index(Serializer& serializer, NonnullRefPtr<TupleDescriptor> const& descriptor, bool unique, u32 pointer)
|
|
: m_serializer(serializer)
|
|
, m_descriptor(descriptor)
|
|
, m_unique(unique)
|
|
, m_pointer(pointer)
|
|
{
|
|
}
|
|
|
|
Index::Index(Serializer& serializer, NonnullRefPtr<TupleDescriptor> const& descriptor, u32 pointer)
|
|
: m_serializer(serializer)
|
|
, m_descriptor(descriptor)
|
|
, m_pointer(pointer)
|
|
{
|
|
}
|
|
|
|
}
|