mirror of https://gitee.com/bigwinds/arangodb
manually-merge: differentiate data-source types by category e.g. LogicalCollection/LogicalView
This commit is contained in:
parent
f94bd4f5b4
commit
daa1db659c
|
@ -1927,7 +1927,7 @@ bool IResearchView::sync(size_t maxMsec /*= 0*/) {
|
|||
|
||||
/*static*/ arangodb::LogicalDataSource::Type const& IResearchView::type() noexcept {
|
||||
static auto& type = arangodb::LogicalDataSource::Type::emplace(
|
||||
std::string(IResearchFeature::type())
|
||||
arangodb::velocypack::StringRef(IResearchFeature::type())
|
||||
);
|
||||
|
||||
return type;
|
||||
|
@ -2193,7 +2193,7 @@ void IResearchView::verifyKnownCollections() {
|
|||
virtual arangodb::Result commitTransaction(
|
||||
arangodb::transaction::Methods*
|
||||
) override { return TRI_ERROR_NOT_IMPLEMENTED; }
|
||||
virtual bool hasFailedOperations() const { return false; }
|
||||
virtual bool hasFailedOperations() const override { return false; }
|
||||
};
|
||||
|
||||
State state;
|
||||
|
|
|
@ -2086,9 +2086,8 @@ TRI_vocbase_t* MMFilesEngine::openExistingDatabase(TRI_voc_tick_t id,
|
|||
// we found a view that is still active
|
||||
LOG_TOPIC(TRACE, Logger::FIXME) << "processing view: " << it.toJson();
|
||||
|
||||
std::string type = it.get("type").copyString();
|
||||
auto& dataSourceType =
|
||||
arangodb::LogicalDataSource::Type::emplace(std::move(type));
|
||||
arangodb::velocypack::StringRef type(it.get("type"));
|
||||
auto& dataSourceType = arangodb::LogicalDataSource::Type::emplace(type);
|
||||
auto& creator = viewTypesFeature->factory(dataSourceType);
|
||||
|
||||
if (!creator) {
|
||||
|
|
|
@ -1645,10 +1645,8 @@ TRI_vocbase_t* RocksDBEngine::openExistingDatabase(TRI_voc_tick_t id,
|
|||
|
||||
for (auto const& it : VPackArrayIterator(slice)) {
|
||||
// we found a view that is still active
|
||||
|
||||
std::string type = it.get("type").copyString();
|
||||
auto& dataSourceType =
|
||||
arangodb::LogicalDataSource::Type::emplace(std::move(type));
|
||||
arangodb::velocypack::StringRef type(it.get("type"));
|
||||
auto& dataSourceType = arangodb::LogicalDataSource::Type::emplace(type);
|
||||
auto& creator = viewTypesFeature->factory(dataSourceType);
|
||||
|
||||
if (!creator) {
|
||||
|
|
|
@ -145,12 +145,17 @@ arangodb::LogicalDataSource::Type const& ReadType(
|
|||
std::string const& key,
|
||||
TRI_col_type_e def
|
||||
) {
|
||||
static const auto& document =
|
||||
arangodb::LogicalDataSource::Type::emplace("document");
|
||||
static const auto& edge = arangodb::LogicalDataSource::Type::emplace("edge");
|
||||
static const auto& document = arangodb::LogicalDataSource::Type::emplace(
|
||||
arangodb::velocypack::StringRef("document")
|
||||
);
|
||||
static const auto& edge = arangodb::LogicalDataSource::Type::emplace(
|
||||
arangodb::velocypack::StringRef("edge")
|
||||
);
|
||||
|
||||
// arbitrary system-global value for unknown
|
||||
static const auto& unknown = arangodb::LogicalDataSource::Type::emplace("");
|
||||
static const auto& unknown = arangodb::LogicalDataSource::Type::emplace(
|
||||
arangodb::velocypack::StringRef("")
|
||||
);
|
||||
|
||||
switch (Helper::readNumericValue<TRI_col_type_e, int>(info, key, def)) {
|
||||
case TRI_col_type_e::TRI_COL_TYPE_DOCUMENT:
|
||||
|
@ -208,10 +213,11 @@ LogicalCollection::LogicalCollection(TRI_vocbase_t* vocbase,
|
|||
VPackSlice const& info,
|
||||
bool isAStub)
|
||||
: LogicalDataSource(
|
||||
category(),
|
||||
ReadType(info, "type", TRI_COL_TYPE_UNKNOWN),
|
||||
vocbase,
|
||||
ReadCid(info),
|
||||
ReadPlanId(info, ReadCid(info)),
|
||||
ReadPlanId(info, 0),
|
||||
ReadStringValue(info, "name", ""),
|
||||
Helper::readBooleanValue(info, "deleted", false)
|
||||
),
|
||||
|
@ -416,6 +422,12 @@ LogicalCollection::LogicalCollection(TRI_vocbase_t* vocbase,
|
|||
|
||||
LogicalCollection::~LogicalCollection() {}
|
||||
|
||||
/*static*/ LogicalDataSource::Category const& LogicalCollection::category() noexcept {
|
||||
static const Category category;
|
||||
|
||||
return category;
|
||||
}
|
||||
|
||||
void LogicalCollection::prepareIndexes(VPackSlice indexesSlice) {
|
||||
TRI_ASSERT(_physical != nullptr);
|
||||
|
||||
|
|
|
@ -92,6 +92,11 @@ class LogicalCollection: public LogicalDataSource {
|
|||
public:
|
||||
LogicalCollection() = delete;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief the category representing a logical collection
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static Category const& category() noexcept;
|
||||
|
||||
virtual std::unique_ptr<LogicalCollection> clone() {
|
||||
return std::unique_ptr<LogicalCollection>(new LogicalCollection(*this));
|
||||
}
|
||||
|
|
|
@ -23,20 +23,32 @@
|
|||
|
||||
#include <mutex>
|
||||
|
||||
#include "velocypack/StringRef.h"
|
||||
|
||||
#include "LogicalDataSource.h"
|
||||
|
||||
namespace arangodb {
|
||||
|
||||
/*static*/ LogicalDataSource::Type const& LogicalDataSource::Type::emplace(
|
||||
std::string&& name
|
||||
arangodb::velocypack::StringRef const& name
|
||||
) {
|
||||
struct Less {
|
||||
bool operator()(
|
||||
arangodb::velocypack::StringRef const& lhs,
|
||||
arangodb::velocypack::StringRef const& rhs
|
||||
) const noexcept {
|
||||
return lhs.compare(rhs) < 0;
|
||||
}
|
||||
};
|
||||
static std::mutex mutex;
|
||||
static std::map<std::string, LogicalDataSource::Type> types;
|
||||
static std::map<arangodb::velocypack::StringRef, LogicalDataSource::Type, Less> types;
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
auto itr = types.emplace(std::move(name), Type());
|
||||
auto itr = types.emplace(name, Type());
|
||||
|
||||
if (itr.second) {
|
||||
itr.first->second._name = &(itr.first->first); // point '_name' at key
|
||||
const_cast<std::string&>(itr.first->second._name) = name.toString(); // update '_name'
|
||||
const_cast<arangodb::velocypack::StringRef&>(itr.first->first) =
|
||||
itr.first->second.name(); // point key at value stored in '_name'
|
||||
}
|
||||
|
||||
return itr.first->second;
|
||||
|
|
|
@ -31,6 +31,12 @@ struct TRI_vocbase_t; // forward declaration
|
|||
|
||||
namespace arangodb {
|
||||
|
||||
namespace velocypack {
|
||||
|
||||
class StringRef; // forward declaration
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief a common ancestor to all database objects proving access to documents
|
||||
/// e.g. LogicalCollection / LoigcalView
|
||||
|
@ -38,6 +44,23 @@ namespace arangodb {
|
|||
class LogicalDataSource {
|
||||
public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief singleton marker identifying the logical data-source category
|
||||
/// each category is identity-compared for equivalence
|
||||
/// e.g. static Category const& LogicalCollection::category()
|
||||
/// static Category const& LogicalView::category()
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
class Category final {
|
||||
public:
|
||||
Category() {}
|
||||
Category(Category const&) = delete;
|
||||
Category(Category&&) noexcept = delete;
|
||||
Category& operator=(Category const&) = delete;
|
||||
Category& operator=(Category&&) noexcept = delete;
|
||||
bool operator==(Category const& other) const noexcept { return this == &other; }
|
||||
bool operator!=(Category const& other) const noexcept { return this != &other; }
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief singleton identifying the underlying implementation type
|
||||
/// each implementation should have its own static instance
|
||||
|
@ -48,11 +71,11 @@ class LogicalDataSource {
|
|||
Type(Type&& other) noexcept = default;
|
||||
bool operator==(Type const& other) const noexcept { return this == &other; }
|
||||
bool operator!=(Type const& other) const noexcept { return this != &other; }
|
||||
static Type const& emplace(std::string&& name);
|
||||
inline std::string const& name() const noexcept { return *_name; }
|
||||
static Type const& emplace(arangodb::velocypack::StringRef const& name);
|
||||
inline std::string const& name() const noexcept { return _name; }
|
||||
|
||||
private:
|
||||
std::string const* _name; // type name for e.g. log messages
|
||||
std::string _name; // type name for e.g. log messages
|
||||
|
||||
Type() = default;
|
||||
Type(Type const&) = delete;
|
||||
|
@ -61,6 +84,7 @@ class LogicalDataSource {
|
|||
};
|
||||
|
||||
LogicalDataSource(
|
||||
Category const& category,
|
||||
Type const& type,
|
||||
TRI_vocbase_t* vocbase,
|
||||
TRI_voc_cid_t id,
|
||||
|
@ -69,14 +93,16 @@ class LogicalDataSource {
|
|||
bool deleted
|
||||
) noexcept
|
||||
: _name(std::move(name)),
|
||||
_category(category),
|
||||
_type(type),
|
||||
_vocbase(vocbase),
|
||||
_id(id),
|
||||
_planId(planId),
|
||||
_planId(planId ? planId : id),
|
||||
_deleted(deleted) {
|
||||
}
|
||||
LogicalDataSource(LogicalDataSource const& other)
|
||||
: _name(other._name),
|
||||
_category(other._category),
|
||||
_type(other._type),
|
||||
_vocbase(other._vocbase),
|
||||
_id(other._id),
|
||||
|
@ -86,14 +112,15 @@ class LogicalDataSource {
|
|||
|
||||
virtual ~LogicalDataSource() {}
|
||||
|
||||
inline Category const& category() const noexcept { return _category; }
|
||||
inline bool deleted() const noexcept { return _deleted; }
|
||||
virtual void drop() = 0;
|
||||
inline TRI_voc_cid_t id() const { return _id; }
|
||||
inline std::string const& name() const { return _name; }
|
||||
inline TRI_voc_cid_t id() const noexcept { return _id; }
|
||||
inline std::string const& name() const noexcept { return _name; }
|
||||
inline TRI_voc_cid_t planId() const noexcept { return _planId; }
|
||||
virtual Result rename(std::string&& newName, bool doSync) = 0;
|
||||
inline Type const& type() const noexcept { return _type; }
|
||||
inline TRI_vocbase_t* vocbase() const { return _vocbase; }
|
||||
inline TRI_vocbase_t* vocbase() const noexcept { return _vocbase; }
|
||||
|
||||
protected:
|
||||
inline void deleted(bool deleted) noexcept { _deleted = deleted; }
|
||||
|
@ -102,6 +129,7 @@ class LogicalDataSource {
|
|||
private:
|
||||
// members ordered by sizeof(decltype(..))
|
||||
std::string _name; // data-source name
|
||||
Category const& _category; // the category of the logical data-source
|
||||
Type const& _type; // the type of the underlying data-source implementation
|
||||
TRI_vocbase_t* const _vocbase; // the database where the data-source resides TODO change to reference
|
||||
TRI_voc_cid_t const _id; // local data-source id (current database node)
|
||||
|
|
|
@ -81,14 +81,6 @@ static TRI_voc_cid_t ReadPlanId(VPackSlice info, TRI_voc_cid_t vid) {
|
|||
return vid;
|
||||
}
|
||||
|
||||
std::string ReadStringValue(
|
||||
arangodb::velocypack::Slice info,
|
||||
std::string const& name,
|
||||
std::string const& def
|
||||
) {
|
||||
return info.isObject() ? Helper::getStringValue(info, name, def) : def;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
/// @brief This the "copy" constructor used in the cluster
|
||||
|
@ -106,11 +98,14 @@ LogicalView::LogicalView(LogicalView const& other)
|
|||
// is relevant for this view
|
||||
LogicalView::LogicalView(TRI_vocbase_t* vocbase, VPackSlice const& info)
|
||||
: LogicalDataSource(
|
||||
LogicalDataSource::Type::emplace(ReadStringValue(info, "type", "")),
|
||||
category(),
|
||||
LogicalDataSource::Type::emplace(
|
||||
arangodb::basics::VelocyPackHelper::getStringRef(info, "type", "")
|
||||
),
|
||||
vocbase,
|
||||
ReadId(info),
|
||||
ReadPlanId(info, ReadId(info)),
|
||||
ReadStringValue(info, "name", ""),
|
||||
ReadPlanId(info, 0),
|
||||
arangodb::basics::VelocyPackHelper::getStringValue(info, "name", ""),
|
||||
Helper::readBooleanValue(info, "deleted", false)
|
||||
),
|
||||
_physical(EngineSelectorFeature::ENGINE->createPhysicalView(this, info)) {
|
||||
|
@ -125,8 +120,16 @@ LogicalView::LogicalView(TRI_vocbase_t* vocbase, VPackSlice const& info)
|
|||
|
||||
LogicalView::~LogicalView() {}
|
||||
|
||||
/*static*/ LogicalDataSource::Category const& LogicalView::category() noexcept {
|
||||
static const Category category;
|
||||
|
||||
return category;
|
||||
}
|
||||
|
||||
bool LogicalView::IsAllowedName(VPackSlice parameters) {
|
||||
std::string name = ReadStringValue(parameters, "name", "");
|
||||
std::string name =
|
||||
arangodb::basics::VelocyPackHelper::getStringValue(parameters, "name", "");
|
||||
|
||||
return IsAllowedName(name);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,11 @@ class LogicalView final: public LogicalDataSource {
|
|||
LogicalView(TRI_vocbase_t*, velocypack::Slice const&);
|
||||
~LogicalView();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief the category representing a logical view
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static Category const& category() noexcept;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief invoke visitor on all collections that a view will return
|
||||
/// @return visitation was successful
|
||||
|
|
|
@ -1573,9 +1573,8 @@ std::shared_ptr<arangodb::LogicalView> TRI_vocbase_t::createViewWorker(
|
|||
THROW_ARANGO_EXCEPTION(TRI_ERROR_ARANGO_ILLEGAL_NAME);
|
||||
}
|
||||
|
||||
std::string type = arangodb::basics::VelocyPackHelper::getStringValue(
|
||||
parameters, "type", "");
|
||||
|
||||
auto type =
|
||||
arangodb::basics::VelocyPackHelper::getStringRef(parameters, "type", "");
|
||||
ViewTypesFeature* viewTypesFeature =
|
||||
application_features::ApplicationServer::getFeature<ViewTypesFeature>(
|
||||
"ViewTypes");
|
||||
|
@ -1587,8 +1586,7 @@ std::shared_ptr<arangodb::LogicalView> TRI_vocbase_t::createViewWorker(
|
|||
);
|
||||
}
|
||||
|
||||
auto& dataSourceType =
|
||||
arangodb::LogicalDataSource::Type::emplace(std::move(type));
|
||||
auto& dataSourceType = arangodb::LogicalDataSource::Type::emplace(type);
|
||||
auto& creator = viewTypesFeature->factory(dataSourceType);
|
||||
|
||||
if (!creator) {
|
||||
|
|
|
@ -502,6 +502,35 @@ void VelocyPackHelper::ensureStringValue(VPackSlice const& slice,
|
|||
}
|
||||
}
|
||||
|
||||
/*static*/ arangodb::velocypack::StringRef VelocyPackHelper::getStringRef(
|
||||
arangodb::velocypack::Slice slice,
|
||||
arangodb::velocypack::StringRef const& defaultValue
|
||||
) noexcept {
|
||||
return slice.isString()
|
||||
? arangodb::velocypack::StringRef(slice) : defaultValue
|
||||
;
|
||||
}
|
||||
|
||||
/*static*/ arangodb::velocypack::StringRef VelocyPackHelper::getStringRef(
|
||||
arangodb::velocypack::Slice slice,
|
||||
std::string const& key,
|
||||
arangodb::velocypack::StringRef const& defaultValue
|
||||
) noexcept {
|
||||
if (slice.isExternal()) {
|
||||
slice = arangodb::velocypack::Slice(slice.getExternal());
|
||||
}
|
||||
|
||||
if (!slice.isObject() || !slice.hasKey(key)) {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
auto value = slice.get(key);
|
||||
|
||||
return value.isString()
|
||||
? arangodb::velocypack::StringRef(value) : defaultValue
|
||||
;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns a string value, or the default value if it is not a string
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -314,6 +314,46 @@ class VelocyPackHelper {
|
|||
return sub.getNumericValue<T>();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @return string ref, or the default ref if slice is not a string
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static arangodb::velocypack::StringRef getStringRef(
|
||||
arangodb::velocypack::Slice slice,
|
||||
arangodb::velocypack::StringRef const& defaultValue
|
||||
) noexcept;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @return string ref, or the default ref if slice is not a string
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static arangodb::velocypack::StringRef getStringRef(
|
||||
arangodb::velocypack::Slice slice,
|
||||
char const* defaultValue
|
||||
) noexcept {
|
||||
return getStringRef(slice, arangodb::velocypack::StringRef(defaultValue));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @return string ref, or the defaultValue if slice[key] is not a string
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static arangodb::velocypack::StringRef getStringRef(
|
||||
arangodb::velocypack::Slice slice,
|
||||
std::string const& key,
|
||||
arangodb::velocypack::StringRef const& defaultValue
|
||||
) noexcept;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @return string ref, or the defaultValue if slice[key] is not a string
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
static arangodb::velocypack::StringRef getStringRef(
|
||||
arangodb::velocypack::Slice slice,
|
||||
std::string const& key,
|
||||
char const* defaultValue
|
||||
) noexcept {
|
||||
return getStringRef(
|
||||
slice, key, arangodb::velocypack::StringRef(defaultValue)
|
||||
);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns a string value, or the default value if it is not a string
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -502,4 +542,4 @@ struct equal_to<arangodb::basics::VPackHashedSlice> {
|
|||
arangodb::LoggerStream& operator<<(arangodb::LoggerStream&,
|
||||
arangodb::velocypack::Slice const&);
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -114,6 +114,7 @@ add_executable(
|
|||
RocksDBEngine/IndexEstimatorTest.cpp
|
||||
RocksDBEngine/TypeConversionTest.cpp
|
||||
SimpleHttpClient/CommunicatorTest.cpp
|
||||
VocBase/LogicalDataSource-test.cpp
|
||||
${IRESEARCH_TESTS_SOURCES}
|
||||
main.cpp
|
||||
)
|
||||
|
|
|
@ -226,6 +226,9 @@ TEST_CASE("IResearchViewTest", "[iresearch][iresearch-view]") {
|
|||
IResearchViewSetup s;
|
||||
UNUSED(s);
|
||||
|
||||
SECTION("test_type") {
|
||||
CHECK((arangodb::LogicalDataSource::Type::emplace(arangodb::velocypack::StringRef("arangosearch")) == arangodb::iresearch::IResearchView::type()));
|
||||
}
|
||||
|
||||
SECTION("test_defaults") {
|
||||
auto namedJson = arangodb::velocypack::Parser::fromJson("{ \"name\": \"testView\" }");
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2018 ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// @author Andrey Abramov
|
||||
/// @author Vasiliy Nabatchikov
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "catch.hpp"
|
||||
#include "../IResearch/StorageEngineMock.h"
|
||||
#include "StorageEngine/EngineSelectorFeature.h"
|
||||
#include "velocypack/Parser.h"
|
||||
#include "VocBase/LogicalCollection.h"
|
||||
#include "VocBase/LogicalView.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- setup / tear-down
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
struct LogicalDataSourceSetup {
|
||||
StorageEngineMock engine;
|
||||
|
||||
LogicalDataSourceSetup() {
|
||||
arangodb::EngineSelectorFeature::ENGINE = &engine;
|
||||
}
|
||||
|
||||
~LogicalDataSourceSetup() {
|
||||
arangodb::EngineSelectorFeature::ENGINE = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief setup
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TEST_CASE("LogicalDataSourceTest", "[vocbase]") {
|
||||
LogicalDataSourceSetup s;
|
||||
(void)(s);
|
||||
|
||||
SECTION("test_category") {
|
||||
// LogicalCollection
|
||||
{
|
||||
auto json = arangodb::velocypack::Parser::fromJson("{ \"name\": \"testCollection\" }");
|
||||
arangodb::LogicalCollection instance(nullptr, json->slice(), true);
|
||||
|
||||
CHECK((arangodb::LogicalCollection::category() == instance.category()));
|
||||
}
|
||||
|
||||
// LogicalView
|
||||
{
|
||||
auto json = arangodb::velocypack::Parser::fromJson("{ \"name\": \"testView\" }");
|
||||
arangodb::LogicalView instance(nullptr, json->slice());
|
||||
|
||||
CHECK((arangodb::LogicalView::category() == instance.category()));
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief generate tests
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
Loading…
Reference in New Issue