Skip to content

Commit 774af99

Browse files
committed
chore: add chdb.cpp
1 parent b07fb41 commit 774af99

File tree

10 files changed

+1186
-896
lines changed

10 files changed

+1186
-896
lines changed

programs/local/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
set (CLICKHOUSE_LOCAL_SOURCES LocalServer.cpp)
1+
set (CLICKHOUSE_LOCAL_SOURCES
2+
chdb.cpp
3+
LocalServer.cpp
4+
)
25

36
if (USE_PYTHON)
47
set (CHDB_SOURCES
8+
chdb.cpp
59
FormatHelper.cpp
610
ListScan.cpp
711
LocalChdb.cpp

programs/local/LocalChdb.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "LocalChdb.h"
22
#include "LocalServer.h"
33
#include "chdb.h"
4+
#include "chdb-internal.h"
45
#include "PythonImporter.h"
56
#include "PythonTableCache.h"
67
#include "TableFunctionPython.h"
@@ -492,7 +493,7 @@ PYBIND11_MODULE(_chdb, m)
492493

493494
auto destroy_import_cache = []()
494495
{
495-
DB::LocalServer::cleanupConnection();
496+
CHDB::chdbCleanupConnection();
496497
CHDB::PythonTableCache::clear();
497498
CHDB::PythonImporter::destroy();
498499
};

programs/local/LocalChdb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ class local_result_wrapper
131131
{
132132
return 0;
133133
}
134-
return result->storage_rows_read;
134+
return 0;
135135
}
136136
size_t storage_bytes_read()
137137
{
138138
if (result == nullptr)
139139
{
140140
return 0;
141141
}
142-
return result->storage_bytes_read;
142+
return 0;
143143
}
144144
double elapsed()
145145
{

0 commit comments

Comments
 (0)