mirror of https://gitee.com/bigwinds/arangodb
removed unused functions and headers
This commit is contained in:
parent
ae25d2b53b
commit
b635983d9c
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "Basics/Common.h"
|
||||
#include "Aql/AqlValue.h"
|
||||
#include "Basics/Exceptions.h"
|
||||
#include "Basics/JsonHelper.h"
|
||||
#include "Utils/AqlTransaction.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "Basics/Common.h"
|
||||
#include "Aql/AqlValue.h"
|
||||
#include "Basics/tri-strings.h"
|
||||
#include "Utils/AqlTransaction.h"
|
||||
|
||||
#include <functional>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "IndexNode.h"
|
||||
#include "Aql/Ast.h"
|
||||
#include "Aql/ClusterNodes.h"
|
||||
#include "Aql/Collection.h"
|
||||
#include "Aql/Condition.h"
|
||||
#include "Aql/ExecutionPlan.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
/// @author Max Neunhoeffer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Aql/Optimizer.h"
|
||||
#include "Optimizer.h"
|
||||
#include "Aql/ExecutionEngine.h"
|
||||
#include "Aql/OptimizerRules.h"
|
||||
#include "Cluster/ServerState.h"
|
||||
|
|
|
@ -39,12 +39,10 @@
|
|||
#include "Basics/tri-strings.h"
|
||||
#include "Cluster/ServerState.h"
|
||||
#include "Utils/AqlTransaction.h"
|
||||
#include "Utils/CollectionNameResolver.h"
|
||||
#include "Utils/StandaloneTransactionContext.h"
|
||||
#include "Utils/V8TransactionContext.h"
|
||||
#include "V8/v8-conv.h"
|
||||
#include "V8Server/ApplicationV8.h"
|
||||
#include "V8Server/v8-shape-conv.h"
|
||||
#include "VocBase/vocbase.h"
|
||||
#include "VocBase/Graphs.h"
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "Aql/Graphs.h"
|
||||
#include "Aql/types.h"
|
||||
#include "Utils/AqlTransaction.h"
|
||||
#include "Utils/V8TransactionContext.h"
|
||||
#include "VocBase/voc-types.h"
|
||||
#include "V8Server/ApplicationV8.h"
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ namespace aql {
|
|||
class SortCondition;
|
||||
}
|
||||
|
||||
class HashIndex;
|
||||
class Transaction;
|
||||
|
||||
class HashIndexIterator final : public IndexIterator {
|
||||
|
|
|
@ -23,11 +23,9 @@
|
|||
|
||||
#include "PrimaryIndex.h"
|
||||
#include "Aql/AstNode.h"
|
||||
#include "Aql/SortCondition.h"
|
||||
#include "Basics/Exceptions.h"
|
||||
#include "Basics/hashes.h"
|
||||
#include "Indexes/SimpleAttributeEqualityMatcher.h"
|
||||
#include "Utils/CollectionNameResolver.h"
|
||||
#include "VocBase/document-collection.h"
|
||||
#include "VocBase/transaction.h"
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "Basics/AttributeNameParser.h"
|
||||
#include "Basics/debugging.h"
|
||||
#include "VocBase/document-collection.h"
|
||||
#include "VocBase/transaction.h"
|
||||
#include "VocBase/VocShaper.h"
|
||||
|
||||
#include <velocypack/Iterator.h>
|
||||
|
|
|
@ -48,6 +48,7 @@ class SortCondition;
|
|||
struct Variable;
|
||||
}
|
||||
|
||||
class SkiplistIndex;
|
||||
class Transaction;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "Basics/Common.h"
|
||||
#include "Replication/Syncer.h"
|
||||
#include "Utils/ReplicationTransaction.h"
|
||||
#include "VocBase/replication-applier.h"
|
||||
|
||||
struct TRI_json_t;
|
||||
|
|
|
@ -23,11 +23,9 @@
|
|||
|
||||
#include "Syncer.h"
|
||||
|
||||
#include "Basics/files.h"
|
||||
#include "Basics/json.h"
|
||||
#include "Basics/tri-strings.h"
|
||||
#include "Basics/JsonHelper.h"
|
||||
#include "Basics/Exceptions.h"
|
||||
#include "Basics/json.h"
|
||||
#include "Basics/JsonHelper.h"
|
||||
#include "Rest/HttpRequest.h"
|
||||
#include "SimpleHttpClient/GeneralClientConnection.h"
|
||||
#include "SimpleHttpClient/SimpleHttpClient.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "Basics/Exceptions.h"
|
||||
#include "Basics/json.h"
|
||||
#include "Basics/MutexLocker.h"
|
||||
#include "Basics/ScopeGuard.h"
|
||||
#include "Basics/VelocyPackHelper.h"
|
||||
#include "Basics/VPackStringBufferAdapter.h"
|
||||
#include "Utils/Cursor.h"
|
||||
|
|
|
@ -23,10 +23,7 @@
|
|||
|
||||
#include "RestEdgeHandler.h"
|
||||
#include "Basics/conversions.h"
|
||||
#include "Basics/StringUtils.h"
|
||||
#include "Basics/tri-strings.h"
|
||||
#include "Basics/VelocyPackHelper.h"
|
||||
#include "Cluster/ClusterInfo.h"
|
||||
#include "Cluster/ClusterMethods.h"
|
||||
#include "Cluster/ServerState.h"
|
||||
#include "Rest/HttpRequest.h"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "Rest/HttpRequest.h"
|
||||
#include "Scheduler/ApplicationScheduler.h"
|
||||
#include "Scheduler/Scheduler.h"
|
||||
#include "Utils/V8TransactionContext.h"
|
||||
#include "V8/v8-buffer.h"
|
||||
#include "V8/v8-conv.h"
|
||||
#include "V8/v8-shell.h"
|
||||
|
|
|
@ -86,18 +86,6 @@ static int FilenameComparator(const void* lhs, const void* rhs) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief compare two filenames, based on the numeric part contained in
|
||||
/// the filename. this is used to sort datafile filenames on startup
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static bool FilenameStringComparator(std::string const& lhs,
|
||||
std::string const& rhs) {
|
||||
uint64_t const numLeft = GetNumericFilenamePart(lhs.c_str());
|
||||
uint64_t const numRight = GetNumericFilenamePart(rhs.c_str());
|
||||
return numLeft < numRight;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief compare two datafiles, based on the numeric part contained in
|
||||
/// the filename
|
||||
|
@ -1335,75 +1323,6 @@ void VocbaseCollectionInfo::update(VocbaseCollectionInfo const& other) {
|
|||
_waitForSync = other.waitForSync();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief return JSON information about the collection from the collection's
|
||||
/// "parameter.json" file. This function does not require the collection to be
|
||||
/// loaded.
|
||||
/// The caller must make sure that the "parameter.json" file is not modified
|
||||
/// while this function is called.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TRI_json_t* TRI_ReadJsonCollectionInfo(TRI_vocbase_col_t* collection) {
|
||||
char* filename =
|
||||
TRI_Concatenate2File(collection->pathc_str(), TRI_VOC_PARAMETER_FILE);
|
||||
|
||||
// load JSON description of the collection
|
||||
TRI_json_t* json = TRI_JsonFile(TRI_CORE_MEM_ZONE, filename, nullptr);
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, filename);
|
||||
|
||||
if (json == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief iterate over the index (JSON) files of a collection, using a callback
|
||||
/// function for each.
|
||||
/// This function does not require the collection to be loaded.
|
||||
/// The caller must make sure that the files are not modified while this
|
||||
/// function is called.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int TRI_IterateJsonIndexesCollectionInfo(TRI_vocbase_col_t* collection,
|
||||
int (*filter)(TRI_vocbase_col_t*,
|
||||
char const*, void*),
|
||||
void* data) {
|
||||
regex_t re;
|
||||
int res;
|
||||
|
||||
if (regcomp(&re, "^index-[0-9][0-9]*\\.json$", REG_EXTENDED | REG_NOSUB) !=
|
||||
0) {
|
||||
LOG(ERROR) << "unable to compile regular expression";
|
||||
|
||||
return TRI_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
std::vector<std::string> files = TRI_FilesDirectory(collection->pathc_str());
|
||||
res = TRI_ERROR_NO_ERROR;
|
||||
|
||||
// sort by index id
|
||||
std::sort(files.begin(), files.end(), FilenameStringComparator);
|
||||
|
||||
for (auto const& file : files) {
|
||||
if (regexec(&re, file.c_str(), (size_t)0, nullptr, 0) == 0) {
|
||||
char* fqn = TRI_Concatenate2File(collection->pathc_str(), file.c_str());
|
||||
|
||||
res = filter(collection, fqn, data);
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, fqn);
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
regfree(&re);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief jsonify a parameter info block
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -353,27 +353,6 @@ void TRI_DestroyCollection(TRI_collection_t*);
|
|||
|
||||
void TRI_FreeCollection(TRI_collection_t*);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief return JSON information about the collection from the collection's
|
||||
/// "parameter.json" file. This function does not require the collection to be
|
||||
/// loaded.
|
||||
/// The caller must make sure that the files is not modified while this
|
||||
/// function is called.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct TRI_json_t* TRI_ReadJsonCollectionInfo(TRI_vocbase_col_t*);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief iterate over the index (JSON) files of a collection, using a callback
|
||||
/// function for each.
|
||||
/// This function does not require the collection to be loaded.
|
||||
/// The caller must make sure that the files is not modified while this
|
||||
/// function is called.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int TRI_IterateJsonIndexesCollectionInfo(
|
||||
TRI_vocbase_col_t*, int (*)(TRI_vocbase_col_t*, char const*, void*), void*);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief jsonify a parameter info block
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
#include "Basics/Common.h"
|
||||
#include "Basics/fasthash.h"
|
||||
#include "Basics/JsonHelper.h"
|
||||
#include "Basics/ReadWriteLock.h"
|
||||
#include "Cluster/ClusterInfo.h"
|
||||
#include "VocBase/collection.h"
|
||||
#include "VocBase/DatafileStatistics.h"
|
||||
#include "VocBase/Ditch.h"
|
||||
|
@ -35,12 +35,7 @@
|
|||
#include "VocBase/update-policy.h"
|
||||
#include "VocBase/voc-types.h"
|
||||
#include "Wal/Marker.h"
|
||||
#include "Cluster/ClusterInfo.h"
|
||||
|
||||
#include <regex.h>
|
||||
|
||||
struct TRI_cap_constraint_s;
|
||||
struct TRI_document_edge_s;
|
||||
class TRI_headers_t;
|
||||
|
||||
class VocShaper;
|
||||
|
@ -49,12 +44,8 @@ namespace arangodb {
|
|||
class CapConstraint;
|
||||
class EdgeIndex;
|
||||
class ExampleMatcher;
|
||||
class FulltextIndex;
|
||||
class GeoIndex2;
|
||||
class HashIndex;
|
||||
class Index;
|
||||
class PrimaryIndex;
|
||||
class SkiplistIndex;
|
||||
class Transaction;
|
||||
namespace velocypack {
|
||||
class Builder;
|
||||
|
|
Loading…
Reference in New Issue