1
0
Fork 0

Whenever an AQLValue should store an external it will now store a pointer instead.

This commit is contained in:
Michael Hackstein 2016-03-29 16:01:58 +02:00
parent a5d20b0041
commit 8761550add
1 changed files with 5 additions and 1 deletions

View File

@ -370,7 +370,6 @@ struct AqlValue final {
//////////////////////////////////////////////////////////////////////////////
/// @brief compare function for two values
/// TODO: implement
//////////////////////////////////////////////////////////////////////////////
static int Compare(arangodb::AqlTransaction*,
@ -392,6 +391,11 @@ struct AqlValue final {
//////////////////////////////////////////////////////////////////////////////
void initFromSlice(arangodb::velocypack::Slice const& slice) {
if (slice.isExternal()) {
_data.pointer = VPackSlice(slice.getExternal()).start();
setType(AqlValueType::VPACK_POINTER);
return;
}
arangodb::velocypack::ValueLength length = slice.byteSize();
if (length < sizeof(_data.internal)) {
// Use internal