Kùzu C++ API
Loading...
Searching...
No Matches
db_config.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "value.h"
6
7namespace kuzu {
8namespace common {
9class Value;
10enum class LogicalTypeID : uint8_t;
11} // namespace common
12
13namespace main {
14
15class ClientContext;
16struct SystemConfig;
17
18typedef void (*set_context)(ClientContext* context, const common::Value& parameter);
19typedef common::Value (*get_setting)(const ClientContext* context);
20
21enum class OptionType : uint8_t { CONFIGURATION = 0, EXTENSION = 1 };
22
33
43
52
53struct DBConfig {
55 uint64_t maxNumThreads;
58 uint64_t maxDBSize;
63
64 explicit DBConfig(const SystemConfig& systemConfig);
65
66 static ConfigurationOption* getOptionByName(const std::string& optionName);
67 KUZU_API static bool isDBPathInMemory(const std::string& dbPath);
68};
69
70} // namespace main
71} // namespace kuzu
#define KUZU_API
Definition api.h:25
Definition value.h:27
Contain client side configuration. We make profiler associated per query, so profiler is not maintain...
Definition client_context.h:51
LogicalTypeID
Definition types.h:126
OptionType
Definition db_config.h:21
common::Value(* get_setting)(const ClientContext *context)
Definition db_config.h:19
void(* set_context)(ClientContext *context, const common::Value &parameter)
Definition db_config.h:18
Definition alter_type.h:5
Definition db_config.h:34
set_context setContext
Definition db_config.h:35
get_setting getSetting
Definition db_config.h:36
ConfigurationOption(std::string name, common::LogicalTypeID parameterType, set_context setContext, get_setting getSetting)
Definition db_config.h:38
Definition db_config.h:53
bool forceCheckpointOnClose
Definition db_config.h:62
bool readOnly
Definition db_config.h:57
DBConfig(const SystemConfig &systemConfig)
uint64_t bufferPoolSize
Definition db_config.h:54
uint64_t checkpointThreshold
Definition db_config.h:61
uint64_t maxDBSize
Definition db_config.h:58
static ConfigurationOption * getOptionByName(const std::string &optionName)
bool autoCheckpoint
Definition db_config.h:60
uint64_t maxNumThreads
Definition db_config.h:55
static KUZU_API bool isDBPathInMemory(const std::string &dbPath)
bool enableMultiWrites
Definition db_config.h:59
bool enableCompression
Definition db_config.h:56
Definition db_config.h:44
ExtensionOption(std::string name, common::LogicalTypeID parameterType, common::Value defaultValue)
Definition db_config.h:47
common::Value defaultValue
Definition db_config.h:45
Definition db_config.h:23
std::string name
Definition db_config.h:24
OptionType optionType
Definition db_config.h:26
common::LogicalTypeID parameterType
Definition db_config.h:25
virtual ~Option()=default
Option(std::string name, common::LogicalTypeID parameterType, OptionType optionType)
Definition db_config.h:28
Stores runtime configuration for creating or opening a Database.
Definition database.h:43