1 | //===----------------------------------------------------------------------===// |
2 | // DuckDB |
3 | // |
4 | // duckdb/main/settings.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/common/common.hpp" |
12 | #include "duckdb/common/types/value.hpp" |
13 | |
14 | namespace duckdb { |
15 | class ClientContext; |
16 | class DatabaseInstance; |
17 | struct DBConfig; |
18 | |
19 | struct AccessModeSetting { |
20 | static constexpr const char *Name = "access_mode" ; |
21 | static constexpr const char *Description = "Access mode of the database (AUTOMATIC, READ_ONLY or READ_WRITE)" ; |
22 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
23 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
24 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
25 | static Value GetSetting(ClientContext &context); |
26 | }; |
27 | |
28 | struct CheckpointThresholdSetting { |
29 | static constexpr const char *Name = "checkpoint_threshold" ; |
30 | static constexpr const char *Description = |
31 | "The WAL size threshold at which to automatically trigger a checkpoint (e.g. 1GB)" ; |
32 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
33 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
34 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
35 | static Value GetSetting(ClientContext &context); |
36 | }; |
37 | |
38 | struct DebugCheckpointAbort { |
39 | static constexpr const char *Name = "debug_checkpoint_abort" ; |
40 | static constexpr const char *Description = |
41 | "DEBUG SETTING: trigger an abort while checkpointing for testing purposes" ; |
42 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
43 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
44 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
45 | static Value GetSetting(ClientContext &context); |
46 | }; |
47 | |
48 | struct DebugForceExternal { |
49 | static constexpr const char *Name = "debug_force_external" ; |
50 | static constexpr const char *Description = |
51 | "DEBUG SETTING: force out-of-core computation for operators that support it, used for testing" ; |
52 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
53 | static void SetLocal(ClientContext &context, const Value ¶meter); |
54 | static void ResetLocal(ClientContext &context); |
55 | static Value GetSetting(ClientContext &context); |
56 | }; |
57 | |
58 | struct DebugForceNoCrossProduct { |
59 | static constexpr const char *Name = "debug_force_no_cross_product" ; |
60 | static constexpr const char *Description = |
61 | "DEBUG SETTING: Force disable cross product generation when hyper graph isn't connected, used for testing" ; |
62 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
63 | static void SetLocal(ClientContext &context, const Value ¶meter); |
64 | static void ResetLocal(ClientContext &context); |
65 | static Value GetSetting(ClientContext &context); |
66 | }; |
67 | |
68 | struct OrderedAggregateThreshold { |
69 | static constexpr const char *Name = "ordered_aggregate_threshold" ; // NOLINT |
70 | static constexpr const char *Description = // NOLINT |
71 | "the number of rows to accumulate before sorting, used for tuning" ; |
72 | static constexpr const LogicalTypeId InputType = LogicalTypeId::UBIGINT; // NOLINT |
73 | static void SetLocal(ClientContext &context, const Value ¶meter); |
74 | static void ResetLocal(ClientContext &context); |
75 | static Value GetSetting(ClientContext &context); |
76 | }; |
77 | |
78 | struct DebugAsOfIEJoin { |
79 | static constexpr const char *Name = "debug_asof_iejoin" ; // NOLINT |
80 | static constexpr const char *Description = "DEBUG SETTING: force use of IEJoin to implement AsOf joins" ; // NOLINT |
81 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; // NOLINT |
82 | static void SetLocal(ClientContext &context, const Value ¶meter); |
83 | static void ResetLocal(ClientContext &context); |
84 | static Value GetSetting(ClientContext &context); |
85 | }; |
86 | |
87 | struct DebugWindowMode { |
88 | static constexpr const char *Name = "debug_window_mode" ; |
89 | static constexpr const char *Description = "DEBUG SETTING: switch window mode to use" ; |
90 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
91 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
92 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
93 | static Value GetSetting(ClientContext &context); |
94 | }; |
95 | |
96 | struct DefaultCollationSetting { |
97 | static constexpr const char *Name = "default_collation" ; |
98 | static constexpr const char *Description = "The collation setting used when none is specified" ; |
99 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
100 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
101 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
102 | static void SetLocal(ClientContext &context, const Value ¶meter); |
103 | static void ResetLocal(ClientContext &context); |
104 | static Value GetSetting(ClientContext &context); |
105 | }; |
106 | |
107 | struct DefaultOrderSetting { |
108 | static constexpr const char *Name = "default_order" ; |
109 | static constexpr const char *Description = "The order type used when none is specified (ASC or DESC)" ; |
110 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
111 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
112 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
113 | static Value GetSetting(ClientContext &context); |
114 | }; |
115 | |
116 | struct DefaultNullOrderSetting { |
117 | static constexpr const char *Name = "default_null_order" ; |
118 | static constexpr const char *Description = "Null ordering used when none is specified (NULLS_FIRST or NULLS_LAST)" ; |
119 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
120 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
121 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
122 | static Value GetSetting(ClientContext &context); |
123 | }; |
124 | |
125 | struct { |
126 | static constexpr const char * = "disabled_optimizers" ; |
127 | static constexpr const char * = "DEBUG SETTING: disable a specific set of optimizers (comma separated)" ; |
128 | static constexpr const LogicalTypeId = LogicalTypeId::VARCHAR; |
129 | static void (DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
130 | static void (DatabaseInstance *db, DBConfig &config); |
131 | static Value (ClientContext &context); |
132 | }; |
133 | |
134 | struct EnableExternalAccessSetting { |
135 | static constexpr const char *Name = "enable_external_access" ; |
136 | static constexpr const char *Description = |
137 | "Allow the database to access external state (through e.g. loading/installing modules, COPY TO/FROM, CSV " |
138 | "readers, pandas replacement scans, etc)" ; |
139 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
140 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
141 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
142 | static Value GetSetting(ClientContext &context); |
143 | }; |
144 | |
145 | struct EnableFSSTVectors { |
146 | static constexpr const char *Name = "enable_fsst_vectors" ; |
147 | static constexpr const char *Description = |
148 | "Allow scans on FSST compressed segments to emit compressed vectors to utilize late decompression" ; |
149 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
150 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
151 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
152 | static Value GetSetting(ClientContext &context); |
153 | }; |
154 | |
155 | struct AllowUnsignedExtensionsSetting { |
156 | static constexpr const char *Name = "allow_unsigned_extensions" ; |
157 | static constexpr const char *Description = "Allow to load extensions with invalid or missing signatures" ; |
158 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
159 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
160 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
161 | static Value GetSetting(ClientContext &context); |
162 | }; |
163 | |
164 | struct CustomExtensionRepository { |
165 | static constexpr const char *Name = "custom_extension_repository" ; |
166 | static constexpr const char *Description = "Overrides the custom endpoint for remote extension installation" ; |
167 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
168 | static void SetLocal(ClientContext &context, const Value ¶meter); |
169 | static void ResetLocal(ClientContext &context); |
170 | static Value GetSetting(ClientContext &context); |
171 | }; |
172 | |
173 | struct EnableObjectCacheSetting { |
174 | static constexpr const char *Name = "enable_object_cache" ; |
175 | static constexpr const char *Description = "Whether or not object cache is used to cache e.g. Parquet metadata" ; |
176 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
177 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
178 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
179 | static Value GetSetting(ClientContext &context); |
180 | }; |
181 | |
182 | struct EnableHTTPMetadataCacheSetting { |
183 | static constexpr const char *Name = "enable_http_metadata_cache" ; |
184 | static constexpr const char *Description = "Whether or not the global http metadata is used to cache HTTP metadata" ; |
185 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
186 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
187 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
188 | static Value GetSetting(ClientContext &context); |
189 | }; |
190 | |
191 | struct EnableProfilingSetting { |
192 | static constexpr const char *Name = "enable_profiling" ; |
193 | static constexpr const char *Description = |
194 | "Enables profiling, and sets the output format (JSON, QUERY_TREE, QUERY_TREE_OPTIMIZER)" ; |
195 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
196 | static void SetLocal(ClientContext &context, const Value ¶meter); |
197 | static void ResetLocal(ClientContext &context); |
198 | static Value GetSetting(ClientContext &context); |
199 | }; |
200 | |
201 | struct EnableProgressBarSetting { |
202 | static constexpr const char *Name = "enable_progress_bar" ; |
203 | static constexpr const char *Description = |
204 | "Enables the progress bar, printing progress to the terminal for long queries" ; |
205 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
206 | static void SetLocal(ClientContext &context, const Value ¶meter); |
207 | static void ResetLocal(ClientContext &context); |
208 | static Value GetSetting(ClientContext &context); |
209 | }; |
210 | struct EnableProgressBarPrintSetting { |
211 | static constexpr const char *Name = "enable_progress_bar_print" ; |
212 | static constexpr const char *Description = |
213 | "Controls the printing of the progress bar, when 'enable_progress_bar' is true" ; |
214 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
215 | static void SetLocal(ClientContext &context, const Value ¶meter); |
216 | static void ResetLocal(ClientContext &context); |
217 | static Value GetSetting(ClientContext &context); |
218 | }; |
219 | |
220 | struct ExperimentalParallelCSVSetting { |
221 | static constexpr const char *Name = "experimental_parallel_csv" ; |
222 | static constexpr const char *Description = "Whether or not to use the experimental parallel CSV reader" ; |
223 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
224 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
225 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
226 | static Value GetSetting(ClientContext &context); |
227 | }; |
228 | |
229 | struct ExplainOutputSetting { |
230 | static constexpr const char *Name = "explain_output" ; |
231 | static constexpr const char *Description = "Output of EXPLAIN statements (ALL, OPTIMIZED_ONLY, PHYSICAL_ONLY)" ; |
232 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
233 | static void SetLocal(ClientContext &context, const Value ¶meter); |
234 | static void ResetLocal(ClientContext &context); |
235 | static Value GetSetting(ClientContext &context); |
236 | }; |
237 | |
238 | struct ExtensionDirectorySetting { |
239 | static constexpr const char *Name = "extension_directory" ; |
240 | static constexpr const char *Description = "Set the directory to store extensions in" ; |
241 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
242 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
243 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
244 | static Value GetSetting(ClientContext &context); |
245 | }; |
246 | |
247 | struct ExternalThreadsSetting { |
248 | static constexpr const char *Name = "external_threads" ; |
249 | static constexpr const char *Description = "The number of external threads that work on DuckDB tasks." ; |
250 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BIGINT; |
251 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
252 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
253 | static Value GetSetting(ClientContext &context); |
254 | }; |
255 | |
256 | struct FileSearchPathSetting { |
257 | static constexpr const char *Name = "file_search_path" ; |
258 | static constexpr const char *Description = "A comma separated list of directories to search for input files" ; |
259 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
260 | static void SetLocal(ClientContext &context, const Value ¶meter); |
261 | static void ResetLocal(ClientContext &context); |
262 | static Value GetSetting(ClientContext &context); |
263 | }; |
264 | |
265 | struct ForceCompressionSetting { |
266 | static constexpr const char *Name = "force_compression" ; |
267 | static constexpr const char *Description = "DEBUG SETTING: forces a specific compression method to be used" ; |
268 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
269 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
270 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
271 | static Value GetSetting(ClientContext &context); |
272 | }; |
273 | |
274 | struct ForceBitpackingModeSetting { |
275 | static constexpr const char *Name = "force_bitpacking_mode" ; |
276 | static constexpr const char *Description = "DEBUG SETTING: forces a specific bitpacking mode" ; |
277 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
278 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
279 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
280 | static Value GetSetting(ClientContext &context); |
281 | }; |
282 | |
283 | struct HomeDirectorySetting { |
284 | static constexpr const char *Name = "home_directory" ; |
285 | static constexpr const char *Description = "Sets the home directory used by the system" ; |
286 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
287 | static void SetLocal(ClientContext &context, const Value ¶meter); |
288 | static void ResetLocal(ClientContext &context); |
289 | static Value GetSetting(ClientContext &context); |
290 | }; |
291 | |
292 | struct IntegerDivisionSetting { |
293 | static constexpr const char *Name = "integer_division" ; |
294 | static constexpr const char *Description = |
295 | "Whether or not the / operator defaults to integer division, or to floating point division" ; |
296 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
297 | static void SetLocal(ClientContext &context, const Value ¶meter); |
298 | static void ResetLocal(ClientContext &context); |
299 | static Value GetSetting(ClientContext &context); |
300 | }; |
301 | |
302 | struct LogQueryPathSetting { |
303 | static constexpr const char *Name = "log_query_path" ; |
304 | static constexpr const char *Description = |
305 | "Specifies the path to which queries should be logged (default: empty string, queries are not logged)" ; |
306 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
307 | static void SetLocal(ClientContext &context, const Value ¶meter); |
308 | static void ResetLocal(ClientContext &context); |
309 | static Value GetSetting(ClientContext &context); |
310 | }; |
311 | |
312 | struct LockConfigurationSetting { |
313 | static constexpr const char *Name = "lock_configuration" ; |
314 | static constexpr const char *Description = "Whether or not the configuration can be altered" ; |
315 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
316 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
317 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
318 | static Value GetSetting(ClientContext &context); |
319 | }; |
320 | |
321 | struct ImmediateTransactionModeSetting { |
322 | static constexpr const char *Name = "immediate_transaction_mode" ; |
323 | static constexpr const char *Description = |
324 | "Whether transactions should be started lazily when needed, or immediately when BEGIN TRANSACTION is called" ; |
325 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
326 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
327 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
328 | static Value GetSetting(ClientContext &context); |
329 | }; |
330 | |
331 | struct MaximumExpressionDepthSetting { |
332 | static constexpr const char *Name = "max_expression_depth" ; |
333 | static constexpr const char *Description = |
334 | "The maximum expression depth limit in the parser. WARNING: increasing this setting and using very deep " |
335 | "expressions might lead to stack overflow errors." ; |
336 | static constexpr const LogicalTypeId InputType = LogicalTypeId::UBIGINT; |
337 | static void SetLocal(ClientContext &context, const Value ¶meter); |
338 | static void ResetLocal(ClientContext &context); |
339 | static Value GetSetting(ClientContext &context); |
340 | }; |
341 | |
342 | struct MaximumMemorySetting { |
343 | static constexpr const char *Name = "max_memory" ; |
344 | static constexpr const char *Description = "The maximum memory of the system (e.g. 1GB)" ; |
345 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
346 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
347 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
348 | static Value GetSetting(ClientContext &context); |
349 | }; |
350 | |
351 | struct PasswordSetting { |
352 | static constexpr const char *Name = "password" ; |
353 | static constexpr const char *Description = "The password to use. Ignored for legacy compatibility." ; |
354 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
355 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
356 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
357 | static Value GetSetting(ClientContext &context); |
358 | }; |
359 | |
360 | struct PerfectHashThresholdSetting { |
361 | static constexpr const char *Name = "perfect_ht_threshold" ; |
362 | static constexpr const char *Description = "Threshold in bytes for when to use a perfect hash table (default: 12)" ; |
363 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BIGINT; |
364 | static void SetLocal(ClientContext &context, const Value ¶meter); |
365 | static void ResetLocal(ClientContext &context); |
366 | static Value GetSetting(ClientContext &context); |
367 | }; |
368 | |
369 | struct PivotLimitSetting { |
370 | static constexpr const char *Name = "pivot_limit" ; |
371 | static constexpr const char *Description = |
372 | "The maximum numer of pivot columns in a pivot statement (default: 100000)" ; |
373 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BIGINT; |
374 | static void SetLocal(ClientContext &context, const Value ¶meter); |
375 | static void ResetLocal(ClientContext &context); |
376 | static Value GetSetting(ClientContext &context); |
377 | }; |
378 | |
379 | struct PreserveIdentifierCase { |
380 | static constexpr const char *Name = "preserve_identifier_case" ; |
381 | static constexpr const char *Description = |
382 | "Whether or not to preserve the identifier case, instead of always lowercasing all non-quoted identifiers" ; |
383 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
384 | static void SetLocal(ClientContext &context, const Value ¶meter); |
385 | static void ResetLocal(ClientContext &context); |
386 | static Value GetSetting(ClientContext &context); |
387 | }; |
388 | |
389 | struct PreserveInsertionOrder { |
390 | static constexpr const char *Name = "preserve_insertion_order" ; |
391 | static constexpr const char *Description = |
392 | "Whether or not to preserve insertion order. If set to false the system is allowed to re-order any results " |
393 | "that do not contain ORDER BY clauses." ; |
394 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
395 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
396 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
397 | static Value GetSetting(ClientContext &context); |
398 | }; |
399 | |
400 | struct ExportLargeBufferArrow { |
401 | static constexpr const char *Name = "arrow_large_buffer_size" ; |
402 | static constexpr const char *Description = |
403 | "If arrow buffers for strings, blobs, uuids and bits should be exported using large buffers" ; |
404 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN; |
405 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
406 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
407 | static Value GetSetting(ClientContext &context); |
408 | }; |
409 | |
410 | struct ProfilerHistorySize { |
411 | static constexpr const char *Name = "profiler_history_size" ; |
412 | static constexpr const char *Description = "Sets the profiler history size" ; |
413 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BIGINT; |
414 | static void SetLocal(ClientContext &context, const Value ¶meter); |
415 | static void ResetLocal(ClientContext &context); |
416 | static Value GetSetting(ClientContext &context); |
417 | }; |
418 | |
419 | struct ProfileOutputSetting { |
420 | static constexpr const char *Name = "profile_output" ; |
421 | static constexpr const char *Description = |
422 | "The file to which profile output should be saved, or empty to print to the terminal" ; |
423 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
424 | static void SetLocal(ClientContext &context, const Value ¶meter); |
425 | static void ResetLocal(ClientContext &context); |
426 | static Value GetSetting(ClientContext &context); |
427 | }; |
428 | |
429 | struct ProfilingModeSetting { |
430 | static constexpr const char *Name = "profiling_mode" ; |
431 | static constexpr const char *Description = "The profiling mode (STANDARD or DETAILED)" ; |
432 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
433 | static void SetLocal(ClientContext &context, const Value ¶meter); |
434 | static void ResetLocal(ClientContext &context); |
435 | static Value GetSetting(ClientContext &context); |
436 | }; |
437 | |
438 | struct ProgressBarTimeSetting { |
439 | static constexpr const char *Name = "progress_bar_time" ; |
440 | static constexpr const char *Description = |
441 | "Sets the time (in milliseconds) how long a query needs to take before we start printing a progress bar" ; |
442 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BIGINT; |
443 | static void SetLocal(ClientContext &context, const Value ¶meter); |
444 | static void ResetLocal(ClientContext &context); |
445 | static Value GetSetting(ClientContext &context); |
446 | }; |
447 | |
448 | struct SchemaSetting { |
449 | static constexpr const char *Name = "schema" ; |
450 | static constexpr const char *Description = |
451 | "Sets the default search schema. Equivalent to setting search_path to a single value." ; |
452 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
453 | static void SetLocal(ClientContext &context, const Value ¶meter); |
454 | static void ResetLocal(ClientContext &context); |
455 | static Value GetSetting(ClientContext &context); |
456 | }; |
457 | |
458 | struct SearchPathSetting { |
459 | static constexpr const char *Name = "search_path" ; |
460 | static constexpr const char *Description = |
461 | "Sets the default search search path as a comma-separated list of values" ; |
462 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
463 | static void SetLocal(ClientContext &context, const Value ¶meter); |
464 | static void ResetLocal(ClientContext &context); |
465 | static Value GetSetting(ClientContext &context); |
466 | }; |
467 | |
468 | struct TempDirectorySetting { |
469 | static constexpr const char *Name = "temp_directory" ; |
470 | static constexpr const char *Description = "Set the directory to which to write temp files" ; |
471 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
472 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
473 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
474 | static Value GetSetting(ClientContext &context); |
475 | }; |
476 | |
477 | struct ThreadsSetting { |
478 | static constexpr const char *Name = "threads" ; |
479 | static constexpr const char *Description = "The number of total threads used by the system." ; |
480 | static constexpr const LogicalTypeId InputType = LogicalTypeId::BIGINT; |
481 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
482 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
483 | static Value GetSetting(ClientContext &context); |
484 | }; |
485 | |
486 | struct UsernameSetting { |
487 | static constexpr const char *Name = "username" ; |
488 | static constexpr const char *Description = "The username to use. Ignored for legacy compatibility." ; |
489 | static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR; |
490 | static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter); |
491 | static void ResetGlobal(DatabaseInstance *db, DBConfig &config); |
492 | static Value GetSetting(ClientContext &context); |
493 | }; |
494 | |
495 | } // namespace duckdb |
496 | |