mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibSQL: Make TupleDescriptor a shared pointer instead of a stack object
Tuple descriptors are basically the same for for example all rows in a table. Makes sense to share them instead of copying them for every single row.
This commit is contained in:
committed by
Andreas Kling
parent
9e225d2d05
commit
a5e28f2897
Notes:
sideshowbarker
2024-07-18 05:26:25 +09:00
Author: https://github.com/JanDeVisser Commit: https://github.com/SerenityOS/serenity/commit/a5e28f2897c Pull-request: https://github.com/SerenityOS/serenity/pull/8906 Reviewed-by: https://github.com/trflynn89 ✅
@@ -9,18 +9,23 @@
|
||||
|
||||
namespace SQL {
|
||||
|
||||
Key::Key(TupleDescriptor const& descriptor)
|
||||
Key::Key()
|
||||
: Tuple()
|
||||
{
|
||||
}
|
||||
|
||||
Key::Key(NonnullRefPtr<TupleDescriptor> const& descriptor)
|
||||
: Tuple(descriptor)
|
||||
{
|
||||
}
|
||||
|
||||
Key::Key(RefPtr<IndexDef> index)
|
||||
Key::Key(NonnullRefPtr<IndexDef> index)
|
||||
: Tuple(index->to_tuple_descriptor())
|
||||
, m_index(index)
|
||||
{
|
||||
}
|
||||
|
||||
Key::Key(TupleDescriptor const& descriptor, ByteBuffer& buffer, size_t& offset)
|
||||
Key::Key(NonnullRefPtr<TupleDescriptor> const& descriptor, ByteBuffer& buffer, size_t& offset)
|
||||
: Tuple(descriptor, buffer, offset)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user