ClickHouse/dbms/Common/tests/gtest_global_context.h

18 lines
345 B
C++
Raw Normal View History

2020-02-07 09:51:48 +00:00
#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;
}