diff options
author | Jan de Visser <jan@de-visser.net> | 2021-08-18 20:50:13 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-21 22:03:30 +0200 |
commit | 85a84b07943fefcc374981f82acfe6994920705c (patch) | |
tree | 605e5b72134e1f95842dbc5dfd797ea5a1da5b1a /Userland/Libraries/LibSQL/Database.h | |
parent | 9e43508d305ce085e1670164847f660e4d378f27 (diff) | |
download | serenity-85a84b07943fefcc374981f82acfe6994920705c.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibSQL/Database.h')
-rw-r--r-- | Userland/Libraries/LibSQL/Database.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibSQL/Database.h b/Userland/Libraries/LibSQL/Database.h index 5603dcc2e1..b3bfc0d3af 100644 --- a/Userland/Libraries/LibSQL/Database.h +++ b/Userland/Libraries/LibSQL/Database.h @@ -11,6 +11,7 @@ #include <LibCore/Object.h> #include <LibSQL/Forward.h> #include <LibSQL/Heap.h> +#include <LibSQL/Meta.h> namespace SQL { @@ -42,7 +43,8 @@ public: bool update(Row&); private: - RefPtr<Heap> m_heap; + NonnullRefPtr<Heap> m_heap; + Serializer m_serializer; RefPtr<BTree> m_schemas; RefPtr<BTree> m_tables; RefPtr<BTree> m_table_columns; |