Skip to content

Commit

Permalink
remove: redis in poco, Dictionaries, Storages...
Browse files Browse the repository at this point in the history
  • Loading branch information
nmreadelf committed Mar 9, 2024
1 parent c652837 commit f21f14b
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 3 deletions.
4 changes: 3 additions & 1 deletion base/poco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ if (ENABLE_MONGODB)
endif ()
add_subdirectory (Net)
add_subdirectory (NetSSL_OpenSSL)
add_subdirectory (Redis)
if (ENABLE_REDIS)
add_subdirectory (Redis)
endif ()
add_subdirectory (Util)
add_subdirectory (XML)
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,16 @@ dbms_target_link_libraries (
PUBLIC
boost::system
clickhouse_common_io
Poco::Redis
)

if (ENABLE_MONGODB)
dbms_target_link_libraries(PUBLIC Poco::MongoDB)
endif()

if (ENABLE_REDIS)
dmbs_target_link_libraries(PUBLIC Poco::Redis)
endif()

if (TARGET ch::mysqlxx)
dbms_target_link_libraries (PUBLIC ch::mysqlxx)
endif()
Expand Down
5 changes: 4 additions & 1 deletion src/Dictionaries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ target_link_libraries(clickhouse_dictionaries
clickhouse_common_io
dbms
Poco::Data
Poco::Redis
string_utils
)
if (ENABLE_MONGODB)
target_link_libraries(clickhouse_dictionaries PRIVATE Poco::MongoDB)
endif()

if (ENABLE_REDIS)
target_link_libraries(clickhouse_dictionaries PRIVATE Poco::Redis)
endif()

target_link_libraries(clickhouse_dictionaries PUBLIC ch_contrib::abseil_swiss_tables)

if (TARGET ch_contrib::cassandra)
Expand Down
2 changes: 2 additions & 0 deletions src/Dictionaries/RedisDictionarySource.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#include "RedisDictionarySource.h"
#include "DictionarySourceFactory.h"
#include "DictionaryStructure.h"
Expand Down Expand Up @@ -179,3 +180,4 @@ namespace DB
}

}
#endif
2 changes: 2 additions & 0 deletions src/Dictionaries/RedisSource.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#include "RedisSource.h"

#include <vector>
Expand Down Expand Up @@ -216,3 +217,4 @@ namespace DB
return Chunk(std::move(columns), num_rows);
}
}
#endif
2 changes: 2 additions & 0 deletions src/Dictionaries/RedisSource.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#pragma once

#include <Core/Block.h>
Expand Down Expand Up @@ -39,3 +40,4 @@ namespace DB

}

#endif
2 changes: 2 additions & 0 deletions src/Storages/RedisCommon.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#include "RedisCommon.h"
#include <Common/Exception.h>
#include <Common/parseAddress.h>
Expand Down Expand Up @@ -148,3 +149,4 @@ RedisArrayPtr getRedisHashMapKeys(const RedisConnectionPtr & connection, RedisAr
}

}
#endif
2 changes: 2 additions & 0 deletions src/Storages/RedisCommon.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#pragma once

#include <Poco/Redis/Client.h>
Expand Down Expand Up @@ -76,3 +77,4 @@ RedisConnectionPtr getRedisConnection(RedisPoolPtr pool, const RedisConfiguratio
RedisArrayPtr getRedisHashMapKeys(const RedisConnectionPtr & connection, RedisArray & keys);

}
#endif
2 changes: 2 additions & 0 deletions src/Storages/StorageRedis.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#include <unordered_set>
#include <IO/WriteHelpers.h>
#include <Interpreters/MutationsInterpreter.h>
Expand Down Expand Up @@ -584,3 +585,4 @@ void registerStorageRedis(StorageFactory & factory)
}

}
#endif
2 changes: 2 additions & 0 deletions src/Storages/StorageRedis.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#pragma once

#include <Poco/Redis/Redis.h>
Expand Down Expand Up @@ -81,3 +82,4 @@ class StorageRedis : public IStorage, public IKeyValueEntity, WithContext
};

}
#endif
4 changes: 4 additions & 0 deletions src/Storages/registerStorages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ void registerStorageMySQL(StorageFactory & factory);
#ifdef MONGODB
void registerStorageMongoDB(StorageFactory & factory);
#endif
#ifdef USE_REDIS
void registerStorageRedis(StorageFactory & factory);
#endif


#if USE_RDKAFKA
Expand Down Expand Up @@ -162,7 +164,9 @@ void registerStorages()
#ifdef MONGODB
registerStorageMongoDB(factory);
#endif
#ifdef USE_REDIS
registerStorageRedis(factory);
#endif

#if USE_RDKAFKA
registerStorageKafka(factory);
Expand Down
2 changes: 2 additions & 0 deletions src/TableFunctions/TableFunctionRedis.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#include <TableFunctions/TableFunctionRedis.h>

#include <Common/Exception.h>
Expand Down Expand Up @@ -92,3 +93,4 @@ void registerTableFunctionRedis(TableFunctionFactory & factory)
}

}
#endif
2 changes: 2 additions & 0 deletions src/TableFunctions/TableFunctionRedis.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef USE_REDIS
#pragma once

#include <Storages/StorageRedis.h>
Expand Down Expand Up @@ -32,3 +33,4 @@ class TableFunctionRedis : public ITableFunction
};

}
#endif

0 comments on commit f21f14b

Please sign in to comment.