mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
18 lines
345 B
C++
18 lines
345 B
C++
|
#pragma once
|
||
|
|
||
|
#include <Interpreters/Context.h>
|
||
|
|
||
|
inline DB::Context createContext()
|
||
|
{
|
||
|
auto context = DB::Context::createGlobal();
|
||
|
context.makeGlobalContext();
|
||
|
context.setPath("./");
|
||
|
return context;
|
||
|
}
|
||
|
|
||
|
inline const DB::Context & getContext()
|
||
|
{
|
||
|
static DB::Context global_context = createContext();
|
||
|
return global_context;
|
||
|
}
|