Kùzu C++ API
Loading...
Searching...
No Matches
local_storage.h
Go to the documentation of this file.
1#pragma once
2
3#include <unordered_map>
4
5#include "copy_constructors.h"
6#include "local_table.h"
7
8namespace kuzu {
9namespace main {
10class ClientContext;
11} // namespace main
12namespace storage {
13
14class WAL;
15// Data structures in LocalStorage are not thread-safe.
16// For now, we only support single thread insertions and updates. Once we optimize them with
17// multiple threads, LocalStorage and its related data structures should be reworked to be
18// thread-safe.
20public:
22
23 explicit LocalStorage(main::ClientContext& clientContext) : clientContext{clientContext} {}
25
28
29 void commit();
30 void rollback();
31
32 uint64_t getEstimatedMemUsage() const;
33
34private:
35 main::ClientContext& clientContext;
36 std::unordered_map<common::table_id_t, std::unique_ptr<LocalTable>> tables;
37};
38
39} // namespace storage
40} // namespace kuzu
Contain client side configuration. We make profiler associated per query, so profiler is not maintain...
Definition client_context.h:51
Definition local_storage.h:19
NotExistAction
Definition local_storage.h:21
DELETE_COPY_AND_MOVE(LocalStorage)
uint64_t getEstimatedMemUsage() const
LocalStorage(main::ClientContext &clientContext)
Definition local_storage.h:23
LocalTable * getLocalTable(common::table_id_t tableID, NotExistAction action=NotExistAction::RETURN_NULL)
Definition local_table.h:25
uint64_t table_id_t
Definition internal_id_t.h:14
Definition alter_type.h:5